/** * Canonical occurrence-resolved call graph (one resolveCallee pass). * * Consumed by SCC features and public audit call views. Not exported from * `@opensip-cli/graph/read` — graph-internal only. */ import type { CallEdge, FunctionOccurrence, Indexes } from '../types.js'; /** One resolved occurrence→occurrence edge fact (polymorphic targets stay distinct). */ export interface ResolvedOccurrenceEdge { readonly fromOccId: string; readonly toOccId: string; readonly owner: FunctionOccurrence; readonly target: FunctionOccurrence; readonly callSite: { readonly line: number; readonly column: number; }; readonly resolution: CallEdge['resolution']; readonly confidence: CallEdge['confidence']; readonly crossShard: boolean; readonly sourceEdge: CallEdge; } /** Unresolved call-site fact (never invented as an edge). */ export interface UnresolvedOccurrenceCall { readonly ownerOccId: string; readonly owner: FunctionOccurrence; readonly callSite: { readonly line: number; readonly column: number; }; readonly resolution: CallEdge['resolution']; readonly confidence: CallEdge['confidence']; readonly targetHashes: readonly string[]; } export interface OccurrenceCallGraph { /** Every occurrence id. */ readonly nodes: readonly string[]; readonly byOccId: ReadonlyMap; /** Canonical resolved edge stream (may include multi-edges for polymorphic targets). */ readonly edges: readonly ResolvedOccurrenceEdge[]; /** Deduped forward adjacency for reachability. */ readonly forward: ReadonlyMap; /** Reverse adjacency derived from the same edge stream. */ readonly reverse: ReadonlyMap; readonly unresolved: readonly UnresolvedOccurrenceCall[]; /** Persisted call rows omitted because their runtime shape was invalid. */ readonly malformedCalls: number; } /** One immutable occurrence graph per generation index object. */ export declare function occurrenceCallGraphFor(indexes: Indexes): OccurrenceCallGraph; /** * Build the occurrence-level call graph with one resolveCallee pass. * Polymorphic targets remain distinct edge facts; adjacency neighbors are deduped. */ export declare function buildOccurrenceCallGraph(indexes: Indexes): OccurrenceCallGraph; //# sourceMappingURL=occurrence-call-graph.d.ts.map