/**
 * T-CODEX-HOST-SHELL CHS.1 — pure projection of opensquid's hook entries
 * into codex's `~/.codex/hooks.json` (the user layer).
 *
 * Codex 0.139's hook engine is deliberately Claude Code-compatible
 * (`ClaudeHooksEngine`, codex-rs/hooks/src/registry.rs): same JSON shape,
 * same stdin payload family, same permissionDecision outputs — so the shell
 * is CONFIG, not adapter code. Two codex-specific disciplines live here:
 *
 *   1. NO SessionEnd entry EVER: codex has no SessionEnd event and its Stop
 *      is TURN-scoped ("Stop run at turn scope", developers.openai.com/codex/
 *      hooks) — wiring opensquid-hook-sessionend to Stop would clear the
 *      coding-flow FSM every turn.
 *   2. ABSOLUTE bin paths: Claude Code resolves PATH for bare names
 *      (settings-writer writes them bare); codex hook spawns carry no PATH
 *      guarantee, so `resolveHookBinDir()` is a hard deliverable here.
 *
 * Idempotency = the 0.5.378 ownership discipline: `isOpensquidHookEntry`
 * (shared predicate) + per-entry surgery — re-runs replace ours, preserve
 * foreign groups byte-intact, excise ours from mixed groups keeping foreign
 * siblings.
 *
 * Imports from: node:fs, node:path, ./settings-writer.js.
 * Imported by: src/setup/cli/codex_hooks.ts, src/setup/cli/doctor.ts.
 */
/** The five codex events we wire (NO SessionEnd — see header). */
export declare const CODEX_EVENTS: readonly ["PreToolUse", "PostToolUse", "UserPromptSubmit", "Stop", "SessionStart"];
export type CodexEvent = (typeof CODEX_EVENTS)[number];
/** One hook command entry — the markable shape (settings-writer's
 *  HookCommandEntry family); `@opensquid: true` marks ours. */
export interface CodexHookEntry {
    type: 'command';
    command: string;
    timeout?: number;
    statusMessage?: string;
    '@opensquid'?: boolean;
    [k: string]: unknown;
}
export interface CodexMatcherGroup {
    matcher?: string;
    hooks: CodexHookEntry[];
    [k: string]: unknown;
}
export interface CodexHooksFile {
    hooks?: Record<string, CodexMatcherGroup[]>;
    [k: string]: unknown;
}
/** The 0.5.378 per-entry surgery: wholly-ours group → drop; wholly-foreign →
 *  untouched; mixed → excise ours, keep foreign siblings. */
export declare function pruneOpensquidFromGroup(group: CodexMatcherGroup): CodexMatcherGroup | null;
/** The dir holding the opensquid-hook-* shims: npm/pnpm install every bin of
 *  this package into ONE dir, and process.argv[1] is the running `opensquid`
 *  shim — its dirname is that dir. Throws (fail-loud; the wizard step turns
 *  it into a cancel) when the sibling shim is missing — bare names are NOT
 *  an acceptable fallback for codex (no PATH guarantee at hook spawn). */
export declare function resolveHookBinDir(): string;
export interface ProjectCodexHooksResult {
    next: CodexHooksFile;
    added: number;
    replaced: number;
    preserved: number;
}
export declare function projectCodexHooks(input: {
    current: CodexHooksFile;
    binDir: string;
}): ProjectCodexHooksResult;
//# sourceMappingURL=codex-hooks-writer.d.ts.map