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
feat(integrations): add composio connect tool and browser tool support
Steven Enamakel7b87c00bd124
diff --git a/crates/openhuman-core/src/integrations/composio/tools/connect.rs b/crates/openhuman-core/src/integrations/composio/tools/connect.rsindex c449568988..d85f747438 100644--- a/crates/openhuman-core/src/integrations/composio/tools/connect.rs+++ b/crates/openhuman-core/src/integrations/composio/tools/connect.rs@@ -62,6 +62,23 @@ pub(super) fn composio_connect_timeout() -> Option<std::time::Duration> {)}+/// Slack on top of the approval park bound for the connection check that+/// follows an approval.+const COMPOSIO_CONNECT_TIMEOUT_SLACK: std::time::Duration = std::time::Duration::from_secs(60);++/// The tool's own deadline for a given park bound (see+/// `ComposioConnectTool::timeout_policy`).+pub(super) fn composio_connect_tool_timeout(+ park_bound: Option<std::time::Duration>,+) -> tinytools::ToolTimeout {+ match park_bound {+ Some(bound) => tinytools::ToolTimeout::Millis(+ u64::try_from((bound + COMPOSIO_CONNECT_TIMEOUT_SLACK).as_millis()).unwrap_or(u64::MAX),+ ),+ None => tinytools::ToolTimeout::Unbounded,+ }+}+/// Pure core of [`composio_connect_timeout`], kept env-free so it is/// deterministically unit-testable. An absent/unparseable value falls back to/// [`DEFAULT_COMPOSIO_CONNECT_TIMEOUT_SECS`]; `0` yields `None` (opt out of the@@ -166,6 +183,16 @@ impl Tool for ComposioConnectTool {fn category(&self) -> ToolCategory {ToolCategory::Workflow}+ /// The call parks on the approval gate *inside* `execute` while the user+ /// completes OAuth, bounded by [`composio_connect_timeout`]. The inherited+ /// per-tool deadline (120s by default) would race that bound and cut the+ /// park before its fast-path result renders, so the budget is the park+ /// bound plus slack for the post-approval connection check — or+ /// unbounded when the operator opted out of the bound (the gate's own TTL+ /// still ends the park).+ fn timeout_policy(&self, _args: &Value) -> tinytools::ToolTimeout {+ composio_connect_tool_timeout(composio_connect_timeout())+ }// NOTE: `external_effect` deliberately stays `false`. Gating happens// *inside* `execute` via a manual `ApprovalGate` intercept so we can// (a) skip the card when the toolkit is already connected and (b) carrydiff --git a/crates/openhuman-core/src/tools/impl/browser/browser.rs b/crates/openhuman-core/src/tools/impl/browser/browser.rsindex f7e75d3e7a..573873cda5 100644--- a/crates/openhuman-core/src/tools/impl/browser/browser.rs+++ b/crates/openhuman-core/src/tools/impl/browser/browser.rs@@ -511,6 +511,14 @@ impl Tool for BrowserTool {fn parameters_schema(&self) -> Value {static_schema!(include_str!("parameters/browser.json"))}+ /// Direct consequential actions park on the approval gate *inside*+ /// `execute` (`intercept_forced`), which waits up to the gate's TTL. The+ /// inherited 120s per-tool deadline would cut that park long before the+ /// user can answer, so the browser carries its own budget: the longest+ /// park plus time for the action itself.+ fn timeout_policy(&self, _args: &Value) -> tinytools::ToolTimeout {+ tinytools::ToolTimeout::Millis(BROWSER_TOOL_TIMEOUT_MS)+ }fn external_effect_with_args(&self, args: &Value) -> bool {// Gate direct mutations before perform; task steps pause for approval.// An outer effect would gate twice without covering task-selected steps.