/**
 * Pending interactive-approval registry for EXTERNAL agents.
 *
 * When a spawned external agent (Codex/Claude/…) asks for permission (ACP session/request_permission),
 * the host handler forwards the request to the frontend and parks the ACP response here until the user
 * decides. The gateway delivers the decision via the agents.approvalResponse RPC, which resolves the
 * matching pending promise so the host handler can return the chosen optionId to the external agent.
 *
 * This is the qlogicagent-side mirror of the gateway adapter's pendingPermissionRequests map.
 */
/**
 * Park an approval until the user decides. Resolves with the chosen optionId, or null on timeout
 * (the caller then applies a safe default). Idempotent per approvalId — a duplicate replaces the old.
 */
export declare function awaitApprovalDecision(approvalId: string, timeoutMs: number): Promise<string | null>;
/** Deliver the user's decision. Returns false if no approval was pending for this id (no-op). */
export declare function resolveApprovalDecision(approvalId: string, optionId: string): boolean;
/** Cancel all pending approvals (e.g. on shutdown) — resolves them as null so awaiters unblock. */
export declare function cancelAllApprovals(): void;
export declare function pendingApprovalCount(): number;
export interface ApprovalForwardDeps {
    agentId: string;
    /** Current streaming turn identity (read fresh each call, since members are reused across turns). */
    turnContext: () => {
        sessionId?: string;
        turnId?: string;
        requestId?: string;
    } | null;
    /** Emit the forward notification to the gateway (→ turn.approval_request → UI card). */
    sendNotification?: (method: string, params: Record<string, unknown>) => void;
    timeoutMs?: number;
}
/**
 * Drive one interactive approval for an external agent: forward the ACP session/request_permission
 * to the user (agents.prompt.approval), await the decision, and return the chosen optionId. Falls
 * back to a reject option if there's no streaming turn context or the user doesn't decide in time.
 * Pure + injectable so the bidirectional loop is unit-testable without a live agent.
 */
export declare function forwardExternalApproval(params: Record<string, unknown>, deps: ApprovalForwardDeps): Promise<{
    optionId: string;
}>;
