export interface SemanticCandidate { id: string; text: string; } export interface SemanticRuntimeOptions { model?: string; batchSize?: number; /** Project root to resolve the optional transformers package from, in * addition to madar's own installation. Needed because npx-launched * servers run from the npx cache, where a project-local * `npm install @huggingface/transformers` is otherwise invisible. */ projectRoot?: string; } export declare const DEFAULT_SEMANTIC_MODEL = "Xenova/all-MiniLM-L6-v2"; export declare const DEFAULT_RERANK_MODEL = "Xenova/ms-marco-MiniLM-L-6-v2"; /** True when the optional transformers package is resolvable, either from * madar's own installation or from the given project root. Used to gate the * semantic/rerank tool-schema fields and the doctor report. */ export declare function isSemanticRuntimeAvailable(projectRoot?: string): boolean; export declare function rankCandidatesBySemanticSimilarity(question: string, candidates: readonly SemanticCandidate[], options?: SemanticRuntimeOptions): Promise>; export declare function rerankCandidatesWithCrossEncoder(question: string, candidates: readonly SemanticCandidate[], options?: SemanticRuntimeOptions): Promise>;