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:
2026-05-18 09:33:52 +00:00
parent ba012d98bc
commit 0727e0e8d5
7 changed files with 127 additions and 145 deletions
+12
View File
@@ -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();