import type { SearchPlugin, SearchResult, SearchOpts, SearchOrchestrator, SearchIntent, SearchWeights } from '../../core/types.js'; import type { LLMJudge } from './llm-judge.js'; export declare class SearchFusion implements SearchOrchestrator { private plugins; private classifier; private searchCallCount; private searchWindowStart; private weights; private llmJudge?; private contentLookup?; private searchCache; private readonly CACHE_TTL_MS; private readonly CACHE_MAX_ENTRIES; /** * Canonicalize a query string so that similar queries map to the same key. * Strips punctuation, drops short words, and sorts tokens alphabetically. */ canonicalize(query: string): string; /** * Clear all cached search results. Useful for testing. */ clearCache(): void; /** * Evict expired entries from the cache. */ private evictExpired; constructor(plugins: SearchPlugin[], weights?: SearchWeights); /** * Attach an optional LLM judge that reranks results using semantic scoring. * Only activates when a non-null judge is attached (i.e. ai_curation.enabled). */ attachLLMJudge(judge: LLMJudge, contentLookup: (id: string) => string | undefined): void; detachLLMJudge(): void; classify(query: string): SearchIntent; resetThrottle(): void; execute(query: string, opts: SearchOpts): Promise; } /** * Rerank search results by combining original relevance with recency and access frequency. * Weights are intent-specific: causal favors recency, lookup favors relevance, * temporal heavily favors recency, general uses balanced weights. * * For general intent, weights are adjusted dynamically based on result characteristics * (AttnRes mechanism: fixed query × content-dependent keys → adaptive weights). */ export declare function rerank(results: SearchResult[], intentType?: SearchIntent['intent_type'], query?: string): SearchResult[]; //# sourceMappingURL=fusion.d.ts.map