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
refactor(network): return impl Tool from routed tool constructors
Steven Enamakel116aa68d9f6c
diff --git a/crates/openhuman-core/src/tools/impl/network/host.rs b/crates/openhuman-core/src/tools/impl/network/host.rsindex c93744f509..8bdee7e118 100644--- a/crates/openhuman-core/src/tools/impl/network/host.rs+++ b/crates/openhuman-core/src/tools/impl/network/host.rs@@ -8,8 +8,9 @@use crate::core::runtime::DispatchCtx;use std::sync::Arc;+use tinytools::Tool;#[cfg(feature = "web3")]-use tinytools::{PermissionLevel, Tool, ToolResult};+use tinytools::{PermissionLevel, ToolResult};use tinyagents_harness_tools::net::network::{AsyncHtmlExtractor, CurlTool, HttpLimits, HttpRequestTool, NetGate, WebFetchTool,};@@ -18,7 +19,7 @@ use super::gate::RoutedGate;use crate::config::HttpRequestConfig;use crate::security::approval::ApprovalChatContext;use crate::security::SecurityPolicy;-use crate::tools::per_call::{context as per_call_context, PerCallContext, PerCallTool};+use crate::tools::per_call::{context as per_call_context, PerCallTool};use {tinyjuice_bus::tools::summary_focus_property, tinyjuice_bus::tools::SUMMARY_FOCUS_ARG};/// The fallbacks for a `0` limit, from the `[http_request]` schema defaults, so@@ -108,7 +109,7 @@ pub fn routed_http_request_tool(allowed_domains: Vec<String>,max_response_size: usize,timeout_secs: u64,-) -> PerCallTool<HttpRequestTool, PerCallContext> {+) -> impl Tool {PerCallTool::new(per_call_context,move |context| {@@ -201,7 +202,7 @@ pub fn routed_curl_tool(dest_subdir: String,max_download_bytes: u64,timeout_secs: u64,-) -> PerCallTool<CurlTool, PerCallContext> {+) -> impl Tool {PerCallTool::new(per_call_context,move |context| {@@ -224,7 +225,7 @@ pub fn routed_web_fetch_tool(allowed_domains: Vec<String>,max_bytes: Option<usize>,timeout_secs: Option<u64>,-) -> PerCallTool<WebFetchTool, PerCallContext> {+) -> impl Tool {PerCallTool::new(per_call_context,move |context| {