/**
 * Graph Traversal Engine
 *
 * N-hop graph traversal, path finding, and centrality scoring.
 * Operates on the same SQLite database as GraphMemoryEngine.
 *
 * Phase: 8D (Graph Knowledge Engine)
 * Constraint: < 500 LOC — core CRUD is in graph-memory.ts
 */
import type Database from 'better-sqlite3';
import type { Entity, Relation } from './graph-memory.js';
export interface TraversalResult {
    entities: Entity[];
    relations: Relation[];
    paths: string[][];
    depth: number;
}
export interface CentralityScore {
    entityId: string;
    entityName: string;
    score: number;
    inDegree: number;
    outDegree: number;
}
export interface SubgraphResult {
    entities: Entity[];
    relations: Relation[];
    stats: {
        nodeCount: number;
        edgeCount: number;
        density: number;
    };
}
export declare class GraphTraversalEngine {
    private db;
    constructor(db: Database.Database);
    /**
     * Traverse N hops from a starting entity.
     * Returns all reachable entities, relations, and discovered paths.
     */
    traverse(startEntityId: string, maxDepth?: number): TraversalResult;
    /**
     * Find shortest path between two entities using BFS.
     * Returns null if no path exists within maxDepth hops.
     */
    shortestPath(fromId: string, toId: string, maxDepth?: number): string[] | null;
    /**
     * Compute degree centrality for all entities.
     * Returns entities sorted by centrality score (most connected first).
     */
    computeCentrality(limit?: number): CentralityScore[];
    /**
     * Extract a subgraph around a set of entity IDs (union of their neighborhoods).
     */
    extractSubgraph(entityIds: string[], depth?: number): SubgraphResult;
    /**
     * Query the graph starting from entity name (fuzzy match).
     * Convenience wrapper that resolves name → ID → traverse.
     */
    queryByName(name: string, depth?: number): TraversalResult;
    /** Format traversal result for MCP response */
    static format(result: TraversalResult): string;
    private rowToEntity;
    private rowToRelation;
}
