import type { AdapterResult, MigrateSource, SkillCandidate, SourceDiagnostic } from "../types"; export interface AdapterOptions { /** Home directory root; overridable for tests. */ homeDir: string; } export interface Adapter { source: MigrateSource; collect(options: AdapterOptions): Promise; } export declare function getAdapter(source: MigrateSource): Adapter; /** Read a text file, classifying absence/IO errors into source diagnostics. */ export declare function readSourceText(filePath: string, source: MigrateSource, type: SourceDiagnostic["type"]): Promise<{ text: string; } | { diagnostic: SourceDiagnostic; }>; /** Parse JSON text, classifying parse errors into a `failed_invalid_source` diagnostic. */ export declare function parseSourceJson(text: string, filePath: string, source: MigrateSource, type: SourceDiagnostic["type"]): { data: Record; } | { diagnostic: SourceDiagnostic; }; /** * Collect skill candidates from a directory of `/SKILL.md` entries. * A missing directory yields a `skipped_absent_source` diagnostic. */ export declare function collectSkillDir(dir: string, source: MigrateSource): Promise<{ candidates: SkillCandidate[]; diagnostics: SourceDiagnostic[]; }>; /** * Collect skill candidates from a flat directory of `*.md` prompt/command files. */ export declare function collectMarkdownPrompts(dir: string, source: MigrateSource): Promise<{ candidates: SkillCandidate[]; diagnostics: SourceDiagnostic[]; }>; /** * Recursively collect skill candidates from any `**​/SKILL.md` under `root`. * The slug derives from the directory that directly contains the `SKILL.md`. */ export declare function collectSkillTree(root: string, source: MigrateSource): Promise<{ candidates: SkillCandidate[]; diagnostics: SourceDiagnostic[]; }>;