import { type CodexReconcileApplyOptions } from "./agent-integration.js"; import { type CodexNativeSkillCatalog } from "./codex-native-skill-catalog.js"; export declare const CODEX_RECONCILE_RESULT_SCHEMA: "hasna.skills-codex-reconcile.v1"; export type CodexReconcileOutcome = "applied" | "unchanged" | "planned" | "refused" | "error"; export interface CodexReconcileResult { schema: typeof CODEX_RECONCILE_RESULT_SCHEMA; mode: "preview" | "apply"; outcome: CodexReconcileOutcome; /** Present exactly when the outcome is refused or error. */ code?: string; message?: string; codexVersion: string | null; counts: { enrolled: number; alreadyEnrolled: number; denied: number; pathDenied: number; skipped: number; allowed: number; }; /** Plugin-cache names added to the reviewed controls and denied by name. */ enrolled: string[]; /** Runtime-cache skills denied by their stable qualified name (no plugin control exists for them). */ denied: string[]; /** Skills denied by exact path, each with why no stable qualified name covers it. */ pathDenied: Array<{ name: string; path: string; reason: "plugin-disabled" | "no-qualified-name"; }>; /** Inactive plugins (config disables them and Codex reports them disabled from a config-controlled source): neither enrolled nor refused. */ inactive: string[]; /** Plugins classified skills-only, each citing the manifest paths that were read. */ classified: Array<{ pluginId: string; capabilities: string[]; manifests: string[]; }>; /** Reviewed cache witnesses re-captured after a skills-only version change. */ rebasedWitnesses: number; /** Enrolled remote plugins whose controls, stored without the install receipt, gain the verified one. */ bound: string[]; /** Native skills Codex loads afterwards; exactly the bridge, or the result is refused. */ allowed: string[]; /** Plugins whose capability kinds need a review, with the manifests read (refused only). */ refusals?: Array<{ pluginId: string; reasons: string[]; manifests?: string[]; }>; /** Files written (applied) or that apply would write (planned). */ changes: string[]; receipt?: string; backups?: string[]; } export declare function classifyCodexReconcileError(error: unknown): Pick; export interface CodexReconcileOptions { apply: boolean; home: string; projectDir: string; dataDir?: string; codexCommand?: string; codexHome?: string; /** Test seam for the native catalog read; production uses the Codex app-server. */ captureCatalog?: (options: { command: string; home: string; codexHome?: string; cwd: string; }) => Promise; /** Test seam for Codex's own config writer; production starts `codex app-server`. */ connect?: CodexReconcileApplyOptions["connect"]; } export declare function runCodexPluginReconcile(options: CodexReconcileOptions): Promise;