import type { AgentAdapter, DetectionResult, InstallOptions, InstallReport, InstallState, Scope } from "../types.js"; export interface RunResult { stdout: string; stderr: string; exitCode: number; } export interface CodexDeps { run: (cmd: string, args: string[]) => Promise; existsSync: (p: string) => boolean; readFileSync: (p: string, encoding?: BufferEncoding) => string; readdirSync?: (p: string) => string[]; mkdirSync?: (p: string, opts?: { recursive?: boolean; }) => void; writeFileSync?: (p: string, data: string | Buffer) => void; rmSync?: (p: string, opts?: { recursive?: boolean; force?: boolean; }) => void; homedir: () => string; cwd: () => string; fetchLatestVersion: () => Promise; fetchZip: (ref: string) => Promise<{ tempDir: string; ref: string; owned?: boolean; }>; } export declare function defaultCodexDeps(): CodexDeps; export declare class CodexAdapter implements AgentAdapter { readonly id = "codex"; readonly displayName = "Codex"; private deps; constructor(deps?: CodexDeps); supportsScopes(): Scope[]; detect(): Promise; getInstallState(scope: Scope): Promise; private skillsRoot; private canonicalSkillPath; private queryLocalInstallState; private enrichWithLatest; get depsRef(): CodexDeps; install(opts: InstallOptions): Promise; private mkdirp; /** * Recursive directory copy. Uses `this.deps.readdirSync` and * `this.deps.writeFileSync` where the injected signatures match, but falls * back to `fs.statSync` and buffer-returning `fs.readFileSync` directly — * the `CodexDeps.readFileSync` signature returns a string (UTF-8), so we * can't use it here without losing binary content (images, shell scripts * with executable bits, etc.). Fully-injected recursion would require * widening the deps interface with buffer/stat variants; for the narrow * use case of copying extracted skills the direct fs calls are fine. */ private copyDir; } /** * Parse YAML frontmatter from a SKILL.md body and return metadata.version. * Returns undefined if the front matter is missing, malformed, or lacks the * metadata.version key. Never throws — Codex skills can vary. */ export declare function parseMetadataVersion(body: string): string | undefined; export declare const codexAdapter: AgentAdapter; //# sourceMappingURL=codex.d.ts.map