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
chore: files changed src/openhuman/integrations/composio/action_tool.rs
Steven Enamakel7110700b5184
diff --git a/src/openhuman/integrations/composio/action_tool.rs b/src/openhuman/integrations/composio/action_tool.rsindex 84adf36dff..53d7dc8e22 100644--- a/src/openhuman/integrations/composio/action_tool.rs+++ b/src/openhuman/integrations/composio/action_tool.rs@@ -29,7 +29,6 @@ use std::sync::Arc;use async_trait::async_trait;use serde_json::Value;-use super::client::create_composio_client;use super::providers::ToolScope;use super::tools::resolve_action_scope;use crate::openhuman::agent::harness::current_sandbox_mode;@@ -258,29 +257,7 @@ impl Tool for ComposioActionTool {&iana,);- // Resolve the client through the mode-aware factory on every call so a- // direct-mode toggle takes effect immediately (#1710), reusing the- // `live_config` snapshot reloaded above so the gate lookup and this- // dispatch share identical routing. The pre-baked-client variant routed- // all executions through the backend tinyhumans tenant regardless of mode.- let kind = match create_composio_client(&live_config) {- Ok(kind) => kind,- Err(e) => {- tracing::warn!(- tool = %self.action_name,- error = %e,- "[composio] per-action execute: factory failed"- );- return Ok(ToolResult::error(format!("{}: {e}", self.action_name)));- }- };-let started = std::time::Instant::now();- // Route through the centralized dispatcher (#1797) so both- // backend and direct variants share the same prepare/retry/error-- // mapping pipeline. The dispatcher applies `format_provider_error`- // to failures (transport + provider) so downstream consumers can- // parse `[composio:error:<class>] …`.// Allow the agent to override the baked-in connection_id via argslet runtime_connection_id = args.as_ref()@@ -292,12 +269,19 @@ impl Tool for ComposioActionTool {let effective_connection_id = runtime_connection_id.as_deref().or(self.connection_id.as_deref());- let res = super::execute_dispatch::execute_composio_action_kind_with_connection(- kind,- &self.action_name,- args,- &live_config.composio.entity_id,- effective_connection_id,+ // One call for both routes. The module owns the prepare/retry/error+ // -mapping pipeline that `execute_dispatch` used to hold here, so a+ // direct-mode toggle still takes effect immediately (#1710): the route+ // is reconciled from `live_config` on the way through, rather than+ // baked into a client this tool captured at construction.+ let res = super::module_client::call::<_, super::types::ComposioExecuteResponse>(+ &live_config,+ super::module_client::methods::EXECUTE,+ super::types::ComposioExecuteRequest {+ tool: self.action_name.clone(),+ arguments: args,+ connection_id: effective_connection_id.map(str::to_string),+ },).await;let elapsed_ms = started.elapsed().as_millis() as u64;@@ -340,7 +324,7 @@ impl Tool for ComposioActionTool {crate::core::events::DomainEvent::ComposioActionExecuted {tool: self.action_name.clone(),success: false,- error: Some(e.to_string()),+ error: Some(e.clone()),cost_usd: 0.0,elapsed_ms,},