import type { SearchResult, TextMatch, TextMatchGroup, SymbolKind } from "../types.js";
export type DetailLevel = "compact" | "standard" | "full";
export interface SearchSymbolsOptions {
    kind?: SymbolKind | undefined;
    file_pattern?: string | undefined;
    decorator?: string | undefined;
    include_source?: boolean | undefined;
    top_k?: number | undefined;
    source_chars?: number | undefined;
    detail_level?: DetailLevel | undefined;
    token_budget?: number | undefined;
    rerank?: boolean | undefined;
}
export interface SearchTextOptions {
    regex?: boolean | undefined;
    file_pattern?: string | undefined;
    context_lines?: number | undefined;
    max_results?: number | undefined;
    group_by_file?: boolean | undefined;
    auto_group?: boolean | undefined;
    compact?: boolean | undefined;
    ranked?: boolean | undefined;
}
/**
 * Search symbols by name/signature/docstring using BM25 ranking.
 * Supports filtering by symbol kind, file pattern, and decorator metadata.
 *
 * When query is empty, returns all symbols matching the filters (up to top_k).
 * When kind, decorator, or file_pattern filters are active, BM25 searches a wider candidate
 * set to avoid post-filter truncation.
 */
export declare function searchSymbols(repo: string, query: string, options?: SearchSymbolsOptions): Promise<SearchResult[]>;
/**
 * Full-text search across all files in a repository.
 * Walks the filesystem to search ALL text files, not just indexed ones.
 *
 * When group_by_file=true, returns TextMatchGroup[] instead of TextMatch[].
 * This reduces output by 80-90% for high-cardinality searches.
 */
export declare function searchText(repo: string, query: string, options?: SearchTextOptions & {
    group_by_file: true;
}): Promise<TextMatchGroup[]>;
export declare function searchText(repo: string, query: string, options?: SearchTextOptions & {
    compact: true;
}): Promise<string>;
export declare function searchText(repo: string, query: string, options?: SearchTextOptions): Promise<TextMatch[]>;
export declare function semanticSearch(repo: string, query: string, options?: {
    top_k?: number;
    file_pattern?: string;
    exclude_tests?: boolean;
    rerank?: boolean;
}): Promise<string>;
export interface ZeroHitFallbackResult {
    /** Near-miss symbol names from the index vocabulary ("did you mean"). */
    suggestions?: string[];
    /** Formatted semantic-search results — present only when an embeddings
     * index already existed and the query embedded within the time cap. */
    semantic_results?: string;
}
/**
 * Build fallback guidance after a zero-hit text search. Both branches are
 * best-effort: any failure degrades to an empty object, never an error.
 */
export declare function zeroHitFallback(repo: string, query: string): Promise<ZeroHitFallbackResult>;
//# sourceMappingURL=search-tools.d.ts.map