/** * Skill search — fuzzy matching with edit-distance and prefix scoring */ import { type SkillMeta } from "./registry.js"; /** * Compute Levenshtein edit distance between two strings. * Uses a 2-row DP approach — no external deps. */ export declare function editDistance(a: string, b: string): number; /** * Search skills by name, description, and tags using fuzzy matching. */ export declare function searchSkills(query: string, registry?: SkillMeta[]): SkillMeta[]; /** * Bounded close canonical names for a refused name, strongest evidence first: * * 0. the exact name; * 1. a hyphen-delimited containment — the candidate owns the query as a whole * leading or trailing segment (`fleet-refresh` → `instructions-fleet-refresh`); * 2. a multi-word token subset of the candidate; * 3. the edit-distance rule that was the only signal before. * * Containment is what edit distance cannot see, and it is the case that cost * real time: the canonical name that owns a shorter name as its trailing * segment is 13 edits from the short name, so a caller naming the procedure by * its last words was told the procedure did not exist (Agents Audit A27). The * distance pass still runs and fills any slots containment leaves, so a * distance-only miss — including every query under three characters — keeps the * answer it has always had. */ export declare function findCloseSkillNames(query: string, names: readonly string[], maxResults?: number): string[]; /** * Find skills with names similar to the given query (for "did you mean?" suggestions). */ export declare function findSimilarSkills(query: string, maxResults?: number, registry?: SkillMeta[]): string[];