import type { PipelineProgress } from '../types.js'; import { type BuildLockHolder } from './build-lock.js'; import type { PipelineOptions } from './types.js'; export interface BuildOptions extends Partial { onProgress?: (p: PipelineProgress) => void; force?: boolean; /** When true, skip the full rebuild if the index is already fresh (matches HEAD). Default false. */ incremental?: boolean; /** * Where to write GRAPH_REPORT.md; a relative path resolves against the repo. * Defaults to $MONOGRAPH_REPORT_PATH, else `.monomind/GRAPH_REPORT.md` (#414 — * pass `'GRAPH_REPORT.md'` for the pre-#414 repo-root location). */ reportPath?: string; } /** * What a build call actually did. A resolved promise alone does not mean the * graph changed: a build that found the lock held or the index fresh returns * without writing, and callers that report outcomes (the watcher) need to tell * those apart (#338). */ export type BuildResult = { status: 'built'; nodes: { before: number; after: number; }; edges: { before: number; after: number; }; } | { status: 'skipped'; reason: 'locked' | 'fresh'; message: string; /** Who holds the build lock, when a build was skipped for it (#340). */ holder?: BuildLockHolder; }; export declare function buildAsync(repoPath: string, options?: BuildOptions): Promise; /** * Re-index after files changed on disk. * * This runs the FULL pipeline, with extraction-cache reuse so unchanged files * are not re-parsed. The previous partial implementation deleted the changed * files' edges, re-parsed only those files, and stopped — it never reran * relationship resolution (imports, cross-file calls, scope/bridge resolution) * or the derived analyses (communities, processes, god-nodes). A one-line edit * therefore dropped every CALLS/IMPORTS/REFERENCES edge incident to that file * and left derived analysis stale. The watcher's deferred full rebuild repaired * that eventually; direct callers silently kept the incomplete graph. * * A genuine incremental path is still worth having, but it has to track the * changed files' dependents, recompute their relationships, and invalidate the * affected derived analyses. Until such an implementation exists and is proven * equivalent to a clean build, correctness wins over speed. */ export declare function buildIncrementalAsync(repoPath: string, changedAbsPaths: string[], options?: BuildOptions): Promise; //# sourceMappingURL=orchestrator.d.ts.map