//#region src/domains/run/services/ToolApprovalUiBus.d.ts
type ToolApprovalUiEvent = {
  type: 'approval-needed';
  toolCallId: string;
  toolName: string;
  input: any;
  providerMetadata?: any;
  approvalId: string;
} | {
  type: 'approval-resolved';
  toolCallId: string;
  approved: boolean;
  reason?: string;
};
type Listener = (event: ToolApprovalUiEvent) => void | Promise<void>;
/**
 * In-process event bus keyed by streamRequestId.
 *
 * Used to propagate approval UI events from delegated agents (who must not write to stream)
 * up to the user-facing request handler, which can stream tool UI parts to the client.
 */
declare class ToolApprovalUiBus {
  private listeners;
  subscribe(streamRequestId: string, listener: Listener): () => void;
  publish(streamRequestId: string, event: ToolApprovalUiEvent): Promise<void>;
}
declare const toolApprovalUiBus: ToolApprovalUiBus;
//#endregion
export { ToolApprovalUiBus, ToolApprovalUiEvent, toolApprovalUiBus };