/**
 * Skill matcher — TF-IDF based matching of incoming messages to learned skills.
 * Zero external dependencies. Uses term frequency–inverse document frequency.
 *
 * Flow: user message → tokenize → TF-IDF score against skill index → top-K results
 */
import type { SkillDocument } from './schema.js';
export interface MatchResult {
    skill: SkillDocument;
    score: number;
}
export interface SkillIndex {
    /** Number of documents in the index */
    docCount: number;
    /** Inverse document frequency for each term */
    idf: Map<string, number>;
    /** Per-skill TF-IDF vectors */
    vectors: Map<string, Map<string, number>>;
    /** Reference to skills by ID */
    skills: Map<string, SkillDocument>;
}
/**
 * Tokenize text into normalized terms.
 */
export declare function tokenize(text: string): string[];
/**
 * Build a searchable index from a collection of skills.
 */
export declare function buildIndex(skills: SkillDocument[]): SkillIndex;
/**
 * Match a query against the skill index. Returns top-K results above threshold.
 * Score combines TF-IDF cosine similarity with usage frequency and recency boosts.
 */
export declare function matchSkills(query: string, index: SkillIndex, options?: {
    topK?: number;
    threshold?: number;
    boostUsage?: boolean;
}): MatchResult[];
/**
 * One-shot match: build index + match in one call. For small skill sets.
 */
export declare function matchOne(query: string, skills: SkillDocument[], options?: {
    topK?: number;
    threshold?: number;
}): MatchResult[];
