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 and import ordering
Steven Enamakel84c7a69dedb6
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rsindex 6762c49802..cab4e78179 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs@@ -19,8 +19,6 @@ use crate::agent::harness::definition::{PromptSource, SandboxMode as AgentSandboxMode,};use crate::agent::harness::fork_context::ParentExecutionContext;-use crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH;-use tinyagents_harness::context::{current_run_depth, with_run_depth, RunConfig, RunDepth};use crate::agent::prompts::{render_subagent_system_prompt_with_format, PromptContext, SubagentRenderOptions,};@@ -31,7 +29,9 @@ use crate::agent::subagent_host::tool_prep::{use crate::agent::subagent_host::types::{SubagentMode, SubagentRunError, SubagentRunOptions, SubagentRunOutcome,};+use crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH;use crate::inference::provider::AGENT_TURN_MAX_OUTPUT_TOKENS;+use tinyagents_harness::context::{current_run_depth, with_run_depth, RunConfig, RunDepth};use tinytools::{SandboxMode as TinyagentsSandboxMode, ToolSpec, WorkspaceDescriptor};use tinytools_std::file_state::with_file_state_agent_id;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 c2264393f2..3f3f2926bf 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,6 +1,6 @@use super::*;-use tinyagents_harness::context::{current_run_depth, with_run_depth, RunDepth};use crate::agent::subagent_host::run_subagent;+use tinyagents_harness::context::{current_run_depth, with_run_depth, RunDepth};#[tokio::test]async fn runner_rejects_spawn_beyond_max_depth() {@@ -9,9 +9,13 @@ async fn runner_rejects_spawn_beyond_max_depth() {let def = make_def_named_tools(&[]);let result = with_parent_context(parent, async {- with_run_depth(RunDepth { depth: MAX_SPAWN_DEPTH, max_depth: MAX_SPAWN_DEPTH }, async {- run_subagent(&def, "x", SubagentRunOptions::default()).await- })+ with_run_depth(+ RunDepth {+ depth: MAX_SPAWN_DEPTH,+ max_depth: MAX_SPAWN_DEPTH,+ },+ async { run_subagent(&def, "x", SubagentRunOptions::default()).await },+ ).await}).await;diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rsindex 162d09350c..bd40c3376a 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rs@@ -1,6 +1,6 @@use super::*;-use tinyagents_harness::context::{current_run_depth, with_run_depth, RunDepth};use crate::agent::subagent_host::run_subagent;+use tinyagents_harness::context::{current_run_depth, with_run_depth, RunDepth};#[test]fn filter_named_scope_keeps_only_named() {@@ -580,9 +580,13 @@ async fn runner_allows_spawn_at_max_depth() {let def = make_def_named_tools(&[]);let outcome = with_parent_context(parent, async {- with_run_depth(RunDepth { depth: MAX_SPAWN_DEPTH - 1, max_depth: MAX_SPAWN_DEPTH }, async {- run_subagent(&def, "x", SubagentRunOptions::default()).await- })+ with_run_depth(+ RunDepth {+ depth: MAX_SPAWN_DEPTH - 1,+ max_depth: MAX_SPAWN_DEPTH,+ },+ async { run_subagent(&def, "x", SubagentRunOptions::default()).await },+ ).await}).awaitdiff --git a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rsindex fccb1a1022..1c574719c1 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs@@ -557,9 +557,10 @@ impl OpenHumanRunContext {) -> tinyagents_harness::context::RunContext<Self> {// Imported transport facts and explicit child context must survive entry// into the native driver, which scopes the depth recorded in RunConfig.- let depth = config.depth().max(self.spawn_depth).max(- tinyagents_harness::context::current_run_depth().map_or(0, |facts| facts.depth),- );+ let depth = config+ .depth()+ .max(self.spawn_depth)+ .max(tinyagents_harness::context::current_run_depth().map_or(0, |facts| facts.depth));self.spawn_depth = depth;config = config.with_depth(depth);if config.thread_id.is_none() {diff --git a/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs b/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rsindex ddf85b1636..644fc9a760 100644--- a/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs+++ b/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs@@ -38,7 +38,6 @@ use serde_json::{json, Value};use tinyflows::caps::MemoryProvider;use tinyflows::error::{EngineError, Result};-use tinymemory_api::wrap_untrusted_for_agent;use crate::agent::turn_origin::{self, AgentTurnOrigin, TrustedAutomationSource};use crate::config::Config;use crate::flows::{@@ -51,6 +50,7 @@ use crate::security::approval::{redact_args, summarize_action, ApprovalGate, ExecutionOutcome, GateOutcome,};use crate::security::{CommandClass, SecurityPolicy};+use tinymemory_api::wrap_untrusted_for_agent;use tinymemory_api::{Hit, LearningKind, MemoryMeta, MetaFilter, SourceKind};use super::caps::{enforce_node_tier_gate, gate_call_for_tier};diff --git a/crates/openhuman-core/src/mcp/server/subagent_depth.rs b/crates/openhuman-core/src/mcp/server/subagent_depth.rsindex 96e1bb5235..ca7c4bcc0f 100644--- a/crates/openhuman-core/src/mcp/server/subagent_depth.rs+++ b/crates/openhuman-core/src/mcp/server/subagent_depth.rs@@ -46,9 +46,13 @@ pub fn current_depth() -> usize {/// via [`current_depth`].pub async fn scope<F: Future>(depth: usize, fut: F) -> F::Output {tinyagents_harness::context::with_run_depth(- tinyagents_harness::context::RunDepth { depth, max_depth: MAX_SUBAGENT_DEPTH },+ tinyagents_harness::context::RunDepth {+ depth,+ max_depth: MAX_SUBAGENT_DEPTH,+ },fut,- ).await+ )+ .await}/// Parse the incoming depth header value. The header is external input, sodiff --git a/crates/openhuman-core/src/mcp/server/subagent_depth_tests.rs b/crates/openhuman-core/src/mcp/server/subagent_depth_tests.rsindex 10b9e7d5ca..7b6b56b1ad 100644--- a/crates/openhuman-core/src/mcp/server/subagent_depth_tests.rs+++ b/crates/openhuman-core/src/mcp/server/subagent_depth_tests.rs@@ -45,8 +45,10 @@ async fn incoming_mcp_depth_is_visible_to_the_native_harness_and_refuses_a_fourtscope(incoming, async {let facts = tinyagents_harness::context::current_run_depth().expect("MCP ingress installs native recursion facts");- let native = crate::agent::tinyagents::host::OpenHumanRunContext::new()- .into_tinyagents(tinyagents_harness::context::RunConfig::new("mcp-ingress").with_max_depth(MAX_SUBAGENT_DEPTH));+ let native = crate::agent::tinyagents::host::OpenHumanRunContext::new().into_tinyagents(+ tinyagents_harness::context::RunConfig::new("mcp-ingress")+ .with_max_depth(MAX_SUBAGENT_DEPTH),+ );assert_eq!(native.config.depth(), 3);assert_eq!(facts.depth, 3);assert_eq!(facts.max_depth, MAX_SUBAGENT_DEPTH);diff --git a/crates/openhuman-core/src/security/approval/gate_subagent_tests.rs b/crates/openhuman-core/src/security/approval/gate_subagent_tests.rsindex a2ac90d6d8..0a7a1de0a8 100644--- a/crates/openhuman-core/src/security/approval/gate_subagent_tests.rs+++ b/crates/openhuman-core/src/security/approval/gate_subagent_tests.rs@@ -179,7 +179,10 @@ async fn an_inline_subagent_park_uses_the_short_window_without_being_detached()APPROVAL_CHAT_CONTEXT.scope(chat_ctx(),tinyagents_harness::context::with_run_depth(- tinyagents_harness::context::RunDepth { depth: 1, max_depth: crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH },+ tinyagents_harness::context::RunDepth {+ depth: 1,+ max_depth: crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH,+ },g.intercept("skill_registry_install", "install", serde_json::json!({})),),),