/** * DepGraph — the workspace import graph, built from the TypeScript AST. * * Extracted from `mcp/tools.ts` so more than one tool can use it: `depgraph` reports it to * the model, and `affected_tests` walks its reverse edges to decide which tests a change * can possibly break. Zero LLM calls — this is parsing, not inference. * * Building the graph parses every source file in the repo, which is far too expensive to * redo on every call. `buildDepGraphMap` therefore memoizes on a stat-only fingerprint: * cheap to compute, and it changes the moment any source file is written. */ export interface DepGraphNode { rel: string; abs: string; imports: string[]; importedBy: string[]; externalImports: string[]; exports: string[]; } export type DepGraphMap = Map; export declare function buildDepGraphMap(workspaceRoot: string): DepGraphMap; export declare function bfsDepGraph(map: DepGraphMap, startRel: string, direction: "forward" | "backward", maxDepth: number): Map; /** Test seam — the cache is process-global and would otherwise leak between test cases. */ export declare function resetDepGraphCache(): void; //# sourceMappingURL=DepGraph.d.ts.map