0727e0e8d5
The agent subprocess writes StepNode to CAS on disk, but the parent process had an in-memory cache from createFsStore init. Fix: re-create store after agent spawn to pick up new nodes. Also centralized JSON Schemas in uwf-protocol so cli-uwf and agent-kit produce identical type hashes. E2E smoke test passing: workflow put → thread start → 3x step → done Refs #309
13 lines
288 B
TypeScript
13 lines
288 B
TypeScript
#!/usr/bin/env bun
|
|
// Mock agent for smoke testing
|
|
import { createAgent } from "../packages/uwf-agent-kit/src/index.js";
|
|
|
|
const agent = createAgent({
|
|
name: "mock",
|
|
run: async (ctx) => {
|
|
return `Mock output for role ${ctx.role}: task was "${ctx.prompt}"`;
|
|
},
|
|
});
|
|
|
|
await agent();
|