pub async fn start_server_sidecar(
config_manager: Arc<ConfigManager>,
listener: TcpListener,
launch_token: SidecarLaunchToken,
ready: Sender<SocketAddr>,
http_shutdown: Option<CancellationToken>,
) -> Result<()>Expand description
Start the supervised sidecar on a caller-provided, already-bound listener.
The readiness sender fires only after configuration, persistence, routes, and the HTTP application are initialized. The listener remains owned by the server for the entire startup path, so no other process can claim its port.
launch_token authenticates the host that launched the sidecar. Every
request must carry it, name 127.0.0.1:{port} or localhost:{port} as its
authority, and carry no Origin. Sidecar mode also binds no companion or
A2A gRPC listener, serves no operator SPA or CORS headers, keeps tool
governance mandatory, and keeps the global MCP server list empty.
ยงErrors
Returns an error when runtime initialization or serving fails, or when the supervising process drops the readiness receiver before startup completes.