/** * Zero-dependency fuzzy string matching — Jaro-Winkler similarity. For approximate * name matching against a list (sanctions / KYC / watchlist screening, dedup, * entity resolution) WITHOUT an LLM call: deterministic, auditable, and cheap. * * ```ts * import { fuzzyMatchList } from '@agentskit/core' * const hits = fuzzyMatchList('Vladimir Putin', sanctionsList, { threshold: 0.9 }) * if (hits.length) block() // never auto-clear an approximate match * ``` */ /** * Jaro-Winkler similarity (0..1) — Jaro with a bonus for a shared prefix (up to 4 * chars). Case- and whitespace-insensitive by default. 1 = identical, 0 = nothing * in common. */ declare function jaroWinkler(a: string, b: string, opts?: { caseSensitive?: boolean; }): number; interface FuzzyMatch { candidate: string; score: number; } /** * Score `query` against every candidate and return the matches at or above * `threshold` (default 0.85), highest score first, capped at `topK` (default 10). */ declare function fuzzyMatchList(query: string, candidates: readonly string[], opts?: { threshold?: number; topK?: number; caseSensitive?: boolean; }): FuzzyMatch[]; export { type FuzzyMatch, fuzzyMatchList, jaroWinkler };