// All harness interfaces, states, events, limits, and task types. No runtime code
// other than the frozen constant tables (DEFAULT_LIMITS, HARNESS_CODES, TERMINAL_STATES)
// that the type layer needs to expose as values. Mirrors the ADR-0003 types.ts precedent.
export const TERMINAL_STATES = new Set([
    "completed",
    "cancelled",
    "failed",
    "limit-exceeded",
]);
export const DEFAULT_LIMITS = {
    maxIterations: 10,
    maxModelCalls: 20,
    maxToolCalls: 30,
    maxCommandExecutions: 10,
    maxContextBytes: 512_000,
    maxPatchBytes: 65_536,
    maxWallTimeMs: 300_000,
    maxFailureAttempts: 3,
};
// Version manifest stamped onto every RunManifest and side-file fingerprint header. Bump on a
// breaking-shape change to the harness event union or RunManifest schema; consumers compare the
// literal at parse time. Lives in contracts (not src/harness/session.ts) because tools' browser
// side-file emission needs the same constant without importing the harness layer.
export const HARNESS_VERSION = "0.1.7";
// ─── Failure taxonomy ─────────────────────────────────────────────────────────
export const HARNESS_CODES = {
    LIMIT_ITERATIONS: "HARNESS_LIMIT_ITERATIONS",
    LIMIT_MODEL_CALLS: "HARNESS_LIMIT_MODEL_CALLS",
    LIMIT_TOOL_CALLS: "HARNESS_LIMIT_TOOL_CALLS",
    LIMIT_COMMAND_EXEC: "HARNESS_LIMIT_COMMAND_EXECUTIONS",
    LIMIT_CONTEXT_SIZE: "HARNESS_LIMIT_CONTEXT_SIZE",
    LIMIT_PATCH_SIZE: "HARNESS_LIMIT_PATCH_SIZE",
    LIMIT_WALL_TIME: "HARNESS_LIMIT_WALL_TIME",
    LIMIT_FAILURE_ATTEMPTS: "HARNESS_LIMIT_FAILURE_ATTEMPTS",
    MODEL_ERROR: "HARNESS_MODEL_ERROR",
    TOOL_ERROR: "HARNESS_TOOL_ERROR",
    INTERNAL: "HARNESS_INTERNAL",
};
