import type { ArtifactBundle } from "../io/artifacts.js"; /** * The staleness pass's result: the stale set, carrying the DEFERRED set beside * it (INV-SSP-DEFERRED-SET-REPORTED). * * `deferred` names every present downstream whose staleness this call declined * to decide because the edge from a stale-and-pending upstream is * slice-projected — the compare only becomes meaningful once that upstream has * actually re-derived and restamped its metadata (see the transitive-closure * comment below). A deferral is NOT "not stale": it is "not decided yet", and a * caller that treats a single result as the full truth while `deferred` is * non-empty is under-reporting. Reporting it is what makes that visible instead * of silent — the consolidated staleness record NAMES the deferred artifacts. * * It is a `Set` SUBCLASS on purpose: every consumer that only wants the * stale set (`deriveAuditState`, the drain boundary) keeps its `Set` * type and behaviour unchanged, so the deferred channel can never be dropped by * a caller "forgetting" a second return value. */ export declare class StaleArtifactSet extends Set { /** Downstreams held behind a slice projection this call — always disjoint from the stale set. */ readonly deferred: ReadonlySet; constructor(stale?: Iterable, deferred?: Iterable); } /** Options controlling the staleness pass's observability side effect. */ export interface StalenessOptions { /** * When `true` (the default), a non-empty stale set is reported to stderr as a * single `{ kind: "staleness", … }` JSONL record. `advanceAudit`'s internal * drain loop passes `false` for every intermediate re-derivation so a whole * regen cascade resolved in one host round-trip emits ONE consolidated record * (via `emitStalenessRecord`) at the boundary, not one per drained step. */ emit?: boolean; } /** * Scope the dedupe to ONE `advanceAudit` call: the boundary resets before each * call so a later call legitimately re-reporting the same stale set still * emits, while the intra-call repeats (the observed 28×/~15× spam) collapse. */ export declare function resetStalenessDedup(): void; export declare function emitStalenessRecord(stale: Set, reason?: string): void; /** * True exactly when `computeStaleArtifacts` would take the metadata-schema * migration degrade path (an old-shape manifest that must not be trusted to * skip work). The boundary emit in `advanceAudit` uses this to tag the * consolidated record with the migration `reason`, matching the inline record. */ export declare function isMetadataMigrationStaleness(bundle: ArtifactBundle): boolean; export declare function computeStaleArtifacts(bundle: ArtifactBundle, options?: StalenessOptions): StaleArtifactSet; //# sourceMappingURL=staleness.d.ts.map