/**
 * OODA HITL gate — sprint-525:quick-2.
 *
 * Blocks the OODA `act` phase until a human approves (or rejects) the
 * pending decision. In `dry-run` execution mode the gate is a no-op
 * (auto-approve) so simulation runs do not require human attention.
 *
 * Live mode persists a row in `hitl_approvals` (status=`pending`) and
 * polls every 2s until a row reaches `approved` / `rejected` or until
 * the configured timeout elapses. On timeout, the `onTimeout` policy
 * decides the verdict.
 *
 * The DbClient interface is the same minimal subset used elsewhere in
 * the SDK (compatible with pg.Pool, pg.Client, and test mocks).
 *
 * @public
 */
import type { DbClient } from "../../tracking/agent-run-tracker.js";
import type { ExecutionMode } from "./types.js";
export type HITLOnTimeoutPolicy = "reject" | "approve" | "continue-skip";
export interface HITLGateOptions {
    /** Hard wait before applying onTimeout policy. Default: 5 minutes. */
    timeoutMs?: number;
    /** Verdict on timeout. Default: "reject". */
    onTimeout?: HITLOnTimeoutPolicy;
    /** Polling interval for live mode. Default: 2000 ms. */
    pollIntervalMs?: number;
}
export interface HITLGateArgs {
    runId: string;
    agentId: string;
    decisionPayload: Record<string, unknown>;
    executionMode: ExecutionMode;
}
export interface HITLGateVerdict {
    approved: boolean;
    rationale?: string;
    resolvedBy?: string;
    timedOut: boolean;
}
/**
 * Wait for a HITL approval before allowing the agent to commit the act
 * phase. In `dry-run` mode this short-circuits to `approved=true` so
 * simulation runs are non-blocking.
 *
 * Live mode contract:
 *   1. INSERT a row in `hitl_approvals` with status='pending'
 *   2. Poll every `pollIntervalMs` (default 2s) for status change
 *   3. Resolve when status transitions to approved/rejected
 *   4. On timeout: apply onTimeout policy (default 'reject')
 *
 * The polling interval is intentionally generous (2s) to avoid DB
 * pressure under sustained workloads — UX latency is bounded by the
 * human approval round-trip anyway.
 */
export declare function waitForHITLApproval(db: DbClient, args: HITLGateArgs, options?: HITLGateOptions): Promise<HITLGateVerdict>;
//# sourceMappingURL=hitl-gate.d.ts.map