Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(mcp): trim http_client re-exports to wire-contract types

Steven Enamakeldd680c7518d6
diff --git a/crates/openhuman-core/src/mcp/mod.rs b/crates/openhuman-core/src/mcp/mod.rs
index a6140fd107..975b73e998 100644
--- a/crates/openhuman-core/src/mcp/mod.rs
+++ b/crates/openhuman-core/src/mcp/mod.rs
@@ -203,49 +203,13 @@ pub mod host;
pub mod registry;
pub mod server;
-/// The Streamable HTTP transport, from the wire contract's implementation.
-///
-/// Re-exported under the path this module used to define it at. The bespoke
-/// documentation tool and the observability classifier both name these, and
-/// neither is gated — so this is not either, exactly as before the extraction.
+/// MCP wire-contract response types used by host adapters.
pub mod http_client {
- pub use tinymcp::transport::http::{McpHttpClient, McpHttpClientBuilder};
- /// The transport's error, re-exported so a caller can inspect a failure
- /// structurally rather than by its rendered text.
- ///
- /// The variant that motivates it is [`McpError::Unauthorized`], whose
- /// `resource_metadata` is what separates a server that wants OAuth from one
- /// that wants a static credential — the difference between offering a sign-in
- /// path and asking for a token. That field is deliberately absent from the
- /// message, so a caller wanting it must have the type.
- ///
- /// Note this crate's own `core::observability` classifier does **not** use
- /// it: it reads rendered text, because it classifies failures that have
- /// already crossed an RPC boundary and arrive as strings. This re-export is
- /// for an in-process consumer, which holds the real error and should not be
- /// reduced to matching on wording that upstream is free to reword.
- pub use tinymcp::Error as McpError;
- pub use tinymcp::{redact_endpoint, render_tool_result};
pub use tinymcp_bus::{
AuthorizationServerMetadata, McpAuthChallenge, McpAuthorizationContext,
McpInitializeResult, McpRemoteTool, McpServerToolResult, McpSseEvent,
ProtectedResourceMetadata,
};
-}
-
-/// The statically declared server set, from the wire contract's
-/// implementation.
-#[cfg(feature = "mcp")]
-pub mod config_servers {
- pub use tinymcp::transport::stdio::McpStdioClient;
- pub use tinymcp::{
- McpRegistrySource, McpServerDefinition, McpServerRegistry, McpTransportClient,
- };
- /// The auth shape a *definition in this registry* carries.
- ///
- /// Distinct from `config::McpAuthConfig`, which is the shape this
- /// application's own TOML declares — the two were one type before the
- /// extraction. A caller reading `McpServerDefinition::auth` needs this one,
- /// and without the re-export cannot name it at all.
- pub use tinymcp_bus::McpAuthConfig as McpDefinitionAuth;
+ #[cfg(test)]
+ pub use tinymcp::transport::http::{McpHttpClient, McpHttpClientBuilder};
}