import { AgencyConfig } from "../config.js"; /** "incremental" consults and records the manifest; "force" recompiles * everything but rewrites it (--force); "always" is internal * (allowTestImports / --ts / caller-supplied importStrategy) and touches * nothing. */ export type Freshness = "incremental" | "always" | "force"; export type ManifestTracker = { /** False unless policy allows reads AND the entry passes isEntryFresh. */ isFresh(absModule: string): boolean; allFresh(absModules: string[]): boolean; /** The recorded output path for a module (fast-path return value). */ outputFor(absModule: string): string | null; /** No-op unless policy allows writes. deps/hasPkgImports supplied by the * session (it owns the closure); the tracker owns hashing and storage. */ record(absModule: string, absOutput: string, deps: string[], hasPkgImports: boolean): void; /** Persist (atomic). No-op unless something was recorded. */ flush(): void; }; export declare const NOOP_TRACKER: ManifestTracker; /** Policy is resolved HERE, once: * "always" → the shared NOOP tracker (no state, no IO, isFresh always false) * "force" → real tracker with reads disabled, writes on * "incremental" → real tracker, reads + writes on. * The tracker derives the config key itself — it owns every other piece * of freshness identity, and a caller-supplied key could mismatch the * config. * * Perf note: each real tracker recomputes computeStdlibHash + the * compiler stamp + loadManifest; the warm-make path constructs one per * CLI input (~6). Fine today (warm make 2.5s) — if this ever regresses, * memoize PER SESSION, not module-level (watch mode can outlive a stdlib * edit). */ export declare function createManifestTracker(config: AgencyConfig, entryFile: string, freshness: Freshness): ManifestTracker;