Initial commit

This commit is contained in:
2026-07-10 08:31:27 +08:00
commit 2b74c30d36
134 changed files with 21801 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
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();
});
});