import type { Database } from "bun:sqlite";
import { type Checkpoint } from "../db/checkpoints.js";
export type ApprovalGateStatus = "pending" | "approved" | "rejected" | "expired";
export interface ApprovalGate {
    id: string;
    task_id: string;
    gate: string;
    status: ApprovalGateStatus;
    reviewer: string | null;
    requester: string | null;
    reason: string | null;
    note: string | null;
    plan_id: string | null;
    run_id: string | null;
    expires_at: string | null;
    decided_by: string | null;
    decided_at: string | null;
    created_at: string;
    updated_at: string;
    checkpoint: Checkpoint;
}
export interface RequestApprovalGateInput {
    task_id: string;
    gate: string;
    requester?: string;
    reviewer?: string;
    reason?: string;
    plan_id?: string;
    run_id?: string;
    expires_at?: string;
    metadata?: Record<string, unknown>;
}
export interface DecideApprovalGateInput {
    task_id: string;
    gate: string;
    reviewer?: string;
    note?: string;
    reason?: string;
}
export interface CheckApprovalGateResult {
    allowed: boolean;
    gate: ApprovalGate | null;
    reasons: string[];
}
export declare function requestApprovalGate(input: RequestApprovalGateInput, db?: Database): ApprovalGate;
export declare function approveApprovalGate(input: DecideApprovalGateInput, db?: Database): ApprovalGate;
export declare function rejectApprovalGate(input: DecideApprovalGateInput, db?: Database): ApprovalGate;
export declare function expireApprovalGate(input: DecideApprovalGateInput, db?: Database): ApprovalGate;
export declare function listApprovalGates(taskId: string, db?: Database): ApprovalGate[];
export declare function checkApprovalGate(taskId: string, gateName: string, db?: Database): CheckApprovalGateResult;
export declare function assertApprovalGate(taskId: string, gateName: string, db?: Database): ApprovalGate;
//# sourceMappingURL=approval-gates.d.ts.map