/** * find_path (change: add-landmark-pathfinding). * * Goal-conditioned navigation: "get from A to B". Endpoints may be exact/fuzzy * names OR selectors (`landmark:`, `role:entrypoint|hub|sink`, `file:`), * so an agent can route by KIND of endpoint without naming both ends. Returns the * single CHEAPEST call path (by call-distance, or fewest hops if disabled) plus a * bounded set of alternates and a stated reason -- never a raw multi-path dump. * * Extends, not replaces, trace_execution_path: reuses its name-matching and the * weighted traversal (weightedBfs) from add-call-distance-scoping. */ import type { SerializedCallGraph, FunctionNode } from '../../analyzer/call-graph.js'; export declare const MAX_ALTERNATES = 3; export type EndpointKind = 'name' | 'landmark' | 'role:entrypoint' | 'role:hub' | 'role:sink' | 'file' | 'error'; export interface ResolvedEndpoint { kind: EndpointKind; nodes: FunctionNode[]; } /** * Resolve an endpoint spec to concrete functions. Each `role` resolves through an * EXISTING classifier with no new threshold; `sink` is parameter-free (a called * leaf: zero outgoing internal call edges AND fan-in >= 1). */ export declare function resolveEndpoint(spec: string, cg: SerializedCallGraph, forward: Map>): ResolvedEndpoint; export interface PathResult { found: boolean; /** Cheapest path, when found. */ best?: { ids: string[]; hops: number; distance: number; }; /** Up to MAX_ALTERNATES next-best paths (to other resolved to-seeds). */ alternates: Array<{ ids: string[]; hops: number; distance: number; }>; /** How many nodes the search reached (for the no-path answer). */ reached: number; } /** * Cheapest forward call path from any `from` seed to the nearest `to` seed. Uses * call-distance weights by default; unit (hop) costs when `useCallDistance` is * false. Returns the cheapest path plus up to MAX_ALTERNATES paths to other * reachable to-seeds. */ export declare function findCheapestPath(cg: SerializedCallGraph, fromSeeds: string[], toSeeds: string[], opts?: { useCallDistance?: boolean; maxDistance?: number; forward?: Map>; }): PathResult; export declare function handleFindPath(directory: string, from: string, to: string, opts?: { useCallDistance?: boolean; directResolvedOnly?: boolean; }): Promise; //# sourceMappingURL=pathfind.d.ts.map