import type { TreeSitterParser } from "./parser"; import { SymbolResolver } from "./symbol-resolver"; /** * Override the logger for GraphBuilder. * Also updates the parser module logger so both use the same output. */ export declare function setGraphBuilderLogger(logger: (...args: unknown[]) => void): void; import type { CallGraph } from "./types"; /** * Builds a call graph from source files using tree-sitter. */ export declare class GraphBuilder { private parser; private extractor; private resolver; private graph; constructor(parser: TreeSitterParser); /** * Build the graph from a list of files. * Clears any existing graph first to prevent duplicate nodes. */ build(files: Array<{ path: string; content: string; }>): CallGraph; /** * Add a single file to the graph incrementally. * Only processes imports/call-sites for the new file. */ addFile(filePath: string, content: string): void; /** * Get the current graph. */ getGraph(): CallGraph; /** * Get the resolver for external use. */ getResolver(): SymbolResolver; private indexFile; private resolveAllImports; private processFileImports; private createImportEdges; private findMatchingExport; private linkCallSites; private processFileCallSites; private processCallSite; private findCallerNode; private symbolContainsCallSite; private calculateRiskScores; private calculatePageRank; /** * Calculate maximum transitive depth using iterative stack (not recursive) * to avoid stack overflow on deep graphs and O(n²) memory from Set copying. */ private calculateMaxDepth; private createNodeId; } //# sourceMappingURL=graph-builder.d.ts.map