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(flows): point composio catalog references at integrations module
Steven Enamakel8298a20e18cc
diff --git a/crates/openhuman-core/src/flows/builder_tools/catalog_search.rs b/crates/openhuman-core/src/flows/builder_tools/catalog_search.rsindex a6d6c15505..53b368bd58 100644--- a/crates/openhuman-core/src/flows/builder_tools/catalog_search.rs+++ b/crates/openhuman-core/src/flows/builder_tools/catalog_search.rs@@ -41,7 +41,7 @@ impl SearchToolCatalogTool {const MAX_CATALOG_RESULTS: usize = 40;/// Search the FULL LIVE Composio catalog (via-/// [`crate::flows::tinyflows::caps::fetch_live_toolkit_catalog`]) for+/// [`crate::integrations::composio::catalog::fetch_live_toolkit_catalog`]) for/// actions whose slug or description matches every whitespace-separated term/// in `query` (case-insensitive AND). When `toolkit` is set, only that/// toolkit is scanned — this is how the builder can search ANY named app@@ -84,13 +84,13 @@ pub(crate) struct CatalogSearchOutcome {pub note: Option<String>,}-/// Shape one live-catalog [`ToolContract`](crate::flows::tinyflows::caps::ToolContract)+/// Shape one live-catalog [`ToolContract`](crate::integrations::composio::catalog::ToolContract)/// into a search-result row. The SINGLE row-construction site shared by both/// the primary AND-match path and the per-keyword fallback path, so every row/// carries the same fields — including WS3's `runtime_gated: true` on an/// uncurated action of a toolkit that ships a curated-only allowlist.fn shape_catalog_row(- tool: &crate::flows::tinyflows::caps::ToolContract,+ tool: &crate::integrations::composio::catalog::ToolContract,toolkit: &str,toolkit_curated: bool,) -> Value {@@ -131,7 +131,7 @@ pub(crate) async fn search_catalog(toolkit_filter: Option<&str>,limit: usize,) -> CatalogSearchOutcome {- use crate::flows::tinyflows::caps::fetch_live_toolkit_catalog;+ use crate::integrations::composio::catalog::fetch_live_toolkit_catalog;// Contract crate — same item the `memory::sync::composio::providers` shim// re-exported; see `ListConnectableToolkitsTool::execute` for why (#5560).use crate::integrations::composio::contract::agent_ready_toolkits;@@ -171,7 +171,7 @@ pub(crate) async fn search_catalog(// round trip back-to-back (the per-toolkit cache only helps repeats).let fetched: Vec<(String,- Option<Vec<crate::flows::tinyflows::caps::ToolContract>>,+ Option<Vec<crate::integrations::composio::catalog::ToolContract>>,)> = futures::future::join_all(toolkits.into_iter().map(|toolkit| async move {let catalog = fetch_live_toolkit_catalog(config, &toolkit).await;(toolkit, catalog)@@ -180,7 +180,7 @@ pub(crate) async fn search_catalog(// Drop toolkits whose fetch failed (no backend session / network error) —// they contribute zero results rather than erroring the whole search.- let fetched: Vec<(String, Vec<crate::flows::tinyflows::caps::ToolContract>)> = fetched+ let fetched: Vec<(String, Vec<crate::integrations::composio::catalog::ToolContract>)> = fetched.into_iter().filter_map(|(tk, catalog)| catalog.map(|c| (tk, c))).collect();diff --git a/crates/openhuman-core/src/flows/builder_tools/tool_contract.rs b/crates/openhuman-core/src/flows/builder_tools/tool_contract.rsindex 296ffabda2..a6df8299d8 100644--- a/crates/openhuman-core/src/flows/builder_tools/tool_contract.rs+++ b/crates/openhuman-core/src/flows/builder_tools/tool_contract.rs@@ -13,7 +13,7 @@ use tinytools::{PermissionLevel, Tool, ToolResult};// get_tool_contract — read-only: the FULL live contract for one action slug// ─────────────────────────────────────────────────────────────────────────────-/// `get_tool_contract`: fetch the FULL live [`ToolContract`](crate::flows::tinyflows::caps::ToolContract)+/// `get_tool_contract`: fetch the FULL live [`ToolContract`](crate::integrations::composio::catalog::ToolContract)/// for one Composio action slug — the grounding step the builder MUST take/// before wiring a `search_tool_catalog` match's args or a downstream/// binding/`split_out.path` off it. Where `search_tool_catalog` is for@@ -110,7 +110,7 @@ impl Tool for GetToolContractTool {struct ContractWithRuntimeGate {runtime_gate: &'static str,#[serde(flatten)]- contract: crate::flows::tinyflows::caps::ToolContract,+ contract: crate::integrations::composio::catalog::ToolContract,}let payload = ContractWithRuntimeGate {runtime_gate,@@ -168,7 +168,7 @@ impl Tool for GetToolContractTool {/// "propose/read only, no composio_execute" invariant** (see this module's/// top doc): unlike `composio_execute`, this tool can ONLY ever perform a/// `Read`-scope action (gated by-/// [`crate::flows::tinyflows::caps::probe_tool_output_sample`]'s scope+/// [`crate::integrations::composio::catalog::probe_tool_output_sample`]'s scope/// check, which ignores the user's per-toolkit scope preference — a probe/// must never perform a real mutation no matter what the user has toggled/// on) against a toolkit the user has ALREADY connected. No message is sent,@@ -260,7 +260,7 @@ impl Tool for GetToolOutputSampleTool {"[flows] get_tool_output_sample: tool invoked");- match crate::flows::tinyflows::caps::probe_tool_output_sample(+ match crate::integrations::composio::catalog::probe_tool_output_sample(&self.config,&slug,call_args,diff --git a/crates/openhuman-core/src/flows/ops/tool_contract_gate.rs b/crates/openhuman-core/src/flows/ops/tool_contract_gate.rsindex a41e8f48ad..908a34c844 100644--- a/crates/openhuman-core/src/flows/ops/tool_contract_gate.rs+++ b/crates/openhuman-core/src/flows/ops/tool_contract_gate.rs@@ -12,7 +12,7 @@ use super::*;// which 404s at runtime) or omit a genuinely required arg, and// `validate_binding_resolvability` would have nothing to say about either.// [`validate_tool_contracts`] is that missing HARD gate, grounded in-// [`crate::flows::tinyflows::caps::fetch_live_toolkit_catalog`] — the+// [`crate::integrations::composio::catalog::fetch_live_toolkit_catalog`] — the// FULL LIVE Composio catalog, not the static curated subset./// Statically proves every `tool_call` node's `config.slug` is a REAL actiondiff --git a/crates/openhuman-core/src/flows/ops/wiring_warnings.rs b/crates/openhuman-core/src/flows/ops/wiring_warnings.rsindex 23528cacd4..e8cce9eeb9 100644--- a/crates/openhuman-core/src/flows/ops/wiring_warnings.rs+++ b/crates/openhuman-core/src/flows/ops/wiring_warnings.rs@@ -11,7 +11,7 @@ use super::*;/// Composio schema). Best-effort like the runtime preflight — no schema, no/// warning, never a block.pub(crate) async fn graph_wiring_warnings(config: &Config, graph: &WorkflowGraph) -> Vec<String> {- use crate::flows::tinyflows::caps::composio_required_args;+ use crate::integrations::composio::catalog::composio_required_args;use tinyagents_harness::tool::missing_required_args;let mut warnings = Vec::new();@@ -63,7 +63,7 @@ pub(crate) async fn graph_wiring_warnings(config: &Config, graph: &WorkflowGraph/// message) when the binding is missing the `data.` segment entirely — a/// Composio `tool_call`'s real runtime output always wraps its payload in/// `data` (`ComposioExecuteResponse`; see-/// [`crate::flows::tinyflows::caps::ToolContract::output_fields`]'s doc),+/// [`crate::integrations::composio::catalog::ToolContract::output_fields`]'s doc),/// so `=nodes.<id>.item.json.<field>` (no `data.`) is GUARANTEED to resolve/// `null` even when `<field>` names a real output field — that used to be/// silently accepted here (B1: the exact bug that produces a hollow run).@@ -93,7 +93,7 @@ pub(super) async fn graph_output_field_warnings(config: &Config,graph: &WorkflowGraph,) -> Vec<String> {- use crate::flows::tinyflows::caps::fetch_live_toolkit_catalog;+ use crate::integrations::composio::catalog::fetch_live_toolkit_catalog;// Reading a graph's `=`-bindings is the engine's grammar, not this host's:// both helpers were a private copy here until the gates moved upstream.use crate::integrations::composio::contract::toolkit_from_slug;@@ -238,7 +238,7 @@ pub(super) async fn graph_output_field_warnings(/// `primary_array_path` NOR an `output_schema` is known (truly nothing to/// check against).async fn graph_split_out_path_warnings(config: &Config, graph: &WorkflowGraph) -> Vec<String> {- use crate::flows::tinyflows::caps::fetch_live_toolkit_catalog;+ use crate::integrations::composio::catalog::fetch_live_toolkit_catalog;use crate::integrations::composio::contract::toolkit_from_slug;let mut warnings = Vec::new();diff --git a/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs b/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rsindex c1c10ecb17..a1c840328b 100644--- a/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs+++ b/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs@@ -288,7 +288,7 @@ async fn preflight_fails_before_dispatch_naming_the_missing_field() {// DIFFERENT required-args list under the same slug; under parallel// execution one test could overwrite the other's cache entry between// seed and assert, making both flaky.- super::super::caps::seed_live_catalog_cache(+ crate::integrations::composio::catalog::seed_live_catalog_cache("preflightfailtest",vec for the tests+/// Minimal seeded [`ToolContract`](crate::integrations::composio::catalog::ToolContract) for the tests/// below — only `required_args` matters for the preflight, so every other/// field is left at its "unknown" default.fn seeded_required_args_contract(slug: &str,toolkit: &str,required: &[&str],-) -> super::caps::ToolContract {- super::caps::ToolContract {+) -> crate::integrations::composio::catalog::ToolContract {+ crate::integrations::composio::catalog::ToolContract {slug: slug.to_string(),toolkit: toolkit.to_string(),description: None,