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
style: apply rustfmt formatting across composio and tinyflows modules
Steven Enamakele0136174383b
diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tool_results_and_credentials_tests.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tool_results_and_credentials_tests.rsindex 2b525cee78..5457721056 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tool_results_and_credentials_tests.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tool_results_and_credentials_tests.rs@@ -163,7 +163,15 @@ async fn unknown_toolkit_still_rejects() {assert!(catalog_for_toolkit("flowstestkit").is_none());// No connected set at all → fail-closed reject.- assert!(!flow_tool_allowed(&crate::core::runtime::DispatchCtx::ambient(), &config, "FLOWSTESTKIT_DO_THING", None).await);+ assert!(+ !flow_tool_allowed(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ "FLOWSTESTKIT_DO_THING",+ None+ )+ .await+ );// Connected set present but does not include this toolkit → reject.assert!(!flow_tool_allowed(@@ -175,7 +183,15 @@ async fn unknown_toolkit_still_rejects() {.await);// A blank slug is always rejected.- assert!(!flow_tool_allowed(&crate::core::runtime::DispatchCtx::ambient(), &config, "", Some(&["flowstestkit".to_string()])).await);+ assert!(+ !flow_tool_allowed(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ "",+ Some(&["flowstestkit".to_string()])+ )+ .await+ );}/// A real Composio toolkit OpenHuman ships no static catalog for now PASSESdiff --git a/crates/openhuman-core/src/flows/tinyflows/caps/tools/composio.rs b/crates/openhuman-core/src/flows/tinyflows/caps/tools/composio.rsindex 12336f85cc..bf1f7bc3ec 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/tools/composio.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/tools/composio.rs@@ -172,7 +172,8 @@ impl ToolBackend for ComposioToolBackend {let (outcome, audit_id) = if tier_decision == GateDecision::Allow {(crate::security::approval::GateOutcome::Allow, None)} else {- super::super::gate_call_for_tier(ctx.approval, tier_decision, slug, &summary, redacted).await+ super::super::gate_call_for_tier(ctx.approval, tier_decision, slug, &summary, redacted)+ .await};if let crate::security::approval::GateOutcome::Deny { reason } = outcome {tracing::warn!(diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/tools/native.rs b/crates/openhuman-core/src/flows/tinyflows/caps/tools/native.rsindex 06cb06d465..e7ca8050ed 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/tools/native.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/tools/native.rs@@ -48,9 +48,14 @@ impl ToolBackend for NativeToolBackend {let tier_decision = super::super::enforce_node_tier_gate(ctx.security, class, "tool_call")?;let summary = crate::security::approval::summarize_action(tool_name, &args);let redacted = crate::security::approval::redact_args(&args);- let (outcome, audit_id) =- super::super::gate_call_for_tier(ctx.approval, tier_decision, tool_name, &summary, redacted)- .await;+ let (outcome, audit_id) = super::super::gate_call_for_tier(+ ctx.approval,+ tier_decision,+ tool_name,+ &summary,+ redacted,+ )+ .await;if let crate::security::approval::GateOutcome::Deny { reason } = outcome {return Err(EngineError::Capability(reason));}diff --git a/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs b/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rsindex c2c79a4da4..178c92eec2 100644--- a/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs+++ b/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs@@ -196,11 +196,7 @@ impl EventHandler<DomainEvent> for ComposioTriggerSubscriber {// spawned task, because `AGENT_TURN_ORIGIN` is a task-local// and does not cross `tokio::spawn`.let origin = remote_trigger_origin(&envelope);- if let Err(e) = with_origin(- origin,- apply_decision(&ctx, run, &envelope),- )- .await+ if let Err(e) = with_origin(origin, apply_decision(&ctx, run, &envelope)).await{tracing::error!(label = %envelope.display_label,diff --git a/crates/openhuman-core/src/integrations/composio/ops/scope_prefs_tests.rs b/crates/openhuman-core/src/integrations/composio/ops/scope_prefs_tests.rsindex 4a89067237..4e0a5b31d6 100644--- a/crates/openhuman-core/src/integrations/composio/ops/scope_prefs_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/ops/scope_prefs_tests.rs@@ -33,7 +33,14 @@ fn row_key_normalises_the_toolkit() {async fn save_rejects_an_empty_toolkit() {let dir = tempfile::tempdir().unwrap();let config = config_in(&dir);- assert!(save(&crate::core::runtime::DispatchCtx::ambient(), &config, " ", UserScopePref::default()).await.is_err());+ assert!(save(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ " ",+ UserScopePref::default()+ )+ .await+ .is_err());}/// A stored preference is never lost: either the module took it (the read@@ -59,7 +66,12 @@ async fn a_legacy_pref_either_reaches_the_module_or_stays_stored() {admin: true,};- let pref = load_or_default(&crate::core::runtime::DispatchCtx::ambient(), &config, "github").await;+ let pref = load_or_default(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ "github",+ )+ .await;let done = migrated().lock().unwrap().contains(&config.workspace_dir);let left: LegacyScopeFile = file_store::load(&crate::core::runtime::DispatchCtx::ambient(),diff --git a/crates/openhuman-core/src/integrations/composio/ops_direct_mode_and_error_classification_tests.rs b/crates/openhuman-core/src/integrations/composio/ops_direct_mode_and_error_classification_tests.rsindex 56d0438b51..b6c3a9d9b2 100644--- a/crates/openhuman-core/src/integrations/composio/ops_direct_mode_and_error_classification_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/ops_direct_mode_and_error_classification_tests.rs@@ -134,7 +134,13 @@ async fn composio_list_tools_in_direct_mode_does_not_fall_back_to_backend() {let _serialised = module_guard().await;let tmp = tempfile::tempdir().unwrap();let config = direct_mode_config(&tmp);- let result = composio_list_tools(&crate::core::runtime::DispatchCtx::ambient(), &config, None, None).await;+ let result = composio_list_tools(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ None,+ None,+ )+ .await;match result {Ok(outcome) => {// If the prefetch returns empty connections (test env maydiff --git a/crates/openhuman-core/src/integrations/composio/ops_no_session_and_cache_tests.rs b/crates/openhuman-core/src/integrations/composio/ops_no_session_and_cache_tests.rsindex eb00d6a6c7..6d7439ddfe 100644--- a/crates/openhuman-core/src/integrations/composio/ops_no_session_and_cache_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/ops_no_session_and_cache_tests.rs@@ -123,7 +123,14 @@ async fn composio_list_tools_errors_without_session() {let _serialised = module_guard().await;let tmp = tempfile::tempdir().unwrap();let config = test_config(&tmp);- let err = composio_list_tools(&crate::core::runtime::DispatchCtx::ambient(), &config, None, None).await.unwrap_err();+ let err = composio_list_tools(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ None,+ None,+ )+ .await+ .unwrap_err();// Same contract as `composio_list_toolkits_errors_without_session`.assert!(err.to_lowercase().contains("composio"),@@ -184,9 +191,13 @@ async fn composio_list_trigger_history_errors_when_store_not_init() {// reading history reports that rather than answering with an empty list —// "no triggers have fired" and "nothing is recording them" are different// things to tell someone debugging a trigger.- let err = composio_list_trigger_history(&crate::core::runtime::DispatchCtx::ambient(), &config, Some(10))- .await- .unwrap_err();+ let err = composio_list_trigger_history(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ Some(10),+ )+ .await+ .unwrap_err();assert!(err.contains("list_trigger_history failed"), "{err}");}diff --git a/crates/openhuman-core/src/integrations/composio/ops_profile_tools_execute_mock_tests.rs b/crates/openhuman-core/src/integrations/composio/ops_profile_tools_execute_mock_tests.rsindex e111d73dab..1307eff1cf 100644--- a/crates/openhuman-core/src/integrations/composio/ops_profile_tools_execute_mock_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/ops_profile_tools_execute_mock_tests.rs@@ -94,9 +94,14 @@ async fn composio_list_tools_via_mock_with_filter() {let base = start_mock_backend(app).await;let tmp = tempfile::tempdir().unwrap();let config = config_with_backend(&tmp, base);- let outcome = composio_list_tools(&crate::core::runtime::DispatchCtx::ambient(), &config, Some(vec!["gmail".into()]), None)- .await- .unwrap();+ let outcome = composio_list_tools(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ Some(vec!["gmail".into()]),+ None,+ )+ .await+ .unwrap();assert_eq!(outcome.value.tools.len(), 2);}@@ -122,9 +127,14 @@ async fn composio_list_tools_lets_the_module_apply_the_scope_preference_and_catalet base = start_mock_backend(app).await;let tmp = tempfile::tempdir().unwrap();let config = config_with_backend(&tmp, base);- let outcome = composio_list_tools(&crate::core::runtime::DispatchCtx::ambient(), &config, Some(vec!["gmail".into()]), None)- .await- .unwrap();+ let outcome = composio_list_tools(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ Some(vec!["gmail".into()]),+ None,+ )+ .await+ .unwrap();let names: Vec<&str> = outcome.value.tools@@ -217,10 +227,22 @@ async fn composio_list_tools_honours_a_preference_still_in_the_legacy_file() {.await.unwrap();- let outcome = composio_list_tools(&crate::core::runtime::DispatchCtx::ambient(), &config, Some(vec!["gmail".into()]), None).await;+ let outcome = composio_list_tools(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ Some(vec!["gmail".into()]),+ None,+ )+ .await;// The module's preference store is process-wide: put the default back// before asserting so a failure cannot leak `write=false` into other tests.- let restored = save_user_scope_pref(&crate::core::runtime::DispatchCtx::ambient(), &config, "gmail", Default::default()).await;+ let restored = save_user_scope_pref(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ "gmail",+ Default::default(),+ )+ .await;let outcome = outcome.unwrap();restored.unwrap();diff --git a/crates/openhuman-core/src/integrations/composio/tools/execute.rs b/crates/openhuman-core/src/integrations/composio/tools/execute.rsindex b0be7570ec..e182bfdb5f 100644--- a/crates/openhuman-core/src/integrations/composio/tools/execute.rs+++ b/crates/openhuman-core/src/integrations/composio/tools/execute.rs@@ -114,15 +114,17 @@ impl Tool for ComposioExecuteTool {context: Option<&dyn ToolRunContext>,) -> anyhow::Result<ToolResult> {let ctx = dispatch_ctx_for_tool(context);- let (config, outcome) = Box::pin(self.execute_unredacted(- &ctx,- args,- sandbox_mode_for_tool(context),- task_recency_window_for_tool(context),- crate::agent::tinyagents::host::run_context::approval_for_tool(context)- .chat- .as_ref(),- ))+ let (config, outcome) = Box::pin(+ self.execute_unredacted(+ &ctx,+ args,+ sandbox_mode_for_tool(context),+ task_recency_window_for_tool(context),+ crate::agent::tinyagents::host::run_context::approval_for_tool(context)+ .chat+ .as_ref(),+ ),+ ).await;redact_composio_outcome(&config, outcome)}diff --git a/crates/openhuman-core/src/integrations/composio/tools/list_tools.rs b/crates/openhuman-core/src/integrations/composio/tools/list_tools.rsindex 7cb0aabb8b..0cf981c4d0 100644--- a/crates/openhuman-core/src/integrations/composio/tools/list_tools.rs+++ b/crates/openhuman-core/src/integrations/composio/tools/list_tools.rs@@ -12,9 +12,7 @@ use super::redact::redact_composio_outcome;use crate::agent::tinyagents::host::run_context::dispatch_ctx_for_tool;use crate::config::Config;use crate::core::runtime::DispatchCtx;-use tinytools::{- PermissionLevel, Tool, ToolCallOptions, ToolCategory, ToolResult, ToolRunContext,-};+use tinytools::{PermissionLevel, Tool, ToolCallOptions, ToolCategory, ToolResult, ToolRunContext};use super::super::client::{resolve_composio_route, ComposioRoute};use super::super::module_client::{self as connectors};diff --git a/crates/openhuman-core/src/integrations/composio/tools/scope_gate_tests.rs b/crates/openhuman-core/src/integrations/composio/tools/scope_gate_tests.rsindex 8f2e729940..bfe33304de 100644--- a/crates/openhuman-core/src/integrations/composio/tools/scope_gate_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/tools/scope_gate_tests.rs@@ -164,7 +164,12 @@ async fn a_preference_still_in_the_legacy_file_gates_execution() {.await.unwrap();- let decision = evaluate_tool_visibility(&crate::core::runtime::DispatchCtx::ambient(), &config, "GMAIL_SEND_EMAIL").await;+ let decision = evaluate_tool_visibility(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ "GMAIL_SEND_EMAIL",+ )+ .await;let restored = crate::integrations::composio::ops::save_user_scope_pref(&crate::core::runtime::DispatchCtx::ambient(),&config,diff --git a/crates/openhuman-core/src/integrations/composio/tools_direct_mode_routing_tests.rs b/crates/openhuman-core/src/integrations/composio/tools_direct_mode_routing_tests.rsindex 518d6e411b..5faccd40b0 100644--- a/crates/openhuman-core/src/integrations/composio/tools_direct_mode_routing_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/tools_direct_mode_routing_tests.rs@@ -410,7 +410,9 @@ async fn list_tools_with_a_run_context_carrier_matches_the_bare_call() {let run = OpenHumanRunContext::new().with_core(Some(CoreContext::for_test(DomainSet::full(), None)))- .into_tinyagents(tinyagents_harness::context::RunConfig::new("list-tools-carrier"));+ .into_tinyagents(tinyagents_harness::context::RunConfig::new(+ "list-tools-carrier",+ ));let carrier = tinyagents_harness::tool::ToolExecutionContext::from_run_context(&run,tinyagents_harness::ids::CallId::new("list-tools-carrier-call"),diff --git a/crates/openhuman-core/src/integrations/composio/trigger_history.rs b/crates/openhuman-core/src/integrations/composio/trigger_history.rsindex ce8957bfde..0080d37368 100644--- a/crates/openhuman-core/src/integrations/composio/trigger_history.rs+++ b/crates/openhuman-core/src/integrations/composio/trigger_history.rs@@ -161,11 +161,10 @@ impl TriggerHistory {/// Release the module resource while retaining all persisted documents.pub async fn close(&self) -> Result<(), String> {let lease = Arc::clone(&self.lease);- crate::core::runtime::DispatchCtx::ambient().spawn(async move {- Self::release(&mut *lease.lock_owned().await).await- })- .await- .map_err(|_| "trigger archive release task failed".to_owned())?+ crate::core::runtime::DispatchCtx::ambient()+ .spawn(async move { Self::release(&mut *lease.lock_owned().await).await })+ .await+ .map_err(|_| "trigger archive release task failed".to_owned())?}}diff --git a/crates/openhuman-core/src/integrations/composio/trigger_history_tests.rs b/crates/openhuman-core/src/integrations/composio/trigger_history_tests.rsindex b12fc0e585..419651b706 100644--- a/crates/openhuman-core/src/integrations/composio/trigger_history_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/trigger_history_tests.rs@@ -13,7 +13,11 @@ async fn disabled_archive_operations_leave_the_host_filesystem_untouched() {fixture: None,};assert!(owner- .read(&crate::core::runtime::DispatchCtx::ambient(), &config, Some(10))+ .read(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ Some(10)+ ).await.unwrap_err().contains("module unavailable"));@@ -112,9 +116,23 @@ async fn changing_users_releases_the_old_archive_before_opening_the_next_scope());let mut config = Config::default();config.workspace_dir = PathBuf::from("first");- owner.read(&crate::core::runtime::DispatchCtx::ambient(), &config, Some(2)).await.unwrap();+ owner+ .read(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ Some(2),+ )+ .await+ .unwrap();config.workspace_dir = PathBuf::from("second");- owner.read(&crate::core::runtime::DispatchCtx::ambient(), &config, Some(2)).await.unwrap();+ owner+ .read(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ Some(2),+ )+ .await+ .unwrap();owner.close().await.unwrap();owner.close().await.unwrap();assert_eq!(@@ -144,7 +162,15 @@ async fn cancelling_a_pending_open_retains_a_handle_that_shutdown_can_release()config.workspace_dir = PathBuf::from("cancelled");let opening = tokio::spawn({let owner = owner.clone();- async move { owner.read(&crate::core::runtime::DispatchCtx::ambient(), &config, Some(1)).await }+ async move {+ owner+ .read(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ Some(1),+ )+ .await+ }});observed.open_started.notified().await;opening.abort();