Arguments handed to AssemblyAIRealtime.connectAgentSocket: the authenticated URL plus the lifecycle callbacks, so the seam owns the entire websocket dance and tests substitute it wholesale.
Invoked when the websocket closes.
Invoked on a websocket-level error (fatal — the session is unusable).
Invoked with each parsed inbound frame.
The full wss://…?token=… URL (API key for server-bridged, temp token for client-direct).
wss://…?token=…
Arguments handed to AssemblyAIRealtime.connectAgentSocket: the authenticated URL plus the lifecycle callbacks, so the seam owns the entire websocket dance and tests substitute it wholesale.