/** * WorkspaceSkills - Skills implementation. * * Provides discovery and search operations for skills stored * in skills paths. All operations are async. */ import type { IndexDocument, SearchResult } from '../search/index.js'; import type { SkillSource as SkillSourceInterface } from './skill-source.js'; import type { Skill, SkillMetadata, SkillSearchResult, SkillSearchOptions, WorkspaceSkills, SkillsResolver, SkillsContext } from './types.js'; /** * Minimal search engine interface - only the methods we actually use. * This allows both the real SearchEngine and test mocks to be used. */ interface SkillSearchEngine { index(doc: IndexDocument): Promise; remove?(id: string): Promise; search(query: string, options?: { topK?: number; minScore?: number; mode?: 'bm25' | 'vector' | 'hybrid'; }): Promise; clear(): void; } /** * Configuration for WorkspaceSkillsImpl */ export interface WorkspaceSkillsImplConfig { /** * Source for loading skills. */ source: SkillSourceInterface; /** * Paths to scan for skills. * Can be a static array or a function that returns paths based on context. */ skills: SkillsResolver; /** Search engine for skill search (optional) */ searchEngine?: SkillSearchEngine; /** Validate skills on load (default: true) */ validateOnLoad?: boolean; } /** * Implementation of WorkspaceSkills interface. */ export declare class WorkspaceSkillsImpl implements WorkspaceSkills { #private; static readonly GLOB_RESOLVE_INTERVAL = 5000; static readonly STALENESS_CHECK_COOLDOWN = 2000; constructor(config: WorkspaceSkillsImplConfig); list(): Promise; get(name: string): Promise; has(name: string): Promise; refresh(): Promise; maybeRefresh(context?: SkillsContext): Promise; addSkill(skillPath: string): Promise; removeSkill(skillName: string): Promise; search(query: string, options?: SkillSearchOptions): Promise; getReference(skillName: string, referencePath: string): Promise; getScript(skillName: string, scriptPath: string): Promise; getAsset(skillName: string, assetPath: string): Promise; listReferences(skillName: string): Promise; listScripts(skillName: string): Promise; listAssets(skillName: string): Promise; } export {}; //# sourceMappingURL=workspace-skills.d.ts.map