/** * Skill discovery and path resolution. * Delegates canonical path resolution and standard discovery to @cleocode/caamp. * Keeps CLEO-specific discovery logic (local project skill scanning, name mapping). * * CAAMP integration notes (T4679): * - Path resolution: uses CAAMP's resolveSkillsRoot() for standard locations * - Basic metadata: CAAMP's parseSkillFile() returns SkillMetadata (name, desc, version) * - Extended metadata: CLEO's parseFrontmatter() adds tags, triggers, protocol, etc. * - discoverSkill() uses parseFrontmatter() because CLEO needs the extended fields * - For external/marketplace skills needing only basic metadata, use caampParseSkillFile() * * @epic T4454 * @task T4516 * @task T4679 */ import { discoverSkill as caampDiscoverSkill, discoverSkills as caampDiscoverSkills, parseSkillFile as caampParseSkillFile } from '@cleocode/caamp'; import type { FindSkillOptions, Skill, SkillFrontmatter, SkillManifest, SkillSearchPath, SkillSummary } from './types.js'; /** * Build the CAAMP skill search paths in priority order. * Uses CAAMP's canonical path functions for standard locations. * @task T4516 */ export declare function getSkillSearchPaths(cwd?: string): SkillSearchPath[]; /** * Get the primary skills directory (app-embedded). * @task T4516 */ export declare function getSkillsDir(cwd?: string): string; /** * Get the shared skills resources directory. * @task T4516 */ export declare function getSharedDir(cwd?: string): string; /** * Map a user-friendly skill name to the canonical ct-prefixed directory name. * Supports: UPPER-CASE, lower-case, with/without ct- prefix. * @task T4516 */ export declare function mapSkillName(input: string): { canonical: string; mapped: boolean; }; /** * List every canonical skill name: the entries of the bundled * `@cleocode/skills` manifest (`skills/manifest.json`), which is generated * from SKILL.md frontmatter. * * Before T12649 this returned the values of {@link SKILL_NAME_MAP} — an alias * table that omitted ct-lead, most LOOM skills and ct-skill-author, so skill * migration and `cleo doctor skill-fixtures` did not treat them as * canonical. The alias table remains the fallback when no bundled manifest * can be found. * * @returns Unique skill names, manifest order. * @task T4516 * @task T12649 */ export declare function listCanonicalSkillNames(): string[]; /** * Parse YAML-like frontmatter from a SKILL.md file. * Handles the --- delimited header with key: value pairs. * @task T4516 */ export declare function parseFrontmatter(content: string): SkillFrontmatter; /** * Discover a single skill from a directory. * Tries CAAMP's parseSkillFile first, falls back to local parsing. * @task T4516 */ export declare function discoverSkill(skillDir: string): Skill | null; /** * Discover all skills in a single directory. * Scans for subdirectories containing SKILL.md. * @task T4516 */ export declare function discoverSkillsInDir(dir: string): Skill[]; /** * Discover all skills across CAAMP search paths. * Returns skills in priority order (earlier paths take precedence). * @task T4516 */ export declare function discoverAllSkills(cwd?: string): Skill[]; /** * Find a specific skill by name across all search paths. * * With `options.includeBundled` (and `CLEO_SKILL_SOURCE=auto`, the default), * falls back to the copy bundled in `@cleocode/skills` and marks it * `source: 'bundled'`. Without it, only installed skills are found. * * @task T4516 * @task T12646 */ export declare function findSkill(name: string, cwd?: string, options?: FindSkillOptions): Skill | null; /** * Convert a Skill to a lightweight SkillSummary. * @task T4516 */ export declare function toSkillSummary(skill: Skill): SkillSummary; /** * Generate a skill manifest from discovered skills. * @task T4516 */ export declare function generateManifest(cwd?: string): SkillManifest; /** * Resolve a skill template path (SKILL.md) by name. * @task T4516 */ export declare function resolveTemplatePath(name: string, cwd?: string): string | null; /** * Parse a SKILL.md file using CAAMP's parser. * Returns basic SkillMetadata (name, description, version, license, etc.). * Use this for external/marketplace skills that don't need CLEO-specific fields. * For CLEO skills requiring tags/triggers/protocol, use parseFrontmatter() instead. * * @task T4679 */ export { caampDiscoverSkill, caampDiscoverSkills, caampParseSkillFile }; //# sourceMappingURL=discovery.d.ts.map