use_launcher_endpoints

Function use_launcher_endpoints 

Source
pub fn use_launcher_endpoints(
    state: &Arc<AppState>,
) -> Option<Result<BackendSpawnResult, String>>
Expand description

Phase B.1: when the launcher has already spawned srv (env var AGENTMUX_BACKEND_WS is set), populate state from the env vars the launcher passed and return Ok — no need to spawn srv ourselves.

Returns Ok(BackendSpawnResult) mirroring the shape of spawn_backend so the caller in main.rs is symmetric. Returns Err only if env vars are present but malformed; if they’re absent the caller should fall through to spawn_backend (the task dev path where the launcher isn’t in the loop).