import type { ExtractionEdge, ExtractionNode } from '../../contracts/types.js'; export interface CreateNodeOptions { endLine?: number; snippet?: string; } /** * Build deterministic, collision-free stems for a complete extraction corpus. * SPI projection reuses this in hybrid mode so a JS/TS file and a legacy-only * file with the same basename cannot overwrite one another after merging. */ export declare function createFileStemMap(filePaths: Iterable): Map; export declare function withExtractionFileStemContext(filePaths: Iterable, callback: () => T): T; /** * Reuse a precomputed corpus-wide stem map across separate extraction passes. * Hybrid generation needs this because SPI code, legacy-only code, and * non-code files are extracted independently but share one final graph. */ export declare function withExtractionFileStemMapContext(fileStemByAbsolutePath: ReadonlyMap, callback: () => T): T; export declare function fileStemForPath(filePath: string): string; export declare function fileNodeIdForPath(filePath: string): string; export declare function _makeId(...parts: string[]): string; export declare function toLocation(line: number, endLine?: number): string; export declare function normalizeLabel(label: string): string; export declare function stripHashComment(line: string): string; export declare function createNode(id: string, label: string, sourceFile: string, line: number, fileType?: ExtractionNode['file_type'], options?: CreateNodeOptions): ExtractionNode; export declare function createFileNode(filePath: string, fileType: ExtractionNode['file_type']): ExtractionNode; export declare function createEdge(source: string, target: string, relation: string, sourceFile: string, line: number, confidence?: ExtractionEdge['confidence'], weight?: number): ExtractionEdge; export declare function indentationLevel(line: string): number; export declare function addNode(nodes: ExtractionNode[], seenIds: Set, node: ExtractionNode): void; export declare function addEdge(edges: ExtractionEdge[], edge: ExtractionEdge): void; export declare function addUniqueEdge(edges: ExtractionEdge[], seen: Set, edge: ExtractionEdge): void;