import type { Database } from "./database.js"; export interface SymbolRef { id: number; source_chunk_id: number; target_name: string; line: number | null; } export interface ImpactResult { chunk_id: number; chunk_name: string | null; chunk_type: string; file_path: string; start_line: number; end_line: number; ref_line: number | null; } export declare class SymbolRefStore { private db; private insertStmt; private deleteByChunkStmt; private getImpactStmt; private getCallersStmt; private getAllStmt; private countStmt; constructor(db: Database); insert(sourceChunkId: number, targetName: string, line?: number | null): void; deleteByChunk(chunkId: number): void; getImpact(targetName: string, limit?: number): ImpactResult[]; getCallerCount(targetName: string): number; /** * Aggregated god-node stats: per target_name, total refs and the * number of DISTINCT source files that contain those refs. Used by * sverklo_audit to rank "god nodes" — a name referenced 200 times * from one file is less interesting structurally than one referenced * 30 times across 30 different files. Dogfood T2 from the 2026-05-13 * architectural review. * * `excludeFileIds` optionally excludes refs whose SOURCE file is in * the provided set — used by sverklo_audit to drop test-file and * vendored-cache refs from the count so identifier collisions like * `parse` (mostly JSON.parse + test helpers) don't dominate the * ranking. Dogfood review 2026-05-14 (Issue E). */ getGodNodeStats(excludeFileIds?: Set): { target_name: string; ref_count: number; distinct_source_files: number; }[]; getAll(): SymbolRef[]; count(): number; }