fa9163e462
BREAKING: Major architecture change. - RoleDefinition = pure data (systemPrompt + schema + dryRunMeta) - AgentFn = (ctx: ThreadContext) => Promise<string>, reads ctx.currentRole - WorkflowDefinition decoupled from agents, bound via AgentBinding at runtime - createWorkflow(def, binding, extract) replaces createRoleModerator - Meta extraction moved into engine loop - Delete workflow-util-role package (createRole, decorators, extract all gone) - Role packages become pure data exports - Agent packages updated to single-arg AgentFn 小橘 <xiaoju@shazhou.work>
16 lines
543 B
TypeScript
16 lines
543 B
TypeScript
import { describe, expect, test } from "bun:test";
|
|
|
|
import { committerMetaSchema, committerRole } from "../src/committer.js";
|
|
|
|
describe("committerRole", () => {
|
|
test("dryRunMeta validates against schema", () => {
|
|
const parsed = committerMetaSchema.safeParse(committerRole.dryRunMeta);
|
|
expect(parsed.success).toBe(true);
|
|
});
|
|
|
|
test("exposes generic committer system prompt", () => {
|
|
expect(committerRole.systemPrompt).toContain("git committer");
|
|
expect(committerRole.systemPrompt).not.toContain("project is at");
|
|
});
|
|
});
|