/** * v0.8.1 — `schema_version` backfill for bundled + workspace SKILL.md * frontmatter. * * Per docs/plan/v0.8.1-security-lifecycle-pair.md §6.3. Lives under `src/` * (not `scripts/`) because tsc only emits files under `bin/` + `src/` — * the 0.8.0 → 0.8.1 migration imports the same logic at runtime. * * Both the standalone CLI (`scripts/inject-skill-schema-version.ts`) and * the migration script call `injectAcross()`. The function is idempotent — * files that already carry `schema_version` are left byte-identical. */ export interface InjectResult { injected: string[]; alreadyHad: string[]; skipped: { file: string; reason: string; }[]; } /** Walk a directory and return every SKILL.md found. */ export declare function listSkillFiles(root: string): string[]; /** * Inject `schema_version: ` into a frontmatter block. Returns the * new content, or null if the file already has the key. Throws on missing * frontmatter so the caller can flag the file as broken (rather than * silently mutating it). * * Preserves the original line endings (CRLF vs LF) so the round-trip * remains byte-identical for already-stamped files. */ export declare function injectSchemaVersion(content: string, version?: number): string | null; /** * Walk a directory recursively and inject `schema_version: ` into * every SKILL.md file. Returns a structured report of injected / already-had * / skipped files. */ export declare function injectAcross(root: string, version?: number): InjectResult;