/**
 * Dependency Graph
 *
 * Core data structure for managing plugin dependency relationships.
 */
import type { ScannedPlugin } from '../types/plugin.js';
import type { CycleInfo, DependencyType, GraphBuildOptions, GraphEdge, GraphNode, GraphStats, TraversalResult } from './graph-types.js';
/**
 * DependencyGraph manages plugin relationships and provides
 * traversal and analysis methods.
 *
 * @since v1.48.0
 */
export declare class DependencyGraph {
    private nodes;
    private edges;
    private outgoingEdges;
    private incomingEdges;
    /**
     * Add a node to the graph
     */
    addNode(node: GraphNode): void;
    /**
     * Get a node by ID
     */
    getNode(id: string): GraphNode | undefined;
    /**
     * Get all nodes
     */
    getNodes(): GraphNode[];
    /**
     * Check if a node exists
     */
    hasNode(id: string): boolean;
    /**
     * Add an edge (dependency) to the graph
     */
    addEdge(from: string, to: string, type: DependencyType): void;
    /**
     * Get all edges
     */
    getEdges(): GraphEdge[];
    /**
     * Get outgoing edges for a node (O(1) lookup)
     */
    getOutgoingEdges(nodeId: string): GraphEdge[];
    /**
     * Get incoming edges for a node (O(1) lookup)
     */
    getIncomingEdges(nodeId: string): GraphEdge[];
    /**
     * Get upstream dependencies (what this plugin depends on)
     */
    getUpstream(pluginId: string, maxDepth?: number): TraversalResult;
    /**
     * Get downstream dependents (what depends on this plugin)
     */
    getDownstream(pluginId: string, maxDepth?: number): TraversalResult;
    /**
     * Traverse the graph in a direction
     */
    private traverse;
    /**
     * Find circular dependencies using Tarjan's algorithm
     */
    findCycles(): CycleInfo;
    /**
     * Get root nodes (nodes with no incoming edges / nothing depends on them)
     */
    getRootNodes(): GraphNode[];
    /**
     * Get leaf nodes (nodes with no outgoing edges / depend on nothing)
     */
    getLeafNodes(): GraphNode[];
    /**
     * Get graph statistics
     */
    getStats(): GraphStats;
    /**
     * Build a dependency graph from scanned plugins
     */
    static buildFromPlugins(plugins: ScannedPlugin[], options?: GraphBuildOptions): DependencyGraph;
    /**
     * Clear the graph
     */
    clear(): void;
}
//# sourceMappingURL=dependency-graph.d.ts.map