Files
writing-agent/tests/orchestrator.test.ts
2026-07-10 08:31:27 +08:00

27 lines
938 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { describe, expect, it } from "vitest";
import { createMockMainAgentResponse, MockLlmProvider } from "../src/llm/client.js";
import { parseMainAgentDecision } from "../src/main-agent/main-agent.js";
describe("main agent", () => {
it("parses valid JSON decision", () => {
const raw = createMockMainAgentResponse({
action: "run_worker",
workerId: "outline-worker",
requiresApproval: true,
});
const decision = parseMainAgentDecision(raw);
expect(decision.action).toBe("run_worker");
expect(decision.workerId).toBe("outline-worker");
expect(decision.statePatchAllowed).toBe(false);
});
});
// 带 skill 的完整闭环见 tests/phase-skill.test.tsPhaseRuntime
// RuntimeOrchestrator 接 skill 层留待 Phase A1
describe("runtime orchestrator", () => {
it("placeholder until orchestrator uses PhaseRuntime + skill", () => {
expect(MockLlmProvider).toBeDefined();
});
});