Budget Governor
Path:
_archive/loom-stale-pre-sprint-snapshot/src/execution/budget-governor.tsRelative: loom-stale-pre-sprint-snapshot/src/execution/budget-governor.tsSubproject: _archiveCategory: archivedLines: 57Bytes: 1,685Imports: 2Exports: 2
Content Preview
- import type { StageBudget } from "../types/contracts";
- import type { Clock } from "./ports";
- /**
- * H3.6 — Budget governor (P6).
- * Hard caps from the envelope: tokens, tool calls, wallclock. Breach is a
- * graceful suspension decision point, never a mid-action kill — the harness
- * checks BETWEEN actions and writes a state summary before exiting.
- */
- export type BudgetStatus =
- | { breached: false }
- | { breached: true; which: "tokens" | "calls" | "wallclock"; detail: string };
- export clas