Skip to content

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

chore(mcp): tidy imports and pass root config to gitbooks tools

Steven Enamakel724fca0719ca
diff --git a/crates/openhuman-core/src/mcp/host.rs b/crates/openhuman-core/src/mcp/host.rs
index 5d17d75a31..306bce8e36 100644
--- a/crates/openhuman-core/src/mcp/host.rs
+++ b/crates/openhuman-core/src/mcp/host.rs
@@ -5,7 +5,6 @@
//! redirect URL from the core's actual bound port. TinyMCP owns its service,
//! stores, transports, registries, and supervisor.
-use std::path::PathBuf;
use std::sync::OnceLock;
use crate::config::Config;
diff --git a/crates/openhuman-core/src/mcp/server/tools/dispatch.rs b/crates/openhuman-core/src/mcp/server/tools/dispatch.rs
index b7b0c3dc54..31bdc3a25f 100644
--- a/crates/openhuman-core/src/mcp/server/tools/dispatch.rs
+++ b/crates/openhuman-core/src/mcp/server/tools/dispatch.rs
@@ -360,7 +360,7 @@ async fn run_subagent_tool(params: &Map<String, Value>) -> Result<Value, ToolCal
// Leave sender unset; the gate's per-channel TTL-deny still
// gates any external_effect tool the agent tries to run.
sender: None,
- reply_target: agent_id.clone(),
+ reply_target: agent_id.to_string(),
message_id: uuid::Uuid::new_v4().to_string(),
history_key: None,
};
diff --git a/crates/openhuman-core/src/mcp/server/tools/mod.rs b/crates/openhuman-core/src/mcp/server/tools/mod.rs
index c8489c47f7..5139273bf2 100644
--- a/crates/openhuman-core/src/mcp/server/tools/mod.rs
+++ b/crates/openhuman-core/src/mcp/server/tools/mod.rs
@@ -44,14 +44,12 @@ pub use types::McpToolSpec;
pub use crate::config::rpc as config_rpc;
#[cfg(all(test, feature = "mcp"))]
pub use crate::core::all;
-#[cfg(all(test, feature = "mcp"))]
-pub use params::build_rpc_params;
#[cfg(test)]
pub(crate) use params::build_rpc_params_for_test;
#[cfg(all(test, feature = "mcp"))]
pub use serde_json::{json, Value};
#[cfg(all(test, feature = "mcp"))]
-pub use types::{MEMORY_FORGET_MAX_IDS, MEMORY_MAX_LIMIT, SEARCH_MAX_RESULTS};
+pub use types::{MEMORY_FORGET_MAX_IDS, MEMORY_MAX_LIMIT};
#[cfg(all(test, feature = "mcp"))]
#[path = "../tools_tests.rs"]
diff --git a/crates/openhuman-core/src/tools/impl/network/mod.rs b/crates/openhuman-core/src/tools/impl/network/mod.rs
index 84a7cca4e6..442a128061 100644
--- a/crates/openhuman-core/src/tools/impl/network/mod.rs
+++ b/crates/openhuman-core/src/tools/impl/network/mod.rs
@@ -29,7 +29,7 @@ pub use mcp::{mcp_call_tool, McpListServersTool, McpListToolsTool};
#[cfg(feature = "mcp")]
pub use mcp_server_tools::configured_server_tools_from_presentations;
#[cfg(all(feature = "mcp", test))]
-pub use mcp_server_tools::{configured_server_tools, ConfiguredMcpServerTool};
+pub use mcp_server_tools::configured_server_tools_from_presentations;
/// Shared test helper for the network tools' local-only enforcement tests
/// (privacy epic S7, #4441). Returns a thread-scoped `LocalOnly` privacy
diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rs
index d4d5f0a6ca..2aadced35c 100644
--- a/crates/openhuman-core/src/tools/ops.rs
+++ b/crates/openhuman-core/src/tools/ops.rs
@@ -1,5 +1,5 @@
#[cfg(feature = "mcp")]
-use super::r#impl::network::{McpListServersTool, McpListToolsTool};
+use super::implementations::network::{McpListServersTool, McpListToolsTool};
use super::*;
use crate::agent::host_runtime::{NativeRuntime, RuntimeAdapter};
use crate::agent::tools::DelegateTool;
@@ -349,10 +349,12 @@ pub fn all_tools_with_runtime(
GitbooksSearchTool::new(
root_config.gitbooks.endpoint.clone(),
root_config.gitbooks.timeout_secs,
+ root_config.clone(),
),
GitbooksGetPageTool::new(
root_config.gitbooks.endpoint.clone(),
root_config.gitbooks.timeout_secs,
+ root_config.clone(),
),
) {
(Ok(search), Ok(get_page)) => {