The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(agent): reorder imports and reformat assertions
Steven Enamakel99ad079f006e
diff --git a/crates/openhuman-core/src/agent/bus.rs b/crates/openhuman-core/src/agent/bus.rsindex 6bf91bc2e4..0360e3e1a0 100644--- a/crates/openhuman-core/src/agent/bus.rs+++ b/crates/openhuman-core/src/agent/bus.rs@@ -24,7 +24,7 @@ use crate::config::MultimodalConfig;use crate::core::bus::BUS;use crate::progress::AgentProgress;use crate::security::prompt_injection::{- PromptEnforcementAction, PromptEnforcementContext, enforce_prompt_input,+ enforce_prompt_input, PromptEnforcementAction, PromptEnforcementContext,};use crate::security::turn_origin::{self, AgentTurnOrigin};use tinyagents_session::transcript::TranscriptMessage;diff --git a/crates/openhuman-core/src/agent/goals/runtime_tests.rs b/crates/openhuman-core/src/agent/goals/runtime_tests.rsindex b2474eb130..b931b43fe2 100644--- a/crates/openhuman-core/src/agent/goals/runtime_tests.rs+++ b/crates/openhuman-core/src/agent/goals/runtime_tests.rs@@ -119,15 +119,13 @@ async fn complete_and_clear_are_safe_without_a_goal_or_thread() {let dir = tmp.path().to_path_buf();complete_for_thread(&dir, Some("t-empty")).await;clear_for_thread(&dir, Some("t-empty")).await;- assert!(- tinyagents_graph::goals::store::get(- &crate::storage::sessions::stores_or_ephemeral(&dir).kv,- "t-empty"- )- .await- .unwrap()- .is_none()- );+ assert!(tinyagents_graph::goals::store::get(+ &crate::storage::sessions::stores_or_ephemeral(&dir).kv,+ "t-empty"+ )+ .await+ .unwrap()+ .is_none());// No ambient thread scope at all.complete_for_thread(&dir, None).await;clear_for_thread(&dir, None).await;diff --git a/crates/openhuman-core/src/agent/harness/artifact_offload/artifact_offload_tests.rs b/crates/openhuman-core/src/agent/harness/artifact_offload/artifact_offload_tests.rsindex 5dd7a5796b..9d3e3fa61a 100644--- a/crates/openhuman-core/src/agent/harness/artifact_offload/artifact_offload_tests.rs+++ b/crates/openhuman-core/src/agent/harness/artifact_offload/artifact_offload_tests.rs@@ -17,8 +17,8 @@ use std::sync::Arc;use super::*;use crate::security::{AutonomyLevel, SecurityPolicy, TrustedAccess, TrustedRoot};use tinyagents_harness::artifacts::{- ARTIFACT_POINTER_PREFIX, ArtifactKind, ArtifactPathPolicy, DEFAULT_OFFLOAD_THRESHOLD_BYTES,- extract_artifact_paths,+ extract_artifact_paths, ArtifactKind, ArtifactPathPolicy, ARTIFACT_POINTER_PREFIX,+ DEFAULT_OFFLOAD_THRESHOLD_BYTES,};/// Policy with disjoint action/workspace roots, the shipped default layoutdiff --git a/crates/openhuman-core/src/agent/harness/artifact_offload/policy.rs b/crates/openhuman-core/src/agent/harness/artifact_offload/policy.rsindex 5307f30e60..b39e2d065d 100644--- a/crates/openhuman-core/src/agent/harness/artifact_offload/policy.rs+++ b/crates/openhuman-core/src/agent/harness/artifact_offload/policy.rs@@ -15,8 +15,8 @@ use std::sync::Arc;use tinyagents_harness::artifacts::{ArtifactPathPolicy, ArtifactRedactor, Redacted};-use crate::security::SecurityPolicy;use crate::security::scrub::sanitize_text;+use crate::security::SecurityPolicy;/// Refuses artifact writes that reach the core's internal `workspace_dir`.///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 de202fe39c..0775773ea9 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::{READ_TOOL, SanitizingRedactor};+use crate::agent::harness::artifact_offload::{SanitizingRedactor, READ_TOOL};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 ffb5d8c337..17d69363ae 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,14 +131,12 @@ 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());}@@ -150,22 +148,18 @@ 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/host_overrides.rs b/crates/openhuman-core/src/agent/host_overrides.rsindex 7c69ddab91..375467d5b0 100644--- a/crates/openhuman-core/src/agent/host_overrides.rs+++ b/crates/openhuman-core/src/agent/host_overrides.rs@@ -7,9 +7,9 @@use std::collections::BTreeMap;use std::sync::{Arc, RwLock};+use crate::agent::tinyagents::host::OpenHumanRunContext;use tinyagents_harness::host::LearningSink;use tinyagents_hooks::tool::ToolHook;-use crate::agent::tinyagents::host::OpenHumanRunContext;use tinyinference_llm::model::ChatModel;/// Runtime or agent host adapters, shared by every context derived from it.diff --git a/crates/openhuman-core/src/agent/message_convert.rs b/crates/openhuman-core/src/agent/message_convert.rsindex 122c0915f2..852585d1cc 100644--- a/crates/openhuman-core/src/agent/message_convert.rs+++ b/crates/openhuman-core/src/agent/message_convert.rs@@ -25,8 +25,8 @@ use tinytools_agent::dialect::{use tinyagents_runtime::transcript::reasoning_from_content;#[cfg(test)]use tinyagents_runtime::transcript::{- REASONING_EXT_KEY, message_to_display_transcript as message_to_chat_message,- message_to_native_transcript as message_to_native_chat_message,+ message_to_display_transcript as message_to_chat_message,+ message_to_native_transcript as message_to_native_chat_message, REASONING_EXT_KEY,};use tinyagents_session::transcript::TranscriptMessage;diff --git a/crates/openhuman-core/src/agent/message_convert_tests.rs b/crates/openhuman-core/src/agent/message_convert_tests.rsindex 729948587a..2e64c9c5a5 100644--- a/crates/openhuman-core/src/agent/message_convert_tests.rs+++ b/crates/openhuman-core/src/agent/message_convert_tests.rs@@ -26,21 +26,18 @@ fn durable_upload_parts_survive_message_row_replay_without_inline_payloads() {let Message::User(user) = replay else {panic!("user row expected")};- assert!(- user.content- .iter()- .any(|part| matches!(part, ContentBlock::Audio(MediaRef::Path { .. })))- );- assert!(- user.content- .iter()- .any(|part| matches!(part, ContentBlock::Video(MediaRef::Path { .. })))- );- assert!(- user.content- .iter()- .any(|part| matches!(part, ContentBlock::Document(MediaRef::Path { .. })))- );+ assert!(user+ .content+ .iter()+ .any(|part| matches!(part, ContentBlock::Audio(MediaRef::Path { .. }))));+ assert!(user+ .content+ .iter()+ .any(|part| matches!(part, ContentBlock::Video(MediaRef::Path { .. }))));+ assert!(user+ .content+ .iter()+ .any(|part| matches!(part, ContentBlock::Document(MediaRef::Path { .. }))));assert!(!serde_json::to_string(&row).unwrap().contains("base64"));}use tinyinference_llm::model::ModelRequest;@@ -307,12 +304,10 @@ fn reasoning_content_uses_typed_thinking_block_and_round_trips_metadata() {ContentBlock::Thinking { text, signature: None } if text == "private thoughts")}));- assert!(- !assistant- .content- .iter()- .any(|block| matches!(block, ContentBlock::ProviderExtension(_)))- );+ assert!(!assistant+ .content+ .iter()+ .any(|block| matches!(block, ContentBlock::ProviderExtension(_))));let back = message_to_chat_message(&msg).expect("assistant converts");assert_eq!(back.content, "visible answer");diff --git a/crates/openhuman-core/src/agent/multimodal.rs b/crates/openhuman-core/src/agent/multimodal.rsindex 89e046090f..d615dd087c 100644--- a/crates/openhuman-core/src/agent/multimodal.rs+++ b/crates/openhuman-core/src/agent/multimodal.rs@@ -14,16 +14,17 @@ use async_trait::async_trait;use reqwest::Client;use crate::config::{- MultimodalConfig, MultimodalFileConfig, build_runtime_proxy_client_with_timeouts,+ build_runtime_proxy_client_with_timeouts, MultimodalConfig, MultimodalFileConfig,};use tinyagents_session::transcript::{TranscriptMessage, TranscriptPart};use tinyagents_harness::multimodal::{- self as mm, BlobAttachmentStash,+ self as mm,config::{FileLimits, ImageLimits},markers,payload::sha256_prefix,- resolve::{TextExtractor, resolve_file, resolve_image},+ resolve::{resolve_file, resolve_image, TextExtractor},+ BlobAttachmentStash,};use tinyagents_harness::multimodal::{FilePayload, MultimodalError};diff --git a/crates/openhuman-core/src/agent/multimodal_attachment_handling_tests.rs b/crates/openhuman-core/src/agent/multimodal_attachment_handling_tests.rsindex d9848e44d5..61b92e8651 100644--- a/crates/openhuman-core/src/agent/multimodal_attachment_handling_tests.rs+++ b/crates/openhuman-core/src/agent/multimodal_attachment_handling_tests.rs@@ -261,11 +261,9 @@ async fn rehydrate_missing_stash_id_keeps_placeholder_text() {"see [Image: image #att:deadbeefdeadbeef]".to_string(),)];let out = rehydrate_image_placeholders(&messages).await;- assert!(- out[0]- .content- .contains("[Image: image #att:deadbeefdeadbeef]")- );+ assert!(out[0]+ .content+ .contains("[Image: image #att:deadbeefdeadbeef]"));assert!(!out[0].content.contains("[IMAGE:data:"));}diff --git a/crates/openhuman-core/src/agent/multimodal_marker_extraction_tests.rs b/crates/openhuman-core/src/agent/multimodal_marker_extraction_tests.rsindex b194a3cb87..da8fd5e366 100644--- a/crates/openhuman-core/src/agent/multimodal_marker_extraction_tests.rs+++ b/crates/openhuman-core/src/agent/multimodal_marker_extraction_tests.rs@@ -21,11 +21,9 @@ async fn prepare_messages_rejects_too_many_images() {.await.expect_err("should reject image count overflow");- assert!(- error- .to_string()- .contains("multimodal image limit exceeded")- );+ assert!(error+ .to_string()+ .contains("multimodal image limit exceeded"));}#[tokio::test]@@ -82,8 +80,7 @@ async fn prepare_messages_rejects_oversized_file() {.await.expect_err("oversized file must be rejected");- assert!(- err.to_string()- .contains("multimodal file size limit exceeded")- );+ assert!(err+ .to_string()+ .contains("multimodal file size limit exceeded"));}diff --git a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rsindex b7ed09ddb9..339a1c1047 100644--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs@@ -29,7 +29,7 @@use std::sync::Arc;-use anyhow::{Result, anyhow};+use anyhow::{anyhow, Result};use serde_json::json;use crate::agent::harness::ParentExecutionContext;@@ -46,8 +46,8 @@ use {};use tinyagents_orchestration::teams::{- MemberOutcome, SessionTeamLedger, TeamError, build_member_prompt, claimable_task,- deliver_pending_messages, run_member_graph, truncate_chars,+ build_member_prompt, claimable_task, deliver_pending_messages, run_member_graph,+ truncate_chars, MemberOutcome, SessionTeamLedger, TeamError,};use tinyagents_graph::GraphTracingSink;@@ -501,7 +501,7 @@ async fn record_failure_event(mod run_ledger {use std::path::Path;- use anyhow::{Result, anyhow};+ use anyhow::{anyhow, Result};use super::{AgentTeamMember, AgentTeamTask, ClaimOutcome, CompletionOutcome, RunEventAppend};diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions.rs b/crates/openhuman-core/src/agent/orchestration/background_completions.rsindex 4e1f37c05e..ecb8ab6fec 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions.rs@@ -35,17 +35,17 @@ use std::time::Duration;use tinyagents_tasks::{CompletionRecord, CompletionResult, CompletionRouter, CompletionState, CompletionStatus,- CompletionStore, DEFAULT_MAX_ATTEMPTS, DriverCompletionStore, InMemoryCompletionStore,- NotifyMode, RecordOutcome, TombstoneOutcome,+ CompletionStore, DriverCompletionStore, InMemoryCompletionStore, NotifyMode, RecordOutcome,+ TombstoneOutcome, DEFAULT_MAX_ATTEMPTS,};use super::completion_notice::BackgroundCompletionFormatter;-pub(crate) use super::completion_notice::{AWAITING_INPUT_LABEL, BackgroundAgentOutcome};-pub(crate) use super::completion_target::CompletionTarget;+pub(crate) use super::completion_notice::{BackgroundAgentOutcome, AWAITING_INPUT_LABEL};#[cfg(test)]pub(crate) use super::completion_target::tests::{- TestWorkspace, forget_workspace_for_test, install_store_for_test,+ forget_workspace_for_test, install_store_for_test, TestWorkspace,};+pub(crate) use super::completion_target::CompletionTarget;use super::completion_target::{awaiting_input_record_id, awaiting_input_record_prefix};pub(crate) use super::completion_target::{claim_recovery, forget_recovery};diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions/thread_index.rs b/crates/openhuman-core/src/agent/orchestration/background_completions/thread_index.rsindex bb62de5505..62916f2308 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions/thread_index.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions/thread_index.rs@@ -7,7 +7,7 @@ use std::sync::Arc;use tinyagents_tasks::CompletionRouter;-use super::{SESSION_THREADS_CAP, router_for_workspace, state};+use super::{router_for_workspace, state, SESSION_THREADS_CAP};use crate::core::runtime::DispatchCtx;/// The key of a thread or session id in `HostState`'s maps: per profile ofdiff --git a/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rsindex 045b7687dd..b6f6986a4e 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rs@@ -97,7 +97,7 @@ async fn one_profiles_stop_and_delete_never_reach_anothers_thread() {#[test]fn a_saas_cancel_reaches_only_the_callers_workspace() {- use super::running_subagents::{CallerWorkspace, caller_workspace_in};+ use super::running_subagents::{caller_workspace_in, CallerWorkspace};let ws = TestWorkspace::new();let alice = profile("u-alice", ws.path());assert!(matches!(diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_completions_tests.rsindex 961e15ef7e..a048a20fcd 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions_tests.rs@@ -56,12 +56,10 @@ fn record_is_thread_scoped_and_batches_in_completion_order() {let claimed = router.claim_pending("thread-A", usize::MAX).unwrap();assert_eq!(claimed.len(), 2, "everything ready is claimed as one batch");assert_eq!(claimed[0].result.text, "eiffel");- assert!(- router- .claim_pending("thread-A", usize::MAX)- .unwrap()- .is_empty()- );+ assert!(router+ .claim_pending("thread-A", usize::MAX)+ .unwrap()+ .is_empty());}#[test]@@ -81,12 +79,10 @@ fn headless_completion_is_dropped() {let _guard = test_guard();let ws = workspace();record(ws.path(), "sess-headless", "sub-1", "x", None);- assert!(- router_for_workspace(ws.path())- .claim_pending("", usize::MAX)- .unwrap()- .is_empty()- );+ assert!(router_for_workspace(ws.path())+ .claim_pending("", usize::MAX)+ .unwrap()+ .is_empty());assert!(recover_pending_threads(&cx(), ws.path()).is_empty());}diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery.rsindex a49596a801..6a4b983b2d 100644--- a/crates/openhuman-core/src/agent/orchestration/background_delivery.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery.rs@@ -49,10 +49,10 @@ use slot::DeliverySlot;use super::background_completions;use super::busy_guard::is_busy;#[cfg(test)]-use super::busy_guard::{TurnBusy, busy, clear_busy_for_thread};+use super::busy_guard::{busy, clear_busy_for_thread, TurnBusy};use super::completion_notice::build_undelivered_notice;use super::completion_owners;-use super::delivery_drain::{DrainFence, DrainOutcome, RECOVERY_BUSY_POLL, run_drain};+use super::delivery_drain::{run_drain, DrainFence, DrainOutcome, RECOVERY_BUSY_POLL};use crate::core::runtime::CoreContext;/// Coalesce completions landing within this window into one delivery turn.diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rsindex ec2de0ddcb..d2113cb217 100644--- a/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rs@@ -5,8 +5,8 @@ use std::sync::Arc;use tinyagents_tasks::CompletionRouter;-use crate::core::runtime::DispatchCtx;use crate::core::runtime::tenant;+use crate::core::runtime::DispatchCtx;/// The per-thread (per profile) delivery slot, plus the batch lease./// Dropping it frees both: `release` on an already-settled record is a no-op,diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery_slots_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery_slots_tests.rsindex 261bbaed11..e09bc83f43 100644--- a/crates/openhuman-core/src/agent/orchestration/background_delivery_slots_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery_slots_tests.rs@@ -5,7 +5,7 @@use super::*;use crate::agent::orchestration::background_completions::{- TestWorkspace, pending_for, record_completion, router_for_workspace,+ pending_for, record_completion, router_for_workspace, TestWorkspace,};use crate::core::runtime::DispatchCtx;use crate::core::runtime::{ContextOverlay, DomainSet};diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rsindex a36f17ce61..c72e47df3c 100644--- a/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rs@@ -9,7 +9,7 @@ use std::path::Path;use std::sync::Arc;use super::background_completions::*;-use super::background_delivery::{Drain, drain_schedule_in};+use super::background_delivery::{drain_schedule_in, Drain};use crate::core::events::DomainEvent;use crate::core::runtime::{ContextOverlay, CoreContext, DomainSet};use crate::tools::toolpacks::ToolGroups;@@ -151,7 +151,7 @@ fn an_unknown_session_is_dropped_in_saas() {/// its own marks.#[tokio::test]async fn busy_marks_are_keyed_by_the_explicit_context() {- use super::busy_guard::{TurnBusy, clear_busy_for_thread, is_busy};+ use super::busy_guard::{clear_busy_for_thread, is_busy, TurnBusy};let _guard = crate::config::TEST_ENV_LOCK.lock().await;let (ws_a, ws_b) = (TestWorkspace::new(), TestWorkspace::new());let alice = DispatchCtx::new(profile(&unique("b-alice"), ws_a.path()));diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rsindex edf37dd14f..ad766f77a5 100644--- a/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery_tests.rs@@ -6,7 +6,7 @@ fn cx() -> crate::core::runtime::DispatchCtx {}use crate::agent::orchestration::background_completions::{- TestWorkspace, forget_workspace_for_test, pending_for, record_completion, router_for_workspace,+ forget_workspace_for_test, pending_for, record_completion, router_for_workspace, TestWorkspace,};use std::path::Path;use std::sync::atomic::{AtomicU32, Ordering};@@ -510,12 +510,10 @@ async fn every_subagent_terminal_event_schedules_a_drain_through_the_handler() {iterations: 0,}).await;- assert!(- scheduled_for_test()- .lock()- .expect("scheduled")- .contains(&("bd-term-thread".to_string(), Duration::from_millis(300)))- );+ assert!(scheduled_for_test()+ .lock()+ .expect("scheduled")+ .contains(&("bd-term-thread".to_string(), Duration::from_millis(300))));clear_busy(session);assert_eq!(drain_schedule(&DomainEvent::SubagentFailed {@@ -680,12 +678,10 @@ async fn boot_recovery_schedules_a_delivery_for_every_thread_with_undelivered_rescheduled_for_test().lock().expect("scheduled").clear();assert_eq!(recover_on_boot(&cx(), w), 1);- assert!(- scheduled_for_test()- .lock()- .expect("scheduled")- .contains(&("thread-boot-sched".to_string(), RECOVERY_DELAY))- );+ assert!(scheduled_for_test()+ .lock()+ .expect("scheduled")+ .contains(&("thread-boot-sched".to_string(), RECOVERY_DELAY)));assert_eq!(recover_on_boot(&cx(), w),0,diff --git a/crates/openhuman-core/src/agent/orchestration/completion_target_tests.rs b/crates/openhuman-core/src/agent/orchestration/completion_target_tests.rsindex bb81a8bda4..f42594160d 100644--- a/crates/openhuman-core/src/agent/orchestration/completion_target_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/completion_target_tests.rs@@ -1,7 +1,7 @@use std::path::Path;use std::sync::Arc;-use super::super::background_completions::{Entry, new_router, state};+use super::super::background_completions::{new_router, state, Entry};use tinyagents_tasks::CompletionStore;/// A temporary workspace that forgets its router when dropped, so thediff --git a/crates/openhuman-core/src/agent/orchestration/delegation.rs b/crates/openhuman-core/src/agent/orchestration/delegation.rsindex b05a6777ff..d0935ffbd1 100644--- a/crates/openhuman-core/src/agent/orchestration/delegation.rs+++ b/crates/openhuman-core/src/agent/orchestration/delegation.rs@@ -18,7 +18,7 @@use std::sync::Arc;use crate::agent::subagent_host::{- SubagentRunOptions, SubagentRunStatus, run_subagent_with_parent,+ run_subagent_with_parent, SubagentRunOptions, SubagentRunStatus,};use crate::agent::tinyagents::host::OpenHumanRunContext;use crate::agent_registry::host_definition::AgentDefinition;diff --git a/crates/openhuman-core/src/agent/orchestration/delivery_drain_tests.rs b/crates/openhuman-core/src/agent/orchestration/delivery_drain_tests.rsindex 545fe8ceb5..215339fcd7 100644--- a/crates/openhuman-core/src/agent/orchestration/delivery_drain_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/delivery_drain_tests.rs@@ -1,12 +1,12 @@use super::*;use crate::agent::orchestration::background_completions::{- TestWorkspace, pending_for, record_completion, router_for_workspace,+ pending_for, record_completion, router_for_workspace, TestWorkspace,};use crate::agent::orchestration::busy_guard::TurnBusy;use crate::core::runtime::DispatchCtx;-use crate::storage::MemoryStorage;-use crate::storage::fence::{ScopeMatch, system_now_ms};+use crate::storage::fence::{system_now_ms, ScopeMatch};use crate::storage::lease::{DocumentLeases, LeaseStore};+use crate::storage::MemoryStorage;use std::sync::atomic::{AtomicBool, AtomicU32, Ordering};const TTL: Duration = Duration::from_secs(30);diff --git a/crates/openhuman-core/src/agent/orchestration/ops.rs b/crates/openhuman-core/src/agent/orchestration/ops.rsindex 0fee059c85..0065e03c07 100644--- a/crates/openhuman-core/src/agent/orchestration/ops.rs+++ b/crates/openhuman-core/src/agent/orchestration/ops.rs@@ -27,7 +27,7 @@ use super::types::{};use crate::agent::harness::fork_context::ParentExecutionContext;use crate::agent::subagent_host::{- SubagentRunError, SubagentRunOptions, SubagentRunOutcome, SubagentRunStatus, run_subagent,+ run_subagent, SubagentRunError, SubagentRunOptions, SubagentRunOutcome, SubagentRunStatus,};use crate::agent::tinyagents::host::steering::shared_steering_registry;use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};@@ -37,8 +37,8 @@ use crate::progress::AgentProgress;use std::collections::BTreeMap;use std::sync::Arc;use thiserror::Error;-use tinyagents_harness::CancellationToken;use tinyagents_harness::ids::TaskId;+use tinyagents_harness::CancellationToken;use tinyagents_tasks::{DetachedTaskRegistry, DetachedTaskRegistryError, DetachedTaskWaitOutcome,OrchestrationTaskStatus,diff --git a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/ops_tests.rsindex c15f6c0591..aa437055ce 100644--- a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/ops_tests.rs@@ -6,8 +6,8 @@ use async_trait::async_trait;use parking_lot::Mutex;use std::future::Future;use std::sync::{- Arc,atomic::{AtomicUsize, Ordering},+ Arc,};use tinyagents_tasks::OrchestrationTaskStatus;use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};@@ -241,13 +241,11 @@ async fn e2e_orchestrator_answers_coding_agent_question_and_resumes_child() {.expect("wait first child");let first_child = &first_wait.agents[0];assert_eq!(first_child.status, OrchestrationTaskStatus::Completed);- assert!(- first_child- .result_summary- .as_deref()- .unwrap_or_default()- .contains("CODE_AGENT_QUESTION")- );+ assert!(first_child+ .result_summary+ .as_deref()+ .unwrap_or_default()+ .contains("CODE_AGENT_QUESTION"));// `message_agent`/`follow_up` are gone (superseded by the durable verbs in// `command_center::control`). The orchestrator now records its answer by@@ -285,13 +283,11 @@ async fn e2e_orchestrator_answers_coding_agent_question_and_resumes_child() {Some(first.orchestration_id.as_str()));assert_eq!(final_child.status, OrchestrationTaskStatus::Completed);- assert!(- final_child- .result_summary- .as_deref()- .unwrap_or_default()- .contains("CODE_AGENT_DONE")- );+ assert!(final_child+ .result_summary+ .as_deref()+ .unwrap_or_default()+ .contains("CODE_AGENT_DONE"));let prompts = provider.prompts();assert_eq!(prompts.len(), 2);@@ -365,12 +361,10 @@ async fn e2e_orchestrator_waits_for_multiple_parallel_coding_subagents() {assert!(waited.completed);assert_eq!(waited.agents.len(), 3);- assert!(- waited- .agents- .iter()- .all(|agent| agent.status == OrchestrationTaskStatus::Completed)- );+ assert!(waited+ .agents+ .iter()+ .all(|agent| agent.status == OrchestrationTaskStatus::Completed));let outputs = waited.agents.iter()diff --git a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rsindex a63e1f24a7..004d8e2063 100644--- a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs+++ b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs@@ -28,8 +28,8 @@ use std::sync::Arc;use anyhow::{Context, Result};-use crate::agent::OpenHumanSessionHost;use crate::agent::harness::fork_context::ParentExecutionContext;+use crate::agent::OpenHumanSessionHost;use crate::config::Config;const LOG_TARGET: &str = "agent_orchestration::parent_context";diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents.rsindex 4e6dee49ea..e20dae163a 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents.rs@@ -65,12 +65,12 @@ mod tests;#[cfg(test)]pub(crate) use cancel::prune;#[cfg(test)]-pub(crate) use cancel::{CallerWorkspace, caller_workspace_in};+pub(crate) use cancel::{caller_workspace_in, CallerWorkspace};pub(crate) use cancel::{- CancelledSubagent, cancel_all, cancel_by_session_in_workspace, cancel_by_task,- cancel_for_thread, stop_for_thread,+ cancel_all, cancel_by_session_in_workspace, cancel_by_task, cancel_for_thread, stop_for_thread,+ CancelledSubagent,};-pub(crate) use registry::{RegistrationError, admit_spawn, register, status_channel};+pub(crate) use registry::{admit_spawn, register, status_channel, RegistrationError};pub(crate) use resolve::{resume_ref_for_task_in_workspace, task_id_for_session_in_workspace};pub(crate) use roster::active_subagents_context_block;pub use steering::steer;diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/registry.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/registry.rsindex c0d2a4c25f..edbb8e5326 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/registry.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/registry.rs@@ -28,14 +28,14 @@ use tokio::sync::watch;use tokio::task::AbortHandle;use crate::agent::tinyagents::host::steering::shared_steering_registry;-use tinyagents_harness::CancellationToken;use tinyagents_harness::ids::TaskId;use tinyagents_harness::run_queue::RunQueue;+use tinyagents_harness::CancellationToken;use tinyagents_tasks::DetachedTaskRegistry;use super::task_ledger::{record_spawned, task_store_for_workspace};use tinyagents_orchestration::subagent::{- DetachedSubagentStatus, SubagentIdentity, WaitError, spawn_status_watcher,+ spawn_status_watcher, DetachedSubagentStatus, SubagentIdentity, WaitError,};#[derive(Clone)]@@ -138,8 +138,8 @@ const REGISTRY_SOFT_CAP: usize = 256;static REGISTRY: OnceLock<DetachedTaskRegistry<RunningSubagentMetadata, DetachedSubagentStatus>> =OnceLock::new();-pub(crate) fn registry()--> &'static DetachedTaskRegistry<RunningSubagentMetadata, DetachedSubagentStatus> {+pub(crate) fn registry(+) -> &'static DetachedTaskRegistry<RunningSubagentMetadata, DetachedSubagentStatus> {REGISTRY.get_or_init(|| {DetachedTaskRegistry::new(shared_steering_registry().clone(),diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/resolve.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/resolve.rsindex 04608bd842..6f9264bd0e 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/resolve.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/resolve.rs@@ -6,8 +6,9 @@use std::path::Path;use tinyagents_orchestration::subagent::{- SubagentResumeRef, WaitError, resume_ref_for_task as live_resume_ref, resume_ref_from_record,- task_id_for_session as live_task_id, task_id_for_session_in_records,+ resume_ref_for_task as live_resume_ref, resume_ref_from_record,+ task_id_for_session as live_task_id, task_id_for_session_in_records, SubagentResumeRef,+ WaitError,};use super::registry::{admit_workspace, owner_key, registry};diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rsindex 65a69b7f4f..6d3ad37e94 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/roster.rs@@ -1,7 +1,7 @@//! Read-only rosters over the sub-agent registry: the durable+live merge used to render the//! `[active_subagents]` context block.-use tinyagents_orchestration::subagent::{SubagentSnapshot, snapshot_for_owner};+use tinyagents_orchestration::subagent::{snapshot_for_owner, SubagentSnapshot};use super::registry::{admit_workspace, owner_key, registry};use crate::agent::orchestration::fleet_tools::FleetToolSet;diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rsindex 83b615775d..a696ed18d8 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs@@ -2,7 +2,7 @@use tinyagents_harness::ids::TaskId;use tinyagents_harness::run_queue::QueueLane;-use tinyagents_orchestration::subagent::{SteerAccess, SteerError, steer_detached};+use tinyagents_orchestration::subagent::{steer_detached, SteerAccess, SteerError};use super::cancel::now_ms;use super::registry::{control_admits, owner_key, registry};diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rsindex 72446611f9..ffec82d723 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/task_ledger.rs@@ -11,13 +11,13 @@ use std::path::{Path, PathBuf};use std::sync::{Arc, OnceLock};use tinyagents_orchestration::subagent::{- SpawnedSubagent, WaitError, list_subagent_records, orphaned_subagent_reason, record_agent_id,+ list_subagent_records, orphaned_subagent_reason, record_agent_id,record_cancelled as ledger_cancelled, record_parent_session, record_spawned as ledger_spawned,- subagent_record_for_task, task_status_label,+ subagent_record_for_task, task_status_label, SpawnedSubagent, WaitError,};use tinyagents_tasks::{- DriverTaskStore, InMemoryTaskStore, OrchestrationTaskFilter, OrchestrationTaskRecord,- TaskStore, TaskStoreRegistry, reconcile_orphaned_tasks,+ reconcile_orphaned_tasks, DriverTaskStore, InMemoryTaskStore, OrchestrationTaskFilter,+ OrchestrationTaskRecord, TaskStore, TaskStoreRegistry,};#[cfg(test)]diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/wait.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/wait.rsindex 15e8f92e3d..c1c4a74133 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/wait.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/wait.rs@@ -6,7 +6,7 @@ use std::path::Path;use std::time::Duration;use tinyagents_orchestration::subagent::{- WaitError, WaitOutcome, record_to_wait_outcome, task_status_label, wait_detached,+ record_to_wait_outcome, task_status_label, wait_detached, WaitError, WaitOutcome,};use super::registry::{admit_workspace, owner_key, registry};diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rsindex 2a6ca43fa8..40716203c6 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs@@ -584,11 +584,9 @@ async fn saas_controls_follow_the_explicit_context_not_the_tasks_scope() {Err(SteerError::NotOwned));assert_eq!(pair.a.queue.status().await.steers, 0);- assert!(- snapshot_for_parent(&bob, PARENT)- .iter()- .all(|worker| worker.task_id != a_task)- );+ assert!(snapshot_for_parent(&bob, PARENT)+ .iter()+ .all(|worker| worker.task_id != a_task));assert!(cancel_by_task(&alice, &b_task).is_none(),diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rsindex da290b77d4..ca3dda0c17 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs@@ -21,7 +21,7 @@ use tinyagents_harness::run_queue::{QueueLane, RunQueue};use tinyagents_harness::steering::{SteeringCommand, SteeringHandle};use tinyagents_orchestration::subagent::FinishedOutcome;use tinyagents_orchestration::subagent::{- DETACHED_LEDGER_TIMEOUT_MS, DetachedSubagentStatus, WaitError, WaitOutcome,+ DetachedSubagentStatus, WaitError, WaitOutcome, DETACHED_LEDGER_TIMEOUT_MS,};use tinyagents_tasks::OrchestrationTaskStatus;use tokio::sync::watch;@@ -281,15 +281,13 @@ async fn snapshot_and_block_scope_to_parent_and_reflect_live_status() {assert!(block.ends_with("[/active_subagents]\n\n"));// A parent with no registered workers gets no block (no perturbation).- assert!(- active_subagents_context_block(- &cx(),- "nobody-here",- &test_workspace(),- &FleetToolSet::all()- )- .is_none()- );+ assert!(active_subagents_context_block(+ &cx(),+ "nobody-here",+ &test_workspace(),+ &FleetToolSet::all()+ )+ .is_none());// The shipped orchestrator has no wait/steer/close tools (#5701): the// guidance must not name them and must say results arrive on their own.@@ -370,15 +368,13 @@ async fn snapshot_and_block_scope_to_parent_and_reflect_live_status() {assert!(block.contains("status=idle"));assert!(block.contains("about: Daily X trending email workflow"));// Other parents' durable sessions must not leak in.- assert!(- active_subagents_context_block(- &cx(),- "unrelated-parent",- durable_ws.path(),- &FleetToolSet::all()- )- .is_none()- );+ assert!(active_subagents_context_block(+ &cx(),+ "unrelated-parent",+ durable_ws.path(),+ &FleetToolSet::all()+ )+ .is_none());}let _ = tx_a.send(DetachedSubagentStatus::Completed {@@ -527,17 +523,15 @@ async fn wait_times_out_and_leaves_entry_intact() {));// still steerable after a timed-out wait- assert!(- steer(- &cx(),- "task-slow",- "session-A",- "still here".into(),- QueueLane::Steer- )- .await- .is_ok()- );+ assert!(steer(+ &cx(),+ "task-slow",+ "session-A",+ "still here".into(),+ QueueLane::Steer+ )+ .await+ .is_ok());prune("task-slow");}@@ -585,17 +579,15 @@ async fn cancel_for_thread_aborts_only_matching_entries() {.await.is_ok());- assert!(- steer(- &cx(),- "task-headless",- "session-A",- "x".into(),- QueueLane::Steer- )- .await- .is_ok()- );+ assert!(steer(+ &cx(),+ "task-headless",+ "session-A",+ "x".into(),+ QueueLane::Steer+ )+ .await+ .is_ok());// Idempotent: a second pass cancels nothing.assert_eq!(cancel_for_thread(&cx(), "thread-X"), 0);diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel.rsindex fbb9671e4e..6860762134 100644--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel.rs+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel.rs@@ -32,13 +32,13 @@ mod staging;mod types;mod workers;-pub(crate) use collect::{SpawnParallelGraphOutcome, format_spawn_parallel_success};+pub(crate) use collect::{format_spawn_parallel_success, SpawnParallelGraphOutcome};pub(crate) use run::run_spawn_parallel_tasks_with_cancellation_and_workspace;pub(crate) use types::ParallelAgentTask;#[cfg(test)]pub(crate) use staging::{- ParallelTaskRejectionKind, SpawnParallelTaskPreflight, prepare_spawn_parallel_tasks_from_defs,+ prepare_spawn_parallel_tasks_from_defs, ParallelTaskRejectionKind, SpawnParallelTaskPreflight,};#[cfg(test)]pub(crate) use types::{ParallelAgentLineage, ParallelAgentResult, ParallelAgentStatus};diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rsindex 0bb7487c40..9adeba0f5d 100644--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs@@ -18,8 +18,8 @@ use crate::progress::AgentProgress;use tinyagents_definition::SandboxMode;use super::staging::{- ParallelTaskRejectionKind, ParallelWorktreeRequest, SpawnParallelTaskPreflight,- prepare_spawn_parallel_tasks_from_defs, worktree_request_for_task,+ prepare_spawn_parallel_tasks_from_defs, worktree_request_for_task, ParallelTaskRejectionKind,+ ParallelWorktreeRequest, SpawnParallelTaskPreflight,};use super::types::{ParallelAgentLineage, ParallelAgentResult, ParallelAgentStatus, ParallelAgentTask,diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rsindex 048005e375..3fe8077b94 100644--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rs+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rs@@ -14,7 +14,7 @@ use tinytools::WorkspaceDescriptor;use crate::agent_registry::host_definition::AgentDefinitionRegistry;use super::collect::{- SpawnParallelGraphOutcome, collect_spawn_parallel_results, project_spawn_parallel_result,+ collect_spawn_parallel_results, project_spawn_parallel_result, SpawnParallelGraphOutcome,};use super::dispatch::stage_spawn_parallel_workers_from_defs;use super::staging::snapshot_agent_definitions;diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rsindex 2503db5c40..9a20442ff9 100644--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs@@ -15,7 +15,7 @@ use std::path::PathBuf;use parking_lot::Mutex;-use tinyagents_graph::parallel::{ClaimConflict, ClaimPathError, parse_relative_claim_paths};+use tinyagents_graph::parallel::{parse_relative_claim_paths, ClaimConflict, ClaimPathError};use tinyagents_orchestration::parallel::WorkerDispatchMode;use tinyagents_orchestration::parallel::{AdmissionPolicy, AdmissionVerdict, Plan, Preflight, Rejection, RejectionKind, Task,diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rsindex 049bf69a49..527d42a7f8 100644--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rs+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/workers.rs@@ -6,10 +6,10 @@use std::path::PathBuf;use tinyagents_harness::CancellationToken;-use tinyagents_orchestration::parallel::{Worker, resolve_concurrency, run};+use tinyagents_orchestration::parallel::{resolve_concurrency, run, Worker};use crate::agent::subagent_host::{- SubagentRunOptions, SubagentRunStatus, run_subagent_with_parent,+ run_subagent_with_parent, SubagentRunOptions, SubagentRunStatus,};use super::types::{ParallelAgentResult, ParallelAgentStatus, SpawnParallelWorker};diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rsindex 9250b771d4..4214ba6365 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@@ -128,14 +128,12 @@ fn list_for_parent_without_thread_id_does_not_filter_by_thread() {let all = list_for_parent(&store, "parent-a", None).unwrap();assert_eq!(all.len(), 2);- assert!(- all.iter()- .any(|session| session.subagent_session_id == first.subagent_session_id)- );- assert!(- all.iter()- .any(|session| session.subagent_session_id == second.subagent_session_id)- );+ assert!(all+ .iter()+ .any(|session| session.subagent_session_id == first.subagent_session_id));+ assert!(all+ .iter()+ .any(|session| session.subagent_session_id == second.subagent_session_id));let thread_a = list_for_parent(&store, "parent-a", Some("thread-a")).unwrap();assert_eq!(thread_a.len(), 1);@@ -146,16 +144,14 @@ fn list_for_parent_without_thread_id_does_not_filter_by_thread() {fn missing_session_updates_return_errors() {let dir = tempfile::tempdir().unwrap();let store = SubagentSessionStore::new(dir.path().to_path_buf());- assert!(- mark_finished(- &store,- "missing",- "sub-1",- &SubagentRunStatus::Completed,- vec![]- )- .is_err()- );+ assert!(mark_finished(+ &store,+ "missing",+ "sub-1",+ &SubagentRunStatus::Completed,+ vec![]+ )+ .is_err());assert!(mark_failed(&store, "missing", "sub-1", "boom".into()).is_err());assert!(!close(&store, "missing").unwrap());}diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rsindex 0cf5de3a91..445c93f1b8 100644--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rs+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents.rs@@ -24,8 +24,8 @@ use serde_json::Value;use tinystoragedrivers::{CollectionSpec, Precondition, Query, Sort};use super::types::DurableSubagentSession;-use crate::storage::DocumentStoreExt;use crate::storage::documents::Repo;+use crate::storage::DocumentStoreExt;const SESSIONS: &str = "subagent_sessions";/// Holds the marker document that records the one-time legacy file import, indiff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents_tests.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents_tests.rsindex b0f1841397..885846ceb4 100644--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/store_documents_tests.rs@@ -35,12 +35,10 @@ fn session(id: &str) -> DurableSubagentSession {#[test]fn a_missing_list_loads_empty() {- assert!(- docs_in(&MemoryStorage::new(), "local")- .load()- .unwrap()- .is_empty()- );+ assert!(docs_in(&MemoryStorage::new(), "local")+ .load()+ .unwrap()+ .is_empty());}#[test]@@ -78,11 +76,10 @@ fn the_store_uses_the_workspace_default_with_no_backend_installed() {store.save(&[session("a")]).unwrap();assert_eq!(store.load().unwrap().len(), 1);// No JSON file store: the records are in the workspace's own database.- assert!(- !dir.path()- .join(".openhuman/subagent_sessions.json")- .exists()- );+ assert!(!dir+ .path()+ .join(".openhuman/subagent_sessions.json")+ .exists());assert!(dir.path().join("storage").exists());}@@ -115,11 +112,10 @@ fn the_store_dispatches_to_documents_when_a_backend_is_pinned() {assert_eq!(store.load().unwrap().len(), 1);});assert_eq!(docs.load().unwrap().len(), 1);- assert!(- !dir.path()- .join(".openhuman/subagent_sessions.json")- .exists()- );+ assert!(!dir+ .path()+ .join(".openhuman/subagent_sessions.json")+ .exists());}#[test]diff --git a/crates/openhuman-core/src/agent/orchestration/tools.rs b/crates/openhuman-core/src/agent/orchestration/tools.rsindex 50a7d17f4b..12d012cd8b 100644--- a/crates/openhuman-core/src/agent/orchestration/tools.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools.rs@@ -71,7 +71,7 @@ pub(crate) fn live_parent_run_context(pub use archetype_delegation::{ArchetypeDelegationTool, DelegationTarget};pub(crate) use close_subagent::CloseSubagentDispatch;pub use close_subagent::CloseSubagentTool;-pub use collapsed_delegation::{CollapsedDelegationTool, DELEGATE_TO_TOOL_NAME, DelegateTarget};+pub use collapsed_delegation::{CollapsedDelegationTool, DelegateTarget, DELEGATE_TO_TOOL_NAME};pub(crate) use continue_subagent::ContinueSubagentDispatch;pub use continue_subagent::ContinueSubagentTool;pub(crate) use delegate_graph::DelegateGraphDispatch;@@ -79,7 +79,7 @@ pub use delegate_graph::DelegateGraphTool;pub(crate) use list_subagents::ListSubagentsDispatch;pub use list_subagents::ListSubagentsTool;pub(crate) use spawn_async_subagent::SpawnAsyncSubagentDispatch;-pub use spawn_async_subagent::{SpawnAsyncSubagentTool, scope_spawn_async_subagent_spec};+pub use spawn_async_subagent::{scope_spawn_async_subagent_spec, SpawnAsyncSubagentTool};pub(crate) use spawn_parallel_agents::SpawnParallelAgentsDispatch;pub use spawn_parallel_agents::SpawnParallelAgentsTool;pub(crate) use spawn_subagent::SpawnSubagentDispatch;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation.rs b/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation.rsindex a132d13a71..8428d8682d 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation.rs@@ -1,6 +1,6 @@use async_trait::async_trait;-use serde_json::Value;use serde_json::json;+use serde_json::Value;use tinytools::ToolRunContext;use tinytools::{diff --git a/crates/openhuman-core/src/agent/orchestration/tools/collapsed_delegation.rs b/crates/openhuman-core/src/agent/orchestration/tools/collapsed_delegation.rsindex 10789e7083..c67772951f 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/collapsed_delegation.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/collapsed_delegation.rs@@ -56,7 +56,7 @@//! [`ToolExposure::Hidden`]: tinytools::ToolExposure::Hiddenuse async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use super::archetype_delegation::{delegation_envelope_properties, render_structured_handoff};use tinytools::ToolRunContext;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rsindex 12e940fac2..e5c3d48629 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs@@ -10,8 +10,8 @@use crate::agent::orchestration::tools::dispatch::{incomplete_stop, stopped_subagent_result};use crate::agent::subagent_host::{- SubagentRunOptions, SubagentRunStatus, continue_subagent, continue_subagent_with_parent,- load_subagent_checkpoint,+ continue_subagent, continue_subagent_with_parent, load_subagent_checkpoint, SubagentRunOptions,+ SubagentRunStatus,};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::progress::AgentProgress;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rsindex 04ef30bf4b..8078e30d83 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs@@ -1,7 +1,7 @@//! Subagent dispatch logic shared by all agent delegation tools.use crate::agent::subagent_host::{- SubagentRunOptions, SubagentRunStatus, run_subagent_with_parent,+ run_subagent_with_parent, SubagentRunOptions, SubagentRunStatus,};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::progress::AgentProgress;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rsindex 25d76ede2b..84a523cdbd 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs@@ -4,7 +4,7 @@ use std::sync::Arc;use tinytools::Tool;use super::super::collapsed_delegation::{- CollapsedDelegationTool, DelegateTarget, dispatch_targets_from_schema,+ dispatch_targets_from_schema, CollapsedDelegationTool, DelegateTarget,};use super::super::delegate_graph::DelegateGraphDispatch;use crate::tools::delegate::DelegateToolDispatch;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/list_subagents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/list_subagents_tests.rsindex 5170e558f1..1fb247e75d 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/list_subagents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/list_subagents_tests.rs@@ -3,13 +3,11 @@ use super::*;#[test]fn schema_has_no_required_fields() {let schema = ListSubagentsTool::new().parameters_schema();- assert!(- schema- .get("required")- .and_then(|v| v.as_array())- .expect("required")- .is_empty()- );+ assert!(schema+ .get("required")+ .and_then(|v| v.as_array())+ .expect("required")+ .is_empty());}#[test]diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rsindex 89ef2995c1..18ee8bdb23 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs@@ -13,7 +13,7 @@ use crate::agent::orchestration::subagent_sessions::{};use crate::agent::orchestration::tools::dispatch::incomplete_stop;use crate::agent::subagent_host::{- SubagentRunOptions, SubagentRunStatus, run_subagent_with_parent,+ run_subagent_with_parent, SubagentRunOptions, SubagentRunStatus,};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::core::runtime::DispatchCtx;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 fab47ba995..81b036b7c7 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@@ -299,10 +299,9 @@ fn async_reference_matches_the_orchestrator_fleet_vocabulary() {.iter().filter_map(|v| v.as_str()).collect();- assert!(- next.iter()- .any(|a| a.contains("delivered to you automatically"))- );+ assert!(next+ .iter()+ .any(|a| a.contains("delivered to you automatically")));let message = format_async_subagent_accepted("task_manager_agent", &serialized, &fleet);let prose = message.split("[async_subagent_ref]").next().unwrap();@@ -614,10 +613,8 @@ fn scoped_instance_advertises_exactly_the_allowlist() {schema["properties"]["agent_id"]["enum"],serde_json::json!(["agent_memory", "workflow_builder"]));- assert!(- schema["properties"]["agent_id"]["description"]- .as_str()- .unwrap_or_default()- .contains("only these are dispatchable")- );+ assert!(schema["properties"]["agent_id"]["description"]+ .as_str()+ .unwrap_or_default()+ .contains("only these are dispatchable"));}diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rsindex e0aa14c8c5..3c8d6bfff9 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs@@ -6,8 +6,8 @@ use crate::agent::orchestration::spawn_parallel::ParallelAgentLineage;use crate::agent::orchestration::spawn_parallel::ParallelAgentResult;use crate::agent::orchestration::spawn_parallel::ParallelAgentTask;use crate::agent::orchestration::spawn_parallel::{- SpawnParallelGraphOutcome, format_spawn_parallel_success,- run_spawn_parallel_tasks_with_cancellation_and_workspace,+ format_spawn_parallel_success, run_spawn_parallel_tasks_with_cancellation_and_workspace,+ SpawnParallelGraphOutcome,};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use async_trait::async_trait;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rsindex a8f0bb1e03..449c958c51 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_policy_tests.rs@@ -210,16 +210,12 @@ async fn collects_immediate_task_validation_failures() {.iter().map(|result| result["error"].as_str().unwrap_or_default()).collect::<Vec<_>>();- assert!(- errors- .iter()- .any(|error| error.contains("agent_id and prompt"))- );- assert!(- errors- .iter()- .any(|error| error.contains("unknown agent_id"))- );+ assert!(errors+ .iter()+ .any(|error| error.contains("agent_id and prompt")));+ assert!(errors+ .iter()+ .any(|error| error.contains("unknown agent_id")));}#[test]@@ -307,11 +303,9 @@ fn shared_workspace_allows_readonly_or_explicitly_isolated_workers() {&parent,);- assert!(- preflight- .into_iter()- .all(|item| matches!(item, SpawnParallelTaskPreflight::Prepared(_)))- );+ assert!(preflight+ .into_iter()+ .all(|item| matches!(item, SpawnParallelTaskPreflight::Prepared(_))));}// This exercises the full parallel-subagent path (parent turn → spawn Ndiff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rsindex 79e687c7ca..c688170a0f 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs@@ -1,10 +1,10 @@use super::*;-use crate::agent::OpenHumanSessionHost;use crate::agent::harness::fork_context::ParentExecutionContext;use crate::agent::orchestration::spawn_parallel::{- ParallelTaskRejectionKind, SpawnParallelTaskPreflight, prepare_spawn_parallel_tasks_from_defs,+ prepare_spawn_parallel_tasks_from_defs, ParallelTaskRejectionKind, SpawnParallelTaskPreflight,};use crate::agent::tinyagents::host::OpenHumanRunContext;+use crate::agent::OpenHumanSessionHost;use crate::agent_registry::host_definition::AgentDefinition;use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::config::AgentConfig;@@ -13,8 +13,8 @@ use parking_lot::Mutex;use serde_json::json;use std::collections::HashMap;use std::sync::{- Arc,atomic::{AtomicUsize, Ordering},+ Arc,};use tinyagents_definition::{AgentTier, DefinitionSource, ModelSpec, PromptSource, SandboxMode, ToolScope,@@ -29,7 +29,7 @@ use tinytools::{PermissionLevel, Tool, ToolResult};use tinytools_agent::dialect::NativeDialect;use tinytools_agent::dialect::ToolCallFormat;use tinytools_agent::dialect::TranscriptEntry;-use tokio::time::{Duration, sleep, timeout};+use tokio::time::{sleep, timeout, Duration};const PARENT_PROMPT_CANARY: &str = "parallel-fanout-e2e-canary";const RESEARCH_PROMPT_CANARY: &str = "research-branch-canary";diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rsindex 38a2cbbd72..55f87b43d5 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rs@@ -14,7 +14,7 @@//!use crate::agent::orchestration::tools::dispatch::{incomplete_stop, stopped_subagent_result};use crate::agent::subagent_host::{- SubagentRunOptions, SubagentRunOutcome, SubagentRunStatus, run_subagent_with_parent,+ run_subagent_with_parent, SubagentRunOptions, SubagentRunOutcome, SubagentRunStatus,};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::core::runtime::DispatchCtx;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rsindex fbd7fcc4dd..50d10575ff 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent_tests.rs@@ -51,13 +51,11 @@ fn parameters_schema_advertises_dedicated_thread_flag() {assert_eq!(flag.get("type").and_then(|v| v.as_str()), Some("boolean"));// Must be off by default — workers are an opt-in escape hatch, not// a free upgrade for every spawn.- assert!(- schema- .get("required")- .and_then(|v| v.as_array())- .map(|arr| arr.iter().all(|s| s.as_str() != Some("dedicated_thread")))- .unwrap_or(true)- );+ assert!(schema+ .get("required")+ .and_then(|v| v.as_array())+ .map(|arr| arr.iter().all(|s| s.as_str() != Some("dedicated_thread")))+ .unwrap_or(true));}#[test]@@ -67,13 +65,11 @@ fn parameters_schema_advertises_optional_model_override() {let props = schema.get("properties").expect("schema has properties");let model = props.get("model").expect("model override advertised");assert_eq!(model.get("type").and_then(|v| v.as_str()), Some("string"));- assert!(- schema- .get("required")- .and_then(|v| v.as_array())- .map(|arr| arr.iter().all(|s| s.as_str() != Some("model")))- .unwrap_or(true)- );+ assert!(schema+ .get("required")+ .and_then(|v| v.as_array())+ .map(|arr| arr.iter().all(|s| s.as_str() != Some("model")))+ .unwrap_or(true));}#[test]@@ -236,11 +232,9 @@ async fn legacy_archetype_alias_is_accepted_for_lookup() {.await.unwrap();assert!(result.is_error);- assert!(- result- .output()- .contains("unknown agent_id 'totally_made_up'")- );+ assert!(result+ .output()+ .contains("unknown agent_id 'totally_made_up'"));}#[tokio::test]diff --git a/crates/openhuman-core/src/agent/orchestration/tools/subagent_abort_report.rs b/crates/openhuman-core/src/agent/orchestration/tools/subagent_abort_report.rsindex 42aaf8bf5a..fab6ef3dcf 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/subagent_abort_report.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/subagent_abort_report.rs@@ -24,8 +24,8 @@//! only thing that settles the card. A closed channel has no reader left to//! settle anything, so that case is logged and dropped.-use tokio::sync::mpsc::Sender;use tokio::sync::mpsc::error::TrySendError;+use tokio::sync::mpsc::Sender;use crate::progress::AgentProgress;diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rsindex dc8b108d17..ec603dccdd 100644--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/engine/lifecycle.rs@@ -2,24 +2,24 @@//! that drives a run's phase DAG to completion.use crate::core::runtime::DispatchCtx;-use anyhow::{Context, Result, anyhow};+use anyhow::{anyhow, Context, Result};use serde_json::Value;use std::sync::Arc;-use tinyagents_orchestration::workflow::{WorkflowEngine, reset_running_phases};+use tinyagents_orchestration::workflow::{reset_running_phases, WorkflowEngine};use crate::agent::harness::ParentExecutionContext;use crate::agent::orchestration::parent_context::with_root_parent;use crate::config::Config;use tinyagents_session::run_ledger::{WorkflowRun, WorkflowRunStatus, WorkflowRunUpsert};-use super::LOG_TARGET;use super::cancel::{- WorkflowCancelSignal, cancel_signal_if_current, clear_cancel_signal, is_current_cancel_signal,- lookup_cancel_signal, register_cancel_signal, replace_cancel_signal,+ cancel_signal_if_current, clear_cancel_signal, is_current_cancel_signal, lookup_cancel_signal,+ register_cancel_signal, replace_cancel_signal, WorkflowCancelSignal,};use super::ops::{compare_and_swap_workflow_run_lifecycle, definition_by_id, get_workflow_run, workflow_store,};+use super::LOG_TARGET;use tinyagents_orchestration::workflow::WorkflowDefinition;/// Start a new workflow run and return immediately.diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rsindex 861fd7be58..7fcc4202d4 100644--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs@@ -2,7 +2,7 @@use std::sync::Arc;-use anyhow::{Result, anyhow};+use anyhow::{anyhow, Result};use async_trait::async_trait;use serde_json::json;use tinyagents_harness::CancellationToken;diff --git a/crates/openhuman-core/src/agent/progress_tracing/collector/events.rs b/crates/openhuman-core/src/agent/progress_tracing/collector/events.rsindex 269e858dc0..2b7b303bc8 100644--- a/crates/openhuman-core/src/agent/progress_tracing/collector/events.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/collector/events.rs@@ -4,11 +4,11 @@use std::collections::BTreeMap;use crate::progress::AgentProgress;-use tinyagents_harness::observability::trace_export::SpanKind;use tinyagents_harness::observability::trace_export::serialize::{- MAX_ERROR_MESSAGE_CHARS, MAX_MODEL_CONTENT_CHARS, json_f64, json_str, json_u32, json_u64,- json_usize, status_of, truncate_chars,+ json_f64, json_str, json_u32, json_u64, json_usize, status_of, truncate_chars,+ MAX_ERROR_MESSAGE_CHARS, MAX_MODEL_CONTENT_CHARS,};+use tinyagents_harness::observability::trace_export::SpanKind;use super::state::{SpanCollector, SubagentState};use tinyagents_harness::observability::trace_export::SpanStatus;diff --git a/crates/openhuman-core/src/agent/progress_tracing/collector/finish.rs b/crates/openhuman-core/src/agent/progress_tracing/collector/finish.rsindex 76cf63997c..fc0f3bd5a4 100644--- a/crates/openhuman-core/src/agent/progress_tracing/collector/finish.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/collector/finish.rs@@ -5,7 +5,7 @@use std::collections::BTreeMap;use tinyagents_harness::observability::trace_export::serialize::{- MAX_ERROR_MESSAGE_CHARS, json_str, truncate_chars,+ json_str, truncate_chars, MAX_ERROR_MESSAGE_CHARS,};use tinyagents_harness::observability::trace_export::{SpanKind, SpanStatus};diff --git a/crates/openhuman-core/src/agent/progress_tracing/collector/span_lifecycle.rs b/crates/openhuman-core/src/agent/progress_tracing/collector/span_lifecycle.rsindex ad90f79b4c..5d864f8dc5 100644--- a/crates/openhuman-core/src/agent/progress_tracing/collector/span_lifecycle.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/collector/span_lifecycle.rs@@ -3,10 +3,10 @@use std::collections::BTreeMap;-use tinyagents_harness::observability::trace_export::SpanKind;use tinyagents_harness::observability::trace_export::serialize::{- MAX_TOOL_CONTENT_CHARS, truncate_capture_text,+ truncate_capture_text, MAX_TOOL_CONTENT_CHARS,};+use tinyagents_harness::observability::trace_export::SpanKind;use super::state::SpanCollector;diff --git a/crates/openhuman-core/src/agent/progress_tracing/journal_projection.rs b/crates/openhuman-core/src/agent/progress_tracing/journal_projection.rsindex 81ce4783ad..d1131007c8 100644--- a/crates/openhuman-core/src/agent/progress_tracing/journal_projection.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/journal_projection.rs@@ -60,7 +60,7 @@ use tinyagents_harness::observability::AgentObservation;use super::SpanCollector;use crate::progress::AgentProgress;-use replay::{Replay, json_content_text, turn_outcome_for_failure, user_message_text};+use replay::{json_content_text, turn_outcome_for_failure, user_message_text, Replay};#[path = "journal_replay.rs"]mod replay;diff --git a/crates/openhuman-core/src/agent/progress_tracing/journal_projection_cost_rollup_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/journal_projection_cost_rollup_tests.rsindex 50908d0ccb..86ba9eeb36 100644--- a/crates/openhuman-core/src/agent/progress_tracing/journal_projection_cost_rollup_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/journal_projection_cost_rollup_tests.rs@@ -262,7 +262,8 @@ fn cache_creation_tokens_reach_the_projected_generation_span() {}/// The answer the crate injects for an unknown tool (`unknown_tool_message`).-const UNKNOWN_TOOL_ANSWER: &str = "unknown tool `send_fax` (arguments: {\"to\":\"1234\"}): no tool \+const UNKNOWN_TOOL_ANSWER: &str =+ "unknown tool `send_fax` (arguments: {\"to\":\"1234\"}): no tool \with that name is available to you, and calling it again will fail the same way.";/// The crate's recovered pair for an unknown tool (TOOL-11 `recover_tool_call`):diff --git a/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rsindex 88544ab65e..fdb287f841 100644--- a/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rs@@ -2,8 +2,8 @@ use super::*;use serde_json::json;use std::collections::BTreeMap;use tinyagents_harness::events::AgentEvent;-use tinyagents_harness::observability::AgentObservation;use tinyagents_harness::observability::trace_export::{SpanStatus, TraceSpan};+use tinyagents_harness::observability::AgentObservation;use tinyagents_harness::ids::{EventId, RunId};use tinyagents_harness::observability::trace_export::SpanKind;diff --git a/crates/openhuman-core/src/agent/progress_tracing/otlp.rs b/crates/openhuman-core/src/agent/progress_tracing/otlp.rsindex 77ef09d10a..a850ec2dae 100644--- a/crates/openhuman-core/src/agent/progress_tracing/otlp.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/otlp.rs@@ -5,8 +5,8 @@//! resolves the backend URL and credential and posts the requests.use serde_json::Value;-use tinyagents_harness::observability::trace_export::TraceSpan;use tinyagents_harness::observability::trace_export::otlp::otlp_requests;+use tinyagents_harness::observability::trace_export::TraceSpan;use super::langfuse::{environment_for_base, ingestion_url, skip_push};use crate::config::Config;diff --git a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_accuracy_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_accuracy_tests.rsindex 76f74aa483..834c7022f8 100644--- a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_accuracy_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_accuracy_tests.rs@@ -183,14 +183,12 @@ fn single_synthetic_delta_at_completion_records_no_ttft() {(simple_call("gpt-6.1-sol"), 9_000),]);let g = generations(c.spans())[0];- assert!(- !g.attributes- .contains_key("gen_ai.response.first_token_unix_ms")- );- assert!(- !g.attributes- .contains_key("gen_ai.response.time_to_first_token_ms")- );+ assert!(!g+ .attributes+ .contains_key("gen_ai.response.first_token_unix_ms"));+ assert!(!g+ .attributes+ .contains_key("gen_ai.response.time_to_first_token_ms"));assert_eq!(g.attributes["gen_ai.response.streamed"],serde_json::json!(false)@@ -309,14 +307,12 @@ fn turn_without_completion_is_an_error() {exported_attr(c.spans(), "agent.turn", "langfuse.observation.level").as_deref(),Some("ERROR"));- assert!(- exported_attr(- c.spans(),- "agent.turn",- "langfuse.observation.status_message"- )- .is_some()- );+ assert!(exported_attr(+ c.spans(),+ "agent.turn",+ "langfuse.observation.status_message"+ )+ .is_some());}#[test]@@ -336,12 +332,10 @@ fn failed_turn_message_is_content_gated() {let mut captured = collect_with_capture(&[(AgentProgress::TurnStarted, 1_000)]);captured.finish_with_outcome(2_000, Some(failed()));let turn = find(captured.spans(), "agent.turn");- assert!(- turn.attributes["error.message"]- .as_str()- .unwrap()- .contains("provider rejected")- );+ assert!(turn.attributes["error.message"]+ .as_str()+ .unwrap()+ .contains("provider rejected"));}#[test]@@ -471,10 +465,9 @@ fn unpriced_model_unknown_cost_is_not_recorded() {g.attributes["gen_ai.cost.source"],serde_json::json!("unpriced"));- assert!(- !g.attributes- .contains_key("gen_ai.pricing.input_per_mtok_usd")- );+ assert!(!g+ .attributes+ .contains_key("gen_ai.pricing.input_per_mtok_usd"));assert_eq!(exported_attr(c.spans(),diff --git a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rsindex 323b8dbf4d..6b6bab88b4 100644--- a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rs@@ -96,14 +96,12 @@ fn tool_io_is_captured_when_capture_content_is_on() {4,);let child_tool = find(c.spans(), "tool.read_file");- assert!(- child_tool- .input- .as_ref()- .and_then(|v| v.as_str())- .unwrap()- .contains("notes.md")- );+ assert!(child_tool+ .input+ .as_ref()+ .and_then(|v| v.as_str())+ .unwrap()+ .contains("notes.md"));assert_eq!(child_tool.output.as_ref().and_then(|v| v.as_str()),Some("file contents")@@ -337,16 +335,12 @@ fn zero_reasoning_turn_leaves_root_without_reasoning_attr() {]);c.finish(20);let turn = find(c.spans(), "agent.turn");- assert!(- !turn- .attributes- .contains_key("gen_ai.usage.reasoning_tokens")- );- assert!(- !turn- .attributes- .contains_key("gen_ai.usage.cache_creation_tokens")- );+ assert!(!turn+ .attributes+ .contains_key("gen_ai.usage.reasoning_tokens"));+ assert!(!turn+ .attributes+ .contains_key("gen_ai.usage.cache_creation_tokens"));}// ── run-type classification ─────────────────────────────────────────────────@@ -504,14 +498,12 @@ fn generation_records_request_messages_and_completion_when_capture_on() {input.to_string().contains("You are OpenHuman."),"system prompt must land in the generation input: {input}");- assert!(- generation- .output- .as_ref()- .expect("generation output")- .to_string()- .contains("hello")- );+ assert!(generation+ .output+ .as_ref()+ .expect("generation output")+ .to_string()+ .contains("hello"));}#[test]diff --git a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rsindex 7a67e19d52..c7e508662f 100644--- a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rs@@ -1,8 +1,8 @@use super::*;use crate::core::observability::progress_tracing::export::export_spans;-use tinyagents_harness::observability::trace_export::SpanKind;use tinyagents_harness::observability::trace_export::serialize::SpanEnvelope;+use tinyagents_harness::observability::trace_export::SpanKind;// ── config ────────────────────────────────────────────────────────────────#[test]@@ -431,11 +431,10 @@ fn finish_seals_all_open_spans_idempotently() {assert!(c.spans().iter().all(|s| s.end_unix_ms.is_some()));// idempotent.c.finish(200);- assert!(- c.spans()- .iter()- .all(|s| s.end_unix_ms == Some(s.end_unix_ms.unwrap()))- );+ assert!(c+ .spans()+ .iter()+ .all(|s| s.end_unix_ms == Some(s.end_unix_ms.unwrap())));}#[test]diff --git a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_stop_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_stop_tests.rsindex b320fa540d..ee22d657ab 100644--- a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_stop_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_stop_tests.rs@@ -5,8 +5,8 @@use super::*;-use tinyagents_harness::observability::trace_export::SpanStatus;use tinyagents_harness::observability::trace_export::otlp::otlp_requests;+use tinyagents_harness::observability::trace_export::SpanStatus;use tinyagents_harness::turn_stop::TurnStop;const BREAKER_NOTE: &str = "Stopping after 2 attempt(s): failure class \diff --git a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_ttft_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_ttft_tests.rsindex 033b3005cd..1e10b61a32 100644--- a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_ttft_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_ttft_tests.rs@@ -3,8 +3,8 @@use super::*;-use tinyagents_harness::observability::trace_export::SpanKind;use tinyagents_harness::observability::trace_export::otlp::otlp_requests;+use tinyagents_harness::observability::trace_export::SpanKind;fn iteration(iteration: u32) -> AgentProgress {AgentProgress::IterationStarted {@@ -90,16 +90,12 @@ fn unary_call_carries_no_first_token_attributes() {(completed(1), 2_500),]);let generation = generations(c.spans())[0];- assert!(- !generation- .attributes- .contains_key("gen_ai.response.first_token_unix_ms")- );- assert!(- !generation- .attributes- .contains_key("gen_ai.response.time_to_first_text_ms")- );+ assert!(!generation+ .attributes+ .contains_key("gen_ai.response.first_token_unix_ms"));+ assert!(!generation+ .attributes+ .contains_key("gen_ai.response.time_to_first_text_ms"));}#[test]diff --git a/crates/openhuman-core/src/agent/prompts/mod.rs b/crates/openhuman-core/src/agent/prompts/mod.rsindex bdcf8cfb4d..21040828e6 100644--- a/crates/openhuman-core/src/agent/prompts/mod.rs+++ b/crates/openhuman-core/src/agent/prompts/mod.rs@@ -6,10 +6,10 @@ pub mod types;pub use types::*;pub mod agents_md;-pub use agents_md::{AGENTS_MD_FILENAME, AgentsMdContent, load_agents_md, load_agents_md_layers};+pub use agents_md::{load_agents_md, load_agents_md_layers, AgentsMdContent, AGENTS_MD_FILENAME};pub mod builder;-pub use builder::{GLOBAL_STYLE_SUFFIX, SystemPromptBuilder, TieredPrompt};+pub use builder::{SystemPromptBuilder, TieredPrompt, GLOBAL_STYLE_SUFFIX};#[path = "render_helpers/subagent.rs"]mod subagent;diff --git a/crates/openhuman-core/src/agent/prompts/mod_tests.rs b/crates/openhuman-core/src/agent/prompts/mod_tests.rsindex 07b7808ff8..989b83b418 100644--- a/crates/openhuman-core/src/agent/prompts/mod_tests.rs+++ b/crates/openhuman-core/src/agent/prompts/mod_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::prompts::*;use crate::prompts::sections::*;+use crate::prompts::*;use async_trait::async_trait;use std::collections::HashSet;use std::path::Path;diff --git a/crates/openhuman-core/src/agent/prompts/render_helpers/subagent.rs b/crates/openhuman-core/src/agent/prompts/render_helpers/subagent.rsindex 8e65c22fe7..ccb5058977 100644--- a/crates/openhuman-core/src/agent/prompts/render_helpers/subagent.rs+++ b/crates/openhuman-core/src/agent/prompts/render_helpers/subagent.rs@@ -5,8 +5,8 @@//! for callers that only hold indices into the parent's tool vec.use super::builder::GLOBAL_STYLE_SUFFIX;-use crate::prompts::sections::GROUNDING_BODY;use super::types::*;+use crate::prompts::sections::GROUNDING_BODY;use crate::prompts::{inject_workspace_file, write_agents_md_blocks};use std::fmt::Write;use std::path::Path;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 b4732d44c9..238712fcd6 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::{NO_TOOLS_SENTINEL, is_empty_tool_scope};+ use crate::agent_registry::host_definition::{is_empty_tool_scope, NO_TOOLS_SENTINEL};use std::collections::HashSet;// Unset — the historical "everything" sentinel.@@ -468,19 +468,15 @@ 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 2503c55d2d..36d9adc52e 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::Arc;use std::sync::atomic::{AtomicUsize, Ordering};+use std::sync::Arc;/// A tool that does nothing but be present under a name nothing else uses.#[derive(Debug)]@@ -461,11 +461,9 @@ 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 9df1feb257..edd3cd3d0c 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,11 +214,9 @@ 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 4dbafa2fdb..198c4ca82b 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::OpenHumanSessionHost;use crate::agent::tinyagents::host::OpenHumanRunContext;+use crate::agent::OpenHumanSessionHost;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 e544c03186..583c1eb887 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 88781ae22a..448e2cb9ef 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 81469fa52c..c08f041458 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 tinytools_agent::dialect::ToolDialect;use crate::agent::{session_host::turn::graph::{self, ChatTurnGraph},- tinyagents::{TurnModelSource, host::OpenHumanHostBase, host::OpenHumanRunContext},+ tinyagents::{host::OpenHumanHostBase, host::OpenHumanRunContext, TurnModelSource},};/// 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 c850401dab..5fef8854cb 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@@ -16,15 +16,15 @@ use tinyagents_harness::middleware::wrap_harness_instruction;use crate::agent::{session_host::turn_checkpoint::{- self, CloseVerdict, CloseViolation, build_deterministic_checkpoint,- build_deterministic_final_summary, close_repair_instruction, close_verification_prompt,- final_answer_instruction, parse_close_verdict, quotes_harness_instruction,- render_tool_results, results_from_tool_outcomes,+ self, build_deterministic_checkpoint, build_deterministic_final_summary,+ close_repair_instruction, close_verification_prompt, final_answer_instruction,+ parse_close_verdict, quotes_harness_instruction, render_tool_results,+ results_from_tool_outcomes, CloseVerdict, CloseViolation,},tinyagents::{TinyagentsTurnOutcome, TurnModelSource},};use crate::inference::provider::model::dialect_response_from_provider;-use crate::inference::provider::{AGENT_TURN_MAX_OUTPUT_TOKENS, BilledUsage, ChatResponse};+use crate::inference::provider::{BilledUsage, ChatResponse, AGENT_TURN_MAX_OUTPUT_TOKENS};/// 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 cd82cee954..4aa846a50b 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@@ -311,14 +311,12 @@ 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 03b7151aa9..f73ebc09ce 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,13 +32,11 @@ 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/live_tools.rs b/crates/openhuman-core/src/agent/session_host/live_tools.rsindex 4fdcb5c298..16f51e511d 100644--- a/crates/openhuman-core/src/agent/session_host/live_tools.rs+++ b/crates/openhuman-core/src/agent/session_host/live_tools.rs@@ -8,8 +8,8 @@use std::sync::Arc;use crate::agent::session_host::types::OpenHumanSessionHost;-use crate::agent::tinyagents::ToolPolicyEnforcement;use crate::agent::tinyagents::live_harness::LiveToolSurface;+use crate::agent::tinyagents::ToolPolicyEnforcement;impl OpenHumanSessionHost {/// The durable tools, the visible names and the tool policy of thisdiff --git a/crates/openhuman-core/src/agent/session_host/mod.rs b/crates/openhuman-core/src/agent/session_host/mod.rsindex b81ab8e380..5843d5305b 100644--- a/crates/openhuman-core/src/agent/session_host/mod.rs+++ b/crates/openhuman-core/src/agent/session_host/mod.rs@@ -55,9 +55,8 @@ pub(crate) mod turn_checkpoint;mod types;pub use codec::OpenHumanTranscriptCodec;-pub type OpenHumanSessionHooks = tinyagents_runtime::FnSessionHooks<- crate::agent::tinyagents::host::OpenHumanRunContext,->;+pub type OpenHumanSessionHooks =+ tinyagents_runtime::FnSessionHooks<crate::agent::tinyagents::host::OpenHumanRunContext>;pub use types::{OpenHumanSessionHost, SessionHostBuilder, TurnOverrides};// Re-export the duplicate-tool-spec guard for sibling harness modulesdiff --git a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rsindex d41a561ba2..da92d8d896 100644--- a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs@@ -176,9 +176,7 @@ async fn resumed_orphaned_tool_head_is_repaired_before_the_request() {!matches!(first_non_system, Message::Tool(_)),"the request must not open on an orphaned tool result, got {first_non_system:?}");- assert!(- !sent- .iter()- .any(|m| matches!(m, Message::Tool(t) if t.tool_call_id.starts_with("call_orphan")))- );+ assert!(!sent+ .iter()+ .any(|m| matches!(m, Message::Tool(t) if t.tool_call_id.starts_with("call_orphan"))));}diff --git a/crates/openhuman-core/src/agent/session_host/response_shape_turn_tests.rs b/crates/openhuman-core/src/agent/session_host/response_shape_turn_tests.rsindex d55c86bfd3..d4f8cc2ebd 100644--- a/crates/openhuman-core/src/agent/session_host/response_shape_turn_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/response_shape_turn_tests.rs@@ -9,11 +9,9 @@ fn a_response_shape_applies_to_exactly_the_next_turn() {state.pending_response_shape = Some(Arc::clone(&scope));let first = state.take_turn_inputs();- assert!(- first- .response_shape- .as_ref()- .is_some_and(|taken| Arc::ptr_eq(taken, &scope))- );+ assert!(first+ .response_shape+ .as_ref()+ .is_some_and(|taken| Arc::ptr_eq(taken, &scope)));assert!(state.take_turn_inputs().response_shape.is_none());}diff --git a/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rs b/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rsindex e5f6914207..a4abf34b3f 100644--- a/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rs@@ -6,7 +6,7 @@ use super::super::types::OpenHumanSessionHost;use crate::core::bus::BUS;use crate::core::events::DomainEvent;use crate::security::prompt_injection::{- PromptEnforcementAction, PromptEnforcementContext, enforce_prompt_input,+ enforce_prompt_input, PromptEnforcementAction, PromptEnforcementContext,};use anyhow::Result;use tinyagents_harness::agent_error::AgentError;diff --git a/crates/openhuman-core/src/agent/session_host/runtime_adapter_session_state_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_adapter_session_state_tests.rsindex 305aeec07f..7381a734b4 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_adapter_session_state_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_adapter_session_state_tests.rs@@ -1,5 +1,5 @@+use super::runtime_session::{begin_turn_resume, OpenHumanSessionState};use super::TurnOverrides;-use super::runtime_session::{OpenHumanSessionState, begin_turn_resume};use tinyagents_runtime::ResumeMode;#[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 cf430d0c07..8d696565d7 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@@ -69,12 +69,10 @@ 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 c829b6a61d..4e6c8b2c52 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_session.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session.rs@@ -30,7 +30,7 @@ use super::types::OpenHumanSessionHost;use crate::agent::{message_convert::{user_message_from_text, user_text_with_markers},session_host::{- OpenHumanSessionHooks, OpenHumanTranscriptCodec, driver::OpenHumanSessionDriver,+ driver::OpenHumanSessionDriver, OpenHumanSessionHooks, OpenHumanTranscriptCodec,},tinyagents::{host::OpenHumanRunContext, middleware::turn_context::TurnContextMiddleware},};@@ -77,8 +77,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 54fe438700..2137af49b0 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::{SessionRef, session_stem};+use tinyagents_session::transcript::{session_stem, SessionRef};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 a0eefa8854..979e0e5c18 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@@ -265,14 +265,12 @@ 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")]@@ -398,12 +396,10 @@ 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@@ -712,18 +708,14 @@ 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/session_host/stop_summary_tests.rs b/crates/openhuman-core/src/agent/session_host/stop_summary_tests.rsindex 4587673232..874b40ca9f 100644--- a/crates/openhuman-core/src/agent/session_host/stop_summary_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/stop_summary_tests.rs@@ -1,6 +1,6 @@use super::*;use crate::agent::session_host::turn_checkpoint::{- CheckpointToolResult, build_deterministic_final_summary,+ build_deterministic_final_summary, CheckpointToolResult,};fn result(name: &str, success: bool, content: &str) -> CheckpointToolResult {diff --git a/crates/openhuman-core/src/agent/session_host/transcript_compat_tests.rs b/crates/openhuman-core/src/agent/session_host/transcript_compat_tests.rsindex 1d1aaff02f..2d709a3eb2 100644--- a/crates/openhuman-core/src/agent/session_host/transcript_compat_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/transcript_compat_tests.rs@@ -22,7 +22,7 @@ use std::collections::{BTreeMap, HashMap};use std::path::{Path, PathBuf};use std::sync::{Arc, LazyLock, Mutex};-use serde_json::{Value, json};+use serde_json::{json, Value};use tinyagents_harness::testkit::ScriptedModel;use tinyagents_session::transcript::{SessionRef, TranscriptLocator};use tinyinference_llm::message::{AssistantMessage, ContentBlock};@@ -479,16 +479,14 @@ fn assert_retired_tool_replay(identity_bound: bool) {&store_locator(root.path()),"retired-audio-thread",);- assert!(- archived- .tools- .as_ref()- .expect("recorded declarations")- .as_array()- .expect("declarations array")- .iter()- .any(|spec| spec["name"] == RETIRED)- );+ assert!(archived+ .tools+ .as_ref()+ .expect("recorded declarations")+ .as_array()+ .expect("declarations array")+ .iter()+ .any(|spec| spec["name"] == RETIRED));let archived_rows = to_json(&archived.messages);drop(first);@@ -514,12 +512,10 @@ fn assert_retired_tool_replay(identity_bound: bool) {.expect("unthreaded session build")};if identity_bound {- assert!(- resumed- .resume_bound_session()- .await- .expect("resume archive")- );+ assert!(resumed+ .resume_bound_session()+ .await+ .expect("resume archive"));} else {resumed.ensure_runtime_session()diff --git a/crates/openhuman-core/src/agent/session_host/transcript_resume_stable_tests.rs b/crates/openhuman-core/src/agent/session_host/transcript_resume_stable_tests.rsindex 7f92d46839..a667901682 100644--- a/crates/openhuman-core/src/agent/session_host/transcript_resume_stable_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/transcript_resume_stable_tests.rs@@ -9,8 +9,8 @@ use serde_json::Value;use tinyinference_llm::model::ModelResponse;use super::transcript_compat_tests::{- Layout, SCENARIOS, build_host, model, place_fixture, run_async, store_locator, store_tree,- thread_id,+ build_host, model, place_fixture, run_async, store_locator, store_tree, thread_id, Layout,+ SCENARIOS,};fn tree(@@ -83,11 +83,9 @@ fn a_legacy_workspace_is_adopted_once_and_the_next_process_resumes_in_place() {let stem = host.session_id().expect("bound session id");place_fixture(root.path(), scenario, &stem, "");imported = legacy_rows(root.path());- assert!(- imported- .iter()- .all(|rows| !rows.as_array().unwrap().is_empty())- );+ assert!(imported+ .iter()+ .all(|rows| !rows.as_array().unwrap().is_empty()));assert!(host.resume_bound_session().await.expect("first resume"));after_first = tree(root.path(), &thread, &host);}diff --git a/crates/openhuman-core/src/agent/session_host/typed_transcript_compat_tests.rs b/crates/openhuman-core/src/agent/session_host/typed_transcript_compat_tests.rsindex beb4460327..2d4c5209aa 100644--- a/crates/openhuman-core/src/agent/session_host/typed_transcript_compat_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/typed_transcript_compat_tests.rs@@ -17,13 +17,13 @@//! committed corpus now.use crate::storage::sessions::splice_fixture_tests::head_of;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinyinference_llm::message::ContentBlock;use tinyinference_llm::model::ModelResponse;use super::transcript_compat_tests::{- SCENARIOS, Scenario, build_host, call, classic_path, fixture, golden, import_placed, model,- response, run_async, snapshot_with, store_locator, thread_id,+ build_host, call, classic_path, fixture, golden, import_placed, model, response, run_async,+ snapshot_with, store_locator, thread_id, Scenario, SCENARIOS,};/// Head fixtures that have a typed re-write (the chain and legacy layouts are@@ -224,12 +224,10 @@ fn an_old_session_continued_by_this_binary_reloads_identically() {continued_history);let transcript = head_of(&locator, &thread);- assert!(- transcript- .messages- .iter()- .any(|row| row.tool_calls.iter().any(|call| call.id == "call_new"))- );+ assert!(transcript+ .messages+ .iter()+ .any(|row| row.tool_calls.iter().any(|call| call.id == "call_new")));});}@@ -288,11 +286,9 @@ fn a_live_image_turn_persists_typed_image_parts_and_resumes_identically() {);assert!(!raw.contains("[IMAGE:"), "no text marker is persisted");- assert!(- serde_json::to_string(&vision.0.requests())- .unwrap()- .contains(png)- );+ assert!(serde_json::to_string(&vision.0.requests())+ .unwrap()+ .contains(png));let mut second = build_live_image_host(root.path(), live_image_model("unused"), &thread);assert!(second.resume_bound_session().await.expect("resume"));diff --git a/crates/openhuman-core/src/agent/session_host/types.rs b/crates/openhuman-core/src/agent/session_host/types.rsindex c2a7eed2e0..9e4b596a2b 100644--- a/crates/openhuman-core/src/agent/session_host/types.rs+++ b/crates/openhuman-core/src/agent/session_host/types.rs@@ -442,8 +442,8 @@ pub struct OpenHumanSessionHost {/// behaviour unless a caller opts into stricter policy.pub(super) tool_policy: Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,/// Hash of the Composio connection set this OpenHumanSessionHost last reconciled/// against. Compared at top-of-turn to a fresh hash computed from@@ -632,8 +632,8 @@ pub struct SessionHostBuilder {pub(super) tool_policy: Option<Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,>,}diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rsindex 2fe3377de5..9504d80ed7 100644--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs@@ -364,15 +364,8 @@ impl OpenHumanSubagentHost {}).map_err(map_lifecycle_error)?;let request = if continuation {- SubagentRequest::continue_with_key(- task_key.clone(),- child,- request,- input,- None,- None,- )- .await+ SubagentRequest::continue_with_key(task_key.clone(), child, request, input, None, None)+ .await} else {// `direct_subagent_child` derives the same key for the host's// durable lookup; this constructor independently proves that the@@ -1126,7 +1119,7 @@ impl tinyagents_orchestration::subagent::SubagentPersistence for OpenHumanPersis#[path = "lifecycle_outcome.rs"]mod outcome;-use outcome::{HostInFlightMap, host_outcome_to_neutral};+use outcome::{host_outcome_to_neutral, HostInFlightMap};fn outcome_to_host(result: SubagentRunResult,diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rsindex 2c9f0b9699..552e560c49 100644--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle_tests.rs@@ -4,8 +4,8 @@ use tinyagents_orchestration::subagent::{};use super::lifecycle::{- HostInFlight, OpenHumanPersistence, host_in_flight, load_subagent_checkpoint,- merged_resume_history,+ host_in_flight, load_subagent_checkpoint, merged_resume_history, HostInFlight,+ OpenHumanPersistence,};use super::{SubagentMode, SubagentRunOutcome, SubagentRunStatus, SubagentUsage};@@ -330,7 +330,7 @@ async fn host_coalescer_keeps_the_leader_winner_and_cancels_only_the_observer()#[tokio::test]async fn each_agent_dedupes_its_own_in_flight_sub_agents() {use crate::core::runtime::agent_scope::test_agent_context;- use crate::core::runtime::{DomainSet, context::CoreContext};+ use crate::core::runtime::{context::CoreContext, DomainSet};use std::sync::Arc;let root = CoreContext::for_test(DomainSet::full(), None);diff --git a/crates/openhuman-core/src/agent/subagent_host/mod.rs b/crates/openhuman-core/src/agent/subagent_host/mod.rsindex fa8cabc91e..3351d3b055 100644--- a/crates/openhuman-core/src/agent/subagent_host/mod.rs+++ b/crates/openhuman-core/src/agent/subagent_host/mod.rs@@ -58,8 +58,8 @@ mod persisted_compat_tests;pub use autonomous::{definition_iter_cap, subagent_iter_cap_with_autonomous_lift};pub(crate) use lifecycle::load_subagent_checkpoint;pub use lifecycle::{- OpenHumanSubagentHost, continue_subagent, continue_subagent_with_parent, run_subagent,- run_subagent_with_parent,+ continue_subagent, continue_subagent_with_parent, run_subagent, run_subagent_with_parent,+ OpenHumanSubagentHost,};pub(crate) use ops::is_safe_task_id;pub use types::{diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph.rsindex 4bea14d573..0c35a2b983 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph.rs@@ -43,10 +43,10 @@ mod transcript;// (`ops/mod.rs`, `ops/runner.rs`, `graph_tests.rs`'s `use super::*`) are// unaffected by the responsibility split.#[cfg(test)]-pub(super) use dispatch::AggregatedUsage;-#[cfg(test)]pub(super) use dispatch::inherited_thread_id;pub(super) use dispatch::run_subagent_via_graph;+#[cfg(test)]+pub(super) use dispatch::AggregatedUsage;// Only what `graph_tests.rs`'s `use super::*` still needs directly (the rest// of the original flat imports now live with the code that uses them, indiff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph_policy_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph_policy_tests.rsindex 86e55f3b36..7d5ce7e4a9 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph_policy_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph_policy_tests.rs@@ -40,7 +40,7 @@ impl<S: tracing::Subscriber> tracing_subscriber::Layer<S> for WarnLayer {let mut message = Message(None);event.record(&mut message);if let Some(text) = message.0 {- self.0.0.lock().unwrap().push(text);+ self.0 .0.lock().unwrap().push(text);}}}diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rs b/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rsindex 47b21b7ba4..e2305d40b4 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/prompt.rs@@ -6,7 +6,7 @@use crate::agent::harness::artifact_offload::OFFLOAD_WRITE_TOOL;use std::collections::HashSet;use tinyagents_harness::artifacts::{- ARTIFACT_OFFLOAD_HEADING, render_artifact_offload_contract, should_render_offload_contract,+ render_artifact_offload_contract, should_render_offload_contract, ARTIFACT_OFFLOAD_HEADING,};use tinytools::ToolSpec;diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rsindex b86ca2de3b..9ca8b603ae 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs@@ -24,14 +24,14 @@ use crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH;use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};use crate::inference::provider::AGENT_TURN_MAX_OUTPUT_TOKENS;use tinyagents_definition::{- AgentTier, IterationPolicy, PromptSource, SandboxMode as AgentSandboxMode,- validate_tier_transition,+ validate_tier_transition, AgentTier, IterationPolicy, PromptSource,+ SandboxMode as AgentSandboxMode,};use tinyagents_harness::artifacts::{- DEFAULT_OFFLOAD_THRESHOLD_BYTES, HANDOFF_STAGE_RECORDED, effective_offload_threshold,- extract_artifact_paths, note_artifact_handoff,+ effective_offload_threshold, extract_artifact_paths, note_artifact_handoff,+ DEFAULT_OFFLOAD_THRESHOLD_BYTES, HANDOFF_STAGE_RECORDED,};-use tinyagents_harness::context::{RunConfig, RunDepth, current_run_depth, with_run_depth};+use tinyagents_harness::context::{current_run_depth, with_run_depth, RunConfig, RunDepth};use tinytools::{SandboxMode as TinyagentsSandboxMode, ToolSpec, WorkspaceDescriptor};use tinytools_std::file_state::with_file_state_agent_id;diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rsindex 9f1a6ab085..1aaaf3e8b2 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_model_resolution_tests.rs@@ -1,6 +1,6 @@use super::*;use crate::agent::subagent_host::run_subagent;-use tinyagents_harness::context::{RunDepth, current_run_depth, with_run_depth};+use tinyagents_harness::context::{current_run_depth, with_run_depth, RunDepth};#[tokio::test]async fn runner_rejects_spawn_beyond_max_depth() {diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rsindex 9d7c067d37..c0d47e6681 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rs@@ -1,6 +1,6 @@use super::*;use crate::agent::subagent_host::run_subagent;-use tinyagents_harness::context::{RunDepth, current_run_depth, with_run_depth};+use tinyagents_harness::context::{current_run_depth, with_run_depth, RunDepth};#[test]fn filter_named_scope_keeps_only_named() {@@ -146,16 +146,12 @@ async fn typed_mode_system_prompt_includes_subagent_role_contract() {.find(|m| m.role == "system").expect("system message should be present");assert!(system_msg.content.contains("## Sub-agent Role Contract"));- assert!(- system_msg- .content- .contains("You are a sub-agent working for a parent OpenHuman agent")- );- assert!(- system_msg- .content- .contains("Keep your final response concise and synthesis-ready")- );+ assert!(system_msg+ .content+ .contains("You are a sub-agent working for a parent OpenHuman agent"));+ assert!(system_msg+ .content+ .contains("Keep your final response concise and synthesis-ready"));}#[tokio::test]diff --git a/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rs b/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rsindex 0294dacead..7932dc3b6f 100644--- a/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/tool_ranking_tests.rs@@ -10,7 +10,7 @@//! moving up with the algorithm.use crate::integrations::ConnectedIntegrationTool;-use tinyagents_harness::tool::{MIN_CONFIDENT_HITS, SelectableTool, rank_tools_by_prompt};+use tinyagents_harness::tool::{rank_tools_by_prompt, SelectableTool, MIN_CONFIDENT_HITS};fn rank_actions_by_prompt(prompt: &str,diff --git a/crates/openhuman-core/src/agent/tinyagents/budget.rs b/crates/openhuman-core/src/agent/tinyagents/budget.rsindex 771548323a..2b8f5a9ef2 100644--- a/crates/openhuman-core/src/agent/tinyagents/budget.rs+++ b/crates/openhuman-core/src/agent/tinyagents/budget.rs@@ -4,10 +4,10 @@ use std::sync::Arc;/// Product recursion ceiling shared by native and MCP delegation.pub(crate) const MAX_SPAWN_DEPTH: usize = 3;-use tinyinference_llm::model::ChatModel;pub use tinyinference_llm::model::budget::{Budget, BudgetExceeded, BudgetSnapshot, CallBudget, Spend, SpendLimits,};+use tinyinference_llm::model::ChatModel;/// A shared ledger and conservative reservation bounds for every physical call.#[derive(Debug, Clone)]diff --git a/crates/openhuman-core/src/agent/tinyagents/budget_stop_turn_tests.rs b/crates/openhuman-core/src/agent/tinyagents/budget_stop_turn_tests.rsindex 926149cd41..c97697dd10 100644--- a/crates/openhuman-core/src/agent/tinyagents/budget_stop_turn_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/budget_stop_turn_tests.rs@@ -2,10 +2,10 @@//! turn-deadline wind-down, the two graceful pauses of a top-level turn.use super::*;-use tinyagents_hooks::stop::BudgetStopHook;use crate::agent::tinyagents::TurnModelSource;use async_trait::async_trait;use std::sync::Arc;+use tinyagents_hooks::stop::BudgetStopHook;use tinyagents_hooks::stop::{StopDecision, StopHook, TurnState};use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};use tinyinference_llm::tool::ToolCall;diff --git a/crates/openhuman-core/src/agent/tinyagents/config.rs b/crates/openhuman-core/src/agent/tinyagents/config.rsindex 1689aa29e2..bf1d330f42 100644--- a/crates/openhuman-core/src/agent/tinyagents/config.rs+++ b/crates/openhuman-core/src/agent/tinyagents/config.rs@@ -20,7 +20,7 @@ use tinyagents_harness::config::{};use crate::config::{- AgentConfig, Config, DEFAULT_MODEL, DelegateAgentConfig, RequiredOutputContract,+ AgentConfig, Config, DelegateAgentConfig, RequiredOutputContract, DEFAULT_MODEL,};/// Translates OpenHuman's free-form `agent.tool_dispatcher` string into thediff --git a/crates/openhuman-core/src/agent/tinyagents/context_wiring.rs b/crates/openhuman-core/src/agent/tinyagents/context_wiring.rsindex c918540e0e..2ee8e89f85 100644--- a/crates/openhuman-core/src/agent/tinyagents/context_wiring.rs+++ b/crates/openhuman-core/src/agent/tinyagents/context_wiring.rs@@ -7,14 +7,14 @@use std::sync::Arc;use tinyagents_harness::middleware::{+ compression_policy, legacy_max_input_tokens, microcompact_for_window, split_input_allowance,ArtifactIndexTocMiddleware, CapturedOutcomes, ContextCompressionMiddleware, ContextLadder,FinalCallWrapUpMiddleware, ImageAwareMessageTrimMiddleware, OutcomesUnavailable,- compression_policy, legacy_max_input_tokens, microcompact_for_window, split_input_allowance,};use tinyagents_harness::runtime::AgentHarness;use tinyagents_harness::summarization::{- DEFAULT_TASK_STATE_CHUNK_TOKENS, FaultTolerantCachingSummarizer, ModelSummarizer,- SummarizationPolicy, TaskStateSummarizer,+ FaultTolerantCachingSummarizer, ModelSummarizer, SummarizationPolicy, TaskStateSummarizer,+ DEFAULT_TASK_STATE_CHUNK_TOKENS,};use crate::agent::tinyagents::host::OpenHumanRunContext;diff --git a/crates/openhuman-core/src/agent/tinyagents/deadline_wind_down.rs b/crates/openhuman-core/src/agent/tinyagents/deadline_wind_down.rsindex e6550a56d9..324e9198e5 100644--- a/crates/openhuman-core/src/agent/tinyagents/deadline_wind_down.rs+++ b/crates/openhuman-core/src/agent/tinyagents/deadline_wind_down.rs@@ -8,7 +8,7 @@use std::sync::Arc;-use tinyagents_harness::middleware::library::{WindDownMiddleware, install_wind_down};+use tinyagents_harness::middleware::library::{install_wind_down, WindDownMiddleware};use tinyagents_harness::runtime::AgentHarness;use tinyagents_harness::steering::SteeringHandle;diff --git a/crates/openhuman-core/src/agent/tinyagents/discovery/discovery_tests.rs b/crates/openhuman-core/src/agent/tinyagents/discovery/discovery_tests.rsindex 0fac59f2f1..628316eed6 100644--- a/crates/openhuman-core/src/agent/tinyagents/discovery/discovery_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/discovery/discovery_tests.rs@@ -77,12 +77,10 @@ async fn overlap_ranker_ranks_by_token_overlap_and_names_its_kind() {hits.first().map(|h| h.key.as_str()),Some("SLACK_SEND_MESSAGE"));- assert!(- ranker- .rank(" ", &tinytools::RankContext::empty(), &candidates, 3)- .await- .is_err()- );+ assert!(ranker+ .rank(" ", &tinytools::RankContext::empty(), &candidates, 3)+ .await+ .is_err());}/// A text dialect renders the prompt catalogue and the harness clearsdiff --git a/crates/openhuman-core/src/agent/tinyagents/discovery/embedding_ranker_tests.rs b/crates/openhuman-core/src/agent/tinyagents/discovery/embedding_ranker_tests.rsindex 19517dd40a..4856cccfc0 100644--- a/crates/openhuman-core/src/agent/tinyagents/discovery/embedding_ranker_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/discovery/embedding_ranker_tests.rs@@ -1,5 +1,5 @@-use std::sync::Arc;use std::sync::atomic::{AtomicUsize, Ordering};+use std::sync::Arc;use tinytools::{RankCandidate, RankContext, ToolRanker};diff --git a/crates/openhuman-core/src/agent/tinyagents/discovery/mod.rs b/crates/openhuman-core/src/agent/tinyagents/discovery/mod.rsindex 11db8d9032..1554910acf 100644--- a/crates/openhuman-core/src/agent/tinyagents/discovery/mod.rs+++ b/crates/openhuman-core/src/agent/tinyagents/discovery/mod.rs@@ -170,7 +170,7 @@ pub(crate) fn bridge_prompt_tools(if deferred == 0 {return Vec::new();}- use tinyagents_harness::tool::discover::{DeferredCatalog, bridge_schemas};+ use tinyagents_harness::tool::discover::{bridge_schemas, DeferredCatalog};// `discovery_policy` zeroes the manifest budget, so the manifest renders// as a bare count: the prompt advertises that a search exists, not what// it would find.@@ -213,7 +213,7 @@ impl ToolRanker for OverlapRanker {candidates: &[tinytools::RankCandidate],limit: usize,) -> Result<Vec<tinytools::RankHit>, tinytools::RankError> {- use tinyagents_harness::tool::{SelectableTool, rank_tools_by_prompt};+ use tinyagents_harness::tool::{rank_tools_by_prompt, SelectableTool};if intent.trim().is_empty() {return Err(tinytools::RankError::InvalidInput {reason: "intent is empty".to_owned(),diff --git a/crates/openhuman-core/src/agent/tinyagents/host/budget_gate_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/budget_gate_tests.rsindex fe593773b2..5ffa34e7ed 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/budget_gate_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/budget_gate_tests.rs@@ -245,10 +245,9 @@ fn a_refusing_budget_refuses_the_agent_over_it() {fn a_warning_budget_never_refuses() {let (_tmp, tracker) = ledger_with(2.0, "planner");let gate = budgeted_gate(crate::config::BudgetAction::Warn);- assert!(- gate.check_budgets_against(&estimate_for("planner"), &gate.live_budgets(), &tracker)- .is_none()- );+ assert!(gate+ .check_budgets_against(&estimate_for("planner"), &gate.live_budgets(), &tracker)+ .is_none());}#[tokio::test]@@ -313,10 +312,9 @@ fn a_call_is_checked_against_its_own_model() {// Another call left a different model in the shared attribution.*gate.last_model.write() = "other".into();let policies = gate.live_budgets();- assert!(- gate.check_budgets_against(&estimate_for("planner"), &policies, &tracker)- .is_some()- );+ assert!(gate+ .check_budgets_against(&estimate_for("planner"), &policies, &tracker)+ .is_some());}#[tokio::test]diff --git a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry_tests.rsindex 5331c71c13..9ffb52e586 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry_tests.rs@@ -135,13 +135,11 @@ async fn a_worker_parent_authorizes_nothing() {synthetic("a_worker", AgentTier::Worker, &[]),]);- assert!(- registry- .delegates_for("leaf")- .await- .expect("delegates")- .is_empty()- );+ assert!(registry+ .delegates_for("leaf")+ .await+ .expect("delegates")+ .is_empty());// The *declared* list is still reported on the definition — declared// and authorized are different questions.let def = registry@@ -303,35 +301,27 @@ fn named_discovery_scope_authorizes_only_registered_deferred_tools() {"blocked_secret".into(),])).project(&def);- assert!(- projected- .tools- .named_tools()- .contains(&"browser_open".to_string())- );- assert!(- projected- .tools- .named_tools()- .contains(&"browser".to_string())- );- assert!(- !projected- .tools- .named_tools()- .contains(&"blocked_secret".to_string())- );+ assert!(projected+ .tools+ .named_tools()+ .contains(&"browser_open".to_string()));+ assert!(projected+ .tools+ .named_tools()+ .contains(&"browser".to_string()));+ assert!(!projected+ .tools+ .named_tools()+ .contains(&"blocked_secret".to_string()));def.tools = ToolScope::Named(vec!["file_read".into()]);let without_discovery = registry_of(vec![def.clone()]).with_deferred_tools(Arc::new(vec!["browser_open".into()])).project(&def);- assert!(- !without_discovery- .tools- .named_tools()- .contains(&"browser_open".to_string())- );+ assert!(!without_discovery+ .tools+ .named_tools()+ .contains(&"browser_open".to_string()));}/// A wildcard scope carrying a denylist must be materialised against the@@ -448,12 +438,10 @@ fn the_projection_carries_the_definition_rule_layer() {let mut open = synthetic("open", AgentTier::Worker, &[]);open.disallowed_tools.clear();- assert!(- registry_of(vec![open.clone()])- .project(&open)- .tool_rules- .is_none()- );+ assert!(registry_of(vec![open.clone()])+ .project(&open)+ .tool_rules+ .is_none());}// ── config-backed custom agents ───────────────────────────────────────@@ -549,13 +537,11 @@ async fn an_empty_catalogue_misses_everything_without_erroring() {let registry = registry_of(Vec::new());assert_eq!(registry.resolve("anything").await.expect("resolve"), None);assert!(registry.list().await.expect("list").is_empty());- assert!(- registry- .delegates_for("anything")- .await- .expect("delegates")- .is_empty()- );+ assert!(registry+ .delegates_for("anything")+ .await+ .expect("delegates")+ .is_empty());}/// The defect behind #6404 / #6392 / #6393, at the layer that caused it.diff --git a/crates/openhuman-core/src/agent/tinyagents/host/mod.rs b/crates/openhuman-core/src/agent/tinyagents/host/mod.rsindex 1719cc17e4..8b85865150 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/mod.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/mod.rs@@ -43,9 +43,9 @@ pub use bundle::{};pub use definition_registry::OpenHumanDefinitionRegistry;pub use run_context::{- DispatchDecision, DispatchInputs, LastTurnUsage, OpenHumanRunContext, OpenHumanRunExt,- SubagentUsageEntry, TurnDispatchState, decide_dispatch,+ decide_dispatch, DispatchDecision, DispatchInputs, LastTurnUsage, OpenHumanRunContext,+ OpenHumanRunExt, SubagentUsageEntry, TurnDispatchState,};-pub(crate) use run_context::{HarnessHostPolicy, direct_subagent_child};+pub(crate) use run_context::{direct_subagent_child, HarnessHostPolicy};pub use security_gate::OpenHumanSecurityGate;pub use tool_outcome_classifier::OpenHumanToolOutcomeClassifier;diff --git a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rsindex 0cd45150c1..cd1658a430 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs@@ -415,13 +415,13 @@ pub(crate) struct HarnessHostPolicy {pub(crate) tool_call_cap: Option<usize>,}-pub use super::operation_context::OpenHumanRunExt;#[cfg(test)]pub(crate) use super::operation_context::tool_context_with_approval;+pub use super::operation_context::OpenHumanRunExt;pub(crate) use super::operation_context::{- HostOperationContext, approval_for_tool, dispatch_ctx_for_tool, memory_identity_for_tool,- memory_in_prompt_for_tool, parent_agent_id_for_tool, sandbox_mode_for_tool,- task_recency_window_for_tool, turn_origin_for_tool,+ approval_for_tool, dispatch_ctx_for_tool, memory_identity_for_tool, memory_in_prompt_for_tool,+ parent_agent_id_for_tool, sandbox_mode_for_tool, task_recency_window_for_tool,+ turn_origin_for_tool, HostOperationContext,};impl Default for OpenHumanRunContext {diff --git a/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rsindex 594f3bb1ca..821af67226 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rs@@ -109,20 +109,16 @@ fn child_inherits_tree_handles_but_isolates_observations_and_usage() {assert_eq!(child.spawn_depth, 1);assert_eq!(child.thread_id.as_deref(), Some("thread-a"));assert!(child.file_state_agent_id().is_none());- assert!(- child- .resolved_route- .lock()- .expect("child route lock")- .is_none()- );- assert!(- child- .subagent_usage- .lock()- .expect("child usage lock")- .is_empty()- );+ assert!(child+ .resolved_route+ .lock()+ .expect("child route lock")+ .is_none());+ assert!(child+ .subagent_usage+ .lock()+ .expect("child usage lock")+ .is_empty());parent.cancellation.cancel();assert!(child.cancellation.is_cancelled());diff --git a/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs b/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rsindex f8207d6147..a29f37f6a5 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs@@ -84,7 +84,7 @@ use tinyagents_harness::host::security_gate::{GateDecision, ToolCallRequest};use crate::agent::tinyagents::policy_denial::PolicyDenial;use crate::security::approval::{- ApprovalGate, ApprovalTurnContext, GateOutcome, redact_args, summarize_action,+ redact_args, summarize_action, ApprovalGate, ApprovalTurnContext, GateOutcome,};use crate::security::policy::{GateDecision as PolicyGateDecision, SecurityPolicy};use tinybox_bus::CommandClass;@@ -93,7 +93,7 @@ use tinytools::{ToolPolicyAction, ToolPolicySession};#[path = "security_gate_shell_analysis.rs"]mod shell_analysis;-use shell_analysis::{SHELL_TOOL, shell_analysis_for_call};+use shell_analysis::{shell_analysis_for_call, SHELL_TOOL};/// The channel tool-policy's verdict for one tool, as three explicit outcomes.///diff --git a/crates/openhuman-core/src/agent/tinyagents/host/security_gate_impl.rs b/crates/openhuman-core/src/agent/tinyagents/host/security_gate_impl.rsindex 915cd7fef2..0875ff229d 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/security_gate_impl.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/security_gate_impl.rs@@ -6,7 +6,7 @@ use tinyagents_harness::host::security_gate::{use super::OpenHumanSecurityGate;use crate::security::prompt_injection::{- PromptEnforcementAction, PromptEnforcementContext, enforce_prompt_input,+ enforce_prompt_input, PromptEnforcementAction, PromptEnforcementContext,};#[async_trait]diff --git a/crates/openhuman-core/src/agent/tinyagents/host/security_gate_screen_and_policy_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/security_gate_screen_and_policy_tests.rsindex 413e0222c7..202bfa1b0d 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/security_gate_screen_and_policy_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/security_gate_screen_and_policy_tests.rs@@ -301,12 +301,10 @@ async fn a_nested_call_is_refused_even_for_a_read_only_tool() {.await.unwrap();assert!(!decision.is_allowed());- assert!(- decision- .denial_reason()- .expect("denial reason")- .contains("may not call other tools")- );+ assert!(decision+ .denial_reason()+ .expect("denial reason")+ .contains("may not call other tools"));}#[tokio::test]diff --git a/crates/openhuman-core/src/agent/tinyagents/host/security_gate_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/security_gate_tests.rsindex 795ef7c6ce..0997a5fa40 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/security_gate_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/security_gate_tests.rs@@ -202,24 +202,20 @@ async fn an_unregistered_tool_is_denied_not_allowed() {.await.unwrap();assert!(!decision.is_allowed());- assert!(- decision- .denial_reason()- .expect("denial reason")- .contains("definitely_not_a_tool")- );+ assert!(decision+ .denial_reason()+ .expect("denial reason")+ .contains("definitely_not_a_tool"));}#[tokio::test]async fn an_empty_registry_denies_everything() {let gate = OpenHumanSecurityGate::new(policy(AutonomyLevel::Full), Vec::new());- assert!(- !gate- .authorize_tool(&req("read_file", json!({})))- .await- .unwrap()- .is_allowed()- );+ assert!(!gate+ .authorize_tool(&req("read_file", json!({})))+ .await+ .unwrap()+ .is_allowed());}#[tokio::test]@@ -351,12 +347,10 @@ async fn a_write_shell_command_is_blocked_outright_in_read_only() {.await.unwrap();assert!(!decision.is_allowed());- assert!(- decision- .denial_reason()- .expect("denial reason")- .contains(tinytools::status::POLICY_BLOCKED_MARKER)- );+ assert!(decision+ .denial_reason()+ .expect("denial reason")+ .contains(tinytools::status::POLICY_BLOCKED_MARKER));}#[tokio::test]diff --git a/crates/openhuman-core/src/agent/tinyagents/host/tool_outcome_classifier.rs b/crates/openhuman-core/src/agent/tinyagents/host/tool_outcome_classifier.rsindex 26281cfcaf..0cb9617de8 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/tool_outcome_classifier.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/tool_outcome_classifier.rs@@ -75,7 +75,7 @@ use std::sync::Arc;use tinyagents_harness::host::{OutcomeClass, ToolOutcomeClassifier};use tinytools::ToolResult;-use tinytools::status::{ToolFailureClass, classify};+use tinytools::status::{classify, ToolFailureClass};/// OpenHuman's [`ToolOutcomeClassifier`], backed by/// [`tinytools::status::classify`].diff --git a/crates/openhuman-core/src/agent/tinyagents/hosted_error.rs b/crates/openhuman-core/src/agent/tinyagents/hosted_error.rsindex a3e122b392..cda08f21b9 100644--- a/crates/openhuman-core/src/agent/tinyagents/hosted_error.rs+++ b/crates/openhuman-core/src/agent/tinyagents/hosted_error.rs@@ -8,8 +8,8 @@//! the hosted path. The user-facing class is untouched: the text still reads as//! `run timed out: ...`, which `web_errors` classifies as `turn_timeout`.-use tinyagents_harness::TinyAgentsError;use tinyagents_harness::runtime::{HostedError, HostedErrorKind, TimeoutBound};+use tinyagents_harness::TinyAgentsError;use tinyagents_harness::agent_error::TurnTimeoutBound;diff --git a/crates/openhuman-core/src/agent/tinyagents/journal.rs b/crates/openhuman-core/src/agent/tinyagents/journal.rsindex 8efff810a2..6e6ff2d76e 100644--- a/crates/openhuman-core/src/agent/tinyagents/journal.rs+++ b/crates/openhuman-core/src/agent/tinyagents/journal.rs@@ -51,8 +51,8 @@ use std::sync::{Arc, Mutex};use tinyagents_harness::events::{EventSink, HarnessRunStatus};use tinyagents_harness::ids::{ComponentId, HarnessPhase, RunId, ThreadId};use tinyagents_harness::observability::{- AgentObservation, DriverStatusStore, FanOutSink, HarnessEventJournal, HarnessStatusStore,- JournalSink, RedactingSink, StoreEventJournal, process_env_secrets,+ process_env_secrets, AgentObservation, DriverStatusStore, FanOutSink, HarnessEventJournal,+ HarnessStatusStore, JournalSink, RedactingSink, StoreEventJournal,};use tinyagents_harness::store::AppendStore;diff --git a/crates/openhuman-core/src/agent/tinyagents/journal_tests.rs b/crates/openhuman-core/src/agent/tinyagents/journal_tests.rsindex 0d708ead93..67247ddfad 100644--- a/crates/openhuman-core/src/agent/tinyagents/journal_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/journal_tests.rs@@ -1,6 +1,6 @@use super::*;use crate::core::runtime::agent_scope::test_agent_context;-use crate::core::runtime::{DomainSet, context::CoreContext};+use crate::core::runtime::{context::CoreContext, DomainSet};#[tokio::test]async fn request_journal_runs_stay_with_the_agent_that_registered_them() {diff --git a/crates/openhuman-core/src/agent/tinyagents/live_harness.rs b/crates/openhuman-core/src/agent/tinyagents/live_harness.rsindex 99b767e698..a08c57699a 100644--- a/crates/openhuman-core/src/agent/tinyagents/live_harness.rs+++ b/crates/openhuman-core/src/agent/tinyagents/live_harness.rs@@ -28,11 +28,11 @@ use tinyagents_harness::middleware::{};use tinyagents_harness::runtime::AgentHarness;-use super::ToolPolicyEnforcement;use super::host::OpenHumanRunContext;use super::middleware;use super::tool_registration::{capability_diagnostics, host_tool_set_builder};use super::turn_policy::run_policy_for;+use super::ToolPolicyEnforcement;/// Generous tool-call budget for one live conversation; the harness's/// per-call admission still counts against it.diff --git a/crates/openhuman-core/src/agent/tinyagents/memory_summarizer.rs b/crates/openhuman-core/src/agent/tinyagents/memory_summarizer.rsindex 5ea246df6d..4e2be39d70 100644--- a/crates/openhuman-core/src/agent/tinyagents/memory_summarizer.rs+++ b/crates/openhuman-core/src/agent/tinyagents/memory_summarizer.rs@@ -16,7 +16,7 @@ use std::sync::Arc;use async_trait::async_trait;use tinyagents_harness::error::Result;-use tinyagents_harness::summarization::{Summarizer, SummaryRecord, SummaryRequest, is_checkpoint};+use tinyagents_harness::summarization::{is_checkpoint, Summarizer, SummaryRecord, SummaryRequest};use tinyinference_llm::message::{ContentBlock, Message};use tinymemory_api::{Role, Turn};diff --git a/crates/openhuman-core/src/agent/tinyagents/memory_summarizer_tests.rs b/crates/openhuman-core/src/agent/tinyagents/memory_summarizer_tests.rsindex d6946774e5..1c4f7be095 100644--- a/crates/openhuman-core/src/agent/tinyagents/memory_summarizer_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/memory_summarizer_tests.rs@@ -3,7 +3,7 @@ use super::*;use chrono::Utc;use tinyagents_harness::summarization::ConcatSummarizer;-use crate::memory::lifecycle::hooks::{PostTurnInput, PreTurnInput, post_turn, pre_turn};+use crate::memory::lifecycle::hooks::{post_turn, pre_turn, PostTurnInput, PreTurnInput};use crate::memory::scope::MemoryIdentity;use crate::memory::test_fixtures::{bind_reference, config_in};@@ -113,14 +113,13 @@ async fn without_recall_the_summarizer_is_unchanged_and_its_failure_is_its_own()let mut quiet = (*turn).clone();quiet.identity.recall = false;let off = MemoryRecallSummarizer::wrap(Box::new(ConcatSummarizer), Some(Arc::new(quiet)));- assert!(- !off.summarize(&dropped())- .await- .unwrap()- .summary- .text()- .contains(RECALLED_HEADING)- );+ assert!(!off+ .summarize(&dropped())+ .await+ .unwrap()+ .summary+ .text()+ .contains(RECALLED_HEADING));let failing = MemoryRecallSummarizer::wrap(Box::new(Failing), Some(turn));assert!(failing.summarize(&dropped()).await.is_err());diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/approval.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/approval.rsindex df3c01e374..1ffaadf3e6 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/approval.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/approval.rs@@ -12,7 +12,7 @@ use tinyinference_llm::tool::ToolCall as TaToolCall;use tinytools::ToolResult as TaToolResult;use crate::security::approval::{- ApprovalGate, ExecutionOutcome, GateOutcome, redact_args, summarize_action,+ redact_args, summarize_action, ApprovalGate, ExecutionOutcome, GateOutcome,};use tinytools::Tool;diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/credential_scrub.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/credential_scrub.rsindex 83f2a47f79..18d026f6b0 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/credential_scrub.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/credential_scrub.rs@@ -3,8 +3,8 @@//! token, which is minted by the host and must survive the scrubber.use tinyagents_harness::middleware::{- CredentialScrubMiddleware, REDACTION_PLACEHOLDER, ToolScrubber, redaction_notice,- scrub_with_notice,+ redaction_notice, scrub_with_notice, CredentialScrubMiddleware, ToolScrubber,+ REDACTION_PLACEHOLDER,};/// The browser task's `pending.token` is a host-minted, one-time confirmationdiff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/failure_policy.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/failure_policy.rsindex 97df0e3fc3..f4348ea34f 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/failure_policy.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/failure_policy.rs@@ -3,10 +3,10 @@//! stays readable: the ladder driver lives there, the classification here.use super::fetched_site::fetched_site_policy;-use tinyagents_harness::middleware::{CallEffect, call_effect};+use tinyagents_harness::middleware::{call_effect, CallEffect};use tinyagents_harness::no_progress::{- ARGUMENT_SCHEMA_RECOVERY, is_argument_rejection, is_command_exit_report,- is_pre_execution_failure, json_error_recovery,+ is_argument_rejection, is_command_exit_report, is_pre_execution_failure, json_error_recovery,+ ARGUMENT_SCHEMA_RECOVERY,};use tinyinference_llm::failure::is_recoverable_failure_text as is_recoverable_tool_failure;diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack.rsindex ee4dced83e..dc3fba6382 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack.rs@@ -27,8 +27,8 @@ impl MemoryPackSource<OpenHumanRunContext> for TurnMemoryPack {}/// The harness middleware over [`TurnMemoryPack`].-pub(crate) fn memory_pack_middleware()--> tinyagents_hooks::lifecycle::MemoryPackMiddleware<OpenHumanRunContext, TurnMemoryPack> {+pub(crate) fn memory_pack_middleware(+) -> tinyagents_hooks::lifecycle::MemoryPackMiddleware<OpenHumanRunContext, TurnMemoryPack> {tinyagents_hooks::lifecycle::MemoryPackMiddleware::new(TurnMemoryPack)}diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rsindex 2f346bddb8..5e6295d4f9 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rs@@ -8,7 +8,7 @@ use std::sync::Arc;use tinyagents_harness::context::RunConfig;use tinyinference_llm::message::Message;-use crate::memory::lifecycle::hooks::{MemoryTurn, OPEN_TAG, TurnPack};+use crate::memory::lifecycle::hooks::{MemoryTurn, TurnPack, OPEN_TAG};use crate::memory::scope::MemoryIdentity;fn context(pack: Option<TurnPack>) -> RunContext<OpenHumanRunContext> {@@ -171,14 +171,12 @@ async fn on_a_hoisting_model_only_the_previous_tail_message_falls_out_of_the_cac&second.messages[..turn_two.len() - 1],&turn_two[..turn_two.len() - 1]);- assert!(- second- .messages- .last()- .unwrap()- .text()- .contains("travels by rail")- );+ assert!(second+ .messages+ .last()+ .unwrap()+ .text()+ .contains("travels by rail"));// Turn one's tail carried turn one's pack, so the shared prefix stops just// before it: one user message, never the whole history.assert_eq!(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 f96933701a..8d09df2f46 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::{Value, json};+use serde_json::{json, Value};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/repeated_failure.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rsindex af9b87f872..b0ff5b9dbb 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs@@ -9,12 +9,12 @@ use async_trait::async_trait;use tinyagents_harness::context::RunContext;use tinyagents_harness::error::Result as TaResult;use tinyagents_harness::middleware::{- CallEffect, Middleware, ToolFactsLookup, ToolInvocationIdentity, call_effect, dispatch_target,- is_repeat_call_exempt, repeat_guard_marker,+ call_effect, dispatch_target, is_repeat_call_exempt, repeat_guard_marker, CallEffect,+ Middleware, ToolFactsLookup, ToolInvocationIdentity,};use tinyagents_harness::no_progress::{- ClassifiedFailureTracker, ClassifiedStep, FailurePolicy, NoProgress, NoProgressTracker,- RecoverableFailureLadder, ToolAttempt, classified_step, clear_recovered,+ classified_step, clear_recovered, ClassifiedFailureTracker, ClassifiedStep, FailurePolicy,+ NoProgress, NoProgressTracker, RecoverableFailureLadder, ToolAttempt,};use tinyagents_harness::steering::SteeringHandle;use tinyagents_hooks::stop::StopLatch;diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_output.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_output.rsindex a555278609..024e4bd1cb 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_output.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_output.rs@@ -16,15 +16,15 @@ use tinyinference_llm::tool::ToolCall as TaToolCall;use tinytools::{ToolPolicy as TaToolPolicy, ToolResult as TaToolResult};use crate::agent::harness::tool_result_artifacts::{- HostArtifactStore, TINYAGENTS_TOOL_RESULT_ARTIFACT_STORE, artifact_read_target,- page_artifact_read,+ artifact_read_target, page_artifact_read, HostArtifactStore,+ TINYAGENTS_TOOL_RESULT_ARTIFACT_STORE,};use crate::agent::tinyagents::payload_summarizer::DynPayloadSummarizer;use crate::inference::tokenjuice::generate::GenerateTicket;use tinyagents_harness::artifacts::tool_results::{ArtifactRead, ToolResultArtifactOutcome};use tinyagents_harness::middleware::library::{- CompactedOutput, OutputCapPolicy, OutputLadderInput, OutputProcessor, plan_output_stages,- run_output_ladder,+ plan_output_stages, run_output_ladder, CompactedOutput, OutputCapPolicy, OutputLadderInput,+ OutputProcessor,};use tinyjuice_bus::types::AgentTokenjuiceCompression;diff --git a/crates/openhuman-core/src/agent/tinyagents/mod.rs b/crates/openhuman-core/src/agent/tinyagents/mod.rsindex 2ce16596b9..bbec92e859 100644--- a/crates/openhuman-core/src/agent/tinyagents/mod.rs+++ b/crates/openhuman-core/src/agent/tinyagents/mod.rs@@ -74,8 +74,8 @@ pub(crate) use turn_outcome::TinyagentsTurnOutcome;#[cfg(test)]pub(crate) use turn_policy::is_subagent_spawn_or_delegate_tool;pub(crate) use turn_policy::{- ToolPolicyEnforcement, agent_turn_wall_clock_ms_for, chat_provider_is_local,- local_web_turn_backstop_secs,+ agent_turn_wall_clock_ms_for, chat_provider_is_local, local_web_turn_backstop_secs,+ ToolPolicyEnforcement,};// Test-only glue so `tinyagents_tests.rs`'s `use super::*;` sees thediff --git a/crates/openhuman-core/src/agent/tinyagents/nested_calls_tests.rs b/crates/openhuman-core/src/agent/tinyagents/nested_calls_tests.rsindex aa9eb6625b..8c485da0b7 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::{Value, json};+use serde_json::{json, Value};use tinyagents_definition::{AgentDefinition, InMemoryDefinitionRegistry};use tinyagents_harness::context::{RunConfig, RunContext};use tinyagents_harness::host::{@@ -27,9 +27,9 @@ use tinyinference_llm::providers::MockModel;use tinyinference_llm::tool::ToolCall;use tinytools::{PermissionLevel, Tool, ToolResult};-use tinyagents_hooks::tool::{ToolHook, ToolHookContext, ToolHooksMiddleware};use crate::agent::tinyagents::host::{OpenHumanRunContext, OpenHumanSecurityGate};use crate::security::policy::{AutonomyLevel, SecurityPolicy};+use tinyagents_hooks::tool::{ToolHook, ToolHookContext, ToolHooksMiddleware};type Outcome = Result<ToolResult, String>;@@ -166,9 +166,9 @@ async fn run_with_hooks(target: &'static str) -> (Option<Outcome>, usize, usize)target,outcome: outcome.clone(),}));- harness.push_middleware(Arc::new(ToolHooksMiddleware::<OpenHumanRunContext>::new(vec![Arc::new(- DenyNamed("secret"),- )])));+ harness.push_middleware(Arc::new(ToolHooksMiddleware::<OpenHumanRunContext>::new(+ vec![Arc::new(DenyNamed("secret"))],+ )));harness.invoke_in_context(&(), run_context(), vec![Message::user("go")]).await@@ -225,9 +225,10 @@ 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/observability_tests.rs b/crates/openhuman-core/src/agent/tinyagents/observability_tests.rsindex 634fd05fde..918069ff7f 100644--- a/crates/openhuman-core/src/agent/tinyagents/observability_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/observability_tests.rs@@ -259,7 +259,8 @@ async fn tool_completed_projects_output_arguments_and_elapsed() {}/// The answer the crate injects for an unknown tool (`unknown_tool_message`).-const UNKNOWN_TOOL_ANSWER: &str = "unknown tool `search_files` (arguments: {\"query\":\"config\"}): \+const UNKNOWN_TOOL_ANSWER: &str =+ "unknown tool `search_files` (arguments: {\"query\":\"config\"}): \no tool with that name is available to you, and calling it again will fail the same way.";/// Emit what the crate emits for an unknown-tool call since TOOL-11: the typeddiff --git a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rsindex 5218bcab43..a7595f46e6 100644--- a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs+++ b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs@@ -22,10 +22,10 @@use std::sync::Arc;-use anyhow::{Result, anyhow};+use anyhow::{anyhow, Result};use tinyagents_harness::context::RunContext;use tinyagents_harness::summarization::payload_summarizer::{- PayloadSummarizer as HarnessPayloadSummarizer, run_unary_summary, summary_child_config,+ run_unary_summary, summary_child_config, PayloadSummarizer as HarnessPayloadSummarizer,};use tracing::debug;@@ -45,10 +45,10 @@ use {/// way supplies its own. The prompt is not part of this — TinyJuice writes it/// and sends it in the [`GenerateRequest`].pub type DynPayloadSummarizer = dyn HarnessPayloadSummarizer<- OpenHumanRunContext,- Prepared = PreparedGenerate,- Error = anyhow::Error,- >;+ OpenHumanRunContext,+ Prepared = PreparedGenerate,+ Error = anyhow::Error,+>;/// Runs the `summarizer` agent definition's model as a unary child of the turn.pub struct SubagentPayloadSummarizer {diff --git a/crates/openhuman-core/src/agent/tinyagents/policy_denial.rs b/crates/openhuman-core/src/agent/tinyagents/policy_denial.rsindex 3b2736b14e..eb9d936d0c 100644--- a/crates/openhuman-core/src/agent/tinyagents/policy_denial.rs+++ b/crates/openhuman-core/src/agent/tinyagents/policy_denial.rs@@ -19,8 +19,8 @@//! It is a mitigation, not a guarantee — detecting fabrication needs the//! tool-call record carried out to the caller.-use tinytools::PermissionLevel;use tinytools::status::POLICY_BLOCKED_MARKER;+use tinytools::PermissionLevel;/// Generic workaround for a raw security-policy / autonomy block. These denials/// originate deep in the tools / `SecurityPolicy` layer (autonomy tier, commanddiff --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 87f16a5b6f..7f8365587b 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::{Value, json};+use serde_json::{json, Value};use tinyagents_harness::context::RunConfig;use tinyagents_harness::middleware::PromptCacheGuardMiddleware;use tinyagents_harness::runtime::AgentHarness;diff --git a/crates/openhuman-core/src/agent/tinyagents/reaper_tests.rs b/crates/openhuman-core/src/agent/tinyagents/reaper_tests.rsindex dd28da9bd8..901677f3d2 100644--- a/crates/openhuman-core/src/agent/tinyagents/reaper_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/reaper_tests.rs@@ -3,7 +3,7 @@ use super::*;use tinyagents_harness::events::HarnessRunStatus;use tinyagents_harness::ids::{ComponentId, ExecutionStatus, HarnessPhase};use tinyagents_harness::observability::{- DriverStatusStore, HarnessStatusStore, ORPHAN_REAP_REASON, mint_run_id,+ mint_run_id, DriverStatusStore, HarnessStatusStore, ORPHAN_REAP_REASON,};/// Build a fresh status in a non-terminal state and persist it.diff --git a/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rs b/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rsindex 0ab72a2684..5525125c50 100644--- a/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rs+++ b/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rs@@ -22,7 +22,7 @@ use tinyagents_harness::run_queue::{ForwardEvent, ForwardEventSink, QueuedMessaguse tinyagents_harness::steering::SteeringHandle;use tinyagents_runtime::turn_driver::{RunQueueFeed, SteeringFeed, SteeringRegistrar};-use crate::agent::queued_turn::{QueuedTurn, text_preview};+use crate::agent::queued_turn::{text_preview, QueuedTurn};use crate::core::bus::BUS;use crate::core::events::DomainEvent;diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rsindex 5282c4cf67..ecbc2a2b24 100644--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs@@ -13,7 +13,7 @@ use tinyagents_harness::tool::{};use tinyagents_registry::{CapabilityRegistry, ComponentKind, RegistryDiagnostic};use tinyagents_runtime::turn_driver::{SharedToolSet, ToolSetBuilder};-use tinyagents_runtime::{ToolAdmission, project_descriptors};+use tinyagents_runtime::{project_descriptors, ToolAdmission};use tinyinference_llm::model::ChatModel;use tinytools::ToolRunContext;@@ -22,8 +22,8 @@ use crate::agent::orchestration::tools::{ListSubagentsDispatch, SpawnAsyncSubagentDispatch, SpawnParallelAgentsDispatch,SpawnSubagentDispatch, SteerSubagentDispatch, WaitSubagentDispatch,};-use crate::agent::tinyagents::host::OpenHumanRunContext;use crate::agent::tinyagents::host::run_context::HostOperationContext;+use crate::agent::tinyagents::host::OpenHumanRunContext;use crate::agent::tinyagents::turn_policy::is_subagent_spawn_or_delegate_tool;use crate::agent::tinyagents::use_skill_dispatch::UseSkillDispatch;use crate::agent::tools::TodoToolDispatch;diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rsindex 4397f26067..d937de22ab 100644--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs@@ -46,7 +46,7 @@ fn threaded_turn_keeps_goal_tools_as_exposure_candidates() {#[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::{CallId, context::RunConfig};+ use tinyagents_harness::{context::RunConfig, CallId};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 2c23fb9b9e..a03d2b7054 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_exec.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_exec.rs@@ -26,11 +26,11 @@ 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::{- TurnMiddlewareInputs, TurnWiring, install_turn_middleware,+ install_turn_middleware, TurnMiddlewareInputs, TurnWiring,};use crate::agent::tinyagents::turn_outcome::TinyagentsTurnOutcome;use crate::agent::tinyagents::turn_plan::{- OpenHumanTurnPlanner, enforce_registry_diagnostics, turn_models_for_plan, turn_run_policy,+ enforce_registry_diagnostics, turn_models_for_plan, turn_run_policy, OpenHumanTurnPlanner,};use crate::agent::tinyagents::turn_run_error::map_turn_run_error;use crate::agent::tinyagents::turn_run_finalize::finalize_turn_outcome;diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rs b/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rsindex 35a199a7b8..cb1e3e7441 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::{- ApprovalGateMiddleware, ArgRecoveryMiddleware, BudgetLimits, BudgetMiddleware,- ContextCompressionMiddleware, PromptCacheGuardMiddleware, RepeatProgressMiddleware,- RunModeHandle, ToolPolicyMiddleware as TaToolPolicyMiddleware, plan_mode_middleware,+ install_unmet_deliverable, is_repeat_call_exempt, tool_sets_lookup, ResearchBudgetMiddleware,+ ShellTurnBudget, TurnClockMiddleware, DIRECT_WEB_READ_LIMIT,};use tinyagents_harness::middleware::{- DIRECT_WEB_READ_LIMIT, ResearchBudgetMiddleware, ShellTurnBudget, TurnClockMiddleware,- install_unmet_deliverable, is_repeat_call_exempt, tool_sets_lookup,+ plan_mode_middleware, ApprovalGateMiddleware, ArgRecoveryMiddleware, BudgetLimits,+ BudgetMiddleware, ContextCompressionMiddleware, PromptCacheGuardMiddleware,+ RepeatProgressMiddleware, RunModeHandle, ToolPolicyMiddleware as TaToolPolicyMiddleware,};use tinyagents_harness::runtime::AgentHarness;use tinyagents_harness::steering::SteeringHandle;diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_policy.rs b/crates/openhuman-core/src/agent/tinyagents/turn_policy.rsindex 39758f9ed4..d616966f09 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_policy.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_policy.rs@@ -8,8 +8,8 @@use tinyagents_harness::runtime::RunPolicy;use tinyagents_harness::turn_policy::{- TurnPolicyOptions, TurnPolicyOverrides, local_turn_backstop_secs, run_policy,- turn_wall_clock_ms,+ local_turn_backstop_secs, run_policy, turn_wall_clock_ms, TurnPolicyOptions,+ TurnPolicyOverrides,};use crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH;@@ -23,8 +23,8 @@ use crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH;pub(crate) struct ToolPolicyEnforcement {pub policy: std::sync::Arc<dyn tinyagents_harness::middleware::ToolCallPolicy<- crate::agent::tinyagents::host::OpenHumanRunContext,- >,+ crate::agent::tinyagents::host::OpenHumanRunContext,+ >,>,/// The session's channel-permission snapshot — enforces the per-channel/// permission ceiling (deny + per-call permission-level gate) the in-house@@ -49,7 +49,7 @@ pub(crate) struct ToolPolicyEnforcement {/// endpoint host is loopback or on a private network./// - `openai:<model>` and every other cloud provider are never local.pub(crate) fn provider_is_self_hosted(provider: &str, endpoint: Option<&str>) -> bool {- use tinyinference_local::profile::{LocalProviderKind, kind_from_provider_string};+ use tinyinference_local::profile::{kind_from_provider_string, LocalProviderKind};let p = provider.trim().to_ascii_lowercase();let Some(kind) = kind_from_provider_string(&p) else {return false;diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_run_error.rs b/crates/openhuman-core/src/agent/tinyagents/turn_run_error.rsindex 9f54400885..04435a05d6 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_run_error.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_run_error.rs@@ -2,7 +2,7 @@//! caller expects, for [`TurnSpec::run`](TurnSpec::run).use crate::agent::tinyagents::journal::TurnJournal;-use tinyagents_harness::turn_run_error::{RunFailureKind, classify_run_failure};+use tinyagents_harness::turn_run_error::{classify_run_failure, RunFailureKind};use tinyinference_llm::model::ModelErrorSlot;/// Map the harness's run failure `e` onto the typed error the turn callerdiff --git a/crates/openhuman-core/src/agent/tinyagents/turn_run_finalize.rs b/crates/openhuman-core/src/agent/tinyagents/turn_run_finalize.rsindex 2f92abfe28..6d21caf2e4 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_run_finalize.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_run_finalize.rs@@ -18,8 +18,8 @@ use crate::agent::tinyagents::turn_outcome::TinyagentsTurnOutcome;use crate::progress::AgentProgress;use tinyagents_harness::turn_outcome::{HaltSummarySlot, ToolOutcomeSink};use tinyagents_harness::turn_run_finalize::{- TurnEnd, TurnEndInputs, classify_turn_end, log_compaction_provenance, select_turn_text,- system_segment_bytes,+ classify_turn_end, log_compaction_provenance, select_turn_text, system_segment_bytes, TurnEnd,+ TurnEndInputs,};/// Assemble the [`TinyagentsTurnOutcome`] for a run that returneddiff --git a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch.rs b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch.rsindex 078f93e3a4..2680a01bec 100644--- a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch.rs+++ b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch.rs@@ -34,7 +34,7 @@ use tinytools::{Tool, ToolCallOptions, ToolResult};use super::host::OpenHumanRunContext;use super::tool_registration::typed_dispatch_for;use crate::tools::toolpacks::registry::CATALOG;-use tinyagents_harness::tool::packs::{PackRegistryHandle, named_tool};+use tinyagents_harness::tool::packs::{named_tool, PackRegistryHandle};/// Live-parent dispatch for the `use_skill` proxy tool.///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 0d2131ff69..eef163375d 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::CallId;use tinyagents_harness::context::RunConfig;use tinyagents_harness::tool::packs::{PackRegistryHandle, UseSkillTool};+use tinyagents_harness::CallId;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/tools.rs b/crates/openhuman-core/src/agent/tools.rsindex 874a76e487..9b87033eb6 100644--- a/crates/openhuman-core/src/agent/tools.rs+++ b/crates/openhuman-core/src/agent/tools.rs@@ -26,6 +26,6 @@ mod plan_exit;// them to a disabled-error.mod todo;-pub use plan_exit::{PLAN_EXIT_MARKER, PlanExitTool};+pub use plan_exit::{PlanExitTool, PLAN_EXIT_MARKER};pub use todo::TodoTool;pub(crate) use todo::TodoToolDispatch;diff --git a/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs b/crates/openhuman-core/src/agent/tools/plan_exit_tests.rsindex 0802e4dfb7..acd7924161 100644--- a/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs+++ b/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs@@ -61,15 +61,13 @@ 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 e12fdac973..208096300a 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::{Value, json};+use serde_json::{json, Value};use tinyagents_graph::todos::{TodoItem, TodoStatus};/// Serialize tests that share the process-global scratch store. Same lockdiff --git a/crates/openhuman-core/src/agent/turn_env.rs b/crates/openhuman-core/src/agent/turn_env.rsindex a440b6df67..6705dfea4f 100644--- a/crates/openhuman-core/src/agent/turn_env.rs+++ b/crates/openhuman-core/src/agent/turn_env.rs@@ -16,8 +16,8 @@use tinyagents_harness::cancel::CancellationToken;use tinyagents_harness::turn_deadline::TurnDeadline;-use crate::agent::tinyagents::host::OpenHumanRunContext;use crate::agent::tinyagents::budget::ModelBudget;+use crate::agent::tinyagents::host::OpenHumanRunContext;/// Per-turn values an entry point hands to the session it runs.///@@ -38,10 +38,8 @@ pub struct HostTurnEnv {/// A cap on real tool invocations, never wider than the product default.pub tool_call_limit: Option<usize>,/// Agent/turn hook callbacks added after the runtime's global ones.- pub hooks: tinyagents_hooks::scope::HookScope<- OpenHumanRunContext,- tinyagents_harness::cost::TurnCost,- >,+ pub hooks:+ tinyagents_hooks::scope::HookScope<OpenHumanRunContext, tinyagents_harness::cost::TurnCost>,/// The host's tool belt for this turn is authoritative: tool declarations/// recorded in a restored transcript must not bring a revoked tool back.pub fresh_tool_snapshot: bool,diff --git a/crates/openhuman-core/src/agent/turn_env_tests.rs b/crates/openhuman-core/src/agent/turn_env_tests.rsindex 6b5c7476d0..8638e1fbf1 100644--- a/crates/openhuman-core/src/agent/turn_env_tests.rs+++ b/crates/openhuman-core/src/agent/turn_env_tests.rs@@ -1,12 +1,15 @@use super::*;-use tinyagents_hooks::stop::BudgetStopHook;use crate::agent::tinyagents::host::OpenHumanRunContext;use std::sync::Arc;use std::time::Duration;+use tinyagents_hooks::stop::BudgetStopHook;fn full_env() -> (HostTurnEnv, CancellationToken) {let token = CancellationToken::new();- let mut hooks = tinyagents_hooks::scope::HookScope::<crate::agent::tinyagents::host::OpenHumanRunContext, tinyagents_harness::cost::TurnCost>::default();+ let mut hooks = tinyagents_hooks::scope::HookScope::<+ crate::agent::tinyagents::host::OpenHumanRunContext,+ tinyagents_harness::cost::TurnCost,+ >::default();hooks.push_stop(Arc::new(BudgetStopHook::new(2.0)));let env = HostTurnEnv {spawn_depth_limit: Some(1),diff --git a/crates/openhuman-core/src/agent_registry/agents/critic/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/critic/prompt.rsindex aa9f0a3e18..35e464b1f2 100644--- a/crates/openhuman-core/src/agent_registry/agents/critic/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/critic/prompt.rs@@ -4,7 +4,7 @@//! (from the sibling `prompt.md`) plus the same section helpers the//! runtime uses for every other agent.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/agent_registry/agents/image_agent/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/image_agent/prompt.rsindex 98556b2521..de4d119bf5 100644--- a/crates/openhuman-core/src/agent_registry/agents/image_agent/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/image_agent/prompt.rs@@ -3,7 +3,7 @@//! Returns the final, fully-assembled system prompt — archetype body (from the//! sibling `prompt.md`) plus the shared section helpers every agent uses.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/agent_registry/agents/mod.rs b/crates/openhuman-core/src/agent_registry/agents/mod.rsindex 8b283cd438..4ce69fdf12 100644--- a/crates/openhuman-core/src/agent_registry/agents/mod.rs+++ b/crates/openhuman-core/src/agent_registry/agents/mod.rs@@ -51,4 +51,4 @@ pub mod video_agent;#[path = "vision_agent/prompt.rs"]pub mod vision_agent;-pub use loader::{BUILTINS, BuiltinAgent, load_builtins};+pub use loader::{load_builtins, BuiltinAgent, BUILTINS};diff --git a/crates/openhuman-core/src/agent_registry/agents/morning_briefing/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/morning_briefing/prompt.rsindex caaa038aae..1cc019aa2a 100644--- a/crates/openhuman-core/src/agent_registry/agents/morning_briefing/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/morning_briefing/prompt.rs@@ -5,7 +5,7 @@//! in the order it wants — so the output IS what the LLM sees, no//! post-processing in the runner.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_ambient_environment, render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rsindex d6a27f77fd..139e3ff480 100644--- a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rs@@ -11,8 +11,8 @@//! module) so nobody has to branch on `agent_id` in a shared section impl.use crate::agent::prompts::{ConnectedIntegration, PromptContext};-use crate::prompts::{render_datetime, render_identity, render_tools, render_workspace};use crate::agent_registry::host_definition::AgentDefinitionRegistry;+use crate::prompts::{render_datetime, render_identity, render_tools, render_workspace};use crate::tools::orchestrator_tools::sanitise_slug;use crate::tools::toolpacks;use anyhow::Result;diff --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 e57559aec9..39cf07d7e4 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@@ -379,11 +379,8 @@ 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"));}@@ -520,11 +517,8 @@ 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_registry/agents/planner/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/planner/prompt.rsindex b8530ed6dc..0cd12fe67f 100644--- a/crates/openhuman-core/src/agent_registry/agents/planner/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/planner/prompt.rs@@ -5,7 +5,7 @@//! in the order it wants — so the output IS what the LLM sees, no//! post-processing in the runner.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_datetime, render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/agent_registry/agents/presentation_agent/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/presentation_agent/prompt.rsindex a281de74e8..1d128bb84e 100644--- a/crates/openhuman-core/src/agent_registry/agents/presentation_agent/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/presentation_agent/prompt.rs@@ -1,6 +1,6 @@//! System prompt builder for the `presentation_agent` built-in agent.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/agent_registry/agents/summarizer/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/summarizer/prompt.rsindex 20b6b111d4..207fd708a9 100644--- a/crates/openhuman-core/src/agent_registry/agents/summarizer/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/summarizer/prompt.rs@@ -5,7 +5,7 @@//! in the order it wants — so the output IS what the LLM sees, no//! post-processing in the runner.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/prompt.rsindex cc804774b0..7266d10060 100644--- a/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/prompt.rs@@ -1,6 +1,6 @@//! System prompt builder for the `task_manager_agent` built-in agent.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_safety, render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/agent_registry/agents/video_agent/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/video_agent/prompt.rsindex f8071d9ced..44cffb2764 100644--- a/crates/openhuman-core/src/agent_registry/agents/video_agent/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/video_agent/prompt.rs@@ -3,7 +3,7 @@//! Returns the final, fully-assembled system prompt — archetype body (from the//! sibling `prompt.md`) plus the shared section helpers every agent uses.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/agent_registry/agents/vision_agent/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/vision_agent/prompt.rsindex eb1b89641a..a6e479c1a8 100644--- a/crates/openhuman-core/src/agent_registry/agents/vision_agent/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/vision_agent/prompt.rs@@ -4,7 +4,7 @@//! (from the sibling `prompt.md`) plus the same section helpers the//! runtime uses for every other agent.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/agent_registry/ops.rs b/crates/openhuman-core/src/agent_registry/ops.rsindex 7418486920..4838a4f152 100644--- a/crates/openhuman-core/src/agent_registry/ops.rs+++ b/crates/openhuman-core/src/agent_registry/ops.rs@@ -2,8 +2,8 @@use std::collections::HashMap;-use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::agent::OpenHumanSessionHost;+use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::config::Config;use crate::core::runtime::DispatchCtx;diff --git a/crates/openhuman-core/src/agent_runs/agent_teams/schemas.rs b/crates/openhuman-core/src/agent_runs/agent_teams/schemas.rsindex d710dc8b5e..b0ef8737ce 100644--- a/crates/openhuman-core/src/agent_runs/agent_teams/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/agent_teams/schemas.rs@@ -10,8 +10,8 @@use crate::core::runtime::DispatchCtx;use serde_json::{Map, Value};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};use tinyagents_session::run_ledger::AgentTeamListRequest;diff --git a/crates/openhuman-core/src/agent_runs/command_center/schemas.rs b/crates/openhuman-core/src/agent_runs/command_center/schemas.rsindex 1b93f1e6b8..a5c207d9eb 100644--- a/crates/openhuman-core/src/agent_runs/command_center/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/command_center/schemas.rs@@ -8,8 +8,8 @@ use serde_json::{Map, Value};use tinyagents_session::run_ledger::command_center::ControlVerb;use crate::agent_registry::host_definition::AgentDefinitionRegistry;-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};/// Controller schemas exposed by the command center.diff --git a/crates/openhuman-core/src/agent_runs/context_breakdown.rs b/crates/openhuman-core/src/agent_runs/context_breakdown.rsindex 1820aeef42..63626a1d52 100644--- a/crates/openhuman-core/src/agent_runs/context_breakdown.rs+++ b/crates/openhuman-core/src/agent_runs/context_breakdown.rs@@ -19,10 +19,10 @@ use once_cell::sync::Lazy;use serde::{Deserialize, Serialize};use crate::config::Config;-use crate::core::Outcome;-use crate::core::agent_cli::debug::DumpPromptOptions;use crate::core::agent_cli::debug::prompt_size::{PromptSizeReport, SectionSize, ToolSize};+use crate::core::agent_cli::debug::DumpPromptOptions;use crate::core::runtime::DispatchCtx;+use crate::core::Outcome;/// Default agent whose prompt is measured when the caller names none — the/// one every main chat turn actually runs under.diff --git a/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rs b/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rsindex cdc34a7478..3bbdec4c08 100644--- a/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rs+++ b/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::core::agent_cli::debug::DumpedPrompt;use crate::core::agent_cli::debug::prompt_size::PromptSizeReport;+use crate::core::agent_cli::debug::DumpedPrompt;fn sample_dump() -> DumpedPrompt {DumpedPrompt {diff --git a/crates/openhuman-core/src/agent_runs/mod.rs b/crates/openhuman-core/src/agent_runs/mod.rsindex 721a9681c0..27b24dfce1 100644--- a/crates/openhuman-core/src/agent_runs/mod.rs+++ b/crates/openhuman-core/src/agent_runs/mod.rs@@ -29,8 +29,8 @@ pub(crate) use worktree_schemas::{};/// Registers the orchestration RPC surfaces in their catalogue order.-pub(crate) fn all_orchestration_registered_controllers()--> Vec<crate::core::all::RegisteredController> {+pub(crate) fn all_orchestration_registered_controllers(+) -> Vec<crate::core::all::RegisteredController> {let mut controllers = Vec::new();controllers.extend(all_command_center_registered_controllers());controllers.extend(all_workflow_run_registered_controllers());diff --git a/crates/openhuman-core/src/agent_runs/replay/ops.rs b/crates/openhuman-core/src/agent_runs/replay/ops.rsindex b6e2fcf745..0895beeced 100644--- a/crates/openhuman-core/src/agent_runs/replay/ops.rs+++ b/crates/openhuman-core/src/agent_runs/replay/ops.rs@@ -7,8 +7,8 @@use std::path::Path;use tinyagents_harness::events::HarnessRunStatus;-use tinyagents_harness::observability::StoreEventJournal;use tinyagents_harness::observability::replay::{self, RunEventsPage};+use tinyagents_harness::observability::StoreEventJournal;/// Paged late-attach replay reader over the durable journal under `workspace`.pub(crate) async fn read_run_events_page(diff --git a/crates/openhuman-core/src/agent_runs/replay/schemas.rs b/crates/openhuman-core/src/agent_runs/replay/schemas.rsindex 75c5e3dc62..49542d262f 100644--- a/crates/openhuman-core/src/agent_runs/replay/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/replay/schemas.rs@@ -113,7 +113,8 @@ fn replay_schema(function: &str) -> ControllerSchema {"run_events" => ControllerSchema {namespace: NAMESPACE,function: "run_events",- description: "Read-only paged replay of a durable agent run's event stream (late-attach \+ description:+ "Read-only paged replay of a durable agent run's event stream (late-attach \reconnect/backfill). Returns AgentObservations at offset >= `offset` in order, \plus `next_offset` (null once drained). Never mutates state.",inputs: vec![@@ -155,7 +156,8 @@ fn replay_schema(function: &str) -> ControllerSchema {"run_status" => ControllerSchema {namespace: NAMESPACE,function: "run_status",- description: "Read-only latest durable status snapshot (HarnessRunStatus) for a run, or null \+ description:+ "Read-only latest durable status snapshot (HarnessRunStatus) for a run, or null \when the run is unknown. Counters/phase/usage/cost only — never prompts or \payloads.",inputs: vec![FieldSchema {@@ -174,7 +176,8 @@ fn replay_schema(function: &str) -> ControllerSchema {"runs_active" => ControllerSchema {namespace: NAMESPACE,function: "runs_active",- description: "Read-only listing of active (pending/running/interrupted) agent runs, optionally \+ description:+ "Read-only listing of active (pending/running/interrupted) agent runs, optionally \filtered by `thread_id` and/or `root_run_id`. Never mutates state.",inputs: vec![FieldSchema {diff --git a/crates/openhuman-core/src/agent_runs/schemas.rs b/crates/openhuman-core/src/agent_runs/schemas.rsindex eae006c2d2..7b6e4e2080 100644--- a/crates/openhuman-core/src/agent_runs/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/schemas.rs@@ -1,11 +1,11 @@use crate::core::runtime::DispatchCtx;-use serde::Deserialize;use serde::de::DeserializeOwned;+use serde::Deserialize;use serde_json::{Map, Value};use crate::config::rpc as config_rpc;-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};/// Params for `agent.chat` and `agent.chat_simple`.@@ -136,7 +136,8 @@ pub fn schemas(function: &str) -> ControllerSchema {"list_definitions" => ControllerSchema {namespace: "agent",function: "list_definitions",- description: "List safe display metadata for sub-agent definitions in the global registry.",+ description:+ "List safe display metadata for sub-agent definitions in the global registry.",inputs: vec![],outputs: vec![json_output("definitions",@@ -551,7 +552,7 @@ fn handle_graph_topologies(_ctx: DispatchCtx, _params: Map<String, Value>) -> Cofn local_catalog_models_from_config(config: &crate::config::Config,) -> Vec<crate::platform::cost::catalog::LocalCatalogModel> {- use tinyinference_local::profile::{LocalProviderKind, ToolSupport, profile_for_kind};+ use tinyinference_local::profile::{profile_for_kind, LocalProviderKind, ToolSupport};config.model_registrydiff --git a/crates/openhuman-core/src/agent_runs/schemas_tests.rs b/crates/openhuman-core/src/agent_runs/schemas_tests.rsindex 9d9808e673..7f4b7ca17d 100644--- a/crates/openhuman-core/src/agent_runs/schemas_tests.rs+++ b/crates/openhuman-core/src/agent_runs/schemas_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::core::TypeSchema;use crate::core::runtime::DispatchCtx;+use crate::core::TypeSchema;use serde_json::json;#[test]@@ -31,26 +31,21 @@ fn schemas_expose_expected_inputs_and_unknown_fallback() {assert_eq!(chat.namespace, "agent");assert_eq!(chat.inputs.len(), 5);assert!(matches!(chat.inputs[1].ty, TypeSchema::Option(_)));- assert!(- chat.inputs- .iter()- .any(|input| input.name == "thread_id" && !input.required)- );+ assert!(chat+ .inputs+ .iter()+ .any(|input| input.name == "thread_id" && !input.required));let triage = schemas("triage_evaluate");assert_eq!(triage.inputs.len(), 7);- assert!(- triage- .inputs- .iter()- .any(|input| input.name == "payload" && input.required)- );- assert!(- triage- .inputs- .iter()- .any(|input| input.name == "dry_run" && !input.required)- );+ assert!(triage+ .inputs+ .iter()+ .any(|input| input.name == "payload" && input.required));+ assert!(triage+ .inputs+ .iter()+ .any(|input| input.name == "dry_run" && !input.required));let unknown = schemas("nope");assert_eq!(unknown.function, "unknown");@@ -97,12 +92,11 @@ async fn graph_topologies_handler_exports_structural_reports() {for g in graphs {assert!(g.get("name").and_then(Value::as_str).is_some());assert_eq!(g.get("ok").and_then(Value::as_bool), Some(true));- assert!(- g.get("mermaid")- .and_then(Value::as_str)- .unwrap()- .contains("flowchart")- );+ assert!(g+ .get("mermaid")+ .and_then(Value::as_str)+ .unwrap()+ .contains("flowchart"));assert!(g.get("topology").map(|t| !t.is_null()).unwrap_or(false),"topology embeds as structured JSON"@@ -137,13 +131,11 @@ async fn reload_and_definition_handlers_cover_missing_registry_paths() {.await.expect("reload handler should always succeed");assert_eq!(reload.get("status").and_then(Value::as_str), Some("noop"));- assert!(- reload- .get("note")- .and_then(Value::as_str)- .unwrap()- .contains("Restart")- );+ assert!(reload+ .get("note")+ .and_then(Value::as_str)+ .unwrap()+ .contains("Restart"));let list_result = handle_list_definitions(DispatchCtx::process_default(), Map::new()).await;match list_result {diff --git a/crates/openhuman-core/src/agent_runs/workflow_runs/ops_tests.rs b/crates/openhuman-core/src/agent_runs/workflow_runs/ops_tests.rsindex 2e8282cbfc..7fe46fcb60 100644--- a/crates/openhuman-core/src/agent_runs/workflow_runs/ops_tests.rs+++ b/crates/openhuman-core/src/agent_runs/workflow_runs/ops_tests.rs@@ -1,6 +1,6 @@use super::*;use tinyagents_orchestration::workflow::{- DefinitionError, WorkflowDefinition, WorkflowPhase, validate_agents, validate_structure,+ validate_agents, validate_structure, DefinitionError, WorkflowDefinition, WorkflowPhase,};fn good_def() -> WorkflowDefinition {diff --git a/crates/openhuman-core/src/agent_runs/workflow_runs/schemas.rs b/crates/openhuman-core/src/agent_runs/workflow_runs/schemas.rsindex 845a2627e4..32a58d37ea 100644--- a/crates/openhuman-core/src/agent_runs/workflow_runs/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/workflow_runs/schemas.rs@@ -8,8 +8,8 @@use crate::core::runtime::DispatchCtx;use serde_json::{Map, Value};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};use tinyagents_session::run_ledger::WorkflowRunListRequest;diff --git a/crates/openhuman-core/src/agent_runs/worktree_schemas.rs b/crates/openhuman-core/src/agent_runs/worktree_schemas.rsindex 3102e55c84..b5059136ed 100644--- a/crates/openhuman-core/src/agent_runs/worktree_schemas.rs+++ b/crates/openhuman-core/src/agent_runs/worktree_schemas.rs@@ -18,14 +18,14 @@use crate::core::runtime::DispatchCtx;use std::path::{Path, PathBuf};-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};use tinyagents_harness::workspace::{- GIT_WORKTREE_SUBDIR, GitWorktreeError, GitWorktreeStatus, detect_worktree_overlaps,- git_worktree_diff_summary, git_worktree_status, list_git_worktrees, remove_git_worktree,+ detect_worktree_overlaps, git_worktree_diff_summary, git_worktree_status, list_git_worktrees,+ remove_git_worktree, GitWorktreeError, GitWorktreeStatus, GIT_WORKTREE_SUBDIR,};/// Controller schemas exposed by the worktree manager.diff --git a/crates/openhuman-core/src/agent_runs/worktree_schemas_tests.rs b/crates/openhuman-core/src/agent_runs/worktree_schemas_tests.rsindex fa4dd03e1d..d52bd017ec 100644--- a/crates/openhuman-core/src/agent_runs/worktree_schemas_tests.rs+++ b/crates/openhuman-core/src/agent_runs/worktree_schemas_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::core::runtime::DispatchCtx;use std::process::Command;-use tinyagents_harness::workspace::{GitWorktreeBaseRef, GitWorktreeStatus, create_git_worktree};+use tinyagents_harness::workspace::{create_git_worktree, GitWorktreeBaseRef, GitWorktreeStatus};/// `true` when `git` is invokable on this host. Tests that need real/// `git worktree` plumbing skip (pass trivially) when it's absent, so adiff --git a/crates/openhuman-core/src/artifacts/artifact_wiring.rs b/crates/openhuman-core/src/artifacts/artifact_wiring.rsindex c73627ffde..865b28d9e3 100644--- a/crates/openhuman-core/src/artifacts/artifact_wiring.rs+++ b/crates/openhuman-core/src/artifacts/artifact_wiring.rs@@ -14,7 +14,7 @@use std::path::Path;use std::sync::Arc;-use crate::agent::harness::tool_result_artifacts::{HostArtifactStore, new_tool_result_store};+use crate::agent::harness::tool_result_artifacts::{new_tool_result_store, HostArtifactStore};use crate::security::policy::tool_result_artifacts_dir;use crate::storage::sessions::artifact_blobs_for;use tinystoragedrivers::{MemoryStorage, Scope, StorageBackend};diff --git a/crates/openhuman-core/src/artifacts/artifact_wiring_tests.rs b/crates/openhuman-core/src/artifacts/artifact_wiring_tests.rsindex edbce5dd88..8dded6549c 100644--- a/crates/openhuman-core/src/artifacts/artifact_wiring_tests.rs+++ b/crates/openhuman-core/src/artifacts/artifact_wiring_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::security::policy::tool_result_artifacts_dir;use serde_json::json;-use tinyagents_harness::artifacts::tool_results::{ArtifactRead, apply_per_result_persistence};+use tinyagents_harness::artifacts::tool_results::{apply_per_result_persistence, ArtifactRead};const DAY: std::time::Duration = std::time::Duration::from_secs(24 * 60 * 60);diff --git a/crates/openhuman-core/src/artifacts/mod.rs b/crates/openhuman-core/src/artifacts/mod.rsindex 224189ea0c..ceb4407b54 100644--- a/crates/openhuman-core/src/artifacts/mod.rs+++ b/crates/openhuman-core/src/artifacts/mod.rs@@ -12,8 +12,8 @@ pub mod types;pub mod version_documents;pub(crate) use files::resolve_ready_file_meta;-pub use files::{FileRoots, resolve_ready_file};-pub use migrate::{MigrationReport, migrate_legacy_artifacts};+pub use files::{resolve_ready_file, FileRoots};+pub use migrate::{migrate_legacy_artifacts, MigrationReport};pub use schemas::{all_controller_schemas as all_artifacts_controller_schemas,all_registered_controllers as all_artifacts_registered_controllers,diff --git a/crates/openhuman-core/src/artifacts/schemas.rs b/crates/openhuman-core/src/artifacts/schemas.rsindex 5883a7c478..62c62cd6e3 100644--- a/crates/openhuman-core/src/artifacts/schemas.rs+++ b/crates/openhuman-core/src/artifacts/schemas.rs@@ -431,13 +431,8 @@ fn handle_list_artifacts(ctx: DispatchCtx, params: Map<String, Value>) -> Contro.transpose()?;let thread_id = read_optional_string(¶ms, "thread_id")?;to_json(- crate::artifacts::ops::ai_list_artifacts(- &config,- offset,- limit,- thread_id.as_deref(),- )- .await?,+ crate::artifacts::ops::ai_list_artifacts(&config, offset, limit, thread_id.as_deref())+ .await?,)})}@@ -456,12 +451,8 @@ fn handle_save_artifact_version(ctx: DispatchCtx, params: Map<String, Value>) ->let artifact_id = read_required::<String>(¶ms, "artifact_id")?;let body = read_required::<String>(¶ms, "body")?;to_json(- crate::artifacts::ops::ai_save_artifact_version(- &config,- artifact_id.trim(),- &body,- )- .await?,+ crate::artifacts::ops::ai_save_artifact_version(&config, artifact_id.trim(), &body)+ .await?,)})}@@ -493,13 +484,8 @@ fn handle_share_artifact(ctx: DispatchCtx, params: Map<String, Value>) -> Contro}};to_json(- crate::artifacts::ops::ai_share_artifact(- &config,- artifact_id.trim(),- version,- public,- )- .await?,+ crate::artifacts::ops::ai_share_artifact(&config, artifact_id.trim(), version, public)+ .await?,)})}@@ -508,9 +494,7 @@ fn handle_delete_artifact(ctx: DispatchCtx, params: Map<String, Value>) -> ContrBox::pin(async move {let config = ctx.load_config().await?;let artifact_id = read_required::<String>(¶ms, "artifact_id")?;- to_json(- crate::artifacts::ops::ai_delete_artifact(&config, artifact_id.trim()).await?,- )+ to_json(crate::artifacts::ops::ai_delete_artifact(&config, artifact_id.trim()).await?)})}diff --git a/crates/openhuman-core/src/attachments/host.rs b/crates/openhuman-core/src/attachments/host.rsindex 2d90e79c59..a6e00d1859 100644--- a/crates/openhuman-core/src/attachments/host.rs+++ b/crates/openhuman-core/src/attachments/host.rs@@ -14,7 +14,7 @@ use std::path::Path;use tinyagents_harness::multimodal::mime::detect_file_mime;-use super::{AttachmentAccessScope, save};+use super::{save, AttachmentAccessScope};use crate::config::Config;/// One file a host attaches to a turn.diff --git a/crates/openhuman-core/src/attachments/host_tests.rs b/crates/openhuman-core/src/attachments/host_tests.rsindex 740ed6d4a6..d920d73bc1 100644--- a/crates/openhuman-core/src/attachments/host_tests.rs+++ b/crates/openhuman-core/src/attachments/host_tests.rs@@ -75,21 +75,18 @@ async fn references_convert_to_image_and_document_blocks() {let Message::User(user) = message else {panic!("not a user message");};- assert!(- user.content- .iter()- .any(|block| matches!(block, ContentBlock::Image(_)))- );- assert!(- user.content- .iter()- .any(|block| matches!(block, ContentBlock::Document(_)))- );- assert!(- user.content.iter().any(- |block| matches!(block, ContentBlock::Text(text) if text.contains("what is this?"))- )- );+ assert!(user+ .content+ .iter()+ .any(|block| matches!(block, ContentBlock::Image(_))));+ assert!(user+ .content+ .iter()+ .any(|block| matches!(block, ContentBlock::Document(_))));+ assert!(user+ .content+ .iter()+ .any(|block| matches!(block, ContentBlock::Text(text) if text.contains("what is this?"))));}#[tokio::test]diff --git a/crates/openhuman-core/src/attachments/mod.rs b/crates/openhuman-core/src/attachments/mod.rsindex 35f68bd984..50aa36c312 100644--- a/crates/openhuman-core/src/attachments/mod.rs+++ b/crates/openhuman-core/src/attachments/mod.rs@@ -6,7 +6,7 @@ use std::path::{Component, Path, PathBuf};use serde::{Deserialize, Serialize};use tinyagents_harness::multimodal::{- UnknownMimePolicy, config::FileLimits, markers, resolve::resolve_attachment,+ config::FileLimits, markers, resolve::resolve_attachment, UnknownMimePolicy,};use crate::config::Config;diff --git a/crates/openhuman-core/src/attachments/mod_access_tests.rs b/crates/openhuman-core/src/attachments/mod_access_tests.rsindex 6c098717aa..06489961d9 100644--- a/crates/openhuman-core/src/attachments/mod_access_tests.rs+++ b/crates/openhuman-core/src/attachments/mod_access_tests.rs@@ -54,17 +54,15 @@ async fn direct_upload_requires_runtime_authority_and_external_input_cannot_crea..Config::default()};let workspace = tinytools::WorkspaceDescriptor::new(temp.path().join("agent-acting"));- assert!(- stage_turn(- UPLOAD,- Some(&config),- Some(&workspace),- Some("thread"),- Some(&external_origin())- )- .await- .is_err()- );+ assert!(stage_turn(+ UPLOAD,+ Some(&config),+ Some(&workspace),+ Some("thread"),+ Some(&external_origin())+ )+ .await+ .is_err());assert!(!workspace.root.exists());assert!(!config.action_dir.exists());assert_eq!(@@ -96,17 +94,15 @@ async fn delegation_rejects_malformed_explicit_paths_and_external_reads_before_cserde_json::json!(["picture.png] injected"]),serde_json::json!(["picture\u{0}.png"]),] {- assert!(- delegation_prompt(- &crate::core::runtime::DispatchCtx::ambient(),- "task",- &serde_json::json!({"image_paths": image_paths}),- None,- None- )- .await- .is_err()- );+ assert!(delegation_prompt(+ &crate::core::runtime::DispatchCtx::ambient(),+ "task",+ &serde_json::json!({"image_paths": image_paths}),+ None,+ None+ )+ .await+ .is_err());}let error = delegation_prompt(&crate::core::runtime::DispatchCtx::ambient(),@@ -183,16 +179,14 @@ async fn thread_folder_upload_is_staged_where_the_turn_reads_it() {}// A folder that disappeared is an error, as in `run_task`, not a silent// fallback to the global dir.- assert!(- thread_action_dir(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &config.workspace_dir,- Some("gone")- )- .await- .is_err()- );+ assert!(thread_action_dir(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &config.workspace_dir,+ Some("gone")+ )+ .await+ .is_err());// Stage the way `start_chat` does, then read the way the turn does: its// request scope comes from a run context carrying the thread folder as itsdiff --git a/crates/openhuman-core/src/attachments/mod_tests.rs b/crates/openhuman-core/src/attachments/mod_tests.rsindex b76916ba29..b14493988b 100644--- a/crates/openhuman-core/src/attachments/mod_tests.rs+++ b/crates/openhuman-core/src/attachments/mod_tests.rs@@ -14,11 +14,9 @@ async fn legacy_sidecar_rehydrates_into_an_authorized_acting_original() {let bytes = b"\x89PNG\r\n\x1a\noriginal";tokio::fs::write(&source, bytes).await.unwrap();let scope = AttachmentAccessScope::default();- assert!(- resolve_path(&cfg, source.to_str().unwrap(), &scope)- .await- .is_err()- );+ assert!(resolve_path(&cfg, source.to_str().unwrap(), &scope)+ .await+ .is_err());let index = std::collections::HashMap::from([("legacy".into(), source.clone())]);let prompt = markers::rehydrate_placeholders_in_text("[Image: old #att:legacy]", &index);let paths = markers::parse_image_markers(&prompt).1;@@ -170,18 +168,16 @@ async fn forbidden_acting_root_is_rejected_before_directory_creation() {let temp = tempfile::tempdir().unwrap();let mut config = config(temp.path());config.action_dir = temp.path().join(".ssh").join("new-workspace");- assert!(- save(- &config,- "thread",- "file",- "text/plain",- b"data",- &AttachmentAccessScope::default()- )- .await- .is_err()- );+ assert!(save(+ &config,+ "thread",+ "file",+ "text/plain",+ b"data",+ &AttachmentAccessScope::default()+ )+ .await+ .is_err());assert!(!temp.path().join(".ssh").exists());}@@ -230,15 +226,13 @@ async fn ready_media_artifact_in_files_folder_can_be_attached() {tokio::fs::write(&unrelated, b"not a filed media artifact").await.unwrap();- assert!(- resolve_path(- &config,- &unrelated.to_string_lossy(),- &AttachmentAccessScope::default(),- )- .await- .is_err()- );+ assert!(resolve_path(+ &config,+ &unrelated.to_string_lossy(),+ &AttachmentAccessScope::default(),+ )+ .await+ .is_err());}#[tokio::test]@@ -345,26 +339,22 @@ async fn hard_zero_and_count_gate_precede_reads() {let temp = tempfile::tempdir().unwrap();let mut config = config(temp.path());config.multimodal_files.max_files = 0;- assert!(- stage(- "[FILE:/missing]",- "thread",- &config,- &AttachmentAccessScope::default()- )- .await- .is_err()- );- assert!(- stage(- "[IMAGE:/missing]",- "thread",- &config,- &AttachmentAccessScope::default()- )- .await- .is_err()- );+ assert!(stage(+ "[FILE:/missing]",+ "thread",+ &config,+ &AttachmentAccessScope::default()+ )+ .await+ .is_err());+ assert!(stage(+ "[IMAGE:/missing]",+ "thread",+ &config,+ &AttachmentAccessScope::default()+ )+ .await+ .is_err());assert!(!config.action_dir.exists());assert!(!safe_relative_path("../escape"));assert!(!safe_relative_path("/absolute"));@@ -373,27 +363,23 @@ async fn hard_zero_and_count_gate_precede_reads() {#[tokio::test]async fn vision_without_explicit_references_fails_before_configuration_or_inference() {- assert!(- !has_resolvable_image(- &crate::core::runtime::DispatchCtx::ambient(),- "Describe a filename mentioned only in prose: picture.png",- None,- None- )- .await- .unwrap()- );- assert!(- delegation_prompt(- &crate::core::runtime::DispatchCtx::ambient(),- "task",- &serde_json::json!({ "image_paths": [42] }),- None,- None- )- .await- .is_err()- );+ assert!(!has_resolvable_image(+ &crate::core::runtime::DispatchCtx::ambient(),+ "Describe a filename mentioned only in prose: picture.png",+ None,+ None+ )+ .await+ .unwrap());+ assert!(delegation_prompt(+ &crate::core::runtime::DispatchCtx::ambient(),+ "task",+ &serde_json::json!({ "image_paths": [42] }),+ None,+ None+ )+ .await+ .is_err());}#[cfg(unix)]@@ -405,18 +391,16 @@ async fn upload_symlink_is_rejected_without_writing_outside() {let outside = temp.path().join("outside");tokio::fs::create_dir(&outside).await.unwrap();std::os::unix::fs::symlink(&outside, config.action_dir.join("uploads")).unwrap();- assert!(- save(- &config,- "thread",- "file",- "application/octet-stream",- b"original",- &AttachmentAccessScope::default()- )- .await- .is_err()- );+ assert!(save(+ &config,+ "thread",+ "file",+ "application/octet-stream",+ b"original",+ &AttachmentAccessScope::default()+ )+ .await+ .is_err());assert_eq!(std::fs::read_dir(outside).unwrap().count(), 0);}diff --git a/crates/openhuman-core/src/attachments/provider.rs b/crates/openhuman-core/src/attachments/provider.rsindex b1636f575d..fb92853b6f 100644--- a/crates/openhuman-core/src/attachments/provider.rs+++ b/crates/openhuman-core/src/attachments/provider.rs@@ -2,7 +2,7 @@use super::AttachmentAccessScope;use crate::config::Config;use async_trait::async_trait;-use base64::{Engine, engine::general_purpose::STANDARD};+use base64::{engine::general_purpose::STANDARD, Engine};use std::sync::Arc;use tinyinference_llm::{message::{ContentBlock, ImageRef, MediaRef, Message},diff --git a/crates/openhuman-core/src/attachments/provider_history_tests.rs b/crates/openhuman-core/src/attachments/provider_history_tests.rsindex 43ae285aea..90b38cc22c 100644--- a/crates/openhuman-core/src/attachments/provider_history_tests.rs+++ b/crates/openhuman-core/src/attachments/provider_history_tests.rs@@ -57,31 +57,23 @@ async fn missing_historical_media_does_not_block_latest_valid_media() {let captured = probe.requests.lock().unwrap().clone();assert_eq!(captured.len(), 1);let history = &captured[0].messages[0];- assert!(- history- .text()- .contains("Earlier attachment omitted by history budget")- );+ assert!(history+ .text()+ .contains("Earlier attachment omitted by history budget"));assert!(history.text().contains("Earlier attachment unavailable"));assert!(history.text().contains("deleted-prior-upload-0.png"));assert!(!serde_json::to_string(history).unwrap().contains("base64"));- assert!(- !serde_json::to_string(history)- .unwrap()- .contains("private-value")- );- assert!(- !serde_json::to_string(history)- .unwrap()- .contains("also-private")- );+ assert!(!serde_json::to_string(history)+ .unwrap()+ .contains("private-value"));+ assert!(!serde_json::to_string(history)+ .unwrap()+ .contains("also-private"));let durable_text = serde_json::to_string(&durable).unwrap();assert!(signed_urls.iter().all(|url| durable_text.contains(url)));- assert!(- serde_json::to_string(&captured[0].messages[1])- .unwrap()- .contains("data:image/png;base64,")- );+ assert!(serde_json::to_string(&captured[0].messages[1])+ .unwrap()+ .contains("data:image/png;base64,"));}#[cfg(unix)]diff --git a/crates/openhuman-core/src/attachments/provider_injected_tests.rs b/crates/openhuman-core/src/attachments/provider_injected_tests.rsindex 6a4086b5e7..dc0b1e0a48 100644--- a/crates/openhuman-core/src/attachments/provider_injected_tests.rs+++ b/crates/openhuman-core/src/attachments/provider_injected_tests.rs@@ -1,5 +1,5 @@-use super::*;use super::tests::Probe;+use super::*;use std::sync::Mutex;#[tokio::test]@@ -33,11 +33,9 @@ async fn injected_turn_source_uses_bound_workspace_and_explicit_model_facts() {assert!(models.primary.invoke(&(), request).await.is_err());let captured = probe.requests.lock().unwrap().clone();assert_eq!(captured.len(), 1);- assert!(- serde_json::to_string(&captured[0])- .unwrap()- .contains("data:image/png;base64,")- );+ assert!(serde_json::to_string(&captured[0])+ .unwrap()+ .contains("data:image/png;base64,"));}#[tokio::test]@@ -96,11 +94,9 @@ async fn configured_injected_builder_stages_and_resolves_in_explicit_acting_workassert!(models.primary.invoke(&(), request).await.is_err());let captured = probe.requests.lock().unwrap().clone();assert_eq!(captured.len(), 1);- assert!(- serde_json::to_string(&captured[0])- .unwrap()- .contains("data:image/png;base64,")- );+ assert!(serde_json::to_string(&captured[0])+ .unwrap()+ .contains("data:image/png;base64,"));}#[test]diff --git a/crates/openhuman-core/src/attachments/provider_routing_tests.rs b/crates/openhuman-core/src/attachments/provider_routing_tests.rsindex d9cbf53330..3cbc38d4fa 100644--- a/crates/openhuman-core/src/attachments/provider_routing_tests.rs+++ b/crates/openhuman-core/src/attachments/provider_routing_tests.rs@@ -285,19 +285,16 @@ async fn paid_vision_readout_is_reused_across_recreated_wrappers_and_invalidatedlet calls = main.requests.lock().unwrap().clone();assert_eq!(calls.len(), 3);for (_, call) in &calls {- assert!(- call.messages[0]- .text()- .contains("Image readout:\nmock vision readout")- );+ assert!(call.messages[0]+ .text()+ .contains("Image readout:\nmock vision readout"));let Message::User(user) = &call.messages[0] else {panic!("expected main user message")};- assert!(- user.content- .iter()- .all(|block| matches!(block, ContentBlock::Text(_)))- );+ assert!(user+ .content+ .iter()+ .all(|block| matches!(block, ContentBlock::Text(_))));}assert!(matches!(&request.messages[0], Message::User(user) if matches!(&user.content[0], ContentBlock::Image(image) if image.url == "uploads/thread/image/original.jpg"))@@ -339,15 +336,13 @@ async fn streaming_prepares_only_the_ephemeral_request_and_preserves_order_and_orequest.temperature = Some(0.37);request.max_tokens = Some(128);let durable = serde_json::to_value(&request).unwrap();- assert!(- model- .stream(&(), request.clone())- .await- .unwrap()- .collect::<Vec<_>>()- .await- .is_empty()- );+ assert!(model+ .stream(&(), request.clone())+ .await+ .unwrap()+ .collect::<Vec<_>>()+ .await+ .is_empty());assert_eq!(serde_json::to_value(&request).unwrap(), durable);let captured = transport.requests.lock().unwrap().clone();assert_eq!(captured.len(), 1);@@ -479,10 +474,8 @@ async fn unsupported_media_urls_and_oversized_inline_sources_fail_before_inferenmedia_type: "application/octet-stream".into(),})]);let error = model.prepare(oversized).await.unwrap_err();- assert!(- error- .to_string()- .contains("inline media exceeds size limit")- );+ assert!(error+ .to_string()+ .contains("inline media exceeds size limit"));assert!(transport.requests.lock().unwrap().is_empty());}diff --git a/crates/openhuman-core/src/attachments/provider_source.rs b/crates/openhuman-core/src/attachments/provider_source.rsindex 588a4209ef..8445ba7508 100644--- a/crates/openhuman-core/src/attachments/provider_source.rs+++ b/crates/openhuman-core/src/attachments/provider_source.rs@@ -1,10 +1,10 @@//! Resolve every admitted media source on a disposable provider request.-use super::super::{SOURCE_MISSING_MARKER, is_missing_local_reference};+use super::super::{is_missing_local_reference, SOURCE_MISSING_MARKER};use super::AttachmentAccessScope;use super::*;use sha2::{Digest, Sha256};use tinyagents_harness::multimodal::{- UnknownMimePolicy, config::FileLimits, resolve::resolve_attachment,+ config::FileLimits, resolve::resolve_attachment, UnknownMimePolicy,};impl AttachmentModel {diff --git a/crates/openhuman-core/src/attachments/provider_tests.rs b/crates/openhuman-core/src/attachments/provider_tests.rsindex c4dce5da75..6f0857feeb 100644--- a/crates/openhuman-core/src/attachments/provider_tests.rs+++ b/crates/openhuman-core/src/attachments/provider_tests.rs@@ -51,18 +51,14 @@ async fn local_native_resolution_changes_only_ephemeral_request() {)]);let durable = request.clone();assert!(wrapper.invoke(&(), request).await.is_err());- assert!(- serde_json::to_string(&durable)- .unwrap()- .contains("sample.png")- );+ assert!(serde_json::to_string(&durable)+ .unwrap()+ .contains("sample.png"));let captured = probe.requests.lock().unwrap().clone();assert_eq!(captured.len(), 1);- assert!(- serde_json::to_string(&captured[0])- .unwrap()- .contains("data:image/png;base64,")- );+ assert!(serde_json::to_string(&captured[0])+ .unwrap()+ .contains("data:image/png;base64,"));assert_eq!(tokio::fs::read(temp.path().join("sample.png")).await@@ -134,11 +130,9 @@ async fn persisted_image_without_mime_uses_magic_over_extension() {assert!(wrapper.invoke(&(), request).await.is_err());let captured = probe.requests.lock().unwrap().clone();assert_eq!(captured.len(), 1);- assert!(- serde_json::to_string(&captured[0])- .unwrap()- .contains("data:image/jpeg;base64,")- );+ assert!(serde_json::to_string(&captured[0])+ .unwrap()+ .contains("data:image/jpeg;base64,"));}#[tokio::test]@@ -232,11 +226,9 @@ async fn unknown_video_retains_path_as_metadata_without_specialist() {let text = captured[0].messages[0].text();assert!(text.contains("clip.mp4"));assert!(text.contains("14 bytes"));- assert!(- !serde_json::to_string(&captured[0])- .unwrap()- .contains("base64")- );+ assert!(!serde_json::to_string(&captured[0])+ .unwrap()+ .contains("base64"));}#[tokio::test]@@ -277,22 +269,18 @@ async fn derivative_cache_survives_model_recreation_and_invalidates_changed_contSome("derived readout"));let changed = first.fallback_key("uploads/thread/id/original.txt", "text/plain", b"modified");- assert!(- resumed- .cached_fallback("uploads/thread/id/original.txt", &changed, &scope)- .await- .is_none()- );+ assert!(resumed+ .cached_fallback("uploads/thread/id/original.txt", &changed, &scope)+ .await+ .is_none());assert_eq!(tokio::fs::read(original).await.unwrap(), b"original");- assert!(- tokio::fs::read_dir(temp.path().join("uploads/thread/id"))- .await- .unwrap()- .next_entry()- .await- .unwrap()- .is_some()- );+ assert!(tokio::fs::read_dir(temp.path().join("uploads/thread/id"))+ .await+ .unwrap()+ .next_entry()+ .await+ .unwrap()+ .is_some());}#[tokio::test]@@ -324,7 +312,7 @@ async fn cache_is_not_written_beside_unmanaged_local_files() {#[test]fn endpoint_discovery_denial_overrides_offline_vision_facts() {use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};- use tinyinference_llm::model::discover::{LimitSource, ModelLimits, model_limits_cache};+ use tinyinference_llm::model::discover::{model_limits_cache, LimitSource, ModelLimits};let temp = tempfile::tempdir().unwrap();let mut config = Config::default();config.config_path = temp.path().join("config.toml");@@ -420,11 +408,9 @@ async fn disabled_remote_replay_is_rejected_before_inference() {},)]);let error = wrapper.invoke(&(), request).await.unwrap_err();- assert!(- error- .to_string()- .contains("remote attachment fetch is disabled")- );+ assert!(error+ .to_string()+ .contains("remote attachment fetch is disabled"));}assert!(probe.requests.lock().unwrap().is_empty());}@@ -577,16 +563,12 @@ async fn unknown_model_legacy_inline_replay_uses_specialist_once_across_model_reassert!(wrapper.invoke(&(), request.clone()).await.is_err());let captured = main.requests.lock().unwrap().clone();assert_eq!(captured.len(), 1);- assert!(- captured[0].messages[0]- .text()- .contains("specialist image readout")- );- assert!(- !serde_json::to_string(&captured[0])- .unwrap()- .contains("base64")- );+ assert!(captured[0].messages[0]+ .text()+ .contains("specialist image readout"));+ assert!(!serde_json::to_string(&captured[0])+ .unwrap()+ .contains("base64"));}assert_eq!(specialist.calls.load(std::sync::atomic::Ordering::SeqCst),@@ -621,9 +603,7 @@ async fn legacy_audio_base64_unsupported_transport_becomes_workspace_reference()let text = captured[0].messages[0].text();assert!(text.contains("audio/wav"));assert!(text.contains("workspace path: uploads/legacy-media/"));- assert!(- !serde_json::to_string(&captured[0])- .unwrap()- .contains("base64")- );+ assert!(!serde_json::to_string(&captured[0])+ .unwrap()+ .contains("base64"));}diff --git a/crates/openhuman-core/src/backend/mod.rs b/crates/openhuman-core/src/backend/mod.rsindex 68feecfebf..94f502c3de 100644--- a/crates/openhuman-core/src/backend/mod.rs+++ b/crates/openhuman-core/src/backend/mod.rs@@ -23,8 +23,8 @@pub mod classify;pub mod client;-pub mod transport;pub(crate) mod telemetry;+pub mod transport;pub use client::{flatten_authed_error, BackendApiError, BackendClient};pub use transport::{diff --git a/crates/openhuman-core/src/channels/mod.rs b/crates/openhuman-core/src/channels/mod.rsindex cf52226576..fed358769b 100644--- a/crates/openhuman-core/src/channels/mod.rs+++ b/crates/openhuman-core/src/channels/mod.rs@@ -26,9 +26,9 @@ pub mod controllers;pub mod host;#[cfg(feature = "channels")]pub mod proactive;+pub(crate) mod prompt;#[cfg(feature = "channels")]pub mod providers;-pub(crate) mod prompt;#[cfg(feature = "channels")]mod routes;#[cfg(feature = "channels")]@@ -109,6 +109,8 @@ pub use yuanbao::YuanbaoChannel;#[cfg(all(feature = "channels", any(test, debug_assertions)))]pub use runtime::test_support;+#[cfg(feature = "channels")]+pub use commands::doctor_channels;#[cfg(feature = "channels")]// Channel system-prompt assembly lives in// `crate::channels::prompt` alongside the rest of@@ -117,8 +119,6 @@ pub use runtime::test_support;#[cfg(feature = "channels")]pub use prompt::build_system_prompt;#[cfg(feature = "channels")]-pub use commands::doctor_channels;-#[cfg(feature = "channels")]pub use runtime::start_channels;#[cfg(feature = "channels")]pub(crate) use runtime::{session, start_channels_with_session};diff --git a/crates/openhuman-core/src/channels/prompt_tests.rs b/crates/openhuman-core/src/channels/prompt_tests.rsindex f263e5b15f..b637d394ab 100644--- a/crates/openhuman-core/src/channels/prompt_tests.rs+++ b/crates/openhuman-core/src/channels/prompt_tests.rs@@ -103,16 +103,14 @@ fn build_system_prompt_uses_workspace_skill_location_fallback() {);assert!(prompt.contains("<name>research-helper</name>"));- assert!(- prompt.contains(- &tmp.path()- .join("skills")- .join("research-helper")- .join("SKILL.md")- .display()- .to_string()- )- );+ assert!(prompt.contains(+ &tmp.path()+ .join("skills")+ .join("research-helper")+ .join("SKILL.md")+ .display()+ .to_string()+ ));assert!(prompt.contains("running as a Telegram bot"));}diff --git a/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs b/crates/openhuman-core/src/channels/providers/relay/ops_tests.rsindex 8a12bc0132..87a03126e0 100644--- a/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs+++ b/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs@@ -1,8 +1,8 @@use super::super::channel::CHANNEL_OUTBOUND_EVENT;use super::*;use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};-use crate::security::turn_origin::AgentTurnOrigin;use crate::core::runtime::{ContextOverlay, CoreContext, DomainSet};+use crate::security::turn_origin::AgentTurnOrigin;use std::sync::Mutex;#[tokio::test]diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture.rsindex b4acc7a5e4..a8c57a764f 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture.rs@@ -11,9 +11,9 @@use tinytools::{PermissionLevel, Tool};-use crate::security::turn_origin::AgentTurnOrigin;use crate::agent::HostTools;use crate::config::Config;+use crate::security::turn_origin::AgentTurnOrigin;/// The most a host agent may do on a turn from `origin`; `None` leaves the/// agent's own limits alone.diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/bus_turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/bus_turn.rsindex c1f3a22bb6..641e2608d4 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/bus_turn.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/bus_turn.rs@@ -2,10 +2,10 @@//! to the `agent.run_turn` handler, with the orchestrator's tool scoping.use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHOD};-use crate::progress::AgentProgress;-use crate::security::turn_origin::AgentTurnOrigin;use crate::channels::context::{ChannelRouteSelection, ChannelRuntimeContext};use crate::core::bus::BUS;+use crate::progress::AgentProgress;+use crate::security::turn_origin::AgentTurnOrigin;use std::sync::Arc;use tinyagents_session::transcript::TranscriptMessage;use tinybus::NativeRequestError;diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rsindex 47e2061ba3..09141deba8 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs@@ -3,7 +3,6 @@//! delivering the draft/final reply.use crate::agent::bus::AgentTurnResponse;-use crate::progress::AgentProgress;use crate::channels::context::{compact_sender_history, is_context_window_overflow_error, ChannelRuntimeContext,};@@ -13,6 +12,7 @@ use crate::channels::routes::{use crate::channels::{ChannelSendExt, SendMessage};use crate::core::bus::BUS;use crate::core::events::DomainEvent;+use crate::progress::AgentProgress;use crate::util::truncate_with_ellipsis;use std::sync::Arc;use std::time::{Duration, Instant};diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rsindex 518e490449..fe3044fa66 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs@@ -7,12 +7,12 @@//! * [`build_visible_tool_set`] — union of named tools + extra (delegation) tools.use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};-use crate::integrations::ConnectedIntegration;use crate::config::Config;use crate::integrations::composio::{cached_active_integrations, fetch_connected_integrations_status,FetchConnectedIntegrationsStatus,};+use crate::integrations::ConnectedIntegration;use crate::tools::orchestrator_tools;use std::collections::HashSet;use std::time::Duration;diff --git a/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs b/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rsindex d812f2f287..0266f0d716 100644--- a/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs@@ -8,12 +8,12 @@use super::chat_workload::{resolve_chat_workload, ChatWorkloadResolution};use super::prompt::format_access_context;-use crate::modules::tinybox::host_runtime;use crate::channels::context::ChannelRuntimeContext;use crate::channels::system_prompt::{ChannelPromptInputs, ChannelSystemPrompt};use crate::config::Config;use crate::core::runtime::DispatchCtx;use crate::inference::provider;+use crate::modules::tinybox::host_runtime;use crate::security::SecurityPolicy;use crate::tools;use anyhow::Result;diff --git a/crates/openhuman-core/src/channels/runtime/test_support.rs b/crates/openhuman-core/src/channels/runtime/test_support.rsindex 1e75ecf833..536d906ef8 100644--- a/crates/openhuman-core/src/channels/runtime/test_support.rs+++ b/crates/openhuman-core/src/channels/runtime/test_support.rs@@ -6,7 +6,6 @@ use super::dispatch::{};pub use super::startup::test_support::resolve_yuanbao_app_secret_for_test;use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHOD};-use crate::progress::AgentProgress;use crate::channels::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};use crate::channels::Channel;use crate::channels::ChannelSystemPrompt;@@ -14,6 +13,7 @@ use crate::config::{MultimodalConfig, MultimodalFileConfig, ReliabilityConfig};use crate::core::bus::BUS;use crate::core::events::DomainEvent;use crate::inference::provider::ProviderRuntimeOptions;+use crate::progress::AgentProgress;use anyhow::Result;use async_trait::async_trait;use std::collections::HashMap;diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/dictation_context.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/dictation_context.rsindex d309a9bd6f..a20260b7ab 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/dictation_context.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/dictation_context.rs@@ -1,7 +1,7 @@//! Env overrides for dictation and the context-management budget.-use crate::config::schema::Config;use crate::config::schema::load::env::EnvLookup;+use crate::config::schema::Config;impl Config {pub(super) fn apply_dictation_env<E: EnvLookup + ?Sized>(&mut self, env: &E) {diff --git a/crates/openhuman-core/src/core/agent_cli.rs b/crates/openhuman-core/src/core/agent_cli.rsindex 680168b24d..f0b7bff9b8 100644--- a/crates/openhuman-core/src/core/agent_cli.rs+++ b/crates/openhuman-core/src/core/agent_cli.rs@@ -20,13 +20,13 @@//! any built-in or workspace-custom agent id (e.g. `planner`,//! `critic`).-use anyhow::{Result, anyhow};+use anyhow::{anyhow, Result};use std::path::PathBuf;use crate::agent_registry::host_definition::AgentDefinitionRegistry;-use crate::core::agent_cli::debug::prompt_size::{PromptSizeReport, render_text};+use crate::core::agent_cli::debug::prompt_size::{render_text, PromptSizeReport};use crate::core::agent_cli::debug::{- DumpPromptOptions, DumpedPrompt, dump_agent_prompt, dump_all_agent_prompts, write_prompt_dumps,+ dump_agent_prompt, dump_all_agent_prompts, write_prompt_dumps, DumpPromptOptions, DumpedPrompt,};pub(crate) mod debug;diff --git a/crates/openhuman-core/src/core/agent_cli/debug/mod.rs b/crates/openhuman-core/src/core/agent_cli/debug/mod.rsindex ccf581dd39..a3f8185199 100644--- a/crates/openhuman-core/src/core/agent_cli/debug/mod.rs+++ b/crates/openhuman-core/src/core/agent_cli/debug/mod.rs@@ -14,7 +14,7 @@use std::path::PathBuf;-use anyhow::{Context, Result, anyhow};+use anyhow::{anyhow, Context, Result};pub mod dump_writer;pub mod prompt_size;diff --git a/crates/openhuman-core/src/core/agent_cli/debug/prompt_size.rs b/crates/openhuman-core/src/core/agent_cli/debug/prompt_size.rsindex 833db0d5a2..7637257f37 100644--- a/crates/openhuman-core/src/core/agent_cli/debug/prompt_size.rs+++ b/crates/openhuman-core/src/core/agent_cli/debug/prompt_size.rs@@ -30,7 +30,7 @@use anyhow::Result;-use super::{DumpPromptOptions, DumpedPrompt, dump_agent_prompt};+use super::{dump_agent_prompt, DumpPromptOptions, DumpedPrompt};/// Rough bytes-per-token for English prose and JSON on a BPE tokenizer.///diff --git a/crates/openhuman-core/src/core/all.rs b/crates/openhuman-core/src/core/all.rsindex 3c42833e0b..a29ba9d875 100644--- a/crates/openhuman-core/src/core/all.rs+++ b/crates/openhuman-core/src/core/all.rs@@ -12,8 +12,8 @@ use std::{use serde_json::{Map, Value};-use crate::core::ControllerSchema;use crate::core::runtime::DispatchCtx;+use crate::core::ControllerSchema;/// A pinned, boxed future returned by a controller handler.pub type ControllerFuture = Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'static>>;diff --git a/crates/openhuman-core/src/core/all_dispatch_ctx_tests.rs b/crates/openhuman-core/src/core/all_dispatch_ctx_tests.rsindex 981bc9cb19..16c958cdcb 100644--- a/crates/openhuman-core/src/core/all_dispatch_ctx_tests.rs+++ b/crates/openhuman-core/src/core/all_dispatch_ctx_tests.rs@@ -1,6 +1,6 @@//! The dispatch context reaches the handler as an argument, per call.-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};use super::*;use crate::core::runtime::{CoreContext, DispatchCtx, DomainSet};diff --git a/crates/openhuman-core/src/core/all_extensions_tests.rs b/crates/openhuman-core/src/core/all_extensions_tests.rsindex 7626dfc05b..b77961284f 100644--- a/crates/openhuman-core/src/core/all_extensions_tests.rs+++ b/crates/openhuman-core/src/core/all_extensions_tests.rs@@ -31,11 +31,9 @@ async fn registry_extension_is_visible_to_every_lookup_and_dispatches() {Some("openhuman.ext_probe_ping"));assert!(schema_for_rpc_method("openhuman.ext_probe_ping").is_some());- assert!(- all_controller_schemas()- .iter()- .any(|s| s.namespace == "ext_probe" && s.function == "ping")- );+ assert!(all_controller_schemas()+ .iter()+ .any(|s| s.namespace == "ext_probe" && s.function == "ping"));assert_eq!(namespace_description("ext_probe"),Some("Registry extension probe.")diff --git a/crates/openhuman-core/src/core/all_invoke.rs b/crates/openhuman-core/src/core/all_invoke.rsindex 53ebd1815e..e4ac7f3f12 100644--- a/crates/openhuman-core/src/core/all_invoke.rs+++ b/crates/openhuman-core/src/core/all_invoke.rs@@ -5,7 +5,7 @@ use std::pin::Pin;use serde_json::{Map, Value};-use super::{ControllerFuture, internal_registry, registry_view, visible};+use super::{internal_registry, registry_view, visible, ControllerFuture};use crate::core::runtime::{CoreContext, DispatchCtx};type Dispatched = Pin<Box<dyn Future<Output = Option<Result<Value, String>>> + Send + 'static>>;diff --git a/crates/openhuman-core/src/core/all_tests.rs b/crates/openhuman-core/src/core/all_tests.rsindex b5c819e546..4d2de52e23 100644--- a/crates/openhuman-core/src/core/all_tests.rs+++ b/crates/openhuman-core/src/core/all_tests.rs@@ -856,8 +856,8 @@ fn every_registered_controller_has_matching_declared_schema() {// --- DomainSet registration filter (#4796) -------------------------------use crate::core::runtime::DomainSet;use crate::core::runtime::context::CoreContext;+use crate::core::runtime::DomainSet;/// The [`DomainGroup`] a registered controller (agent-facing OR internal) is/// tagged with, looked up by its namespace. Test-only helper over the privatediff --git a/crates/openhuman-core/src/core/observability.rs b/crates/openhuman-core/src/core/observability.rsindex 63ae930992..d18c538a63 100644--- a/crates/openhuman-core/src/core/observability.rs+++ b/crates/openhuman-core/src/core/observability.rs@@ -33,8 +33,8 @@ use release_tag::{parse_release_tag, parse_version};mod availability;use availability::log_module_unavailable;pub use availability::{- API_KEY_REJECTED_PREFIX, BACKEND_UNAVAILABLE_PREFIX, is_api_key_rejected_message,- is_backend_unavailable_message, is_module_unavailable_message,+ is_api_key_rejected_message, is_backend_unavailable_message, is_module_unavailable_message,+ API_KEY_REJECTED_PREFIX, BACKEND_UNAVAILABLE_PREFIX,};/// A `(key, value)` pair attached as a Sentry tag. Tags are short, indexed,diff --git a/crates/openhuman-core/src/core/observability/progress_tracing/export.rs b/crates/openhuman-core/src/core/observability/progress_tracing/export.rsindex cb8618f4f3..08de1d9924 100644--- a/crates/openhuman-core/src/core/observability/progress_tracing/export.rs+++ b/crates/openhuman-core/src/core/observability/progress_tracing/export.rs@@ -1,13 +1,13 @@//! Handing finished spans to their sink(s): the local NDJSON/log exporter and//! the remote Langfuse usage-data push.-use crate::config::Config;use crate::config::schema::AgentTracingConfig;+use crate::config::Config;use super::langfuse;use super::otlp;use crate::config::schema::AgentTracingBackend;-use tinyagents_harness::observability::trace_export::serialize::{SpanEnvelope, spans_to_ndjson};+use tinyagents_harness::observability::trace_export::serialize::{spans_to_ndjson, SpanEnvelope};use tinyagents_harness::observability::trace_export::{RunType, TraceContext, TraceSpan};/// Map the configured backend onto the upstream NDJSON envelope.diff --git a/crates/openhuman-core/src/core/runtime/bootstrap.rs b/crates/openhuman-core/src/core/runtime/bootstrap.rsindex 2ed2b86b62..fac595ebd8 100644--- a/crates/openhuman-core/src/core/runtime/bootstrap.rs+++ b/crates/openhuman-core/src/core/runtime/bootstrap.rs@@ -21,7 +21,7 @@ pub(crate) async fn bootstrap_core_runtime(domains: crate::core::runtime::DomainSet,ctx: &DispatchCtx,) {- use crate::platform::socket::{SocketManager, set_global_socket_manager};+ use crate::platform::socket::{set_global_socket_manager, SocketManager};use std::sync::Arc;// `embedded_core` derived from host_kind so the rest of the function (which// already keys behavior off the boolean) stays unchanged.diff --git a/crates/openhuman-core/src/core/runtime/context_turn_origin_tests.rs b/crates/openhuman-core/src/core/runtime/context_turn_origin_tests.rsindex 4a59562122..83baedb714 100644--- a/crates/openhuman-core/src/core/runtime/context_turn_origin_tests.rs+++ b/crates/openhuman-core/src/core/runtime/context_turn_origin_tests.rs@@ -138,8 +138,8 @@ async fn bound_external_authority_wins_over_legacy_trusted_automation() {#[tokio::test]async fn concurrent_channel_turns_keep_tenant_agent_thread_and_policy_isolated() {- use crate::security::turn_origin::{self, AgentTurnOrigin};use crate::core::runtime::{ContextOverlay, DomainSet};+ use crate::security::turn_origin::{self, AgentTurnOrigin};let barrier = Arc::new(tokio::sync::Barrier::new(2));let run = |label: &'static str, barrier: Arc<tokio::sync::Barrier>| async move {diff --git a/crates/openhuman-core/src/cron/scheduler/origin_delivery.rs b/crates/openhuman-core/src/cron/scheduler/origin_delivery.rsindex 580bf4bccb..cb6d484adf 100644--- a/crates/openhuman-core/src/cron/scheduler/origin_delivery.rs+++ b/crates/openhuman-core/src/cron/scheduler/origin_delivery.rs@@ -14,8 +14,8 @@use super::delivery::strip_openhuman_link_markup;use crate::config::Config;use crate::core::runtime::DispatchCtx;-use crate::web_chat::{WebChannelEvent, publish_web_channel_event};-use anyhow::{Result, anyhow};+use crate::web_chat::{publish_web_channel_event, WebChannelEvent};+use anyhow::{anyhow, Result};use std::path::Path;use {crate::cron::channel_bridge, tinyflows_schedule::types::CronJob,@@ -72,8 +72,8 @@ pub(crate) async fn append_to_origin_transcript(append: &TranscriptAppend<'_>,) -> Result<(), String> {use tinyagents_session::transcript::{- BackgroundAppend, BackgroundAppendOutcome, SessionRef, TranscriptMessage,- append_background_message_in,+ append_background_message_in, BackgroundAppend, BackgroundAppendOutcome, SessionRef,+ TranscriptMessage,};let session = SessionRef::scoped(append.thread_id.to_string(), append.agent_id.to_string());let options = BackgroundAppend::new(diff --git a/crates/openhuman-core/src/cron/scheduler/origin_delivery_tests.rs b/crates/openhuman-core/src/cron/scheduler/origin_delivery_tests.rsindex c71188808a..f7134b2a57 100644--- a/crates/openhuman-core/src/cron/scheduler/origin_delivery_tests.rs+++ b/crates/openhuman-core/src/cron/scheduler/origin_delivery_tests.rs@@ -99,15 +99,13 @@ async fn no_reply_is_suppressed_without_writing_anything() {.await.unwrap();assert_eq!(status, DeliveryStatus::Suppressed);- assert!(- conversations::get_messages(- &crate::core::runtime::DispatchCtx::ambient(),- cfg.workspace_dir.clone(),- "t-1"- )- .unwrap()- .is_empty()- );+ assert!(conversations::get_messages(+ &crate::core::runtime::DispatchCtx::ambient(),+ cfg.workspace_dir.clone(),+ "t-1"+ )+ .unwrap()+ .is_empty());}#[tokio::test]@@ -184,17 +182,15 @@ async fn web_delivery_to_a_missing_thread_fails() {async fn origin_mode_without_an_origin_is_an_error() {let tmp = tempfile::TempDir::new().unwrap();let cfg = config(&tmp);- assert!(- deliver_to_origin(- &crate::core::runtime::DispatchCtx::ambient(),- &cfg,- &job(None),- "run-1",- "hi"- )- .await- .is_err()- );+ assert!(deliver_to_origin(+ &crate::core::runtime::DispatchCtx::ambient(),+ &cfg,+ &job(None),+ "run-1",+ "hi"+ )+ .await+ .is_err());}fn meta() -> TranscriptMeta {diff --git a/crates/openhuman-core/src/cron/scheduler_dispatch_tests.rs b/crates/openhuman-core/src/cron/scheduler_dispatch_tests.rsindex c4f38cfb23..3d8305ac12 100644--- a/crates/openhuman-core/src/cron/scheduler_dispatch_tests.rs+++ b/crates/openhuman-core/src/cron/scheduler_dispatch_tests.rs@@ -3,13 +3,13 @@//! are honoured and a system job's handler result is what gets recorded.use super::*;-use crate::cron::system_job_handlers::{SystemJobContext, register};+use crate::cron::system_job_handlers::{register, SystemJobContext};use crate::cron::system_jobs::ensure_system_job;use std::sync::atomic::{AtomicUsize, Ordering};use std::time::Duration;use tempfile::TempDir;-use tinyflows_schedule::JobPolicy;use tinyflows_schedule::types::Schedule;+use tinyflows_schedule::JobPolicy;/// Stores `policy` on the job.fn set_policy(config: &Config, job_id: &str, policy: JobPolicy) -> anyhow::Result<()> {@@ -182,12 +182,10 @@ async fn dispatch_claims_the_slot_so_a_running_job_is_not_due_again() {dispatcher.dispatch(vec![job.clone()]).await.unwrap();let stored = cron::get_job(&config, &job.id).unwrap();assert!(stored.next_run > Utc::now(), "the running slot is claimed");- assert!(- cron::due_jobs(&config, Utc::now())- .unwrap()- .iter()- .all(|due| due.id != job.id)- );+ assert!(cron::due_jobs(&config, Utc::now())+ .unwrap()+ .iter()+ .all(|due| due.id != job.id));release.notify_one();dispatcher.drain().await;}@@ -344,12 +342,10 @@ async fn a_system_job_handler_error_is_recorded_as_the_run_result() {dispatcher.drain().await;let stored = cron::get_job(&config, &job.id).unwrap();assert_eq!(stored.last_status.as_deref(), Some("error"));- assert!(- stored- .last_output- .unwrap_or_default()- .contains("handler failed")- );+ assert!(stored+ .last_output+ .unwrap_or_default()+ .contains("handler failed"));}#[tokio::test]@@ -467,12 +463,10 @@ async fn a_flow_schedule_job_fires_through_the_trigger_sink() {let stored = cron::get_job(&config, &job.id).unwrap();assert_eq!(stored.last_status.as_deref(), Some("ok"));- assert!(- stored- .last_output- .unwrap_or_default()- .contains("flow schedule tick emitted for flow flow-missing-for-sink")- );+ assert!(stored+ .last_output+ .unwrap_or_default()+ .contains("flow schedule tick emitted for flow flow-missing-for-sink"));assert!(stored.next_run > Utc::now(), "the recurrence moved on");}diff --git a/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs b/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rsindex 1929776220..b1b42c897b 100644--- a/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs+++ b/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs@@ -253,7 +253,8 @@ fn is_local_provider_unreachable_failure_matches_raw_no_models_loaded_body() {#[test]fn is_local_provider_unreachable_failure_checks_output_when_raw_is_generic() {- let output = "Your local inference server (e.g. LM Studio) is running but has no model loaded. \+ let output =+ "Your local inference server (e.g. LM Studio) is running but has no model loaded. \Load a model, then try again.";assert!(is_local_provider_unreachable_failure(@@ -440,13 +441,11 @@ async fn scheduler_flow_runs_active_hours_job_and_reschedules_inside_window() {let stored = cron::get_job(&config, &job.id).unwrap();assert_eq!(stored.last_status.as_deref(), Some("ok"));- assert!(- stored- .last_output- .as_deref()- .unwrap_or_default()- .contains("active-hours-fired")- );+ assert!(stored+ .last_output+ .as_deref()+ .unwrap_or_default()+ .contains("active-hours-fired"));assert_eq!(stored.schedule,Schedule::Cron {@@ -553,17 +552,15 @@ async fn deliver_if_configured_skips_non_announce_mode() {let job = test_job("echo ok");// Default delivery mode is not "announce", so nothing is published.- assert!(- deliver_if_configured(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &job,- "x",- true- )- .await- .is_ok()- );+ assert!(deliver_if_configured(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &job,+ "x",+ true+ )+ .await+ .is_ok());}#[tokio::test]@@ -620,17 +617,15 @@ async fn deliver_if_configured_publishes_event_for_announce_mode() {assert_eq!(received.load(Ordering::SeqCst), 1);// Also verify the function itself succeeds.- assert!(- deliver_if_configured(- &crate::core::runtime::DispatchCtx::ambient(),- &config,- &job,- "hello",- true- )- .await- .is_ok()- );+ assert!(deliver_if_configured(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &job,+ "hello",+ true+ )+ .await+ .is_ok());}#[test]diff --git a/crates/openhuman-core/src/cron/store_tests.rs b/crates/openhuman-core/src/cron/store_tests.rsindex 6ca731f81b..737ad8c18d 100644--- a/crates/openhuman-core/src/cron/store_tests.rs+++ b/crates/openhuman-core/src/cron/store_tests.rs@@ -147,11 +147,9 @@ fn a_legacy_jobs_db_is_imported_by_the_storage_importer_and_left_untouched() {let jobs = list_jobs(&config).unwrap();assert_eq!(jobs.len(), 3);assert!(jobs.iter().any(|job| job.name.as_deref() == Some("inbox")));- assert!(- find_flow_schedule_job(&config, "flow-beta")- .unwrap()- .is_some()- );+ assert!(find_flow_schedule_job(&config, "flow-beta")+ .unwrap()+ .is_some());assert_eq!(std::fs::read(&legacy).unwrap(),before,diff --git a/crates/openhuman-core/src/desktop/notifications/rpc.rs b/crates/openhuman-core/src/desktop/notifications/rpc.rsindex 44e75b0852..56d14ecb16 100644--- a/crates/openhuman-core/src/desktop/notifications/rpc.rs+++ b/crates/openhuman-core/src/desktop/notifications/rpc.rs@@ -13,13 +13,13 @@ use chrono::Utc;use serde_json::{json, Map, Value};use uuid::Uuid;-use crate::triage::{- apply_decision, local_trigger_origin, run_triage, TriageOutcome, TriggerEnvelope, TriggerSource,-};-use crate::security::turn_origin::with_origin;use crate::core::bus::BUS;use crate::core::events::DomainEvent;use crate::core::Outcome;+use crate::security::turn_origin::with_origin;+use crate::triage::{+ apply_decision, local_trigger_origin, run_triage, TriageOutcome, TriggerEnvelope, TriggerSource,+};use super::store;use super::types::{diff --git a/crates/openhuman-core/src/desktop/notifications/store_documents.rs b/crates/openhuman-core/src/desktop/notifications/store_documents.rsindex d1636ca7c1..4804e014bf 100644--- a/crates/openhuman-core/src/desktop/notifications/store_documents.rs+++ b/crates/openhuman-core/src/desktop/notifications/store_documents.rs@@ -29,7 +29,7 @@ use std::sync::Arc;use anyhow::{Context, Result};use chrono::{DateTime, Duration, Utc};-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};use sha2::{Digest, Sha256};use tinystoragedrivers::{CollectionSpec, ErrorKind, Filter, IndexSpec, Precondition, Query, Sort, Versioned,@@ -40,7 +40,7 @@ use super::types::{NotificationStatus,};use crate::config::Config;-use crate::storage::documents::{CAS_ATTEMPTS, Repo, compare_and_swap, text};+use crate::storage::documents::{compare_and_swap, text, Repo, CAS_ATTEMPTS};use crate::storage::{DocumentStore, DocumentStoreExt, StorageError};pub(super) const NOTIFICATIONS: &str = "integration_notifications";diff --git a/crates/openhuman-core/src/desktop/notifications/store_import.rs b/crates/openhuman-core/src/desktop/notifications/store_import.rsindex 0d29715df1..14a8ee16b8 100644--- a/crates/openhuman-core/src/desktop/notifications/store_import.rs+++ b/crates/openhuman-core/src/desktop/notifications/store_import.rs@@ -23,9 +23,9 @@ use serde_json::json;mod store_rows;use store_rows::rows_to_notifications;-use super::store_documents::{CORE, LOCAL_WORKSPACE, NOTIFICATIONS, SETTINGS, core_id, to_doc};+use super::store_documents::{core_id, to_doc, CORE, LOCAL_WORKSPACE, NOTIFICATIONS, SETTINGS};use crate::config::Config;-use crate::storage::import::{ImportDoc, table_exists};+use crate::storage::import::{table_exists, ImportDoc};/// SQL schema of the legacy database, applied on every `with_connection` call.const SCHEMA: &str = "diff --git a/crates/openhuman-core/src/desktop/notifications/store_import_tests.rs b/crates/openhuman-core/src/desktop/notifications/store_import_tests.rsindex bb0bc7d1d7..ec62a87c8b 100644--- a/crates/openhuman-core/src/desktop/notifications/store_import_tests.rs+++ b/crates/openhuman-core/src/desktop/notifications/store_import_tests.rs@@ -3,7 +3,7 @@ use crate::desktop::notifications::store as live;use crate::desktop::notifications::types::{CoreNotificationCategory, CoreNotificationEvent, IntegrationNotification, NotificationStatus,};-use crate::storage::import::{Outcome, run_with};+use crate::storage::import::{run_with, Outcome};use chrono::{Duration, Utc};use tempfile::TempDir;diff --git a/crates/openhuman-core/src/flows/agents/flow_discovery/prompt.rs b/crates/openhuman-core/src/flows/agents/flow_discovery/prompt.rsindex afdea4fa89..4e6987be44 100644--- a/crates/openhuman-core/src/flows/agents/flow_discovery/prompt.rs+++ b/crates/openhuman-core/src/flows/agents/flow_discovery/prompt.rs@@ -8,7 +8,7 @@//! external effect); the "read, then suggest — never act" invariant lives in//! the archetype body instead.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/flows/agents/workflow_builder/prompt.rs b/crates/openhuman-core/src/flows/agents/workflow_builder/prompt.rsindex cfe05d6b96..9e4264fd06 100644--- a/crates/openhuman-core/src/flows/agents/workflow_builder/prompt.rs+++ b/crates/openhuman-core/src/flows/agents/workflow_builder/prompt.rs@@ -7,7 +7,7 @@//! real external effect (the "propose, never persist" invariant lives in the//! archetype body instead).-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/flows/memory_tools.rs b/crates/openhuman-core/src/flows/memory_tools.rsindex 6b0410efa5..c2073b06a4 100644--- a/crates/openhuman-core/src/flows/memory_tools.rs+++ b/crates/openhuman-core/src/flows/memory_tools.rs@@ -32,11 +32,11 @@ use tinymemory_api::{};use tinytools::{PermissionLevel, Tool, ToolResult};-use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};use crate::config::Config;use crate::memory::types::{LearnParams, RecallParams};use crate::memory::{MemoryError, MemoryResult};use crate::security::policy::ToolOperation;+use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};use crate::security::SecurityPolicy;/// Prefix of a flow's own tag (see [`flow_tag`]).diff --git a/crates/openhuman-core/src/flows/ops.rs b/crates/openhuman-core/src/flows/ops.rsindex fdb98bb26a..e56bae5358 100644--- a/crates/openhuman-core/src/flows/ops.rs+++ b/crates/openhuman-core/src/flows/ops.rs@@ -51,13 +51,13 @@ pub(crate) use tinyflows_catalog::graph_policy::{};use tokio_util::sync::CancellationToken;-use crate::security::turn_origin::{with_origin, AgentTurnOrigin, TrustedAutomationSource};use crate::config::Config;use crate::core::Outcome;use crate::flows::bus;use crate::flows::draft_store;use crate::flows::store;use crate::security::approval::{ApprovalChatContext, ApprovalTurnContext, FlowRunContext};+use crate::security::turn_origin::{with_origin, AgentTurnOrigin, TrustedAutomationSource};use tinyflows_catalog::build_registry;use tinyflows_catalog::run_registry;use tinyflows_catalog::types::{diff --git a/crates/openhuman-core/src/flows/ops/discovery.rs b/crates/openhuman-core/src/flows/ops/discovery.rsindex def709c99d..7dcd2628f5 100644--- a/crates/openhuman-core/src/flows/ops/discovery.rs+++ b/crates/openhuman-core/src/flows/ops/discovery.rs@@ -41,8 +41,8 @@ pub async fn flows_discover(config: &Config,stream: Option<FlowStreamTarget>,) -> Result<Outcome<Vec<FlowSuggestion>>, String> {- use crate::security::turn_origin::{with_origin, AgentTurnOrigin};use crate::agent::OpenHumanSessionHost;+ use crate::security::turn_origin::{with_origin, AgentTurnOrigin};tracing::info!(target: "flows",diff --git a/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs b/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rsindex 09df74d630..ceca1d61ff 100644--- a/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs+++ b/crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs@@ -38,9 +38,6 @@ use serde_json::{json, Value};use tinyflows::caps::MemoryProvider;use tinyflows::error::{EngineError, Result};-#[cfg(test)]-use crate::security::turn_origin;-use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};use crate::config::Config;use crate::flows::{cross_flow_filter, flow_filter, flow_key_of, flow_key_tag, forget_matching, remember_keyed,@@ -51,6 +48,9 @@ use crate::memory::MemoryError;use crate::security::approval::{redact_args, summarize_action, ApprovalGate, ExecutionOutcome, GateOutcome,};+#[cfg(test)]+use crate::security::turn_origin;+use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};use crate::security::SecurityPolicy;use tinybox_bus::CommandClass;use tinymemory_api::wrap_untrusted_for_agent;diff --git a/crates/openhuman-core/src/hooks/host.rs b/crates/openhuman-core/src/hooks/host.rsindex b7b2cf594a..b084f33b6a 100644--- a/crates/openhuman-core/src/hooks/host.rs+++ b/crates/openhuman-core/src/hooks/host.rs@@ -10,7 +10,7 @@ use crate::core::runtime::DispatchCtx;use std::sync::{Arc, LazyLock};use async_trait::async_trait;-use tinyagents_hooks::command::{HookConfig, HookEngine, HookEnvironment, PromptEvaluator, config};+use tinyagents_hooks::command::{config, HookConfig, HookEngine, HookEnvironment, PromptEvaluator};/// Product name handed to the engine: `ProgramData\OpenHuman`,/// `/Library/Application Support/OpenHuman`, `/etc/openhuman`, `.openhuman`,diff --git a/crates/openhuman-core/src/hooks/mod.rs b/crates/openhuman-core/src/hooks/mod.rsindex 4b5d7c5d7c..6762db2f98 100644--- a/crates/openhuman-core/src/hooks/mod.rs+++ b/crates/openhuman-core/src/hooks/mod.rs@@ -9,7 +9,7 @@ pub mod prompt_eval;pub mod schemas;mod shell;-pub use ops::{PromptVerdict, init};+pub use ops::{init, PromptVerdict};pub use schemas::{all_controller_schemas as all_hooks_controller_schemas,all_registered_controllers as all_hooks_registered_controllers,diff --git a/crates/openhuman-core/src/hooks/ops.rs b/crates/openhuman-core/src/hooks/ops.rsindex 2908974204..5b64108221 100644--- a/crates/openhuman-core/src/hooks/ops.rs+++ b/crates/openhuman-core/src/hooks/ops.rs@@ -12,7 +12,7 @@ use std::path::PathBuf;use std::time::Duration;use tinyagents_hooks::command::context::{- HostContext, TurnIdentity, build_input, set_host_context,+ build_input, set_host_context, HostContext, TurnIdentity,};use tinyagents_hooks::command::types::{CompactPayload, HookEvent, HookPayload, PromptPayload, SessionPayload, SubagentPayload,diff --git a/crates/openhuman-core/src/inference/context_window.rs b/crates/openhuman-core/src/inference/context_window.rsindex 7292db1d72..ca6b13850f 100644--- a/crates/openhuman-core/src/inference/context_window.rs+++ b/crates/openhuman-core/src/inference/context_window.rs@@ -30,7 +30,7 @@ use std::sync::{Mutex, OnceLock};use tinyinference_llm::model::context_window::{ContextWindowInput, ContextWindowResolver};use tinyinference_llm::model::context_window::{ResolvedWindow, WindowSource};use tinyinference_llm::model::discover::{- DiscoveryRequest, ModelLimitsCache, ModelListingFetcher, model_limits_cache,+ model_limits_cache, DiscoveryRequest, ModelLimitsCache, ModelListingFetcher,};use crate::config::Config;diff --git a/crates/openhuman-core/src/inference/context_window_tests.rs b/crates/openhuman-core/src/inference/context_window_tests.rsindex e6d9d2e092..37eb7fb88c 100644--- a/crates/openhuman-core/src/inference/context_window_tests.rs+++ b/crates/openhuman-core/src/inference/context_window_tests.rs@@ -1,12 +1,12 @@use super::*;use std::sync::Mutex as StdMutex;-use serde_json::{Value, json};+use serde_json::{json, Value};use tempfile::TempDir;use tinyinference_llm::model::discover::ModelLimitsCache;-use crate::config::schema::ModelRegistryEntry;use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};+use crate::config::schema::ModelRegistryEntry;use crate::security::credentials::AuthService;const OPENROUTER: &str = "https://openrouter.ai/api/v1";diff --git a/crates/openhuman-core/src/inference/embedding_host/cloud_adapter.rs b/crates/openhuman-core/src/inference/embedding_host/cloud_adapter.rsindex 983f874cbf..80c54fc87d 100644--- a/crates/openhuman-core/src/inference/embedding_host/cloud_adapter.rs+++ b/crates/openhuman-core/src/inference/embedding_host/cloud_adapter.rs@@ -4,12 +4,12 @@ use std::path::PathBuf;use std::sync::Arc;use tinyinference_embeddings::{- BearerResolver, CloudEmbeddingModel, DEFAULT_CLOUD_DIMENSIONS, DEFAULT_CLOUD_MODEL,- EmbeddingModel,+ BearerResolver, CloudEmbeddingModel, EmbeddingModel, DEFAULT_CLOUD_DIMENSIONS,+ DEFAULT_CLOUD_MODEL,};use crate::security::approval::ApprovalChatContext;-use crate::security::credentials::{APP_SESSION_PROVIDER, AuthService};+use crate::security::credentials::{AuthService, APP_SESSION_PROVIDER};pub const DEFAULT_CLOUD_EMBEDDING_MODEL: &str = DEFAULT_CLOUD_MODEL;pub const DEFAULT_CLOUD_EMBEDDING_DIMENSIONS: usize = DEFAULT_CLOUD_DIMENSIONS;diff --git a/crates/openhuman-core/src/inference/embedding_host/cloud_adapter_tests.rs b/crates/openhuman-core/src/inference/embedding_host/cloud_adapter_tests.rsindex 0a8d87d653..5ef5276437 100644--- a/crates/openhuman-core/src/inference/embedding_host/cloud_adapter_tests.rs+++ b/crates/openhuman-core/src/inference/embedding_host/cloud_adapter_tests.rs@@ -102,7 +102,7 @@ fn env_workspace_scope_is_the_config_dir_not_the_raw_workspace() {/// session), sent as `Authorization: Bearer <key>` like managed inference.#[tokio::test]async fn api_key_alone_authenticates_cloud_embeddings() {- use axum::{Json, Router, http::HeaderMap, routing::post};+ use axum::{http::HeaderMap, routing::post, Json, Router};use std::sync::{Arc, Mutex};let seen: Arc<Mutex<Option<String>>> = Arc::default();diff --git a/crates/openhuman-core/src/inference/embedding_host/factory.rs b/crates/openhuman-core/src/inference/embedding_host/factory.rsindex bf8530bbfd..2901e0bc97 100644--- a/crates/openhuman-core/src/inference/embedding_host/factory.rs+++ b/crates/openhuman-core/src/inference/embedding_host/factory.rs@@ -3,11 +3,11 @@use std::sync::Arc;use crate::config::Config;-use tinyinference_embeddings::EmbeddingModel;use tinyinference_embeddings::factory::{- CredentialResolver, EmbeddingFactorySettings, ManagedModelFactory,- create_configured_embedding_model, create_default_embedding_model,+ create_configured_embedding_model, create_default_embedding_model, CredentialResolver,+ EmbeddingFactorySettings, ManagedModelFactory,};+use tinyinference_embeddings::EmbeddingModel;use super::cloud::OpenHumanCloudEmbeddingModel;use crate::security::approval::ApprovalChatContext;diff --git a/crates/openhuman-core/src/inference/embedding_host/factory_tests.rs b/crates/openhuman-core/src/inference/embedding_host/factory_tests.rsindex e3e0a31f84..a9cad508ff 100644--- a/crates/openhuman-core/src/inference/embedding_host/factory_tests.rs+++ b/crates/openhuman-core/src/inference/embedding_host/factory_tests.rs@@ -2,7 +2,7 @@ use super::*;use crate::inference::embedding_host::{DEFAULT_CLOUD_EMBEDDING_DIMENSIONS, DEFAULT_CLOUD_EMBEDDING_MODEL,};-use crate::security::credentials::{APP_SESSION_PROVIDER, AuthService};+use crate::security::credentials::{AuthService, APP_SESSION_PROVIDER};use std::collections::HashMap;use tempfile::TempDir;use tinyinference_embeddings::factory::validate_custom_endpoint;@@ -155,7 +155,7 @@ fn config_aware_factory_ollama_honours_config_base_url() {async fn config_aware_factory_ollama_embeds_against_config_base_url() {use std::sync::{Arc, Mutex};- use axum::{Json, Router, extract::State, routing::post};+ use axum::{extract::State, routing::post, Json, Router};// Mock Ollama `/api/embed`: records that it was hit and echoes a// 3-dimensional vector (matching the requested `dims`).@@ -248,7 +248,7 @@ fn custom_endpoint_validation_rejects_blank_and_credentialed_remote_http() {async fn default_embedder_honors_configured_local_provider() {use std::sync::{Arc, Mutex};- use axum::{Json, Router, extract::State, routing::post};+ use axum::{extract::State, routing::post, Json, Router};#[derive(Clone, Default)]struct Hit {@@ -301,7 +301,7 @@ async fn default_embedder_honors_configured_local_provider() {async fn factory_managed_provider_authenticates_with_config_scoped_token() {use std::sync::{Arc, Mutex};- use axum::{Json, Router, extract::State, http::HeaderMap, routing::post};+ use axum::{extract::State, http::HeaderMap, routing::post, Json, Router};// Mock cloud embeddings backend at {BACKEND_URL}/openai/v1/embeddings.#[derive(Clone, Default)]@@ -384,7 +384,7 @@ async fn factory_managed_provider_authenticates_with_config_scoped_token() {async fn default_provider_with_config_authenticates_with_config_scoped_token() {use std::sync::{Arc, Mutex};- use axum::{Json, Router, extract::State, http::HeaderMap, routing::post};+ use axum::{extract::State, http::HeaderMap, routing::post, Json, Router};#[derive(Clone, Default)]struct Captured {diff --git a/crates/openhuman-core/src/inference/embedding_host/mod.rs b/crates/openhuman-core/src/inference/embedding_host/mod.rsindex f0263d200d..0c58c171bc 100644--- a/crates/openhuman-core/src/inference/embedding_host/mod.rs+++ b/crates/openhuman-core/src/inference/embedding_host/mod.rs@@ -20,7 +20,7 @@ mod rpc;mod schemas;pub use cloud::{- DEFAULT_CLOUD_EMBEDDING_DIMENSIONS, DEFAULT_CLOUD_EMBEDDING_MODEL, OpenHumanCloudEmbeddingModel,+ OpenHumanCloudEmbeddingModel, DEFAULT_CLOUD_EMBEDDING_DIMENSIONS, DEFAULT_CLOUD_EMBEDDING_MODEL,};pub use factory::{create_embedding_provider_for_chat, create_embedding_provider_with_config,diff --git a/crates/openhuman-core/src/inference/embedding_host/rpc.rs b/crates/openhuman-core/src/inference/embedding_host/rpc.rsindex 3145ffcf74..5ceee0d365 100644--- a/crates/openhuman-core/src/inference/embedding_host/rpc.rs+++ b/crates/openhuman-core/src/inference/embedding_host/rpc.rs@@ -18,7 +18,7 @@ use tinyinference_embeddings::probe::redact_secrets;#[cfg(test)]use settings::remember_active_custom_profile;#[cfg(test)]-use tinyinference_embeddings::probe::{EmbedProbe, classify_embed_probe};+use tinyinference_embeddings::probe::{classify_embed_probe, EmbedProbe};#[cfg(test)]use tinyinference_embeddings::served_models::{check_requested_model_served, fetch_served_model_ids, normalize_embed_model_id,diff --git a/crates/openhuman-core/src/inference/embedding_host/rpc/embed.rs b/crates/openhuman-core/src/inference/embedding_host/rpc/embed.rsindex 62b765c319..3aee247073 100644--- a/crates/openhuman-core/src/inference/embedding_host/rpc/embed.rs+++ b/crates/openhuman-core/src/inference/embedding_host/rpc/embed.rs@@ -3,7 +3,7 @@use crate::config::Config;use crate::core::Outcome;-use super::{LOG_PREFIX, resolve_api_key};+use super::{resolve_api_key, LOG_PREFIX};use crate::inference::embedding_host::factory::create_embedding_provider_with_config;use tinyinference_embeddings::probe::probe_custom_embeddings;diff --git a/crates/openhuman-core/src/inference/embedding_host/rpc/settings.rs b/crates/openhuman-core/src/inference/embedding_host/rpc/settings.rsindex 1b84c01f70..779c8434da 100644--- a/crates/openhuman-core/src/inference/embedding_host/rpc/settings.rs+++ b/crates/openhuman-core/src/inference/embedding_host/rpc/settings.rs@@ -2,18 +2,18 @@//! update, including the save-time verification of a custom endpoint.use crate::config::Config;-use crate::core::Outcome;use crate::core::runtime::DispatchCtx;+use crate::core::Outcome;use crate::security::credentials::AuthService;-use super::{LOG_PREFIX, resolve_api_key};+use super::{resolve_api_key, LOG_PREFIX};use tinyinference_embeddings::catalog;use tinyinference_embeddings::probe::{- EmbedProbe, EmbeddingProbeRejection, classify_embed_probe, final_probe_dims,- probe_custom_embeddings,+ classify_embed_probe, final_probe_dims, probe_custom_embeddings, EmbedProbe,+ EmbeddingProbeRejection,};use tinyinference_embeddings::served_models::{- ModelNotServed, check_requested_model_served, fetch_served_model_ids,+ check_requested_model_served, fetch_served_model_ids, ModelNotServed,};fn probe_rejection_outcome(reject: EmbeddingProbeRejection) -> Outcome<serde_json::Value> {diff --git a/crates/openhuman-core/src/inference/embedding_host/rpc_tests.rs b/crates/openhuman-core/src/inference/embedding_host/rpc_tests.rsindex 941aca5368..0ed49e910a 100644--- a/crates/openhuman-core/src/inference/embedding_host/rpc_tests.rs+++ b/crates/openhuman-core/src/inference/embedding_host/rpc_tests.rs@@ -145,13 +145,11 @@ fn reject_model_not_served_without_match_lists_available() {#[test]fn check_requested_model_served_decisions() {// Served exactly → accept (None).- assert!(- check_requested_model_served(- "text-embedding-bge-m3",- &["text-embedding-bge-m3".to_string()],- )- .is_none()- );+ assert!(check_requested_model_served(+ "text-embedding-bge-m3",+ &["text-embedding-bge-m3".to_string()],+ )+ .is_none());// Empty/unknown list → defer to probe (None), never block.assert!(check_requested_model_served("bge-m3", &[]).is_none());// Non-empty list without the model → reject with feedback.@@ -161,7 +159,7 @@ fn check_requested_model_served_decisions() {#[tokio::test]async fn fetch_served_model_ids_parses_openai_models_list() {- use axum::{Json, Router, routing::get};+ use axum::{routing::get, Json, Router};let app = Router::new().route("/v1/models",get(|| async {@@ -407,9 +405,9 @@ async fn conformant_custom_endpoint_verifies_and_sends_expected_request() {use std::sync::{Arc, Mutex};use axum::{- Json, Router,extract::State,routing::{get, post},+ Json, Router,};#[derive(Clone, Default)]diff --git a/crates/openhuman-core/src/inference/embedding_host/schemas.rs b/crates/openhuman-core/src/inference/embedding_host/schemas.rsindex 0d1fe7b788..53643e5c73 100644--- a/crates/openhuman-core/src/inference/embedding_host/schemas.rs+++ b/crates/openhuman-core/src/inference/embedding_host/schemas.rs@@ -4,8 +4,8 @@ use crate::core::runtime::DispatchCtx;use serde::Deserialize;use serde_json::{Map, Value};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};pub fn all_controller_schemas() -> Vec<ControllerSchema> {diff --git a/crates/openhuman-core/src/inference/failure_copy/halt.rs b/crates/openhuman-core/src/inference/failure_copy/halt.rsindex f758f2693f..5316fecd3b 100644--- a/crates/openhuman-core/src/inference/failure_copy/halt.rs+++ b/crates/openhuman-core/src/inference/failure_copy/halt.rs@@ -5,7 +5,7 @@//! `agent::tinyagents::middleware::loop_guards`.use tinyinference_providers::{- BudgetMatch, is_budget_message, is_provider_config_rejection_message,+ is_budget_message, is_provider_config_rejection_message, BudgetMatch,};/// Clamp the last-error text embedded in a circuit-breaker halt summary so a hugediff --git a/crates/openhuman-core/src/inference/failure_copy/mod.rs b/crates/openhuman-core/src/inference/failure_copy/mod.rsindex eff9f45402..be87066136 100644--- a/crates/openhuman-core/src/inference/failure_copy/mod.rs+++ b/crates/openhuman-core/src/inference/failure_copy/mod.rs@@ -21,4 +21,4 @@ pub(crate) use halt::{terminal_inference_failure_kind, terminal_inference_halt_summary, user_actionable_escalation,};pub(crate) use stop_summary::stop_summary_copy;-pub(crate) use table::{FailureClass, failure_copy};+pub(crate) use table::{failure_copy, FailureClass};diff --git a/crates/openhuman-core/src/inference/host_runtime/ops.rs b/crates/openhuman-core/src/inference/host_runtime/ops.rsindex 1d5180fe56..3b90031282 100644--- a/crates/openhuman-core/src/inference/host_runtime/ops.rs+++ b/crates/openhuman-core/src/inference/host_runtime/ops.rs@@ -14,10 +14,10 @@ mod runtime_ops;mod turn_guards;pub use agent_chat::{- AgentChatEnv, AgentChatReply, AgentChatTarget, agent_chat, agent_chat_for,- agent_chat_reply_for, agent_chat_simple,+ agent_chat, agent_chat_for, agent_chat_reply_for, agent_chat_simple, AgentChatEnv,+ AgentChatReply, AgentChatTarget,};-pub use complete_once::{CompletionEndpoint, complete_once};+pub use complete_once::{complete_once, CompletionEndpoint};pub use runtime_ops::{local_ai_prompt, local_ai_status, local_ai_summarize, local_ai_transcribe,local_ai_transcribe_bytes, local_ai_tts, local_ai_vision_prompt,diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rs b/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rsindex 19e6ef0eab..07379b1b09 100644--- a/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rs+++ b/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rs@@ -93,7 +93,9 @@ fn chat_origin(thread: &str) -> crate::security::turn_origin::AgentTurnOrigin {fn chat_thread(origin: crate::security::turn_origin::AgentTurnOrigin) -> String {match origin {- crate::security::turn_origin::AgentTurnOrigin::WebChat { thread_id, .. } => thread_id.into(),+ crate::security::turn_origin::AgentTurnOrigin::WebChat { thread_id, .. } => {+ thread_id.into()+ }crate::security::turn_origin::AgentTurnOrigin::DirectChat => "direct".into(),other => panic!("unexpected origin {other:?}"),}diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rs b/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rsindex 94dba635de..054633c972 100644--- a/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rs+++ b/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rs@@ -1,5 +1,5 @@use super::*;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinyinference_llm::message::Message;use tinyinference_llm::model::ResponseFormat;use tinyinference_llm::tool::ToolSchema;diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs b/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rsindex 812781e2b7..1e205115c8 100644--- a/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs+++ b/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs@@ -4,7 +4,7 @@use crate::config::Config;use crate::security::prompt_injection::{- PromptEnforcementAction, PromptEnforcementContext, enforce_prompt_input,+ enforce_prompt_input, PromptEnforcementAction, PromptEnforcementContext,};pub(super) fn prompt_guard_user_message(action: PromptEnforcementAction) -> &'static str {diff --git a/crates/openhuman-core/src/inference/host_runtime/ops_tests.rs b/crates/openhuman-core/src/inference/host_runtime/ops_tests.rsindex eebbbce151..1877deed9d 100644--- a/crates/openhuman-core/src/inference/host_runtime/ops_tests.rs+++ b/crates/openhuman-core/src/inference/host_runtime/ops_tests.rs@@ -280,7 +280,7 @@ async fn effective_origin_defaults_to_direct_chat_outside_any_scope() {/// see, not the blanket `Cli` allowance this RPC would otherwise impose.#[tokio::test]async fn effective_origin_keeps_an_embedder_scoped_label() {- use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource, with_origin};+ use crate::security::turn_origin::{with_origin, AgentTurnOrigin, TrustedAutomationSource};let observed = with_origin(AgentTurnOrigin::TrustedAutomation {job_id: "run-7".to_string(),@@ -308,7 +308,7 @@ async fn effective_origin_keeps_an_embedder_scoped_label() {/// touched, not a silent fall-through to the orchestrator.#[tokio::test]async fn agent_chat_for_rejects_an_unknown_agent_id() {- use crate::inference::host_runtime::ops::{AgentChatTarget, agent_chat_for};+ use crate::inference::host_runtime::ops::{agent_chat_for, AgentChatTarget};let tmp = tempfile::tempdir().unwrap();let mut config = test_config(&tmp);std::fs::create_dir_all(&config.workspace_dir).unwrap();diff --git a/crates/openhuman-core/src/inference/host_runtime/schemas.rs b/crates/openhuman-core/src/inference/host_runtime/schemas.rsindex 0c493deb5c..8c91880ca9 100644--- a/crates/openhuman-core/src/inference/host_runtime/schemas.rs+++ b/crates/openhuman-core/src/inference/host_runtime/schemas.rs@@ -1,6 +1,6 @@use crate::core::runtime::DispatchCtx;-use serde::Deserialize;use serde::de::DeserializeOwned;+use serde::Deserialize;use serde_json::{Map, Value};#[derive(Debug, Deserialize)]@@ -8,8 +8,8 @@ struct LocalAiTestConnectionParams {url: String,}-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};/// Params for `inference.agent_chat` and `inference.agent_chat_simple`.diff --git a/crates/openhuman-core/src/inference/host_runtime/service/speech.rs b/crates/openhuman-core/src/inference/host_runtime/service/speech.rsindex 95d913586a..580036934e 100644--- a/crates/openhuman-core/src/inference/host_runtime/service/speech.rs+++ b/crates/openhuman-core/src/inference/host_runtime/service/speech.rs@@ -1,7 +1,7 @@use std::path::PathBuf;use std::time::Instant;-use base64::{Engine, engine::general_purpose::STANDARD as BASE64};+use base64::{engine::general_purpose::STANDARD as BASE64, Engine};use log::debug;use crate::config::Config;diff --git a/crates/openhuman-core/src/inference/http/backend.rs b/crates/openhuman-core/src/inference/http/backend.rsindex bc3444cd0b..2d6a119658 100644--- a/crates/openhuman-core/src/inference/http/backend.rs+++ b/crates/openhuman-core/src/inference/http/backend.rs@@ -13,7 +13,7 @@use async_trait::async_trait;use tinyinference_llm::providers::openai::server_http::{- BackendFailure, ChatBackend, ListedModel, ResolvedChat, strip_temperature_suffix,+ strip_temperature_suffix, BackendFailure, ChatBackend, ListedModel, ResolvedChat,};use tracing::{debug, warn};diff --git a/crates/openhuman-core/src/inference/mod.rs b/crates/openhuman-core/src/inference/mod.rsindex 602c1a1152..8043b4128f 100644--- a/crates/openhuman-core/src/inference/mod.rs+++ b/crates/openhuman-core/src/inference/mod.rs@@ -39,8 +39,8 @@ pub mod turn_models;pub use ops as rpc;pub use schemas::{- INFERENCE_AGENT_CHAT, all_controller_schemas as all_inference_controller_schemas,- all_registered_controllers as all_inference_registered_controllers,+ all_controller_schemas as all_inference_controller_schemas,+ all_registered_controllers as all_inference_registered_controllers, INFERENCE_AGENT_CHAT,};// Re-export the types that external callers (voice, agent, etc.) import from inferencediff --git a/crates/openhuman-core/src/inference/model_context.rs b/crates/openhuman-core/src/inference/model_context.rsindex 3a739065ba..4034259b47 100644--- a/crates/openhuman-core/src/inference/model_context.rs+++ b/crates/openhuman-core/src/inference/model_context.rs@@ -5,7 +5,7 @@//! otherwise long histories produce upstream `400 Bad Request` errors when usage//! metadata is not yet available.-use crate::config::{MODEL_MANAGED_DEFAULT, legacy_tier_role};+use crate::config::{legacy_tier_role, MODEL_MANAGED_DEFAULT};/// Conservative default for OpenHuman abstract tier models (tokens).const TIER_LARGE_CONTEXT: u64 = 200_000;diff --git a/crates/openhuman-core/src/inference/ops.rs b/crates/openhuman-core/src/inference/ops.rsindex 163e231a70..e9ac765320 100644--- a/crates/openhuman-core/src/inference/ops.rs+++ b/crates/openhuman-core/src/inference/ops.rs@@ -1,15 +1,15 @@//! JSON-RPC controller surface for inference operations.-use crate::config::Config;use crate::config::rpc as config_rpc;-use crate::core::Outcome;+use crate::config::Config;use crate::core::runtime::DispatchCtx;+use crate::core::Outcome;use crate::inference::host_runtime as local_runtime;use crate::inference::provider as providers;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinyinference_llm::message::Message;use tinyinference_llm::model::ModelRequest;-use tinyinference_llm::sentiment::{SentimentResult, parse_sentiment_response};+use tinyinference_llm::sentiment::{parse_sentiment_response, SentimentResult};use tinyinference_local::status::LocalAiStatus;use tracing::{debug, error, warn};diff --git a/crates/openhuman-core/src/inference/ops_tests.rs b/crates/openhuman-core/src/inference/ops_tests.rsindex b605131aff..75d1f0acdf 100644--- a/crates/openhuman-core/src/inference/ops_tests.rs+++ b/crates/openhuman-core/src/inference/ops_tests.rs@@ -2,7 +2,7 @@ use super::*;use crate::core::runtime::DispatchCtx;use crate::security::credentials::openai_oauth::{OPENAI_OAUTH_PROFILE_NAME, OPENAI_PROVIDER_KEY};use crate::security::credentials::profiles::{AuthProfile, AuthProfilesStore, TokenSet};-use axum::{Json, Router, routing::post};+use axum::{routing::post, Json, Router};use chrono::{Duration, Utc};use tempfile::tempdir;@@ -168,12 +168,10 @@ async fn inference_openai_oauth_start_returns_authorize_payload() {.await.expect("oauth start");- assert!(- outcome.value["authUrl"]- .as_str()- .unwrap()- .contains("auth.openai.com")- );+ assert!(outcome.value["authUrl"]+ .as_str()+ .unwrap()+ .contains("auth.openai.com"));assert_eq!(outcome.value["redirectUri"].as_str(),Some("http://127.0.0.1:1455/auth/callback")diff --git a/crates/openhuman-core/src/inference/provider/error_classify.rs b/crates/openhuman-core/src/inference/provider/error_classify.rsindex 94a8f1ca7c..0ac058ddd1 100644--- a/crates/openhuman-core/src/inference/provider/error_classify.rs+++ b/crates/openhuman-core/src/inference/provider/error_classify.rs@@ -1,8 +1,8 @@//! OpenHuman-specific policy layered on TinyInference's provider-neutral classifier.use tinyinference_llm::failure::{- ProviderFailureClass, classify_provider_failure,- parse_retry_after_ms as parse_inference_retry_after,+ classify_provider_failure, parse_retry_after_ms as parse_inference_retry_after,+ ProviderFailureClass,};fn classify(err: &anyhow::Error) -> ProviderFailureClass {diff --git a/crates/openhuman-core/src/inference/provider/error_code.rs b/crates/openhuman-core/src/inference/provider/error_code.rsindex d00582a147..b61407d5e4 100644--- a/crates/openhuman-core/src/inference/provider/error_code.rs+++ b/crates/openhuman-core/src/inference/provider/error_code.rs@@ -102,7 +102,11 @@ pub fn extract_backend_error_code_token(err: &str) -> Option<String> {let stripped = after_colon.strip_prefix('"')?;let end = stripped.find('"')?;let token = stripped[..end].trim().to_ascii_uppercase();- if token.is_empty() { None } else { Some(token) }+ if token.is_empty() {+ None+ } else {+ Some(token)+ }}/// Whether the flattened error string is a **managed-backend** envelope (thediff --git a/crates/openhuman-core/src/inference/provider/factory.rs b/crates/openhuman-core/src/inference/provider/factory.rsindex c784b6ea58..d4c06fbfd6 100644--- a/crates/openhuman-core/src/inference/provider/factory.rs+++ b/crates/openhuman-core/src/inference/provider/factory.rs@@ -86,8 +86,8 @@ use cloud_slug::{try_create_cloud_slug_chat_model_with_native_tools,};use local_runtime::{- OptionalChatModelResult, try_create_local_runtime_chat_model,- try_create_local_runtime_chat_model_from_string,+ try_create_local_runtime_chat_model, try_create_local_runtime_chat_model_from_string,+ OptionalChatModelResult,};pub(crate) use managed_backend::make_openhuman_backend_model_for_thread;use managed_backend::{resolve_managed_backend, resolve_managed_backend_with_model_override};@@ -119,21 +119,21 @@ pub mod test_provider_override;#[path = "factory_tests.rs"]mod factory_tests;-use crate::config::Config;use crate::config::schema::cloud_providers::AuthStyle;-use crate::inference::provider::ProviderRuntimeOptions;+use crate::config::Config;use crate::inference::provider::openai_codex::resolve_openai_codex_routing;use crate::inference::provider::openhuman_backend_model::OpenHumanBackendModel;+use crate::inference::provider::ProviderRuntimeOptions;use crate::security::credentials::AuthService;use crate::security::egress::EgressLedger;use std::sync::Arc;use tinyagents_harness::providers::claude_agent_sdk::ClaudeAgentSdkProvider;use tinyinference_llm::model::{ChatModel, ModelRequest, ModelResponse, ModelStream};-use tinyinference_llm::providers::openai::AuthStyle as CompatAuthStyle;use tinyinference_llm::providers::openai::codex::{- OPENAI_CODEX_ACCOUNT_HEADER, OPENAI_CODEX_ORIGINATOR, OPENAI_CODEX_ORIGINATOR_HEADER,- openai_codex_client_version, openai_codex_user_agent,+ openai_codex_client_version, openai_codex_user_agent, OPENAI_CODEX_ACCOUNT_HEADER,+ OPENAI_CODEX_ORIGINATOR, OPENAI_CODEX_ORIGINATOR_HEADER,};+use tinyinference_llm::providers::openai::AuthStyle as CompatAuthStyle;/// Sentinel meaning "use the OpenHuman backend session JWT".pub const PROVIDER_OPENHUMAN: &str = "openhuman";diff --git a/crates/openhuman-core/src/inference/provider/factory/cloud_spec_tests.rs b/crates/openhuman-core/src/inference/provider/factory/cloud_spec_tests.rsindex 14c1117c47..9cf06d2e33 100644--- a/crates/openhuman-core/src/inference/provider/factory/cloud_spec_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory/cloud_spec_tests.rs@@ -77,12 +77,10 @@ fn discovery_request_carries_bearer_auth_and_pins_openrouter_sorting() {let request =cloud_discovery_request(&build(&creds, "m", "sk-or")).expect("openrouter has a listing");assert_eq!(request.endpoint, "https://openrouter.ai/api/v1");- assert!(- request- .headers- .iter()- .any(|(name, value)| name == "Authorization" && value == "Bearer sk-or")- );+ assert!(request+ .headers+ .iter()+ .any(|(name, value)| name == "Authorization" && value == "Bearer sk-or"));}#[test]diff --git a/crates/openhuman-core/src/inference/provider/factory/discovery.rs b/crates/openhuman-core/src/inference/provider/factory/discovery.rsindex 23a19caa4a..aef17a31b0 100644--- a/crates/openhuman-core/src/inference/provider/factory/discovery.rs+++ b/crates/openhuman-core/src/inference/provider/factory/discovery.rs@@ -90,7 +90,7 @@ fn managed_limits_request(model: &str, config: &Config) -> Option<DiscoveryRequeis_managed_endpoint_for_api_key, is_safe_endpoint_for_managed_bearer,};use crate::security::credentials::session_support::{- BackendCredential, resolve_backend_credential,+ resolve_backend_credential, BackendCredential,};let model = model.trim();diff --git a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rsindex 2149dcae5f..3aef45d5ac 100644--- a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs+++ b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs@@ -40,7 +40,7 @@ pub(super) fn try_create_local_runtime_chat_model_from_string(egress: &EgressLedger,) -> OptionalChatModelResult {use tinyinference_local::local_runtime::{- LocalRuntimeAuth, LocalRuntimeInputs, resolve_local_runtime,+ resolve_local_runtime, LocalRuntimeAuth, LocalRuntimeInputs,};// Use the same classifier as privacy and session policy. Canonicalize onlydiff --git a/crates/openhuman-core/src/inference/provider/factory/primary_cloud.rs b/crates/openhuman-core/src/inference/provider/factory/primary_cloud.rsindex f9a59c6246..470304ac87 100644--- a/crates/openhuman-core/src/inference/provider/factory/primary_cloud.rs+++ b/crates/openhuman-core/src/inference/provider/factory/primary_cloud.rs@@ -68,7 +68,11 @@ pub(super) fn redact_inference_url(url: Option<&str>) -> &str {.rfind('@').map_or(authority, |i| &authority[i + 1..]);let host = host.rfind(':').map_or(host, |i| &host[..i]);- if host.is_empty() { None } else { Some(host) }+ if host.is_empty() {+ None+ } else {+ Some(host)+ }}).unwrap_or("<redacted>")}diff --git a/crates/openhuman-core/src/inference/provider/factory/routing_tests.rs b/crates/openhuman-core/src/inference/provider/factory/routing_tests.rsindex a871a5d70e..109b68a11d 100644--- a/crates/openhuman-core/src/inference/provider/factory/routing_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory/routing_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::config::Config;use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};+use crate::config::Config;use crate::inference::provider::factory::resolves_to_managed_backend;fn byok_openai_compatible_entry() -> CloudProviderCreds {diff --git a/crates/openhuman-core/src/inference/provider/factory/tiers.rs b/crates/openhuman-core/src/inference/provider/factory/tiers.rsindex f117657584..0e77dd34dc 100644--- a/crates/openhuman-core/src/inference/provider/factory/tiers.rs+++ b/crates/openhuman-core/src/inference/provider/factory/tiers.rs@@ -9,7 +9,7 @@//! as aliases of their role so un-migrated callers keep routing.use super::*;-use crate::config::{MANAGED_MULTIMODAL_MODELS, MODEL_MANAGED_DEFAULT, legacy_tier_role};+use crate::config::{legacy_tier_role, MANAGED_MULTIMODAL_MODELS, MODEL_MANAGED_DEFAULT};/// Whether `model` is a managed alias rather than a concrete model id: a/// `hint:*` role marker or a retired tier slug.diff --git a/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs b/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rsindex 346cbf359b..ef9a0d87fc 100644--- a/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs@@ -80,11 +80,9 @@ fn enforce_local_only_inference_errors_on_external_when_local_only() {Err(error) => error,Ok(_) => panic!("direct Claude Code model must preserve the privacy gate"),};- assert!(- claude_code_error- .to_string()- .contains("Local-only privacy mode")- );+ assert!(claude_code_error+ .to_string()+ .contains("Local-only privacy mode"));// Both the default factory and a thread-attached managed picker route must// hit the managed resolver's privacy gate before any backend client exists.@@ -441,11 +439,9 @@ fn create_chat_model_routes_anthropic_auth_cloud_slug_to_crate_native() {identity.starts_with("anthropic:https://api.anthropic.com/v1:claude-sonnet-4-6"),"expected the native Messages adapter, got identity {identity}");- assert!(- model- .profile()- .is_some_and(|p| p.tool_calling && p.streaming)- );+ assert!(model+ .profile()+ .is_some_and(|p| p.tool_calling && p.streaming));}/// Text mode (prompt-guided tools) is only implemented on the Chat Completionsdiff --git a/crates/openhuman-core/src/inference/provider/factory_tests.rs b/crates/openhuman-core/src/inference/provider/factory_tests.rsindex 16a95856fb..051672c51a 100644--- a/crates/openhuman-core/src/inference/provider/factory_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::config::Config;use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};+use crate::config::Config;use crate::security::credentials::AuthService;use tempfile::TempDir;@@ -153,7 +153,7 @@ fn deepseek_entry(id: &str) -> CloudProviderCreds {/// A config carrying a resolved model, as `agent_chat` leaves it after applying/// `model_override` and before building the agent.fn routed_config(endpoint: &str, api_key: &str, model: &str) -> Config {- use crate::config::schema::ephemeral_route::{EphemeralRoute, apply};+ use crate::config::schema::ephemeral_route::{apply, EphemeralRoute};let mut config = Config {default_model: Some(model.to_string()),..Config::default()diff --git a/crates/openhuman-core/src/inference/provider/mod.rs b/crates/openhuman-core/src/inference/provider/mod.rsindex 1cd4c509e6..d54a21531c 100644--- a/crates/openhuman-core/src/inference/provider/mod.rs+++ b/crates/openhuman-core/src/inference/provider/mod.rs@@ -17,21 +17,21 @@ pub mod ops;pub mod types;#[allow(unused_imports)]-pub use types::{AGENT_TURN_MAX_OUTPUT_TOKENS, BilledUsage, ChatResponse, ProviderDelta};+pub use types::{BilledUsage, ChatResponse, ProviderDelta, AGENT_TURN_MAX_OUTPUT_TOKENS};pub use error_code::{- BackendErrorCode, backend_error_code_skips_sentry, body_flags_malformed,- extract_backend_error_code, extract_backend_error_code_token, is_backend_client_guard_leak,+ backend_error_code_skips_sentry, body_flags_malformed, extract_backend_error_code,+ extract_backend_error_code_token, is_backend_client_guard_leak,is_backend_malformed_bad_request, is_managed_backend_envelope, managed_error_skips_sentry,+ BackendErrorCode,};#[cfg(feature = "flows")]pub(crate) use factory::is_raw_passthrough_model;pub use factory::{- BYOK_INCOMPLETE_SENTINEL, create_chat_model_from_string,- create_chat_model_from_string_with_model_id, create_chat_model_in,- create_chat_model_with_model_id_in, probe_inference_readiness, provider_for_role,- role_for_model_tier,+ create_chat_model_from_string, create_chat_model_from_string_with_model_id,+ create_chat_model_in, create_chat_model_with_model_id_in, probe_inference_readiness,+ provider_for_role, role_for_model_tier, BYOK_INCOMPLETE_SENTINEL,};pub use openhuman_backend_model::{OpenHumanBackendModel, PROVIDER_LABEL};pub use ops::*;diff --git a/crates/openhuman-core/src/inference/provider/model.rs b/crates/openhuman-core/src/inference/provider/model.rsindex ad5ec36236..c02b3b9500 100644--- a/crates/openhuman-core/src/inference/provider/model.rs+++ b/crates/openhuman-core/src/inference/provider/model.rs@@ -5,7 +5,7 @@ use std::sync::Arc;use tinyinference_llm::message::{AssistantMessage, ContentBlock};use tinyinference_llm::model::{ChatModel, ModelRequest, ModelResponse};use tinyinference_llm::tool::ToolCall as TaToolCall;-use tinyinference_llm::usage::{ProviderUsageReport, recover_usage};+use tinyinference_llm::usage::{recover_usage, ProviderUsageReport};use tinytools_agent::dialect::DialectResponse;use crate::inference::provider::{BilledUsage, ChatResponse};diff --git a/crates/openhuman-core/src/inference/provider/openai_codex.rs b/crates/openhuman-core/src/inference/provider/openai_codex.rsindex e7d020464e..71def06181 100644--- a/crates/openhuman-core/src/inference/provider/openai_codex.rs+++ b/crates/openhuman-core/src/inference/provider/openai_codex.rs@@ -1,6 +1,6 @@use crate::config::Config;use tinyinference_llm::providers::openai::codex::{- OPENAI_CODEX_BACKEND_BASE_URL, OpenAiCodexRouting,+ OpenAiCodexRouting, OPENAI_CODEX_BACKEND_BASE_URL,};pub(crate) fn resolve_openai_codex_routing(diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rsindex 948f52855c..d7b2caeefa 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs@@ -28,17 +28,17 @@ use serde_json::Value;use std::path::PathBuf;use std::time::Duration;-use tinyinference_llm::Error as TiError;use tinyinference_llm::message::Message;use tinyinference_llm::model::{ChatModel, Modalities, ModelProfile, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,ProviderError,};-use tinyinference_llm::providers::ProviderRequestOptions;use tinyinference_llm::providers::openai::OpenAiModel;+use tinyinference_llm::providers::ProviderRequestOptions;+use tinyinference_llm::Error as TiError;use super::ProviderRuntimeOptions;-use crate::security::credentials::{APP_SESSION_PROVIDER, AuthService};+use crate::security::credentials::{AuthService, APP_SESSION_PROVIDER};pub const PROVIDER_LABEL: &str = "OpenHuman";@@ -510,7 +510,7 @@ fn managed_bearer(check: crate::security::credentials::session_support::SessionTokenCheck,) -> anyhow::Result<String> {use crate::security::credentials::session_support::{- LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE, SessionTokenCheck, is_local_session_token,+ is_local_session_token, SessionTokenCheck, LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE,};match check {diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_auth_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_auth_tests.rsindex 9a8a9e9df6..e3d4332286 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_auth_tests.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_auth_tests.rs@@ -7,7 +7,7 @@ use super::*;#[test]fn the_offline_local_session_cannot_authenticate_managed_inference() {use crate::security::credentials::session_support::{- LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE, SessionTokenCheck,+ SessionTokenCheck, LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE,};let error = managed_bearer(SessionTokenCheck::Live("header.payload.local".to_string()))diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_offline_session_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_offline_session_tests.rsindex 042fe089d4..2aa9f0bf26 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_offline_session_tests.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_offline_session_tests.rs@@ -5,7 +5,7 @@ use super::*;#[test]fn the_offline_local_session_cannot_authenticate_managed_inference() {use crate::security::credentials::session_support::{- LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE, SessionTokenCheck,+ SessionTokenCheck, LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE,};let error = managed_bearer(SessionTokenCheck::Live("header.payload.local".to_string()))diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rsindex dc7ee0c49f..6049879da9 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs@@ -193,7 +193,7 @@ fn is_provider_not_configured_error_rejects_non_400_status() {fn seed_app_session(dir: &std::path::Path) {use crate::security::credentials::{- APP_SESSION_PROVIDER, AuthService, DEFAULT_AUTH_PROFILE_NAME,+ AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME,};AuthService::new(dir, false).store_provider_token(@@ -211,8 +211,8 @@ fn seed_app_session(dir: &std::path::Path) {/// can be exercised without a live backend.fn seed_app_session_with_expiry(dir: &std::path::Path, expires_at: &str) {use crate::security::credentials::{- APP_SESSION_PROVIDER, AuthService, DEFAULT_AUTH_PROFILE_NAME,- session_support::SESSION_EXPIRES_AT_META,+ session_support::SESSION_EXPIRES_AT_META, AuthService, APP_SESSION_PROVIDER,+ DEFAULT_AUTH_PROFILE_NAME,};let mut metadata = std::collections::HashMap::new();metadata.insert(SESSION_EXPIRES_AT_META.to_string(), expires_at.to_string());diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_usage_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_usage_tests.rsindex d3191e4be4..5e10639fa2 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_usage_tests.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_usage_tests.rs@@ -83,14 +83,12 @@ fn project_managed_usage_is_noop_without_envelope() {let projected = project_managed_usage(response);// raw keeps only the wire fields — no meta key injected.- assert!(- projected- .raw- .as_ref()- .unwrap()- .get("openhuman_usage_meta")- .is_none()- );+ assert!(projected+ .raw+ .as_ref()+ .unwrap()+ .get("openhuman_usage_meta")+ .is_none());let usage = usage_info_from_response(&projected).expect("usage present");assert_eq!(usage.charged_amount_usd, 0.0);assert_eq!(usage.cache_read_tokens, 3, "crate cached preserved");diff --git a/crates/openhuman-core/src/inference/provider/ops/http_error.rs b/crates/openhuman-core/src/inference/provider/ops/http_error.rsindex f4470eb2ae..ae957469c6 100644--- a/crates/openhuman-core/src/inference/provider/ops/http_error.rs+++ b/crates/openhuman-core/src/inference/provider/ops/http_error.rs@@ -11,7 +11,7 @@ mod tests;use crate::inference::provider::openhuman_backend_model;use tinyinference_core::sanitize::sanitize_api_error;use tinyinference_llm::failure::http::{- ErrorReporter, ProviderHttpFailure, ProviderHttpFailureFacts, classify_and_report_http_failure,+ classify_and_report_http_failure, ErrorReporter, ProviderHttpFailure, ProviderHttpFailureFacts,};use tinyinference_llm::failure::{local_provider_no_model_loaded_user_message, ollama_cloud_internal_500_user_message,diff --git a/crates/openhuman-core/src/inference/provider/ops/http_error_tests.rs b/crates/openhuman-core/src/inference/provider/ops/http_error_tests.rsindex da64300843..1a085714dd 100644--- a/crates/openhuman-core/src/inference/provider/ops/http_error_tests.rs+++ b/crates/openhuman-core/src/inference/provider/ops/http_error_tests.rs@@ -68,11 +68,10 @@ async fn api_error_replaces_no_model_loaded_body_with_guidance() {),).await;- assert!(- err.to_string()- .to_ascii_lowercase()- .contains("load a model")- );+ assert!(err+ .to_string()+ .to_ascii_lowercase()+ .contains("load a model"));}#[tokio::test]diff --git a/crates/openhuman-core/src/inference/provider/ops/mod.rs b/crates/openhuman-core/src/inference/provider/ops/mod.rsindex 45f7172c48..0bfdcce991 100644--- a/crates/openhuman-core/src/inference/provider/ops/mod.rs+++ b/crates/openhuman-core/src/inference/provider/ops/mod.rs@@ -24,7 +24,7 @@ pub use models::{};pub use provider_factory::{- INFERENCE_BACKEND_ID, ProviderInfo, ProviderRuntimeOptions, list_providers,+ list_providers, ProviderInfo, ProviderRuntimeOptions, INFERENCE_BACKEND_ID,};// ── test re-exports for ops_tests.rs ──diff --git a/crates/openhuman-core/src/inference/provider/ops/models.rs b/crates/openhuman-core/src/inference/provider/ops/models.rsindex 53ae06cfbf..baeeb2b554 100644--- a/crates/openhuman-core/src/inference/provider/ops/models.rs+++ b/crates/openhuman-core/src/inference/provider/ops/models.rs@@ -16,8 +16,8 @@use super::super::openai_codex::resolve_openai_codex_routing;use tinyinference_core::sanitize::sanitize_api_error;use tinyinference_llm::providers::openai::codex::{+ openai_codex_client_version, openai_codex_user_agent, OpenAiCodexRouting,OPENAI_CODEX_ACCOUNT_HEADER, OPENAI_CODEX_ORIGINATOR, OPENAI_CODEX_ORIGINATOR_HEADER,- OpenAiCodexRouting, openai_codex_client_version, openai_codex_user_agent,};mod catalog_listing;@@ -25,8 +25,8 @@ mod local_runtime;mod managed_provider;mod openrouter;use tinyinference_llm::catalog::{- ModelInfo, append_query_param, endpoint_hosts_models_listing, is_openrouter_provider,- merge_openai_codex_model_hints, parse_models_response,+ append_query_param, endpoint_hosts_models_listing, is_openrouter_provider,+ merge_openai_codex_model_hints, parse_models_response, ModelInfo,};#[cfg(test)]diff --git a/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs b/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rsindex 1ac5353f85..2d154b97d3 100644--- a/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs+++ b/crates/openhuman-core/src/inference/provider/ops/models/catalog_listing.rs@@ -160,8 +160,8 @@ pub async fn list_configured_models_from_config(// A store error still propagates; only a genuinely absent/expired// session degrades to an empty list.use crate::security::credentials::session_support::{- SessionTokenCheck, classify_session_token, load_app_session_profile,- publish_local_session_expiry,+ classify_session_token, load_app_session_profile, publish_local_session_expiry,+ SessionTokenCheck,};let profile = load_app_session_profile(config)?;match classify_session_token(profile.as_ref(), chrono::Utc::now()) {diff --git a/crates/openhuman-core/src/inference/provider/ops_tests.rs b/crates/openhuman-core/src/inference/provider/ops_tests.rsindex a8279b5228..1d06c87593 100644--- a/crates/openhuman-core/src/inference/provider/ops_tests.rs+++ b/crates/openhuman-core/src/inference/provider/ops_tests.rs@@ -1,21 +1,21 @@use super::*;-use crate::config::Config;use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};+use crate::config::Config;use crate::security::credentials::AuthService;use axum::{- Json, Router,extract::State,http::{HeaderMap, StatusCode},response::{IntoResponse, Response},routing::get,+ Json, Router,};use std::collections::HashMap;use std::sync::{- Arc, Mutex,atomic::{AtomicUsize, Ordering as AtomicOrdering},+ Arc, Mutex,};use tempfile::TempDir;-use tinyinference_core::sanitize::{MAX_API_ERROR_CHARS, sanitize_api_error};+use tinyinference_core::sanitize::{sanitize_api_error, MAX_API_ERROR_CHARS};#[derive(Clone)]struct ModelProbeState {diff --git a/crates/openhuman-core/src/inference/provider/ops_tests_error_suppression_tests.rs b/crates/openhuman-core/src/inference/provider/ops_tests_error_suppression_tests.rsindex b45813d158..01568ed613 100644--- a/crates/openhuman-core/src/inference/provider/ops_tests_error_suppression_tests.rs+++ b/crates/openhuman-core/src/inference/provider/ops_tests_error_suppression_tests.rs@@ -6,8 +6,8 @@ fn list_configured_models_accepts_slug() {// passes a slug instead of the opaque random id. This lets the frontend// call the RPC before the provider config has been persisted (where only// the slug is stable).- use crate::config::Config;use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};+ use crate::config::Config;let mut config = Config::default();config.cloud_providers.push(CloudProviderCreds {@@ -207,7 +207,8 @@ mod provider_config_rejection_suppression {use super::super::*;// The exact #2079 Sentry body shape.- const TIER_LEAK_BODY: &str = "The supported API model names are deepseek-v4-pro or deepseek-v4-flash, \+ const TIER_LEAK_BODY: &str =+ "The supported API model names are deepseek-v4-pro or deepseek-v4-flash, \but you passed reasoning-v1.";// #2076 Moonshot Kimi K2 temperature constraint.const TEMP_BODY: &str = "invalid temperature: only 1 is allowed for this model";diff --git a/crates/openhuman-core/src/inference/reasoning_tests.rs b/crates/openhuman-core/src/inference/reasoning_tests.rsindex 4093f16d86..7efffd319b 100644--- a/crates/openhuman-core/src/inference/reasoning_tests.rs+++ b/crates/openhuman-core/src/inference/reasoning_tests.rs@@ -135,14 +135,12 @@ fn unknown_requested_effort_is_rejected_and_keeps_the_prior_choice() {Some("off"),).expect("valid effort");- assert!(- apply_requested_effort(- &crate::core::runtime::DispatchCtx::ambient(),- thread,- Some("turbo")- )- .is_err()- );+ assert!(apply_requested_effort(+ &crate::core::runtime::DispatchCtx::ambient(),+ thread,+ Some("turbo")+ )+ .is_err());assert_eq!(thread_effort(&crate::core::runtime::DispatchCtx::ambient(), thread),Some(ReasoningEffort::None)@@ -287,7 +285,7 @@ fn a_cap_too_small_for_a_provider_minimum_budget_keeps_the_effort_only() {#[tokio::test]async fn reasoning_effort_stays_with_the_agent_that_chose_it() {use crate::core::runtime::agent_scope::test_agent_context;- use crate::core::runtime::{DomainSet, context::CoreContext};+ use crate::core::runtime::{context::CoreContext, DomainSet};let root = CoreContext::for_test(DomainSet::full(), None);let alpha = test_agent_context(&root, "alpha");let beta = test_agent_context(&root, "beta");diff --git a/crates/openhuman-core/src/inference/schemas.rs b/crates/openhuman-core/src/inference/schemas.rsindex b871d5bbd8..ed118f3f28 100644--- a/crates/openhuman-core/src/inference/schemas.rs+++ b/crates/openhuman-core/src/inference/schemas.rs@@ -14,9 +14,9 @@ mod settings_handlers;use serde::de::DeserializeOwned;use serde_json::{Map, Value};+use crate::core::all::RegisteredController;use crate::core::ControllerSchema;use crate::core::Outcome;-use crate::core::all::RegisteredController;pub use catalog::schemas;use claude_code_handlers::*;diff --git a/crates/openhuman-core/src/inference/schemas/claude_code_handlers.rs b/crates/openhuman-core/src/inference/schemas/claude_code_handlers.rsindex 91991a080f..36a30f0204 100644--- a/crates/openhuman-core/src/inference/schemas/claude_code_handlers.rs+++ b/crates/openhuman-core/src/inference/schemas/claude_code_handlers.rs@@ -6,8 +6,8 @@ use serde::Deserialize;use serde_json::{Map, Value};use super::{deserialize_params, to_json};-use crate::core::Outcome;use crate::core::all::ControllerFuture;+use crate::core::Outcome;#[derive(Debug, Deserialize)]pub(super) struct InferenceClaudeCodeSetFullAccessParams {diff --git a/crates/openhuman-core/src/inference/schemas/settings_handlers.rs b/crates/openhuman-core/src/inference/schemas/settings_handlers.rsindex 843753bc1a..127e93b7e1 100644--- a/crates/openhuman-core/src/inference/schemas/settings_handlers.rs+++ b/crates/openhuman-core/src/inference/schemas/settings_handlers.rs@@ -3,14 +3,14 @@//! auth errors, and diagnostics.use crate::core::runtime::DispatchCtx;-use serde::Deserialize;use serde::de::Deserializer;+use serde::Deserialize;use serde_json::{Map, Value};use super::{deserialize_params, to_json};use crate::config::rpc as config_rpc;-use crate::core::Outcome;use crate::core::all::ControllerFuture;+use crate::core::Outcome;#[derive(Debug, Deserialize)]pub(super) struct InferenceResolveModelParams {diff --git a/crates/openhuman-core/src/inference/tokenjuice/focus.rs b/crates/openhuman-core/src/inference/tokenjuice/focus.rsindex 568c4301a5..636669d56b 100644--- a/crates/openhuman-core/src/inference/tokenjuice/focus.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/focus.rs@@ -8,7 +8,7 @@use serde_json::Value;-use tinyjuice_bus::tools::{SUMMARY_FOCUS_ARG, summary_focus_property};+use tinyjuice_bus::tools::{summary_focus_property, SUMMARY_FOCUS_ARG};/// Whether a tool's parameter schema declares TinyJuice's `summary_focus`,/// as opposed to a parameter of its own that happens to share the name.diff --git a/crates/openhuman-core/src/inference/tokenjuice/focus_tests.rs b/crates/openhuman-core/src/inference/tokenjuice/focus_tests.rsindex 351fc7c29f..33180e7a1c 100644--- a/crates/openhuman-core/src/inference/tokenjuice/focus_tests.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/focus_tests.rs@@ -33,12 +33,10 @@ fn arguments_without_a_focus_are_untouched() {fn the_property_is_an_optional_string() {let property = summary_focus_property();assert_eq!(property["type"], "string");- assert!(- property["description"]- .as_str()- .unwrap()- .contains("summarized")- );+ assert!(property["description"]+ .as_str()+ .unwrap()+ .contains("summarized"));}#[test]diff --git a/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs b/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rsindex 323ad90317..d48777c017 100644--- a/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/mod_tests.rs@@ -49,11 +49,9 @@ async fn the_module_defers_a_summary_until_requested() {.await;assert_eq!(output.summarized_from_bytes, None);- assert!(- !output- .text- .contains("the rate limit is 60 requests a minute")- );+ assert!(!output+ .text+ .contains("the rate limit is 60 requests a minute"));assert!(output.text.contains(tinyjuice_bus::tools::RETRIEVE),"the original stays retrievable: {}",diff --git a/crates/openhuman-core/src/inference/tokenjuice/tools.rs b/crates/openhuman-core/src/inference/tokenjuice/tools.rsindex 44de5738b8..e757e6e143 100644--- a/crates/openhuman-core/src/inference/tokenjuice/tools.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/tools.rs@@ -9,7 +9,7 @@//! Read-only, no side effects, no path/network access.use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinytools::{PermissionLevel, Tool, ToolResult};use {tinyjuice_bus::wire::RangeUnit, tinyjuice_bus::wire::RetrieveRange};diff --git a/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs b/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rsindex ee339707b7..6b5f60f669 100644--- a/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs+++ b/crates/openhuman-core/src/integrations/composio/bus/trigger_subscriber.rs@@ -4,12 +4,12 @@ use crate::core::runtime::DispatchCtx;use async_trait::async_trait;use tinybus::EventHandler;+use crate::core::events::DomainEvent;+use crate::integrations::composio::trigger_history;+use crate::security::turn_origin::with_origin;use crate::triage::{apply_decision, remote_trigger_origin, run_triage, TriageOutcome, TriggerEnvelope,};-use crate::security::turn_origin::with_origin;-use crate::core::events::DomainEvent;-use crate::integrations::composio::trigger_history;/// Env var that **disables** the triage pipeline. The pipeline is/// enabled by default; set to `1`/`true`/`yes` to opt out (e.g. fordiff --git a/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs b/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rsindex 999c9106e3..66f757e9a3 100644--- a/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs+++ b/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs@@ -5,8 +5,8 @@//! helpers ([`connected_set_hash`], [`sync_cache_with_connections`]) that//! keep it in sync with a fresh backend `list_connections` response.-use crate::integrations::ConnectedIntegration;use crate::config::Config;+use crate::integrations::ConnectedIntegration;use sha2::{Digest, Sha256};use std::collections::{HashMap, HashSet};diff --git a/crates/openhuman-core/src/integrations/composio/connected_integrations/fetch.rs b/crates/openhuman-core/src/integrations/composio/connected_integrations/fetch.rsindex f4a9cecb59..447311ac2b 100644--- a/crates/openhuman-core/src/integrations/composio/connected_integrations/fetch.rs+++ b/crates/openhuman-core/src/integrations/composio/connected_integrations/fetch.rs@@ -4,8 +4,8 @@use std::sync::atomic::Ordering;-use crate::integrations::ConnectedIntegration;use crate::config::Config;+use crate::integrations::ConnectedIntegration;use super::cache::{cache_generation, checked_cache_key, store_fetched_integrations, INTEGRATIONS_CACHE,@@ -182,7 +182,9 @@ fn fetch_connected_integrations_uncached(pub(crate) fn to_prompt_integrations(resp: tinyconnectors_bus::ComposioConnectedIntegrationsResponse,) -> Vec<ConnectedIntegration> {- use crate::agent::prompts::{ConnectedIntegrationTool, GatedIntegrationTool, IntegrationConnection};+ use crate::agent::prompts::{+ ConnectedIntegrationTool, GatedIntegrationTool, IntegrationConnection,+ };resp.integrations.into_iter().map(|i| {diff --git a/crates/openhuman-core/src/integrations/composio/mod.rs b/crates/openhuman-core/src/integrations/composio/mod.rsindex 19f7c53053..980655a711 100644--- a/crates/openhuman-core/src/integrations/composio/mod.rs+++ b/crates/openhuman-core/src/integrations/composio/mod.rs@@ -60,8 +60,8 @@ pub mod tools;pub(crate) mod trigger_history;pub mod types;-pub use crate::integrations::types::ConnectedIntegration;pub use crate::integrations::composio::contract::ProviderUserProfile;+pub use crate::integrations::types::ConnectedIntegration;pub use action_tool::ComposioActionTool;pub(crate) use auth_probe::user_is_signed_in_to_composio;pub use bus::{diff --git a/crates/openhuman-core/src/integrations/mod.rs b/crates/openhuman-core/src/integrations/mod.rsindex 85af8002e9..f6304718a7 100644--- a/crates/openhuman-core/src/integrations/mod.rs+++ b/crates/openhuman-core/src/integrations/mod.rs@@ -7,8 +7,8 @@//! trusted because requests leave the local core process.pub mod client;-mod connected_identities;pub mod composio;+mod connected_identities;pub mod file_storage;pub mod task_sources;pub mod tools;diff --git a/crates/openhuman-core/src/integrations/task_sources/route.rs b/crates/openhuman-core/src/integrations/task_sources/route.rsindex 9ce98bea5b..f2317be865 100644--- a/crates/openhuman-core/src/integrations/task_sources/route.rs+++ b/crates/openhuman-core/src/integrations/task_sources/route.rs@@ -16,12 +16,12 @@use serde_json::json;+use crate::config::Config;+use crate::cron::scheduler_gate;+use crate::security::turn_origin::with_origin;use crate::triage::{apply_decision, remote_trigger_origin, run_triage, TriageOutcome, TriggerEnvelope,};-use crate::security::turn_origin::with_origin;-use crate::config::Config;-use crate::cron::scheduler_gate;use super::types::{EnrichedTask, SourceTarget, TaskSource};diff --git a/crates/openhuman-core/src/integrations/task_sources/store_documents.rs b/crates/openhuman-core/src/integrations/task_sources/store_documents.rsindex 115e85a346..44b8cda1ea 100644--- a/crates/openhuman-core/src/integrations/task_sources/store_documents.rs+++ b/crates/openhuman-core/src/integrations/task_sources/store_documents.rs@@ -17,18 +17,18 @@//! fields (`created_ms`, `ingested_ms`) carry the ordering. Removing a source//! removes its ledger entries, which the SQL schema did with a cascade.-use anyhow::{Context, Result, anyhow};+use anyhow::{anyhow, Context, Result};use chrono::{DateTime, Utc};-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};use tinystoragedrivers::{CollectionSpec, Filter, IndexSpec, Precondition, Query, Sort, Versioned};-use super::store::{IngestedTaskRef, apply_patch, content_hash};+use super::store::{apply_patch, content_hash, IngestedTaskRef};use super::types::{FetchReason, FilterSpec, ProviderSlug, SourceTarget, TaskSource, TaskSourcePatch,};use crate::config::Config;use crate::integrations::composio::contract::NormalizedTask;-use crate::storage::documents::{Repo, compare_and_swap, text};+use crate::storage::documents::{compare_and_swap, text, Repo};use crate::storage::{DocumentStoreExt, StorageError};pub(super) const SOURCES: &str = "task_sources";@@ -216,7 +216,11 @@ impl Docs {.await?;docs.delete(SOURCES, &key, Precondition::None).await})?;- if removed { Ok(()) } else { Err(not_found(id)) }+ if removed {+ Ok(())+ } else {+ Err(not_found(id))+ }}pub(super) fn record_fetch(diff --git a/crates/openhuman-core/src/integrations/task_sources/store_import.rs b/crates/openhuman-core/src/integrations/task_sources/store_import.rsindex 5274654ca2..4f13818412 100644--- a/crates/openhuman-core/src/integrations/task_sources/store_import.rs+++ b/crates/openhuman-core/src/integrations/task_sources/store_import.rs@@ -15,11 +15,11 @@ use std::time::Duration;use anyhow::{Context, Result};use chrono::DateTime;use rusqlite::Connection;-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};-use super::store_documents::{INGESTED, SOURCES, ingested_id, to_doc};+use super::store_documents::{ingested_id, to_doc, INGESTED, SOURCES};use crate::config::Config;-use crate::storage::import::{ImportDoc, table_exists};+use crate::storage::import::{table_exists, ImportDoc};/// Reads every legacy row, after bringing an old schema forward (on the/// importer's scratch copy of the file).@@ -101,7 +101,7 @@ fn read_rows(conn: &Connection) -> Result<Vec<ImportDoc>> {#[path = "store_import_rows.rs"]mod store_rows;-use store_rows::{SELECT_SOURCE_COLUMNS, map_source_row};+use store_rows::{map_source_row, SELECT_SOURCE_COLUMNS};/// Tracks which task_sources database files have already had their schema DDL/// (the `CREATE TABLE`/`CREATE INDEX` batch plus the `add_column_if_missing`diff --git a/crates/openhuman-core/src/integrations/task_sources/store_import_tests.rs b/crates/openhuman-core/src/integrations/task_sources/store_import_tests.rsindex 64463941b0..f127924657 100644--- a/crates/openhuman-core/src/integrations/task_sources/store_import_tests.rs+++ b/crates/openhuman-core/src/integrations/task_sources/store_import_tests.rs@@ -2,7 +2,7 @@ use super::*;use crate::integrations::composio::contract::NormalizedTask;use crate::integrations::task_sources::store as live;use crate::integrations::task_sources::types::{FilterSpec, SourceTarget};-use crate::storage::import::{Outcome, run_with};+use crate::storage::import::{run_with, Outcome};use crate::storage::rusqlite::params;use serde_json::json;use tempfile::TempDir;@@ -124,15 +124,13 @@ fn legacy_sources_and_ledger_are_imported_once_and_the_file_is_left_alone() {assert_eq!(got.last_status.as_deref(), Some("periodic: ok"));assert!(live::was_ingested(&config, "src-1", "t-1").unwrap());assert!(live::was_ingested(&config, "src-2", "t-1").unwrap());- assert!(- live::is_ingested(- &config,- "src-1",- "t-1",- &live::content_hash(&task("t-1", "First"))- )- .unwrap()- );+ assert!(live::is_ingested(+ &config,+ "src-1",+ "t-1",+ &live::content_hash(&task("t-1", "First"))+ )+ .unwrap());let titles: Vec<_> = live::list_ingested(&config, "src-1", 10).unwrap().into_iter()diff --git a/crates/openhuman-core/src/integrations/test_support.rs b/crates/openhuman-core/src/integrations/test_support.rsindex 748fcae4e0..7b8b74ab59 100644--- a/crates/openhuman-core/src/integrations/test_support.rs+++ b/crates/openhuman-core/src/integrations/test_support.rs@@ -1,6 +1,6 @@-use axum::{Json, Router, routing::post};+use axum::{routing::post, Json, Router};use parking_lot::Mutex;-use serde_json::{Value, json};+use serde_json::{json, Value};use std::sync::Arc;#[derive(Debug, Clone, PartialEq)]diff --git a/crates/openhuman-core/src/integrations/types.rs b/crates/openhuman-core/src/integrations/types.rsindex 8d50657f4e..5f46682e9e 100644--- a/crates/openhuman-core/src/integrations/types.rs+++ b/crates/openhuman-core/src/integrations/types.rs@@ -120,7 +120,6 @@ pub struct ConnectedIntegrationTool {pub parameters: Option<serde_json::Value>,}-// ── Pricing types (fetched from backend) ────────────────────────────/// Per-integration pricing returned by `GET /agent-integrations/pricing`.diff --git a/crates/openhuman-core/src/lib.rs b/crates/openhuman-core/src/lib.rsindex 4929926867..d43f84b1e8 100644--- a/crates/openhuman-core/src/lib.rs+++ b/crates/openhuman-core/src/lib.rs@@ -78,9 +78,9 @@ pub mod memory;pub mod modules;pub mod plan_review;pub mod platform;+pub mod profiles;pub mod progress;pub mod prompts;-pub mod profiles;pub mod sandbox;pub mod search;pub mod security;diff --git a/crates/openhuman-core/src/mcp/server/resources.rs b/crates/openhuman-core/src/mcp/server/resources.rsindex 7d0d11f2b5..de0778e4bd 100644--- a/crates/openhuman-core/src/mcp/server/resources.rs+++ b/crates/openhuman-core/src/mcp/server/resources.rs@@ -19,7 +19,7 @@//! against `BUILTINS` in `loader.rs`. Adding a new built-in subagent without//! a matching catalog entry fails that test and therefore CI.-use serde_json::{Value, json};+use serde_json::{json, Value};use tinymcp_bus::{ResourceSpec, ToolCallError};/// Every bundled prompt is markdown.diff --git a/crates/openhuman-core/src/mcp/server/tools/dispatch.rs b/crates/openhuman-core/src/mcp/server/tools/dispatch.rsindex 14fec8a37b..92fa897b82 100644--- a/crates/openhuman-core/src/mcp/server/tools/dispatch.rs+++ b/crates/openhuman-core/src/mcp/server/tools/dispatch.rs@@ -1,5 +1,5 @@use crate::core::runtime::DispatchCtx;-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};use tinyinference_llm::tool::ToolSchema;use crate::agent::OpenHumanSessionHost;diff --git a/crates/openhuman-core/src/mcp/ui/tools.rs b/crates/openhuman-core/src/mcp/ui/tools.rsindex efba6f68cd..ffeb477da9 100644--- a/crates/openhuman-core/src/mcp/ui/tools.rs+++ b/crates/openhuman-core/src/mcp/ui/tools.rs@@ -9,12 +9,12 @@use std::path::{Component, Path, PathBuf};use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinytools::{PermissionLevel, Tool, ToolCallOptions, ToolExposure, ToolResult, ToolRunContext};use super::cache::{self, InlineEntry};use super::resolve::{MAX_RESOURCE_BYTES, MAX_STRUCTURED_BYTES};-use super::types::{MCP_APP_MIME, MCP_UI_KIND, McpUiPresentation, UiCsp, UiFlavor, UiResource};+use super::types::{McpUiPresentation, UiCsp, UiFlavor, UiResource, MCP_APP_MIME, MCP_UI_KIND};use tinymcp_bus::ui::extract_links;/// The tool's registered name.diff --git a/crates/openhuman-core/src/media/generation/artifact_tool.rs b/crates/openhuman-core/src/media/generation/artifact_tool.rsindex 22992f4a81..a90c4706f8 100644--- a/crates/openhuman-core/src/media/generation/artifact_tool.rs+++ b/crates/openhuman-core/src/media/generation/artifact_tool.rs@@ -358,27 +358,23 @@ impl<T: Tool> MediaArtifactTool<T> {.lock().unwrap_or_else(std::sync::PoisonError::into_inner).clone();- let artifacts = match crate::artifacts::store::list_artifacts(- &self.workspace_dir,- 0,- usize::MAX,- None,- )- .await- {- Ok((artifacts, _)) => artifacts,- Err(error) => {- tracing::warn!(- target: "media_generation",- %error,- "[media_generation] could not refresh reusable artifact paths"- );- return Err(+ let artifacts =+ match crate::artifacts::store::list_artifacts(&self.workspace_dir, 0, usize::MAX, None)+ .await+ {+ Ok((artifacts, _)) => artifacts,+ Err(error) => {+ tracing::warn!(+ target: "media_generation",+ %error,+ "[media_generation] could not refresh reusable artifact paths"+ );+ return Err("could not validate previously generated media references; retry the media call".to_string(),);- }- };+ }+ };for meta in artifacts.iter().filter(|meta| {matches!(&meta.kind, ArtifactKind::Image | ArtifactKind::Video)diff --git a/crates/openhuman-core/src/memory/lifecycle/session_hooks_tests.rs b/crates/openhuman-core/src/memory/lifecycle/session_hooks_tests.rsindex 5ded847bfa..b0cb9e3e6c 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::{SummaryPlacement, checkpoint_message};+use tinyagents_harness::summarization::{checkpoint_message, SummaryPlacement};use tinyinference_llm::ToolCall;fn assistant_with_call(id: &str, name: &str) -> Message {diff --git a/crates/openhuman-core/src/modules/tinybox/host_runtime_tests.rs b/crates/openhuman-core/src/modules/tinybox/host_runtime_tests.rsindex 836e842307..9044e4231a 100644--- a/crates/openhuman-core/src/modules/tinybox/host_runtime_tests.rs+++ b/crates/openhuman-core/src/modules/tinybox/host_runtime_tests.rs@@ -105,16 +105,12 @@ fn create_runtime_supports_native_and_docker_and_rejects_unknown() {/// adapter, which hands it to TinyBox on the native shell request.#[test]fn hide_window_reaches_the_native_runtime_only() {- assert!(- create_runtime(&RuntimeConfig::default(), true)- .unwrap()- .hide_window()- );- assert!(- !create_runtime(&RuntimeConfig::default(), false)- .unwrap()- .hide_window()- );+ assert!(create_runtime(&RuntimeConfig::default(), true)+ .unwrap()+ .hide_window());+ assert!(!create_runtime(&RuntimeConfig::default(), false)+ .unwrap()+ .hide_window());assert!(NativeRuntime::with_hide_window(true).hide_window());assert!(!NativeRuntime::new().hide_window());let docker = create_runtime(diff --git a/crates/openhuman-core/src/modules/wallet_host_tests.rs b/crates/openhuman-core/src/modules/wallet_host_tests.rsindex 62c3847c42..0b2888ca49 100644--- a/crates/openhuman-core/src/modules/wallet_host_tests.rs+++ b/crates/openhuman-core/src/modules/wallet_host_tests.rs@@ -23,11 +23,12 @@ fn x402_approval_is_bound_to_the_exact_chat_owner_and_payment_facts() {client_id: "client-1".into(),}),};- let origin = |thread: &str, client: &str| crate::security::turn_origin::AgentTurnOrigin::WebChat {- thread_id: thread.into(),- client_id: client.into(),- request_id: Some("request-1".into()),- };+ let origin =+ |thread: &str, client: &str| crate::security::turn_origin::AgentTurnOrigin::WebChat {+ thread_id: thread.into(),+ client_id: client.into(),+ request_id: Some("request-1".into()),+ };assert!(x402_request_owner_matches(&request,Some(&origin("thread-1", "client-1"))diff --git a/crates/openhuman-core/src/plan_review/gate_tests.rs b/crates/openhuman-core/src/plan_review/gate_tests.rsindex 84d72c3d7f..b4df1d4c4d 100644--- a/crates/openhuman-core/src/plan_review/gate_tests.rs+++ b/crates/openhuman-core/src/plan_review/gate_tests.rs@@ -135,19 +135,17 @@ async fn parked_review_for_thread_carries_tool_call_id_and_expiry() {parked.await.unwrap();// Decided reviews are no longer parked.- assert!(- gate.parked_review_for_thread(&tenant(), "t-replay")- .is_none()- );+ assert!(gate+ .parked_review_for_thread(&tenant(), "t-replay")+ .is_none());}#[tokio::test]async fn parked_review_for_thread_is_none_when_nothing_is_parked() {let gate = PlanReviewGate::new(Duration::from_secs(5));- assert!(- gate.parked_review_for_thread(&tenant(), "no-such-thread")- .is_none()- );+ assert!(gate+ .parked_review_for_thread(&tenant(), "no-such-thread")+ .is_none());}#[tokio::test]diff --git a/crates/openhuman-core/src/plan_review/schemas.rs b/crates/openhuman-core/src/plan_review/schemas.rsindex 88f08ea48d..c5906c5b5b 100644--- a/crates/openhuman-core/src/plan_review/schemas.rs+++ b/crates/openhuman-core/src/plan_review/schemas.rs@@ -2,8 +2,8 @@//! resolves a parked interactive turn (approve / reject / revise-with-feedback).use crate::core::runtime::DispatchCtx;-use serde::Deserialize;use serde::de::DeserializeOwned;+use serde::Deserialize;use serde_json::{Map, Value};use crate::core::all::{ControllerFuture, RegisteredController};@@ -54,7 +54,8 @@ pub fn schemas(function: &str) -> ControllerSchema {outputs: vec![FieldSchema {name: "resolved",ty: TypeSchema::Bool,- comment: "true if a parked turn was woken; false if the request was unknown/expired.",+ comment:+ "true if a parked turn was woken; false if the request was unknown/expired.",required: true,}],},diff --git a/crates/openhuman-core/src/plan_review/tool_tests.rs b/crates/openhuman-core/src/plan_review/tool_tests.rsindex df925a9a8d..f35ffc2810 100644--- a/crates/openhuman-core/src/plan_review/tool_tests.rs+++ b/crates/openhuman-core/src/plan_review/tool_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::security::turn_origin::with_origin;use crate::security::approval::ApprovalChatContext;+use crate::security::turn_origin::with_origin;/// The execution context the harness hands a tool dispatched inside a turn/// whose chat is `chat`.diff --git a/crates/openhuman-core/src/platform/cost/scope.rs b/crates/openhuman-core/src/platform/cost/scope.rsindex 7bc9da5de6..863748d4dc 100644--- a/crates/openhuman-core/src/platform/cost/scope.rs+++ b/crates/openhuman-core/src/platform/cost/scope.rs@@ -10,8 +10,8 @@//!//! [`CoreContext`]: crate::core::runtime::CoreContext-use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};use crate::core::runtime::DispatchCtx;+use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};use super::types::UsageScope;diff --git a/crates/openhuman-core/src/prompts/section_renderers.rs b/crates/openhuman-core/src/prompts/section_renderers.rsindex 2b8c026d5a..cd5d58c2b4 100644--- a/crates/openhuman-core/src/prompts/section_renderers.rs+++ b/crates/openhuman-core/src/prompts/section_renderers.rs@@ -2,8 +2,8 @@//! [`crate::prompts::sections`], plus the per-turn datetime stamp and the//! ambient-environment composer that `agents/<id>/prompt.rs` builders call.-use crate::prompts::sections::*;use crate::agent::prompts::types::*;+use crate::prompts::sections::*;use anyhow::Result;use std::sync::OnceLock;use tinytools_agent::dialect::ToolCallFormat;diff --git a/crates/openhuman-core/src/prompts/sections.rs b/crates/openhuman-core/src/prompts/sections.rsindex f3eadb9337..8c3bdf8c97 100644--- a/crates/openhuman-core/src/prompts/sections.rs+++ b/crates/openhuman-core/src/prompts/sections.rs@@ -10,8 +10,8 @@ use crate::prompts::{inject_workspace_file, sync_workspace_file};use anyhow::Result;use std::fmt::Write;use tinytools::ToolSpec;-use tinytools_agent::dialect::ToolCallFormat;use tinytools_agent::dialect::render_pformat_catalogue;+use tinytools_agent::dialect::ToolCallFormat;// ─────────────────────────────────────────────────────────────────────────────// Special sections (archetype, dynamic)diff --git a/crates/openhuman-core/src/security/approval/gate.rs b/crates/openhuman-core/src/security/approval/gate.rsindex 3c12d56307..6dafa49e08 100644--- a/crates/openhuman-core/src/security/approval/gate.rs+++ b/crates/openhuman-core/src/security/approval/gate.rs@@ -37,12 +37,12 @@ use std::time::Duration;use parking_lot::Mutex;use tokio::sync::oneshot;-#[cfg(test)]-use crate::security::turn_origin;-use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};use crate::config::Config;use crate::core::bus::BUS;use crate::core::events::DomainEvent;+#[cfg(test)]+use crate::security::turn_origin;+use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};use tinytools::status::POLICY_DENIED_MARKER;use super::store;diff --git a/crates/openhuman-core/src/security/approval/store_documents.rs b/crates/openhuman-core/src/security/approval/store_documents.rsindex 40ab9abe4f..a8d017fd49 100644--- a/crates/openhuman-core/src/security/approval/store_documents.rs+++ b/crates/openhuman-core/src/security/approval/store_documents.rs@@ -23,13 +23,13 @@use std::sync::Arc;-use anyhow::{Context, Result, anyhow};+use anyhow::{anyhow, Context, Result};use chrono::{DateTime, Utc};-use serde_json::{Value, json};+use serde_json::{json, Value};use crate::config::Config;use crate::storage::local;-use crate::storage::{DocumentStore, DocumentStoreExt, ScopedStorage, StorageError, block_on};+use crate::storage::{block_on, DocumentStore, DocumentStoreExt, ScopedStorage, StorageError};use tinystoragedrivers::{CollectionSpec, ErrorKind, Filter, IndexSpec, Precondition, Query, Sort, Versioned,};diff --git a/crates/openhuman-core/src/security/approval/store_import.rs b/crates/openhuman-core/src/security/approval/store_import.rsindex 3fd4d96b65..71cd5ecbcc 100644--- a/crates/openhuman-core/src/security/approval/store_import.rs+++ b/crates/openhuman-core/src/security/approval/store_import.rs@@ -8,14 +8,14 @@//! expiry key, optional columns left out when NULL. The legacy file is only//! ever opened here, by the storage importer, on a scratch copy of it.-use crate::storage::rusqlite::{Connection, params};+use crate::storage::rusqlite::{params, Connection};use anyhow::{Context, Result};use chrono::{DateTime, Utc};-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};-use super::store_documents::{APPROVALS, FLOW_TRUST, expiry_key, rfc3339, trust_id};+use super::store_documents::{expiry_key, rfc3339, trust_id, APPROVALS, FLOW_TRUST};use crate::config::Config;-use crate::storage::import::{ImportDoc, table_exists};+use crate::storage::import::{table_exists, ImportDoc};/// SQL schema of the legacy database, applied on every `with_connection` call.///diff --git a/crates/openhuman-core/src/security/approval/store_import_tests.rs b/crates/openhuman-core/src/security/approval/store_import_tests.rsindex 4868396915..3d4e5f6da2 100644--- a/crates/openhuman-core/src/security/approval/store_import_tests.rs+++ b/crates/openhuman-core/src/security/approval/store_import_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::security::approval::store as live;use crate::security::approval::types::{ApprovalDecision, ApprovalSourceContext};-use crate::storage::import::{Outcome, run_with};+use crate::storage::import::{run_with, Outcome};use crate::storage::rusqlite;use chrono::{Duration, Utc};use tempfile::TempDir;diff --git a/crates/openhuman-core/src/security/devices/store_documents.rs b/crates/openhuman-core/src/security/devices/store_documents.rsindex 4a94b79c4b..9e8f7bd143 100644--- a/crates/openhuman-core/src/security/devices/store_documents.rs+++ b/crates/openhuman-core/src/security/devices/store_documents.rs@@ -13,13 +13,13 @@use anyhow::Result;use chrono::Utc;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinystoragedrivers::{CollectionSpec, Filter, IndexSpec, Precondition, Query, Sort, Versioned};use crate::config::Config;use crate::security::devices::types::PairedDevice;+use crate::storage::documents::{compare_and_swap, text, Repo};use crate::storage::DocumentStoreExt;-use crate::storage::documents::{Repo, compare_and_swap, text};pub(super) const DEVICES: &str = "paired_devices";const DOMAIN: &str = "devices::store";diff --git a/crates/openhuman-core/src/security/devices/store_import.rs b/crates/openhuman-core/src/security/devices/store_import.rsindex f14111c959..b903ceb407 100644--- a/crates/openhuman-core/src/security/devices/store_import.rs+++ b/crates/openhuman-core/src/security/devices/store_import.rs@@ -8,11 +8,11 @@use crate::storage::rusqlite;use anyhow::{Context, Result};use rusqlite::Connection;-use serde_json::{Value, json};+use serde_json::{json, Value};use super::store_documents::DEVICES;use crate::config::Config;-use crate::storage::import::{ImportDoc, table_exists};+use crate::storage::import::{table_exists, ImportDoc};/// The legacy database, `<workspace>/devices/devices.db`.pub(crate) fn db_path(config: &Config) -> std::path::PathBuf {diff --git a/crates/openhuman-core/src/security/devices/store_import_tests.rs b/crates/openhuman-core/src/security/devices/store_import_tests.rsindex 5923e00685..fb482e1b9f 100644--- a/crates/openhuman-core/src/security/devices/store_import_tests.rs+++ b/crates/openhuman-core/src/security/devices/store_import_tests.rs@@ -1,6 +1,6 @@use super::*;use crate::security::devices::store as live;-use crate::storage::import::{Outcome, run_with};+use crate::storage::import::{run_with, Outcome};use tempfile::TempDir;fn workspace() -> (TempDir, Config) {diff --git a/crates/openhuman-core/src/security/mod.rs b/crates/openhuman-core/src/security/mod.rsindex 86ce67aa16..6cf0486e44 100644--- a/crates/openhuman-core/src/security/mod.rs+++ b/crates/openhuman-core/src/security/mod.rs@@ -20,39 +20,39 @@ pub mod pairing;pub mod policy;pub mod prompt_injection;pub mod scrub;-pub mod turn_origin;pub mod secret_storage;pub(crate) mod secure_open;+pub mod turn_origin;#[allow(unused_imports)]pub use self::secret_storage::SecretStore;#[allow(unused_imports)]pub use audit::{- AuditEvent, AuditEventType, AuditLogger, CommandExecutionLog,- get_or_create_workspace_audit_logger,+ get_or_create_workspace_audit_logger, AuditEvent, AuditEventType, AuditLogger,+ CommandExecutionLog,};pub use core::*;#[allow(unused_imports)]pub use egress::{- DataKind, EgressDescriptor, EgressReason, IdentificationRisk, emit_external_transfer,- enforce_egress, local_only_blocks, local_only_tool_block,+ emit_external_transfer, enforce_egress, local_only_blocks, local_only_tool_block, DataKind,+ EgressDescriptor, EgressReason, IdentificationRisk,};pub use ops as rpc;pub use ops::*;+pub use policy::validate_path_within_root;#[allow(unused_imports)]pub use policy::AutonomyLevel;#[allow(unused_imports)]pub use policy::GateDecision;pub use policy::SecurityPolicy;pub use policy::ToolOperation;-pub use policy::validate_path_within_root;+pub use policy::{ensure_openhuman_scratch_dir, openhuman_scratch_dir};#[allow(unused_imports)]pub use policy::{TrustedAccess, TrustedRoot};-pub use policy::{ensure_openhuman_scratch_dir, openhuman_scratch_dir};#[allow(unused_imports)]pub use {- pairing::CORE_TOKEN_ENV_VAR, pairing::CoreBindTokenError,- pairing::ensure_core_rpc_token_for_bind, pairing::is_public_bind,+ pairing::ensure_core_rpc_token_for_bind, pairing::is_public_bind, pairing::CoreBindTokenError,+ pairing::CORE_TOKEN_ENV_VAR,};pub use schemas::{diff --git a/crates/openhuman-core/src/security/policy/path_checks.rs b/crates/openhuman-core/src/security/policy/path_checks.rsindex d5d96824c0..6b48350b97 100644--- a/crates/openhuman-core/src/security/policy/path_checks.rs+++ b/crates/openhuman-core/src/security/policy/path_checks.rs@@ -678,35 +678,29 @@ impl SecurityPolicy {return false;}- let artifacts = match crate::artifacts::store::list_artifacts(- &self.workspace_dir,- 0,- usize::MAX,- None,- )- .await- {- Ok((artifacts, _)) => artifacts,- Err(error) => {- tracing::warn!(- target: "security",- %error,- "[security] could not resolve a media artifact read"- );- return false;- }- };+ let artifacts =+ match crate::artifacts::store::list_artifacts(&self.workspace_dir, 0, usize::MAX, None)+ .await+ {+ Ok((artifacts, _)) => artifacts,+ Err(error) => {+ tracing::warn!(+ target: "security",+ %error,+ "[security] could not resolve a media artifact read"+ );+ return false;+ }+ };for meta in artifacts.iter().filter(|meta| {matches!(&meta.kind,- crate::artifacts::ArtifactKind::Image- | crate::artifacts::ArtifactKind::Video+ crate::artifacts::ArtifactKind::Image | crate::artifacts::ArtifactKind::Video) && matches!(&meta.status, crate::artifacts::ArtifactStatus::Ready)}) {let Ok(ready_path) =- crate::artifacts::resolve_ready_file_meta(&self.workspace_dir, &roots, meta)- .await+ crate::artifacts::resolve_ready_file_meta(&self.workspace_dir, &roots, meta).awaitelse {continue;};diff --git a/crates/openhuman-core/src/security/secure_open.rs b/crates/openhuman-core/src/security/secure_open.rsindex 3241e0e72c..90ded84a34 100644--- a/crates/openhuman-core/src/security/secure_open.rs+++ b/crates/openhuman-core/src/security/secure_open.rs@@ -100,7 +100,7 @@ pub(crate) fn secure_open() -> std::io::Result<std::fs::File> {use std::os::windows::io::AsRawHandle;use windows_sys::Win32::Storage::FileSystem::{- FILE_NAME_NORMALIZED, GetFinalPathNameByHandleW, VOLUME_NAME_DOS,+ GetFinalPathNameByHandleW, FILE_NAME_NORMALIZED, VOLUME_NAME_DOS,};use std::os::windows::ffi::OsStringExt;diff --git a/crates/openhuman-core/src/security/turn_origin_tests.rs b/crates/openhuman-core/src/security/turn_origin_tests.rsindex 985d2e3825..dae8a7724f 100644--- a/crates/openhuman-core/src/security/turn_origin_tests.rs+++ b/crates/openhuman-core/src/security/turn_origin_tests.rs@@ -353,7 +353,7 @@ struct StateProbe;/// `scoped` answer as they do when nothing is scoped.#[tokio::test]async fn a_bare_origin_scope_is_invisible_to_every_other_reader() {- use crate::core::runtime::{CoreContext, DispatchCtx, slot_for};+ use crate::core::runtime::{slot_for, CoreContext, DispatchCtx};let outside_slot = slot_for::<StateProbe>(&DispatchCtx::ambient());let outside_current = CoreContext::current();diff --git a/crates/openhuman-core/src/sessions/schemas.rs b/crates/openhuman-core/src/sessions/schemas.rsindex 8ed6c154e3..26c96f2581 100644--- a/crates/openhuman-core/src/sessions/schemas.rs+++ b/crates/openhuman-core/src/sessions/schemas.rs@@ -3,8 +3,8 @@use crate::core::runtime::DispatchCtx;use serde_json::{Map, Value};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};use tinyagents_session::run_ledger::{AgentRunListRequest, RunEventListRequest};@@ -39,7 +39,8 @@ fn schema_for(function: &str) -> ControllerSchema {"run_ledger_list" => ControllerSchema {namespace: "run_ledger",function: "list",- description: "List durable agent/workflow run ledger rows with optional filters and pagination.",+ description:+ "List durable agent/workflow run ledger rows with optional filters and pagination.",inputs: vec![optional_str("status", "Filter by run status."),optional_str("kind", "Filter by run kind."),diff --git a/crates/openhuman-core/src/sessions/schemas_tests.rs b/crates/openhuman-core/src/sessions/schemas_tests.rsindex 5cdf45175f..6204a3ed35 100644--- a/crates/openhuman-core/src/sessions/schemas_tests.rs+++ b/crates/openhuman-core/src/sessions/schemas_tests.rs@@ -7,11 +7,9 @@ fn all_controller_schemas_lists_registered_functions() {assert_eq!(schemas.len(), 3);// The six read-only `session_db` controllers were removed in #6082; only the// durable run-ledger read surface remains here.- assert!(- schemas- .iter()- .all(|schema| schema.namespace == "run_ledger")- );+ assert!(schemas+ .iter()+ .all(|schema| schema.namespace == "run_ledger"));}/// The removed `session_db` surface must stay removed: none of the six read@@ -65,11 +63,10 @@ fn schema_for_run_ledger_events_requires_run_id() {let s = schema_for("run_ledger_events");assert_eq!(s.namespace, "run_ledger");assert_eq!(s.function, "events");- assert!(- s.inputs- .iter()- .any(|input| input.name == "runId" && input.required)- );+ assert!(s+ .inputs+ .iter()+ .any(|input| input.name == "runId" && input.required));}#[test]diff --git a/crates/openhuman-core/src/skills/catalog/agent/skill_setup/prompt.rs b/crates/openhuman-core/src/skills/catalog/agent/skill_setup/prompt.rsindex f0a7d78b8c..25a3fabbb3 100644--- a/crates/openhuman-core/src/skills/catalog/agent/skill_setup/prompt.rs+++ b/crates/openhuman-core/src/skills/catalog/agent/skill_setup/prompt.rs@@ -1,6 +1,6 @@//! System prompt builder for the `skill_setup` built-in agent.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_safety, render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rsindex 82ff2b6fb8..76f082291d 100644--- a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs+++ b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs@@ -28,13 +28,13 @@ use async_trait::async_trait;use parking_lot::Mutex;use crate::agent::harness::run_channel_turn_via_graph;-use crate::skills::run_workflow::RunWorkflowTool;use crate::config::{Config, MultimodalConfig, MultimodalFileConfig};use crate::skills::ops_create::{create_workflow_inner, CreateWorkflowParams, WorkflowCreateInputDef,};use crate::skills::registry::get_workflow;use crate::skills::run_log;+use crate::skills::run_workflow::RunWorkflowTool;use crate::skills::runtime::await_run_outcome;use tinyagents_session::transcript::TranscriptMessage;use tinyinference_llm::message::AssistantMessage;diff --git a/crates/openhuman-core/src/skills/run_workflow_tests.rs b/crates/openhuman-core/src/skills/run_workflow_tests.rsindex 728611aba4..86f4899d05 100644--- a/crates/openhuman-core/src/skills/run_workflow_tests.rs+++ b/crates/openhuman-core/src/skills/run_workflow_tests.rs@@ -183,7 +183,7 @@ fn account_spawn_trips_the_process_backstop() {#[tokio::test]async fn each_agent_owns_its_workflow_await_guard() {use crate::core::runtime::agent_scope::test_agent_context;- use crate::core::runtime::{DomainSet, context::CoreContext};+ use crate::core::runtime::{context::CoreContext, DomainSet};let root = CoreContext::for_test(DomainSet::full(), None);let alpha = test_agent_context(&root, "alpha");let beta = test_agent_context(&root, "beta");diff --git a/crates/openhuman-core/src/storage/import/mod.rs b/crates/openhuman-core/src/storage/import/mod.rsindex fa29afea71..714851b498 100644--- a/crates/openhuman-core/src/storage/import/mod.rs+++ b/crates/openhuman-core/src/storage/import/mod.rs@@ -52,14 +52,14 @@ pub use schemas::{use std::path::Path;use std::sync::Arc;-use anyhow::{Context, Result, anyhow};+use anyhow::{anyhow, Context, Result};use serde_json::json;use sha2::Digest;use tinystoragedrivers::{CollectionSpec, ErrorKind, Precondition};use super::documents::Repo;use super::rusqlite;-use super::{Scope, StorageBackend, block_on};+use super::{block_on, Scope, StorageBackend};use crate::config::Config;use rusqlite::Connection;use serde_json::Value;diff --git a/crates/openhuman-core/src/storage/import/schemas.rs b/crates/openhuman-core/src/storage/import/schemas.rsindex 3b0da2ee8e..75ed798888 100644--- a/crates/openhuman-core/src/storage/import/schemas.rs+++ b/crates/openhuman-core/src/storage/import/schemas.rs@@ -3,10 +3,10 @@use crate::core::runtime::DispatchCtx;use serde::Deserialize;-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};#[derive(Debug, Deserialize, Default)]diff --git a/crates/openhuman-core/src/storage/import/sessions.rs b/crates/openhuman-core/src/storage/import/sessions.rsindex abcc83807c..5511184a65 100644--- a/crates/openhuman-core/src/storage/import/sessions.rs+++ b/crates/openhuman-core/src/storage/import/sessions.rs@@ -32,17 +32,17 @@ use std::path::{Path, PathBuf};use std::sync::Arc;use anyhow::{Context, Result};-use tinyagents_session::DriverSessionStores;use tinyagents_session::legacy::{- QuiescentSource, SourceOwner, import_transcripts, import_turn_states,+ import_transcripts, import_turn_states, QuiescentSource, SourceOwner,};-use tinyagents_session::transcript::{SessionRef, session_stem};+use tinyagents_session::transcript::{session_stem, SessionRef};+use tinyagents_session::DriverSessionStores;use super::tinyflows::{finish, marked};use super::{Outcome, Report, Snapshot};use crate::config::Config;-use crate::storage::StorageBackend;use crate::storage::sessions::DEFAULT_AGENT;+use crate::storage::StorageBackend;/// The marker name of the session import.pub const SESSIONS_DOMAIN: &str = "sessions";diff --git a/crates/openhuman-core/src/storage/mod.rs b/crates/openhuman-core/src/storage/mod.rsindex fdf2fd0703..0e8d2d2148 100644--- a/crates/openhuman-core/src/storage/mod.rs+++ b/crates/openhuman-core/src/storage/mod.rs@@ -60,8 +60,8 @@ pub use tinystoragedrivers::{ScopedStorage, StorageBackend, StorageConfig as StorageUrl, StorageError,};-use crate::config::Config;use crate::config::schema::storage::redact_url;+use crate::config::Config;/// The environment variable that overrides `[storage] url`.pub const STORAGE_URL_VAR: &str = "OPENHUMAN_STORAGE_URL";diff --git a/crates/openhuman-core/src/storage/rebind.rs b/crates/openhuman-core/src/storage/rebind.rsindex f67708f1f0..c80e5c6b44 100644--- a/crates/openhuman-core/src/storage/rebind.rs+++ b/crates/openhuman-core/src/storage/rebind.rs@@ -21,8 +21,8 @@ use std::sync::Arc;use anyhow::{Context, Result};-use super::StorageBackend;use super::import;+use super::StorageBackend;use crate::config::Config;/// What a rebind did.diff --git a/crates/openhuman-core/src/storage/sessions/mod.rs b/crates/openhuman-core/src/storage/sessions/mod.rsindex 000b24e281..3dc8d79a4a 100644--- a/crates/openhuman-core/src/storage/sessions/mod.rs+++ b/crates/openhuman-core/src/storage/sessions/mod.rs@@ -22,12 +22,12 @@ use tinyagents_session::port::{AgentStores, SessionStoreProvider};mod rebound;mod workspace;-pub use rebound::{ReboundSessionStores, StoreRegistry, rebind_all};+pub use rebound::{rebind_all, ReboundSessionStores, StoreRegistry};pub use workspace::{- WorkspaceSessionStores, artifact_blobs_for, attachment_stash_for, current_documents_for,- default_turn_states_for, ledger_for, provider_for_workspace, release_workspace,- release_workspace_defaults, require_ledger, status_store_for, stores_for, stores_or_ephemeral,- turn_states_for, with_ledger, with_ledger_async,+ artifact_blobs_for, attachment_stash_for, current_documents_for, default_turn_states_for,+ ledger_for, provider_for_workspace, release_workspace, release_workspace_defaults,+ require_ledger, status_store_for, stores_for, stores_or_ephemeral, turn_states_for,+ with_ledger, with_ledger_async, WorkspaceSessionStores,};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 2fbd5afda7..549e277dd4 100644--- a/crates/openhuman-core/src/storage/sessions/mod_tests.rs+++ b/crates/openhuman-core/src/storage/sessions/mod_tests.rs@@ -318,13 +318,11 @@ 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/rebound.rs b/crates/openhuman-core/src/storage/sessions/rebound.rsindex e5582b8fd9..30b77019bf 100644--- a/crates/openhuman-core/src/storage/sessions/rebound.rs+++ b/crates/openhuman-core/src/storage/sessions/rebound.rs@@ -13,8 +13,8 @@use std::sync::{Arc, LazyLock, Mutex, PoisonError, RwLock, Weak};-use tinyagents_session::DriverSessionStores;use tinyagents_session::port::{AgentStores, SessionStoreProvider};+use tinyagents_session::DriverSessionStores;use tinystoragedrivers::{Blocking, StorageBackend, StorageError};/// The live [`ReboundSessionStores`] of one owner, so a rebind reaches the onediff --git a/crates/openhuman-core/src/storage/sessions/workspace.rs b/crates/openhuman-core/src/storage/sessions/workspace.rsindex f2a9d1e543..1af57b2d8f 100644--- a/crates/openhuman-core/src/storage/sessions/workspace.rs+++ b/crates/openhuman-core/src/storage/sessions/workspace.rs@@ -18,9 +18,9 @@ use std::path::{Path, PathBuf};use std::sync::{Arc, LazyLock, Mutex, PoisonError};use tinyagents_harness::multimodal::BlobAttachmentStash;-use tinyagents_session::DriverSessionStores;use tinyagents_session::port::{AgentStores, SessionStoreProvider, TurnStates};use tinyagents_session::run_ledger::{LedgerError, LedgerResult, RunLedgerStore};+use tinyagents_session::DriverSessionStores;use tinystoragedrivers::{BlobStore, DocumentStore, MemoryStorage, StorageBackend};/// One fallback provider and the backend it was built over.diff --git a/crates/openhuman-core/src/tools/delegate.rs b/crates/openhuman-core/src/tools/delegate.rsindex 23c1fbbb7d..54a2a70a55 100644--- a/crates/openhuman-core/src/tools/delegate.rs+++ b/crates/openhuman-core/src/tools/delegate.rs@@ -1,9 +1,9 @@use crate::config::DelegateAgentConfig;use crate::inference::provider::{- INFERENCE_BACKEND_ID, OpenHumanBackendModel, ProviderRuntimeOptions,+ OpenHumanBackendModel, ProviderRuntimeOptions, INFERENCE_BACKEND_ID,};-use crate::security::SecurityPolicy;use crate::security::policy::ToolOperation;+use crate::security::SecurityPolicy;use crate::tools::timeout::tool_execution_timeout_secs;use async_trait::async_trait;use serde_json::json;diff --git a/crates/openhuman-core/src/tools/impl/browser/browser.rs b/crates/openhuman-core/src/tools/impl/browser/browser.rsindex ae18bf3a9d..30e19bc401 100644--- a/crates/openhuman-core/src/tools/impl/browser/browser.rs+++ b/crates/openhuman-core/src/tools/impl/browser/browser.rs@@ -10,18 +10,18 @@ mod task_actions;#[path = "browser_unattended.rs"]mod unattended;use crate::modules::browser::BrowserClient;-use crate::security::SecurityPolicy;use crate::security::approval::{ApprovalGate, GateOutcome};use crate::security::turn_origin::AgentTurnOrigin;+use crate::security::SecurityPolicy;use async_trait::async_trait;-use pending::{Pending, approval_target, needs_host_confirmation};-use serde_json::{Value, json};-#[cfg(test)]-use session_pool::{MAX_THREAD_SESSIONS, SESSION_IDLE_TTL};+use pending::{approval_target, needs_host_confirmation, Pending};+use serde_json::{json, Value};use session_pool::{- ThreadSession, browser_session_fingerprint, evict_thread_sessions, requires_rebind,- thread_sessions,+ browser_session_fingerprint, evict_thread_sessions, requires_rebind, thread_sessions,+ ThreadSession,};+#[cfg(test)]+use session_pool::{MAX_THREAD_SESSIONS, SESSION_IDLE_TTL};use sha2::{Digest, Sha256};#[cfg(test)]use std::{collections::HashMap, time::Duration};diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rs b/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rsindex a86ec197c7..79e1f45555 100644--- a/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rs+++ b/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rs@@ -108,10 +108,10 @@ fn direct_actions_decode_through_the_bus_tool_args() {assert!(direct_action(&json!({"action":"click"})).is_err());assert!(direct_action(&json!({"action":"scroll","direction":"diagonal"})).is_err());assert!(direct_action(&json!({"action":"arbitrary_script"})).is_err());- assert!(- direct_action(&json!({"action":"find","by":"text","value":"Save","find_action":"text"}))- .is_ok()- );+ assert!(direct_action(+ &json!({"action":"find","by":"text","value":"Save","find_action":"text"})+ )+ .is_ok());}#[test]@@ -165,14 +165,13 @@ async fn needs_approval_view_is_held_behind_a_token_and_cleared_by_other_states(let output = tool.report(paused).await.unwrap();let token = output["pending"]["token"].as_str().unwrap().to_owned();assert_eq!(output["pending"]["task_id"], "t-1");- assert!(- tool.pending- .lock()- .await- .as_ref()- .unwrap()- .matches(&json!({"token": token}))- );+ assert!(tool+ .pending+ .lock()+ .await+ .as_ref()+ .unwrap()+ .matches(&json!({"token": token})));let done: TaskView = serde_json::from_value(json!({"id": "t-1",@@ -470,7 +469,7 @@ impl tinytools::ToolRunContext for ThreadOnly {#[tokio::test]async fn two_agents_on_one_thread_get_distinct_browser_session_keys() {use crate::core::runtime::agent_scope::test_agent_context;- use crate::core::runtime::{DomainSet, context::CoreContext};+ use crate::core::runtime::{context::CoreContext, DomainSet};let root = CoreContext::for_test(DomainSet::full(), None);let client = Arc::new(BrowserClient::new(Arc::new(crate::config::Config::default(),diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_open_tests.rs b/crates/openhuman-core/src/tools/impl/browser/browser_open_tests.rsindex 1dab6f8cc2..84bf885645 100644--- a/crates/openhuman-core/src/tools/impl/browser/browser_open_tests.rs+++ b/crates/openhuman-core/src/tools/impl/browser/browser_open_tests.rs@@ -7,10 +7,9 @@ fn simple_open_still_obeys_shared_website_policy() {let client = Arc::new(BrowserClient::new(Arc::new(config)));let tool = BrowserOpenTool::new(Arc::new(SecurityPolicy::default()), client);assert_eq!(tool.exposure(), tinytools::ToolExposure::Deferred);- assert!(- tool.validate_url("https://www.selenium.dev/selenium/web/web-form.html")- .is_ok()- );+ assert!(tool+ .validate_url("https://www.selenium.dev/selenium/web/web-form.html")+ .is_ok());assert!(tool.validate_url("https://example.com").is_err());assert!(tool.validate_url("http://selenium.dev").is_err());assert!(tool.validate_url("https://localhost/").is_err());diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rs b/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rsindex 972a77f58a..1e2ff3c66f 100644--- a/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rs+++ b/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rs@@ -2,12 +2,12 @@use super::Pending;use crate::security::approval::{ApprovalGate, GateOutcome};-use serde_json::{Value, json};+use serde_json::{json, Value};use sha2::{Digest, Sha256};use std::collections::BTreeMap;use tinycomputer_bus::agent::{TaskStatus, TaskView};-use tinycomputer_bus::browser::Action;use tinycomputer_bus::browser::tool::ToolArgs;+use tinycomputer_bus::browser::Action;/// What the host adds to a task report the agent cannot act on alone: a/// task that failed because Chrome was not found, or would not start fromdiff --git a/crates/openhuman-core/src/tools/impl/browser/browser_unattended_tests.rs b/crates/openhuman-core/src/tools/impl/browser/browser_unattended_tests.rsindex d1ef42d798..58322fc929 100644--- a/crates/openhuman-core/src/tools/impl/browser/browser_unattended_tests.rs+++ b/crates/openhuman-core/src/tools/impl/browser/browser_unattended_tests.rs@@ -1,6 +1,6 @@use super::super::pending::Pending;-use super::super::session_pool::{ThreadSession, browser_session_fingerprint, thread_sessions};-use super::super::{BrowserTool, approve_browser_action, task_actions::approve_task_action};+use super::super::session_pool::{browser_session_fingerprint, thread_sessions, ThreadSession};+use super::super::{approve_browser_action, task_actions::approve_task_action, BrowserTool};use super::*;use crate::core::runtime::{CoreContext, DomainSet};use crate::modules::browser::BrowserClient;diff --git a/crates/openhuman-core/src/tools/impl/document/mod.rs b/crates/openhuman-core/src/tools/impl/document/mod.rsindex 11a5bede04..c5b3a76640 100644--- a/crates/openhuman-core/src/tools/impl/document/mod.rs+++ b/crates/openhuman-core/src/tools/impl/document/mod.rs@@ -30,7 +30,7 @@ use std::sync::Arc;use std::time::Duration;use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use crate::artifacts::production::Production;use crate::security::SecurityPolicy;@@ -56,7 +56,7 @@ mod types;#[path = "document_tests.rs"]mod tests;-use self::types::{GenerateDocumentInput, GenerateDocumentOutput, validate_input};+use self::types::{validate_input, GenerateDocumentInput, GenerateDocumentOutput};/// Generation timeout. `docx-rs` typically completes the full section cap/// in well under a second; the 30 s ceiling is a defensive bound againstdiff --git a/crates/openhuman-core/src/tools/impl/document/types.rs b/crates/openhuman-core/src/tools/impl/document/types.rsindex 36b5232c8a..1748627068 100644--- a/crates/openhuman-core/src/tools/impl/document/types.rs+++ b/crates/openhuman-core/src/tools/impl/document/types.rs@@ -27,8 +27,8 @@ use crate::modules::documents::DocumentCallError;// are the same ones the module validates against, which is the whole reason// `spec` is separable.pub use crate::tools::implementations::document::format::spec::document::{- DocumentSpec as GenerateDocumentInput, MAX_BULLETS_PER_SECTION, MAX_PARAGRAPH_CHARS,- MAX_PARAGRAPHS_PER_SECTION, MAX_SECTIONS, MAX_TEXT_CHARS,+ DocumentSpec as GenerateDocumentInput, MAX_BULLETS_PER_SECTION, MAX_PARAGRAPHS_PER_SECTION,+ MAX_PARAGRAPH_CHARS, MAX_SECTIONS, MAX_TEXT_CHARS,};// `sections` is a `Vec<DocumentSection>`, so anything constructing an inputdiff --git a/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rs b/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rsindex f13b30caf8..08e68815e0 100644--- a/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rs+++ b/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rs@@ -3,8 +3,8 @@//! ([`super::gate::security_scoped_to_root`]).use super::gate::security_scoped_to_root;-use crate::security::SecurityPolicy;use crate::security::policy::TrustedAccess;+use crate::security::SecurityPolicy;use std::path::Path;use tinyagents_harness::context::{RunConfig, RunContext};use tinyagents_harness::tool::ToolExecutionContext;diff --git a/crates/openhuman-core/src/tools/impl/network/gate.rs b/crates/openhuman-core/src/tools/impl/network/gate.rsindex 510f5f9ede..d516e012ec 100644--- a/crates/openhuman-core/src/tools/impl/network/gate.rs+++ b/crates/openhuman-core/src/tools/impl/network/gate.rs@@ -8,7 +8,7 @@use tinytools_std::network::NetGate;use crate::security::egress::{- DataKind, EgressDescriptor, emit_external_transfer, local_only_tool_block,+ emit_external_transfer, local_only_tool_block, DataKind, EgressDescriptor,};use crate::security::{GateDecision, SecurityPolicy};use tinybox_bus::CommandClass;diff --git a/crates/openhuman-core/src/tools/impl/network/gitbooks.rs b/crates/openhuman-core/src/tools/impl/network/gitbooks.rsindex 5d9230dfad..4df17419b0 100644--- a/crates/openhuman-core/src/tools/impl/network/gitbooks.rs+++ b/crates/openhuman-core/src/tools/impl/network/gitbooks.rs@@ -3,7 +3,7 @@use crate::{config::Config, inference::provider::factory::redact_endpoint};use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use std::time::Duration;use tinybus::module::ModuleClient;use tinytools::{PermissionLevel, Tool, ToolResult};diff --git a/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rs b/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rsindex a64b22acdd..e346f88a44 100644--- a/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rs+++ b/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rs@@ -58,7 +58,7 @@ impl MockTinyMcp {async fn mock_module_client(state: MockProviderState,) -> (ModuleClient, tinybus::Connection, MockProviderState) {- use tinybus::{Connection, ObjectPath, broker::Broker, transport::memory::MemoryBus};+ use tinybus::{broker::Broker, transport::memory::MemoryBus, Connection, ObjectPath};let bus = MemoryBus::new();Broker::new().spawn(bus.clone());@@ -115,17 +115,13 @@ async fn gitbooks_tools_fail_closed_when_the_module_is_not_attested() {.expect("page fetch executes");assert!(search_result.is_error, "{}", search_result.output());- assert!(- search_result- .output()- .contains("MODULE_CALL_REPORTED: module transport failed")- );+ assert!(search_result+ .output()+ .contains("MODULE_CALL_REPORTED: module transport failed"));assert!(page_result.is_error, "{}", page_result.output());- assert!(- page_result- .output()- .contains("MODULE_CALL_REPORTED: module transport failed")- );+ assert!(page_result+ .output()+ .contains("MODULE_CALL_REPORTED: module transport failed"));assert!(module_calls.callsdiff --git a/crates/openhuman-core/src/tools/impl/network/gmail_unsubscribe_tests.rs b/crates/openhuman-core/src/tools/impl/network/gmail_unsubscribe_tests.rsindex 1cc07b9b74..fcfc1f9dcd 100644--- a/crates/openhuman-core/src/tools/impl/network/gmail_unsubscribe_tests.rs+++ b/crates/openhuman-core/src/tools/impl/network/gmail_unsubscribe_tests.rs@@ -44,11 +44,9 @@ async fn test_gmail_unsubscribe_empty_link() {.unwrap();assert!(result.is_error);- assert!(- result- .text()- .contains("without a valid List-Unsubscribe link")- );+ assert!(result+ .text()+ .contains("without a valid List-Unsubscribe link"));}#[tokio::test]@@ -62,9 +60,7 @@ async fn test_gmail_unsubscribe_missing_link() {.unwrap();assert!(result.is_error);- assert!(- result- .text()- .contains("without a valid List-Unsubscribe link")- );+ assert!(result+ .text()+ .contains("without a valid List-Unsubscribe link"));}diff --git a/crates/openhuman-core/src/tools/impl/network/host.rs b/crates/openhuman-core/src/tools/impl/network/host.rsindex 4f7eecd931..e49d25cb44 100644--- a/crates/openhuman-core/src/tools/impl/network/host.rs+++ b/crates/openhuman-core/src/tools/impl/network/host.rs@@ -16,10 +16,10 @@ use tinytools_std::network::{use super::gate::RoutedGate;use crate::config::HttpRequestConfig;-use crate::security::SecurityPolicy;use crate::security::approval::ApprovalChatContext;+use crate::security::SecurityPolicy;use crate::tools::per_call::PerCallTool;-use {tinyjuice_bus::tools::SUMMARY_FOCUS_ARG, tinyjuice_bus::tools::summary_focus_property};+use {tinyjuice_bus::tools::summary_focus_property, tinyjuice_bus::tools::SUMMARY_FOCUS_ARG};/// The fallbacks for a `0` limit, from the `[http_request]` schema defaults, so/// the tools, the schema and the 5→6 migration share one source.diff --git a/crates/openhuman-core/src/tools/impl/network/host_tests.rs b/crates/openhuman-core/src/tools/impl/network/host_tests.rsindex 22caaa71cd..66a7ae4eab 100644--- a/crates/openhuman-core/src/tools/impl/network/host_tests.rs+++ b/crates/openhuman-core/src/tools/impl/network/host_tests.rs@@ -17,12 +17,10 @@ fn fetch() -> WebFetchTool {fn web_fetch_opts_into_an_optional_summary_focus() {let schema = fetch().parameters_schema();assert_eq!(schema["properties"][SUMMARY_FOCUS_ARG]["type"], "string");- assert!(- !schema["required"]- .as_array()- .unwrap()- .contains(&json!(SUMMARY_FOCUS_ARG))- );+ assert!(!schema["required"]+ .as_array()+ .unwrap()+ .contains(&json!(SUMMARY_FOCUS_ARG)));// The tool's schema declares TinyJuice's own property, not a lookalike.assert!(crate::inference::tokenjuice::focus::declares_summary_focus(&schema@@ -95,31 +93,25 @@ async fn tinyjuice_detects_and_converts_html() {return;}let page = "<!DOCTYPE html><html><body><p>hi</p></body></html>";- assert!(- TinyJuiceHtml {- ctx: crate::core::runtime::DispatchCtx::ambient(),- }- .looks_like_html(page)- .await- .unwrap()- );- assert!(- !TinyJuiceHtml {- ctx: crate::core::runtime::DispatchCtx::ambient(),- }- .looks_like_html("# Just a README\n\nSome prose.\n")- .await- .unwrap()- );- assert!(- TinyJuiceHtml {- ctx: crate::core::runtime::DispatchCtx::ambient(),- }- .to_markdown(page)- .await- .unwrap()- .contains("hi")- );+ assert!(TinyJuiceHtml {+ ctx: crate::core::runtime::DispatchCtx::ambient(),+ }+ .looks_like_html(page)+ .await+ .unwrap());+ assert!(!TinyJuiceHtml {+ ctx: crate::core::runtime::DispatchCtx::ambient(),+ }+ .looks_like_html("# Just a README\n\nSome prose.\n")+ .await+ .unwrap());+ assert!(TinyJuiceHtml {+ ctx: crate::core::runtime::DispatchCtx::ambient(),+ }+ .to_markdown(page)+ .await+ .unwrap()+ .contains("hi"));}#[cfg(feature = "web3")]diff --git a/crates/openhuman-core/src/tools/impl/network/mcp.rs b/crates/openhuman-core/src/tools/impl/network/mcp.rsindex cfb2887ac9..4c14d0357a 100644--- a/crates/openhuman-core/src/tools/impl/network/mcp.rs+++ b/crates/openhuman-core/src/tools/impl/network/mcp.rs@@ -7,7 +7,7 @@use std::sync::Arc;use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinytools::{IndirectCall, PermissionLevel, Tool, ToolCallOptions, ToolResult};use crate::{diff --git a/crates/openhuman-core/src/tools/impl/network/mcp_server_tools_tests.rs b/crates/openhuman-core/src/tools/impl/network/mcp_server_tools_tests.rsindex f1fafbd3b6..be002a20ea 100644--- a/crates/openhuman-core/src/tools/impl/network/mcp_server_tools_tests.rs+++ b/crates/openhuman-core/src/tools/impl/network/mcp_server_tools_tests.rs@@ -64,12 +64,10 @@ fn module_presentation_for_an_unconfigured_server_is_not_executable() {&config.workspace_dir,&config.action_dir,));- assert!(- configured_server_tools_from_presentations(- &config,- vec![presentation("removed-server", false)],- &security,- )- .is_empty()- );+ assert!(configured_server_tools_from_presentations(+ &config,+ vec![presentation("removed-server", false)],+ &security,+ )+ .is_empty());}diff --git a/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rs b/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rsindex 4cdfe4d610..a93acb10d6 100644--- a/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rs+++ b/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rs@@ -7,7 +7,7 @@ use std::{use crate::mcp::module_client::{McpConfiguredClient, McpModulePort};use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinymcp_bus::{McpToolPresentation, OpenConfiguredResponse, PrepareAgentToolsRequest,ServerArgumentsValidation, TransitionStatus, ValidateServerArgumentsRequest,diff --git a/crates/openhuman-core/src/tools/impl/network/mod.rs b/crates/openhuman-core/src/tools/impl/network/mod.rsindex e085fa63e1..9c9bea8eb8 100644--- a/crates/openhuman-core/src/tools/impl/network/mod.rs+++ b/crates/openhuman-core/src/tools/impl/network/mod.rs@@ -28,7 +28,7 @@ pub use host::{web_fetch_tool,};#[cfg(feature = "mcp")]-pub use mcp::{McpListServersTool, McpListToolsTool, mcp_call_tool};+pub use mcp::{mcp_call_tool, McpListServersTool, McpListToolsTool};#[cfg(feature = "mcp")]pub use mcp_server_tools::configured_server_tools_from_presentations;diff --git a/crates/openhuman-core/src/tools/impl/presentation/mod.rs b/crates/openhuman-core/src/tools/impl/presentation/mod.rsindex 1cd1302d4e..c885e62ef8 100644--- a/crates/openhuman-core/src/tools/impl/presentation/mod.rs+++ b/crates/openhuman-core/src/tools/impl/presentation/mod.rs@@ -33,7 +33,7 @@ use std::sync::Arc;use std::time::Duration;use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use crate::artifacts::production::Production;use crate::artifacts::read_artifact_bytes;@@ -50,8 +50,8 @@ mod tests;use crate::tools::implementations::document::format::spec::SlideImage;use self::types::{- GeneratePresentationInput, GeneratePresentationOutput, MAX_IMAGE_BYTES, SlideImageRequest,- SlideImageSource, validate_input,+ validate_input, GeneratePresentationInput, GeneratePresentationOutput, SlideImageRequest,+ SlideImageSource, MAX_IMAGE_BYTES,};/// Generation timeout. `ppt-rs` typically completes the full 64-slidediff --git a/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rs b/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rsindex 803027817d..b0cc052280 100644--- a/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rs+++ b/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rs@@ -13,7 +13,7 @@//! perspective.use super::types::GeneratePresentationInput;-use super::types::{MAX_BULLETS_PER_SLIDE, MAX_SLIDES, MAX_TEXT_CHARS, PresentationError};+use super::types::{PresentationError, MAX_BULLETS_PER_SLIDE, MAX_SLIDES, MAX_TEXT_CHARS};use super::*;use std::path::Path;@@ -222,7 +222,7 @@ async fn execute_happy_path_returns_artifact_metadata() {/// Canonical 1×1 PNG, written to disk to exercise the File source path.fn png_1x1() -> Vec<u8> {- use base64::{Engine as _, engine::general_purpose::STANDARD};+ use base64::{engine::general_purpose::STANDARD, Engine as _};STANDARD.decode("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==").unwrap()diff --git a/crates/openhuman-core/src/tools/impl/presentation/types.rs b/crates/openhuman-core/src/tools/impl/presentation/types.rsindex 6582ec24b4..7359b11f70 100644--- a/crates/openhuman-core/src/tools/impl/presentation/types.rs+++ b/crates/openhuman-core/src/tools/impl/presentation/types.rs@@ -7,7 +7,7 @@ use crate::modules::documents::DocumentCallError;// The size limits are the wire contract's: the tool validates against the same// numbers the `tinydocs` module enforces, so they are defined once, there.pub(super) use crate::tools::implementations::document::format::spec::presentation::{- MAX_BULLETS_PER_SLIDE, MAX_IMAGE_BYTES, MAX_IMAGES_PER_DECK, MAX_IMAGES_PER_SLIDE, MAX_SLIDES,+ MAX_BULLETS_PER_SLIDE, MAX_IMAGES_PER_DECK, MAX_IMAGES_PER_SLIDE, MAX_IMAGE_BYTES, MAX_SLIDES,MAX_TEXT_CHARS,};diff --git a/crates/openhuman-core/src/tools/impl/system/install_tool_tests.rs b/crates/openhuman-core/src/tools/impl/system/install_tool_tests.rsindex 72f4aaa2b2..2f72f6bbf6 100644--- a/crates/openhuman-core/src/tools/impl/system/install_tool_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/install_tool_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::security::AutonomyLevel;use crate::security::approval::ApprovalChatContext;+use crate::security::AutonomyLevel;fn policy(allow_install: bool, autonomy: AutonomyLevel) -> Arc<SecurityPolicy> {Arc::new(SecurityPolicy {diff --git a/crates/openhuman-core/src/tools/impl/system/mod.rs b/crates/openhuman-core/src/tools/impl/system/mod.rsindex ec45c7c8e0..83ea101862 100644--- a/crates/openhuman-core/src/tools/impl/system/mod.rs+++ b/crates/openhuman-core/src/tools/impl/system/mod.rs@@ -16,14 +16,14 @@ mod shell_support;mod update_apply;mod update_check;-use crate::security::SecurityPolicy;use crate::security::policy::{TrustedAccess, TrustedRoot};+use crate::security::SecurityPolicy;use tinytools::ToolRunContext;pub use install_tool::InstallToolTool;-pub use lsp::{LSP_ENABLED_ENV, LspTool, lsp_capability_enabled};+pub use lsp::{lsp_capability_enabled, LspTool, LSP_ENABLED_ENV};pub use proxy_config::ProxyConfigTool;-pub use retrieve_tool_output::{RetrieveToolOutputTool, retrieve_tool_output_tool};+pub use retrieve_tool_output::{retrieve_tool_output_tool, RetrieveToolOutputTool};pub use schedule::ScheduleTool;pub use shell::ShellTool;pub use update_apply::UpdateApplyTool;diff --git a/crates/openhuman-core/src/tools/impl/system/proxy_config.rs b/crates/openhuman-core/src/tools/impl/system/proxy_config.rsindex 24774a9eae..8b127f6786 100644--- a/crates/openhuman-core/src/tools/impl/system/proxy_config.rs+++ b/crates/openhuman-core/src/tools/impl/system/proxy_config.rs@@ -1,11 +1,11 @@use crate::config::{- Config, ProxyConfig, ProxyScope, runtime_proxy_config, set_runtime_proxy_config,+ runtime_proxy_config, set_runtime_proxy_config, Config, ProxyConfig, ProxyScope,};use crate::security::SecurityPolicy;use crate::tools::schema_cache::static_schema;use crate::util::MaybeSet;use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use std::fs;use std::sync::Arc;use tinytools::{Tool, ToolResult};diff --git a/crates/openhuman-core/src/tools/impl/system/schedule.rs b/crates/openhuman-core/src/tools/impl/system/schedule.rsindex d31fb0c9f0..25bcd58db0 100644--- a/crates/openhuman-core/src/tools/impl/system/schedule.rs+++ b/crates/openhuman-core/src/tools/impl/system/schedule.rs@@ -1,5 +1,5 @@use crate::config::Config;-use crate::cron::job_builder::{AgentJobInput, create_agent_job};+use crate::cron::job_builder::{create_agent_job, AgentJobInput};use crate::cron::origin::{current_job_origin, current_turn_may_skip_approval};use crate::security::SecurityPolicy;use crate::tools::schema_cache::static_schema;diff --git a/crates/openhuman-core/src/tools/impl/system/shell_saas_tests.rs b/crates/openhuman-core/src/tools/impl/system/shell_saas_tests.rsindex 74196904c1..2001852c40 100644--- a/crates/openhuman-core/src/tools/impl/system/shell_saas_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/shell_saas_tests.rs@@ -16,11 +16,9 @@ fn saas_sandbox_refuses_instead_of_falling_back_to_the_host() {let (allowed, result) = saas_sandbox_refusal(&why);assert!(!allowed);assert!(result.is_error);- assert!(- result- .output()- .contains("Sandbox unavailable: no such sandbox")- );+ assert!(result+ .output()+ .contains("Sandbox unavailable: no such sandbox"));}#[test]diff --git a/crates/openhuman-core/src/tools/impl/system/shell_tests_platform_tests.rs b/crates/openhuman-core/src/tools/impl/system/shell_tests_platform_tests.rsindex d702f77008..e12ad99f62 100644--- a/crates/openhuman-core/src/tools/impl/system/shell_tests_platform_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/shell_tests_platform_tests.rs@@ -5,7 +5,7 @@//! pinned on every CI host, not only on a Windows runner.use super::*;-use crate::modules::tinybox::host_runtime::{ShellFlavor, host_shell_flavor};+use crate::modules::tinybox::host_runtime::{host_shell_flavor, ShellFlavor};#[cfg(feature = "modules")]use crate::tools::system::shell_support::PYTHON_UTF8_DEFAULTS;use std::collections::HashMap;diff --git a/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rs b/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rsindex ba5c4c666f..6fea3ab8c9 100644--- a/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rs@@ -143,12 +143,10 @@ fn shell_tool_schema_has_command() {);let schema = tool.parameters_schema();assert!(schema["properties"]["command"].is_object());- assert!(- schema["required"]- .as_array()- .unwrap()- .contains(&json!("command"))- );+ assert!(schema["required"]+ .as_array()+ .unwrap()+ .contains(&json!("command")));// The self-asserted `approved` param was removed — approval now happens// at the harness ApprovalGate, not via a model-set flag.assert!(schema["properties"]["approved"].is_null());diff --git a/crates/openhuman-core/src/tools/impl/system/update_apply.rs b/crates/openhuman-core/src/tools/impl/system/update_apply.rsindex fea7524eb5..ad0e8a40e9 100644--- a/crates/openhuman-core/src/tools/impl/system/update_apply.rs+++ b/crates/openhuman-core/src/tools/impl/system/update_apply.rs@@ -24,7 +24,7 @@ use crate::core::runtime::DispatchCtx;use std::sync::Arc;use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use crate::platform::update;use crate::security::{SecurityPolicy, ToolOperation};diff --git a/crates/openhuman-core/src/tools/impl/system/update_check.rs b/crates/openhuman-core/src/tools/impl/system/update_check.rsindex 2ca546cc8e..d2f7e0fcd2 100644--- a/crates/openhuman-core/src/tools/impl/system/update_check.rs+++ b/crates/openhuman-core/src/tools/impl/system/update_check.rs@@ -8,7 +8,7 @@//! in the `update` domain.use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use crate::platform::update;use tinytools::{PermissionLevel, Tool, ToolResult};diff --git a/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread.rs b/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread.rsindex 9cedbc8eee..823b80a444 100644--- a/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread.rs+++ b/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread.rs@@ -9,7 +9,7 @@//! Worker threads carry a hard cap on depth: a worker thread cannot spawn//! another worker thread.-use crate::agent::subagent_host::{SubagentRunOptions, run_subagent_with_parent};+use crate::agent::subagent_host::{run_subagent_with_parent, SubagentRunOptions};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::threads::store as conversations;use async_trait::async_trait;diff --git a/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread_tests.rs b/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread_tests.rsindex 2f753c8705..bfe5833de8 100644--- a/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread_tests.rs+++ b/crates/openhuman-core/src/tools/impl/threads/spawn_worker_thread_tests.rs@@ -62,11 +62,9 @@ async fn rejects_if_already_worker_thread() {let result = spawn_from_thread(temp.path(), thread_id).await;assert!(result.is_error);- assert!(- result- .output()- .contains("cannot spawn other worker threads")- );+ assert!(result+ .output()+ .contains("cannot spawn other worker threads"));}#[tokio::test]@@ -91,11 +89,9 @@ async fn rejects_if_has_parent_thread_id() {let result = spawn_from_thread(temp.path(), thread_id).await;assert!(result.is_error);- assert!(- result- .output()- .contains("cannot spawn other worker threads")- );+ assert!(result+ .output()+ .contains("cannot spawn other worker threads"));}async fn spawn_from_thread(workspace: &std::path::Path, thread_id: &str) -> tinytools::ToolResult {diff --git a/crates/openhuman-core/src/tools/native_ops.rs b/crates/openhuman-core/src/tools/native_ops.rsindex 61b7b2a228..5fed8340e7 100644--- a/crates/openhuman-core/src/tools/native_ops.rs+++ b/crates/openhuman-core/src/tools/native_ops.rs@@ -158,7 +158,8 @@ pub async fn execute_tool(let tools = build_runtime_tools(config)?;trace!(tool_count = tools.len(),- tool_name, "[native_ops] execute_tool: runtime tools built"+ tool_name,+ "[native_ops] execute_tool: runtime tools built");let tool = tools.into_iter()diff --git a/crates/openhuman-core/src/tools/ops_tests.rs b/crates/openhuman-core/src/tools/ops_tests.rsindex 0348bed4ce..9dcc6b3aab 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 std::collections::HashMap;use tempfile::TempDir;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 cc9136ab79..9e2fd1e37f 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@@ -363,8 +363,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::DomainSet;use crate::core::runtime::context::CoreContext;+ use crate::core::runtime::DomainSet;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 5829b3e3eb..26ad040abe 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@@ -28,11 +28,9 @@ 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/orchestrator_tools.rs b/crates/openhuman-core/src/tools/orchestrator_tools.rsindex e251232081..170eb1721d 100644--- a/crates/openhuman-core/src/tools/orchestrator_tools.rs+++ b/crates/openhuman-core/src/tools/orchestrator_tools.rs@@ -33,8 +33,8 @@//! [`SubagentEntry::Skills`]: tinyagents_definition::SubagentEntry::Skillsuse crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};-use crate::integrations::ConnectedIntegration;use crate::integrations::composio::ComposioActionTool;+use crate::integrations::ConnectedIntegration;use tinyagents_definition::SubagentEntry;// SpawnWorkerThreadTool import kept commented while the worker-thread spawn isdiff --git a/crates/openhuman-core/src/tools/registry/mod.rs b/crates/openhuman-core/src/tools/registry/mod.rsindex c5234ee6c6..472c488d20 100644--- a/crates/openhuman-core/src/tools/registry/mod.rs+++ b/crates/openhuman-core/src/tools/registry/mod.rs@@ -6,10 +6,10 @@ mod schemas;pub use ops::{get_tool, list_tools, registry_entries, registry_entries_for_config};pub use providers::{- CapabilityProviderMetadata, CapabilityProviderRegistry, CapabilityProviderRegistryError,capability_provider_by_id, capability_provider_diagnostics, capability_provider_registry,is_capability_provider_trusted_enabled, list_capability_providers,- normalize_capability_provider_id,+ normalize_capability_provider_id, CapabilityProviderMetadata, CapabilityProviderRegistry,+ CapabilityProviderRegistryError,};pub use schemas::{all_controller_schemas as all_tool_registry_controller_schemas,diff --git a/crates/openhuman-core/src/tools/registry/ops.rs b/crates/openhuman-core/src/tools/registry/ops.rsindex 667e6b2678..266bae2fae 100644--- a/crates/openhuman-core/src/tools/registry/ops.rs+++ b/crates/openhuman-core/src/tools/registry/ops.rs@@ -1,11 +1,11 @@use std::collections::{BTreeMap, BTreeSet};-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};use crate::config::Config;-use crate::core::Outcome;use crate::core::all;use crate::core::runtime::DispatchCtx;+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};use crate::mcp::audit::McpWriteListQuery;use crate::mcp::server::McpToolSpec;diff --git a/crates/openhuman-core/src/tools/registry/ops_tests.rs b/crates/openhuman-core/src/tools/registry/ops_tests.rsindex 1a5b2cac6c..feaa22e65c 100644--- a/crates/openhuman-core/src/tools/registry/ops_tests.rs+++ b/crates/openhuman-core/src/tools/registry/ops_tests.rs@@ -72,20 +72,16 @@ async fn diagnostics_reports_inventory_and_policy_surfaces() {#[cfg(not(feature = "mcp"))]assert_eq!(outcome.value.mcp_stdio_tools, 0);assert!(outcome.value.json_rpc_tools > 0);- assert!(- outcome- .value- .policy_surfaces- .iter()- .any(|tool_id| tool_id == "security.policy_info")- );- assert!(- outcome- .value- .possible_write_surfaces- .iter()- .any(|tool_id| tool_id == "tools.composio_execute")- );+ assert!(outcome+ .value+ .policy_surfaces+ .iter()+ .any(|tool_id| tool_id == "security.policy_info"));+ assert!(outcome+ .value+ .possible_write_surfaces+ .iter()+ .any(|tool_id| tool_id == "tools.composio_execute"));assert!(!outcome.value.posture.autonomy_level.is_empty());assert!(outcome.value.mcp_write_audit.enabled);@@ -117,13 +113,11 @@ enabled = trueoutcome.value.capability_providers.trusted_enabled_providers,1);- assert!(- outcome- .value- .capability_providers- .registry_errors- .is_empty()- );+ assert!(outcome+ .value+ .capability_providers+ .registry_errors+ .is_empty());}#[tokio::test]@@ -158,13 +152,11 @@ async fn diagnostics_for_config_reports_capability_provider_summary() {outcome.value.capability_providers.trusted_enabled_providers,1);- assert!(- outcome- .value- .capability_providers- .registry_errors- .is_empty()- );+ assert!(outcome+ .value+ .capability_providers+ .registry_errors+ .is_empty());}#[tokio::test]diff --git a/crates/openhuman-core/src/tools/registry/providers_tests.rs b/crates/openhuman-core/src/tools/registry/providers_tests.rsindex e8ce40f068..5165082181 100644--- a/crates/openhuman-core/src/tools/registry/providers_tests.rs+++ b/crates/openhuman-core/src/tools/registry/providers_tests.rs@@ -1,8 +1,8 @@use crate::config::schema::{CapabilityProviderConfig, CapabilityProviderTrustState, Config};use super::{- CapabilityProviderRegistry, capability_provider_by_id, is_capability_provider_trusted_enabled,- list_capability_providers, normalize_capability_provider_id,+ capability_provider_by_id, is_capability_provider_trusted_enabled, list_capability_providers,+ normalize_capability_provider_id, CapabilityProviderRegistry,};fn config_with(providers: Vec<CapabilityProviderConfig>) -> Config {diff --git a/crates/openhuman-core/src/tools/registry/schemas.rs b/crates/openhuman-core/src/tools/registry/schemas.rsindex d605605058..c5ac81fd45 100644--- a/crates/openhuman-core/src/tools/registry/schemas.rs+++ b/crates/openhuman-core/src/tools/registry/schemas.rs@@ -1,8 +1,8 @@use crate::core::runtime::DispatchCtx;use serde_json::{Map, Value};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};/// Declared controller schemas for the `tool_registry` namespace.diff --git a/crates/openhuman-core/src/tools/registry/schemas_tests.rs b/crates/openhuman-core/src/tools/registry/schemas_tests.rsindex ac89fcf864..def6a1b9a6 100644--- a/crates/openhuman-core/src/tools/registry/schemas_tests.rs+++ b/crates/openhuman-core/src/tools/registry/schemas_tests.rs@@ -67,11 +67,9 @@ async fn handle_list_returns_registry_object() {#[cfg(not(feature = "mcp"))]let expected = "tools.web_search";- assert!(- tools- .iter()- .any(|tool| { tool.get("tool_id").and_then(Value::as_str) == Some(expected) })- );+ assert!(tools+ .iter()+ .any(|tool| { tool.get("tool_id").and_then(Value::as_str) == Some(expected) }));}#[tokio::test]@@ -94,63 +92,49 @@ async fn handle_diagnostics_returns_counts() {.await.expect("diagnostics json");let diagnostics = value.get("diagnostics").unwrap_or(&value);- assert!(- diagnostics- .get("total_tools")- .and_then(Value::as_u64)- .is_some_and(|count| count > 0)- );- assert!(- diagnostics- .get("policy_surfaces")- .and_then(Value::as_array)- .is_some()- );+ assert!(diagnostics+ .get("total_tools")+ .and_then(Value::as_u64)+ .is_some_and(|count| count > 0));+ assert!(diagnostics+ .get("policy_surfaces")+ .and_then(Value::as_array)+ .is_some());// Expanded diagnostics surface for #2136.let posture = diagnostics.get("posture").and_then(Value::as_object).expect("posture");- assert!(- posture- .get("autonomy_level")- .and_then(Value::as_str)- .is_some()- );- assert!(- posture- .get("workspace_only")- .and_then(Value::as_bool)- .is_some()- );+ assert!(posture+ .get("autonomy_level")+ .and_then(Value::as_str)+ .is_some());+ assert!(posture+ .get("workspace_only")+ .and_then(Value::as_bool)+ .is_some());let mcp_allowlists = diagnostics.get("mcp_allowlists").and_then(Value::as_object).expect("mcp_allowlists");- assert!(- mcp_allowlists- .get("server_count")- .and_then(Value::as_u64)- .is_some()- );+ assert!(mcp_allowlists+ .get("server_count")+ .and_then(Value::as_u64)+ .is_some());let mcp_write_audit = diagnostics.get("mcp_write_audit").and_then(Value::as_object).expect("mcp_write_audit");- assert!(- mcp_write_audit- .get("enabled")- .and_then(Value::as_bool)- .is_some()- );+ assert!(mcp_write_audit+ .get("enabled")+ .and_then(Value::as_bool)+ .is_some());- assert!(- diagnostics- .get("recent_denials")- .and_then(Value::as_array)- .is_some()- );+ assert!(diagnostics+ .get("recent_denials")+ .and_then(Value::as_array)+ .is_some());}diff --git a/crates/openhuman-core/src/tools/rules/ops.rs b/crates/openhuman-core/src/tools/rules/ops.rsindex 0b18ccb81c..1e3f31592b 100644--- a/crates/openhuman-core/src/tools/rules/ops.rs+++ b/crates/openhuman-core/src/tools/rules/ops.rs@@ -3,7 +3,7 @@use std::sync::Arc;use tinyagents_harness::tool::ToolRulePolicy;-use tinytools::{RuleContext, RuleEffect, ToolRule, ToolRuleSet, ToolRules, glob_matches};+use tinytools::{glob_matches, RuleContext, RuleEffect, ToolRule, ToolRuleSet, ToolRules};use crate::agent_registry::host_definition::AgentDefinition;use crate::config::Config;diff --git a/crates/openhuman-core/src/tools/schemas/composio.rs b/crates/openhuman-core/src/tools/schemas/composio.rsindex e5b7a11cb8..8dfb824b13 100644--- a/crates/openhuman-core/src/tools/schemas/composio.rs+++ b/crates/openhuman-core/src/tools/schemas/composio.rs@@ -1,10 +1,10 @@//! Handler for the `tools_composio_execute` controller schema.use crate::core::runtime::DispatchCtx;-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};-use crate::core::Outcome;use crate::core::all::ControllerFuture;+use crate::core::Outcome;pub(super) fn handle_composio_execute(ctx: DispatchCtx,diff --git a/crates/openhuman-core/src/tools/schemas/web_search.rs b/crates/openhuman-core/src/tools/schemas/web_search.rsindex 9240f682ab..65975aacb4 100644--- a/crates/openhuman-core/src/tools/schemas/web_search.rs+++ b/crates/openhuman-core/src/tools/schemas/web_search.rs@@ -4,7 +4,7 @@//! RPC caller gets the same provider choice and fallback as the agent.use crate::core::runtime::DispatchCtx;-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};use crate::core::all::ControllerFuture;diff --git a/crates/openhuman-core/src/tools/schemas_tests.rs b/crates/openhuman-core/src/tools/schemas_tests.rsindex 7fb21e718a..ba2dc37cc5 100644--- a/crates/openhuman-core/src/tools/schemas_tests.rs+++ b/crates/openhuman-core/src/tools/schemas_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::tools::schemas::registry::tools_schemas;-use serde_json::{Map, json};+use serde_json::{json, Map};const BASE_CONTROLLERS: usize = 5;#[test]@@ -18,11 +18,9 @@ fn all_controllers_covers_the_base_surface() {fn apify_linkedin_scrape_controller_is_retired() {// The backend retired its Apify routes; the controller must not be// registered or resolvable any more.- assert!(- !all_controller_schemas()- .iter()- .any(|s| s.function == "apify_linkedin_scrape")- );+ assert!(!all_controller_schemas()+ .iter()+ .any(|s| s.function == "apify_linkedin_scrape"));assert_eq!(tools_schemas("tools_apify_linkedin_scrape").function,"unknown"diff --git a/crates/openhuman-core/src/tools/toolpacks/mod.rs b/crates/openhuman-core/src/tools/toolpacks/mod.rsindex a62b54d2d0..9f70b5caa9 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::{GROUP_COUNT, GroupMode, ToolGroups, set_process_default};+pub use groups::{set_process_default, GroupMode, ToolGroups, GROUP_COUNT};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::{- CATALOG, PACKS, all_packed_tool_names, callable_pack_ids, pack, pack_for_tool,- pack_index_markdown_filtered,+ all_packed_tool_names, callable_pack_ids, pack, pack_for_tool, pack_index_markdown_filtered,+ CATALOG, PACKS,};#[cfg(test)]diff --git a/crates/openhuman-core/src/tools/toolpacks/ops.rs b/crates/openhuman-core/src/tools/toolpacks/ops.rsindex 7670dea7d5..2e42a6a17e 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::tool::packs::{PackRegistryHandle, USE_SKILL, UseSkillTool};+use tinyagents_harness::tool::packs::{PackRegistryHandle, UseSkillTool, USE_SKILL};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 d5b09ab615..96457af298 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::{Value, json};+use serde_json::{json, Value};use super::*;use tinyagents_harness::tool::packs::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 dd60b6a9d2..2923575f2d 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::tool::packs::{USE_SKILL, route_sentence};+use tinyagents_harness::tool::packs::{route_sentence, USE_SKILL};// ── the index must agree with the gate too ──────────────────────────────────diff --git a/crates/openhuman-core/src/triage/escalation.rs b/crates/openhuman-core/src/triage/escalation.rsindex e3f2c71872..57ebe0697c 100644--- a/crates/openhuman-core/src/triage/escalation.rs+++ b/crates/openhuman-core/src/triage/escalation.rs@@ -17,7 +17,7 @@//! and tools.use crate::core::runtime::DispatchCtx;-use anyhow::{Context, anyhow};+use anyhow::{anyhow, Context};use crate::agent::harness::fork_context::ParentExecutionContext;use crate::agent::orchestration::parent_context::build_root_parent;diff --git a/crates/openhuman-core/src/triage/escalation_tests.rs b/crates/openhuman-core/src/triage/escalation_tests.rsindex 2646be9529..047c27ac91 100644--- a/crates/openhuman-core/src/triage/escalation_tests.rs+++ b/crates/openhuman-core/src/triage/escalation_tests.rs@@ -2,7 +2,7 @@ use super::*;use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::core::events::DomainEvent;use serde_json::json;-use tokio::time::{Duration, sleep, timeout};+use tokio::time::{sleep, timeout, Duration};/// The triage parent is the shared root context with one override: nested/// spawns scoped to the dispatched target. Guards the #4369 collapse againstdiff --git a/crates/openhuman-core/src/triage/evaluator.rs b/crates/openhuman-core/src/triage/evaluator.rsindex 8f9acd6f89..da7e858490 100644--- a/crates/openhuman-core/src/triage/evaluator.rs+++ b/crates/openhuman-core/src/triage/evaluator.rs@@ -50,7 +50,7 @@ use super::routing::ResolvedProvider;#[cfg(test)]use crate::agent_registry::host_definition::AgentDefinition;#[cfg(test)]-pub(crate) use arm::{ArmError, classify_error};+pub(crate) use arm::{classify_error, ArmError};#[cfg(test)]pub(crate) use chain::run_triage_with_arms_for_test;#[cfg(test)]diff --git a/crates/openhuman-core/src/triage/evaluator/arm.rs b/crates/openhuman-core/src/triage/evaluator/arm.rsindex 95850999d1..12f035dce9 100644--- a/crates/openhuman-core/src/triage/evaluator/arm.rs+++ b/crates/openhuman-core/src/triage/evaluator/arm.rs@@ -7,7 +7,7 @@ use std::time::Instant;use anyhow::anyhow;-use crate::agent::bus::{AGENT_RUN_TURN_METHOD, AgentTurnRequest, AgentTurnResponse};+use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHOD};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::config::MultimodalConfig;use crate::core::bus::BUS;@@ -16,7 +16,7 @@ use crate::inference::provider::error_classify::{};use tinyagents_session::transcript::TranscriptMessage;use tinybus::NativeRequestError;-use tinyinference_providers::{BudgetMatch, is_budget_message};+use tinyinference_providers::{is_budget_message, BudgetMatch};use super::super::decision::parse_triage_decision;use super::super::envelope::TriggerEnvelope;diff --git a/crates/openhuman-core/src/triage/evaluator/chain.rs b/crates/openhuman-core/src/triage/evaluator/chain.rsindex fbdce280ac..eaddf49189 100644--- a/crates/openhuman-core/src/triage/evaluator/chain.rs+++ b/crates/openhuman-core/src/triage/evaluator/chain.rs@@ -13,9 +13,9 @@ use crate::cron::scheduler_gate::LlmPermit;use super::super::envelope::TriggerEnvelope;use super::super::events;use super::super::routing::{- ResolvedProvider, build_local_provider_with_config, resolve_provider_with_config,+ build_local_provider_with_config, resolve_provider_with_config, ResolvedProvider,};-use super::arm::{ArmError, try_arm};+use super::arm::{try_arm, ArmError};use super::outcome::{TriageOutcome, TriageResolutionPath};/// Cap on how long to wait for a server-supplied `Retry-After` beforediff --git a/crates/openhuman-core/src/triage/evaluator_tests.rs b/crates/openhuman-core/src/triage/evaluator_tests.rsindex 4d7f531044..413557d27e 100644--- a/crates/openhuman-core/src/triage/evaluator_tests.rs+++ b/crates/openhuman-core/src/triage/evaluator_tests.rs@@ -1,10 +1,10 @@use super::*;-use crate::agent::bus::{AgentTurnResponse, mock_agent_run_turn};+use crate::agent::bus::{mock_agent_run_turn, AgentTurnResponse};use crate::agent_registry::agents::BUILTINS;use crate::agent_registry::host_definition::AgentDefinitionRegistry;use serde_json::json;-use std::sync::Arc as StdArc;use std::sync::atomic::{AtomicUsize, Ordering};+use std::sync::Arc as StdArc;fn arm_error_label(err: &ArmError) -> &'static str {match err {diff --git a/crates/openhuman-core/src/triage/events_tests.rs b/crates/openhuman-core/src/triage/events_tests.rsindex a593a9a379..679ad33400 100644--- a/crates/openhuman-core/src/triage/events_tests.rs+++ b/crates/openhuman-core/src/triage/events_tests.rs@@ -4,7 +4,7 @@ use crate::triage::TriggerEnvelope;use serde_json::json;use std::sync::Arc;use tokio::sync::Mutex;-use tokio::time::{Duration, sleep};+use tokio::time::{sleep, Duration};#[tokio::test]async fn publish_helpers_emit_expected_trigger_events() {diff --git a/crates/openhuman-core/src/triage/mod.rs b/crates/openhuman-core/src/triage/mod.rsindex aef525a5fa..1796e15ec1 100644--- a/crates/openhuman-core/src/triage/mod.rs+++ b/crates/openhuman-core/src/triage/mod.rs@@ -41,9 +41,9 @@ pub mod routing;pub mod trigger_reactor_prompt;pub mod trigger_triage_prompt;-pub use decision::{ParseError, TriageAction, TriageDecision, parse_triage_decision};+pub use decision::{parse_triage_decision, ParseError, TriageAction, TriageDecision};pub use envelope::{TriggerEnvelope, TriggerSource};pub use escalation::apply_decision;-pub use evaluator::{TriageOutcome, TriageResolutionPath, TriageRun, run_triage};+pub use evaluator::{run_triage, TriageOutcome, TriageResolutionPath, TriageRun};pub use origin::{local_trigger_origin, remote_trigger_origin};-pub use routing::{ResolvedProvider, build_local_provider_with_config};+pub use routing::{build_local_provider_with_config, ResolvedProvider};diff --git a/crates/openhuman-core/src/triage/routing.rs b/crates/openhuman-core/src/triage/routing.rsindex b760a98a4c..facf24341f 100644--- a/crates/openhuman-core/src/triage/routing.rs+++ b/crates/openhuman-core/src/triage/routing.rs@@ -141,7 +141,7 @@ fn build_remote_provider(config: &Config,) -> anyhow::Result<ResolvedProvider> {use crate::inference::provider::factory::{- PROVIDER_OPENHUMAN, create_chat_model_from_string_with_model_id,+ create_chat_model_from_string_with_model_id, PROVIDER_OPENHUMAN,};use tinyinference_local::profile::is_local_provider_string;diff --git a/crates/openhuman-core/src/triage/trigger_reactor_prompt.rs b/crates/openhuman-core/src/triage/trigger_reactor_prompt.rsindex 5afe580b0c..7f9026054a 100644--- a/crates/openhuman-core/src/triage/trigger_reactor_prompt.rs+++ b/crates/openhuman-core/src/triage/trigger_reactor_prompt.rs@@ -5,7 +5,7 @@//! in the order it wants — so the output IS what the LLM sees, no//! post-processing in the runner.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/triage/trigger_triage_prompt.rs b/crates/openhuman-core/src/triage/trigger_triage_prompt.rsindex fc2b3de131..c27aae25c5 100644--- a/crates/openhuman-core/src/triage/trigger_triage_prompt.rs+++ b/crates/openhuman-core/src/triage/trigger_triage_prompt.rs@@ -5,7 +5,7 @@//! in the order it wants — so the output IS what the LLM sees, no//! post-processing in the runner.-use crate::agent::prompts::{PromptContext};+use crate::agent::prompts::PromptContext;use crate::prompts::{render_tools, render_workspace};use anyhow::Result;diff --git a/crates/openhuman-core/src/voice/live/session.rs b/crates/openhuman-core/src/voice/live/session.rsindex 0935134df6..f050ffd536 100644--- a/crates/openhuman-core/src/voice/live/session.rs+++ b/crates/openhuman-core/src/voice/live/session.rs@@ -18,10 +18,10 @@ use super::providers;use crate::agent::session_host::OpenHumanSessionHost;use crate::agent::tinyagents::host::OpenHumanRunContext;use crate::agent::tinyagents::live_harness::{assemble_live_tool_harness, LIVE_MAX_TOOL_CALLS};-use crate::security::turn_origin::{with_origin, AgentTurnOrigin};use crate::config::schema::voice_live::is_live_provider;use crate::config::Config;use crate::security::approval::{ApprovalChatContext, ApprovalTurnContext};+use crate::security::turn_origin::{with_origin, AgentTurnOrigin};use crate::threads::store::{ConversationMessage, CreateConversationThread};/// The agent a live session borrows its tools from.diff --git a/crates/openhuman-core/src/voice/realtime_harness/agent.rs b/crates/openhuman-core/src/voice/realtime_harness/agent.rsindex 09ef61016d..2aee6f6749 100644--- a/crates/openhuman-core/src/voice/realtime_harness/agent.rs+++ b/crates/openhuman-core/src/voice/realtime_harness/agent.rs@@ -8,8 +8,8 @@ use std::time::Duration;use log::{info, warn};use serde_json::Value;-use crate::progress::AgentProgress;use crate::agent::session_host::OpenHumanSessionHost;+use crate::progress::AgentProgress;use crate::security::turn_origin::{with_origin, AgentTurnOrigin};use super::chat_delivery::{VOICE_CHAT_CLIENT_ID, VOICE_CHAT_THREAD_ID};diff --git a/crates/openhuman-core/src/web_chat/journal_shadow.rs b/crates/openhuman-core/src/web_chat/journal_shadow.rsindex 870445e6b4..fe16a4437c 100644--- a/crates/openhuman-core/src/web_chat/journal_shadow.rs+++ b/crates/openhuman-core/src/web_chat/journal_shadow.rs@@ -142,11 +142,12 @@ pub(super) async fn shadow_compare_journal_projection(return None;}- let projected = crate::core::observability::progress_tracing::journal_projection::spans_from_observations(- trace_ctx,- max_iterations,- &observations,- );+ let projected =+ crate::core::observability::progress_tracing::journal_projection::spans_from_observations(+ trace_ctx,+ max_iterations,+ &observations,+ );let live_sig = span_projection_signature(live_spans);let projected_sig = span_projection_signature(&projected);if live_sig == projected_sig {diff --git a/crates/openhuman-core/src/web_chat/mod.rs b/crates/openhuman-core/src/web_chat/mod.rsindex 791b22a895..1e3a8c90fb 100644--- a/crates/openhuman-core/src/web_chat/mod.rs+++ b/crates/openhuman-core/src/web_chat/mod.rs@@ -42,9 +42,9 @@ mod run_task;mod schemas;mod session;mod suggestions;-pub(crate) mod turn_guards;mod turn_activity;mod turn_close;+pub(crate) mod turn_guards;mod turn_timing;mod types;diff --git a/crates/openhuman-core/src/web_chat/ops/channel_ops.rs b/crates/openhuman-core/src/web_chat/ops/channel_ops.rsindex cdde7c1e85..e09f7a45f0 100644--- a/crates/openhuman-core/src/web_chat/ops/channel_ops.rs+++ b/crates/openhuman-core/src/web_chat/ops/channel_ops.rs@@ -2,10 +2,10 @@//! cancelling in-flight turns (primary and parallel, scoped or unscoped), and//! inspecting/clearing a thread's run queue.-use serde_json::{Value, json};+use serde_json::{json, Value};-use crate::core::Outcome;use crate::core::runtime::DispatchCtx;+use crate::core::Outcome;use crate::web_chat::WebChannelEvent;use super::super::event_bus::publish_web_channel_event_in;diff --git a/crates/openhuman-core/src/web_chat/ops/start_chat.rs b/crates/openhuman-core/src/web_chat/ops/start_chat.rsindex c4cbf376a8..8251e45ff4 100644--- a/crates/openhuman-core/src/web_chat/ops/start_chat.rs+++ b/crates/openhuman-core/src/web_chat/ops/start_chat.rs@@ -11,7 +11,7 @@ use uuid::Uuid;use crate::core::events::DomainEvent;use crate::security::prompt_injection::{- PromptEnforcementAction, PromptEnforcementContext, enforce_prompt_input,+ enforce_prompt_input, PromptEnforcementAction, PromptEnforcementContext,};use crate::web_chat::WebChannelEvent;diff --git a/crates/openhuman-core/src/web_chat/progress_bridge_tests.rs b/crates/openhuman-core/src/web_chat/progress_bridge_tests.rsindex 43387bced3..559145572f 100644--- a/crates/openhuman-core/src/web_chat/progress_bridge_tests.rs+++ b/crates/openhuman-core/src/web_chat/progress_bridge_tests.rs@@ -188,8 +188,8 @@ fn worktree_detail_forwards_isolated_worker_fields() {// ── #4270 inference heartbeat ────────────────────────────────────────────-use crate::progress::AgentProgress;use crate::config::Config;+use crate::progress::AgentProgress;use std::time::Duration;use tokio::sync::broadcast::error::TryRecvError;diff --git a/crates/openhuman-core/src/web_chat/run_task.rs b/crates/openhuman-core/src/web_chat/run_task.rsindex afb481da16..8283a6acbe 100644--- a/crates/openhuman-core/src/web_chat/run_task.rs+++ b/crates/openhuman-core/src/web_chat/run_task.rs@@ -12,8 +12,8 @@ use crate::progress::AgentProgress;use super::ops::BudgetCorrelation;use super::progress_bridge::spawn_progress_bridge;use super::session::{- CheckedOutSession, CheckoutPolicy, checkin_session_agent, checkout_session_agent,- normalize_model_override,+ checkin_session_agent, checkout_session_agent, normalize_model_override, CheckedOutSession,+ CheckoutPolicy,};use super::types::{ChatRequestMetadata, WebChatTaskResult};use super::web_errors::{diff --git a/crates/openhuman-core/src/web_chat/turn_guards/backstop_tests.rs b/crates/openhuman-core/src/web_chat/turn_guards/backstop_tests.rsindex 522119c17e..ec76bd6a6a 100644--- a/crates/openhuman-core/src/web_chat/turn_guards/backstop_tests.rs+++ b/crates/openhuman-core/src/web_chat/turn_guards/backstop_tests.rs@@ -1,5 +1,5 @@use super::*;-use tinyagents_harness::turn_deadline::{TurnDeadline, parse_backstop};+use tinyagents_harness::turn_deadline::{parse_backstop, TurnDeadline};#[test]fn parse_backstop_defaults_and_disables() {diff --git a/crates/openhuman-embed/src/artifacts.rs b/crates/openhuman-embed/src/artifacts.rsindex 23c17c3a52..8dd7a43c18 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::{FileRoots, resolve_ready_file};+pub use openhuman_core::artifacts::{resolve_ready_file, FileRoots};#[doc(hidden)]pub use openhuman_core::artifacts::{- ArtifactKind, ArtifactMeta, ArtifactStatus, create_artifact, finalize_artifact,+ create_artifact, finalize_artifact, ArtifactKind, ArtifactMeta, ArtifactStatus,};diff --git a/crates/openhuman-embed/src/call.rs b/crates/openhuman-embed/src/call.rsindex 3114cbebcc..aa70bfbeef 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::Serialize;use serde::de::DeserializeOwned;+use serde::Serialize;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 b1f9e99cc4..be5eb0a3fd 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 dc52bdff56..1fd074ac22 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::{- WebChannelEvent, publish_web_channel_event, register_approval_surface_subscriber,- register_artifact_surface_subscriber, subscribe_web_channel_events,+ publish_web_channel_event, register_approval_surface_subscriber,+ register_artifact_surface_subscriber, subscribe_web_channel_events, WebChannelEvent,};diff --git a/crates/openhuman-embed/src/complete.rs b/crates/openhuman-embed/src/complete.rsindex b096e080a9..5b6cf9b467 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::{Route, is_safe_endpoint_for_bearer, sanitize_url_for_display};+use crate::turn::{is_safe_endpoint_for_bearer, sanitize_url_for_display, Route};/// 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::{- StructuredFailureReason, StructuredOutputFailure, Validator, accumulate,+ accumulate, StructuredFailureReason, StructuredOutputFailure, Validator,};let initial_failure = |reason| CoreError::StructuredOutput {method: COMPLETE,diff --git a/crates/openhuman-embed/src/config.rs b/crates/openhuman-embed/src/config.rsindex 279bce7171..018f52efaa 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 68ee76e853..02d691e729 100644--- a/crates/openhuman-embed/src/cron.rs+++ b/crates/openhuman-embed/src/cron.rs@@ -59,8 +59,8 @@ use std::future::Future;use std::time::SystemTime;use openhuman_core::config::Config;-use openhuman_core::cron::JobPolicy;use openhuman_core::cron::system_jobs::SYSTEM_COMMAND_PREFIX;+use openhuman_core::cron::JobPolicy;use {openhuman_core::cron::CronJob, openhuman_core::cron::CronJobPatch,openhuman_core::cron::JobType, openhuman_core::cron::Schedule,diff --git a/crates/openhuman-embed/src/embeddings.rs b/crates/openhuman-embed/src/embeddings.rsindex 65ed53e053..9dac1faa72 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::{- COHERE_API_BASE, COHERE_DEFAULT_DIMENSIONS, COHERE_DEFAULT_MODEL, CohereEmbeddingModel,+ format_embedding_signature, set_rate_limit, CohereEmbeddingModel, EmbeddingModel,+ MockEmbeddingModel, NoopEmbeddingModel, OllamaEmbeddingModel, OpenAiEmbeddingModel,+ VoyageEmbeddingModel, COHERE_API_BASE, COHERE_DEFAULT_DIMENSIONS, COHERE_DEFAULT_MODEL,DEFAULT_OLLAMA_DIMENSIONS, DEFAULT_OLLAMA_MODEL, DEFAULT_OLLAMA_URL,- 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,+ DEFAULT_REQUESTS_PER_MINUTE, VOYAGE_API_BASE, VOYAGE_DEFAULT_DIMENSIONS, VOYAGE_DEFAULT_MODEL,};/// 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 524c7305eb..387d1944c5 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::StructuredRpcError;use openhuman_core::core::dispatch::UNKNOWN_METHOD_PREFIX;+use openhuman_core::core::StructuredRpcError;/// 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 cda93673d5..d528e8a0a8 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::{BroadcastStream, errors::BroadcastStreamRecvError};+use tokio_stream::wrappers::{errors::BroadcastStreamRecvError, BroadcastStream};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 ce3f73e216..5da75a5a80 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 crate::Session;+use super::Harness;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 c0c4f5b5c1..4a89a6b1e6 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/lib.rs b/crates/openhuman-embed/src/lib.rsindex fc03d5952e..57f0839bd2 100644--- a/crates/openhuman-embed/src/lib.rs+++ b/crates/openhuman-embed/src/lib.rs@@ -77,14 +77,14 @@ pub fn current_turn_origin() -> Option<AgentTurnOrigin> {openhuman_core::core::runtime::CoreContext::current_turn_origin()}pub use openhuman_core::backend::{- BackendRequest, BackendTransport, BackendTransportError, BaseUrlPurpose, TransportProfile,- install_backend_transport, installed_backend_transport,+ install_backend_transport, installed_backend_transport, BackendRequest, BackendTransport,+ BackendTransportError, BaseUrlPurpose, TransportProfile,};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::{NoTenant, Tenant, current_tenant};+pub use openhuman_core::core::runtime::{current_tenant, NoTenant, 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@@ -112,7 +112,7 @@ pub mod agent_progress {#[cfg(feature = "skills")]pub mod skill_registry {pub use openhuman_core::skills::catalog::{- HERMES_REGISTRY_ID, ReqwestTransport, skill_registry,+ skill_registry, ReqwestTransport, HERMES_REGISTRY_ID,};}@@ -157,11 +157,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.@@ -187,10 +187,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,@@ -199,14 +199,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::{- AgentDefaults, ApiKey, ConfigSource, ConfigurationInfo, DefaultsInfo, LearningSettings,- ModelDefaults, RemoveAgent, Runtime, RuntimeBuilder, RuntimeDefaults, RuntimeError,- RuntimeInfo, RuntimeModule, SkillsPolicy, StorageInfo, WeightClass, run_from_args,+ run_from_args, AgentDefaults, ApiKey, ConfigSource, ConfigurationInfo, DefaultsInfo,+ LearningSettings, ModelDefaults, RemoveAgent, Runtime, RuntimeBuilder, RuntimeDefaults,+ RuntimeError, RuntimeInfo, RuntimeModule, SkillsPolicy, StorageInfo, WeightClass,};/// The types the [`RuntimeBuilder`] seam options take: controller@@ -268,7 +268,7 @@ pub use complete::{CompletionTrace, CompletionUsage,};pub use session_store::{InMemorySessionStores, SessionStoreProvider};-pub use turn::{Route, Turn, TurnOutcome, TurnRequest, absolute};+pub use turn::{absolute, Route, Turn, TurnOutcome, TurnRequest};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 0e0f694657..6132f5ae28 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::{- LinkedFactory, is_registered as is_linked_registered, register_linked,+ is_registered as is_linked_registered, register_linked, LinkedFactory,};/// The browser-control module.diff --git a/crates/openhuman-embed/src/process_sentry.rs b/crates/openhuman-embed/src/process_sentry.rsindex ccc26f7d2b..886c39e9e3 100644--- a/crates/openhuman-embed/src/process_sentry.rs+++ b/crates/openhuman-embed/src/process_sentry.rs@@ -12,8 +12,8 @@ use std::borrow::Cow;use std::sync::Arc;use openhuman_core::core::observability as obs;-pub use sentry::ClientOptions;pub use sentry::protocol::Event;+pub use sentry::ClientOptions;/// 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 6470d65f88..72e6cf1289 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::ProfileHost;use openhuman_core::profiles::credentials::UserCredentialKind;+use openhuman_core::profiles::ProfileHost;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::cron::JobOrigin;+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::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 c95cd29aaa..e56c1febef 100644--- a/crates/openhuman-embed/src/profiles/host_tests.rs+++ b/crates/openhuman-embed/src/profiles/host_tests.rs@@ -65,13 +65,11 @@ 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 d0da652853..759b478712 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::{ConfigSource, starts_services_on_build};+use super::builder::{starts_services_on_build, ConfigSource};use super::presets::{default_domains, default_services};-use super::{ApiKey, RUNTIME_LIVE, Runtime, RuntimeBuilder, RuntimeError};-use crate::Core;+use super::{ApiKey, Runtime, RuntimeBuilder, RuntimeError, RUNTIME_LIVE};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 73272afed8..aaec18d055 100644--- a/crates/openhuman-embed/src/runtime/builder.rs+++ b/crates/openhuman-embed/src/runtime/builder.rs@@ -21,10 +21,10 @@ use openhuman_core::core::types::HostKind;use openhuman_core::tools::toolpacks::ToolGroups;use tinyagents_session::port::SessionStoreProvider;-use super::ApiKey;use super::seams::HostSeams;-use crate::Session;+use super::ApiKey;use crate::harness::{Access, Provider, Workspace};+use crate::Session;// Re-exported for the sibling test module and older call sites that reached// the default triples through this module.@@ -47,7 +47,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::{RUNTIME_LIVE, RuntimeError};+pub(crate) use super::{RuntimeError, RUNTIME_LIVE};/// 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 a221aeab6a..e3daf89670 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::{- Config,schema::{AutonomyConfig, CronConfig, PrivacyConfig, SecretsConfig},+ Config,};use std::collections::BTreeMap;diff --git a/crates/openhuman-embed/src/runtime/info_tests.rs b/crates/openhuman-embed/src/runtime/info_tests.rsindex 6e12065a9d..ef5ae2fd2d 100644--- a/crates/openhuman-embed/src/runtime/info_tests.rs+++ b/crates/openhuman-embed/src/runtime/info_tests.rs@@ -157,15 +157,13 @@ 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 25d3a9c845..4e23aad3c7 100644--- a/crates/openhuman-embed/src/runtime/mod.rs+++ b/crates/openhuman-embed/src/runtime/mod.rs@@ -103,8 +103,8 @@ use openhuman_core::core::runtime::{CoreRuntime, DomainSet, ServiceSet};use openhuman_core::tools::toolpacks::ToolGroups;use crate::agent::{Agent, AgentError, AgentSpec};-use crate::harness::HarnessCore;use crate::harness::workspace::ResolvedWorkspace;+use crate::harness::HarnessCore;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 6e38b66bff..fbe897dd96 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::RuntimeBuilder;use super::builder::ConfigSource;+use super::RuntimeBuilder;use crate::harness::Workspace;impl RuntimeBuilder {diff --git a/crates/openhuman-embed/src/secret_storage.rs b/crates/openhuman-embed/src/secret_storage.rsindex 2e2891bb09..53164fc486 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::{- EncryptedFileBackend, MemoryBackend, SecretBackend, SecretStorageError, install_secret_backend,- installed_secret_backend,+ install_secret_backend, installed_secret_backend, EncryptedFileBackend, MemoryBackend,+ SecretBackend, SecretStorageError,};diff --git a/crates/openhuman-embed/tests/agent_lifecycle.rs b/crates/openhuman-embed/tests/agent_lifecycle.rsindex 6efe391093..4241d0e094 100644--- a/crates/openhuman-embed/tests/agent_lifecycle.rs+++ b/crates/openhuman-embed/tests/agent_lifecycle.rs@@ -133,11 +133,10 @@ fn removing_an_agent_releases_everything_it_held() {.is_none(),"a closed instance must refuse direct gate decisions");- assert!(- gate.decide_for_agent("closing", &closing_request.request_id, decision)- .unwrap()- .is_none()- );+ assert!(gate+ .decide_for_agent("closing", &closing_request.request_id, decision)+ .unwrap()+ .is_none());}assert_eq!(gate.classify_decide_miss(&closing_request.request_id),@@ -145,29 +144,26 @@ fn removing_an_agent_releases_everything_it_held() {"a removal barrier is a benign decision miss, not a lost registration");for owner in [None, Some("closing")] {- assert!(- openhuman_core::security::approval::rpc::approval_decide(- &openhuman_core::core::runtime::DispatchCtx::process_default(),- &closing_request.request_id,- openhuman_embed::ApprovalDecision::ApproveOnce,- owner,- )- .await- .is_err()- );+ assert!(openhuman_core::security::approval::rpc::approval_decide(+ &openhuman_core::core::runtime::DispatchCtx::process_default(),+ &closing_request.request_id,+ openhuman_embed::ApprovalDecision::ApproveOnce,+ owner,+ )+ .await+ .is_err());}assert_eq!(closing.approvals().pending().unwrap().len(), 1);runtime.remove_agent("closing").await.unwrap();removed(closing_turn.await.unwrap(), "closing");assert!(!scratch.path().join("closing-wrote").exists());- assert!(- gate.list_pending_for_agent(+ assert!(gate+ .list_pending_for_agent(&openhuman_core::core::runtime::DispatchCtx::ambient(),Some("closing")).unwrap()- .is_empty()- );+ .is_empty());// Reusing the public id installs a fresh barrier: the new request// remains answerable through the same context-free gate entry point.@@ -182,14 +178,13 @@ fn removing_an_agent_releases_everything_it_held() {}).await;assert_ne!(replacement_request.request_id, closing_request.request_id);- assert!(- gate.decide(+ assert!(gate+ .decide(&replacement_request.request_id,openhuman_embed::ApprovalDecision::ApproveOnce,).unwrap()- .is_some()- );+ .is_some());assert!(replacement_turn.await.unwrap().is_ok());assert!(scratch.path().join("closing-wrote").exists());runtime.remove_agent("closing").await.unwrap();diff --git a/crates/openhuman-embed/tests/flow_approvals.rs b/crates/openhuman-embed/tests/flow_approvals.rsindex 4706752969..456047fa30 100644--- a/crates/openhuman-embed/tests/flow_approvals.rs+++ b/crates/openhuman-embed/tests/flow_approvals.rs@@ -192,11 +192,10 @@ fn flow_surfaces_correlate_decisions_and_closed_instances_never_publish() {assert!(matches!(&rows[0].source_context,Some(ApprovalSourceContext::Flow { flow_id, run_id, node_id })if flow_id == "flow-live" && run_id == "run-direct" && node_id.is_none()));- assert!(- gate.decide(&request_id, ApprovalDecision::Deny)- .unwrap()- .is_some()- );+ assert!(gate+ .decide(&request_id, ApprovalDecision::Deny)+ .unwrap()+ .is_some());let (outcome, audited_request) = park.await.unwrap();assert!(matches!(outcome, GateOutcome::Deny { .. }));// Only an allowed call returns an execution-audit id; a refusal@@ -225,11 +224,10 @@ fn flow_surfaces_correlate_decisions_and_closed_instances_never_publish() {}).await.unwrap();- assert!(- gate.decide(&request_id, ApprovalDecision::ApproveOnce)- .unwrap()- .is_none()- );+ assert!(gate+ .decide(&request_id, ApprovalDecision::ApproveOnce)+ .unwrap()+ .is_none());// Exercise the actual tool dispatcher too: a refused flow approval// must produce a denied tool result and never create the marker.@@ -296,14 +294,13 @@ fn flow_surfaces_correlate_decisions_and_closed_instances_never_publish() {matches!(outcome, GateOutcome::Deny { reason } if reason.contains("agent_removed")));assert!(request.is_none());- assert!(- gate.list_pending_for_agent(+ assert!(gate+ .list_pending_for_agent(&openhuman_core::core::runtime::DispatchCtx::ambient(),Some("flow-removed")).unwrap()- .is_empty()- );+ .is_empty());assert!(tokio::time::timeout(Duration::from_millis(100), async {loop {diff --git a/crates/openhuman-embed/tests/inline_permissions.rs b/crates/openhuman-embed/tests/inline_permissions.rsindex 8698c52e84..9300d44483 100644--- a/crates/openhuman-embed/tests/inline_permissions.rs+++ b/crates/openhuman-embed/tests/inline_permissions.rs@@ -10,10 +10,10 @@ use openhuman_embed::seams::{ToolHookContext, ToolHookDecision};use openhuman_embed::{AgentDefinitionSpec, AgentSpec, HostTurnTools, Runtime, Tool, ToolScopeSpec, Workspace,};-use serde_json::{Value, json};+use serde_json::{json, Value};use std::sync::{- Arc,atomic::{AtomicUsize, Ordering},+ Arc,};struct Probe(Arc<AtomicUsize>);diff --git a/crates/openhuman-embed/tests/tool_hook_context.rs b/crates/openhuman-embed/tests/tool_hook_context.rsindex 3e2328ac5c..ef98a95b43 100644--- a/crates/openhuman-embed/tests/tool_hook_context.rs+++ b/crates/openhuman-embed/tests/tool_hook_context.rs@@ -8,7 +8,7 @@ use common::{};use openhuman_embed::seams::{OpenHumanRunContext, ToolHook, ToolHookContext};use openhuman_embed::{Access, AgentDefinitionSpec, AgentSpec, Runtime, ToolScopeSpec, Workspace};-use serde_json::{Value, json};+use serde_json::{json, Value};use std::sync::{Arc, Mutex};struct Capture(Arc<Mutex<Vec<Value>>>);@@ -92,12 +92,10 @@ async fn scenario() {.unwrap();let observed = observed.lock().unwrap();assert_eq!(observed.len(), 4);- assert!(- observed[1]["output"]- .as_str()- .unwrap()- .contains("owner=isolated home=\n")- );+ assert!(observed[1]["output"]+ .as_str()+ .unwrap()+ .contains("owner=isolated home=\n"));for (pair, session, cwd) in [(&observed[..2], "override-session", turn_dir.path()),(&observed[2..], "default-session", default_dir.path()),diff --git a/tests/agent_harness_e2e.rs b/tests/agent_harness_e2e.rsindex 1898afe72e..988c01305d 100644--- a/tests/agent_harness_e2e.rs+++ b/tests/agent_harness_e2e.rs@@ -2320,10 +2320,10 @@ async fn multi_hop_delegation_chain_inner() {mod streaming_support {use async_trait::async_trait;+ use openhuman_core::agent::OpenHumanSessionHost;use openhuman_core::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry,};- use openhuman_core::agent::OpenHumanSessionHost;use openhuman_core::config::{AgentConfig, ContextConfig};use serde_json::json;use std::collections::VecDeque;diff --git a/tests/composio_list_tools_stack_overflow_regression.rs b/tests/composio_list_tools_stack_overflow_regression.rsindex 2ff90cfed9..53f37e8c8e 100644--- a/tests/composio_list_tools_stack_overflow_regression.rs+++ b/tests/composio_list_tools_stack_overflow_regression.rs@@ -108,9 +108,9 @@#![cfg(not(coverage))]use async_trait::async_trait;-use openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry;use openhuman_core::agent::harness::ParentExecutionContext;use openhuman_core::agent::subagent_host::{run_subagent, SubagentRunOptions};+use openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry;use openhuman_core::config::AgentConfig;use parking_lot::Mutex;use serde_json::json;