export { captureCodexSettings, hashCodexSettingsReplacement } from "./codex-settings-witness-v1.js"; import { type CodexReviewedHookSource } from "./codex-hook-mcp-dependencies.js"; import { type ClaudeSettingsWitnessBudget } from "./claude-settings-witness.js"; /** The Codex discovery fields the automatic TOML projection witnesses. A typed * `codex-settings-v2` witness binds strictly more of the same file, so it * supersedes this projection instead of coexisting with it. */ export declare const CODEX_DISCOVERY_PROJECTION_FIELDS: readonly ["plugins", "marketplaces", "skills"]; /** Typed modes whose digests bind the receipt. */ export type CodexReceiptSettingsMode = "codex-settings-v1" | "codex-settings-v2" | "codex-settings-v3" | "codex-settings-v4" | "codex-settings-v5"; /** How a current document relates to a typed V1-V5 witness's reviewed digest. * `screen-reader-receipt` is the only tolerated difference. */ export type CodexSettingsWitnessMatch = "exact" | "screen-reader-receipt"; /** True when `text` differs from the document a typed V1-V5 witness reviewed * only by the boolean screen-reader receipt, proven by reproducing `expected` * under the witness's own unchanged digest from the current document with the * receipt edited back. The text-bound projections (local MCP rows, V4 counts, * numeric spelling) run once on the current text; a receipt line holds no * numeric token. Digest values never change and nothing is recorded. Any other * TUI key, a non-boolean value and every other difference stay bound. * Fail-closed: errors return false. */ export declare function codexSettingsToleratesScreenReaderReceipt(text: string, hashMode: CodexReceiptSettingsMode, expected: string): boolean; /** Read a typed V1-V5 settings witness file once and classify it against the * reviewed digest: `exact`, `screen-reader-receipt` (the only tolerated * difference), or null (drift). */ export declare function codexSettingsWitnessMatch(path: string, hashMode: CodexReceiptSettingsMode, expected: string, budget?: ClaudeSettingsWitnessBudget): CodexSettingsWitnessMatch | null; export declare function hashCodexSettingsReplacementV2(text: string, budget?: ClaudeSettingsWitnessBudget): string; export declare function captureCodexSettingsV2(path: string, budget?: ClaudeSettingsWitnessBudget): { path: string; hashMode: "codex-settings-v2"; sha256: string; }; /** Read one preserved review preimage under the exact witness file rules, so a * caller can prove additional legacy witnesses against the same bytes. */ export declare function readCodexSettingsPreimage(path: string, budget?: ClaudeSettingsWitnessBudget): string; export declare function upgradeCodexSettingsWitness(previous: { path: string; hashMode?: "bytes" | "codex-settings-v1"; sha256: string; }, reviewedSettingsPath: string): ReturnType; /** Opt-in v3 adds service-tier, plan-mode effort and typed ordinary local MCP selections. V2 retains its * exact digest meaning. Provider/native/auth/cloud/reserved/unknown controls remain bound. */ export declare function hashCodexSettingsReplacementV3(text: string, budget?: ClaudeSettingsWitnessBudget): string; export declare function captureCodexSettingsV3(path: string, budget?: ClaudeSettingsWitnessBudget): { path: string; hashMode: "codex-settings-v3"; sha256: string; }; /** Preserve the original mode's meaning and prove its preimage before explicitly * changing the review contract. Never use v3 to verify an existing v2 digest. */ export declare function upgradeCodexSettingsWitnessV3(previous: { path: string; hashMode?: "bytes" | "codex-settings-v1" | "codex-settings-v2"; sha256: string; }, reviewedSettingsPath: string): ReturnType; /** Explicit V4 adds only schema-valid native model-availability UI counts. */ export declare function hashCodexSettingsReplacementV4(text: string, budget?: ClaudeSettingsWitnessBudget): string; export declare function captureCodexSettingsV4(path: string, budget?: ClaudeSettingsWitnessBudget): { path: string; hashMode: "codex-settings-v4"; sha256: string; }; /** Prove the original V1/V2/V3/byte digest first; a V4 hash never verifies an old pin. */ export declare function upgradeCodexSettingsWitnessV4(previous: { path: string; hashMode?: "bytes" | "codex-settings-v1" | "codex-settings-v2" | "codex-settings-v3"; sha256: string; }, reviewedSettingsPath: string): ReturnType; /** Explicit V5 adds only schema-valid root status-line string vectors. */ export declare function hashCodexSettingsReplacementV5(text: string, budget?: ClaudeSettingsWitnessBudget): string; export declare function captureCodexSettingsV5(path: string, budget?: ClaudeSettingsWitnessBudget): { path: string; hashMode: "codex-settings-v5"; sha256: string; }; /** A V5 hash never verifies an old pin: prove the preserved original under its * exact original contract before comparing old/current under V5. */ export declare function upgradeCodexSettingsWitnessV5(previous: { path: string; hashMode?: "bytes" | "codex-settings-v1" | "codex-settings-v2" | "codex-settings-v3" | "codex-settings-v4"; sha256: string; }, reviewedSettingsPath: string): ReturnType; /** Root exclusion uses the same discovery projection as V7, including every * profile and instruction/MCP control, without creating a settings witness. */ export declare function codexDiscoveryControlKeys(config: Record): string[]; /** Explicit V7 review: the narrowed discovery projection above. Earlier modes * keep their meaning; nothing selects V7 implicitly. */ export declare function hashCodexSettingsReplacementV7(text: string, budget?: ClaudeSettingsWitnessBudget): string; export declare function captureCodexSettingsV7(path: string, budget?: ClaudeSettingsWitnessBudget): { path: string; hashMode: "codex-settings-v7"; sha256: string; }; /** Prove the preserved original under its exact original contract (raw bytes or * V1-V5), then require the same V7 projection. V7 binds a subset of what each * of those modes binds, so only a difference in settings V7 ignores passes. * V6 is not eligible: it binds hook MCP dependencies V7 does not carry. */ export declare function upgradeCodexSettingsWitnessV7(previous: { path: string; hashMode?: "bytes" | "codex-settings-v1" | "codex-settings-v2" | "codex-settings-v3" | "codex-settings-v4" | "codex-settings-v5"; sha256: string; }, reviewedSettingsPath: string): ReturnType; /** Explicit V8 review: the V7 projection with a marketplace's own timestamp * free. Earlier modes keep their meaning; nothing selects V8 implicitly. */ export declare function hashCodexSettingsReplacementV8(text: string, budget?: ClaudeSettingsWitnessBudget): string; export declare function captureCodexSettingsV8(path: string, budget?: ClaudeSettingsWitnessBudget): { path: string; hashMode: "codex-settings-v8"; sha256: string; }; /** Prove the preserved original under its exact original contract (raw bytes or * V1-V7), then require the same V8 projection. V8 binds a subset of what each * of those modes binds, so only a difference in settings V8 ignores passes. * V6 is not eligible: it binds hook MCP dependencies V8 does not carry. */ export declare function upgradeCodexSettingsWitnessV8(previous: { path: string; hashMode?: "bytes" | "codex-settings-v1" | "codex-settings-v2" | "codex-settings-v3" | "codex-settings-v4" | "codex-settings-v5" | "codex-settings-v7"; sha256: string; }, reviewedSettingsPath: string): ReturnType; /** V6 keeps V5 display tolerances and binds routes referenced by the complete * independently reviewed native hook source population. No legacy migration. */ export declare function captureCodexSettingsV6(path: string, reviewedSources: readonly CodexReviewedHookSource[], budget?: ClaudeSettingsWitnessBudget, changes?: Map): { path: string; hashMode: "codex-settings-v6"; sha256: string; hookSources: CodexReviewedHookSource[]; };