//#region src/domains/run/session/PendingToolApprovalManager.d.ts
interface PendingToolApproval {
  toolCallId: string;
  toolName: string;
  args: any;
  conversationId: string;
  subAgentId: string;
  createdAt: number;
  resolve: (result: {
    approved: boolean;
    reason?: string;
  }) => void;
  reject: (error: Error) => void;
  timeoutId: ReturnType<typeof setTimeout>;
}
/**
 * Manages pending tool approval requests during agent execution.
 * Similar to ToolSessionManager but for approval workflows.
 * Uses in-memory Map storage with automatic cleanup like OAuth PKCE store.
 */
declare class PendingToolApprovalManager {
  private static instance;
  private pendingApprovals;
  private constructor();
  static getInstance(): PendingToolApprovalManager;
  /**
   * Create a new pending approval and return a promise that resolves with approval status
   */
  waitForApproval(toolCallId: string, toolName: string, args: any, conversationId: string, subAgentId: string): Promise<{
    approved: boolean;
    reason?: string;
  }>;
  /**
   * Approve a pending tool call
   */
  approveToolCall(toolCallId: string): boolean;
  /**
   * Deny a pending tool call
   */
  denyToolCall(toolCallId: string, reason?: string): boolean;
  /**
   * Clean up expired approvals (called by interval timer)
   */
  private cleanupExpiredApprovals;
  /**
   * Get current status for monitoring
   */
  getStatus(): {
    pendingApprovals: number;
    approvals: {
      toolCallId: string;
      toolName: string;
      conversationId: string;
      subAgentId: string;
      createdAt: number;
      age: number;
    }[];
  };
}
declare const pendingToolApprovalManager: PendingToolApprovalManager;
//#endregion
export { PendingToolApproval, PendingToolApprovalManager, pendingToolApprovalManager };