/** * Multi-source skill path resolver for CAAMP integration. * Ported from lib/skills/skill-paths.sh * * Resolves skills, protocols, and shared resources from multiple locations. * Supports CAAMP canonical paths, project-embedded paths, and explicit overrides. * * Priority order: * 1. CLEO_SKILL_PATH entries (explicit overrides, highest priority) * 2. Source-determined paths based on CLEO_SKILL_SOURCE * * @task T4552 * @epic T4545 */ /** Source type classification for a skill directory. */ export type SkillSourceType = 'embedded' | 'caamp' | 'project-link' | 'global-link'; /** Skill source mode. */ export type SkillSourceMode = 'auto' | 'caamp' | 'embedded'; /** Search path entry with its origin. */ export interface SkillSearchPath { path: string; origin: 'override' | 'caamp' | 'embedded'; } /** * Get ordered skill search paths based on configuration. * * Priority: * 1. CLEO_SKILL_PATH entries (colon-separated, explicit overrides) * 2. Source-determined paths based on CLEO_SKILL_SOURCE * * CLEO_SKILL_SOURCE modes: * - auto: CAAMP canonical + embedded (default) * - caamp: CAAMP canonical only * - embedded: Project embedded only * * @task T4552 */ export declare function getSkillSearchPaths(projectRoot?: string): SkillSearchPath[]; /** * Resolve a skill directory containing SKILL.md. * Searches all paths from getSkillSearchPaths() in priority order. * First match wins. * * @task T4552 */ export declare function resolveSkillPath(skillName: string, projectRoot?: string): string | null; /** * Resolve a protocol .md file. * * Search order: * 1. `/src/validation/protocols/protocols-markdown/{name}.md` * (canonical location, where the markdown lives in this monorepo) * 2. `/protocols/{name}.md` for each registered skill base path * (project-local protocol overrides) * * @task T4552 * @task T260 — drop dead Strategy B paths, point at the real protocols-markdown dir */ export declare function resolveProtocolPath(protocolName: string, projectRoot?: string): string | null; /** * Resolve a shared resource .md file. * * Search order per base path: `{base}/_shared/{resource_name}.md`. The * `_shared/` directory is the canonical location in `@cleocode/skills`. * * @task T4552 * @task T260 — drop dead Strategy B path */ export declare function resolveSharedPath(resourceName: string, projectRoot?: string): string | null; /** * Classify the source of a skill directory. * * Determines where a skill directory lives in the search hierarchy: * - "embedded": Within the project's skills/ directory * - "caamp": Within the CAAMP canonical directory (~/.agents/skills) * - "project-link": Symlink pointing to project directory * - "global-link": Symlink pointing to CAAMP or external location * * @task T4552 */ export declare function getSkillSourceType(skillDir: string, projectRoot?: string): SkillSourceType | null; //# sourceMappingURL=skill-paths.d.ts.map