import { Graph } from "graphlib"; import type { DependencyGraphSnapshot, DependencyNode } from "../models.js"; export interface GraphIndexes { forward: Graph; reverse: Graph; nodeById: Map; } export declare function buildIndexes(snapshot: DependencyGraphSnapshot): GraphIndexes; /** Shortest path (fewest edges) from any root to target using BFS on reverse graph from target... actually we need path from root to vulnerable: BFS forward from roots */ export declare function shortestPathFromRoots(snapshot: DependencyGraphSnapshot, indexes: GraphIndexes, targetId: string, customRootIds?: string[]): string[] | null; export declare function dfsAllPathsWithLimit(indexes: GraphIndexes, fromId: string, toId: string, maxPaths: number, maxDepth: number): string[][]; export declare function reverseLookupConsumers(indexes: GraphIndexes, packageNodeId: string): string[]; /** All transitive predecessors (who depends on this) */ export declare function impactSet(indexes: GraphIndexes, packageNodeId: string): Set; export declare function duplicateVersions(snapshot: DependencyGraphSnapshot): Map>; export declare function formatPathNames(pathIds: string[], nodes: Map): string; //# sourceMappingURL=traverse.d.ts.map