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 import ordering and assertion formatting
Steven Enamakel51ea95893581
diff --git a/crates/openhuman-core/src/agent/subagent_host/mod.rs b/crates/openhuman-core/src/agent/subagent_host/mod.rsindex 176ee8448c..eaba8d6156 100644--- a/crates/openhuman-core/src/agent/subagent_host/mod.rs+++ b/crates/openhuman-core/src/agent/subagent_host/mod.rs@@ -63,11 +63,11 @@ pub(crate) use lifecycle::run_subagent_via_driver_tool;pub(crate) use lifecycle::spawn_async_via_driver_tool;#[cfg(test)]pub(crate) use lifecycle::spawn_async_via_driver_tool_with_jobs;-pub(crate) use lifecycle::{checkpoint_resume, continue_subagent_via_driver_tool};pub use lifecycle::{- continue_subagent, continue_subagent_with_parent, run_subagent, run_subagent_with_parent,- OpenHumanSubagentHost,+ OpenHumanSubagentHost, continue_subagent, continue_subagent_with_parent, run_subagent,+ run_subagent_with_parent,};+pub(crate) use lifecycle::{checkpoint_resume, continue_subagent_via_driver_tool};pub(crate) use ops::is_safe_task_id;pub use types::{SubagentCheckpointData, SubagentMode, SubagentRunError, SubagentRunOptions, SubagentRunOutcome,diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph.rsindex 0c35a2b983..4bea14d573 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph.rs@@ -43,10 +43,10 @@ mod transcript;// (`ops/mod.rs`, `ops/runner.rs`, `graph_tests.rs`'s `use super::*`) are// unaffected by the responsibility split.#[cfg(test)]+pub(super) use dispatch::AggregatedUsage;+#[cfg(test)]pub(super) use dispatch::inherited_thread_id;pub(super) use dispatch::run_subagent_via_graph;-#[cfg(test)]-pub(super) use dispatch::AggregatedUsage;// Only what `graph_tests.rs`'s `use super::*` still needs directly (the rest// of the original flat imports now live with the code that uses them, indiff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph_policy_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph_policy_tests.rsindex 3c415e4209..9f1c202f03 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph_policy_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph_policy_tests.rs@@ -40,7 +40,7 @@ impl<S: tracing::Subscriber> tracing_subscriber::Layer<S> for WarnLayer {let mut message = Message(None);event.record(&mut message);if let Some(text) = message.0 {- self.0 .0.lock().unwrap().push(text);+ self.0.0.lock().unwrap().push(text);}}}diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rs b/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rsindex e2305d40b4..47b21b7ba4 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rs@@ -6,7 +6,7 @@use crate::agent::harness::artifact_offload::OFFLOAD_WRITE_TOOL;use std::collections::HashSet;use tinyagents_harness::artifacts::{- render_artifact_offload_contract, should_render_offload_contract, ARTIFACT_OFFLOAD_HEADING,+ ARTIFACT_OFFLOAD_HEADING, render_artifact_offload_contract, should_render_offload_contract,};use tinytools::ToolSpec;diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rsindex a3e1b18474..5a17eefcec 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs@@ -24,14 +24,14 @@ use crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH;use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};use crate::inference::provider::AGENT_TURN_MAX_OUTPUT_TOKENS;use tinyagents_definition::{- validate_tier_transition, AgentTier, IterationPolicy, PromptSource,- SandboxMode as AgentSandboxMode,+ AgentTier, IterationPolicy, PromptSource, SandboxMode as AgentSandboxMode,+ validate_tier_transition,};use tinyagents_harness::artifacts::{- effective_offload_threshold, extract_artifact_paths, note_artifact_handoff,- DEFAULT_OFFLOAD_THRESHOLD_BYTES, HANDOFF_STAGE_RECORDED,+ DEFAULT_OFFLOAD_THRESHOLD_BYTES, HANDOFF_STAGE_RECORDED, effective_offload_threshold,+ extract_artifact_paths, note_artifact_handoff,};-use tinyagents_harness::context::{current_run_depth, with_run_depth, RunConfig, RunDepth};+use tinyagents_harness::context::{RunConfig, RunDepth, current_run_depth, with_run_depth};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 2ab3749010..9ba5f88040 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::{- run_subagent_via_driver_tool, spawn_async_via_driver_tool_with_jobs, SubagentRunStatus,+ SubagentRunStatus, run_subagent_via_driver_tool, spawn_async_via_driver_tool_with_jobs,};-use tinyagents_harness::context::{current_run_depth, with_run_depth, RunDepth};+use tinyagents_harness::context::{RunDepth, current_run_depth, with_run_depth};struct BlockingSubagentCloseTool {started: tokio::sync::mpsc::Sender<()>,@@ -278,19 +278,21 @@ 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/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 0e549808c7..cd43987aea 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 crate::agent::subagent_host::run_subagent;-use tinyagents_harness::context::{current_run_depth, with_run_depth, RunDepth};+use tinyagents_harness::context::{RunDepth, current_run_depth, with_run_depth};#[test]fn filter_named_scope_keeps_only_named() {@@ -146,12 +146,16 @@ async fn typed_mode_system_prompt_includes_subagent_role_contract() {.find(|m| m.role == "system").expect("system message should be present");assert!(system_msg.content.contains("## Sub-agent Role Contract"));- assert!(system_msg- .content- .contains("You are a sub-agent working for a parent OpenHuman agent"));- assert!(system_msg- .content- .contains("Keep your final response concise and synthesis-ready"));+ assert!(+ system_msg+ .content+ .contains("You are a sub-agent working for a parent OpenHuman agent")+ );+ assert!(+ system_msg+ .content+ .contains("Keep your final response concise and synthesis-ready")+ );}#[tokio::test]diff --git a/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rs b/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rsindex 7932dc3b6f..0294dacead 100644--- a/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rs@@ -10,7 +10,7 @@//! moving up with the algorithm.use crate::integrations::ConnectedIntegrationTool;-use tinyagents_harness::tool::{rank_tools_by_prompt, SelectableTool, MIN_CONFIDENT_HITS};+use tinyagents_harness::tool::{MIN_CONFIDENT_HITS, SelectableTool, rank_tools_by_prompt};fn rank_actions_by_prompt(prompt: &str,