async fn run_session(
token: &str,
channel_id: &str,
target_agent: &Option<String>,
connect_url: &str,
http: &Client,
outbound_rx: &mut UnboundedReceiver<OutboundMsg>,
health: &Arc<Mutex<BridgeHealth>>,
resume_session: Option<Session>,
) -> Result<Option<Session>, String>Expand description
Run a single Gateway session. Returns: Ok(Some(session)) — clean disconnect, can attempt RESUME Ok(None) — clean disconnect, session is invalid (re-IDENTIFY) Err(e) — unexpected error, will re-IDENTIFY after backoff