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(orchestration): reorder imports and reformat assertions
Steven Enamakel15290e0dd266
diff --git a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rsindex b7ed09ddb9..339a1c1047 100644--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs@@ -29,7 +29,7 @@use std::sync::Arc;-use anyhow::{Result, anyhow};+use anyhow::{anyhow, Result};use serde_json::json;use crate::agent::harness::ParentExecutionContext;@@ -46,8 +46,8 @@ use {};use tinyagents_orchestration::teams::{- MemberOutcome, SessionTeamLedger, TeamError, build_member_prompt, claimable_task,- deliver_pending_messages, run_member_graph, truncate_chars,+ build_member_prompt, claimable_task, deliver_pending_messages, run_member_graph,+ truncate_chars, MemberOutcome, SessionTeamLedger, TeamError,};use tinyagents_graph::GraphTracingSink;@@ -501,7 +501,7 @@ async fn record_failure_event(mod run_ledger {use std::path::Path;- use anyhow::{Result, anyhow};+ use anyhow::{anyhow, Result};use super::{AgentTeamMember, AgentTeamTask, ClaimOutcome, CompletionOutcome, RunEventAppend};diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions.rs b/crates/openhuman-core/src/agent/orchestration/background_completions.rsindex a665b9cab4..4e7f258276 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions.rs@@ -34,21 +34,21 @@ use std::sync::{Arc, Mutex, OnceLock};use std::time::Duration;use tinyagents_orchestration::subagent::{- DetachedCompletionTarget, DetachedSubagentStatus, record_detached_completion,+ record_detached_completion, DetachedCompletionTarget, DetachedSubagentStatus,};use tinyagents_tasks::{CompletionRecord, CompletionResult, CompletionRouter, CompletionState, CompletionStatus,- CompletionStore, DEFAULT_MAX_ATTEMPTS, DriverCompletionStore, InMemoryCompletionStore,- NotifyMode, TombstoneOutcome,+ CompletionStore, DriverCompletionStore, InMemoryCompletionStore, NotifyMode, TombstoneOutcome,+ DEFAULT_MAX_ATTEMPTS,};use super::completion_notice::BackgroundCompletionFormatter;-pub(crate) use super::completion_notice::{AWAITING_INPUT_LABEL, BackgroundAgentOutcome};-pub(crate) use super::completion_target::CompletionTarget;+pub(crate) use super::completion_notice::{BackgroundAgentOutcome, AWAITING_INPUT_LABEL};#[cfg(test)]pub(crate) use super::completion_target::tests::{- TestWorkspace, forget_workspace_for_test, install_store_for_test,+ forget_workspace_for_test, install_store_for_test, TestWorkspace,};+pub(crate) use super::completion_target::CompletionTarget;use super::completion_target::{awaiting_input_record_id, awaiting_input_record_prefix};pub(crate) use super::completion_target::{claim_recovery, forget_recovery};diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions/thread_index.rs b/crates/openhuman-core/src/agent/orchestration/background_completions/thread_index.rsindex bb62de5505..62916f2308 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions/thread_index.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions/thread_index.rs@@ -7,7 +7,7 @@ use std::sync::Arc;use tinyagents_tasks::CompletionRouter;-use super::{SESSION_THREADS_CAP, router_for_workspace, state};+use super::{router_for_workspace, state, SESSION_THREADS_CAP};use crate::core::runtime::DispatchCtx;/// The key of a thread or session id in `HostState`'s maps: per profile ofdiff --git a/crates/openhuman-core/src/agent/orchestration/background_completions_pause_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_completions_pause_tests.rsindex 0cebd67495..0bdab2b7d9 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions_pause_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions_pause_tests.rs@@ -162,12 +162,10 @@ fn delivered_pause_leaves_the_task_key_free_for_a_later_delivery() {.unwrap(),1);- assert!(- router- .claim_pending("thread-sequential", usize::MAX)- .unwrap()- .is_empty()- );+ assert!(router+ .claim_pending("thread-sequential", usize::MAX)+ .unwrap()+ .is_empty());}#[test]diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rsindex 045b7687dd..b6f6986a4e 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rs@@ -97,7 +97,7 @@ async fn one_profiles_stop_and_delete_never_reach_anothers_thread() {#[test]fn a_saas_cancel_reaches_only_the_callers_workspace() {- use super::running_subagents::{CallerWorkspace, caller_workspace_in};+ use super::running_subagents::{caller_workspace_in, CallerWorkspace};let ws = TestWorkspace::new();let alice = profile("u-alice", ws.path());assert!(matches!(diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_completions_tests.rsindex 961e15ef7e..a048a20fcd 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions_tests.rs@@ -56,12 +56,10 @@ fn record_is_thread_scoped_and_batches_in_completion_order() {let claimed = router.claim_pending("thread-A", usize::MAX).unwrap();assert_eq!(claimed.len(), 2, "everything ready is claimed as one batch");assert_eq!(claimed[0].result.text, "eiffel");- assert!(- router- .claim_pending("thread-A", usize::MAX)- .unwrap()- .is_empty()- );+ assert!(router+ .claim_pending("thread-A", usize::MAX)+ .unwrap()+ .is_empty());}#[test]@@ -81,12 +79,10 @@ fn headless_completion_is_dropped() {let _guard = test_guard();let ws = workspace();record(ws.path(), "sess-headless", "sub-1", "x", None);- assert!(- router_for_workspace(ws.path())- .claim_pending("", usize::MAX)- .unwrap()- .is_empty()- );+ assert!(router_for_workspace(ws.path())+ .claim_pending("", usize::MAX)+ .unwrap()+ .is_empty());assert!(recover_pending_threads(&cx(), ws.path()).is_empty());}diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery.rsindex 063a9d9c5e..282bdc1963 100644--- a/crates/openhuman-core/src/agent/orchestration/background_delivery.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery.rs@@ -56,7 +56,7 @@ use slot::DeliverySlot;use super::background_completions;use super::busy_guard::is_busy;#[cfg(test)]-use super::busy_guard::{TurnBusy, busy, clear_busy_for_thread};+use super::busy_guard::{busy, clear_busy_for_thread, TurnBusy};use super::completion_notice::build_undelivered_notice;use super::completion_owners;use super::delivery_drain::{DrainFence, RECOVERY_BUSY_POLL};diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rsindex ec2de0ddcb..d2113cb217 100644--- a/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rs@@ -5,8 +5,8 @@ use std::sync::Arc;use tinyagents_tasks::CompletionRouter;-use crate::core::runtime::DispatchCtx;use crate::core::runtime::tenant;+use crate::core::runtime::DispatchCtx;/// The per-thread (per profile) delivery slot, plus the batch lease./// Dropping it frees both: `release` on an already-settled record is a no-op,diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery_slots_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery_slots_tests.rsindex 261bbaed11..e09bc83f43 100644--- a/crates/openhuman-core/src/agent/orchestration/background_delivery_slots_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery_slots_tests.rs@@ -5,7 +5,7 @@use super::*;use crate::agent::orchestration::background_completions::{- TestWorkspace, pending_for, record_completion, router_for_workspace,+ pending_for, record_completion, router_for_workspace, TestWorkspace,};use crate::core::runtime::DispatchCtx;use crate::core::runtime::{ContextOverlay, DomainSet};diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rsindex a36f17ce61..c72e47df3c 100644--- a/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rs@@ -9,7 +9,7 @@ use std::path::Path;use std::sync::Arc;use super::background_completions::*;-use super::background_delivery::{Drain, drain_schedule_in};+use super::background_delivery::{drain_schedule_in, Drain};use crate::core::events::DomainEvent;use crate::core::runtime::{ContextOverlay, CoreContext, DomainSet};use crate::tools::toolpacks::ToolGroups;@@ -151,7 +151,7 @@ fn an_unknown_session_is_dropped_in_saas() {/// its own marks.#[tokio::test]async fn busy_marks_are_keyed_by_the_explicit_context() {- use super::busy_guard::{TurnBusy, clear_busy_for_thread, is_busy};+ use super::busy_guard::{clear_busy_for_thread, is_busy, TurnBusy};let _guard = crate::config::TEST_ENV_LOCK.lock().await;let (ws_a, ws_b) = (TestWorkspace::new(), TestWorkspace::new());let alice = DispatchCtx::new(profile(&unique("b-alice"), ws_a.path()));diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rsindex edf37dd14f..ad766f77a5 100644--- a/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rs@@ -6,7 +6,7 @@ fn cx() -> crate::core::runtime::DispatchCtx {}use crate::agent::orchestration::background_completions::{- TestWorkspace, forget_workspace_for_test, pending_for, record_completion, router_for_workspace,+ forget_workspace_for_test, pending_for, record_completion, router_for_workspace, TestWorkspace,};use std::path::Path;use std::sync::atomic::{AtomicU32, Ordering};@@ -510,12 +510,10 @@ async fn every_subagent_terminal_event_schedules_a_drain_through_the_handler() {iterations: 0,}).await;- assert!(- scheduled_for_test()- .lock()- .expect("scheduled")- .contains(&("bd-term-thread".to_string(), Duration::from_millis(300)))- );+ assert!(scheduled_for_test()+ .lock()+ .expect("scheduled")+ .contains(&("bd-term-thread".to_string(), Duration::from_millis(300))));clear_busy(session);assert_eq!(drain_schedule(&DomainEvent::SubagentFailed {@@ -680,12 +678,10 @@ async fn boot_recovery_schedules_a_delivery_for_every_thread_with_undelivered_rescheduled_for_test().lock().expect("scheduled").clear();assert_eq!(recover_on_boot(&cx(), w), 1);- assert!(- scheduled_for_test()- .lock()- .expect("scheduled")- .contains(&("thread-boot-sched".to_string(), RECOVERY_DELAY))- );+ assert!(scheduled_for_test()+ .lock()+ .expect("scheduled")+ .contains(&("thread-boot-sched".to_string(), RECOVERY_DELAY)));assert_eq!(recover_on_boot(&cx(), w),0,diff --git a/crates/openhuman-core/src/agent/orchestration/completion_target_tests.rs b/crates/openhuman-core/src/agent/orchestration/completion_target_tests.rsindex bb81a8bda4..f42594160d 100644--- a/crates/openhuman-core/src/agent/orchestration/completion_target_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/completion_target_tests.rs@@ -1,7 +1,7 @@use std::path::Path;use std::sync::Arc;-use super::super::background_completions::{Entry, new_router, state};+use super::super::background_completions::{new_router, state, Entry};use tinyagents_tasks::CompletionStore;/// A temporary workspace that forgets its router when dropped, so thediff --git a/crates/openhuman-core/src/agent/orchestration/delegation.rs b/crates/openhuman-core/src/agent/orchestration/delegation.rsindex 6792108ff5..45da5d8675 100644--- a/crates/openhuman-core/src/agent/orchestration/delegation.rs+++ b/crates/openhuman-core/src/agent/orchestration/delegation.rs@@ -12,7 +12,7 @@use std::sync::Arc;use crate::agent::subagent_host::{- SubagentRunOptions, SubagentRunStatus, run_subagent_via_driver_tool,+ run_subagent_via_driver_tool, SubagentRunOptions, SubagentRunStatus,};use crate::agent::tinyagents::host::OpenHumanRunContext;use crate::agent_registry::host_definition::AgentDefinition;diff --git a/crates/openhuman-core/src/agent/orchestration/delivery_drain_tests.rs b/crates/openhuman-core/src/agent/orchestration/delivery_drain_tests.rsindex 545fe8ceb5..215339fcd7 100644--- a/crates/openhuman-core/src/agent/orchestration/delivery_drain_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/delivery_drain_tests.rs@@ -1,12 +1,12 @@use super::*;use crate::agent::orchestration::background_completions::{- TestWorkspace, pending_for, record_completion, router_for_workspace,+ pending_for, record_completion, router_for_workspace, TestWorkspace,};use crate::agent::orchestration::busy_guard::TurnBusy;use crate::core::runtime::DispatchCtx;-use crate::storage::MemoryStorage;-use crate::storage::fence::{ScopeMatch, system_now_ms};+use crate::storage::fence::{system_now_ms, ScopeMatch};use crate::storage::lease::{DocumentLeases, LeaseStore};+use crate::storage::MemoryStorage;use std::sync::atomic::{AtomicBool, AtomicU32, Ordering};const TTL: Duration = Duration::from_secs(30);diff --git a/crates/openhuman-core/src/agent/orchestration/ops.rs b/crates/openhuman-core/src/agent/orchestration/ops.rsindex 3bae647345..4a2ddcccaf 100644--- a/crates/openhuman-core/src/agent/orchestration/ops.rs+++ b/crates/openhuman-core/src/agent/orchestration/ops.rs@@ -27,7 +27,7 @@ use super::types::{};use crate::agent::harness::fork_context::ParentExecutionContext;use crate::agent::subagent_host::{- SubagentRunError, SubagentRunOptions, SubagentRunOutcome, SubagentRunStatus, run_subagent,+ run_subagent, SubagentRunError, SubagentRunOptions, SubagentRunOutcome, SubagentRunStatus,};use crate::agent::tinyagents::host::steering::shared_steering_registry;use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};@@ -37,8 +37,8 @@ use crate::progress::AgentProgress;use std::collections::BTreeMap;use std::sync::Arc;use thiserror::Error;-use tinyagents_harness::CancellationToken;use tinyagents_harness::ids::TaskId;+use tinyagents_harness::CancellationToken;use tinyagents_tasks::{DetachedTaskRegistry, DetachedTaskRegistryError, DetachedTaskWaitOutcome,OrchestrationTaskStatus,diff --git a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/ops_tests.rsindex c15f6c0591..aa437055ce 100644--- a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/ops_tests.rs@@ -6,8 +6,8 @@ use async_trait::async_trait;use parking_lot::Mutex;use std::future::Future;use std::sync::{- Arc,atomic::{AtomicUsize, Ordering},+ Arc,};use tinyagents_tasks::OrchestrationTaskStatus;use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};@@ -241,13 +241,11 @@ async fn e2e_orchestrator_answers_coding_agent_question_and_resumes_child() {.expect("wait first child");let first_child = &first_wait.agents[0];assert_eq!(first_child.status, OrchestrationTaskStatus::Completed);- assert!(- first_child- .result_summary- .as_deref()- .unwrap_or_default()- .contains("CODE_AGENT_QUESTION")- );+ assert!(first_child+ .result_summary+ .as_deref()+ .unwrap_or_default()+ .contains("CODE_AGENT_QUESTION"));// `message_agent`/`follow_up` are gone (superseded by the durable verbs in// `command_center::control`). The orchestrator now records its answer by@@ -285,13 +283,11 @@ async fn e2e_orchestrator_answers_coding_agent_question_and_resumes_child() {Some(first.orchestration_id.as_str()));assert_eq!(final_child.status, OrchestrationTaskStatus::Completed);- assert!(- final_child- .result_summary- .as_deref()- .unwrap_or_default()- .contains("CODE_AGENT_DONE")- );+ assert!(final_child+ .result_summary+ .as_deref()+ .unwrap_or_default()+ .contains("CODE_AGENT_DONE"));let prompts = provider.prompts();assert_eq!(prompts.len(), 2);@@ -365,12 +361,10 @@ async fn e2e_orchestrator_waits_for_multiple_parallel_coding_subagents() {assert!(waited.completed);assert_eq!(waited.agents.len(), 3);- assert!(- waited- .agents- .iter()- .all(|agent| agent.status == OrchestrationTaskStatus::Completed)- );+ assert!(waited+ .agents+ .iter()+ .all(|agent| agent.status == OrchestrationTaskStatus::Completed));let outputs = waited.agents.iter()diff --git a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rsindex a63e1f24a7..004d8e2063 100644--- a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs+++ b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs@@ -28,8 +28,8 @@ use std::sync::Arc;use anyhow::{Context, Result};-use crate::agent::OpenHumanSessionHost;use crate::agent::harness::fork_context::ParentExecutionContext;+use crate::agent::OpenHumanSessionHost;use crate::config::Config;const LOG_TARGET: &str = "agent_orchestration::parent_context";diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents.rsindex a2ec8585d1..bd441aaae5 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents.rs@@ -67,14 +67,14 @@ pub(crate) use cancel::cancel_by_task;#[cfg(test)]pub(crate) use cancel::prune;#[cfg(test)]-pub(crate) use cancel::{CallerWorkspace, caller_workspace_in};+pub(crate) use cancel::{caller_workspace_in, CallerWorkspace};pub(crate) use cancel::{- CancelledSubagent, cancel_all, cancel_by_session_in_workspace,- cancel_by_task_with_workspace_reason, cancel_for_thread, stop_for_thread,+ cancel_all, cancel_by_session_in_workspace, cancel_by_task_with_workspace_reason,+ cancel_for_thread, stop_for_thread, CancelledSubagent,};pub(crate) use registry::admit_spawn;#[cfg(test)]-pub(crate) use registry::{RegistrationError, register, status_channel};+pub(crate) use registry::{register, status_channel, RegistrationError};pub(crate) use roster::active_subagents_context_block;#[cfg(test)]pub(crate) use steering::steer;diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/registry.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/registry.rsindex c0d2a4c25f..edbb8e5326 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/registry.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/registry.rs@@ -28,14 +28,14 @@ use tokio::sync::watch;use tokio::task::AbortHandle;use crate::agent::tinyagents::host::steering::shared_steering_registry;-use tinyagents_harness::CancellationToken;use tinyagents_harness::ids::TaskId;use tinyagents_harness::run_queue::RunQueue;+use tinyagents_harness::CancellationToken;use tinyagents_tasks::DetachedTaskRegistry;use super::task_ledger::{record_spawned, task_store_for_workspace};use tinyagents_orchestration::subagent::{- DetachedSubagentStatus, SubagentIdentity, WaitError, spawn_status_watcher,+ spawn_status_watcher, DetachedSubagentStatus, SubagentIdentity, WaitError,};#[derive(Clone)]@@ -138,8 +138,8 @@ const REGISTRY_SOFT_CAP: usize = 256;static REGISTRY: OnceLock<DetachedTaskRegistry<RunningSubagentMetadata, DetachedSubagentStatus>> =OnceLock::new();-pub(crate) fn registry()--> &'static DetachedTaskRegistry<RunningSubagentMetadata, DetachedSubagentStatus> {+pub(crate) fn registry(+) -> &'static DetachedTaskRegistry<RunningSubagentMetadata, DetachedSubagentStatus> {REGISTRY.get_or_init(|| {DetachedTaskRegistry::new(shared_steering_registry().clone(),diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/resolve.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/resolve.rsindex 2e368d6ed8..c40c878333 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/resolve.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/resolve.rs@@ -6,7 +6,7 @@use std::path::Path;use tinyagents_orchestration::subagent::{- SubagentResumeRef, WaitError, resolve_detached_or_durable,+ resolve_detached_or_durable, SubagentResumeRef, WaitError,};use super::registry::{admit_workspace, owner_key, registry};diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rsindex 65a69b7f4f..6d3ad37e94 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs@@ -1,7 +1,7 @@//! Read-only rosters over the sub-agent registry: the durable+live merge used to render the//! `[active_subagents]` context block.-use tinyagents_orchestration::subagent::{SubagentSnapshot, snapshot_for_owner};+use tinyagents_orchestration::subagent::{snapshot_for_owner, SubagentSnapshot};use super::registry::{admit_workspace, owner_key, registry};use crate::agent::orchestration::fleet_tools::FleetToolSet;diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rsindex 83b615775d..a696ed18d8 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs@@ -2,7 +2,7 @@use tinyagents_harness::ids::TaskId;use tinyagents_harness::run_queue::QueueLane;-use tinyagents_orchestration::subagent::{SteerAccess, SteerError, steer_detached};+use tinyagents_orchestration::subagent::{steer_detached, SteerAccess, SteerError};use super::cancel::now_ms;use super::registry::{control_admits, owner_key, registry};diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rsindex 72446611f9..ffec82d723 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs@@ -11,13 +11,13 @@ use std::path::{Path, PathBuf};use std::sync::{Arc, OnceLock};use tinyagents_orchestration::subagent::{- SpawnedSubagent, WaitError, list_subagent_records, orphaned_subagent_reason, record_agent_id,+ list_subagent_records, orphaned_subagent_reason, record_agent_id,record_cancelled as ledger_cancelled, record_parent_session, record_spawned as ledger_spawned,- subagent_record_for_task, task_status_label,+ subagent_record_for_task, task_status_label, SpawnedSubagent, WaitError,};use tinyagents_tasks::{- DriverTaskStore, InMemoryTaskStore, OrchestrationTaskFilter, OrchestrationTaskRecord,- TaskStore, TaskStoreRegistry, reconcile_orphaned_tasks,+ reconcile_orphaned_tasks, DriverTaskStore, InMemoryTaskStore, OrchestrationTaskFilter,+ OrchestrationTaskRecord, TaskStore, TaskStoreRegistry,};#[cfg(test)]diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/wait.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/wait.rsindex a2b7a6a109..02c18d849e 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/wait.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/wait.rs@@ -5,7 +5,7 @@use std::path::Path;use std::time::Duration;-use tinyagents_orchestration::subagent::{WaitError, WaitOutcome, wait_detached_or_durable};+use tinyagents_orchestration::subagent::{wait_detached_or_durable, WaitError, WaitOutcome};use super::registry::{admit_workspace, owner_key, registry};diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rsindex 2a6ca43fa8..40716203c6 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs@@ -584,11 +584,9 @@ async fn saas_controls_follow_the_explicit_context_not_the_tasks_scope() {Err(SteerError::NotOwned));assert_eq!(pair.a.queue.status().await.steers, 0);- assert!(- snapshot_for_parent(&bob, PARENT)- .iter()- .all(|worker| worker.task_id != a_task)- );+ assert!(snapshot_for_parent(&bob, PARENT)+ .iter()+ .all(|worker| worker.task_id != a_task));assert!(cancel_by_task(&alice, &b_task).is_none(),diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rsindex 443acd3940..3b3b14b550 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs@@ -21,7 +21,7 @@ use tinyagents_harness::run_queue::{QueueLane, RunQueue};use tinyagents_harness::steering::{SteeringCommand, SteeringHandle};use tinyagents_orchestration::subagent::FinishedOutcome;use tinyagents_orchestration::subagent::{- DETACHED_LEDGER_TIMEOUT_MS, DetachedSubagentStatus, WaitError, WaitOutcome,+ DetachedSubagentStatus, WaitError, WaitOutcome, DETACHED_LEDGER_TIMEOUT_MS,};use tinyagents_tasks::OrchestrationTaskStatus;use tokio::sync::watch;@@ -281,15 +281,13 @@ async fn snapshot_and_block_scope_to_parent_and_reflect_live_status() {assert!(block.ends_with("[/active_subagents]\n\n"));// A parent with no registered workers gets no block (no perturbation).- assert!(- active_subagents_context_block(- &cx(),- "nobody-here",- &test_workspace(),- &FleetToolSet::all()- )- .is_none()- );+ assert!(active_subagents_context_block(+ &cx(),+ "nobody-here",+ &test_workspace(),+ &FleetToolSet::all()+ )+ .is_none());// The shipped orchestrator has no wait/steer/close tools (#5701): the// guidance must not name them and must say results arrive on their own.@@ -371,15 +369,13 @@ async fn snapshot_and_block_scope_to_parent_and_reflect_live_status() {assert!(block.contains("status=idle"));assert!(block.contains("about: Daily X trending email workflow"));// Other parents' durable sessions must not leak in.- assert!(- active_subagents_context_block(- &cx(),- "unrelated-parent",- durable_ws.path(),- &FleetToolSet::all()- )- .is_none()- );+ assert!(active_subagents_context_block(+ &cx(),+ "unrelated-parent",+ durable_ws.path(),+ &FleetToolSet::all()+ )+ .is_none());}let _ = tx_a.send(DetachedSubagentStatus::Completed {@@ -528,17 +524,15 @@ async fn wait_times_out_and_leaves_entry_intact() {));// still steerable after a timed-out wait- assert!(- steer(- &cx(),- "task-slow",- "session-A",- "still here".into(),- QueueLane::Steer- )- .await- .is_ok()- );+ assert!(steer(+ &cx(),+ "task-slow",+ "session-A",+ "still here".into(),+ QueueLane::Steer+ )+ .await+ .is_ok());prune("task-slow");}@@ -586,17 +580,15 @@ async fn cancel_for_thread_aborts_only_matching_entries() {.await.is_ok());- assert!(- steer(- &cx(),- "task-headless",- "session-A",- "x".into(),- QueueLane::Steer- )- .await- .is_ok()- );+ assert!(steer(+ &cx(),+ "task-headless",+ "session-A",+ "x".into(),+ QueueLane::Steer+ )+ .await+ .is_ok());// Idempotent: a second pass cancels nothing.assert_eq!(cancel_for_thread(&cx(), "thread-X"), 0);diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel.rsindex fbb9671e4e..6860762134 100644--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel.rs+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel.rs@@ -32,13 +32,13 @@ mod staging;mod types;mod workers;-pub(crate) use collect::{SpawnParallelGraphOutcome, format_spawn_parallel_success};+pub(crate) use collect::{format_spawn_parallel_success, SpawnParallelGraphOutcome};pub(crate) use run::run_spawn_parallel_tasks_with_cancellation_and_workspace;pub(crate) use types::ParallelAgentTask;#[cfg(test)]pub(crate) use staging::{- ParallelTaskRejectionKind, SpawnParallelTaskPreflight, prepare_spawn_parallel_tasks_from_defs,+ prepare_spawn_parallel_tasks_from_defs, ParallelTaskRejectionKind, SpawnParallelTaskPreflight,};#[cfg(test)]pub(crate) use types::{ParallelAgentLineage, ParallelAgentResult, ParallelAgentStatus};diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rsindex 0bb7487c40..9adeba0f5d 100644--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs@@ -18,8 +18,8 @@ use crate::progress::AgentProgress;use tinyagents_definition::SandboxMode;use super::staging::{- ParallelTaskRejectionKind, ParallelWorktreeRequest, SpawnParallelTaskPreflight,- prepare_spawn_parallel_tasks_from_defs, worktree_request_for_task,+ prepare_spawn_parallel_tasks_from_defs, worktree_request_for_task, ParallelTaskRejectionKind,+ ParallelWorktreeRequest, SpawnParallelTaskPreflight,};use super::types::{ParallelAgentLineage, ParallelAgentResult, ParallelAgentStatus, ParallelAgentTask,diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rsindex 048005e375..3fe8077b94 100644--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rs+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rs@@ -14,7 +14,7 @@ use tinytools::WorkspaceDescriptor;use crate::agent_registry::host_definition::AgentDefinitionRegistry;use super::collect::{- SpawnParallelGraphOutcome, collect_spawn_parallel_results, project_spawn_parallel_result,+ collect_spawn_parallel_results, project_spawn_parallel_result, SpawnParallelGraphOutcome,};use super::dispatch::stage_spawn_parallel_workers_from_defs;use super::staging::snapshot_agent_definitions;diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rsindex 2503db5c40..9a20442ff9 100644--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs@@ -15,7 +15,7 @@ use std::path::PathBuf;use parking_lot::Mutex;-use tinyagents_graph::parallel::{ClaimConflict, ClaimPathError, parse_relative_claim_paths};+use tinyagents_graph::parallel::{parse_relative_claim_paths, ClaimConflict, ClaimPathError};use tinyagents_orchestration::parallel::WorkerDispatchMode;use tinyagents_orchestration::parallel::{AdmissionPolicy, AdmissionVerdict, Plan, Preflight, Rejection, RejectionKind, Task,diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rsindex 8575b30140..a37b01d582 100644--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rs+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rs@@ -6,10 +6,10 @@use std::path::PathBuf;use tinyagents_harness::CancellationToken;-use tinyagents_orchestration::parallel::{Worker, resolve_concurrency, run};+use tinyagents_orchestration::parallel::{resolve_concurrency, run, Worker};use crate::agent::subagent_host::{- SubagentRunOptions, SubagentRunStatus, run_subagent_with_parent,+ run_subagent_with_parent, SubagentRunOptions, SubagentRunStatus,};use super::types::{ParallelAgentResult, ParallelAgentStatus, SpawnParallelWorker};diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/mod.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/mod.rsindex c8a8555961..6dc9e2c7a3 100644--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/mod.rs+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/mod.rs@@ -5,11 +5,11 @@ mod tiny_port;mod types;pub use ops::{- DriverTaskCancellation, action_root_key, cancel_driver_job_by_task,- cancel_driver_job_for_observed_session, cancel_driver_jobs_for_thread, close_if_current,- find_reusable, list_for_parent, mark_driver_pause_cancelled, mark_failed, mark_finished,- normalize_task_key, resolve_lifecycle_key, reuse_decision, task_title_from_prompt,- upsert_running,+ action_root_key, cancel_driver_job_by_task, cancel_driver_job_for_observed_session,+ cancel_driver_jobs_for_thread, close_if_current, find_reusable, list_for_parent,+ mark_driver_pause_cancelled, mark_failed, mark_finished, normalize_task_key,+ resolve_lifecycle_key, reuse_decision, task_title_from_prompt, upsert_running,+ DriverTaskCancellation,};pub(crate) use tiny_port::OpenHumanTinySubagentSessionStore;pub use types::{diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rsindex 8e42c7967e..6093af3359 100644--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rs+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rs@@ -18,8 +18,9 @@ mod driver;#[cfg(test)]use driver::record_cancel_reason;pub use driver::{- DriverTaskCancellation, cancel_driver_job_by_task, cancel_driver_job_for_observed_session,+ cancel_driver_job_by_task, cancel_driver_job_for_observed_session,cancel_driver_jobs_for_thread, mark_driver_pause_cancelled, resolve_lifecycle_key,+ DriverTaskCancellation,};pub fn normalize_task_key(input: &str) -> String {diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rsindex fc0fa92072..f4ba4a10df 100644--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs@@ -107,51 +107,43 @@ fn stale_completion_cannot_overwrite_reused_or_closed_session() {.unwrap();assert_eq!(first.subagent_session_id, second.subagent_session_id);- assert!(- mark_finished(- &store,- &second.subagent_session_id,- "first-task",- &SubagentRunStatus::Completed,- vec![TranscriptMessage::user("stale")],- )- .is_err()- );+ assert!(mark_finished(+ &store,+ &second.subagent_session_id,+ "first-task",+ &SubagentRunStatus::Completed,+ vec![TranscriptMessage::user("stale")],+ )+ .is_err());let current = store.load().unwrap().remove(0);assert_eq!(current.current_task_id.as_deref(), Some("second-task"));assert_eq!(current.status, DurableSubagentStatus::Running);assert!(current.latest_history.is_none());- assert!(- mark_failed(- &store,- &second.subagent_session_id,- "first-task",- "stale failure".into(),- )- .is_err()- );+ assert!(mark_failed(+ &store,+ &second.subagent_session_id,+ "first-task",+ "stale failure".into(),+ )+ .is_err());assert!(store.load().unwrap()[0].latest_error.is_none());close(&store, &second.subagent_session_id).unwrap();- assert!(- mark_finished(- &store,- &second.subagent_session_id,- "second-task",- &SubagentRunStatus::Completed,- vec![TranscriptMessage::user("late after close")],- )- .is_err()- );- assert!(- mark_failed(- &store,- &second.subagent_session_id,- "second-task",- "late failure".into(),- )- .is_err()- );+ assert!(mark_finished(+ &store,+ &second.subagent_session_id,+ "second-task",+ &SubagentRunStatus::Completed,+ vec![TranscriptMessage::user("late after close")],+ )+ .is_err());+ assert!(mark_failed(+ &store,+ &second.subagent_session_id,+ "second-task",+ "late failure".into(),+ )+ .is_err());let closed = store.load().unwrap().remove(0);assert_eq!(closed.status, DurableSubagentStatus::Closed);assert!(closed.latest_history.is_none());@@ -229,14 +221,12 @@ fn driver_task_cancel_reports_legacy_failure_and_refuses_ambiguous_ids() {.unwrap().is_none());- assert!(- store- .load()- .unwrap()- .iter()- .filter(|row| row.current_task_id.as_deref() == Some("same-public-id"))- .all(|row| row.status == DurableSubagentStatus::Running)- );+ assert!(store+ .load()+ .unwrap()+ .iter()+ .filter(|row| row.current_task_id.as_deref() == Some("same-public-id"))+ .all(|row| row.status == DurableSubagentStatus::Running));}#[test]@@ -505,16 +495,14 @@ fn upsert_persists_the_full_lifecycle_key_without_collapsing_to_task_id() {).unwrap();assert_eq!(resolved, key);- assert!(- resolve_lifecycle_key(- &store,- &session.subagent_session_id,- "another-parent",- Some("thread-a"),- dir.path(),- )- .is_err()- );+ assert!(resolve_lifecycle_key(+ &store,+ &session.subagent_session_id,+ "another-parent",+ Some("thread-a"),+ dir.path(),+ )+ .is_err());}#[test]@@ -575,14 +563,12 @@ fn list_for_parent_without_thread_id_does_not_filter_by_thread() {let all = list_for_parent(&store, "parent-a", None).unwrap();assert_eq!(all.len(), 2);- assert!(- all.iter()- .any(|session| session.subagent_session_id == first.subagent_session_id)- );- assert!(- all.iter()- .any(|session| session.subagent_session_id == second.subagent_session_id)- );+ assert!(all+ .iter()+ .any(|session| session.subagent_session_id == first.subagent_session_id));+ assert!(all+ .iter()+ .any(|session| session.subagent_session_id == second.subagent_session_id));let thread_a = list_for_parent(&store, "parent-a", Some("thread-a")).unwrap();assert_eq!(thread_a.len(), 1);@@ -593,16 +579,14 @@ fn list_for_parent_without_thread_id_does_not_filter_by_thread() {fn missing_session_updates_return_errors() {let dir = tempfile::tempdir().unwrap();let store = SubagentSessionStore::new(dir.path().to_path_buf());- assert!(- mark_finished(- &store,- "missing",- "sub-1",- &SubagentRunStatus::Completed,- vec![]- )- .is_err()- );+ assert!(mark_finished(+ &store,+ "missing",+ "sub-1",+ &SubagentRunStatus::Completed,+ vec![]+ )+ .is_err());assert!(mark_failed(&store, "missing", "sub-1", "boom".into()).is_err());assert!(!close(&store, "missing").unwrap());}diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rsindex 0cf5de3a91..445c93f1b8 100644--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rs+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rs@@ -24,8 +24,8 @@ use serde_json::Value;use tinystoragedrivers::{CollectionSpec, Precondition, Query, Sort};use super::types::DurableSubagentSession;-use crate::storage::DocumentStoreExt;use crate::storage::documents::Repo;+use crate::storage::DocumentStoreExt;const SESSIONS: &str = "subagent_sessions";/// Holds the marker document that records the one-time legacy file import, indiff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents_tests.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents_tests.rsindex dcd62a85ba..6998431619 100644--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents_tests.rs@@ -35,12 +35,10 @@ fn session(id: &str) -> DurableSubagentSession {#[test]fn a_missing_list_loads_empty() {- assert!(- docs_in(&MemoryStorage::new(), "local")- .load()- .unwrap()- .is_empty()- );+ assert!(docs_in(&MemoryStorage::new(), "local")+ .load()+ .unwrap()+ .is_empty());}#[test]@@ -83,11 +81,10 @@ fn the_store_uses_the_workspace_default_with_no_backend_installed() {store.save(&[session("a")]).unwrap();assert_eq!(store.load().unwrap().len(), 1);// No JSON file store: the records are in the workspace's own database.- assert!(- !dir.path()- .join(".openhuman/subagent_sessions.json")- .exists()- );+ assert!(!dir+ .path()+ .join(".openhuman/subagent_sessions.json")+ .exists());assert!(dir.path().join("storage").exists());}@@ -120,11 +117,10 @@ fn the_store_dispatches_to_documents_when_a_backend_is_pinned() {assert_eq!(store.load().unwrap().len(), 1);});assert_eq!(docs.load().unwrap().len(), 1);- assert!(- !dir.path()- .join(".openhuman/subagent_sessions.json")- .exists()- );+ assert!(!dir+ .path()+ .join(".openhuman/subagent_sessions.json")+ .exists());}#[test]diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port_tests.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port_tests.rsindex e1f0e3ecd6..2ff2a91bf5 100644--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port_tests.rs@@ -39,18 +39,16 @@ async fn old_rows_without_checkpoint_identity_remain_readable_without_fabricatedassert_eq!(sessions[0].subagent_session_id, "legacy-session");assert_eq!(sessions[0].current_task_id.as_deref(), Some("legacy-task"));assert!(sessions[0].lifecycle_key.is_none());- assert!(- port.list_for_parent("foreign-owner", Some("thread"))- .await- .unwrap()- .is_empty()- );- assert!(- port.list_for_parent("owner", Some("other-thread"))- .await- .unwrap()- .is_empty()- );+ assert!(port+ .list_for_parent("foreign-owner", Some("thread"))+ .await+ .unwrap()+ .is_empty());+ assert!(port+ .list_for_parent("owner", Some("other-thread"))+ .await+ .unwrap()+ .is_empty());assert_eq!(port.list_for_parent("owner", None).await.unwrap().len(), 1);assert!(port.get("legacy-session").await.unwrap().is_some());let other_thread = OpenHumanTinySubagentSessionStore::new(@@ -97,12 +95,11 @@ async fn unthreaded_port_lists_only_unthreaded_rows() {let sessions = port.list_for_parent("owner", None).await.unwrap();assert_eq!(sessions.len(), 1);assert_eq!(sessions[0].subagent_session_id, "unthreaded-session");- assert!(- port.list_for_parent("owner", Some("thread-a"))- .await- .unwrap()- .is_empty()- );+ assert!(port+ .list_for_parent("owner", Some("thread-a"))+ .await+ .unwrap()+ .is_empty());}#[tokio::test]@@ -207,41 +204,37 @@ async fn upsert_rejects_a_selector_or_lifecycle_key_outside_bound_scope() {}};- assert!(- port.upsert_running(upsert(+ assert!(port+ .upsert_running(upsert("foreign",Some("thread-a"),key(Some("thread-a"), "task-1"))).await- .is_err()- );- assert!(- port.upsert_running(upsert(+ .is_err());+ assert!(port+ .upsert_running(upsert("owner",Some("thread-b"),key(Some("thread-b"), "task-1"))).await- .is_err()- );- assert!(- port.upsert_running(upsert(+ .is_err());+ assert!(port+ .upsert_running(upsert("owner",Some("thread-a"),key(Some("thread-b"), "task-1"))).await- .is_err()- );- assert!(- port.upsert_running(upsert(+ .is_err());+ assert!(port+ .upsert_running(upsert("owner",Some("thread-a"),key(Some("thread-a"), "other-task"))).await- .is_err()- );+ .is_err());assert!(store.load().unwrap().is_empty());}diff --git a/crates/openhuman-core/src/agent/orchestration/tools.rs b/crates/openhuman-core/src/agent/orchestration/tools.rsindex d71ddd104d..67b81f2222 100644--- a/crates/openhuman-core/src/agent/orchestration/tools.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools.rs@@ -45,10 +45,10 @@ mod tools_e2e_tests;pub(crate) use dispatch::DelegationDispatch;pub(crate) use subagent_control_surfaces::overlay_task_store_status;pub(crate) use subagent_control_surfaces::{- CloseSubagentTool, ListSubagentsTool, SteerSubagentTool, WaitSubagentTool,+ format_running_wait_message, requested_timeout_secs, wait_status_payload,};pub(crate) use subagent_control_surfaces::{- format_running_wait_message, requested_timeout_secs, wait_status_payload,+ CloseSubagentTool, ListSubagentsTool, SteerSubagentTool, WaitSubagentTool,};/// A minimal live TinyAgents carrier over `parent`, for tests that drive a@@ -67,13 +67,13 @@ pub(crate) fn live_parent_run_context(}pub use archetype_delegation::{ArchetypeDelegationTool, DelegationTarget};-pub use collapsed_delegation::{CollapsedDelegationTool, DELEGATE_TO_TOOL_NAME, DelegateTarget};+pub use collapsed_delegation::{CollapsedDelegationTool, DelegateTarget, DELEGATE_TO_TOOL_NAME};pub(crate) use continue_subagent::ContinueSubagentDispatch;pub use continue_subagent::ContinueSubagentTool;pub(crate) use delegate_graph::DelegateGraphDispatch;pub use delegate_graph::DelegateGraphTool;pub(crate) use spawn_async_subagent::SpawnAsyncSubagentDispatch;-pub use spawn_async_subagent::{SpawnAsyncSubagentTool, scope_spawn_async_subagent_spec};+pub use spawn_async_subagent::{scope_spawn_async_subagent_spec, SpawnAsyncSubagentTool};pub(crate) use spawn_parallel_agents::SpawnParallelAgentsDispatch;pub use spawn_parallel_agents::SpawnParallelAgentsTool;pub(crate) use spawn_subagent::SpawnSubagentDispatch;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_host.rs b/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_host.rsindex a132d13a71..8428d8682d 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_host.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_host.rs@@ -1,6 +1,6 @@use async_trait::async_trait;-use serde_json::Value;use serde_json::json;+use serde_json::Value;use tinytools::ToolRunContext;use tinytools::{diff --git a/crates/openhuman-core/src/agent/orchestration/tools/collapsed_delegation_host.rs b/crates/openhuman-core/src/agent/orchestration/tools/collapsed_delegation_host.rsindex 10789e7083..c67772951f 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/collapsed_delegation_host.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/collapsed_delegation_host.rs@@ -56,7 +56,7 @@//! [`ToolExposure::Hidden`]: tinytools::ToolExposure::Hiddenuse async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use super::archetype_delegation::{delegation_envelope_properties, render_structured_handoff};use tinytools::ToolRunContext;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 a90d881ea6..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@@ -10,8 +10,8 @@use crate::agent::orchestration::tools::dispatch::{incomplete_stop, stopped_subagent_result};use crate::agent::subagent_host::{- SubagentRunOptions, SubagentRunStatus, continue_subagent, continue_subagent_via_driver_tool,- load_subagent_checkpoint,+ continue_subagent, continue_subagent_via_driver_tool, load_subagent_checkpoint,+ SubagentRunOptions, SubagentRunStatus,};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::progress::AgentProgress;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rsindex f6f29f7715..7cfadc95eb 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs@@ -4,7 +4,7 @@ use std::sync::Arc;use tinytools::Tool;use super::super::collapsed_delegation::{- CollapsedDelegationTool, DelegateTarget, dispatch_targets_from_schema,+ dispatch_targets_from_schema, CollapsedDelegationTool, DelegateTarget,};use super::super::delegate_graph::DelegateGraphDispatch;use crate::tools::delegate::DelegateToolDispatch;@@ -247,11 +247,9 @@ async fn config_delegate_dispatch_preserves_tool_failure_in_shared_jobs() {.expect("the host returns the configured tool result");assert!(result.is_error);- assert!(- result- .output()- .contains("configured policy rejected the request")- );+ assert!(result+ .output()+ .contains("configured policy rejected the request"));assert!(jobs.list().iter().any(|job| {job.agent == "configured-error"diff --git a/crates/openhuman-core/src/agent/orchestration/tools/list_subagents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/list_subagents_tests.rsindex fc66dccc8b..876c86d286 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/list_subagents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/list_subagents_tests.rs@@ -4,13 +4,11 @@ use crate::agent::orchestration::subagent_sessions;#[test]fn schema_has_no_required_fields() {let schema = ListSubagentsTool::new().parameters_schema();- assert!(- schema- .get("required")- .and_then(|v| v.as_array())- .expect("required")- .is_empty()- );+ assert!(schema+ .get("required")+ .and_then(|v| v.as_array())+ .expect("required")+ .is_empty());}#[test]diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_completion.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_completion.rsindex 88121b8aac..5d2134a46f 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_completion.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_completion.rs@@ -27,9 +27,9 @@ pub(super) fn make_completion(Result<SubagentRunOutcome, String>,bool,) -> std::pin::Pin<Box<dyn std::future::Future<Output = ()> + Send>>-+ Send-+ Sync-+ 'static {+ + Send+ + Sync+ + 'static {move |_target: String,result: Result<SubagentRunOutcome, String>,emit_lifecycle_effects: bool|diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rsindex 6aac1c51fd..8186eb6882 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs@@ -301,10 +301,9 @@ fn async_reference_matches_the_orchestrator_fleet_vocabulary() {.iter().filter_map(|v| v.as_str()).collect();- assert!(- next.iter()- .any(|a| a.contains("delivered to you automatically"))- );+ assert!(next+ .iter()+ .any(|a| a.contains("delivered to you automatically")));let message = format_async_subagent_accepted("task_manager_agent", &serialized, &fleet);let prose = message.split("[async_subagent_ref]").next().unwrap();@@ -616,10 +615,8 @@ fn scoped_instance_advertises_exactly_the_allowlist() {schema["properties"]["agent_id"]["enum"],serde_json::json!(["agent_memory", "workflow_builder"]));- assert!(- schema["properties"]["agent_id"]["description"]- .as_str()- .unwrap_or_default()- .contains("only these are dispatchable")- );+ assert!(schema["properties"]["agent_id"]["description"]+ .as_str()+ .unwrap_or_default()+ .contains("only these are dispatchable"));}diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rsindex e0aa14c8c5..3c8d6bfff9 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs@@ -6,8 +6,8 @@ use crate::agent::orchestration::spawn_parallel::ParallelAgentLineage;use crate::agent::orchestration::spawn_parallel::ParallelAgentResult;use crate::agent::orchestration::spawn_parallel::ParallelAgentTask;use crate::agent::orchestration::spawn_parallel::{- SpawnParallelGraphOutcome, format_spawn_parallel_success,- run_spawn_parallel_tasks_with_cancellation_and_workspace,+ format_spawn_parallel_success, run_spawn_parallel_tasks_with_cancellation_and_workspace,+ SpawnParallelGraphOutcome,};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use async_trait::async_trait;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rsindex a8f0bb1e03..449c958c51 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rs@@ -210,16 +210,12 @@ async fn collects_immediate_task_validation_failures() {.iter().map(|result| result["error"].as_str().unwrap_or_default()).collect::<Vec<_>>();- assert!(- errors- .iter()- .any(|error| error.contains("agent_id and prompt"))- );- assert!(- errors- .iter()- .any(|error| error.contains("unknown agent_id"))- );+ assert!(errors+ .iter()+ .any(|error| error.contains("agent_id and prompt")));+ assert!(errors+ .iter()+ .any(|error| error.contains("unknown agent_id")));}#[test]@@ -307,11 +303,9 @@ fn shared_workspace_allows_readonly_or_explicitly_isolated_workers() {&parent,);- assert!(- preflight- .into_iter()- .all(|item| matches!(item, SpawnParallelTaskPreflight::Prepared(_)))- );+ assert!(preflight+ .into_iter()+ .all(|item| matches!(item, SpawnParallelTaskPreflight::Prepared(_))));}// This exercises the full parallel-subagent path (parent turn → spawn Ndiff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rsindex 79e687c7ca..c688170a0f 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs@@ -1,10 +1,10 @@use super::*;-use crate::agent::OpenHumanSessionHost;use crate::agent::harness::fork_context::ParentExecutionContext;use crate::agent::orchestration::spawn_parallel::{- ParallelTaskRejectionKind, SpawnParallelTaskPreflight, prepare_spawn_parallel_tasks_from_defs,+ prepare_spawn_parallel_tasks_from_defs, ParallelTaskRejectionKind, SpawnParallelTaskPreflight,};use crate::agent::tinyagents::host::OpenHumanRunContext;+use crate::agent::OpenHumanSessionHost;use crate::agent_registry::host_definition::AgentDefinition;use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::config::AgentConfig;@@ -13,8 +13,8 @@ use parking_lot::Mutex;use serde_json::json;use std::collections::HashMap;use std::sync::{- Arc,atomic::{AtomicUsize, Ordering},+ Arc,};use tinyagents_definition::{AgentTier, DefinitionSource, ModelSpec, PromptSource, SandboxMode, ToolScope,@@ -29,7 +29,7 @@ use tinytools::{PermissionLevel, Tool, ToolResult};use tinytools_agent::dialect::NativeDialect;use tinytools_agent::dialect::ToolCallFormat;use tinytools_agent::dialect::TranscriptEntry;-use tokio::time::{Duration, sleep, timeout};+use tokio::time::{sleep, timeout, Duration};const PARENT_PROMPT_CANARY: &str = "parallel-fanout-e2e-canary";const RESEARCH_PROMPT_CANARY: &str = "research-branch-canary";diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_surface.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_surface.rsindex ce200aad57..a8bcbd8253 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_surface.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_surface.rs@@ -14,7 +14,7 @@//!use crate::agent::orchestration::tools::dispatch::{incomplete_stop, stopped_subagent_result};use crate::agent::subagent_host::{- SubagentRunOptions, SubagentRunOutcome, SubagentRunStatus, run_subagent_via_driver_tool,+ run_subagent_via_driver_tool, SubagentRunOptions, SubagentRunOutcome, SubagentRunStatus,};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::core::runtime::DispatchCtx;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rsindex fbd7fcc4dd..50d10575ff 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rs@@ -51,13 +51,11 @@ fn parameters_schema_advertises_dedicated_thread_flag() {assert_eq!(flag.get("type").and_then(|v| v.as_str()), Some("boolean"));// Must be off by default — workers are an opt-in escape hatch, not// a free upgrade for every spawn.- assert!(- schema- .get("required")- .and_then(|v| v.as_array())- .map(|arr| arr.iter().all(|s| s.as_str() != Some("dedicated_thread")))- .unwrap_or(true)- );+ assert!(schema+ .get("required")+ .and_then(|v| v.as_array())+ .map(|arr| arr.iter().all(|s| s.as_str() != Some("dedicated_thread")))+ .unwrap_or(true));}#[test]@@ -67,13 +65,11 @@ fn parameters_schema_advertises_optional_model_override() {let props = schema.get("properties").expect("schema has properties");let model = props.get("model").expect("model override advertised");assert_eq!(model.get("type").and_then(|v| v.as_str()), Some("string"));- assert!(- schema- .get("required")- .and_then(|v| v.as_array())- .map(|arr| arr.iter().all(|s| s.as_str() != Some("model")))- .unwrap_or(true)- );+ assert!(schema+ .get("required")+ .and_then(|v| v.as_array())+ .map(|arr| arr.iter().all(|s| s.as_str() != Some("model")))+ .unwrap_or(true));}#[test]@@ -236,11 +232,9 @@ async fn legacy_archetype_alias_is_accepted_for_lookup() {.await.unwrap();assert!(result.is_error);- assert!(- result- .output()- .contains("unknown agent_id 'totally_made_up'")- );+ assert!(result+ .output()+ .contains("unknown agent_id 'totally_made_up'"));}#[tokio::test]diff --git a/crates/openhuman-core/src/agent/orchestration/tools/subagent_abort_report.rs b/crates/openhuman-core/src/agent/orchestration/tools/subagent_abort_report.rsindex 42aaf8bf5a..fab6ef3dcf 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/subagent_abort_report.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/subagent_abort_report.rs@@ -24,8 +24,8 @@//! only thing that settles the card. A closed channel has no reader left to//! settle anything, so that case is logged and dropped.-use tokio::sync::mpsc::Sender;use tokio::sync::mpsc::error::TrySendError;+use tokio::sync::mpsc::Sender;use crate::progress::AgentProgress;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/subagent_control_surfaces.rs b/crates/openhuman-core/src/agent/orchestration/tools/subagent_control_surfaces.rsindex 8b269cbb7e..729d779a9f 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/subagent_control_surfaces.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/subagent_control_surfaces.rs@@ -7,7 +7,7 @@//! envelopes only.use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinyagents_orchestration::subagent::SubagentResumeRef;use tinytools::{PermissionLevel, Tool, ToolResult, ToolTimeout};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 cdcfb7ad8c..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@@ -1,7 +1,7 @@//! Subagent dispatch logic shared by all agent delegation tools.use crate::agent::subagent_host::{- SubagentRunOptions, SubagentRunStatus, run_subagent_via_driver_tool,+ run_subagent_via_driver_tool, SubagentRunOptions, SubagentRunStatus,};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::progress::AgentProgress;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rsindex b7abcbaf1e..c5135023f9 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rs@@ -306,11 +306,10 @@ async fn cancelling_a_paused_driver_through_rpc_settles_once_with_its_reason() {.find(|row| row.current_task_id.as_deref() == Some(task_id.as_str())).expect("cancelled durable session remains available");assert_eq!(row.status, DurableSubagentStatus::Failed);- assert!(- row.latest_error- .as_deref()- .is_some_and(|error| error.contains("user requested stop"))- );+ assert!(row+ .latest_error+ .as_deref()+ .is_some_and(|error| error.contains("user requested stop")));let deliveries = pending_for(workspace.path(), "paused-cancel-rpc-thread");assert_eq!(deliveries.len(), 1);assert_eq!(deliveries[0].status, CompletionStatus::Failed);diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_workspace_owner_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_workspace_owner_tests.rsindex 3b934e161e..de81145a7c 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_workspace_owner_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_workspace_owner_tests.rs@@ -5,7 +5,7 @@ async fn driver_job_controls_are_isolated_by_workspace_with_shared_runtime_stateuse crate::agent::orchestration::subagent_sessions::{DurableSubagentSession, DurableSubagentStatus, SubagentSessionStore,};- use crate::agent::subagent_host::{SubagentRunOptions, run_subagent_via_driver_tool};+ use crate::agent::subagent_host::{run_subagent_via_driver_tool, SubagentRunOptions};use crate::core::runtime::{ContextOverlay, CoreContext, DomainSet};use crate::tools::toolpacks::ToolGroups;use tinyagents_harness::agent_loop::phases::execute_tool_batch;diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rsindex dc8b108d17..ec603dccdd 100644--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs@@ -2,24 +2,24 @@//! that drives a run's phase DAG to completion.use crate::core::runtime::DispatchCtx;-use anyhow::{Context, Result, anyhow};+use anyhow::{anyhow, Context, Result};use serde_json::Value;use std::sync::Arc;-use tinyagents_orchestration::workflow::{WorkflowEngine, reset_running_phases};+use tinyagents_orchestration::workflow::{reset_running_phases, WorkflowEngine};use crate::agent::harness::ParentExecutionContext;use crate::agent::orchestration::parent_context::with_root_parent;use crate::config::Config;use tinyagents_session::run_ledger::{WorkflowRun, WorkflowRunStatus, WorkflowRunUpsert};-use super::LOG_TARGET;use super::cancel::{- WorkflowCancelSignal, cancel_signal_if_current, clear_cancel_signal, is_current_cancel_signal,- lookup_cancel_signal, register_cancel_signal, replace_cancel_signal,+ cancel_signal_if_current, clear_cancel_signal, is_current_cancel_signal, lookup_cancel_signal,+ register_cancel_signal, replace_cancel_signal, WorkflowCancelSignal,};use super::ops::{compare_and_swap_workflow_run_lifecycle, definition_by_id, get_workflow_run, workflow_store,};+use super::LOG_TARGET;use tinyagents_orchestration::workflow::WorkflowDefinition;/// Start a new workflow run and return immediately.diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rsindex 861fd7be58..7fcc4202d4 100644--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs@@ -2,7 +2,7 @@use std::sync::Arc;-use anyhow::{Result, anyhow};+use anyhow::{anyhow, Result};use async_trait::async_trait;use serde_json::json;use tinyagents_harness::CancellationToken;diff --git a/crates/openhuman-core/src/agent_runs/agent_teams/schemas.rs b/crates/openhuman-core/src/agent_runs/agent_teams/schemas.rsindex d710dc8b5e..b0ef8737ce 100644--- a/crates/openhuman-core/src/agent_runs/agent_teams/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/agent_teams/schemas.rs@@ -10,8 +10,8 @@use crate::core::runtime::DispatchCtx;use serde_json::{Map, Value};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};use tinyagents_session::run_ledger::AgentTeamListRequest;diff --git a/crates/openhuman-core/src/agent_runs/command_center/schemas.rs b/crates/openhuman-core/src/agent_runs/command_center/schemas.rsindex 1b93f1e6b8..a5c207d9eb 100644--- a/crates/openhuman-core/src/agent_runs/command_center/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/command_center/schemas.rs@@ -8,8 +8,8 @@ use serde_json::{Map, Value};use tinyagents_session::run_ledger::command_center::ControlVerb;use crate::agent_registry::host_definition::AgentDefinitionRegistry;-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};/// Controller schemas exposed by the command center.diff --git a/crates/openhuman-core/src/agent_runs/context_breakdown.rs b/crates/openhuman-core/src/agent_runs/context_breakdown.rsindex 1820aeef42..63626a1d52 100644--- a/crates/openhuman-core/src/agent_runs/context_breakdown.rs+++ b/crates/openhuman-core/src/agent_runs/context_breakdown.rs@@ -19,10 +19,10 @@ use once_cell::sync::Lazy;use serde::{Deserialize, Serialize};use crate::config::Config;-use crate::core::Outcome;-use crate::core::agent_cli::debug::DumpPromptOptions;use crate::core::agent_cli::debug::prompt_size::{PromptSizeReport, SectionSize, ToolSize};+use crate::core::agent_cli::debug::DumpPromptOptions;use crate::core::runtime::DispatchCtx;+use crate::core::Outcome;/// Default agent whose prompt is measured when the caller names none — the/// one every main chat turn actually runs under.diff --git a/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rs b/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rsindex cdc34a7478..3bbdec4c08 100644--- a/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rs+++ b/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::core::agent_cli::debug::DumpedPrompt;use crate::core::agent_cli::debug::prompt_size::PromptSizeReport;+use crate::core::agent_cli::debug::DumpedPrompt;fn sample_dump() -> DumpedPrompt {DumpedPrompt {diff --git a/crates/openhuman-core/src/agent_runs/mod.rs b/crates/openhuman-core/src/agent_runs/mod.rsindex 07d44b5883..c28603aa28 100644--- a/crates/openhuman-core/src/agent_runs/mod.rs+++ b/crates/openhuman-core/src/agent_runs/mod.rs@@ -35,8 +35,8 @@ pub(crate) fn register_subagent_finalize_subscriber(config: &crate::config::Conf}/// Registers the orchestration RPC surfaces in their catalogue order.-pub(crate) fn all_orchestration_registered_controllers()--> Vec<crate::core::all::RegisteredController> {+pub(crate) fn all_orchestration_registered_controllers(+) -> Vec<crate::core::all::RegisteredController> {let mut controllers = Vec::new();controllers.extend(all_command_center_registered_controllers());controllers.extend(all_workflow_run_registered_controllers());diff --git a/crates/openhuman-core/src/agent_runs/replay/ops.rs b/crates/openhuman-core/src/agent_runs/replay/ops.rsindex b6e2fcf745..0895beeced 100644--- a/crates/openhuman-core/src/agent_runs/replay/ops.rs+++ b/crates/openhuman-core/src/agent_runs/replay/ops.rs@@ -7,8 +7,8 @@use std::path::Path;use tinyagents_harness::events::HarnessRunStatus;-use tinyagents_harness::observability::StoreEventJournal;use tinyagents_harness::observability::replay::{self, RunEventsPage};+use tinyagents_harness::observability::StoreEventJournal;/// Paged late-attach replay reader over the durable journal under `workspace`.pub(crate) async fn read_run_events_page(diff --git a/crates/openhuman-core/src/agent_runs/replay/schemas.rs b/crates/openhuman-core/src/agent_runs/replay/schemas.rsindex 75c5e3dc62..49542d262f 100644--- a/crates/openhuman-core/src/agent_runs/replay/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/replay/schemas.rs@@ -113,7 +113,8 @@ fn replay_schema(function: &str) -> ControllerSchema {"run_events" => ControllerSchema {namespace: NAMESPACE,function: "run_events",- description: "Read-only paged replay of a durable agent run's event stream (late-attach \+ description:+ "Read-only paged replay of a durable agent run's event stream (late-attach \reconnect/backfill). Returns AgentObservations at offset >= `offset` in order, \plus `next_offset` (null once drained). Never mutates state.",inputs: vec![@@ -155,7 +156,8 @@ fn replay_schema(function: &str) -> ControllerSchema {"run_status" => ControllerSchema {namespace: NAMESPACE,function: "run_status",- description: "Read-only latest durable status snapshot (HarnessRunStatus) for a run, or null \+ description:+ "Read-only latest durable status snapshot (HarnessRunStatus) for a run, or null \when the run is unknown. Counters/phase/usage/cost only — never prompts or \payloads.",inputs: vec![FieldSchema {@@ -174,7 +176,8 @@ fn replay_schema(function: &str) -> ControllerSchema {"runs_active" => ControllerSchema {namespace: NAMESPACE,function: "runs_active",- description: "Read-only listing of active (pending/running/interrupted) agent runs, optionally \+ description:+ "Read-only listing of active (pending/running/interrupted) agent runs, optionally \filtered by `thread_id` and/or `root_run_id`. Never mutates state.",inputs: vec![FieldSchema {diff --git a/crates/openhuman-core/src/agent_runs/schemas.rs b/crates/openhuman-core/src/agent_runs/schemas.rsindex eae006c2d2..7b6e4e2080 100644--- a/crates/openhuman-core/src/agent_runs/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/schemas.rs@@ -1,11 +1,11 @@use crate::core::runtime::DispatchCtx;-use serde::Deserialize;use serde::de::DeserializeOwned;+use serde::Deserialize;use serde_json::{Map, Value};use crate::config::rpc as config_rpc;-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};/// Params for `agent.chat` and `agent.chat_simple`.@@ -136,7 +136,8 @@ pub fn schemas(function: &str) -> ControllerSchema {"list_definitions" => ControllerSchema {namespace: "agent",function: "list_definitions",- description: "List safe display metadata for sub-agent definitions in the global registry.",+ description:+ "List safe display metadata for sub-agent definitions in the global registry.",inputs: vec![],outputs: vec![json_output("definitions",@@ -551,7 +552,7 @@ fn handle_graph_topologies(_ctx: DispatchCtx, _params: Map<String, Value>) -> Cofn local_catalog_models_from_config(config: &crate::config::Config,) -> Vec<crate::platform::cost::catalog::LocalCatalogModel> {- use tinyinference_local::profile::{LocalProviderKind, ToolSupport, profile_for_kind};+ use tinyinference_local::profile::{profile_for_kind, LocalProviderKind, ToolSupport};config.model_registrydiff --git a/crates/openhuman-core/src/agent_runs/schemas_tests.rs b/crates/openhuman-core/src/agent_runs/schemas_tests.rsindex 9d9808e673..7f4b7ca17d 100644--- a/crates/openhuman-core/src/agent_runs/schemas_tests.rs+++ b/crates/openhuman-core/src/agent_runs/schemas_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::core::TypeSchema;use crate::core::runtime::DispatchCtx;+use crate::core::TypeSchema;use serde_json::json;#[test]@@ -31,26 +31,21 @@ fn schemas_expose_expected_inputs_and_unknown_fallback() {assert_eq!(chat.namespace, "agent");assert_eq!(chat.inputs.len(), 5);assert!(matches!(chat.inputs[1].ty, TypeSchema::Option(_)));- assert!(- chat.inputs- .iter()- .any(|input| input.name == "thread_id" && !input.required)- );+ assert!(chat+ .inputs+ .iter()+ .any(|input| input.name == "thread_id" && !input.required));let triage = schemas("triage_evaluate");assert_eq!(triage.inputs.len(), 7);- assert!(- triage- .inputs- .iter()- .any(|input| input.name == "payload" && input.required)- );- assert!(- triage- .inputs- .iter()- .any(|input| input.name == "dry_run" && !input.required)- );+ assert!(triage+ .inputs+ .iter()+ .any(|input| input.name == "payload" && input.required));+ assert!(triage+ .inputs+ .iter()+ .any(|input| input.name == "dry_run" && !input.required));let unknown = schemas("nope");assert_eq!(unknown.function, "unknown");@@ -97,12 +92,11 @@ async fn graph_topologies_handler_exports_structural_reports() {for g in graphs {assert!(g.get("name").and_then(Value::as_str).is_some());assert_eq!(g.get("ok").and_then(Value::as_bool), Some(true));- assert!(- g.get("mermaid")- .and_then(Value::as_str)- .unwrap()- .contains("flowchart")- );+ assert!(g+ .get("mermaid")+ .and_then(Value::as_str)+ .unwrap()+ .contains("flowchart"));assert!(g.get("topology").map(|t| !t.is_null()).unwrap_or(false),"topology embeds as structured JSON"@@ -137,13 +131,11 @@ async fn reload_and_definition_handlers_cover_missing_registry_paths() {.await.expect("reload handler should always succeed");assert_eq!(reload.get("status").and_then(Value::as_str), Some("noop"));- assert!(- reload- .get("note")- .and_then(Value::as_str)- .unwrap()- .contains("Restart")- );+ assert!(reload+ .get("note")+ .and_then(Value::as_str)+ .unwrap()+ .contains("Restart"));let list_result = handle_list_definitions(DispatchCtx::process_default(), Map::new()).await;match list_result {diff --git a/crates/openhuman-core/src/agent_runs/subagent_control.rs b/crates/openhuman-core/src/agent_runs/subagent_control.rsindex dcda188b51..e1d43165d7 100644--- a/crates/openhuman-core/src/agent_runs/subagent_control.rs+++ b/crates/openhuman-core/src/agent_runs/subagent_control.rs@@ -15,13 +15,13 @@//! cancelled.use crate::core::runtime::DispatchCtx;-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};use tinyagents_orchestration::subagent::SteerError;use crate::agent::orchestration::running_subagents::CancelledSubagent;use crate::agent::orchestration::{background_completions, running_subagents, subagent_sessions};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};use tinyagents_harness::run_queue::QueueLane;diff --git a/crates/openhuman-core/src/agent_runs/subagent_control_tests.rs b/crates/openhuman-core/src/agent_runs/subagent_control_tests.rsindex 8a82a22acd..b0da293296 100644--- a/crates/openhuman-core/src/agent_runs/subagent_control_tests.rs+++ b/crates/openhuman-core/src/agent_runs/subagent_control_tests.rs@@ -148,8 +148,8 @@ async fn cancelling_a_paused_driver_queues_a_failed_delivery_with_reason() {forget_workspace_for_test, pending_for,};use crate::agent::orchestration::subagent_sessions::{- DriverTaskCancellation, DurableSubagentStatus, SubagentSessionSelector,- SubagentSessionStore, SubagentSessionUpsert, mark_finished, upsert_running,+ mark_finished, upsert_running, DriverTaskCancellation, DurableSubagentStatus,+ SubagentSessionSelector, SubagentSessionStore, SubagentSessionUpsert,};use tinyagents_orchestration::subagent::SubagentTaskKey;use tinyagents_tasks::CompletionStatus;@@ -213,15 +213,13 @@ async fn cancelling_a_paused_driver_queues_a_failed_delivery_with_reason() {};forget_workspace_for_test(&workspace_dir);- assert!(- settle_paused_driver_cancel(- &DispatchCtx::process_default(),- &observed,- Some("user requested stop")- )- .await- .expect("paused cancellation settles")- );+ assert!(settle_paused_driver_cancel(+ &DispatchCtx::process_default(),+ &observed,+ Some("user requested stop")+ )+ .await+ .expect("paused cancellation settles"));let row = store.load().unwrap().remove(0);assert_eq!(row.status, DurableSubagentStatus::Failed);diff --git a/crates/openhuman-core/src/agent_runs/workflow_runs/ops_tests.rs b/crates/openhuman-core/src/agent_runs/workflow_runs/ops_tests.rsindex 2e8282cbfc..7fe46fcb60 100644--- a/crates/openhuman-core/src/agent_runs/workflow_runs/ops_tests.rs+++ b/crates/openhuman-core/src/agent_runs/workflow_runs/ops_tests.rs@@ -1,6 +1,6 @@use super::*;use tinyagents_orchestration::workflow::{- DefinitionError, WorkflowDefinition, WorkflowPhase, validate_agents, validate_structure,+ validate_agents, validate_structure, DefinitionError, WorkflowDefinition, WorkflowPhase,};fn good_def() -> WorkflowDefinition {diff --git a/crates/openhuman-core/src/agent_runs/workflow_runs/schemas.rs b/crates/openhuman-core/src/agent_runs/workflow_runs/schemas.rsindex 845a2627e4..32a58d37ea 100644--- a/crates/openhuman-core/src/agent_runs/workflow_runs/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/workflow_runs/schemas.rs@@ -8,8 +8,8 @@use crate::core::runtime::DispatchCtx;use serde_json::{Map, Value};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};use tinyagents_session::run_ledger::WorkflowRunListRequest;diff --git a/crates/openhuman-core/src/agent_runs/worktree_schemas.rs b/crates/openhuman-core/src/agent_runs/worktree_schemas.rsindex 3102e55c84..b5059136ed 100644--- a/crates/openhuman-core/src/agent_runs/worktree_schemas.rs+++ b/crates/openhuman-core/src/agent_runs/worktree_schemas.rs@@ -18,14 +18,14 @@use crate::core::runtime::DispatchCtx;use std::path::{Path, PathBuf};-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};use tinyagents_harness::workspace::{- GIT_WORKTREE_SUBDIR, GitWorktreeError, GitWorktreeStatus, detect_worktree_overlaps,- git_worktree_diff_summary, git_worktree_status, list_git_worktrees, remove_git_worktree,+ detect_worktree_overlaps, git_worktree_diff_summary, git_worktree_status, list_git_worktrees,+ remove_git_worktree, GitWorktreeError, GitWorktreeStatus, GIT_WORKTREE_SUBDIR,};/// Controller schemas exposed by the worktree manager.diff --git a/crates/openhuman-core/src/agent_runs/worktree_schemas_tests.rs b/crates/openhuman-core/src/agent_runs/worktree_schemas_tests.rsindex fa4dd03e1d..d52bd017ec 100644--- a/crates/openhuman-core/src/agent_runs/worktree_schemas_tests.rs+++ b/crates/openhuman-core/src/agent_runs/worktree_schemas_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::core::runtime::DispatchCtx;use std::process::Command;-use tinyagents_harness::workspace::{GitWorktreeBaseRef, GitWorktreeStatus, create_git_worktree};+use tinyagents_harness::workspace::{create_git_worktree, GitWorktreeBaseRef, GitWorktreeStatus};/// `true` when `git` is invokable on this host. Tests that need real/// `git worktree` plumbing skip (pass trivially) when it's absent, so adiff --git a/crates/openhuman-core/src/core/runtime/subscribers_tests.rs b/crates/openhuman-core/src/core/runtime/subscribers_tests.rsindex 4824309250..865420c2e9 100644--- a/crates/openhuman-core/src/core/runtime/subscribers_tests.rs+++ b/crates/openhuman-core/src/core/runtime/subscribers_tests.rs@@ -1,4 +1,4 @@-use super::{DomainSubscriberPlan, group_first_time_when_bus_ready};+use super::{group_first_time_when_bus_ready, DomainSubscriberPlan};use crate::config::test_env::EnvVarGuard;// ---- domain-subscriber gating (#4796 DoD item 3) ----------------------------