feat: add core contracts

This commit is contained in:
chungyeong
2026-05-09 22:45:44 +09:00
parent 42f0fb193d
commit 44103839af
11 changed files with 377 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import { describe, expect, it } from "vitest";
import {
ApprovalDecisionActionValues,
BackendValues,
CapabilityValues,
RiskLevelValues,
} from "./enums.js";
describe("core enums", () => {
it("keeps approval decisions separate from run pause controls", () => {
expect(ApprovalDecisionActionValues).toEqual(["approve", "reject", "request_changes", "abort"]);
expect(ApprovalDecisionActionValues).not.toContain("pause");
});
it("exports the locked backend, risk, and capability sets", () => {
expect(BackendValues).toEqual(["codex", "claude", "fake"]);
expect(RiskLevelValues).toEqual(["low", "medium", "high"]);
expect(CapabilityValues).toContain("test_first_development");
expect(CapabilityValues).toContain("backtest_run");
});
});