/**
 * DAG path-finding algorithms: BFS, bidirectional BFS, Dijkstra,
 * A*, and bidirectional A*.
 *
 * All algorithms operate on the commit DAG via an injected index
 * reader that provides O(1) parent/child lookups.
 *
 * @module domain/services/dag/DagPathFinding
 */
import type LoggerPort from '../../../ports/LoggerPort.ts';
import type { DagIndexReader } from './DagTraversal.ts';
type PathResult = {
    found: true;
    path: string[];
    length: number;
} | {
    found: false;
    path: string[];
    length: -1;
};
type WeightedResult = {
    path: string[];
    totalCost: number;
};
type AStarResult = {
    path: string[];
    totalCost: number;
    nodesExplored: number;
};
type WeightProvider = (from: string, to: string) => number | Promise<number>;
type HeuristicProvider = (sha: string, target: string) => number;
export default class DagPathFinding {
    private readonly _index;
    private readonly _log;
    constructor(deps: {
        indexReader: DagIndexReader;
        logger?: LoggerPort;
    });
    findPath(opts: {
        from: string;
        to: string;
        maxNodes?: number | undefined;
        maxDepth?: number | undefined;
        signal?: AbortSignal | undefined;
    }): Promise<PathResult>;
    shortestPath(opts: {
        from: string;
        to: string;
        maxDepth?: number;
        signal?: AbortSignal;
    }): Promise<PathResult>;
    weightedShortestPath(opts: {
        from: string;
        to: string;
        weightProvider?: WeightProvider;
        direction?: string;
        signal?: AbortSignal;
    }): Promise<WeightedResult>;
    aStarSearch(opts: {
        from: string;
        to: string;
        weightProvider?: WeightProvider;
        heuristicProvider?: HeuristicProvider;
        direction?: string;
        signal?: AbortSignal;
    }): Promise<AStarResult>;
    bidirectionalAStar(opts: {
        from: string;
        to: string;
        weightProvider?: WeightProvider;
        forwardHeuristic?: HeuristicProvider;
        backwardHeuristic?: HeuristicProvider;
        signal?: AbortSignal;
    }): Promise<AStarResult>;
    private _initSearchState;
    private _expandSide;
}
export type { PathResult, WeightedResult, AStarResult, WeightProvider, HeuristicProvider };
