import { type SkillSpec } from "./skill-parser.js"; /** * v0.5 §7 — meta-skill scanner. * * `_meta/` is intentionally segregated from the regular agent roster so that * orchestration-layer SKILLs (workflow-manager, recipe-replay, etc.) never get * surfaced through the 3 ambient channels (slash / keyword / freq). Letting * a meta-skill ride one of those channels would invert the v0.3 control * model — meta-skills must be invoked *by the PM* (explicit only) so they * stay out of the user's typing surface and out of the freq-loader budget * (see §13 cap on freq-enabled SKILLs). * * The general roster scanner (`listSourceAgents()` in `agents-builder.ts`) * already skips any directory whose name starts with `_`, so `_meta/` stays * out of the normal Task-tool fanout. This module is the *opposite* side: * it scans **only** `_meta/` and enforces the inverse policy — accept ONLY * `triggers.explicit: true`, reject every other channel. * * Rejection (rather than throw) is deliberate. A malformed meta-skill must * not poison the rest of the workspace; the caller (PM bootstrap, doctor) * surfaces the `rejected[]` list as a warning and continues. */ export interface MetaSkillRef { name: string; source_path: string; spec: SkillSpec; } export interface MetaSkillRejection { path: string; reason: string; } export interface MetaSkillScanResult { ok: MetaSkillRef[]; rejected: MetaSkillRejection[]; } export declare function listMetaSkills(agentsDir?: string): MetaSkillScanResult;