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
refactor(subagent_host): clean up code formatting and structure
Steven Enamakelecfe8c913fb3
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rsindex d5fafb66cf..66f682b2b4 100644--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle/persistence.rs@@ -1,7 +1,6 @@use super::*;use crate::agent::subagent_host::types::SubagentCheckpointData;-pub(in crate::agent::subagent_host) struct OpenHumanPersistence {checkpoint_dir: std::path::PathBuf,dispatch: crate::core::runtime::DispatchCtx,diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph/transcript.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph/transcript.rsindex 6d142bda1a..fbca759b9f 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph/transcript.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph/transcript.rs@@ -108,11 +108,9 @@ pub(super) fn subagent_transcripts_in(/// Creates an intentionally isolated, process-lifetime transcript store for/// a detached SaaS task whose carried tenant context has already been dropped./// It never opens the installed operator/profile backend.-fn detached_memory_transcripts(- fallback_agent: &str,-) -> anyhow::Result<Arc<dyn TranscriptLocator>> {- let backend = crate::storage::block_on(crate::storage::open("memory"))- .map_err(anyhow::Error::msg)?;+fn detached_memory_transcripts(fallback_agent: &str) -> anyhow::Result<Arc<dyn TranscriptLocator>> {+ let backend =+ crate::storage::block_on(crate::storage::open("memory")).map_err(anyhow::Error::msg)?;let factory_backend = Arc::clone(&backend);let factory: tinyagents_session::port::AgentStorageFactory = Arc::new(move |agent_id| {let scope = crate::storage::scope_for_agent(agent_id);@@ -122,8 +120,8 @@ fn detached_memory_transcripts((*scope).clone(),))});- let provider = tinyagents_session::DriverSessionStores::new(factory)- .map_err(anyhow::Error::msg)?;+ let provider =+ tinyagents_session::DriverSessionStores::new(factory).map_err(anyhow::Error::msg)?;Ok(provider.try_for_agent(fallback_agent).map_err(anyhow::Error::msg)?diff --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 c7489444c2..dd25237156 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/graph_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph_tests.rsindex cbc6c6a4f1..1250160016 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph_tests.rs@@ -91,8 +91,8 @@ fn a_detached_subagent_uses_the_store_its_carried_context_selects() {run_context.core = Some(Arc::downgrade(&core));// No ambient context is in scope here, as on a bare `tokio::spawn`.assert!(CoreContext::current().is_none());- let chosen = super::transcript::subagent_transcripts_in(&run_context, workspace.path(), false)- .unwrap();+ let chosen =+ super::transcript::subagent_transcripts_in(&run_context, workspace.path(), false).unwrap();let expected = provider.for_agent(crate::storage::sessions::DEFAULT_AGENT).transcripts@@ -104,8 +104,8 @@ fn a_detached_subagent_uses_the_store_its_carried_context_selects() {fn a_saas_subagent_without_a_context_or_tree_store_is_kept_in_memory() {let workspace = tempfile::tempdir().unwrap();let unbound = crate::agent::tinyagents::host::OpenHumanRunContext::new();- let chosen = super::transcript::subagent_transcripts_in(&unbound, workspace.path(), true)- .unwrap();+ let chosen =+ super::transcript::subagent_transcripts_in(&unbound, workspace.path(), true).unwrap();let operator = crate::storage::sessions::transcripts_or_files(crate::storage::sessions::DEFAULT_AGENT,workspace.path(),