import type { CapabilityBaselineRow } from '../capability-baseline/types.js'; import type { GuardContract, GuardContext, GuardRunResult } from './types.js'; /** * Resolve the contract's declared baseline row out of the frozen baseline and * assert the declared invariant is verbatim text in that row. * * Before this, the check was `if (!source.baselineRow || !source.invariant)`, * i.e. it only asserted the two fields were truthy. Nothing ever read the * baseline, so a contract could name a journey / invariant that does not exist * in the frozen file and still run to a green result. */ export declare function assertBaselineRef(contract: GuardContract, projectRoot: string): CapabilityBaselineRow; export declare function runGuard(contract: GuardContract, ctx: GuardContext): Promise; /** * Run every contract and aggregate. A contract that throws (bad baseline * reference, unreadable source file, a probe that blows up) is recorded as a * `fail` result rather than aborting the whole run — the gate has to be able * to say "this journey is broken", not just crash. */ export declare function runAllGuards(contracts: ReadonlyArray, ctx: GuardContext): Promise<{ readonly pass: number; readonly fail: number; readonly skipped: number; readonly total: number; readonly results: ReadonlyArray; }>; /** * Exit-code contract for a guard summary. `skipped` must not be * indistinguishable from `pass`: a run that quietly skipped work is a * different outcome from a run that verified work, so it gets its own code. */ export declare function exitCodeForGuardSummary(summary: { readonly fail: number; readonly skipped: number; }): 0 | 1 | 2;