/** * Atlas staleness detection (ADR-11). * * The committed atlas pins git state at extraction time via the * `extracted_at_sha` field. A team member running against yesterday's * atlas can't tell whether they're seeing current history. `--check` * reads the atlas, compares its recorded SHA against the current git * HEAD, and returns one of four states. * * Extracted to its own module so it's testable without spawning the * MCP binary end-to-end and so it can compose into other tooling * (pre-commit hooks, CI scripts) in the future. */ export type StalenessStatus = /** Atlas SHA matches current HEAD — atlas is current. Exit 0. */ "current" /** Atlas was recorded at a different SHA than HEAD — atlas is stale. Exit 1. */ | "stale" /** * Atlas has no `extracted_at_sha` (pre-1.1) OR the repo is not a git * tree. Can't compute staleness; callers typically treat as warning. * Exit 2. */ | "unknown"; export interface StalenessReport { status: StalenessStatus; atlasSha: string | null; currentSha: string | null; message: string; } export interface CheckStalenessOptions { atlasPath: string; repoRoot: string; /** Test seam — lets tests inject a fake git binary path. */ gitBinary?: string; } /** * Read the committed atlas at `atlasPath`, compare its * `extracted_at_sha` against current HEAD in `repoRoot`, and return * a structured report. Never throws — missing atlas / missing git / * malformed JSON all fold into the "unknown" bucket with an * explanatory message. */ export declare function checkStaleness(options: CheckStalenessOptions): StalenessReport; /** Map staleness status → POSIX exit code. Contract: see ADR-11. */ export declare function exitCodeFor(status: StalenessStatus): number; //# sourceMappingURL=staleness.d.ts.map