Skip to content

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

refactor(composio): drop redundant toolkit string conversions

Steven Enamakel6eb4ae39a043
diff --git a/crates/openhuman-core/src/flows/builder_tools/catalog_search.rs b/crates/openhuman-core/src/flows/builder_tools/catalog_search.rs
index b5990770c4..b94ba271cd 100644
--- a/crates/openhuman-core/src/flows/builder_tools/catalog_search.rs
+++ b/crates/openhuman-core/src/flows/builder_tools/catalog_search.rs
@@ -143,10 +143,7 @@ pub(crate) async fn search_catalog(
let toolkits: Vec<String> = match toolkit_filter {
Some(tk) if !tk.trim().is_empty() => vec![tk.trim().to_ascii_lowercase()],
- _ => agent_ready_toolkits()
- .into_iter()
- .map(str::to_string)
- .collect(),
+ _ => agent_ready_toolkits(),
};
// Fetch every candidate toolkit's live catalog concurrently — a bare
diff --git a/crates/openhuman-core/src/flows/builder_tools/connection_reads.rs b/crates/openhuman-core/src/flows/builder_tools/connection_reads.rs
index cbde9e358d..2db6a4ce1b 100644
--- a/crates/openhuman-core/src/flows/builder_tools/connection_reads.rs
+++ b/crates/openhuman-core/src/flows/builder_tools/connection_reads.rs
@@ -48,14 +48,8 @@ impl Tool for ListConnectableToolkitsTool {
}
async fn execute(&self, _args: Value) -> anyhow::Result<ToolResult> {
- // The contract crate, not `memory::sync::composio::providers` (#5560).
- // That host shim is `pub use tinymemory_core::sync::composio::providers::*`
- // and the engine's `providers` module in turn re-exports this function
- // verbatim from `crate::integrations::composio::contract::scopes` — so the two paths
- // name the SAME item and this is a path change with no behaviour delta.
- // Naming the contract directly is what lets the shim's caller list
- // shrink to the sites that genuinely need the engine's registry and
- // curated catalogs.
+ // The agent-ready list is the connector module's (`GetVocabulary`),
+ // read through the host's curated snapshot.
use crate::integrations::composio::contract::agent_ready_toolkits;
tracing::debug!(target: "flows", "[flows] list_connectable_toolkits: listing toolkits + connected state (read-only) via the memory contract");
let connected = ops::connected_toolkits(&self.config).await;
diff --git a/crates/openhuman-core/src/integrations/composio/ops/toolkits.rs b/crates/openhuman-core/src/integrations/composio/ops/toolkits.rs
index aae121555a..08d3e2dac2 100644
--- a/crates/openhuman-core/src/integrations/composio/ops/toolkits.rs
+++ b/crates/openhuman-core/src/integrations/composio/ops/toolkits.rs
@@ -79,10 +79,7 @@ pub async fn composio_list_capabilities(
pub async fn composio_list_agent_ready_toolkits(
) -> OpResult<Outcome<super::super::types::ComposioAgentReadyToolkitsResponse>> {
tracing::debug!("[composio] rpc list_agent_ready_toolkits");
- let toolkits: Vec<String> = agent_ready_toolkits()
- .into_iter()
- .map(|s| s.to_string())
- .collect();
+ let toolkits: Vec<String> = agent_ready_toolkits();
let count = toolkits.len();
let resp = super::super::types::ComposioAgentReadyToolkitsResponse { toolkits };
Ok(Outcome::new(