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
chore(subagent): apply rustfmt formatting to subagent host code
Steven Enamakelc315879f110b
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent_host.rs b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent_host.rsindex 5ca7bb95e2..82f43e6c34 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent_host.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent_host.rs@@ -155,10 +155,8 @@ impl ContinueSubagentTool {serde_json::Value::String(model.clone()),);}- let detached_parent = crate::agent::subagent_host::detached_subagent_parent(- live_parent,- "async-subagent",- )?;+ let detached_parent =+ crate::agent::subagent_host::detached_subagent_parent(live_parent, "async-subagent")?;super::spawn_async_subagent::SpawnAsyncSubagentTool::new().execute_with_live_parent_context(async_args,diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_surface.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_surface.rsindex 7d2cca9354..4a7d5a761a 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_surface.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_surface.rs@@ -20,7 +20,7 @@ use crate::threads::store::{self as conversations, ConversationMessage};use async_trait::async_trait;use serde_json::json;use std::sync::Arc;-use tinyagents_harness::context::{RunConfig, RunContext};+use tinyagents_harness::context::RunContext;use tinyagents_harness::tool::{ToolDispatch, ToolExecutionContext};use tinyagents_session::transcript::TranscriptMessage;use tinytools::ToolRunContext;@@ -61,10 +61,8 @@ impl ToolDispatch<(), crate::agent::tinyagents::host::OpenHumanRunContext>parent: &RunContext<crate::agent::tinyagents::host::OpenHumanRunContext>,) -> anyhow::Result<ToolResult> {let context = ToolExecutionContext::from_run_context(parent, _call_id.clone());- let detached_parent = crate::agent::subagent_host::detached_subagent_parent(- parent,- "async-subagent",- )?;+ let detached_parent =+ crate::agent::subagent_host::detached_subagent_parent(parent, "async-subagent")?;SpawnAsyncSubagentTool::new().execute_with_live_parent_context(arguments,@@ -324,10 +322,8 @@ impl SpawnAsyncSubagentTool {parent: crate::agent::harness::ParentExecutionContext,) -> anyhow::Result<ToolResult> {let live_parent = super::live_parent_run_context("direct-async-subagent", parent);- let detached_parent = crate::agent::subagent_host::detached_subagent_parent(- &live_parent,- "async-subagent",- )?;+ let detached_parent =+ crate::agent::subagent_host::detached_subagent_parent(&live_parent, "async-subagent")?;self.execute_with_context_inner(args,options,diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rsindex e54a1a214a..1b0a1175ac 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_host_impl.rs@@ -126,18 +126,18 @@ impl SpawnSubagentTool {if prompt.is_empty() {return Ok(ToolResult::error("spawn_subagent: `prompt` is required"));}- let registry = match AgentDefinitionRegistry::for_core_context(- run_context.dispatch_ctx().into_core(),- ) {- Some(reg) => reg,- None => {- return Ok(ToolResult::error(- "spawn_subagent: AgentDefinitionRegistry has not been initialised. \+ let registry =+ match AgentDefinitionRegistry::for_core_context(run_context.dispatch_ctx().into_core())+ {+ Some(reg) => reg,+ None => {+ return Ok(ToolResult::error(+ "spawn_subagent: AgentDefinitionRegistry has not been initialised. \This usually means the core process started without calling \AgentDefinitionRegistry::init_global at startup.",- ));- }- };+ ));+ }+ };let definition = match registry.get(agent_id.as_str()) {Some(def) => def,@@ -319,14 +319,10 @@ impl SpawnSubagentTool {message_run_queue: None,};- let run = run_subagent_via_driver_tool(- live_parent,- definition.clone(),- prompt.clone(),- options,- )- .await- .map(|(outcome, _job_id)| outcome);+ let run =+ run_subagent_via_driver_tool(live_parent, definition.clone(), prompt.clone(), options)+ .await+ .map(|(outcome, _job_id)| outcome);match run {Ok(outcome) => {let emit_lifecycle_effects = outcome.should_emit_lifecycle_effects();diff --git a/crates/openhuman-core/src/agent/orchestration/tools/subagent_dispatch_host.rs b/crates/openhuman-core/src/agent/orchestration/tools/subagent_dispatch_host.rsindex faadca0616..87479d06ee 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/subagent_dispatch_host.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/subagent_dispatch_host.rs@@ -7,7 +7,7 @@ use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::progress::AgentProgress;use async_trait::async_trait;use std::sync::Arc;-use tinyagents_harness::context::{RunConfig, RunContext};+use tinyagents_harness::context::RunContext;use tinyagents_harness::tool::{ToolDispatch, ToolExecutionContext};use tinytools::ToolRunContext;use tinytools::{ToolCallOptions, ToolResult};@@ -297,11 +297,10 @@ pub(crate) async fn dispatch_subagent_with_live_parent(// agent-turn futures) overflows the test-thread stack on deep// parallel-delegation flows.return Box::pin(async move {- let detached_parent =- crate::agent::subagent_host::detached_subagent_parent(- live_parent,- "async-subagent",- )?;+ let detached_parent = crate::agent::subagent_host::detached_subagent_parent(+ live_parent,+ "async-subagent",+ )?;super::spawn_async_subagent::SpawnAsyncSubagentTool::new().execute_with_live_parent_context(async_args,diff --git a/crates/openhuman-core/src/agent/subagent_host/mod.rs b/crates/openhuman-core/src/agent/subagent_host/mod.rsindex ec21ccb3e1..176ee8448c 100644--- a/crates/openhuman-core/src/agent/subagent_host/mod.rs+++ b/crates/openhuman-core/src/agent/subagent_host/mod.rs@@ -56,8 +56,8 @@ mod persisted_compat_tests;// Public API — the entry point and the shapes it returns.pub use autonomous::{definition_iter_cap, subagent_iter_cap_with_autonomous_lift};-pub(crate) use lifecycle::load_subagent_checkpoint;pub(crate) use lifecycle::detached_subagent_parent;+pub(crate) use lifecycle::load_subagent_checkpoint;pub(crate) use lifecycle::run_configured_delegate_via_driver_tool;pub(crate) use lifecycle::run_subagent_via_driver_tool;pub(crate) use lifecycle::spawn_async_via_driver_tool;diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rsindex 9ba5f88040..2ab3749010 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs@@ -1,9 +1,9 @@use super::*;use crate::agent::subagent_host::run_subagent;use crate::agent::subagent_host::{- SubagentRunStatus, run_subagent_via_driver_tool, spawn_async_via_driver_tool_with_jobs,+ run_subagent_via_driver_tool, spawn_async_via_driver_tool_with_jobs, SubagentRunStatus,};-use tinyagents_harness::context::{RunDepth, current_run_depth, with_run_depth};+use tinyagents_harness::context::{current_run_depth, with_run_depth, RunDepth};struct BlockingSubagentCloseTool {started: tokio::sync::mpsc::Sender<()>,@@ -278,21 +278,19 @@ async fn closing_a_durable_driver_session_cancels_only_its_registered_child() {assert_eq!(steered_payload["job_id"].as_str(), Some(job_id.as_str()));assert_eq!(steered_payload["status"], "message_queued");- assert!(- port.close("close-driver-session")- .await- .expect("Tiny close adapter cancels then closes the durable row")- );+ assert!(port+ .close("close-driver-session")+ .await+ .expect("Tiny close adapter cancels then closes the durable row"));assert_eq!(jobs.get(job_id.as_str()).unwrap().status,SubAgentJobStatus::Running,"the job remains visible while cooperative cancellation unwinds");- assert!(- port.close("close-driver-session")- .await- .expect("repeated close is idempotent without re-cancelling")- );+ assert!(port+ .close("close-driver-session")+ .await+ .expect("repeated close is idempotent without re-cancelling"));assert!(!parent_cancellation.is_cancelled(), "parent stays live");let tiny_store: std::sync::Arc<dyn TinySessionStore> = std::sync::Arc::new(port.clone());diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rsindex 168b653b10..74e96da943 100644--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs@@ -247,7 +247,10 @@ async fn live_close_alias_enforces_parent_thread_ownership() {last_used_at: "2026-01-01T00:00:00Z".into(),};sessions- .save(&[row("owned-session", "voice-thread"), row("foreign-session", "other-thread")])+ .save(&[+ row("owned-session", "voice-thread"),+ row("foreign-session", "other-thread"),+ ]).expect("seed scoped rows");let tools: SharedToolSet = Arc::new(vec![Box::new(