import { type CodebaseIndex, type CodeNodeType, type NormalizedSymbolKind } from './types.js';
/** Which text the query matched against, in order of preference. */
export type SymbolMatchField = 'name' | 'container' | 'path';
export interface SymbolSearchResult {
    /** Graph node id when the index carries symbol→node linkage. */
    nodeId?: string;
    name: string;
    kind: NormalizedSymbolKind;
    type: CodeNodeType;
    filePath: string;
    line: number;
    endLine: number;
    containerName?: string;
    language?: string;
    exported?: boolean;
    /** Higher is better. Comparable only within a single query. */
    score: number;
    /** Matched character offsets within `matchedText`. */
    positions: number[];
    /** Distance between first and last matched character (tighter is better). */
    span: number;
    field: SymbolMatchField;
    /** The text `positions` index into (name, container-qualified name, or path). */
    matchedText: string;
}
export interface SearchSymbolsOptions {
    limit?: number;
    /** Restrict results to these normalized kinds. */
    kinds?: readonly NormalizedSymbolKind[];
    /** Restrict results to symbols whose file path contains this substring. */
    pathFilter?: string;
}
export interface FuzzyMatch {
    score: number;
    positions: number[];
    span: number;
}
/**
 * Subsequence match of `queryLower` inside `text`, scored for symbol search:
 * boundary-aligned and consecutive matches score up; long spans score down.
 * Greedy forward pass anchored at each viable start, keeping the best window.
 */
export declare function fuzzyMatch(text: string, textLower: string, queryLower: string): FuzzyMatch | undefined;
/**
 * Fuzzy-search symbols across the index by name, container-qualified name,
 * and file path. Results carry match positions for highlighting. The search
 * corpus is memoized per index object, so repeated queries against the same
 * index (a session, a long-lived host) pay the corpus build once.
 */
export declare function searchSymbols(index: CodebaseIndex, query: string, options?: SearchSymbolsOptions): SymbolSearchResult[];
