/**
 * remote/approval — RemoteApprovalChannel: HITL routed to a remote client.
 *
 * Implements the SDK's `ApprovalChannel` port. When the agent loop needs
 * approval for a dangerous tool, this channel:
 *   1. emits a `hitl.request` SessionEvent — the remote client (phone) sees it;
 *   2. parks the request until the client calls `resolve()` (wired by a
 *      transport to e.g. `POST /remote/hitl/:id/approve`);
 *   3. on `timeoutMs` with no verdict, applies the fail-closed timeout policy.
 *
 * It emits `hitl.resolved` on every verdict so the remote client's view stays
 * consistent. This is the HITL half of remote-control — the founder wants to
 * "approve commands" from the phone.
 *
 * @public @since 2.11.0 — preste remote-control T1
 */
import type { ApprovalChannel } from "../hitl/approval-channel.js";
import type { SessionEventSink } from "./sink.js";
/** What to do when a HITL request times out with no remote verdict. */
export type RemoteTimeoutPolicy = "approve" | "reject";
export interface RemoteApprovalOptions {
    /** Sink the hitl.request / hitl.resolved events are emitted to. */
    sink: SessionEventSink;
    /** Default wait before the timeout policy fires. Default 120_000 ms. */
    timeoutMs?: number;
    /** Verdict applied on timeout. Default "reject" — fail closed. */
    onTimeout?: RemoteTimeoutPolicy;
}
/** A single resolved HITL decision — the audit record of a verdict. */
export interface RemoteHitlRecord {
    action: string;
    approved: boolean;
    by: string;
    at: string;
}
export interface RemoteApprovalChannel extends ApprovalChannel {
    /** Apply a verdict — wired by the transport to the approve/reject route. */
    resolve(id: string, approved: boolean, by: string, note?: string): boolean;
    /** Requests currently awaiting a verdict. */
    pending(): Array<{
        id: string;
        action: string;
        context: string;
    }>;
    /** Every resolved verdict — the human-oversight audit trail. */
    history(): RemoteHitlRecord[];
    /** Clear pending timers — call on session teardown. */
    dispose(): void;
}
/** Create a RemoteApprovalChannel bound to a SessionEventSink. */
export declare function createRemoteApprovalChannel(opts: RemoteApprovalOptions): RemoteApprovalChannel;
//# sourceMappingURL=approval.d.ts.map