/** * Wave-4 incremental algorithm helpers. * * Self-contained: the closure-expansion fixpoint, occurrence merging, * and edge stitching for the incremental rebuild path. All functions * here are called by `catalog-builder.ts`; nothing else in the * orchestrator subtree depends on them. */ import type { GraphLanguageAdapter, DiscoverOutput, ParsedProject, WalkOutput } from '../../lang-adapter/types.js'; import type { Catalog, CallEdge, FunctionOccurrence } from '../../types.js'; export interface ClosureInput { readonly adapter: GraphLanguageAdapter; readonly discovery: DiscoverOutput; readonly cachedCatalog: Catalog; readonly parsedProject: ParsedProject; readonly changedFilesAbs: readonly string[]; } export interface ClosureOutput { readonly walked: WalkOutput; readonly closureRel: ReadonlySet; } /** * Expand the re-walk closure to a fixpoint. Starts with the directly * changed files; on each iteration walks the closure, finds hashes * that vanished, scans cached edges for any that still point at * vanished hashes, and adds those callers to the closure. Stops when * no new dependents are discovered. * */ export declare function expandClosureToFixpoint(input: ClosureInput): Promise; /** * Merge occurrences: for files in `closureRel`, take the freshly- * walked entries; for everything else, take the cached entries. * Re-keys by simpleName so the catalog shape matches the full-rebuild * output. */ export declare function mergeOccurrences(cachedCatalog: Catalog, walkedFunctions: Record, closureRel: ReadonlySet): Record; /** * Stitch resolved edges into closure files; restore cached edges for * unchanged files. The merged catalog already has cached occurrences * for unchanged files; we just preserve their `calls` array. */ export declare function mergeResolvedAndCachedEdges(merged: Catalog, cached: Catalog, edgesByOwner: ReadonlyMap, closureRel: ReadonlySet): Record; //# sourceMappingURL=incremental-merge.d.ts.map