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
fix(composio): correct construction tool parameter types
Steven Enamakelacfa5c06801c
diff --git a/crates/openhuman-core/src/integrations/composio/tools/direct/construction.rs b/crates/openhuman-core/src/integrations/composio/tools/direct/construction.rsindex 2ec52c69e2..ec2c234244 100644--- a/crates/openhuman-core/src/integrations/composio/tools/direct/construction.rs+++ b/crates/openhuman-core/src/integrations/composio/tools/direct/construction.rs@@ -1,12 +1,8 @@//! Constructors and the small per-request setup helpers (`client`,-//! `ensure_request_url`) that every other `ComposioTool` impl block relies on.+//! `ensure_request_url`) that every other `DirectComposioClient` impl block relies on.-use super::types::{- ensure_https, is_loopback_http_url, ComposioTool, COMPOSIO_API_BASE_V2, COMPOSIO_API_BASE_V3,-};-use crate::security::SecurityPolicy;+use super::types::{ensure_https, is_loopback_http_url, DirectComposioClient, COMPOSIO_API_BASE_V3};use reqwest::Client;-use std::sync::Arc;use super::types::is_loopback_http_base;@@ -19,18 +15,15 @@ pub(super) fn normalize_entity_id(entity_id: &str) -> String {}}-impl ComposioTool {+impl DirectComposioClient {pub fn new(api_key: &str,default_entity_id: Option<&str>,- security: Arc<SecurityPolicy>,) -> Self {// Production always pins the real HTTPS endpoints.Self::new_internal(api_key,default_entity_id,- security,- COMPOSIO_API_BASE_V2.to_string(),COMPOSIO_API_BASE_V3.to_string(),false,)@@ -47,7 +40,6 @@ impl ComposioTool {pub fn new_with_base_urls_for_loopback(api_key: &str,default_entity_id: Option<&str>,- security: Arc<SecurityPolicy>,base_v2: String,base_v3: String,) -> anyhow::Result<Self> {@@ -59,7 +51,6 @@ impl ComposioTool {Ok(Self::new_internal(api_key,default_entity_id,- security,base_v2,base_v3,true,@@ -71,7 +62,6 @@ impl ComposioTool {pub fn new_with_base_urls(api_key: &str,default_entity_id: Option<&str>,- security: Arc<SecurityPolicy>,base_v2: String,base_v3: String,) -> anyhow::Result<Self> {@@ -86,7 +76,6 @@ impl ComposioTool {Ok(Self::new_internal(api_key,default_entity_id,- security,base_v2,base_v3,allow_loopback,@@ -106,13 +95,11 @@ impl ComposioTool {pub(crate) fn new_with_v3_base(api_key: &str,default_entity_id: Option<&str>,- security: Arc<SecurityPolicy>,base_v3: String,) -> Self {Self::new_internal(api_key,default_entity_id,- security,COMPOSIO_API_BASE_V2.to_string(),base_v3,true,@@ -125,7 +112,6 @@ impl ComposioTool {fn new_internal(api_key: &str,default_entity_id: Option<&str>,- security: Arc<SecurityPolicy>,base_v2: String,base_v3: String,allow_insecure_loopback: bool,@@ -147,7 +133,6 @@ impl ComposioTool {Self {api_key: trimmed.to_string(),default_entity_id: normalize_entity_id(default_entity_id.unwrap_or("default")),- security,base_v2,base_v3,allow_insecure_loopback,diff --git a/crates/openhuman-core/src/integrations/composio/tools/direct/types.rs b/crates/openhuman-core/src/integrations/composio/tools/direct/types.rsindex e6a33e4e81..852e0b4345 100644--- a/crates/openhuman-core/src/integrations/composio/tools/direct/types.rs+++ b/crates/openhuman-core/src/integrations/composio/tools/direct/types.rs@@ -1,10 +1,6 @@-//! Core `ComposioTool` struct and the loopback/HTTPS URL-safety helpers-//! shared by every direct-mode Composio request path.+//! Core `DirectComposioClient` struct and the loopback/HTTPS URL-safety+//! helpers shared by every direct-mode Composio request path.-use crate::security::SecurityPolicy;-use std::sync::Arc;--pub(super) const COMPOSIO_API_BASE_V2: &str = "https://backend.composio.dev/api/v2";pub(super) const COMPOSIO_API_BASE_V3: &str = "https://backend.composio.dev/api/v3";pub(super) fn ensure_https(url: &str) -> anyhow::Result<()> {@@ -44,18 +40,20 @@ pub(super) fn is_loopback_http_base(url: &str) -> bool {is_loopback_http_url(&format!("{}/", url.trim_end_matches('/')))}-/// A tool that proxies actions to the Composio managed tool platform.-pub struct ComposioTool {+/// Slim host-side HTTP reader for Composio's own v3 API with the user's key.+///+/// Composio execution, the OAuth handoff and connection management all run in+/// the `tinyconnectors` module. This client only serves the two reads whose+/// request parameters the pinned module route does not carry+/// (`/connected_accounts?limit=200`, `/tools?toolkit_versions=latest`) and the+/// pre-store API-key probe.+pub struct DirectComposioClient {pub(super) api_key: String,pub(super) default_entity_id: String,- pub(super) security: Arc<SecurityPolicy>,- pub(super) base_v2: String,/// Base URL for Composio v3 endpoints (`{base}/tools`). Production- /// always uses [`COMPOSIO_API_BASE_V3`] via [`ComposioTool::new`]; the- /// `#[cfg(test)]` `new_with_v3_base` constructor lets unit tests point- /// the direct-mode `/tools` listing at a local axum mock — the same- /// base-URL injection the backend `ComposioClient` gets through- /// `IntegrationClient::new` in `client_tests.rs`.+ /// always uses [`COMPOSIO_API_BASE_V3`] via [`DirectComposioClient::new`];+ /// the `#[cfg(test)]` `new_with_v3_base` constructor lets unit tests point+ /// the direct-mode `/tools` listing at a local axum mock.pub(super) base_v3: String,pub(super) allow_insecure_loopback: bool,}