Skip to content

MAF Harness and multi slot agent definition - #16

Merged
MatthewHsu1 merged 32 commits into
mainfrom
feat/postgres
Sep 16, 2026
Merged

MatthewHsu1 merged 32 commits into
mainfrom
feat/postgres

Conversation

@MatthewHsu1

Copy link
Copy Markdown
Owner

No description provided.

The store now numbers every message from a counter it owns, so a
human-handoff row written from another machine cannot collide with the
session's own rows. Every AgentCore table moves into the `agentcore`
schema.

- Add `call.next_ordinal`. `AppendAsync` takes drafts and returns the
  rows with their ordinals, numbered in one atomic statement.
- Add `ICallStore.AppendMessageAsync(callId, message)` for a host to
  write one row outside any turn.
- `RewriteAsync` finds a row by message id, not by ordinal.
- Move `NextOrdinal` from `CallSessionState` to `CallRecord`.
- At every turn after the first, the session drains, reads the counter,
  and re-reads the words only when the counter moved. A failed read
  raises `CallEventKind.TranscriptResyncFailed` (13) and the turn runs
  on the words it holds.
- Name the `agentcore` schema in every statement. The ledger is now
  `agentcore.schema_migration`.
- Split `PostgresCallStore` into `PostgresCallRows` and
  `PostgresCallVerification`. Split the three largest test files.

BREAKING CHANGE: `ICallStore.AppendAsync` takes a call id and
`CallMessageDraft` rows and returns the written rows. `RewriteAsync`
takes a message id. `CallSessionState.NextOrdinal` is gone. Every table
lives in the `agentcore` schema, so a consumer's `principalSchema` is
now `"agentcore"`.
…eferences

- Introduced TurnSources class to handle source references during turns.
- Implemented methods to publish and retrieve sources based on outer tool calls.
- Updated DrawingAgentDefinition, DrawingData, and PresentTool to use the new Turn namespace.
- Added unit tests for TurnSources to ensure correct behavior when publishing and retrieving sources.
- Created TurnAmbientsTestScope for managing ambient contexts in tests.
- Added TurnContextProviderTests and TurnResultsTests to validate turn context handling and results recording.
- Refactored existing tests to align with the new Turn structure.
- Introduced `GraphGuardGate` to handle message routing through guarded edges, ensuring state is available before processing.
- Added `GraphStateCarrier` to encapsulate state snapshots for graph runs, facilitating message construction and extraction.
- Created `GraphStateEntry` to manage the lifecycle of graph state within workflows, ensuring proper state updates during execution.
- Removed `CallStateScope` as it was replaced by the new graph state management approach.
- Updated tests to reflect changes in state handling and ensure proper error reporting when state is missing.
- Refactored `CallTurnRunner` and `CallTurnStream` to eliminate unnecessary ambient state management, simplifying the execution flow.
- Enhanced `GraphStateAgent` to file state snapshots correctly at the start of graph runs, ensuring guards have access to the necessary context.
…ity warnings for validation and identifier generation
…uilder; refactor related tests to focus on rendering functionality and update naming conventions for clarity.
@MatthewHsu1
MatthewHsu1 merged commit 6e1bf0e into main Sep 16, 2026
1 check passed
@MatthewHsu1
MatthewHsu1 deleted the feat/postgres branch September 16, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant