/**
 * codexHookTrust — read/verify Codex's per-hook trust state for instar's
 * project-scoped gate hooks. P0 of the codex-full-parity spec.
 *
 * WHY: Codex 0.133 runs a hook only if its content hash matches a `trusted_hash`
 * entry in `$CODEX_HOME/config.toml [hooks.state]`. instar writes its gates to the
 * agent's PROJECT `.codex/hooks.json`; the trust entries are keyed by that file's
 * path (`<hooks.json-path>:<event>:<group>:<idx>`), so arming them only affects
 * that agent's project — the operator's personal Codex (run from another cwd) never
 * loads them (G2 verdict, spec §P0). A freshly-init'd Codex agent has these UNtrusted
 * → its safety guards are dark until armed. This module is the read/verify half
 * (idempotency + post-arm readback); the arming spawn lives in codexHookArm.
 *
 * No TOML dependency (instar deliberately avoids one — see mcpToolRegistry). The
 * `[hooks.state]` block is simple enough to parse line-based for the specific
 * project-path-keyed entries we care about.
 */
export interface CodexHookTrustEntry {
    /** The full state key: `<hooks.json-path>:<event>:<group>:<idx>`. */
    key: string;
    /** `<event>:<group>:<idx>` portion (path-stripped). */
    slot: string;
    trustedHash: string | null;
    /** Codex omits `enabled` when true; an explicit `enabled = false` disables the hook. */
    enabled: boolean;
}
/**
 * Parse the `[hooks.state]` entries from a `config.toml` body that belong to a
 * specific hooks.json path. Returns one entry per `<event>:<group>:<idx>` slot.
 *
 * Matches the on-disk shape:
 *   [hooks.state."/abs/.codex/hooks.json:stop:0:0"]
 *   trusted_hash = "sha256:..."
 *   enabled = false        # only present when disabled
 */
export declare function parseCodexHookTrust(configTomlBody: string, hooksJsonPath: string): CodexHookTrustEntry[];
/**
 * Idempotency check (F2): are ALL of the agent's project hooks trusted + enabled?
 * `expectedSlots` is the set of `<event>:<group>:<idx>` slots instar wrote into the
 * project hooks.json (derived from buildInstarCodexHookGroups). Returns the slots
 * that still need arming (untrusted) and the ones explicitly disabled (enabled=false,
 * which "trust all" does NOT clear — F3: never silently re-enable a user-disabled hook).
 */
export declare function codexHooksArmingStatus(configTomlBody: string, hooksJsonPath: string, expectedSlots: string[]): {
    untrusted: string[];
    disabled: string[];
    allArmed: boolean;
};
export declare function expectedHookSlots(hooks: Record<string, Array<{
    hooks?: unknown[];
}>>): string[];
//# sourceMappingURL=codexHookTrust.d.ts.map