import { AgencyConfig } from "../config/config.js"; import type { DependencyFingerprint } from "./depFingerprint.js"; /** The compile pipeline, relative to dist/lib. The build manifest's * compiler stamp covers the modules it imports. */ export declare const COMPILE_PIPELINE_ENTRY = "compiler/buildSession.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. The fingerprint is supplied by the * session (it owns dependency discovery — closure walk for user * modules, dependencyFingerprint for stdlib-resident ones); the tracker * owns hashing and storage. */ record(absModule: string, absOutput: string, fp: Pick): 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;