refactor(agent-kit): base AgentContext on ModeratorContext

AgentContext now extends ModeratorContext (start + steps) with threadId, role, store, and expanded workflow. Hermes and mock-agent read prompt/steps/systemPrompt from the new shape.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-18 16:14:13 +00:00
parent 072d900fcb
commit 710d42d6b9
4 changed files with 18 additions and 21 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ const MOCK_RAW_OUTPUT_SCHEMA: JSONSchema = {
const agent = createAgent({
name: "mock",
run: async (ctx) => {
const output = `Mock output for role ${ctx.role}: task was "${ctx.prompt}"`;
const output = `Mock output for role ${ctx.role}: task was "${ctx.start.prompt}"`;
const { store } = ctx;
await bootstrap(store);
const schemaHash = await putSchema(store, MOCK_RAW_OUTPUT_SCHEMA);