import type { WebSearchBackend } from "../../runtime/ports/web-search-contracts.js";
import type { SourceProvider, SourceQueryOptions } from "../../runtime/ports/source-provider.js";
import type { SourceCache, CircuitBreaker } from "./stability.js";
import type { Reranker } from "./embedding-rerank.js";
export interface SourceRouter {
    pick(query: string, sources: SourceProvider[], opts: SourceQueryOptions): SourceProvider[];
}
/** V0 默认路由:全部 source 都打(已被熔断器在调用前过滤)。L1 分类器路由留 V1。 */
export declare const allSourcesRouter: SourceRouter;
export interface MultiSourceConfig {
    sources: SourceProvider[];
    router?: SourceRouter;
    cache?: SourceCache;
    breaker?: CircuitBreaker;
    /** 每个 source 的硬超时(ms);实测起点 4–5s */
    perSourceTimeoutMs?: number;
    cacheTtlMs?: number;
    dedupe?: boolean;
    maxResults?: number;
    /** L3 语义重排器(可选);dedupe 后、截断前对 hits 按 query 相关性重排。 */
    rerank?: Reranker;
}
export declare function createMultiSourceBackend(cfg: MultiSourceConfig): WebSearchBackend;
