import type { InstallType, SkillRecord } from "./skill-catalog.js"; /** * Pure ranking for the rdk-skills catalog (issue #4 §5). Nothing here talks to * the network or reads user state; every result comes from the validated * snapshot passed in. The rules deliberately differ from doc search: task * words must decide relevance, model words alone never promote a workflow, * and quantization queries without a PTQ/QAT decision are disambiguated * instead of guessed. */ export type SearchFilters = { pack?: string; platform?: string; installType?: InstallType; limit?: number; }; export type RankedSkill = { skill: SkillRecord; score: number; matched_terms: string[]; match_reason: string; }; export type GuidanceKind = "default" | "model_only" | "ambiguous_quant" | "no_match" | "invalid_input"; export type SkillSearchOutcome = { matches: RankedSkill[]; guidance: string; guidance_kind: GuidanceKind; }; export declare function skillQueryTokens(query: string): string[]; /** * Rank catalog skills for a query. Throws no errors for content reasons — * zero matches are a valid outcome with no_match guidance, and a query with * zero usable tokens is reported as invalid_input instead of matching * unrelated records through ranking bonuses. */ export declare function searchSkillRecords(skills: SkillRecord[], query: string, filters?: SearchFilters): SkillSearchOutcome;