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: files changed crates/openhuman-core/src/agent/goals/mod_tests.rs,crates/openhuman-core/src/ag
Steven Enamakel4aa05ff701c7
diff --git a/crates/openhuman-core/src/agent/goals/mod_tests.rs b/crates/openhuman-core/src/agent/goals/mod_tests.rsindex 5d5c37485a..201a1f83d2 100644--- a/crates/openhuman-core/src/agent/goals/mod_tests.rs+++ b/crates/openhuman-core/src/agent/goals/mod_tests.rs@@ -24,9 +24,11 @@ async fn goal_store_is_reused_within_a_context_and_isolated_between_agents() {drop(first);drop(repeated);let reacquired = goal_store(first_workspace.path(), &first_dispatch);- assert!(cache_owns_store- .upgrade()- .is_some_and(|cached| Arc::ptr_eq(&cached, &reacquired)));+ assert!(+ cache_owns_store+ .upgrade()+ .is_some_and(|cached| Arc::ptr_eq(&cached, &reacquired))+ );let isolated = goal_store(first_workspace.path(), &second_dispatch);let other_workspace = goal_store(second_workspace.path(), &first_dispatch);@@ -37,11 +39,13 @@ async fn goal_store_is_reused_within_a_context_and_isolated_between_agents() {.set("same-thread", "agent a objective", None).await.expect("write first agent goal");- assert!(isolated- .get("same-thread")- .await- .expect("read second agent goal")- .is_none());+ assert!(+ isolated+ .get("same-thread")+ .await+ .expect("read second agent goal")+ .is_none()+ );}#[tokio::test]@@ -70,11 +74,13 @@ async fn goal_store_isolated_between_profiles_with_the_same_agent_and_thread() {.set("shared-thread-id", "profile A objective", None).await.expect("write profile A goal");- assert!(store_b- .get("shared-thread-id")- .await- .expect("read profile B goal")- .is_none());+ assert!(+ store_b+ .get("shared-thread-id")+ .await+ .expect("read profile B goal")+ .is_none()+ );}#[tokio::test]@@ -144,11 +150,13 @@ async fn goal_tool_with_context_uses_the_business_goal_store() {.await.expect("execute without a thread");assert!(no_thread.is_error);- assert!(goal_store(workspace.path(), &dispatch)- .get("goal-tool-business-store")- .await- .expect("confirm existing goal")- .is_some());+ assert!(+ goal_store(workspace.path(), &dispatch)+ .get("goal-tool-business-store")+ .await+ .expect("confirm existing goal")+ .is_some()+ );}).await;}diff --git a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rs b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rsindex ab2cd2665e..2393a2fa24 100644--- a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rs+++ b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rs@@ -32,7 +32,7 @@ use serde_json::Value;use tinyagents_harness::artifacts::tool_results::{self, ArtifactRead, ToolResultArtifactStore};use tinystoragedrivers::BlobStore;-use crate::agent::harness::artifact_offload::{SanitizingRedactor, READ_TOOL};+use crate::agent::harness::artifact_offload::{READ_TOOL, SanitizingRedactor};use tinytools_std::filesystem::FileReadTool;/// Namespace of the artifact index in the run's store registry.diff --git a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod_tests.rs b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod_tests.rsindex 7854784434..54293c37e9 100644--- a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod_tests.rs+++ b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod_tests.rs@@ -131,12 +131,14 @@ async fn artifacts_are_tenant_scoped() {fn read_targets_use_openhumans_tool_names() {let path = "artifacts/tool-results/s/shell/c.txt";assert!(artifact_read_target(None, "file_read", &json!({"path": path})).is_some());- assert!(artifact_read_target(- None,- "use_skill",- &json!({"skill": "files", "tool": "file_read", "args": {"path": path, "offset": 3}})- )- .is_some_and(|read| read.offset == 3));+ assert!(+ artifact_read_target(+ None,+ "use_skill",+ &json!({"skill": "files", "tool": "file_read", "args": {"path": path, "offset": 3}})+ )+ .is_some_and(|read| read.offset == 3)+ );assert!(artifact_read_target(None, "glob", &json!({"path": path})).is_none());}@@ -148,18 +150,22 @@ fn read_targets_recognise_the_stores_blob_keys() {let store = in_memory_tool_result_store(tmp.path().join("tool-results"), "s");let pointer = store.path_for_read_tool("shell", Some("c"));assert!(artifact_read_target(Some(&store), "file_read", &json!({"path": pointer})).is_some());- assert!(artifact_read_target(- Some(&store),- "use_skill",- &json!({"skill": "files", "tool": "file_read", "args": {"path": pointer, "offset": 3}})- )- .is_some_and(|read| read.offset == 3));- assert!(artifact_read_target(- Some(&store),- "file_read",- &json!({"path": "tool-results-backup/s/x.txt"})- )- .is_none());+ assert!(+ artifact_read_target(+ Some(&store),+ "use_skill",+ &json!({"skill": "files", "tool": "file_read", "args": {"path": pointer, "offset": 3}})+ )+ .is_some_and(|read| read.offset == 3)+ );+ assert!(+ artifact_read_target(+ Some(&store),+ "file_read",+ &json!({"path": "tool-results-backup/s/x.txt"})+ )+ .is_none()+ );}/// A continuation names `file_read` and the offset, in the wire format thediff --git a/crates/openhuman-core/src/agent/orchestration/background_completions/store_adapter.rs b/crates/openhuman-core/src/agent/orchestration/background_completions/store_adapter.rsindex 82a41708cf..7e051d9c5a 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions/store_adapter.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions/store_adapter.rs@@ -2,8 +2,8 @@use super::*;use tinyagents_tasks::{- CompletionRouterPool, CompletionStoreReplaceOutcome, DriverCompletionStore,- InMemoryCompletionStore, DEFAULT_MAX_ATTEMPTS,+ CompletionRouterPool, CompletionStoreReplaceOutcome, DEFAULT_MAX_ATTEMPTS,+ DriverCompletionStore, InMemoryCompletionStore,};pub(in crate::agent::orchestration) fn router_scope_for(@@ -92,8 +92,8 @@ pub(in crate::agent::orchestration) fn router_pool() -> &'static CompletionRoute}#[cfg(test)]-pub(in crate::agent::orchestration) fn test_store_overrides(-) -> &'static Mutex<HashMap<RouterScope, Arc<dyn CompletionStore>>> {+pub(in crate::agent::orchestration) fn test_store_overrides()+-> &'static Mutex<HashMap<RouterScope, Arc<dyn CompletionStore>>> {static STORES: OnceLock<Mutex<HashMap<RouterScope, Arc<dyn CompletionStore>>>> =OnceLock::new();STORES.get_or_init(|| Mutex::new(HashMap::new()))diff --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 f71f7fdded..e161a60158 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@@ -137,10 +137,7 @@ fn delivered_pause_leaves_the_task_key_free_for_a_later_delivery() {let pause_receipt = pause_batch[0].receipt().expect("claimed pause has a settlement receipt");- assert_eq!(- router.mark_delivered(&[pause_receipt]).unwrap(),- 1- );+ assert_eq!(router.mark_delivered(&[pause_receipt]).unwrap(), 1);record(w,@@ -160,14 +157,13 @@ fn delivered_pause_leaves_the_task_key_free_for_a_later_delivery() {let completion_receipt = completion_batch[0].receipt().expect("claimed completion has a settlement receipt");- assert_eq!(- router.mark_delivered(&[completion_receipt]).unwrap(),- 1+ assert_eq!(router.mark_delivered(&[completion_receipt]).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_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_completions_tests.rsindex 983a7905fb..ff0a9c8a70 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions_tests.rs@@ -57,10 +57,12 @@ 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]@@ -80,10 +82,12 @@ 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());}@@ -513,9 +517,7 @@ fn clear_all_also_withdraws_a_completion_a_delivery_has_leased() {record(w, "sess-l", "sub-1", "x", Some("thread-leased"));let router = router_for_workspace(w);// A delivery claimed it: the record is leased but still pending in the store.- let claimed = router- .claim_pending("thread-leased", usize::MAX)- .unwrap();+ let claimed = router.claim_pending("thread-leased", usize::MAX).unwrap();assert_eq!(claimed.len(), 1);let receipts: Vec<_> = claimed.iter()diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery.rsindex b6cd8dc038..e3dc5a1a74 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::{busy, clear_busy_for_thread, TurnBusy};+use super::busy_guard::{TurnBusy, busy, clear_busy_for_thread};use super::completion_notice::build_undelivered_notice;use super::completion_owners;use super::delivery_drain::{DrainFence, RECOVERY_BUSY_POLL};@@ -64,9 +64,9 @@ use super::delivery_drain::{DrainFence, RECOVERY_BUSY_POLL};mod delivery_events;use crate::core::runtime::CoreContext;#[cfg(test)]-pub(super) use delivery_events::drain_schedule;-#[cfg(test)]pub(super) use delivery_events::Drain;+#[cfg(test)]+pub(super) use delivery_events::drain_schedule;pub(super) use delivery_events::{drain_schedule_in, owning_profiles};/// Coalesce completions landing within this window into one delivery turn.@@ -157,8 +157,8 @@ fn schedule_delivery_inner(.push((thread_id.clone(), delay));#[cfg(not(test))]let _ = delay; // The owner applies debounce/recovery timing inside its delivery API.- // Scoped: the thread -> workspace table is keyed per profile, so the- // delayed task must run under the profile that scheduled it.+ // Scoped: the thread -> workspace table is keyed per profile, so the+ // delayed task must run under the profile that scheduled it.ctx.clone().spawn(async move {let outcome = try_deliver(ctx.clone(), thread_id.clone(), fence.clone(), wait_idle).await;if outcome == DeliveryOutcome::ParentBusy {@@ -516,7 +516,11 @@ wherelog::error!("[background_delivery] delivered but could not settle records \thread_id={thread_id} tasks=[{}] error={error}",- receipts.iter().map(|receipt| receipt.task_id.as_str()).collect::<Vec<_>>().join(",")+ receipts+ .iter()+ .map(|receipt| receipt.task_id.as_str())+ .collect::<Vec<_>>()+ .join(","));}}@@ -556,7 +560,11 @@ wherelog::warn!("[background_delivery] delivery turn failed thread_id={thread_id} \tasks=[{}] max_attempts={} error={e}",- receipts.iter().map(|receipt| receipt.task_id.as_str()).collect::<Vec<_>>().join(","),+ receipts+ .iter()+ .map(|receipt| receipt.task_id.as_str())+ .collect::<Vec<_>>()+ .join(","),router.max_attempts());let attempts = routerdiff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rsindex 70fb5ab9eb..08377e20af 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::{CompletionReceipt, CompletionRouter};-use crate::core::runtime::tenant;use crate::core::runtime::DispatchCtx;+use crate::core::runtime::tenant;/// 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 f4101dc0e8..316ab8580b 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,8 +5,8 @@use super::*;use crate::agent::orchestration::background_completions::{- pending_for_ctx, record_completion, router_for_workspace, router_for_workspace_ctx,- TestWorkspace,+ TestWorkspace, pending_for_ctx, record_completion, router_for_workspace,+ router_for_workspace_ctx,};use crate::core::runtime::DispatchCtx;use crate::core::runtime::{ContextOverlay, DomainSet};diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rsindex ad766f77a5..edf37dd14f 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::{- forget_workspace_for_test, pending_for, record_completion, router_for_workspace, TestWorkspace,+ TestWorkspace, forget_workspace_for_test, pending_for, record_completion, router_for_workspace,};use std::path::Path;use std::sync::atomic::{AtomicU32, Ordering};@@ -510,10 +510,12 @@ 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 {@@ -678,10 +680,12 @@ 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/running_subagents/steering.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rsindex 9d68c3e8c7..ebd72e0521 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::steering::{steer_detached, SteerAccess, SteerError};+use tinyagents_orchestration::steering::{SteerAccess, SteerError, steer_detached};use super::cancel::now_ms;use super::registry::{control_admits, owner_key, registry};diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_projection_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_projection_tests.rsindex 0485416736..6961345249 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_projection_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_projection_tests.rs@@ -96,18 +96,26 @@ async fn explicit_profile_projects_spawn_completion_and_cancel_without_ambient_slet alice_spawned = records(&alice, workspace.path());let bob_spawned = records(&bob, workspace.path());- assert!(alice_spawned- .iter()- .any(|row| row.spec.task_id.as_str() == alice_task));- assert!(alice_spawned- .iter()- .all(|row| row.spec.task_id.as_str() != bob_task));- assert!(bob_spawned- .iter()- .any(|row| row.spec.task_id.as_str() == bob_task));- assert!(bob_spawned- .iter()- .all(|row| row.spec.task_id.as_str() != alice_task));+ assert!(+ alice_spawned+ .iter()+ .any(|row| row.spec.task_id.as_str() == alice_task)+ );+ assert!(+ alice_spawned+ .iter()+ .all(|row| row.spec.task_id.as_str() != bob_task)+ );+ assert!(+ bob_spawned+ .iter()+ .any(|row| row.spec.task_id.as_str() == bob_task)+ );+ assert!(+ bob_spawned+ .iter()+ .all(|row| row.spec.task_id.as_str() != alice_task)+ );alice_tx.send(DetachedSubagentStatus::Completed {@@ -205,7 +213,9 @@ async fn cancellation_projection_uses_the_captured_profile_store() {.find(|row| row.spec.task_id.as_str() == task_id).expect("Alice cancellation is persisted to Alice's profile store");assert_eq!(alice_row.status, OrchestrationTaskStatus::Cancelled);- assert!(records(&bob, workspace.path())- .iter()- .all(|row| row.spec.task_id.as_str() != task_id));+ assert!(+ records(&bob, workspace.path())+ .iter()+ .all(|row| row.spec.task_id.as_str() != task_id)+ );}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 f63c1851a2..b819eb11ea 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@@ -568,9 +568,11 @@ 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(),@@ -597,9 +599,11 @@ async fn saas_controls_follow_the_explicit_context_not_the_tasks_scope() {"alice reaches her own worker");assert_eq!(b_side.unwrap(), (true, true), "bob reaches his own worker");- assert!(snapshot_for_parent(&alice, PARENT)- .iter()- .all(|worker| worker.task_id != a_task));+ assert!(+ snapshot_for_parent(&alice, PARENT)+ .iter()+ .all(|worker| worker.task_id != a_task)+ );}#[tokio::test]diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rsindex 4e8237baa3..3965475e04 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::{- DetachedSubagentStatus, WaitError, WaitOutcome, DETACHED_LEDGER_TIMEOUT_MS,+ DETACHED_LEDGER_TIMEOUT_MS, DetachedSubagentStatus, WaitError, WaitOutcome,};use tinyagents_tasks::OrchestrationTaskStatus;use tokio::sync::watch;@@ -284,13 +284,15 @@ 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.@@ -372,13 +374,15 @@ 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 {@@ -527,15 +531,17 @@ 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");}@@ -583,15 +589,17 @@ 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/subagent_sessions/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rsindex 5f1f932993..d583ee1885 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@@ -108,43 +108,51 @@ 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());@@ -222,12 +230,14 @@ 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]@@ -496,14 +506,16 @@ 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]@@ -564,12 +576,14 @@ 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);@@ -580,14 +594,16 @@ 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/tiny_port_tests.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port_tests.rsindex 2ff2a91bf5..e1f0e3ecd6 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,16 +39,18 @@ 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(@@ -95,11 +97,12 @@ 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]@@ -204,37 +207,41 @@ 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/spawn_async_subagent_completion.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_completion.rsindex 5716df1300..478699d0fa 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 8186eb6882..6aac1c51fd 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,9 +301,10 @@ 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();@@ -615,8 +616,10 @@ 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/tools_e2e_continuation_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_continuation_tests.rsindex 0c39f4d048..dcd661fa21 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@@ -308,10 +308,11 @@ 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 27c09f9fa5..6f5a824ecf 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::{run_subagent_via_driver_tool, SubagentRunOptions};+ use crate::agent::subagent_host::{SubagentRunOptions, run_subagent_via_driver_tool};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/session_host/builder/builder_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests.rsindex f860502917..6d0754ae85 100644--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests.rs@@ -396,7 +396,7 @@ fn the_no_tools_sentinel_can_never_name_a_real_tool() {#[test]fn is_empty_tool_scope_distinguishes_the_three_states() {- use crate::agent_registry::host_definition::{is_empty_tool_scope, NO_TOOLS_SENTINEL};+ use crate::agent_registry::host_definition::{NO_TOOLS_SENTINEL, is_empty_tool_scope};use std::collections::HashSet;// Unset — the historical "everything" sentinel.@@ -468,15 +468,19 @@ fn the_repl_tools_join_a_belt_only_while_handle_mode_is_active() {let mut inactive = belt();super::ensure_repl_tools_visible(&mut inactive, false);- assert!(tinyjuice_bus::tools::REPL_TOOLS- .iter()- .all(|n| !inactive.contains(*n)));+ assert!(+ tinyjuice_bus::tools::REPL_TOOLS+ .iter()+ .all(|n| !inactive.contains(*n))+ );let mut active = belt();super::ensure_repl_tools_visible(&mut active, true);- assert!(tinyjuice_bus::tools::REPL_TOOLS- .iter()- .all(|n| active.contains(*n)));+ assert!(+ tinyjuice_bus::tools::REPL_TOOLS+ .iter()+ .all(|n| active.contains(*n))+ );// "No filter" and "deliberately no tools" both stay as they were.let mut unfiltered = std::collections::HashSet::new();diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rsindex 36d9adc52e..2503c55d2d 100644--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rs@@ -6,8 +6,8 @@//! real tool: it is on the belt, and it is advertised.use super::*;-use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::Arc;+use std::sync::atomic::{AtomicUsize, Ordering};/// A tool that does nothing but be present under a name nothing else uses.#[derive(Debug)]@@ -461,9 +461,11 @@ fn permanent_metadata_without_a_source_is_rejected_before_build() {).err().expect("inconsistent permanent metadata must be rejected");- assert!(error- .to_string()- .contains("permanent tool must have exactly one source: missing_source"));+ assert!(+ error+ .to_string()+ .contains("permanent tool must have exactly one source: missing_source")+ );}/// The factory is told the context the session is built under, not thediff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rsindex edd3cd3d0c..9df1feb257 100644--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rs@@ -214,9 +214,11 @@ async fn a_padded_name_is_stored_as_the_definitions_own_id() {.expect("a name that differs only by padding is not a contradiction");assert_eq!(agent.agent_definition_name(), SEAT);- assert!(catalogue(&agent)- .resolve(agent.agent_definition_name())- .await- .expect("resolution never errors")- .is_some());+ assert!(+ catalogue(&agent)+ .resolve(agent.agent_definition_name())+ .await+ .expect("resolution never errors")+ .is_some()+ );}diff --git a/crates/openhuman-core/src/agent/session_host/builder/host_only.rs b/crates/openhuman-core/src/agent/session_host/builder/host_only.rsindex 198c4ca82b..4dbafa2fdb 100644--- a/crates/openhuman-core/src/agent/session_host/builder/host_only.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/host_only.rs@@ -29,8 +29,8 @@ use tinyagents_harness::context::RunContext;use tinyagents_harness::middleware::{PolicyDecision, ToolCallPolicy};use tinyinference_llm::tool::ToolCall;-use crate::agent::tinyagents::host::OpenHumanRunContext;use crate::agent::OpenHumanSessionHost;+use crate::agent::tinyagents::host::OpenHumanRunContext;use crate::config::Config;use anyhow::Result;use tinyagents_definition::{SandboxMode, ToolScope};@@ -45,8 +45,8 @@ pub struct HostOnlyToolPolicy {host: Option<Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,>,}@@ -59,8 +59,8 @@ impl HostOnlyToolPolicy {host: Option<Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,>,) -> Self {@@ -112,15 +112,15 @@ pub(super) fn session_policy(host: Option<Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,>,) -> Option<Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,> {if !host_only {diff --git a/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs b/crates/openhuman-core/src/agent/session_host/builder/host_tools.rsindex 583c1eb887..e544c03186 100644--- a/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs@@ -64,8 +64,8 @@ pub struct HostTurnTools {pub policy: Option<Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,>,}@@ -180,8 +180,8 @@ impl HostTurnTools {mut self,policy: Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,) -> Self {self.policy = Some(policy);@@ -205,8 +205,8 @@ pub(super) struct MergedHostTurnTools {pub policy: Option<Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,>,pub withheld: HashSet<String>,diff --git a/crates/openhuman-core/src/agent/session_host/builder/setters.rs b/crates/openhuman-core/src/agent/session_host/builder/setters.rsindex 448e2cb9ef..88781ae22a 100644--- a/crates/openhuman-core/src/agent/session_host/builder/setters.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/setters.rs@@ -378,8 +378,8 @@ impl SessionHostBuilder {mut self,policy: Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,) -> Self {self.tool_policy = Some(policy);diff --git a/crates/openhuman-core/src/agent/session_host/driver.rs b/crates/openhuman-core/src/agent/session_host/driver.rsindex 08a9f43f6e..896a14c126 100644--- a/crates/openhuman-core/src/agent/session_host/driver.rs+++ b/crates/openhuman-core/src/agent/session_host/driver.rs@@ -18,7 +18,7 @@ use tinyinference_llm::message::Message;use tinytools_agent::dialect::ToolDialect;use crate::agent::tinyagents::{- host::OpenHumanHostBase, host::OpenHumanRunContext, TurnModelSource, TurnSpec,+ TurnModelSource, TurnSpec, host::OpenHumanHostBase, host::OpenHumanRunContext,};/// Immutable host composition consumed by [`OpenHumanSessionDriver`].diff --git a/crates/openhuman-core/src/agent/session_host/driver/grounded_close.rs b/crates/openhuman-core/src/agent/session_host/driver/grounded_close.rsindex ef2f7ac37f..d60af1ec68 100644--- a/crates/openhuman-core/src/agent/session_host/driver/grounded_close.rs+++ b/crates/openhuman-core/src/agent/session_host/driver/grounded_close.rs@@ -23,7 +23,7 @@ use crate::agent::{},tinyagents::{SupplementalTrace, TinyagentsTurnOutcome, TurnModelSource},};-use crate::inference::provider::{BilledUsage, AGENT_TURN_MAX_OUTPUT_TOKENS};+use crate::inference::provider::{AGENT_TURN_MAX_OUTPUT_TOKENS, BilledUsage};/// Accounting from model calls performed after the harness loop has ended.#[derive(Default)]diff --git a/crates/openhuman-core/src/agent/session_host/driver/grounded_close_tests.rs b/crates/openhuman-core/src/agent/session_host/driver/grounded_close_tests.rsindex f9de522431..93d29b87ec 100644--- a/crates/openhuman-core/src/agent/session_host/driver/grounded_close_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/driver/grounded_close_tests.rs@@ -520,12 +520,14 @@ async fn timed_out_repair_keeps_the_usage_of_its_answered_call() {};// A full channel whose receiver is alive: the correction's send blocks.let (progress, _receiver) = tokio::sync::mpsc::channel(1);- assert!(progress- .try_send(AgentProgress::TextDelta {- delta: "earlier".into(),- iteration: 1,- })- .is_ok());+ assert!(+ progress+ .try_send(AgentProgress::TextDelta {+ delta: "earlier".into(),+ iteration: 1,+ })+ .is_ok()+ );let mut usage = RepairUsage::for_model("test-model");let repaired = tokio::time::timeout(diff --git a/crates/openhuman-core/src/agent/session_host/driver_tests.rs b/crates/openhuman-core/src/agent/session_host/driver_tests.rsindex 0b25d057c1..f3fb30ee20 100644--- a/crates/openhuman-core/src/agent/session_host/driver_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/driver_tests.rs@@ -1,7 +1,7 @@use super::*;-fn sidecar(-) -> std::sync::Arc<std::sync::Mutex<crate::agent::tinyagents::host::run_context::SessionTurnSidecar>>+fn sidecar()+-> std::sync::Arc<std::sync::Mutex<crate::agent::tinyagents::host::run_context::SessionTurnSidecar>>{crate::agent::tinyagents::host::OpenHumanRunContext::new().session_sidecar@@ -32,11 +32,13 @@ fn graph_failure_persists_only_accepted_snapshot_history() {assert_eq!(partial.history.len(), 2);assert_eq!(partial.history[0].text(), "stable prefix");assert_eq!(partial.history[1].text(), "request");- assert!(partial- .partial- .expect("display partial")- .content- .contains("provider rejected follow-up"));+ assert!(+ partial+ .partial+ .expect("display partial")+ .content+ .contains("provider rejected follow-up")+ );}#[test]diff --git a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rsindex d993a1705c..434024bf1e 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs@@ -70,10 +70,12 @@ fn codec_marks_failed_tool_rows_from_the_explicit_turn_sidecar() {},).unwrap();- assert!(rows[0]- .tool_failure- .as_ref()- .is_some_and(|failure| failure.failed));+ assert!(+ rows[0]+ .tool_failure+ .as_ref()+ .is_some_and(|failure| failure.failed)+ );}/// The durable record is the parent's OWN spend.diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session.rs b/crates/openhuman-core/src/agent/session_host/runtime_session.rsindex 186e46dd66..27739ccc3c 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_session.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session.rs@@ -39,7 +39,7 @@ use super::types::OpenHumanSessionHost;use crate::agent::{message_convert::{user_message_from_text, user_text_with_markers},session_host::{- driver::OpenHumanSessionDriver, OpenHumanSessionHooks, OpenHumanTranscriptCodec,+ OpenHumanSessionHooks, OpenHumanTranscriptCodec, driver::OpenHumanSessionDriver,},tinyagents::{host::OpenHumanRunContext, middleware::turn_context::TurnContextMiddleware},};@@ -86,8 +86,8 @@ struct OpenHumanTurnPrelude {context_config: crate::config::ContextConfig,tool_policy: Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,tool_dispatcher: Arc<dyn tinytools_agent::dialect::ToolDialect>,workspace_dir: std::path::PathBuf,diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session/permanent_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_session/permanent_tests.rsindex 2137af49b0..54fe438700 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_session/permanent_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session/permanent_tests.rs@@ -1,6 +1,6 @@use super::*;use std::{collections::HashSet, sync::Arc};-use tinyagents_session::transcript::{session_stem, SessionRef};+use tinyagents_session::transcript::{SessionRef, session_stem};use tinyinference_llm::message::Message;use tinytools::ToolSpec;diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rsindex fd1d329616..f7b641d5a8 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs@@ -76,7 +76,7 @@ async fn committed_progress_uses_each_turns_receipt_sender() {#[tokio::test]async fn committed_progress_carries_the_sidecar_stop_on_turn_completed() {use crate::progress::AgentProgress;- use tinyagents_harness::{turn_stop::TurnStopKind, TurnFailureClass, TurnStop};+ use tinyagents_harness::{TurnFailureClass, TurnStop, turn_stop::TurnStopKind};use tinyagents_runtime::{CommitReceipt, ResumeMode, SessionTurnOutcome, TranscriptTurnOptions,};@@ -268,12 +268,14 @@ fn connected_mcp_actions_enter_search_and_leave_on_disconnect() {.clear();prelude.refresh_delegation_tool_surface().unwrap();assert!(!synthesized_tool_names(&prelude).contains(&action));- assert!(!prelude- .tool_surface- .lock()- .expect("tool surface")- .deferred_tool_names- .contains(&action));+ assert!(+ !prelude+ .tool_surface+ .lock()+ .expect("tool surface")+ .deferred_tool_names+ .contains(&action)+ );}#[cfg(feature = "mcp")]@@ -399,10 +401,12 @@ async fn desktop_browser_setting_keeps_deferred_tools_in_fresh_and_resumed_surfa.expect("desktop orchestrator");for name in ["browser", "browser_open"] {assert!(host.deferred_tool_names.contains(name), "{name}");- assert!(!host- .visible_tool_specs_arc()- .iter()- .any(|spec| spec.name == name));+ assert!(+ !host+ .visible_tool_specs_arc()+ .iter()+ .any(|spec| spec.name == name)+ );}host.ensure_runtime_session().expect("runtime session");let prelude = host@@ -713,14 +717,18 @@ async fn newly_connected_action_cannot_shadow_a_permanent_source() {mutable.connected_integrations_authoritative = true;}let error = prelude.refresh_delegation_tool_surface().unwrap_err();- assert!(error- .to_string()- .contains("collision with synthesized tool"));+ assert!(+ error+ .to_string()+ .contains("collision with synthesized tool")+ );let surface = prelude.tool_surface.lock().unwrap();assert!(Arc::ptr_eq(&surface.visible_tool_specs, &before));assert_eq!(surface.tools[0].description(), "host-owned action");- assert!(!surface- .synthesized_tools- .iter()- .any(|tool| tool.name() == "GMAIL_SEND_EMAIL"));+ assert!(+ !surface+ .synthesized_tools+ .iter()+ .any(|tool| tool.name() == "GMAIL_SEND_EMAIL")+ );}diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rsindex 98c1ad4d3d..7414630db2 100644--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs@@ -195,13 +195,13 @@ pub(crate) async fn spawn_async_via_driver_tool(input: String,options: SubagentRunOptions,completion: impl Fn(- String,- Result<SubagentRunOutcome, String>,- bool,- ) -> Pin<Box<dyn Future<Output = ()> + Send>>- + Send- + Sync- + 'static,+ String,+ Result<SubagentRunOutcome, String>,+ bool,+ ) -> Pin<Box<dyn Future<Output = ()> + Send>>+ + Send+ + Sync+ + 'static,) -> Result<String, SubagentRunError> {spawn_async_via_driver_tool_using_jobs(parent, definition, input, options, None, completion).await@@ -215,13 +215,13 @@ pub(crate) async fn spawn_async_via_driver_tool_with_jobs(options: SubagentRunOptions,jobs: tinyagents_harness_tools::subagents::SubAgentJobRegistry,completion: impl Fn(- String,- Result<SubagentRunOutcome, String>,- bool,- ) -> Pin<Box<dyn Future<Output = ()> + Send>>- + Send- + Sync- + 'static,+ String,+ Result<SubagentRunOutcome, String>,+ bool,+ ) -> Pin<Box<dyn Future<Output = ()> + Send>>+ + Send+ + Sync+ + 'static,) -> Result<String, SubagentRunError> {spawn_async_via_driver_tool_using_jobs(parent,@@ -241,13 +241,13 @@ async fn spawn_async_via_driver_tool_using_jobs(options: SubagentRunOptions,jobs: Option<tinyagents_harness_tools::subagents::SubAgentJobRegistry>,completion: impl Fn(- String,- Result<SubagentRunOutcome, String>,- bool,- ) -> Pin<Box<dyn Future<Output = ()> + Send>>- + Send- + Sync- + 'static,+ String,+ Result<SubagentRunOutcome, String>,+ bool,+ ) -> Pin<Box<dyn Future<Output = ()> + Send>>+ + Send+ + Sync+ + 'static,) -> Result<String, SubagentRunError> {let task_id = options.task_iddiff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle_terminal_tests.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle_terminal_tests.rsindex ac5db9c740..f9649a21cc 100644--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle_terminal_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle_terminal_tests.rs@@ -3,8 +3,8 @@ use super::*;#[tokio::test]async fn driver_cancel_uses_the_typed_terminal_for_lossy_idle_sessions() {use crate::agent::orchestration::subagent_sessions::{- cancel_driver_job_by_task, mark_finished, upsert_running, DurableSubagentStatus,- SubagentSessionSelector, SubagentSessionStore, SubagentSessionUpsert,+ DurableSubagentStatus, SubagentSessionSelector, SubagentSessionStore,+ SubagentSessionUpsert, cancel_driver_job_by_task, mark_finished, upsert_running,};let directory = tempfile::tempdir().unwrap();@@ -204,7 +204,7 @@ async fn terminal_and_pause_race_leave_only_one_authoritative_state() {#[tokio::test]async fn shared_flights_are_partitioned_by_agent_and_workspace() {use crate::core::runtime::agent_scope::test_agent_context;- use crate::core::runtime::{context::CoreContext, DomainSet};+ use crate::core::runtime::{DomainSet, context::CoreContext};let root = CoreContext::for_test(DomainSet::full(), None);let alpha = test_agent_context(&root, "alpha");diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rsindex d13962bbbc..875f4d26d0 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs@@ -236,10 +236,12 @@ async fn independent_host_bundles_share_and_project_the_persisted_winner() {!leader.final_history.is_empty(),"winner history is preserved");- assert!(leader- .final_history- .iter()- .any(|row| { row.role == "tool" && row.tool_call_id.as_deref() == Some("call-1") }));+ assert!(+ leader+ .final_history+ .iter()+ .any(|row| { row.role == "tool" && row.tool_call_id.as_deref() == Some("call-1") })+ );assert_eq!(leader.usage.input_tokens, follower.usage.input_tokens);assert!(leader.usage.input_tokens > 0, "winner usage is preserved");assert_eq!(leader.artifact_paths, follower.artifact_paths);@@ -419,19 +421,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/tool_prep.rs b/crates/openhuman-core/src/agent/subagent_host/tool_prep.rsindex 07b28d26d8..22ca3e9e38 100644--- a/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs+++ b/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs@@ -9,7 +9,7 @@ use crate::agent::prompts::PromptContext;use crate::agent_registry::host_definition::AgentDefinition;use tinyagents_definition::{PromptSource, ToolScope};use tinyagents_harness::tool::ToolSnapshot;-use tinyagents_orchestration::subagent::{restrict_tools_with_scope, SubagentRole};+use tinyagents_orchestration::subagent::{SubagentRole, restrict_tools_with_scope};use tinytools::Tool;// ── Prompt dialect selection ────────────────────────────────────────────diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/packed_tool_route_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/packed_tool_route_tests.rsindex 8d09df2f46..f96933701a 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/packed_tool_route_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/packed_tool_route_tests.rs@@ -2,7 +2,7 @@ use super::*;use std::collections::{HashMap, HashSet};use async_trait::async_trait;-use serde_json::{json, Value};+use serde_json::{Value, json};use tinyagents_harness::context::{RunConfig, RunContext};use tinyagents_harness::middleware::Middleware;use tinyinference_llm::tool::ToolCall as TaToolCall;diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rsindex 74129e776c..bf5a0ced50 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rs@@ -148,15 +148,21 @@ fn desktop_approval_bypass_skips_only_require_approval_channel_verdict() {}let approval_middleware = middleware(ToolPolicyAction::RequireApproval);let request = call("desktop_goal", json!({"app":"TextEdit","goal":"type"}));- assert!(approval_middleware- .channel_permission_block(&request, false)- .is_some());- assert!(approval_middleware- .channel_permission_block(&request, true)- .is_none());- assert!(middleware(ToolPolicyAction::Deny)- .channel_permission_block(&request, true)- .is_some());+ assert!(+ approval_middleware+ .channel_permission_block(&request, false)+ .is_some()+ );+ assert!(+ approval_middleware+ .channel_permission_block(&request, true)+ .is_none()+ );+ assert!(+ middleware(ToolPolicyAction::Deny)+ .channel_permission_block(&request, true)+ .is_some()+ );}fn call(name: &str, args: serde_json::Value) -> TaToolCall {diff --git a/crates/openhuman-core/src/agent/tinyagents/nested_calls_tests.rs b/crates/openhuman-core/src/agent/tinyagents/nested_calls_tests.rsindex 41cf90190f..581ef8f1e4 100644--- a/crates/openhuman-core/src/agent/tinyagents/nested_calls_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/nested_calls_tests.rs@@ -12,7 +12,7 @@use std::sync::{Arc, Mutex};use async_trait::async_trait;-use serde_json::{json, Value};+use serde_json::{Value, json};use tinyagents_definition::{AgentDefinition, InMemoryDefinitionRegistry};use tinyagents_harness::context::{RunConfig, RunContext};use tinyagents_harness::host::{@@ -158,7 +158,7 @@ async fn run_with_hooks(target: &'static str) -> (Option<Outcome>, usize, usize)let (secret, secret_ran) = leaf("secret");let outcome = Arc::new(Mutex::new(None));let mut harness: AgentHarness<(), OpenHumanRunContext> = AgentHarness::new();- harness.with_model( model());+ harness.with_model(model());harness.with_policy(nested_enabled());harness.register_tool(allowed);harness.register_tool(secret);@@ -225,10 +225,9 @@ async fn the_security_gate_refuses_a_nested_call_on_the_hosted_path() {));let host = HostCapabilities::new(Arc::new(StaticContextComposer::empty()),- Arc::new(InMemoryDefinitionRegistry::new(vec![AgentDefinition::new(- "helper", "Helper", "test",- )- .with_tools(["caller", "read_file"])])),+ Arc::new(InMemoryDefinitionRegistry::new(vec![+ AgentDefinition::new("helper", "Helper", "test").with_tools(["caller", "read_file"]),+ ])),gate,Arc::new(FixedModelResolver::new(model())),);diff --git a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rs b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rsindex 51ab0f0ffe..46d28d4584 100644--- a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rs@@ -107,9 +107,7 @@ async fn unary_summarizer_child_keeps_summary_output_off_the_streaming_path() {let child = unary_child_context(&parent, "summarizer", 1, 128).expect("child context");let model = Arc::new(UnaryOnlyModel(AtomicBool::new(false)));let mut harness: AgentHarness<(), OpenHumanRunContext> = AgentHarness::new();- harness- .with_model( model.clone())- ;+ harness.with_model(model.clone());let run = harness.invoke_in_context(&(), child, vec![Message::user("summarize this")])diff --git a/crates/openhuman-core/src/agent/tinyagents/prompt_cache_golden_tests.rs b/crates/openhuman-core/src/agent/tinyagents/prompt_cache_golden_tests.rsindex 81a107d629..9be73d1664 100644--- a/crates/openhuman-core/src/agent/tinyagents/prompt_cache_golden_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/prompt_cache_golden_tests.rs@@ -17,7 +17,7 @@use std::sync::Arc;use async_trait::async_trait;-use serde_json::{json, Value};+use serde_json::{Value, json};use tinyagents_harness::context::RunConfig;use tinyagents_harness::middleware::PromptCacheGuardMiddleware;use tinyagents_harness::runtime::AgentHarness;@@ -79,9 +79,7 @@ async fn run(s: &Scenario) -> Value {vec![ModelResponse::assistant("done")]}));let mut harness: AgentHarness<(), OpenHumanRunContext> = AgentHarness::new();- harness- .with_model( model.clone())- ;+ harness.with_model(model.clone());if s.with_tools {harness.register_tool(Arc::new(Lookup));}diff --git a/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs b/crates/openhuman-core/src/agent/tinyagents/routes_tests.rsindex 0f1f4f28e7..98087de729 100644--- a/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/routes_tests.rs@@ -77,7 +77,9 @@ async fn run_recorded_route(PrebuiltModelResolver::new(primary, [("backup".into(), successful)]).with_primary_name("primary"),);- harness.with_model_resolver(resolver).with_policy(RunPolicy {+ harness+ .with_model_resolver(resolver)+ .with_policy(RunPolicy {retry: tinyagents_harness::retry::RetryPolicy::default().with_max_attempts(1),fallback: Some(tinyagents_harness::retry::FallbackPolicy::new(["primary", "backup",@@ -164,17 +166,20 @@ async fn resolved_route_enrichment_uses_actual_provider_model_and_call_identity(_ => None,}).expect("model attempt has a native call id");- assert!(events.iter().any(|event| matches!(- event,- AgentEvent::GenerationEnriched { call_id: enriched, enrichment }- if enriched == &call_id- && enrichment.provider_id.as_deref() == Some("anthropic")- && enrichment.pricing.as_ref().is_some_and(|pricing| {- pricing.input_per_mtok_usd == Some(5.0)- && pricing.cached_input_per_mtok_usd == Some(0.5)- && pricing.output_per_mtok_usd == Some(25.0)- })- )), "pricing and provider metadata use the actual response route, not configured fallback values; events={events:#?}");+ assert!(+ events.iter().any(|event| matches!(+ event,+ AgentEvent::GenerationEnriched { call_id: enriched, enrichment }+ if enriched == &call_id+ && enrichment.provider_id.as_deref() == Some("anthropic")+ && enrichment.pricing.as_ref().is_some_and(|pricing| {+ pricing.input_per_mtok_usd == Some(5.0)+ && pricing.cached_input_per_mtok_usd == Some(0.5)+ && pricing.output_per_mtok_usd == Some(25.0)+ })+ )),+ "pricing and provider metadata use the actual response route, not configured fallback values; events={events:#?}"+ );}#[tokio::test]diff --git a/crates/openhuman-core/src/agent/tinyagents/tinyagents_tests.rs b/crates/openhuman-core/src/agent/tinyagents/tinyagents_tests.rsindex db0b3b9e93..8730378808 100644--- a/crates/openhuman-core/src/agent/tinyagents/tinyagents_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/tinyagents_tests.rs@@ -142,7 +142,7 @@ async fn run_policy_decodes_stringified_nested_object_arguments() {let mut harness: tinyagents_harness::runtime::AgentHarness<()> =tinyagents_harness::runtime::AgentHarness::new();- harness.with_model( model);+ harness.with_model(model);harness.register_tool(tool.clone());harness.with_policy(run_policy_for(10, false));diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rsindex 78c8ca81e4..dd75841b9a 100644--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs@@ -7,22 +7,22 @@ use std::collections::HashSet;use std::sync::Arc;use async_trait::async_trait;-use tinyagents_harness_tools::skills::{PackSelection, UseSkillDispatch, USE_SKILL};use tinyagents_harness::tool::{CanonicalSharedToolAdapter, ToolDispatch, ToolExecScope, ToolExecution, ToolExecutionContext,};use tinyagents_harness_tools::goals::GoalToolKind;+use tinyagents_harness_tools::skills::{PackSelection, USE_SKILL, UseSkillDispatch};use tinyagents_registry::{CapabilityRegistry, ComponentKind, RegistryDiagnostic};use tinyagents_runtime::turn_driver::{SharedToolSet, ToolSetBuilder};-use tinyagents_runtime::{project_descriptors, ToolAdmission};+use tinyagents_runtime::{ToolAdmission, project_descriptors};use tinyinference_llm::model::ChatModel;use tinytools::{Tool, ToolCallOptions, ToolResult, ToolRunContext};use crate::agent::orchestration::tools::{ContinueSubagentDispatch, DelegationDispatch, SpawnAsyncSubagentDispatch, SpawnSubagentDispatch,};-use crate::agent::tinyagents::host::run_context::HostOperationContext;use crate::agent::tinyagents::host::OpenHumanRunContext;+use crate::agent::tinyagents::host::run_context::HostOperationContext;use crate::agent::tinyagents::turn_policy::is_subagent_spawn_or_delegate_tool;use crate::agent::tools::TodoToolDispatch;use crate::core::runtime::CoreContext;diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rsindex 69c54f1820..e8693bc362 100644--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs@@ -134,7 +134,7 @@ async fn static_live_harness_builder_resolves_control_aliases_from_the_executionDurableSubagentSession, DurableSubagentStatus, SubagentSessionStore,};use tinyagents_harness::{- agent_loop::phases::execute_tool_batch, context::RunConfig, ComponentId,+ ComponentId, agent_loop::phases::execute_tool_batch, context::RunConfig,};let workspace = tempfile::tempdir().expect("live harness workspace");@@ -245,7 +245,7 @@ async fn live_close_alias_enforces_parent_thread_ownership() {DurableSubagentSession, DurableSubagentStatus, SubagentSessionStore,};use tinyagents_harness::{- agent_loop::phases::execute_tool_batch, context::RunConfig, ComponentId,+ ComponentId, agent_loop::phases::execute_tool_batch, context::RunConfig,};let workspace = tempfile::tempdir().expect("live harness workspace");@@ -382,7 +382,7 @@ async fn live_close_alias_enforces_parent_thread_ownership() {#[tokio::test]async fn registered_memory_dispatch_enforces_one_budget_across_distinct_calls() {use crate::memory::test_fixtures::{bind_reference, config_in};- use tinyagents_harness::{context::RunConfig, CallId};+ use tinyagents_harness::{CallId, context::RunConfig};use tinytools::ToolCallOptions;let workspace = tempfile::tempdir().unwrap();let config = config_in(&workspace);diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_exec.rs b/crates/openhuman-core/src/agent/tinyagents/turn_exec.rsindex b0ba4f884c..48c5b96dac 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_exec.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_exec.rs@@ -16,26 +16,26 @@ use tinyagents_harness::runtime::{AgentInvocation, AgentTurnRequest, InvocationRuse tinyagents_harness::store::{InMemoryStore as ToolResultArtifactIndexStore, StoreRegistry};use tinyagents_harness::tool::ToolSnapshot;use tinyagents_harness::turn_policy::effective_max_iterations;+use tinyagents_runtime::DriverRequest;use tinyagents_runtime::turn_driver::{SubagentScope as DriverSubagentScope, TurnControls, TurnDriver, TurnScope,};-use tinyagents_runtime::DriverRequest;use crate::agent::harness::tool_result_artifacts::TINYAGENTS_TOOL_RESULT_ARTIFACT_STORE;+use crate::agent::tinyagents::NativeSubagentRunContext;use crate::agent::tinyagents::host::OpenHumanRunContext;use crate::agent::tinyagents::middleware::turn_context::TurnContextMiddleware;use crate::agent::tinyagents::observability::{OpenhumanEventBridge, SubagentScope};use crate::agent::tinyagents::tool_registration::capability_diagnostics;use crate::agent::tinyagents::turn_middleware::{- install_turn_middleware, TurnMiddlewareInputs, TurnWiring,+ TurnMiddlewareInputs, TurnWiring, install_turn_middleware,};use crate::agent::tinyagents::turn_outcome::TinyagentsTurnOutcome;use crate::agent::tinyagents::turn_plan::{- enforce_registry_diagnostics, turn_models_for_plan, turn_run_policy, OpenHumanTurnPlanner,+ OpenHumanTurnPlanner, enforce_registry_diagnostics, turn_models_for_plan, turn_run_policy,};use crate::agent::tinyagents::turn_run_error::map_turn_run_error;use crate::agent::tinyagents::turn_run_finalize::finalize_turn_outcome;-use crate::agent::tinyagents::NativeSubagentRunContext;use crate::agent::tinyagents::{journal, routes, steering_forwarder};use crate::inference::turn_models::TurnModels;use tinyagents_harness::events::EventSink;diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rs b/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rsindex 16c40a5ed5..5bd6d1df3b 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rs@@ -15,13 +15,13 @@ use std::sync::Arc;use tinyagents_harness::cache::InMemoryResponseCache;use tinyagents_harness::middleware::{- install_unmet_deliverable, is_repeat_call_exempt, tool_sets_lookup, ResearchBudgetMiddleware,- ShellTurnBudget, TurnClockMiddleware, DIRECT_WEB_READ_LIMIT,+ ApprovalGateMiddleware, ArgRecoveryMiddleware, BudgetLimits, BudgetMiddleware,+ ContextCompressionMiddleware, PromptCacheGuardMiddleware, RepeatProgressMiddleware,+ RunModeHandle, ToolPolicyMiddleware as TaToolPolicyMiddleware, plan_mode_middleware,};use tinyagents_harness::middleware::{- plan_mode_middleware, ApprovalGateMiddleware, ArgRecoveryMiddleware, BudgetLimits,- BudgetMiddleware, ContextCompressionMiddleware, PromptCacheGuardMiddleware,- RepeatProgressMiddleware, RunModeHandle, ToolPolicyMiddleware as TaToolPolicyMiddleware,+ DIRECT_WEB_READ_LIMIT, ResearchBudgetMiddleware, ShellTurnBudget, TurnClockMiddleware,+ install_unmet_deliverable, is_repeat_call_exempt, tool_sets_lookup,};use tinyagents_harness::runtime::AgentHarness;use tinyagents_harness::steering::SteeringHandle;diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_plan_tests.rs b/crates/openhuman-core/src/agent/tinyagents/turn_plan_tests.rsindex b345e26c8a..73e931c915 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_plan_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_plan_tests.rs@@ -9,8 +9,8 @@ use tinyagents_harness::tool::ToolSnapshot;use tinyagents_harness::turn_policy::{DEFAULT_MODEL_CALL_TIMEOUT_SECS, LOCAL_MODEL_CALL_TIMEOUT_SECS,};-use tinyagents_runtime::turn_driver::{SharedToolSet, TurnControls, TurnDriver};use tinyagents_runtime::DriverRequest;+use tinyagents_runtime::turn_driver::{SharedToolSet, TurnControls, TurnDriver};use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};use tinytools::{Tool, ToolResult};diff --git a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rsindex 2c999e0501..b48d100e77 100644--- a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs@@ -21,9 +21,9 @@ use async_trait::async_trait;use serde_json::json;use std::path::Path;use std::sync::Arc;-use tinyagents_harness::context::RunConfig;-use tinyagents_harness_tools::skills::{PackRegistryHandle, UseSkillTool, USE_SKILL};use tinyagents_harness::CallId;+use tinyagents_harness::context::RunConfig;+use tinyagents_harness_tools::skills::{PackRegistryHandle, USE_SKILL, UseSkillTool};use tinyinference_llm::message::Message;use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};use tinytools::{Tool, ToolCallOptions, ToolResult};diff --git a/crates/openhuman-core/src/agent/tinyagents/verify_before_finish_tests.rs b/crates/openhuman-core/src/agent/tinyagents/verify_before_finish_tests.rsindex 7dbbe29c67..818016d2ab 100644--- a/crates/openhuman-core/src/agent/tinyagents/verify_before_finish_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/verify_before_finish_tests.rs@@ -67,7 +67,7 @@ async fn drive_with(responses.push(ModelResponse::assistant("draft".to_string()));responses.push(ModelResponse::assistant("checked".to_string()));let mut harness: AgentHarness<()> = AgentHarness::new();- harness.with_model( Arc::new(ScriptedModel::new(responses)));+ harness.with_model(Arc::new(ScriptedModel::new(responses)));harness.register_tool(Arc::new(FakeTool::returning("lookup", "ok")));harness.register_tool(Arc::new(FakeTool::returning("todo", "ok")));harness.with_policy(RunPolicy {@@ -199,7 +199,7 @@ async fn requirements_check_allows_a_fix_for_different_tasks() {]);let model = Arc::new(ScriptedModel::new(responses));let mut harness: AgentHarness<()> = AgentHarness::new();- harness.with_model( model.clone());+ harness.with_model(model.clone());harness.register_tool(Arc::new(FakeTool::returning("lookup", "ok")));harness.with_policy(RunPolicy {limits: RunLimits::default().with_max_model_calls(50),diff --git a/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs b/crates/openhuman-core/src/agent/tools/plan_exit_tests.rsindex 98cede5658..3162c67568 100644--- a/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs+++ b/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs@@ -1,4 +1,4 @@-use crate::agent::tools::{PlanExitTool, PLAN_EXIT_MARKER};+use crate::agent::tools::{PLAN_EXIT_MARKER, PlanExitTool};use crate::plan_review::PlanReviewResolution;use serde_json::json;use tinytools::{PermissionLevel, Tool, ToolCallOptions, ToolRunContext};@@ -63,13 +63,15 @@ async fn plan_exit_does_not_flip_while_a_review_is_parked() {// Resolve the parked review so the spawned task and the gate's// bookkeeping don't leak past this test.- assert!(crate::plan_review::gate::global().decide_by_thread(- &crate::core::runtime::DispatchCtx::ambient()- .tenant()- .unwrap(),- thread_id,- PlanReviewResolution::Approve,- ));+ assert!(+ crate::plan_review::gate::global().decide_by_thread(+ &crate::core::runtime::DispatchCtx::ambient()+ .tenant()+ .unwrap(),+ thread_id,+ PlanReviewResolution::Approve,+ )+ );let resolution = parked.await.unwrap();assert_eq!(resolution, PlanReviewResolution::Approve);diff --git a/crates/openhuman-core/src/agent/tools/todo_tests.rs b/crates/openhuman-core/src/agent/tools/todo_tests.rsindex 4523b1199a..c93775289f 100644--- a/crates/openhuman-core/src/agent/tools/todo_tests.rs+++ b/crates/openhuman-core/src/agent/tools/todo_tests.rs@@ -1,5 +1,5 @@use super::*;-use serde_json::{json, Value};+use serde_json::{Value, json};use tinyagents_harness_tools::todos::{TodoItem, TodoStatus};/// Serialize tests that share the process-global scratch store. Same lockdiff --git a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests.rs b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests.rsindex c293e59383..f88ba0ee7c 100644--- a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests.rs+++ b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests.rs@@ -416,8 +416,11 @@ fn connected_integrations_block_is_format_independent() {#[test]fn connected_integrations_block_routes_capability_questions_to_search() {let guide = render_connected_integrations(&gmail_only());- assert!(guide- .contains("Its results, not prior knowledge or past answers, say what a toolkit can do."));+ assert!(+ guide.contains(+ "Its results, not prior knowledge or past answers, say what a toolkit can do."+ )+ );assert!(!guide.contains("integrations_agent"));}@@ -554,8 +557,11 @@ fn build_carries_the_spec_check_grounding_rules() {assert!(body.contains("Checks must mirror how the task is specified or graded"));assert!(body.contains("Never delete state, data or services the solution needs at runtime"));assert!(body.contains("Verify the final state as a fresh consumer would see it."));- assert!(body- .contains("List the request's stated constraints, filters and thresholds as `todo` items"));+ assert!(+ body.contains(+ "List the request's stated constraints, filters and thresholds as `todo` items"+ )+ );}#[test]diff --git a/crates/openhuman-core/src/agent_runs/subagent_control.rs b/crates/openhuman-core/src/agent_runs/subagent_control.rsindex 427dee6bd0..2f096a4229 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::{json, Map, Value};+use serde_json::{Map, Value, json};use tinyagents_orchestration::steering::SteerError;use crate::agent::orchestration::running_subagents::CancelledSubagent;use crate::agent::orchestration::{background_completions, running_subagents, subagent_sessions};-use crate::core::all::{ControllerFuture, RegisteredController};use crate::core::Outcome;+use crate::core::all::{ControllerFuture, RegisteredController};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 b0da293296..8a82a22acd 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::{- mark_finished, upsert_running, DriverTaskCancellation, DurableSubagentStatus,- SubagentSessionSelector, SubagentSessionStore, SubagentSessionUpsert,+ DriverTaskCancellation, DurableSubagentStatus, SubagentSessionSelector,+ SubagentSessionStore, SubagentSessionUpsert, mark_finished, upsert_running,};use tinyagents_orchestration::subagent::SubagentTaskKey;use tinyagents_tasks::CompletionStatus;@@ -213,13 +213,15 @@ 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/memory/lifecycle/session_hooks_tests.rs b/crates/openhuman-core/src/memory/lifecycle/session_hooks_tests.rsindex b0cb9e3e6c..5ded847bfa 100644--- a/crates/openhuman-core/src/memory/lifecycle/session_hooks_tests.rs+++ b/crates/openhuman-core/src/memory/lifecycle/session_hooks_tests.rs@@ -1,6 +1,6 @@use super::*;-use tinyagents_harness::summarization::{checkpoint_message, SummaryPlacement};+use tinyagents_harness::summarization::{SummaryPlacement, checkpoint_message};use tinyinference_llm::ToolCall;fn assistant_with_call(id: &str, name: &str) -> Message {diff --git a/crates/openhuman-core/src/skills/search.rs b/crates/openhuman-core/src/skills/search.rsindex eee9b0fbc7..d90a48b197 100644--- a/crates/openhuman-core/src/skills/search.rs+++ b/crates/openhuman-core/src/skills/search.rs@@ -34,7 +34,7 @@ use std::path::PathBuf;use std::sync::Arc;use async_trait::async_trait;-use serde_json::{json, Value};+use serde_json::{Value, json};use super::ops_discover::{discover_workflows, is_workspace_trusted};use crate::config::Config;diff --git a/crates/openhuman-core/src/storage/import/sessions.rs b/crates/openhuman-core/src/storage/import/sessions.rsindex 1569b75365..c21a9fee1b 100644--- a/crates/openhuman-core/src/storage/import/sessions.rs+++ b/crates/openhuman-core/src/storage/import/sessions.rs@@ -32,11 +32,11 @@ use std::path::{Path, PathBuf};use std::sync::Arc;use anyhow::{Context, Result};+use tinyagents_session::DriverSessionStores;use tinyagents_session::legacy::{- import_transcripts, import_turn_states, QuiescentSource, SourceOwner,+ QuiescentSource, SourceOwner, import_transcripts, import_turn_states,};-use tinyagents_session::transcript::{session_stem, SessionRef};-use tinyagents_session::DriverSessionStores;+use tinyagents_session::transcript::{SessionRef, session_stem};use super::tinyflows::{finish, marked};use super::{Outcome, Report, Snapshot};diff --git a/crates/openhuman-core/src/storage/import/sessions_tests.rs b/crates/openhuman-core/src/storage/import/sessions_tests.rsindex 001f6b601d..84e76c4c5b 100644--- a/crates/openhuman-core/src/storage/import/sessions_tests.rs+++ b/crates/openhuman-core/src/storage/import/sessions_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::storage::rusqlite;use crate::storage::MemoryStorage;+use crate::storage::rusqlite;use crate::util::classic_transcript_fixture::write_classic;use sha2::Digest as _;use std::collections::BTreeMap;diff --git a/crates/openhuman-core/src/storage/sessions/mod.rs b/crates/openhuman-core/src/storage/sessions/mod.rsindex bacc63063d..8230c6fbbe 100644--- a/crates/openhuman-core/src/storage/sessions/mod.rs+++ b/crates/openhuman-core/src/storage/sessions/mod.rs@@ -23,14 +23,14 @@ mod rebound;mod tenant_router;mod workspace;-pub use rebound::{rebind_all, ReboundSessionStores, StoreRegistry};+pub use rebound::{ReboundSessionStores, StoreRegistry, rebind_all};pub use tenant_router::TenantSessionStores;pub use workspace::{- artifact_blobs_for, artifact_scoped_for_in, attachment_stash_for, current_documents_for,- default_turn_states_for, ledger_for, provider_for_workspace, provider_for_workspace_in,- release_workspace, release_workspace_defaults, require_ledger, session_scope,- status_store_for, stores_for, stores_or_ephemeral, turn_states_for, with_ledger,- with_ledger_async, WorkspaceSessionStores,+ WorkspaceSessionStores, artifact_blobs_for, artifact_scoped_for_in, attachment_stash_for,+ current_documents_for, default_turn_states_for, ledger_for, provider_for_workspace,+ provider_for_workspace_in, release_workspace, release_workspace_defaults, require_ledger,+ session_scope, status_store_for, stores_for, stores_or_ephemeral, turn_states_for, with_ledger,+ with_ledger_async,};static PROVIDER: LazyLock<RwLock<Option<Arc<dyn SessionStoreProvider>>>> =diff --git a/crates/openhuman-core/src/storage/sessions/mod_tests.rs b/crates/openhuman-core/src/storage/sessions/mod_tests.rsindex 549e277dd4..2fbd5afda7 100644--- a/crates/openhuman-core/src/storage/sessions/mod_tests.rs+++ b/crates/openhuman-core/src/storage/sessions/mod_tests.rs@@ -318,11 +318,13 @@ async fn a_stashed_attachment_survives_a_restart_of_the_workspace_store() {resumed.read_data_uri("att-1").await.unwrap().as_deref(),Some(data_uri));- assert!(resumed- .read_data_uri("never-stashed")- .await- .unwrap()- .is_none());+ assert!(+ resumed+ .read_data_uri("never-stashed")+ .await+ .unwrap()+ .is_none()+ );}#[test]diff --git a/crates/openhuman-core/src/storage/sessions/tenant_router.rs b/crates/openhuman-core/src/storage/sessions/tenant_router.rsindex 3906fef9c5..9e08731fef 100644--- a/crates/openhuman-core/src/storage/sessions/tenant_router.rs+++ b/crates/openhuman-core/src/storage/sessions/tenant_router.rs@@ -13,8 +13,8 @@ use std::collections::HashMap;use std::sync::{Arc, Mutex, PoisonError};use tinyagents_harness::store::SchemaAdmission;-use tinyagents_session::port::{AgentStores, SessionStoreProvider};use tinyagents_session::DriverSessionStores;+use tinyagents_session::port::{AgentStores, SessionStoreProvider};use tinystoragedrivers::{Blocking, Scope, StorageBackend, StorageError};/// Session stores over one backend, routed to a per-tenant provider.diff --git a/crates/openhuman-core/src/threads/ops/crud.rs b/crates/openhuman-core/src/threads/ops/crud.rsindex 9f4903358b..0093ca38dd 100644--- a/crates/openhuman-core/src/threads/ops/crud.rs+++ b/crates/openhuman-core/src/threads/ops/crud.rs@@ -5,11 +5,11 @@ use super::support::{counts, envelope, message_to_record, record_to_message, run_to_completion, thread_to_summary,workspace_dir,};-use crate::core::runtime::DispatchCtx;use crate::core::Outcome;+use crate::core::runtime::DispatchCtx;+use crate::threads::ThreadsError;use crate::threads::store as conversations;use crate::threads::store::{ConversationMessagePatch, CrossThreadHit};-use crate::threads::ThreadsError;use crate::threads::{ApiEnvelope, AppendConversationMessageRequest, ConversationMessageRecord,ConversationMessagesRequest, ConversationMessagesResponse, ConversationThreadSummary,diff --git a/crates/openhuman-core/src/threads/ops/crud_message_append_tests.rs b/crates/openhuman-core/src/threads/ops/crud_message_append_tests.rsindex 1eff122c93..964dda7317 100644--- a/crates/openhuman-core/src/threads/ops/crud_message_append_tests.rs+++ b/crates/openhuman-core/src/threads/ops/crud_message_append_tests.rs@@ -111,47 +111,55 @@ async fn user_append_stages_original_strips_upload_bytes_and_reuses_returned_con.await.unwrap();assert_eq!(persisted.len(), 2);- assert!(!serde_json::to_string(&persisted)- .unwrap()- .contains("base64,"));+ assert!(+ !serde_json::to_string(&persisted)+ .unwrap()+ .contains("base64,")+ );}#[tokio::test]async fn rejected_upload_never_appends_a_message() {let (_temp, mut config) = setup().await;config.multimodal_files.max_files = 0;- assert!(append_with_test_config(- request(- "disabled",- "[IMAGE:data:image/png;base64,iVBORw0KGgo=]",- "user"- ),- &config,- None,- )- .await- .is_err());+ assert!(+ append_with_test_config(+ request(+ "disabled",+ "[IMAGE:data:image/png;base64,iVBORw0KGgo=]",+ "user"+ ),+ &config,+ None,+ )+ .await+ .is_err()+ );config.multimodal_files.max_files = 3;- assert!(append_with_test_config(- request("bad", "[FILE:data:application/zip;base64,!]", "user"),- &config,- None,- )- .await- .is_err());+ assert!(+ append_with_test_config(+ request("bad", "[FILE:data:application/zip;base64,!]", "user"),+ &config,+ None,+ )+ .await+ .is_err()+ );assert!(append_with_test_config(request("missing", "image.png", "user"), &config, None).await.is_err());- assert!(conversations::blocking::get_messages(- crate::core::runtime::DispatchCtx::ambient(),- config.workspace_dir.clone(),- "uploads".into()- )- .await- .unwrap()- .is_empty());+ assert!(+ conversations::blocking::get_messages(+ crate::core::runtime::DispatchCtx::ambient(),+ config.workspace_dir.clone(),+ "uploads".into()+ )+ .await+ .unwrap()+ .is_empty()+ );}#[tokio::test]@@ -179,14 +187,16 @@ async fn external_origin_cannot_reuse_an_existing_attachment_marker() {.await.is_err());- assert!(conversations::blocking::get_messages(- crate::core::runtime::DispatchCtx::ambient(),- config.workspace_dir,- "uploads".into()- )- .await- .unwrap()- .is_empty());+ assert!(+ conversations::blocking::get_messages(+ crate::core::runtime::DispatchCtx::ambient(),+ config.workspace_dir,+ "uploads".into()+ )+ .await+ .unwrap()+ .is_empty()+ );}#[tokio::test]@@ -255,14 +265,16 @@ async fn append_uses_host_persistence_workspace_separate_from_rpc_config() {.await.unwrap();assert_eq!(persisted.len(), 1);- assert!(conversations::blocking::get_messages(- crate::core::runtime::DispatchCtx::ambient(),- config.workspace_dir,- "uploads".into()- )- .await- .unwrap()- .is_empty());+ assert!(+ conversations::blocking::get_messages(+ crate::core::runtime::DispatchCtx::ambient(),+ config.workspace_dir,+ "uploads".into()+ )+ .await+ .unwrap()+ .is_empty()+ );}#[tokio::test]@@ -273,17 +285,21 @@ async fn poster_only_user_metadata_is_rejected_before_persistence() {"attachmentNames": ["video.mp4"],"attachmentPosters": ["data:image/png;base64,iVBORw0KGgo="]});- assert!(append_with_test_config(upload, &config, None)+ assert!(+ append_with_test_config(upload, &config, None)+ .await+ .is_err()+ );+ assert!(+ conversations::blocking::get_messages(+ crate::core::runtime::DispatchCtx::ambient(),+ config.workspace_dir.clone(),+ "uploads".into()+ ).await- .is_err());- assert!(conversations::blocking::get_messages(- crate::core::runtime::DispatchCtx::ambient(),- config.workspace_dir.clone(),- "uploads".into()- )- .await- .unwrap()- .is_empty());+ .unwrap()+ .is_empty()+ );}#[tokio::test]diff --git a/crates/openhuman-core/src/tools/ops_tests.rs b/crates/openhuman-core/src/tools/ops_tests.rsindex 26d404ba0d..ece8b45aa3 100644--- a/crates/openhuman-core/src/tools/ops_tests.rs+++ b/crates/openhuman-core/src/tools/ops_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::config::{BrowserConfig, Config};-use crate::security::credentials::{AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME};use crate::security::AuditLogger;+use crate::security::credentials::{APP_SESSION_PROVIDER, AuthService, DEFAULT_AUTH_PROFILE_NAME};use crate::tools::ops::{all_tools, tool_group};use tempfile::TempDir;use tinytools::ToolContent;diff --git a/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs b/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rsindex 15af6b8c9b..8f00bee316 100644--- a/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs+++ b/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs@@ -354,8 +354,8 @@ fn memory_tool_classifies_as_memory_family() {/// A narrowed DomainSet axis still keeps the ordinary platform tools.#[tokio::test]async fn full_domain_set_keeps_platform_tools() {- use crate::core::runtime::context::CoreContext;use crate::core::runtime::DomainSet;+ use crate::core::runtime::context::CoreContext;let tmp = TempDir::new().unwrap();let ctx = CoreContext::for_test(DomainSet::full(), None);diff --git a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rsindex f9b1dd7142..e5d6bd8825 100644--- a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs+++ b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs@@ -27,9 +27,11 @@ fn all_tools_registers_the_memory_tool_while_memory_is_on() {);// The search half of deferral is the harness's intrinsic bridge, never a// registered tool: a host `tool_search` would shadow it.- assert!(!tools- .iter()- .any(|tool| { tool.name() == tinytools::TOOL_SEARCH_NAME }));+ assert!(+ !tools+ .iter()+ .any(|tool| { tool.name() == tinytools::TOOL_SEARCH_NAME })+ );}/// The three `whatsapp_data_*` agent tools are gone, in every build.///diff --git a/crates/openhuman-core/src/tools/toolpacks/mod.rs b/crates/openhuman-core/src/tools/toolpacks/mod.rsindex ea56cda198..b3e9440cc2 100644--- a/crates/openhuman-core/src/tools/toolpacks/mod.rs+++ b/crates/openhuman-core/src/tools/toolpacks/mod.rs@@ -26,14 +26,14 @@ pub mod groups;pub mod ops;pub mod registry;-pub use groups::{set_process_default, GroupMode, ToolGroups, GROUP_COUNT};+pub use groups::{GROUP_COUNT, GroupMode, ToolGroups, set_process_default};pub use ops::{append_pack_tools, bind_pack_registry, bind_synthesized_pack_registry, close_handed_off_packs,closed_by_direct_handoff, strip_packed_from_visible,};pub use registry::{- all_packed_tool_names, callable_pack_ids, pack, pack_for_tool, pack_index_markdown_filtered,- CATALOG, PACKS,+ CATALOG, PACKS, all_packed_tool_names, callable_pack_ids, pack, pack_for_tool,+ pack_index_markdown_filtered,};#[cfg(test)]diff --git a/crates/openhuman-core/src/tools/toolpacks/ops.rs b/crates/openhuman-core/src/tools/toolpacks/ops.rsindex b5db31bec0..5d674d8d25 100644--- a/crates/openhuman-core/src/tools/toolpacks/ops.rs+++ b/crates/openhuman-core/src/tools/toolpacks/ops.rs@@ -4,7 +4,7 @@ use std::collections::HashSet;use std::sync::{Arc, Weak};use super::registry;-use tinyagents_harness_tools::skills::{PackRegistryHandle, UseSkillTool, USE_SKILL};+use tinyagents_harness_tools::skills::{PackRegistryHandle, USE_SKILL, UseSkillTool};use tinytools::Tool;/// Append `use_skill` to a freshly built registry.diff --git a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rsindex 42fa9ada38..9b3fb464a1 100644--- a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs+++ b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs@@ -8,7 +8,7 @@ use std::collections::HashSet;use std::sync::Arc;use async_trait::async_trait;-use serde_json::{json, Value};+use serde_json::{Value, json};use super::*;use tinyagents_harness_tools::skills::USE_SKILL;diff --git a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rsindex fb138d2029..667d3e0831 100644--- a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs+++ b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs@@ -2,7 +2,7 @@//! execution distinction the whole pack mechanism rests on.use super::*;-use tinyagents_harness_tools::skills::{route_sentence, USE_SKILL};+use tinyagents_harness_tools::skills::{USE_SKILL, route_sentence};// ── the index must agree with the gate too ──────────────────────────────────diff --git a/crates/openhuman-core/src/util/classic_transcript_fixture.rs b/crates/openhuman-core/src/util/classic_transcript_fixture.rsindex 466d6ccd0b..1bd659a269 100644--- a/crates/openhuman-core/src/util/classic_transcript_fixture.rs+++ b/crates/openhuman-core/src/util/classic_transcript_fixture.rs@@ -11,7 +11,7 @@use std::path::Path;-use serde_json::{json, Value};+use serde_json::{Value, json};use tinyagents_session::transcript::{TranscriptMessage, TranscriptMeta};/// The `{"_meta": ...}` header line of a classic transcript.diff --git a/crates/openhuman-core/src/util/text_tests.rs b/crates/openhuman-core/src/util/text_tests.rsindex fcfd635687..704f0bc632 100644--- a/crates/openhuman-core/src/util/text_tests.rs+++ b/crates/openhuman-core/src/util/text_tests.rs@@ -92,7 +92,7 @@ fn test_truncate_zero_max_chars() {#[test]fn test_truncate_at_byte_boundary() {let s = "Hello 🦀 World"; // 16 bytes total. "🦀" is 4 bytes at index 6-9.- // No truncation+ // No truncationassert_eq!(truncate_at_byte_boundary(s, 16), s);assert_eq!(truncate_at_byte_boundary(s, 20), s);diff --git a/crates/openhuman-core/src/web_chat/event_bus_tests.rs b/crates/openhuman-core/src/web_chat/event_bus_tests.rsindex 26d5dee591..7fa4b4565b 100644--- a/crates/openhuman-core/src/web_chat/event_bus_tests.rs+++ b/crates/openhuman-core/src/web_chat/event_bus_tests.rs@@ -585,7 +585,7 @@ async fn approval_surface_drops_approval_decided_without_chat_routing() {if ev.event == "approval_decided"&& ev.request_id == "req-decided-no-route" =>{- return Some(ev)+ return Some(ev);}Ok(_) => continue,Err(broadcast::error::RecvError::Lagged(_)) => continue,diff --git a/crates/openhuman-embed/src/agent/build_tests.rs b/crates/openhuman-embed/src/agent/build_tests.rsindex 6e2eeeb19a..c397502b2b 100644--- a/crates/openhuman-embed/src/agent/build_tests.rs+++ b/crates/openhuman-embed/src/agent/build_tests.rs@@ -67,10 +67,12 @@ fn sub_agents_become_workers_in_a_catalogue_of_the_agents_own() {own.get("orchestrator").is_some(),"built-ins stay reachable");- assert!(definition- .subagents- .iter()- .any(|entry| matches!(entry, SubagentEntry::AgentId(id) if id == "lead-helper")));+ assert!(+ definition+ .subagents+ .iter()+ .any(|entry| matches!(entry, SubagentEntry::AgentId(id) if id == "lead-helper"))+ );assert!(catalogue.get("lead-helper").is_none());}diff --git a/crates/openhuman-embed/src/agent/definition_tests.rs b/crates/openhuman-embed/src/agent/definition_tests.rsindex dc9c01b641..d65c17889d 100644--- a/crates/openhuman-embed/src/agent/definition_tests.rs+++ b/crates/openhuman-embed/src/agent/definition_tests.rs@@ -89,11 +89,13 @@ fn tool_rules_reach_the_core_definition() {.into_core("narrow").unwrap();assert_eq!(def.tool_rules, Some(rules));- assert!(AgentDefinitionSpec::new()- .into_core("open")- .unwrap()- .tool_rules- .is_none());+ assert!(+ AgentDefinitionSpec::new()+ .into_core("open")+ .unwrap()+ .tool_rules+ .is_none()+ );}#[test]@@ -124,10 +126,12 @@ fn template_overrides_are_independent_and_keep_restrictions() {assert_eq!(first.temperature, 0.3);assert_eq!(second.temperature, 0.8);assert_eq!(second.max_iterations, 7);- assert!(AgentDefinitionSpec::new()- .tools(ToolScopeSpec::Wildcard)- .inherit(template)- .is_err());+ assert!(+ AgentDefinitionSpec::new()+ .tools(ToolScopeSpec::Wildcard)+ .inherit(template)+ .is_err()+ );}#[test]fn base_can_be_named_or_custom_and_unknown_names_are_typed() {diff --git a/crates/openhuman-embed/src/agent/lifecycle.rs b/crates/openhuman-embed/src/agent/lifecycle.rsindex 28d1d3a5bb..6efd5eed3f 100644--- a/crates/openhuman-embed/src/agent/lifecycle.rs+++ b/crates/openhuman-embed/src/agent/lifecycle.rs@@ -5,7 +5,7 @@ use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use std::time::Duration;-use tokio::sync::{watch, Notify};+use tokio::sync::{Notify, watch};use crate::CoreError;diff --git a/crates/openhuman-embed/src/agent/mcp_cleanup.rs b/crates/openhuman-embed/src/agent/mcp_cleanup.rsindex fab6927e9b..6bedf486ff 100644--- a/crates/openhuman-embed/src/agent/mcp_cleanup.rs+++ b/crates/openhuman-embed/src/agent/mcp_cleanup.rs@@ -1,7 +1,7 @@//! Retiring one captured agent owner before its id or home is reusable.use super::*;use crate::runtime::PendingCleanup;-use std::sync::{atomic::Ordering, Weak};+use std::sync::{Weak, atomic::Ordering};pub(crate) fn finish_removal(registry: &crate::runtime::AgentMap,diff --git a/crates/openhuman-embed/src/agent/mod.rs b/crates/openhuman-embed/src/agent/mod.rsindex 20c1ddadd9..5b1b4182b5 100644--- a/crates/openhuman-embed/src/agent/mod.rs+++ b/crates/openhuman-embed/src/agent/mod.rs@@ -38,9 +38,9 @@ use openhuman_core::agent_registry::host_definition::AgentDefinition;use openhuman_core::config::Config;use openhuman_core::core::runtime::{CoreContext, CoreRuntime};+use crate::CoreError;use crate::harness::{Access, Provider};use crate::turn::{Turn, TurnOutcome, TurnTarget};-use crate::CoreError;/// Error from instantiating or driving an [`Agent`].#[derive(Debug, thiserror::Error)]diff --git a/crates/openhuman-embed/src/agent/spec.rs b/crates/openhuman-embed/src/agent/spec.rsindex 75baa21c4a..037ed73e65 100644--- a/crates/openhuman-embed/src/agent/spec.rs+++ b/crates/openhuman-embed/src/agent/spec.rs@@ -423,11 +423,11 @@ impl AgentSpec {pub fn tools(mut self,f: impl for<'a> Fn(- openhuman_core::agent::TurnContext<'a>,- ) -> openhuman_core::agent::HostTurnTools- + Send- + Sync- + 'static,+ openhuman_core::agent::TurnContext<'a>,+ ) -> openhuman_core::agent::HostTurnTools+ + Send+ + Sync+ + 'static,) -> Self {self.host_tools = Some(std::sync::Arc::new(f));selfdiff --git a/crates/openhuman-embed/src/agent/spec_tests.rs b/crates/openhuman-embed/src/agent/spec_tests.rsindex cc5005f658..5f42183ca8 100644--- a/crates/openhuman-embed/src/agent/spec_tests.rs+++ b/crates/openhuman-embed/src/agent/spec_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::agent::build::{check_domains_narrow, check_tool_groups_narrow};use crate::AgentError;+use crate::agent::build::{check_domains_narrow, check_tool_groups_narrow};use openhuman_core::tools::toolpacks::GroupMode;#[test]diff --git a/crates/openhuman-embed/src/artifacts.rs b/crates/openhuman-embed/src/artifacts.rsindex 8dd7a43c18..23c17c3a52 100644--- a/crates/openhuman-embed/src/artifacts.rs+++ b/crates/openhuman-embed/src/artifacts.rs@@ -4,9 +4,9 @@//! The constructors below the line exist for host tests that need a real//! artifact on disk; production hosts only resolve.-pub use openhuman_core::artifacts::{resolve_ready_file, FileRoots};+pub use openhuman_core::artifacts::{FileRoots, resolve_ready_file};#[doc(hidden)]pub use openhuman_core::artifacts::{- create_artifact, finalize_artifact, ArtifactKind, ArtifactMeta, ArtifactStatus,+ ArtifactKind, ArtifactMeta, ArtifactStatus, create_artifact, finalize_artifact,};diff --git a/crates/openhuman-embed/src/call.rs b/crates/openhuman-embed/src/call.rsindex aa70bfbeef..3114cbebcc 100644--- a/crates/openhuman-embed/src/call.rs+++ b/crates/openhuman-embed/src/call.rs@@ -36,8 +36,8 @@//! log line. [`unwrap_outcome_envelope`] absorbs that here so no facade method//! and no host has to think about it.-use serde::de::DeserializeOwned;use serde::Serialize;+use serde::de::DeserializeOwned;use super::error::CoreError;use openhuman_core::core::runtime::CoreRuntime;diff --git a/crates/openhuman-embed/src/cancellation.rs b/crates/openhuman-embed/src/cancellation.rsindex be5eb0a3fd..b1f9e99cc4 100644--- a/crates/openhuman-embed/src/cancellation.rs+++ b/crates/openhuman-embed/src/cancellation.rs@@ -47,6 +47,6 @@ impl Cancellation {pub(crate) struct Guard(Cancellation);impl Drop for Guard {fn drop(&mut self) {- self.0 .0.active.send_modify(|count| *count -= 1);+ self.0.0.active.send_modify(|count| *count -= 1);}}diff --git a/crates/openhuman-embed/src/chat_surface.rs b/crates/openhuman-embed/src/chat_surface.rsindex 1fd074ac22..dc52bdff56 100644--- a/crates/openhuman-embed/src/chat_surface.rs+++ b/crates/openhuman-embed/src/chat_surface.rs@@ -6,6 +6,6 @@//! then reads it with [`subscribe_web_channel_events`].pub use openhuman_core::web_chat::{- publish_web_channel_event, register_approval_surface_subscriber,- register_artifact_surface_subscriber, subscribe_web_channel_events, WebChannelEvent,+ WebChannelEvent, publish_web_channel_event, register_approval_surface_subscriber,+ register_artifact_surface_subscriber, subscribe_web_channel_events,};diff --git a/crates/openhuman-embed/src/complete.rs b/crates/openhuman-embed/src/complete.rsindex 5b6cf9b467..b096e080a9 100644--- a/crates/openhuman-embed/src/complete.rs+++ b/crates/openhuman-embed/src/complete.rs@@ -53,7 +53,7 @@ use tinyinference_llm::message::{ContentBlock, ImageRef, Message, UserMessage};use tinyinference_llm::model::{ModelRequest, ModelResponse};use crate::error::CoreError;-use crate::turn::{is_safe_endpoint_for_bearer, sanitize_url_for_display, Route};+use crate::turn::{Route, is_safe_endpoint_for_bearer, sanitize_url_for_display};/// Method label carried by every [`CoreError`] this module returns.pub const COMPLETE: &str = "openhuman.complete";@@ -539,7 +539,7 @@ impl Completer {mut request: CompletionRequest,) -> Result<CompletionResponse, CoreError> {use crate::structured::{- accumulate, StructuredFailureReason, StructuredOutputFailure, Validator,+ StructuredFailureReason, StructuredOutputFailure, Validator, accumulate,};let initial_failure = |reason| CoreError::StructuredOutput {method: COMPLETE,diff --git a/crates/openhuman-embed/src/config.rs b/crates/openhuman-embed/src/config.rsindex 018f52efaa..279bce7171 100644--- a/crates/openhuman-embed/src/config.rs+++ b/crates/openhuman-embed/src/config.rs@@ -70,12 +70,12 @@ pub use tinytools::{DefaultEffect, Patterns, RuleEffect, Surface, ToolMatcher, ToolRule, ToolRules,};+/// The core's config type, as [`crate::RuntimeConfig`].+pub use openhuman_core::config::Config as RuntimeConfig;/// Typed runtime builder policy groups from the core configuration contract.pub use openhuman_core::config::schema::{AutonomyConfig, CronConfig, PrivacyConfig, PrivacyMode, SecretsConfig,};-/// The core's config type, as [`crate::RuntimeConfig`].-pub use openhuman_core::config::Config as RuntimeConfig;/// Load `config.toml` (creating defaults when absent) with the environment/// overlay and per-user scoping — what a core with no supplied config bootsdiff --git a/crates/openhuman-embed/src/cron.rs b/crates/openhuman-embed/src/cron.rsindex ca05ad3a0f..27d944b68c 100644--- a/crates/openhuman-embed/src/cron.rs+++ b/crates/openhuman-embed/src/cron.rs@@ -59,19 +59,19 @@ use std::future::Future;use std::time::SystemTime;use openhuman_core::config::Config;-use openhuman_core::cron::system_jobs::SYSTEM_COMMAND_PREFIX;use openhuman_core::cron::JobPolicy;+use openhuman_core::cron::system_jobs::SYSTEM_COMMAND_PREFIX;use {openhuman_core::cron::CronJob, openhuman_core::cron::CronJobPatch,openhuman_core::cron::JobType, openhuman_core::cron::Schedule,};-pub use openhuman_core::cron::handlers::{JobKindHandler, JobOutcome, JobRunContext};-pub use openhuman_core::cron::system_job_handlers::SystemJobContext;/// The kind of a scheduled job (`shell`, `agent`, `flow`), which decides the/// handler that runs it: see/// [`RuntimeBuilder::cron_job_handler`](crate::RuntimeBuilder::cron_job_handler).pub use openhuman_core::cron::JobType as JobKind;+pub use openhuman_core::cron::handlers::{JobKindHandler, JobOutcome, JobRunContext};+pub use openhuman_core::cron::system_job_handlers::SystemJobContext;/// When a job fires.#[derive(Debug, Clone, PartialEq, Eq)]diff --git a/crates/openhuman-embed/src/embeddings.rs b/crates/openhuman-embed/src/embeddings.rsindex 9dac1faa72..65ed53e053 100644--- a/crates/openhuman-embed/src/embeddings.rs+++ b/crates/openhuman-embed/src/embeddings.rs@@ -16,11 +16,11 @@//! [`Runtime`](crate::Runtime).pub use tinyinference_embeddings::{- format_embedding_signature, set_rate_limit, CohereEmbeddingModel, EmbeddingModel,- MockEmbeddingModel, NoopEmbeddingModel, OllamaEmbeddingModel, OpenAiEmbeddingModel,- VoyageEmbeddingModel, COHERE_API_BASE, COHERE_DEFAULT_DIMENSIONS, COHERE_DEFAULT_MODEL,+ COHERE_API_BASE, COHERE_DEFAULT_DIMENSIONS, COHERE_DEFAULT_MODEL, CohereEmbeddingModel,DEFAULT_OLLAMA_DIMENSIONS, DEFAULT_OLLAMA_MODEL, DEFAULT_OLLAMA_URL,- DEFAULT_REQUESTS_PER_MINUTE, VOYAGE_API_BASE, VOYAGE_DEFAULT_DIMENSIONS, VOYAGE_DEFAULT_MODEL,+ DEFAULT_REQUESTS_PER_MINUTE, EmbeddingModel, MockEmbeddingModel, NoopEmbeddingModel,+ OllamaEmbeddingModel, OpenAiEmbeddingModel, VOYAGE_API_BASE, VOYAGE_DEFAULT_DIMENSIONS,+ VOYAGE_DEFAULT_MODEL, VoyageEmbeddingModel, format_embedding_signature, set_rate_limit,};/// Errors the embedding models return.pub use tinyinference_embeddings::{Error as EmbeddingError, Result as EmbeddingResult};diff --git a/crates/openhuman-embed/src/error.rs b/crates/openhuman-embed/src/error.rsindex 387d1944c5..524c7305eb 100644--- a/crates/openhuman-embed/src/error.rs+++ b/crates/openhuman-embed/src/error.rs@@ -20,8 +20,8 @@//! facade classifies it. A host that cannot make that distinction renders a//! scary red error where it should simply hide a tab.-use openhuman_core::core::dispatch::UNKNOWN_METHOD_PREFIX;use openhuman_core::core::StructuredRpcError;+use openhuman_core::core::dispatch::UNKNOWN_METHOD_PREFIX;/// Error returned by every typed facade call.#[derive(Debug, thiserror::Error)]diff --git a/crates/openhuman-embed/src/events.rs b/crates/openhuman-embed/src/events.rsindex d528e8a0a8..cda93673d5 100644--- a/crates/openhuman-embed/src/events.rs+++ b/crates/openhuman-embed/src/events.rs@@ -8,7 +8,7 @@ use std::pin::Pin;use std::sync::{Arc, Mutex, Weak};use std::task::{Context, Poll};use tokio::sync::broadcast;-use tokio_stream::wrappers::{errors::BroadcastStreamRecvError, BroadcastStream};+use tokio_stream::wrappers::{BroadcastStream, errors::BroadcastStreamRecvError};use {openhuman_core::core::bus::BUS, tinybus::EventHandler, tinybus::SubscriptionHandle};/// Metadata about one runtime transition; never includes user/tool payloads.diff --git a/crates/openhuman-embed/src/harness/builder.rs b/crates/openhuman-embed/src/harness/builder.rsindex 5da75a5a80..ce3f73e216 100644--- a/crates/openhuman-embed/src/harness/builder.rs+++ b/crates/openhuman-embed/src/harness/builder.rs@@ -9,14 +9,14 @@use std::path::PathBuf;+use super::Harness;use super::access::Access;use super::error::HarnessError;use super::provider::Provider;use super::workspace::Workspace;-use super::Harness;+use crate::Session;use crate::agent::AgentSpec;use crate::runtime::RuntimeBuilder;-use crate::Session;use openhuman_core::config::Config;use openhuman_core::core::runtime::{DomainSet, ServiceSet};use openhuman_core::core::types::HostKind;@@ -130,11 +130,11 @@ impl HarnessBuilder {pub fn tools(mut self,f: impl for<'a> Fn(- openhuman_core::agent::TurnContext<'a>,- ) -> openhuman_core::agent::HostTurnTools- + Send- + Sync- + 'static,+ openhuman_core::agent::TurnContext<'a>,+ ) -> openhuman_core::agent::HostTurnTools+ + Send+ + Sync+ + 'static,) -> Self {self.host_tools = Some(std::sync::Arc::new(f));selfdiff --git a/crates/openhuman-embed/src/harness/mod.rs b/crates/openhuman-embed/src/harness/mod.rsindex 4a89a6b1e6..c0c4f5b5c1 100644--- a/crates/openhuman-embed/src/harness/mod.rs+++ b/crates/openhuman-embed/src/harness/mod.rs@@ -101,10 +101,10 @@ pub use workspace::Workspace;use std::path::Path;+use crate::Core;use crate::agent::Agent;use crate::runtime::Runtime;use crate::turn::{Turn, TurnOutcome};-use crate::Core;/// An embedded OpenHuman agent harness: one runtime, one agent.///diff --git a/crates/openhuman-embed/src/host_internals.rs b/crates/openhuman-embed/src/host_internals.rsindex 0a66c73ee0..ba410d42c1 100644--- a/crates/openhuman-embed/src/host_internals.rs+++ b/crates/openhuman-embed/src/host_internals.rs@@ -20,16 +20,16 @@ pub use openhuman_core::run_core_from_args;/// Shared by tinyhumans (hosted controllers) and rpc (`http_host`, `/health`).pub mod core {pub use openhuman_core::core::{- unwrap_rpc, ControllerSchema, FieldSchema, Outcome, StructuredRpcError, TypeSchema,+ ControllerSchema, FieldSchema, Outcome, StructuredRpcError, TypeSchema, unwrap_rpc,};pub mod all {// tinyhumans: hosted controller extension; rpc: http_host + `/health`.pub use openhuman_core::core::all::{+ ControllerExtension, ControllerFuture, DomainGroup, RegisteredController,all_controller_schemas, all_http_method_schemas, cli_handler_for_namespace,namespace_description, register_controller_extension, rpc_method_from_parts,- schema_for_rpc_method, ControllerExtension, ControllerFuture, DomainGroup,- RegisteredController,+ schema_for_rpc_method,};}@@ -37,31 +37,31 @@ pub mod core {/// RPC handler and classifier (rpc).pub mod observability {pub use openhuman_core::core::observability::{+ API_KEY_REJECTED_PREFIX, BACKEND_UNAVAILABLE_PREFIX, ExpectedErrorKind,+ REPORT_ERROR_TRACING_TARGET, USAGE_PROBE_BACKOFF_PREFIX,contains_transient_transport_phrase, expected_error_kind, is_api_key_rejected_message,is_session_expired_message, is_suppressed_usage_probe_backoff,is_transient_http_status_code, is_transient_message_failure, report_error,- report_error_or_expected, report_warning_message, ExpectedErrorKind,- API_KEY_REJECTED_PREFIX, BACKEND_UNAVAILABLE_PREFIX, REPORT_ERROR_TRACING_TARGET,- USAGE_PROBE_BACKOFF_PREFIX,+ report_error_or_expected, report_warning_message,};}// rpc server only, below.pub mod auth {pub use openhuman_core::core::auth::{- bearer_matches, get_rpc_token, init_rpc_token, init_rpc_token_with_value,- verify_bearer_token, CORE_TOKEN_ENV_VAR,+ CORE_TOKEN_ENV_VAR, bearer_matches, get_rpc_token, init_rpc_token,+ init_rpc_token_with_value, verify_bearer_token,};}pub mod bus {- pub use openhuman_core::core::bus::{init, BUS};+ pub use openhuman_core::core::bus::{BUS, init};}pub mod cli {pub use openhuman_core::core::cli::load_dotenv_for_cli;}pub mod dispatch {pub use openhuman_core::core::dispatch::{- is_known_probe_method, unknown_method_name, UNKNOWN_METHOD_PREFIX,+ UNKNOWN_METHOD_PREFIX, is_known_probe_method, unknown_method_name,};}pub mod event_bind_tokens {@@ -81,14 +81,14 @@ pub mod core {}pub mod runtime {pub use openhuman_core::core::runtime::{- current_tenant, is_saas, CoreContext, CoreRuntime, DispatchCtx, Mode, SaasConfig,+ CoreContext, CoreRuntime, DispatchCtx, Mode, SaasConfig, current_tenant, is_saas,};pub mod saas {pub use openhuman_core::core::runtime::saas::build;}}pub mod server_launcher {- pub use openhuman_core::core::server_launcher::{install_server_launcher, ServeRequest};+ pub use openhuman_core::core::server_launcher::{ServeRequest, install_server_launcher};}pub mod session_expiry {pub use openhuman_core::core::session_expiry::is_session_expired_error;@@ -109,15 +109,15 @@ pub mod core {/// tinyhumans (every hosted controller loads its config) and rpc (server).pub mod config {pub use openhuman_core::config::{- active_workspace_dir, active_workspace_dir_cached, active_workspace_snapshot,+ Config, MODEL_MANAGED_DEFAULT, PrivacyMode, active_workspace_dir,+ active_workspace_dir_cached, active_workspace_snapshot,build_runtime_proxy_client_with_timeouts, load_config_with_timeout, workspace_handle,- Config, PrivacyMode, MODEL_MANAGED_DEFAULT,};pub mod app_env {// tinyhumans: backend URL selection.pub use openhuman_core::config::app_env::{- app_env_from_env, is_staging_app_env, APP_ENV_VAR, VITE_APP_ENV_VAR,+ APP_ENV_VAR, VITE_APP_ENV_VAR, app_env_from_env, is_staging_app_env,};}pub mod ops {@@ -170,8 +170,8 @@ pub mod agent {}pub mod session_store {pub use openhuman_core::storage::sessions::{- context_workspace_dir, install, installed, restore, ReboundSessionStores,- WorkspaceSessionStores,+ ReboundSessionStores, WorkspaceSessionStores, context_workspace_dir, install,+ installed, restore,};}}@@ -188,8 +188,8 @@ pub mod channels {pub mod inference {pub mod embedding_host {pub use openhuman_core::inference::embedding_host::{- default_embedding_provider_for_chat, default_embedding_provider_with_config,- SharedEmbeddingModel,+ SharedEmbeddingModel, default_embedding_provider_for_chat,+ default_embedding_provider_with_config,};}pub mod provider {@@ -198,9 +198,9 @@ pub mod inference {}}pub mod http {+ pub use openhuman_core::inference::http::EXTERNAL_OPENAI_COMPAT_PROVIDER;#[cfg(feature = "http-server")]pub use openhuman_core::inference::http::router;- pub use openhuman_core::inference::http::EXTERNAL_OPENAI_COMPAT_PROVIDER;}}@@ -210,16 +210,16 @@ pub mod security {/// Host-supplied secret storage and encryption-key sources.pub mod secret_storage {pub use openhuman_core::security::secret_storage::{+ EncryptedFileBackend, MasterKeySource, SecretBackend, SecretStorageError,clear_master_key_source, clear_secret_backend, init_workspace,install_master_key_source, install_secret_backend, installed_master_key_source,installed_secret_backend, is_available, store::workspace_dir_for_file_backend,- EncryptedFileBackend, MasterKeySource, SecretBackend, SecretStorageError,};}pub mod credentials {pub use openhuman_core::security::credentials::{- channel_credential_provider, AuthService, APP_SESSION_PROVIDER,- DEFAULT_AUTH_PROFILE_NAME,+ APP_SESSION_PROVIDER, AuthService, DEFAULT_AUTH_PROFILE_NAME,+ channel_credential_provider,};pub mod ops {pub use openhuman_core::security::credentials::ops::{@@ -228,11 +228,11 @@ pub mod security {}pub mod session_support {pub use openhuman_core::security::credentials::session_support::{- build_session_state, classify_session_token, current_session_is_local,- get_session_token, is_local_session_token, load_app_session_profile,- publish_local_session_expiry, resolve_backend_credential, BackendCredential,- SessionTokenCheck, LOCAL_SESSION_BACKEND_UNAVAILABLE,+ BackendCredential, LOCAL_SESSION_BACKEND_UNAVAILABLE,LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE, SESSION_EXPIRES_AT_META,+ SessionTokenCheck, build_session_state, classify_session_token,+ current_session_is_local, get_session_token, is_local_session_token,+ load_app_session_profile, publish_local_session_expiry, resolve_backend_credential,};}pub mod api_key {@@ -284,17 +284,17 @@ pub mod util {/// Tool sources: tools an outside crate appends to the agent catalogue.pub mod tool_sources {pub use openhuman_core::tools::sources::{- register_tool_source, register_tool_source_at, register_tool_source_in,- registered_tool_source_placements, unregister_tool_source, ToolSourceCtx,- ToolSourceFactory, ToolSourcePlacement, ANCHOR_AFTER_DELEGATE, ANCHOR_AFTER_SEARCH,+ ANCHOR_AFTER_DELEGATE, ANCHOR_AFTER_SEARCH, ToolSourceCtx, ToolSourceFactory,+ ToolSourcePlacement, register_tool_source, register_tool_source_at,+ register_tool_source_in, registered_tool_source_placements, unregister_tool_source,};}/// The artifact publisher slot: the service that shares an artifact version.pub mod artifact_publisher {pub use openhuman_core::artifacts::{- register_artifact_publisher, register_artifact_publisher_in, unregister_artifact_publisher,- ArtifactPublisherFactory,+ ArtifactPublisherFactory, register_artifact_publisher, register_artifact_publisher_in,+ unregister_artifact_publisher,};// tinyhumans file-storage publisher: the protected-path guard it re-checks// before upload, and the store its tests save artifacts into.@@ -304,8 +304,8 @@ pub mod artifact_publisher {/// Egress disclosure, for hosted calls that leave the machine.pub mod egress {pub use openhuman_core::security::egress::{- emit_external_transfer, emit_external_transfer_in, enforce_egress, local_only_blocks,DataKind, EgressDescriptor, EgressLedger, EgressReason, IdentificationRisk,+ emit_external_transfer, emit_external_transfer_in, enforce_egress, local_only_blocks,};}@@ -313,20 +313,20 @@ pub mod egress {pub mod config_enrichers {pub use openhuman_core::config::schema::resolved_endpoints::ResolvedEndpoints;pub use openhuman_core::config::{- register_enricher, register_enricher_in, run_enrichers, unregister_enricher, ConfigEnricher,+ ConfigEnricher, register_enricher, register_enricher_in, run_enrichers, unregister_enricher,};}/// Composio route builders (`composio.mode` -> route).pub mod composio {pub use openhuman_core::integrations::composio::client::{- register_composio_route_builder, unregister_composio_route_builder, ComposioRoute,- ComposioRouteBuilder,+ ComposioRoute, ComposioRouteBuilder, register_composio_route_builder,+ unregister_composio_route_builder,};// The proxy route's target (origin + bearer) for `composio.mode = backend`.#[cfg(feature = "modules")]pub use openhuman_core::modules::connectors::{- register_proxy_target, unregister_proxy_target, ProxyTarget, ProxyTargetResolver,+ ProxyTarget, ProxyTargetResolver, register_proxy_target, unregister_proxy_target,};}@@ -335,7 +335,7 @@ pub mod composio {pub mod media {pub mod generation {pub use openhuman_core::media::generation::{- media_tools_for_config, GeneratorRouter, MediaGenerators, MediaReferenceAllowlist,+ GeneratorRouter, MediaGenerators, MediaReferenceAllowlist, media_tools_for_config,};}}@@ -344,8 +344,8 @@ pub mod media {#[cfg(feature = "web3")]pub mod wallet_backend {pub use openhuman_core::modules::wallet_backend::{- register_wallet_backend, register_wallet_backend_in, unregister_wallet_backend,- WalletBackendCall, WalletBackendFuture, WalletBackendHandler,+ WalletBackendCall, WalletBackendFuture, WalletBackendHandler, register_wallet_backend,+ register_wallet_backend_in, unregister_wallet_backend,};}@@ -354,23 +354,23 @@ pub mod inference_registry {pub use openhuman_core::inference::provider::factory::PROVIDER_OPENHUMAN;pub use openhuman_core::inference::provider::openhuman_backend_model::REASONING_OFF_METADATA_KEY;pub use openhuman_core::inference::registry::{+ BoxFuture, CatalogEntry, CatalogLimits, CatalogListing, CatalogRequest, ChatModelEntry,+ ChatModelFactory, ChatModelRequest, EmbeddingFactory, EmbeddingRequest, ReadinessProbe,register_catalog, register_catalog_in, register_chat_model, register_chat_model_in,register_embedding, register_embedding_in, unregister_catalog, unregister_chat_model,- unregister_embedding, BoxFuture, CatalogEntry, CatalogLimits, CatalogListing,- CatalogRequest, ChatModelEntry, ChatModelFactory, ChatModelRequest, EmbeddingFactory,- EmbeddingRequest, ReadinessProbe,+ unregister_embedding,};}/// Memory engines by id, and the free-background-work predicate.pub mod memory_engines {pub use openhuman_core::memory::engine::{- build_cached, rooted, BearerSource, Binding, BoundEngine, EngineCredential, EngineSettings,- TINYHUMANS_ENGINE,+ BearerSource, Binding, BoundEngine, EngineCredential, EngineSettings, TINYHUMANS_ENGINE,+ build_cached, rooted,};pub use openhuman_core::memory::engine_registry::{- bound_engine, register_memory_engine, register_memory_engine_in, unregister_memory_engine,- EngineBuilder, EngineEntry, EngineFuture, EngineRequest, FreeBackground,+ EngineBuilder, EngineEntry, EngineFuture, EngineRequest, FreeBackground, bound_engine,+ register_memory_engine, register_memory_engine_in, unregister_memory_engine,};}@@ -378,8 +378,8 @@ pub mod memory_engines {#[cfg(feature = "channels")]pub mod channel_callback {pub use openhuman_core::channels::callback_slot::{- register_channel_callback, register_channel_callback_in, unregister_channel_callback,- CallbackFuture, ChannelCallback, ChannelCallbackCtx,+ CallbackFuture, ChannelCallback, ChannelCallbackCtx, register_channel_callback,+ register_channel_callback_in, unregister_channel_callback,};}@@ -390,21 +390,21 @@ pub mod voice_registry {LIVE_PROVIDER_ELEVENLABS_HOSTED, LIVE_PROVIDER_GEMINI_HOSTED,};pub use openhuman_core::voice::factory::registry::{- register_stt_provider, register_stt_provider_in, register_tts_provider,- register_tts_provider_in, unregister_stt_provider, unregister_tts_provider,- SttProviderFactory, TtsProviderFactory,+ SttProviderFactory, TtsProviderFactory, register_stt_provider, register_stt_provider_in,+ register_tts_provider, register_tts_provider_in, unregister_stt_provider,+ unregister_tts_provider,};pub use openhuman_core::voice::factory::{- create_stt_provider, create_tts_provider, SttProvider, SttResult, TtsProvider,+ SttProvider, SttResult, TtsProvider, create_stt_provider, create_tts_provider,};pub use openhuman_core::voice::live::ops::live_providers;pub use openhuman_core::voice::live::registry::{- register_live_provider, register_live_provider_in, unregister_live_provider, ConfigureFn,- ConfiguredFn, LiveFuture, LiveProviderEntry, LiveProviderPlacement, PrepareFn,+ ConfigureFn, ConfiguredFn, LiveFuture, LiveProviderEntry, LiveProviderPlacement, PrepareFn,+ register_live_provider, register_live_provider_in, unregister_live_provider,};pub use openhuman_core::voice::live::types::{LiveProviderInfo, LiveProviderKind};pub use openhuman_core::voice::live::{- LiveVoiceError, PreparedProvider, GEMINI_LANGUAGES, GEMINI_VOICES,+ GEMINI_LANGUAGES, GEMINI_VOICES, LiveVoiceError, PreparedProvider,};}@@ -436,7 +436,7 @@ pub mod platform {pub mod connectivity {pub mod rpc {pub use openhuman_core::platform::connectivity::rpc::{- pick_listen_port_for_host_with, OccupiedByCore,+ OccupiedByCore, pick_listen_port_for_host_with,};}}@@ -447,8 +447,8 @@ pub mod platform {pub mod storage {pub use openhuman_core::storage::{- block_on, block_on_anyhow, clear, configured_url, driver_is_shared, install,- install_for_url, installed, open, url_from, StorageBackend, STORAGE_URL_VAR,+ STORAGE_URL_VAR, StorageBackend, block_on, block_on_anyhow, clear, configured_url,+ driver_is_shared, install, install_for_url, installed, open, url_from,};/// The layout v1 -> v2 migration the host runs at boot when@@ -461,8 +461,8 @@ pub mod storage {pub mod profiles {pub mod gateway {pub use openhuman_core::profiles::gateway::{- resolve_scope, sign, verify, GatewayRefusal, GatewayScope, HeldBy, PROFILE_HELD,- PROFILE_OWNER_HEADER, USER_HEADER, USER_SIG_HEADER,+ GatewayRefusal, GatewayScope, HeldBy, PROFILE_HELD, PROFILE_OWNER_HEADER, USER_HEADER,+ USER_SIG_HEADER, resolve_scope, sign, verify,};}pub mod host {@@ -504,9 +504,9 @@ pub mod web3 {pub mod web_chat {pub use openhuman_core::web_chat::{+ ChatRequestMetadata, GuardrailPayload, StartChatError, WebChannelEvent,approval_request_event, cancel_chat_scoped, plan_review_request_event,publish_web_channel_event, start_chat, subscribe_web_channel_events, unix_epoch_ms,- ChatRequestMetadata, GuardrailPayload, StartChatError, WebChannelEvent,};}diff --git a/crates/openhuman-embed/src/lib.rs b/crates/openhuman-embed/src/lib.rsindex 59ae408371..46e9590ce8 100644--- a/crates/openhuman-embed/src/lib.rs+++ b/crates/openhuman-embed/src/lib.rs@@ -80,7 +80,7 @@ pub use openhuman_core::config::ComposioHostCredential;pub use openhuman_core::config::Config as RuntimeConfig;pub use openhuman_core::config::{SearchHostCredential, UnknownKeyedSearchProvider};/// The exact ambient tenant, inherited across profile turns and their scoped tasks.-pub use openhuman_core::core::runtime::{current_tenant, NoTenant, Tenant};+pub use openhuman_core::core::runtime::{NoTenant, Tenant, current_tenant};pub use openhuman_core::security::TrustedAccess;pub use openhuman_core::tools::toolpacks::{GroupMode, ToolGroups};// The seam `AgentSpec::tools` needs: the belt types, and `Tool` itself from the@@ -108,7 +108,7 @@ pub mod agent_progress {#[cfg(feature = "skills")]pub mod skill_registry {pub use openhuman_core::skills::catalog::{- skill_registry, ReqwestTransport, HERMES_REGISTRY_ID,+ HERMES_REGISTRY_ID, ReqwestTransport, skill_registry,};}@@ -153,11 +153,11 @@ mod turn_steering;#[path = "host_internals.rs"]pub mod __host;+pub use openhuman_core::core::ControllerSchema;/// Look up the schema of a registered RPC method (`openhuman.<ns>_<fn>`).pub use openhuman_core::core::all::schema_for_rpc_method;/// Whether this build carries the HTTP server surface the router mounts.pub use openhuman_core::core::http_server_status::HTTP_SERVER_COMPILED_IN;-pub use openhuman_core::core::ControllerSchema;/// Why a listen-port pick failed (another live core holds the port, ...).pub use openhuman_core::platform::connectivity::rpc::PickListenPortError;/// Whether this build carries the voice domain.@@ -183,10 +183,10 @@ pub use harness::{};#[cfg(feature = "mcp")]pub use harness::{HttpHeader, McpAuthConfig, McpServer};+pub use openhuman_core::cron::JobOrigin;/// Host-routed delivery of scheduled replies, for [`RuntimeBuilder::cron_delivery`]/// and the profile runtime alike.pub use openhuman_core::cron::host_delivery::{CronDelivery, CronReply};-pub use openhuman_core::cron::JobOrigin;#[cfg(feature = "profiles")]pub use profiles::{ChatReply, CronSweepReport, DirectProfileProvider, OpenError, ProfileError, ProfileEvents,@@ -195,14 +195,14 @@ pub use profiles::{};#[cfg(all(feature = "profiles", feature = "channels"))]pub use profiles::{RelayAccepted, RelayMessage};-pub use runtime::builder::DEFAULT_MAX_AGENTS;/// Read-only view of a [`RuntimeBuilder`], for the layered crates' tests.#[doc(hidden)]pub use runtime::BuilderSummary;+pub use runtime::builder::DEFAULT_MAX_AGENTS;pub use runtime::{- run_from_args, AgentDefaults, ApiKey, ConfigSource, ConfigurationInfo, DefaultsInfo,- LearningSettings, ModelDefaults, RemoveAgent, Runtime, RuntimeBuilder, RuntimeDefaults,- RuntimeError, RuntimeInfo, RuntimeModule, SkillsPolicy, StorageInfo, WeightClass,+ AgentDefaults, ApiKey, ConfigSource, ConfigurationInfo, DefaultsInfo, LearningSettings,+ ModelDefaults, RemoveAgent, Runtime, RuntimeBuilder, RuntimeDefaults, RuntimeError,+ RuntimeInfo, RuntimeModule, SkillsPolicy, StorageInfo, WeightClass, run_from_args,};/// The types the [`RuntimeBuilder`] seam options take: controller@@ -264,7 +264,7 @@ pub use complete::{CompletionTrace, CompletionUsage,};pub use session_store::{InMemorySessionStores, SessionStoreProvider};-pub use turn::{absolute, Route, Turn, TurnOutcome, TurnRequest};+pub use turn::{Route, Turn, TurnOutcome, TurnRequest, absolute};pub use turn_cancellation::TurnCancellation;pub use turn_steering::{SteerRefused, TurnSteering};diff --git a/crates/openhuman-embed/src/modules.rs b/crates/openhuman-embed/src/modules.rsindex 6132f5ae28..0e0f694657 100644--- a/crates/openhuman-embed/src/modules.rs+++ b/crates/openhuman-embed/src/modules.rs@@ -11,7 +11,7 @@ pub use openhuman_core::modules::ops::set_bundled_releases_dir;/// this for each module it links; no shipped host does.#[cfg(feature = "modules")]pub use openhuman_core::modules::linked::{- is_registered as is_linked_registered, register_linked, LinkedFactory,+ LinkedFactory, is_registered as is_linked_registered, register_linked,};/// The browser-control module.diff --git a/crates/openhuman-embed/src/process_sentry.rs b/crates/openhuman-embed/src/process_sentry.rsindex acb13a7086..89baaa72ef 100644--- a/crates/openhuman-embed/src/process_sentry.rs+++ b/crates/openhuman-embed/src/process_sentry.rs@@ -13,8 +13,8 @@ use std::borrow::Cow;use std::sync::Arc;use openhuman_core::core::observability as obs;-pub use sentry::protocol::Event;pub use sentry::ClientOptions;+pub use sentry::protocol::Event;/// Re-exported so a host initialises the same `sentry` the options were/// built for.diff --git a/crates/openhuman-embed/src/profiles.rs b/crates/openhuman-embed/src/profiles.rsindex 72e6cf1289..6470d65f88 100644--- a/crates/openhuman-embed/src/profiles.rs+++ b/crates/openhuman-embed/src/profiles.rs@@ -54,8 +54,8 @@ use std::path::Path;use std::sync::Arc;use openhuman_core::core::runtime::CoreRuntime;-use openhuman_core::profiles::credentials::UserCredentialKind;use openhuman_core::profiles::ProfileHost;+use openhuman_core::profiles::credentials::UserCredentialKind;use tinyagents_session::port::SessionStoreProvider;use crate::error::CoreError;@@ -68,12 +68,12 @@ pub use handle::RelayAccepted;pub use handle::{ChatReply, ProfileEvents, ProfileHandle};#[cfg(feature = "channels")]pub use openhuman_core::channels::providers::relay::RelayInboundParams as RelayMessage;+pub use openhuman_core::core::runtime::SaasConfig;/// Validated operator-owned direct inference settings.pub use openhuman_core::core::runtime::direct_profile_provider::DirectProfileProvider;pub use openhuman_core::core::runtime::saas::{SaasCronConfig, SaasSandboxConfig};-pub use openhuman_core::core::runtime::SaasConfig;-pub use openhuman_core::cron::host_delivery::{CronDelivery, CronReply};pub use openhuman_core::cron::JobOrigin;+pub use openhuman_core::cron::host_delivery::{CronDelivery, CronReply};pub use openhuman_core::profiles::cron::SweepReport as CronSweepReport;pub use openhuman_core::profiles::{OpenError, ProfileId, ProfileIdMode, ProfileSummary};pub use openhuman_core::storage::lease::LeaseRecord;diff --git a/crates/openhuman-embed/src/profiles/host_tests.rs b/crates/openhuman-embed/src/profiles/host_tests.rsindex b7c0e9a596..250c7f9ca1 100644--- a/crates/openhuman-embed/src/profiles/host_tests.rs+++ b/crates/openhuman-embed/src/profiles/host_tests.rs@@ -65,11 +65,13 @@ fn profiles_keep_a_nonempty_readonly_permission_map_without_operator_grants() {let mut config = openhuman_core::profiles::layout::profile_config(&layout, &id);capabilities.configure(&mut config);assert!(!config.agent.channel_permissions.is_empty());- assert!(config- .agent- .channel_permissions- .values()- .all(|level| level == "readonly"));+ assert!(+ config+ .agent+ .channel_permissions+ .values()+ .all(|level| level == "readonly")+ );}#[test]diff --git a/crates/openhuman-embed/src/runtime/build.rs b/crates/openhuman-embed/src/runtime/build.rsindex 305e6a59c6..8e78398388 100644--- a/crates/openhuman-embed/src/runtime/build.rs+++ b/crates/openhuman-embed/src/runtime/build.rs@@ -8,12 +8,12 @@ use openhuman_core::core::runtime::CoreBuilder;use openhuman_core::core::types::HostKind;use tinyagents_session::port::SessionStoreProvider;-use super::builder::{starts_services_on_build, ConfigSource};+use super::builder::{ConfigSource, starts_services_on_build};use super::presets::{default_domains, default_services};-use super::{ApiKey, Runtime, RuntimeBuilder, RuntimeError, RUNTIME_LIVE};+use super::{ApiKey, RUNTIME_LIVE, Runtime, RuntimeBuilder, RuntimeError};+use crate::Core;use crate::harness::workspace::ResolvedWorkspace;use crate::harness::{Provider, Workspace};-use crate::Core;struct SessionStoreCleanup {installed: Option<Arc<dyn SessionStoreProvider>>,diff --git a/crates/openhuman-embed/src/runtime/builder.rs b/crates/openhuman-embed/src/runtime/builder.rsindex b1fd9908c3..de79f51eda 100644--- a/crates/openhuman-embed/src/runtime/builder.rs+++ b/crates/openhuman-embed/src/runtime/builder.rs@@ -20,10 +20,10 @@ use openhuman_core::core::types::HostKind;use openhuman_core::tools::toolpacks::ToolGroups;use tinyagents_session::port::SessionStoreProvider;-use super::seams::HostSeams;use super::ApiKey;-use crate::harness::{Access, Provider, Workspace};+use super::seams::HostSeams;use crate::Session;+use crate::harness::{Access, Provider, Workspace};// Re-exported for the sibling test module and older call sites that reached// the default triples through this module.@@ -46,7 +46,7 @@ pub(crate) use super::build::{effective_host_kind, routed_provider_effective};#[cfg(test)]pub(crate) use super::presets::{default_domains, default_services};#[cfg(test)]-pub(crate) use super::{RuntimeError, RUNTIME_LIVE};+pub(crate) use super::{RUNTIME_LIVE, RuntimeError};/// Who produces the [`Config`] the core boots with.///diff --git a/crates/openhuman-embed/src/runtime/info.rs b/crates/openhuman-embed/src/runtime/info.rsindex e3daf89670..a221aeab6a 100644--- a/crates/openhuman-embed/src/runtime/info.rs+++ b/crates/openhuman-embed/src/runtime/info.rs@@ -1,8 +1,8 @@//! Versioned, credential-safe runtime capability metadata.use super::{LearningSettings, ModelDefaults, Runtime, RuntimeBuilder};use openhuman_core::config::{- schema::{AutonomyConfig, CronConfig, PrivacyConfig, SecretsConfig},Config,+ schema::{AutonomyConfig, CronConfig, PrivacyConfig, SecretsConfig},};use std::collections::BTreeMap;diff --git a/crates/openhuman-embed/src/runtime/info_tests.rs b/crates/openhuman-embed/src/runtime/info_tests.rsindex ef5ae2fd2d..6e12065a9d 100644--- a/crates/openhuman-embed/src/runtime/info_tests.rs+++ b/crates/openhuman-embed/src/runtime/info_tests.rs@@ -157,13 +157,15 @@ fn unavailable_module_error_names_its_cargo_feature() {fn discovered_config_still_rejects_typed_boot_edits() {let builder = RuntimeBuilder::desktop().cron(Default::default());assert!(builder.validate().is_err());- assert!(RuntimeBuilder::desktop()- .model_defaults(ModelDefaults {- max_tokens: Some(300),- ..Default::default()- })- .validate()- .is_ok());+ assert!(+ RuntimeBuilder::desktop()+ .model_defaults(ModelDefaults {+ max_tokens: Some(300),+ ..Default::default()+ })+ .validate()+ .is_ok()+ );}#[test]diff --git a/crates/openhuman-embed/src/runtime/mod.rs b/crates/openhuman-embed/src/runtime/mod.rsindex 24fec236c7..6f298cfb73 100644--- a/crates/openhuman-embed/src/runtime/mod.rs+++ b/crates/openhuman-embed/src/runtime/mod.rs@@ -104,8 +104,8 @@ use openhuman_core::core::runtime::{CoreRuntime, DomainSet, ServiceSet};use openhuman_core::tools::toolpacks::ToolGroups;use crate::agent::{Agent, AgentError, AgentSpec};-use crate::harness::workspace::ResolvedWorkspace;use crate::harness::HarnessCore;+use crate::harness::workspace::ResolvedWorkspace;use crate::{Core, CoreError};/// Guards the process-scoped core state described in the module docs.diff --git a/crates/openhuman-embed/src/runtime/presets.rs b/crates/openhuman-embed/src/runtime/presets.rsindex fbe897dd96..6e38b66bff 100644--- a/crates/openhuman-embed/src/runtime/presets.rs+++ b/crates/openhuman-embed/src/runtime/presets.rs@@ -24,8 +24,8 @@ use openhuman_core::core::runtime::{DomainSet, ServiceSet, TokenSource};use openhuman_core::core::types::HostKind;use openhuman_core::tools::toolpacks::ToolGroups;-use super::builder::ConfigSource;use super::RuntimeBuilder;+use super::builder::ConfigSource;use crate::harness::Workspace;impl RuntimeBuilder {diff --git a/crates/openhuman-embed/src/runtime/seams.rs b/crates/openhuman-embed/src/runtime/seams.rsindex fa4303400e..2ab2bd6358 100644--- a/crates/openhuman-embed/src/runtime/seams.rs+++ b/crates/openhuman-embed/src/runtime/seams.rs@@ -32,8 +32,8 @@ use openhuman_core::agent::hooks::{use openhuman_core::agent::tinyagents::discovery::{clear_tool_ranker, install_tool_ranker, installed_tool_ranker,};-use openhuman_core::core::all::{register_controller_extension, ControllerExtension};-use openhuman_core::core::server_launcher::{install_server_launcher, ServerLauncher};+use openhuman_core::core::all::{ControllerExtension, register_controller_extension};+use openhuman_core::core::server_launcher::{ServerLauncher, install_server_launcher};use openhuman_core::security::SecurityPolicy;use openhuman_core::storage::StorageBackend;use tinytools::ToolRanker;diff --git a/crates/openhuman-embed/src/runtime/seams_tests.rs b/crates/openhuman-embed/src/runtime/seams_tests.rsindex 7e95d1fab6..0c57edd363 100644--- a/crates/openhuman-embed/src/runtime/seams_tests.rs+++ b/crates/openhuman-embed/src/runtime/seams_tests.rs@@ -66,13 +66,17 @@ fn live_replacement_and_removal_update_builder_hooks_and_restore_predecessors()"seams-live-tool",Some(Arc::new(NamedToolHook("different-tool-name"))),);- assert!(embedder_tool_hooks()- .iter()- .any(|hook| hook.name() == "seams-live-tool"));+ assert!(+ embedder_tool_hooks()+ .iter()+ .any(|hook| hook.name() == "seams-live-tool")+ );seams.tool_hook("seams-live-tool", None);- assert!(!embedder_tool_hooks()- .iter()- .any(|hook| hook.name() == "seams-live-tool"));+ assert!(+ !embedder_tool_hooks()+ .iter()+ .any(|hook| hook.name() == "seams-live-tool")+ );drop(seams);assert!(!post_turn_hook_is_registered(&builder_hook));assert!(Arc::ptr_eq(diff --git a/crates/openhuman-embed/src/runtime/summary.rs b/crates/openhuman-embed/src/runtime/summary.rsindex 3e654ac9f8..aa09b804e4 100644--- a/crates/openhuman-embed/src/runtime/summary.rs+++ b/crates/openhuman-embed/src/runtime/summary.rs@@ -11,8 +11,8 @@ use openhuman_core::core::all::DomainGroup;use openhuman_core::core::runtime::{DomainSet, ServiceSet, TokenSource};use openhuman_core::core::types::HostKind;-use super::builder::ConfigSource;use super::RuntimeBuilder;+use super::builder::ConfigSource;use crate::harness::Workspace;/// What a [`RuntimeBuilder`] is set to; see the module docs.diff --git a/crates/openhuman-embed/src/secret_storage.rs b/crates/openhuman-embed/src/secret_storage.rsindex 53164fc486..2e2891bb09 100644--- a/crates/openhuman-embed/src/secret_storage.rs+++ b/crates/openhuman-embed/src/secret_storage.rs@@ -8,6 +8,6 @@//! during core boot. Native OS providers belong to `openhuman-rpc::keyring`.pub use openhuman_core::security::secret_storage::{- install_secret_backend, installed_secret_backend, EncryptedFileBackend, MemoryBackend,- SecretBackend, SecretStorageError,+ EncryptedFileBackend, MemoryBackend, SecretBackend, SecretStorageError, install_secret_backend,+ installed_secret_backend,};diff --git a/crates/openhuman-embed/src/turn.rs b/crates/openhuman-embed/src/turn.rsindex d17710fe34..c62d489c58 100644--- a/crates/openhuman-embed/src/turn.rs+++ b/crates/openhuman-embed/src/turn.rs@@ -49,8 +49,8 @@ use openhuman_core::security::turn_origin::AgentTurnOrigin;#[path = "turn_types.rs"]mod types;-pub(crate) use types::{is_safe_endpoint_for_bearer, sanitize_url_for_display};pub use types::{Route, TurnOutcome, TurnRequest};+pub(crate) use types::{is_safe_endpoint_for_bearer, sanitize_url_for_display};#[path = "turn_control.rs"]mod control;@@ -173,11 +173,11 @@ impl Turn {pub fn tools(mut self,factory: impl for<'a> Fn(- openhuman_core::agent::TurnContext<'a>,- ) -> openhuman_core::agent::HostTurnTools- + Send- + Sync- + 'static,+ openhuman_core::agent::TurnContext<'a>,+ ) -> openhuman_core::agent::HostTurnTools+ + Send+ + Sync+ + 'static,) -> Self {self.tools = Some(Arc::new(factory));self@@ -606,7 +606,7 @@ async fn dispatch(let turn: futures_box::BoxFuture<'_, Result<AgentReply, CoreError>> =Box::pin(async move {use openhuman_core::inference::host_runtime::ops::{- agent_chat_reply_for, AgentChatTarget,+ AgentChatTarget, agent_chat_reply_for,};let mut config = dispatch.load_config()@@ -652,7 +652,7 @@ async fn dispatch(let turn: futures_box::BoxFuture<'_, Result<AgentReply, CoreError>> =Box::pin(async move {use openhuman_core::inference::host_runtime::ops::{- agent_chat_for, AgentChatTarget,+ AgentChatTarget, agent_chat_for,};let mut config = inner.config.clone();let route = openhuman_core::config::schema::EphemeralRoute::from_params(diff --git a/tests/agent_harness_e2e.rs b/tests/agent_harness_e2e.rsindex 2542df45a2..a7f90b66d4 100644--- a/tests/agent_harness_e2e.rs+++ b/tests/agent_harness_e2e.rs@@ -30,15 +30,15 @@ use std::time::Duration;/// Prevents `ApprovalGate` from writing `./approval/approval.db` into the repo root.static GATE_WORKSPACE: OnceLock<tempfile::TempDir> = OnceLock::new();-use axum::http::{header::AUTHORIZATION, HeaderMap, StatusCode, Uri};+use axum::http::{HeaderMap, StatusCode, Uri, header::AUTHORIZATION};use axum::routing::{get, post};use axum::{Json, Router};use futures_util::StreamExt;-use serde_json::{json, Value};+use serde_json::{Value, json};use tempfile::tempdir;use openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry;-use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};+use openhuman_core::core::auth::{CORE_TOKEN_ENV_VAR, init_rpc_token};use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "json-rpc-e2e-local-token";@@ -2629,8 +2629,8 @@ async fn streaming_tool_call_accumulation() {use openhuman_core::progress::AgentProgress;use std::sync::Mutex;use streaming_support::{- agent_with_s, native_tool_response_s, text_response_s, workspace_s, EchoTool,- ScriptedProvider,+ EchoTool, ScriptedProvider, agent_with_s, native_tool_response_s, text_response_s,+ workspace_s,};use tinyinference_llm::model::{ModelProfile, ModelStreamItem};use tinyinference_llm::tool::ToolDelta;diff --git a/tests/in_process/agent_turn_overrides_e2e.rs b/tests/in_process/agent_turn_overrides_e2e.rsindex 11db80d1a0..d89ebc7e77 100644--- a/tests/in_process/agent_turn_overrides_e2e.rs+++ b/tests/in_process/agent_turn_overrides_e2e.rs@@ -25,16 +25,16 @@//! positive here.#![allow(clippy::await_holding_lock)]-use crate::env_guard::env_lock_async;use crate::env_guard::EnvVarGuard;+use crate::env_guard::env_lock_async;use async_trait::async_trait;use std::collections::VecDeque;use std::path::PathBuf;use std::sync::{Arc, Mutex};use tempfile::TempDir;-use openhuman_core::agent::session_host::TurnOverrides;use openhuman_core::agent::OpenHumanSessionHost;+use openhuman_core::agent::session_host::TurnOverrides;use openhuman_core::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};use openhuman_core::config::{AgentConfig, ContextConfig};use tinyagents_definition::ToolScope;diff --git a/tests/support/scripted_stack.rs b/tests/support/scripted_stack.rsindex d5126d5470..0371c76ffd 100644--- a/tests/support/scripted_stack.rs+++ b/tests/support/scripted_stack.rs@@ -13,9 +13,9 @@use std::sync::{Mutex, MutexGuard};-use axum::http::HeaderMap;use axum::Json;-use serde_json::{json, Value};+use axum::http::HeaderMap;+use serde_json::{Value, json};/// Lock `m`, recovering the data when a panicking test poisoned it.pub fn lock_or_recover<T>(m: &Mutex<T>) -> MutexGuard<'_, T> {