import type { Communities } from '../pipeline/cluster.js'; import { KnowledgeGraph } from '../contracts/graph.js'; export type QueryRankBy = 'relevance' | 'degree'; export type QueryTraversalDirection = 'outgoing' | 'incident'; export interface QueryFilters { community?: number; fileType?: string; } export interface QueryGraphOptions { mode?: 'bfs' | 'dfs'; depth?: number; tokenBudget?: number; rankBy?: QueryRankBy; direction?: QueryTraversalDirection; filters?: QueryFilters; } export declare const QUERY_CHARS_PER_TOKEN = 3; export declare const QUERY_TOKEN_ESTIMATOR: { readonly source: "local_tokenizer"; readonly model: "cl100k_base"; readonly exact: false; }; export declare function estimateQueryTokens(text: string): number; export declare function communityLabelsFromGraph(graph: KnowledgeGraph, communities: Communities): Record; export declare function loadGraph(graphPath: string): KnowledgeGraph; export declare function communitiesFromGraph(graph: KnowledgeGraph): Communities; export declare function scoreNodes(graph: KnowledgeGraph, terms: string[], options?: Pick): Array<[number, string]>; export declare function bfs(graph: KnowledgeGraph, startNodes: string[], depth: number, allowedNodes?: ReadonlySet, direction?: QueryTraversalDirection): { visited: Set; edges: Array<[string, string]>; }; export declare function dfs(graph: KnowledgeGraph, startNodes: string[], depth: number, allowedNodes?: ReadonlySet, direction?: QueryTraversalDirection): { visited: Set; edges: Array<[string, string]>; }; export declare function subgraphToText(graph: KnowledgeGraph, nodes: Set, edges: Array<[string, string]>, tokenBudget?: number): string; export declare function queryGraph(graph: KnowledgeGraph, question: string, options?: QueryGraphOptions): string; export declare function getNode(graph: KnowledgeGraph, label: string): string; export declare function getNeighbors(graph: KnowledgeGraph, label: string, relationFilter?: string): string; export declare function getCommunity(graph: KnowledgeGraph, communities: Communities, communityId: number): string; export declare function graphStats(graph: KnowledgeGraph, communities?: Communities): string; export declare function semanticAnomaliesSummary(graphPath: string, topN?: number): string; export declare function godNodesSummary(graph: KnowledgeGraph, topN?: number): string; export declare function shortestPath(graph: KnowledgeGraph, source: string, target: string, maxHops?: number): string;