export type InstallCodexHookResult = {
    hooksPath: string;
    backupPath?: string;
    command: string;
    featureFlag: CodexFeatureFlagStatus;
};
export type CodexFeatureFlagStatus = {
    /** Absolute path we looked at (`~/.codex/config.toml` by default). */
    configPath: string;
    /** Whether the config file exists on disk. */
    configExists: boolean;
    /** Whether a `codex_hooks` key was found anywhere in `[features]`. */
    keyPresent: boolean;
    /** Parsed value when present, otherwise null. */
    value: boolean | null;
    /** Convenience: keyPresent && value === true. */
    enabled: boolean;
    /**
     * One-line remediation the user can copy-paste. Empty when enabled.
     * Currently a `codex exec --enable codex_hooks` hint rather than
     * editing config.toml automatically (tokenjuice avoids silent
     * config rewrites).
     */
    fixHint: string;
};
export type CodexHookCommandOptions = {
    local?: boolean;
    binaryPath?: string;
    nodePath?: string;
    /**
     * Override for the config.toml consulted when reporting the
     * `codex_hooks` feature-flag state. Defaults to `~/.codex/config.toml`.
     * Exposed primarily for tests and tooling that manage a non-default
     * Codex home.
     */
    featureFlagConfigPath?: string;
};
export type CodexDoctorReport = {
    hooksPath: string;
    status: "ok" | "warn" | "broken" | "disabled";
    issues: string[];
    fixCommand: string;
    expectedCommand: string;
    detectedCommand?: string;
    checkedPaths: string[];
    missingPaths: string[];
    featureFlag: CodexFeatureFlagStatus;
};
export type UninstallCodexHookResult = {
    hooksPath: string;
    backupPath?: string;
    removed: number;
};
/**
 * Read-only scan of ~/.codex/config.toml for `codex_hooks = <bool>` under
 * a `[features]` section (top-level or dotted form). Does NOT edit the
 * file — tokenjuice prefers to surface the state and let the user decide.
 *
 * Returns `keyPresent: false` if the file is missing, unreadable, or the
 * key is not declared. Stray comments and inline `# ...` are tolerated.
 */
export declare function inspectCodexHooksFeatureFlag(configPath?: string): Promise<CodexFeatureFlagStatus>;
/**
 * Minimal TOML-ish scanner. Looks for `codex_hooks = <bool>` either under
 * a `[features]` header or as a dotted `features.codex_hooks = <bool>`
 * assignment at any indent. Ignores comments and in-line comments.
 * Not a full TOML parser; only the shapes Codex itself documents.
 */
export declare function parseCodexFeatureFlag(source: string, key: string): {
    keyPresent: boolean;
    value: boolean | null;
};
export declare function installCodexHook(hooksPath?: string, options?: CodexHookCommandOptions): Promise<InstallCodexHookResult>;
export declare function uninstallCodexHook(hooksPath?: string): Promise<UninstallCodexHookResult>;
export declare function doctorCodexHook(hooksPath?: string, options?: CodexHookCommandOptions): Promise<CodexDoctorReport>;
export declare function runCodexPostToolUseHook(rawText: string): Promise<number>;
