import type { GraphEdge, GraphNode, SymbolLang } from './schema.js'; /** * Derive a monorepo package name from an absolute file path. * Handles both `packages//...` and `apps//...` layouts. * * This is the fallback only. The authoritative grouping is computed at index * time from each ecosystem's own manifests and stored on `files.package` — * see {@link createPackageLabeller}. A path-shape guess is all that is left * for a repo with no manifest at all. */ export declare function derivePackage(filePath: string): string | undefined; /** * Build the `file → package` lookup the graph readers group by. * * `stored` comes from `files.package`, which the indexer filled from `go.mod`, * `Cargo.toml`, `package.json`, `pom.xml` and friends. Files missing a stored * label (indexed by an older run, or outside any manifest) fall back to the * path-shape heuristic and finally to `(root)`. */ export declare function createPackageLabeller(stored: ReadonlyMap): (file: string) => string; export declare function buildPackageGraphNodes(fileCounts: Array<{ file: string; n: number; }>, files: Array<{ file: string; }>, packageOf: (file: string) => string): { pkgNodes: Map; fileToPkg: Map; }; export type WriterFileGraphSymbolRow = { file: string; id: number; name: string; kind: string; lang: string; line: number; }; export declare function buildFileGraphNodeState(pkgSyms: WriterFileGraphSymbolRow[], localFiles: Set, packageOf: (file: string) => string): { fileNodes: Map; symToFile: Map; fileStats: Map; ensureFileNode: (file: string) => void; }; export type WriterSymbolGraphRow = { id: number; name: string; kind: string; lang: string; file: string; line: number; signature: string; scope: string; }; export declare function buildSymbolGraphNodes(symById: Map, relatedIds: Set, localFiles: ReadonlySet | string, packageOf: (file: string) => string): GraphNode[]; export type WeightedEdgeAccumulator = { weight: number; types: Map; }; export declare function addWeightedEdge(edgeMap: Map, source: string | number, target: string | number, callType: string, weight: number): void; export declare function materializeWeightedEdges(edgeMap: Map, idPrefix: 'pkg' | 'file' | 'sym'): GraphEdge[]; //# sourceMappingURL=writer-graph-helpers.d.ts.map