//#region extensions/crypto/src/services/skill-registry.d.ts /** * Skill Registry — unified index of static + learned skills with keyword matching. * * Solves the "LLM didn't load the right skill" problem by: * 1. Indexing ALL skills (42 static + N learned) with name, description, keywords * 2. Matching user messages against keywords → returning full skill content * 3. Providing a single lookup surface for /skills command + prompt-builder * * Static skills: extensions/crypto/skills//SKILL.md * Learned skills: ~/.openclawnch/learned-skills//SKILL.md */ interface SkillEntry { /** Skill name (kebab-case). */ name: string; /** Short description from frontmatter or first paragraph. */ description: string; /** Source: 'static' (shipped) or 'learned' (agent-created). */ source: 'static' | 'learned'; /** Absolute path to SKILL.md. */ path: string; /** Keywords for matching (derived from name + description + frontmatter). */ keywords: string[]; /** Environment variables required by this skill (from frontmatter metadata). */ requiresEnv: string[]; /** Whether the user has disabled this skill. */ disabled: boolean; /** Full file content (lazy-loaded, cached). */ _content?: string; } interface SkillMatch { skill: SkillEntry; /** Number of keyword hits. */ score: number; } declare class SkillRegistry { private skills; private disabledSet; private staticDir; private learnedDir; private lastScan; private scanIntervalMs; constructor(opts?: { staticDir?: string; learnedDir?: string; }); /** Re-scan both directories for skills. */ scan(): void; private ensureFresh; /** Get a skill by exact name. */ get(name: string): SkillEntry | null; /** List all skills sorted by name. */ list(opts?: { source?: 'static' | 'learned'; includeDisabled?: boolean; }): SkillEntry[]; /** List all skills including disabled (for /skills command). */ listAll(): SkillEntry[]; /** Read the full SKILL.md content for a skill. */ readContent(name: string): string | null; /** * Match user message against skill keywords. * Returns skills sorted by match score (descending), filtered to score >= minScore. * Only matches enabled skills. */ match(message: string, opts?: { minScore?: number; maxResults?: number; }): SkillMatch[]; /** Build a compact index for prompt injection (name + description, one line each). */ buildIndex(): string; /** Disable a skill (won't appear in prompts or matching). */ disable(name: string): boolean; /** Re-enable a disabled skill. */ enable(name: string): boolean; /** Check which required env vars are missing for a skill. */ missingEnv(skill: SkillEntry): string[]; /** Get total count (enabled only by default). */ get size(): number; /** Get total count including disabled. */ get totalSize(): number; } declare function getSkillRegistry(opts?: { staticDir?: string; learnedDir?: string; }): SkillRegistry; declare function resetSkillRegistry(): void; //#endregion export { SkillEntry, SkillMatch, SkillRegistry, getSkillRegistry, resetSkillRegistry }; //# sourceMappingURL=skill-registry.d.mts.map