/**
 * Local Cross-Encoder Reranker - TypeScript bridge to python/reranker_worker.py
 *
 * Spawns the Python cross-encoder worker to rerank search results locally
 * using ms-marco-MiniLM-L-12-v2. No cloud API calls.
 *
 * CRITICAL: NEVER use console.log() - stdout is reserved for JSON-RPC protocol.
 *
 * @module services/search/local-reranker
 */
interface LocalRerankInput {
    index: number;
    text: string;
    original_score: number;
}
interface LocalRerankResult {
    index: number;
    relevance_score: number;
    original_score: number;
}
/** Returned when the reranker fails — carries the error message through the chain */
export interface LocalRerankError {
    error: true;
    message: string;
    error_type: string;
}
/**
 * Rerank passages locally using the Python cross-encoder worker.
 *
 * @param query - The search query
 * @param passages - Passages to rerank with index, text, and original_score
 * @returns Reranked results sorted by relevance_score descending, or LocalRerankError with details
 */
export declare function localRerank(query: string, passages: LocalRerankInput[]): Promise<LocalRerankResult[] | LocalRerankError>;
export {};
//# sourceMappingURL=local-reranker.d.ts.map