/**
 * Explicit operating modes. The gate is default-on; set OWLCODA_MODES=0 to
 * disable it as an escape hatch.
 * See docs/superpowers/specs/2026-05-30-owlcoda-permission-modes-design.md.
 */
import type { RiskClass } from './protocol/task-permission-types.js';
export type OperatingMode = 'plan' | 'normal' | 'auto';
export interface OperatingModeState {
    mode: OperatingMode;
}
interface OperatingModeContainer {
    options?: {
        operatingModeState?: OperatingModeState;
    };
}
/** Default-on after cutover; explicit falsy values disable the mode surface. */
export declare function isModesEnabled(): boolean;
export declare function parseOperatingMode(raw: unknown): OperatingMode | null;
export declare function resolveInitialMode(input: {
    flagMode?: unknown;
    settingsMode?: unknown;
}): OperatingMode;
export declare function ensureOperatingModeState(target: OperatingModeContainer, initialMode?: OperatingMode): OperatingModeState;
export declare function initializeOperatingModeState(target: OperatingModeContainer, initialMode?: OperatingMode): void;
export interface ModeGateViolation {
    mode: OperatingMode;
    toolName: string;
    reason: string;
}
/**
 * Hard gate for explicit operating modes. ONLY `plan` blocks, and only
 * mutating calls. `normal`/`auto` never block here — the downstream gates
 * (provenance, write-scope, permission lifecycle) still run, so this is
 * additive, never a bypass. Pure function.
 */
export declare function evaluateModeGate(mode: OperatingMode, toolName: string, toolInput?: Record<string, unknown>): ModeGateViolation | null;
/**
 * Whether the operating mode should auto-grant an interactive approval prompt.
 * Only `auto` auto-approves, and only the low-risk tiers above. Pure: the four
 * upstream hard gates (mode / intent / provenance-deny / write-scope) have all
 * already run when this is consulted, so `auto` can never bypass deny,
 * provenance, write-scope, or headless policy — it only removes the prompt.
 */
export declare function evaluateAutoApproval(mode: OperatingMode, riskClass: RiskClass): boolean;
export {};
