The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(mcp): add disconnect_for_config to connection registry\n\nAdd a new public function that allows dropping a connection when the caller already holds a Config reference, mirroring the existing pattern used by all_connected_tools_for_config. This avoids the by-server-id form's reliance on the process default host, which stops working once a second workspace is open, ensuring that callers who connected through connect can close over the same workspace.\n\nAuto-committed-on: dragonfly\n
Steven Enamakele088686875e3
diff --git a/src/openhuman/mcp/registry/mod.rs b/src/openhuman/mcp/registry/mod.rsindex e8b7a0ba38..8ca955faa4 100644--- a/src/openhuman/mcp/registry/mod.rs+++ b/src/openhuman/mcp/registry/mod.rs@@ -201,6 +201,24 @@ pub mod connections {}}+ /// Drop a connection held in `config`'s workspace.+ ///+ /// The counterpart to [`disconnect`] for a caller that holds a `Config`,+ /// for the same reason [`all_connected_tools_for_config`] exists: the+ /// by-server-id form resolves through the process default, which stops+ /// answering once a second workspace is open. A caller that connected+ /// through [`connect`] already named a workspace and should close over the+ /// same one.+ pub async fn disconnect_for_config(config: &Config, server_id: &str) -> bool {+ match host::for_config(config) {+ Ok(service) => service.dynamic().connections().disconnect(server_id).await,+ Err(error) => {+ tracing::debug!(?error, "[mcp] no host for workspace; nothing to disconnect");+ false+ }+ }+ }+/// The most recent failure message for a server.pub async fn last_error_for(server_id: &str) -> Option<String> {host::try_service()?