import type { SearchWeights } from "./types.js"; /** * Normalize the raw lexical query (BM25). The scoring function treats text as * data, so we only normalize whitespace. Returns null for empty queries — * callers turn that into a defined empty result, not a crash (04 L4). */ export declare function buildLexicalQuery(raw: string): string | null; /** * Normalize a namespace ("skills") into a SQL LIKE prefix ("skills/%"). * Mirrors PilotSwarm's reserved knowledge namespaces. */ export declare function namespacePrefix(namespace?: string): string | null; export interface Candidate { scopeKey: string; /** Raw per-signal scores. Any subset may be present. */ lexical?: number; semantic?: number; } export interface FusedCandidate { scopeKey: string; score: number; signals: { lexical?: number; semantic?: number; }; } /** Min-max normalize a list of numbers into 0..1. Constant lists map to 1. */ export declare function normalize(values: number[]): number[]; /** * Weighted-normalized-score fusion. * * Each signal is min-max normalized across its own candidate set, then combined * with the configured weights. A candidate missing a signal contributes 0 for * that signal. Returns candidates sorted by fused score descending. */ export declare function fuseWeighted(candidates: Candidate[], weights?: SearchWeights): FusedCandidate[]; //# sourceMappingURL=query-builder.d.ts.map