import type { SkillsSettings } from "../config/settings-schema"; import type { Skill } from "./skills"; export type RuntimeSkillDiscoverySource = "project" | "user"; export interface RuntimeSkillDiscoveryCandidate { name: string; description: string; source: RuntimeSkillDiscoverySource; path: string; useWhen?: string[]; } /** * Human-readable diagnostics collected while scanning, so an empty or partial * result is explainable: protected-name collisions with bundled workflow * skills, skills filtered by include/ignore/disable policy, invalid frontmatter, * and scan warnings. Bounded to avoid flooding tool output. */ export interface RuntimeSkillDiscoveryDiagnostics { messages: string[]; } export interface RuntimeSkillDiscoveryResult { candidates: RuntimeSkillDiscoveryCandidate[]; diagnostics: RuntimeSkillDiscoveryDiagnostics; } export interface DiscoverRuntimeSkillsOptions { cwd: string; home?: string; query?: string; limit?: number; source?: RuntimeSkillDiscoverySource | "all"; policy?: SkillsSettings; } /** * Explain an empty result that is caused by disabled discovery config rather * than by an actually empty skill catalog. Uses the user-facing trust * settings; the legacy `skills.enablePiUser` / `skills.enablePiProject` * aliases map onto the same effective values. Shared by the skill_discovery * tool and `gjc skills discover`. */ export declare function describeDisabledSkillScopes(source: RuntimeSkillDiscoverySource | "all", policy: SkillsSettings | undefined): string | undefined; export declare function discoverRuntimeSkills(options: DiscoverRuntimeSkillsOptions): Promise; export declare function findRuntimeSkillByName(cwd: string, name: string, policy?: SkillsSettings, home?: string): Promise;