import type { SuggestionWithScore } from "../types/domain-types.js"; /** * Filters and ranks candidates by similarity * * @param userInput - User's typed string * @param candidates - Available candidates * @returns Top suggestions sorted by score * * @pure true * @purity CORE (pure function, no effects) * @effect None * @invariant result.length ≤ MAX_SUGGESTIONS * @invariant ∀i < result.length-1: result[i].score ≥ result[i+1].score * @invariant ∀x ∈ result: x.score ≥ MIN_SIMILARITY_SCORE * @complexity O(n log n) where n = |candidates| * @throws Never * * FORMAT THEOREM: findSimilar: String × String[] → SuggestionWithScore[] * where |result| ≤ 5 ∧ sorted_descending(result.scores) */ export declare function findSimilarCandidates(userInput: string, candidates: readonly string[]): readonly SuggestionWithScore[]; //# sourceMappingURL=engine.d.ts.map