fix: reload CAS store after agent spawn + share schemas via uwf-protocol
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
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/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();
|
||||
Reference in New Issue
Block a user