import { connectCodexHookRpc } from "./codex-hook-rpc.js"; import { type ReviewedSkillsCli } from "./codex-hook-trust-identity.js"; import { type ClaudeDiscoveryRecovery } from "./codex-hook-policy-recovery.js"; import { type NativeHookAdditionsRecovery } from "./codex-hook-additions-review.js"; export interface CodexNativeHookTrustOptions { home?: string; dataDir?: string; codexCommand?: string; codexHome?: string; apply?: boolean; reviewedPlanDigest?: string; reviewedSkillsCli?: ReviewedSkillsCli; } export interface SkillsCliReleaseProof { packageTarPath: string; packageTarSha256: string; packageTarBytes: number; manifestSha256: string; executableSha256: string; } export interface CodexNativeHookReconcileOptions { home?: string; dataDir?: string; codexCommand?: string; journal: string; reviewedSkillsCli?: ReviewedSkillsCli; releaseProof?: SkillsCliReleaseProof; supersedeBinding?: boolean; claudeDiscoveryRecovery?: ClaudeDiscoveryRecovery; nativeHookAdditionsRecovery?: NativeHookAdditionsRecovery; } type Connect = typeof connectCodexHookRpc; /** Resolve an interrupted native write only after the native consumer and every * captured pre-write input agree. This never writes Codex state; it records a * receipt for an already-effective operation so the ordinary apply guard can * stop refusing the same journal. */ export declare function reconcileCodexNativeHooks(options: CodexNativeHookReconcileOptions, connect?: Connect): Promise<{ recoveryPlan?: { reason?: string | undefined; changes?: { path: string; before: any; after: any; }[] | undefined; hooksSha256: string; nativeConfigPath: any; nativeVersion: string; nativeInventorySha256: string; recordedNativeInventorySha256: string; boundSkillsCli: { path: string; version: string; sha256: string; manifestSha256: string; }; recoveryCli: { path: string; version: string; sha256: string; manifestSha256: string; }; releaseProof: SkillsCliReleaseProof | undefined; nativeHookAdditions?: { reviewPath: string; reviewSha256: string; reason: string; producerEvidence: string; producerBefore: { configPath: string; configSha256: string; hooksPath: string; hooksSha256: string; }; additions: any; version?: number | undefined; } | undefined; configDiscoveryRecovery?: import("./codex-hook-discovery-recovery.js").CodexHookDiscoveryRecovery | undefined; version: number; kind: string; journal: string; journalIntentSha256: string; stoppedSha256: string; originalPlanDigest: any; policyBeforeSha256: string; policyCurrentSha256: string; configBeforeSha256: string; configCurrentSha256: string; } | undefined; recoveryPlanDigest?: string | undefined; version: number; status: string; reconciled: boolean; supersededBinding: boolean; automaticRollback: boolean; journal: string; planDigest: any; nativeVersion: string; nativeStateVerified: boolean; nativeTrustPending: boolean; bindingRefreshRequired: boolean; nativeExecutionVerified: boolean; configSha256: string; hooksSha256: string; policySha256: string; policyBeforeSha256: string; policyCurrentSha256: string; previousSkillsCli: any; skillsCli: { path: string; version: string; sha256: string; manifestSha256: string; }; releaseProof: SkillsCliReleaseProof | undefined; nativeInventoryScope: string; unrelatedNativeHooksPreserved: boolean; unrelatedSettingsAndCommentsPreserved: boolean; }>; /** Deliberately separate from filesystem hook installation: native trust is an * explicit authorization of exact owned commands, never a broad trust bypass. */ export declare function enrollCodexNativeHooks(options?: CodexNativeHookTrustOptions, connect?: Connect): Promise<{ planDigest: string; skillsCli: { path: string; version: string; sha256: string; manifestSha256: string; }; nativeVersion: string; nativeConfigPath: string; ownedNativeProcessId: number | undefined; agent: string; applied: boolean; planned: { key: any; event: string; command: string; handlerType: any; timeoutSec: any; sourcePath: any; currentHash: any; enabled: any; trustStatus: any; }[]; nativeEligible: boolean; bindingRefreshRequired: boolean; transport: string; existingSessionsReloaded: boolean; nativeExecutionVerified: boolean; }>; export {};