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): trim builder tools module to test helpers
Steven Enamakele97f31f41012
diff --git a/crates/openhuman-core/src/flows/builder_tools.rs b/crates/openhuman-core/src/flows/builder_tools.rsindex 902f5c2e16..956f6d98f3 100644--- a/crates/openhuman-core/src/flows/builder_tools.rs+++ b/crates/openhuman-core/src/flows/builder_tools.rs@@ -1,49 +1,10 @@-//! The Composio-bound half of the `workflow-builder` tool belt.-//!-//! The authoring tools (`revise_workflow`, `edit_workflow`, `validate_workflow`,-//! `dry_run_workflow`, `create_workflow`, `duplicate_flow`, `save_workflow`, the-//! run controls, the flow reads, `list_agent_definitions`, the node-kind reads-//! and `suggest_workflows`) live in `tinyflows_copilot::tools` and run over the-//! ports [`super::builder_host::FlowsHost`] implements; their registration is in-//! [`super::registration`]. This module keeps the tools that are bound to the-//! live Composio catalog and the connected accounts, which only this host owns:-//!-//! | Tool | Permission | Effect |-//! | --------------------------------- | ---------- | ---------------------------------------------------------------- |-//! | [`ListConnectableToolkitsTool`] | `None` | read: which toolkits are already connected |-//! | [`ListFlowConnectionsTool`] | `None` | read: connection refs (ids/names only) |-//! | [`SearchToolCatalogTool`] | `None` | read: real Composio tool slugs (live catalog) |-//! | [`GetToolContractTool`] | `None` | read: one action's FULL live contract |-//! | [`GetToolOutputSampleTool`] | `ReadOnly` | ONE bounded real Composio call (Read-scope only, connected toolkit only) |-//!-//! The agent's full tool scope (see `agent_registry/agents/workflow_builder/-//! agent.toml`) also grants the Composio **discovery/connect** tools —-//! `composio_list_toolkits`, `composio_list_connections`, `composio_connect`-//! (defined in `composio/tools.rs`) — so the builder can link an app the-//! workflow needs before proposing. Those stay within the copilot's-//! human-in-the-loop invariant: connect is an approval-gated OAuth hand-off, and-//! `composio_execute` (running an arbitrary real action, any scope) remains-//! deliberately OUT of scope.-//!-//! **One narrow, deliberate carve-out (B12):** [`GetToolOutputSampleTool`]-//! (`get_tool_output_sample`) DOES perform a real Composio call — but only-//! ever a `Read`-scope one (hard-refused otherwise, regardless of the user's-//! per-toolkit scope preference), and only against a toolkit the user has-//! ALREADY connected. It exists because some actions' live listings publish-//! no output schema at all (verified for every GitHub action), leaving-//! `get_tool_contract` with no ground truth for a downstream `split_out.path`-//! — this makes exactly one bounded real read to observe the actual shape-//! instead. It can never send/create/update/delete anything.+//! Flow-owned test helpers for the workflow builder and mixed connection provider.-pub(crate) use crate::integrations::composio::builder_tools::search_live_catalog;-pub use crate::integrations::composio::builder_tools::{+#[cfg(test)]+use crate::integrations::composio::builder_tools::{GetToolContractTool, GetToolOutputSampleTool, ListConnectableToolkitsTool,- SearchToolCatalogTool,+ ListFlowConnectionsTool, SearchToolCatalogTool,};-pub use crate::integrations::composio::builder_tools::ListFlowConnectionsTool;--#[cfg(test)]-use super::builder_tools_connection_reads::flow_connection_to_json;#[cfg(test)]#[path = "builder_tools_support.rs"]