import { type AgentIntegrationPlan } from "./agent-integration.js"; export declare const CODEX_NATIVE_TRUST_PLAN_SCHEMA = "skills.codex-native-trust-plan/v1"; export declare const CODEX_NATIVE_TRUST_RECEIPT_SCHEMA = "skills.codex-native-trust-receipt/v1"; export interface CodexNativeTrustPlan { schema: typeof CODEX_NATIVE_TRUST_PLAN_SCHEMA; dataDir: string; policyPath: string; platform: string; digestsBefore: string[]; digestsAfter: string[]; policySha256Before: string; policySha256After: string; /** The ordinary plan the existing apply path writes: at most one change, the managed policy. */ plan: AgentIntegrationPlan; } export interface CodexNativeTrustReceipt { schema: typeof CODEX_NATIVE_TRUST_RECEIPT_SCHEMA; applied: boolean; platform: string; digestsBefore: string[]; digestsAfter: string[]; policySha256Before: string; policySha256After: string; changes: string[]; backup?: { path: string; sha256: string; verified: true; }; readback?: { policySha256: string; digests: string[]; verified: true; }; } /** Validate the request, the current policy and its SHA, and build the plan. Read-only. */ export declare function planCodexNativeTrust(options: { dataDir?: string; platform: string; digests: readonly string[]; expectedPolicySha256: string; }): CodexNativeTrustPlan; export declare function previewCodexNativeTrust(plan: CodexNativeTrustPlan): CodexNativeTrustReceipt; /** Write the planned trust. The current bytes are re-checked against the * expected SHA immediately before the existing apply path replaces them; that * path compares the exact bytes again, backs the original up, replaces the * file atomically at 0600 and restores the original on failure. The backup * and the result are read back and verified before a receipt is returned. */ export declare function applyCodexNativeTrust(plan: CodexNativeTrustPlan, expectedPolicySha256: string): CodexNativeTrustReceipt;