/** * Leaper Agent – Skill Manager * * CRUD operations for skills on disk. * Translates Python tools/skill_manager_tool.py. */ export interface SkillFileEntry { relativePath: string; content: string; } export interface CreateSkillOptions { name: string; content: string; category?: string; } export interface SkillManagerConfig { skillsDir: string; } /** Returns an error string, or null if valid. */ export declare function validateSkillName(name: string): string | null; /** Returns an error string, or null if valid. */ export declare function validateCategory(category?: string): string | null; /** Returns validation result for YAML frontmatter in skill content. */ export declare function validateFrontmatter(content: string): { valid: boolean; error?: string; }; /** Returns an error string, or null if valid. */ export declare function validateSubdir(relPath: string): string | null; export declare class SkillManager { private skillsDir; constructor(config: SkillManagerConfig); /** Create a new skill directory with SKILL.md. */ createSkill(opts: CreateSkillOptions): Promise<{ success: boolean; path?: string; error?: string; }>; /** Replace SKILL.md content entirely. */ editSkill(name: string, content: string): Promise<{ success: boolean; error?: string; }>; /** Surgical find-and-replace in SKILL.md. */ patchSkill(name: string, oldText: string, newText: string): Promise<{ success: boolean; error?: string; }>; /** Delete skill directory. */ deleteSkill(name: string): Promise<{ success: boolean; error?: string; }>; /** Write a supporting file (references/, templates/, scripts/, assets/). */ writeSkillFile(name: string, relPath: string, content: string): Promise<{ success: boolean; error?: string; }>; /** Remove a supporting file. */ removeSkillFile(name: string, relPath: string): Promise<{ success: boolean; error?: string; }>; /** List all skills. */ listSkills(): Promise>; /** Resolve a skill path: handles "name" or "category/name". */ private resolveSkillPath; /** Try to find an existing skill directory by name (searches flat and nested). */ private findSkillDir; private isLocalSkill; private walkForSkills; } //# sourceMappingURL=skill-manager.d.ts.map