The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: apply rustfmt import ordering and line wrapping
Steven Enamakele38a31198805
diff --git a/crates/openhuman-core/src/agent/bus.rs b/crates/openhuman-core/src/agent/bus.rsindex 84c8df83d8..e0715b50cc 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/mod_tests.rs b/crates/openhuman-core/src/agent/goals/mod_tests.rsindex 9e44f7927c..74a001d5f3 100644--- a/crates/openhuman-core/src/agent/goals/mod_tests.rs+++ b/crates/openhuman-core/src/agent/goals/mod_tests.rs@@ -24,11 +24,9 @@ async fn goal_store_is_reused_within_a_context_and_isolated_between_agents() {drop(first);drop(repeated);let reacquired = goal_store(first_workspace.path(), &first_dispatch);- assert!(- cache_owns_store- .upgrade()- .is_some_and(|cached| Arc::ptr_eq(&cached, &reacquired))- );+ assert!(cache_owns_store+ .upgrade()+ .is_some_and(|cached| Arc::ptr_eq(&cached, &reacquired)));let isolated = goal_store(first_workspace.path(), &second_dispatch);let other_workspace = goal_store(second_workspace.path(), &first_dispatch);@@ -39,13 +37,11 @@ async fn goal_store_is_reused_within_a_context_and_isolated_between_agents() {.set("same-thread", "agent a objective", None).await.expect("write first agent goal");- assert!(- isolated- .get("same-thread")- .await- .expect("read second agent goal")- .is_none()- );+ assert!(isolated+ .get("same-thread")+ .await+ .expect("read second agent goal")+ .is_none());}#[tokio::test]@@ -74,13 +70,11 @@ async fn goal_store_isolated_between_profiles_with_the_same_agent_and_thread() {.set("shared-thread-id", "profile A objective", None).await.expect("write profile A goal");- assert!(- store_b- .get("shared-thread-id")- .await- .expect("read profile B goal")- .is_none()- );+ assert!(store_b+ .get("shared-thread-id")+ .await+ .expect("read profile B goal")+ .is_none());}#[tokio::test]@@ -151,13 +145,11 @@ async fn goal_tool_with_context_uses_the_business_goal_store() {.await.expect("execute without a thread");assert!(no_thread.is_error);- assert!(- goal_store(workspace.path(), &dispatch)- .get("goal-tool-business-store")- .await- .expect("confirm existing goal")- .is_some()- );+ assert!(goal_store(workspace.path(), &dispatch)+ .get("goal-tool-business-store")+ .await+ .expect("confirm existing goal")+ .is_some());}).await;}diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions/store_adapter.rs b/crates/openhuman-core/src/agent/orchestration/background_completions/store_adapter.rsindex 47ca8a97d6..06d47aa7ad 100644--- a/crates/openhuman-core/src/agent/orchestration/background_completions/store_adapter.rs+++ b/crates/openhuman-core/src/agent/orchestration/background_completions/store_adapter.rs@@ -29,9 +29,7 @@ impl tinyagents_storage_kit::StorageBackend for CompletionBackend {condition: &tinyagents_storage_kit::WriteCondition,) -> tinyagents_storage_kit::error::Result<tinyagents_storage_kit::ScopedStorage> {let host_scope = crate::storage::Scope::new(scope.as_str())?;- let storage = self- .0- .for_scope_conditioned(&host_scope, condition)?;+ let storage = self.0.for_scope_conditioned(&host_scope, condition)?;Ok(tinyagents_storage_kit::ScopedStorage::new(storage,scope.clone(),@@ -81,7 +79,7 @@ pub(in crate::agent::orchestration) fn open_driver_store(scope,fallback,)- .map_err(|error| anyhow::anyhow!("open the completion store: {error}"))+ .map_err(|error| anyhow::anyhow!("open the completion store: {error}"))})}diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents.rsindex 6708dc6d51..f07303591f 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents.rs@@ -7,8 +7,8 @@ mod roster;mod task_ledger;pub(crate) use cancel::{- CancelledSubagent, cancel_all, cancel_by_session_in_workspace,- cancel_by_task_with_workspace_reason, cancel_for_thread, stop_for_thread,+ cancel_all, cancel_by_session_in_workspace, cancel_by_task_with_workspace_reason,+ cancel_for_thread, stop_for_thread, CancelledSubagent,};pub(crate) use registry::admit_spawn;pub(crate) use roster::active_subagents_context_block;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 cbbe54d187..03cbd66f9a 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,11 +11,11 @@ use std::path::{Path, PathBuf};use std::sync::{Arc, OnceLock};use tinyagents_orchestration::subagent::{- WaitError, orphaned_subagent_reason, record_agent_id, record_parent_session, task_status_label,+ orphaned_subagent_reason, record_agent_id, record_parent_session, task_status_label, WaitError,};use tinyagents_tasks::{- InMemoryTaskStore, OrchestrationTaskFilter, TaskStore, TaskStoreRegistry,- open_driver_task_store_or_memory, reconcile_orphaned_tasks,+ open_driver_task_store_or_memory, reconcile_orphaned_tasks, InMemoryTaskStore,+ OrchestrationTaskFilter, TaskStore, TaskStoreRegistry,};/// One cached ledger: a workspace and the storage scope it was opened for.diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port_epoch.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port_epoch.rsindex 805914cfdb..d88123c64a 100644--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port_epoch.rs+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/tiny_port_epoch.rs@@ -23,12 +23,9 @@ pub(super) fn import_parent_epoch(.await?;let value = serde_json::to_value(ParentEpochRecord { parent_epoch }).map_err(|error| crate::storage::StorageError::backend(error.to_string()))?;- crate::storage::documents::update_or_insert(- &documents,- EPOCHS,- &session_id,- move |_| Some(value.clone()),- )+ crate::storage::documents::update_or_insert(&documents, EPOCHS, &session_id, move |_| {+ Some(value.clone())+ }).await?;Ok(())})diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rsindex bfbc1ff3e9..ce0ac7ff74 100644--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs@@ -26,8 +26,8 @@ mod checkpoint;#[path = "lifecycle_outcome.rs"]mod outcome;use checkpoint::absolute_checkpoint_dir;-use driver_adapter::HostInvocation;pub(super) use driver_adapter::outcome_to_host;+use driver_adapter::HostInvocation;#[path = "lifecycle/driver_result.rs"]mod driver_result;@@ -103,13 +103,13 @@ pub(crate) async fn spawn_async_via_driver_tool(input: String,options: SubagentRunOptions,completion: impl Fn(- String,- Result<SubagentRunOutcome, String>,- bool,- ) -> Pin<Box<dyn Future<Output = ()> + Send>>- + Send- + Sync- + 'static,+ String,+ Result<SubagentRunOutcome, String>,+ bool,+ ) -> Pin<Box<dyn Future<Output = ()> + Send>>+ + Send+ + Sync+ + 'static,) -> Result<String, SubagentRunError> {spawn_async_via_driver_tool_using_jobs(parent, definition, input, options, None, None, completion,@@ -127,13 +127,13 @@ pub(crate) async fn resume_async_via_driver_tool(input: String,options: SubagentRunOptions,completion: impl Fn(- String,- Result<SubagentRunOutcome, String>,- bool,- ) -> Pin<Box<dyn Future<Output = ()> + Send>>- + Send- + Sync- + 'static,+ String,+ Result<SubagentRunOutcome, String>,+ bool,+ ) -> Pin<Box<dyn Future<Output = ()> + Send>>+ + Send+ + Sync+ + 'static,) -> Result<String, SubagentRunError> {spawn_async_via_driver_tool_using_jobs(parent,@@ -155,13 +155,13 @@ pub(crate) async fn spawn_async_via_driver_tool_with_jobs(options: SubagentRunOptions,jobs: tinyagents_orchestration::subagent::SubAgentJobRegistry,completion: impl Fn(- String,- Result<SubagentRunOutcome, String>,- bool,- ) -> Pin<Box<dyn Future<Output = ()> + Send>>- + Send- + Sync- + 'static,+ String,+ Result<SubagentRunOutcome, String>,+ bool,+ ) -> Pin<Box<dyn Future<Output = ()> + Send>>+ + Send+ + Sync+ + 'static,) -> Result<String, SubagentRunError> {spawn_async_via_driver_tool_using_jobs(parent,@@ -183,13 +183,13 @@ async fn spawn_async_via_driver_tool_using_jobs(jobs: Option<tinyagents_orchestration::subagent::SubAgentJobRegistry>,continuation: Option<(SubagentTaskKey, SubagentResume)>,completion: impl Fn(- String,- Result<SubagentRunOutcome, String>,- bool,- ) -> Pin<Box<dyn Future<Output = ()> + Send>>- + Send- + Sync- + 'static,+ String,+ Result<SubagentRunOutcome, String>,+ bool,+ ) -> Pin<Box<dyn Future<Output = ()> + Send>>+ + Send+ + Sync+ + 'static,) -> Result<String, SubagentRunError> {let task_id = continuation.as_ref()diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rsindex 46bb8f7220..c8356957c4 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs@@ -11,7 +11,6 @@ use std::time::Instant;use crate::agent::prompts::render_subagent_system_prompt_with_format;use crate::agent::prompts::{PromptContext, SubagentRenderOptions};-use crate::agent::subagent_host::ParentExecutionContext;use crate::agent::subagent_host::definition_iter_cap;use crate::agent::subagent_host::tool_prep::{dedup_owned_tool_specs, filter_definition_tool_indices, subagent_prompt_protocol,@@ -19,12 +18,11 @@ use crate::agent::subagent_host::tool_prep::{use crate::agent::subagent_host::types::{SubagentMode, SubagentRunError, SubagentRunOptions, SubagentRunOutcome,};+use crate::agent::subagent_host::ParentExecutionContext;use crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH;use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};-use tinyagents_definition::{- AgentTier, IterationPolicy, PromptSource, validate_tier_transition,-};-use tinyagents_harness::context::{RunConfig, RunDepth, current_run_depth, with_run_depth};+use tinyagents_definition::{validate_tier_transition, AgentTier, IterationPolicy, PromptSource};+use tinyagents_harness::context::{current_run_depth, with_run_depth, RunConfig, RunDepth};use tinyagents_harness::turn_policy::AGENT_TURN_MAX_OUTPUT_TOKENS;use tinyagents_harness_tools::fs::file_state::with_file_state_agent_id;use tinytools::{Tool, ToolSpec};diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rsindex 00670edbc7..0d14caa35d 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs@@ -1,5 +1,5 @@use super::*;-use crate::agent::subagent_host::{SubagentRunStatus, spawn_async_via_driver_tool_with_jobs};+use crate::agent::subagent_host::{spawn_async_via_driver_tool_with_jobs, SubagentRunStatus};#[tokio::test]async fn prepared_subagent_runs_through_driver_jobs_dispatcher() {@@ -251,12 +251,10 @@ async fn independent_host_bundles_share_and_project_the_persisted_winner() {!leader.final_history.is_empty(),"winner history is preserved");- assert!(- leader- .final_history- .iter()- .any(|row| { row.role == "tool" && row.tool_call_id.as_deref() == Some("call-1") })- );+ assert!(leader+ .final_history+ .iter()+ .any(|row| { row.role == "tool" && row.tool_call_id.as_deref() == Some("call-1") }));assert_eq!(leader.usage.input_tokens, follower.usage.input_tokens);assert!(leader.usage.input_tokens > 0, "winner usage is preserved");assert_eq!(leader.artifact_paths, follower.artifact_paths);@@ -402,21 +400,19 @@ async fn closing_a_durable_driver_session_cancels_only_its_registered_child() {);let owner_scope: std::sync::Arc<dyn Fn(u64) -> String + Send + Sync> =std::sync::Arc::new(move |_| owner.clone());- assert!(- port.close("close-driver-session")- .await- .expect("Tiny close adapter cancels then closes the durable row")- );+ assert!(port+ .close("close-driver-session")+ .await+ .expect("Tiny close adapter cancels then closes the durable row"));assert_eq!(jobs.get(job_id.as_str()).unwrap().status,SubAgentJobStatus::Running,"the job remains visible while cooperative cancellation unwinds");- assert!(- port.close("close-driver-session")- .await- .expect("repeated close is idempotent without re-cancelling")- );+ assert!(port+ .close("close-driver-session")+ .await+ .expect("repeated close is idempotent without re-cancelling"));assert!(!parent_cancellation.is_cancelled(), "parent stays live");let tiny_store: std::sync::Arc<dyn TinySessionStore> = std::sync::Arc::new(port.clone());diff --git a/crates/openhuman-core/src/agent/tinyagents/state_block.rs b/crates/openhuman-core/src/agent/tinyagents/state_block.rsindex cdd5ce51c3..b48948ec7c 100644--- a/crates/openhuman-core/src/agent/tinyagents/state_block.rs+++ b/crates/openhuman-core/src/agent/tinyagents/state_block.rs@@ -23,7 +23,7 @@ use std::sync::Arc;use tinyagents_harness::runtime::AgentHarness;use tinyagents_harness::store::Store;-use tinyagents_harness_tools::scratchpad::{ClosedPlan, store as scratchpad_store};+use tinyagents_harness_tools::scratchpad::{store as scratchpad_store, ClosedPlan};use tinyagents_harness_tools::state_block::StateBlockMiddleware;/// Whether a turn gets the run-state block.diff --git a/crates/openhuman-core/src/agent/tinyagents/state_block_tests.rs b/crates/openhuman-core/src/agent/tinyagents/state_block_tests.rsindex 187bebeb12..002b4177bf 100644--- a/crates/openhuman-core/src/agent/tinyagents/state_block_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/state_block_tests.rs@@ -61,7 +61,7 @@ fn a_turn_that_suppresses_the_goal_gets_no_block() {#[tokio::test]async fn a_finished_plan_hands_its_notes_over_at_the_end_of_the_turn() {use tinyagents_harness_tools::scratchpad::ScratchpadUpdate;- use tinyagents_harness_tools::todos::{TodoItem, store as todo_store};+ use tinyagents_harness_tools::todos::{store as todo_store, TodoItem};let workspace = tempfile::tempdir().unwrap();let store = crate::storage::sessions::stores_or_ephemeral(workspace.path()).kv;@@ -80,11 +80,9 @@ async fn a_finished_plan_hands_its_notes_over_at_the_end_of_the_turn() {.unwrap();let dispatch = crate::core::runtime::DispatchCtx::ambient();- assert!(- close_finished_plan(workspace.path(), None, &dispatch)- .await- .is_none()- );+ assert!(close_finished_plan(workspace.path(), None, &dispatch)+ .await+ .is_none());assert!(close_finished_plan(workspace.path(), Some("t"), &dispatch).awaitdiff --git a/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs b/crates/openhuman-core/src/agent/tools/plan_exit_tests.rsindex 7a8abb4e20..78338d0fe3 100644--- a/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs+++ b/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs@@ -1,4 +1,4 @@-use crate::agent::tools::{PLAN_EXIT_MARKER, plan_exit::plan_exit_tool};+use crate::agent::tools::{plan_exit::plan_exit_tool, PLAN_EXIT_MARKER};use serde_json::json;use tinyagents_harness_tools::plan_review::{PlanReviewRequest, PlanReviewResolution};use tinytools::{PermissionLevel, Tool, ToolCallOptions, ToolRunContext};@@ -82,16 +82,14 @@ 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::host::global().decide_by_thread(- &crate::core::runtime::DispatchCtx::ambient()- .tenant()- .unwrap()- .profile_only(),- thread_id,- PlanReviewResolution::Approve,- )- );+ assert!(crate::plan_review::host::global().decide_by_thread(+ &crate::core::runtime::DispatchCtx::ambient()+ .tenant()+ .unwrap()+ .profile_only(),+ 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 697d757d59..777468e3de 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_harness_tools::todos::{TodoItem, TodoStatus};/// Serialize tests that share the process-global scratch store. Same lockdiff --git a/crates/openhuman-core/src/agent_runs/subagent_control.rs b/crates/openhuman-core/src/agent_runs/subagent_control.rsindex dcb025ff30..c14404304b 100644--- a/crates/openhuman-core/src/agent_runs/subagent_control.rs+++ b/crates/openhuman-core/src/agent_runs/subagent_control.rs@@ -15,12 +15,12 @@//! cancelled.use crate::core::runtime::DispatchCtx;-use serde_json::{Map, Value, json};+use serde_json::{json, Map, Value};use crate::agent::orchestration::running_subagents::CancelledSubagent;use crate::agent::orchestration::{background_completions, running_subagents, subagent_sessions};-use crate::core::Outcome;use crate::core::all::{ControllerFuture, RegisteredController};+use crate::core::Outcome;use crate::core::{ControllerSchema, FieldSchema, TypeSchema};/// Controller schemas exposed for detached sub-agent control.diff --git a/crates/openhuman-core/src/agent_runs/subagent_control_tests.rs b/crates/openhuman-core/src/agent_runs/subagent_control_tests.rsindex 0100ad672a..ecc55ea66e 100644--- a/crates/openhuman-core/src/agent_runs/subagent_control_tests.rs+++ b/crates/openhuman-core/src/agent_runs/subagent_control_tests.rs@@ -76,7 +76,7 @@ fn field(out: &Value, name: &str) -> Option<Value> {/// durable session alone, instead of rewriting it as "cancelled by user".#[tokio::test]async fn cancel_of_a_legacy_failed_run_reports_its_outcome_and_rewrites_nothing() {- use crate::agent::orchestration::subagent_sessions::{SubagentSessionStore, mark_failed};+ use crate::agent::orchestration::subagent_sessions::{mark_failed, SubagentSessionStore};use crate::core::runtime::{CoreContext, DispatchCtx, DomainSet};use std::sync::Arc;@@ -157,8 +157,8 @@ async fn cancelling_a_paused_driver_queues_a_failed_delivery_with_reason() {forget_workspace_for_test, pending_for,};use crate::agent::orchestration::subagent_sessions::{- DriverTaskCancellation, SubagentSessionSelector, SubagentSessionStore,- SubagentSessionUpsert, mark_finished, upsert_running,+ mark_finished, upsert_running, DriverTaskCancellation, SubagentSessionSelector,+ SubagentSessionStore, SubagentSessionUpsert,};use std::sync::Arc;use tinyagents_orchestration::subagent::SubagentTaskKey;@@ -241,16 +241,14 @@ async fn cancelling_a_paused_driver_queues_a_failed_delivery_with_reason() {parent_thread.clone(),).expect("paused child owner registered");- assert!(- settle_paused_driver_cancel(- &ctx,- &observed,- observed.parent_epoch,- Some("user requested stop")- )- .await- .expect("paused cancellation settles")- );+ assert!(settle_paused_driver_cancel(+ &ctx,+ &observed,+ observed.parent_epoch,+ Some("user requested stop")+ )+ .await+ .expect("paused cancellation settles"));let driver = crate::agent::orchestration::subagent_sessions::open_for_context(&ctx,diff --git a/crates/openhuman-core/src/artifacts/tiny_store.rs b/crates/openhuman-core/src/artifacts/tiny_store.rsindex 6da617160d..57c58c2029 100644--- a/crates/openhuman-core/src/artifacts/tiny_store.rs+++ b/crates/openhuman-core/src/artifacts/tiny_store.rs@@ -36,7 +36,7 @@ use tiny_artifacts::{use super::files::FileRoots;use super::types::ArtifactKind as LegacyArtifactKind;use crate::security::approval::ApprovalChatContext;-use crate::tools::per_call::{PerCallTool, context as per_call_context};+use crate::tools::per_call::{context as per_call_context, PerCallTool};/// Subdirectory under the artifacts root holding versioned records.const VERSIONED_SUBDIR: &str = "versioned";diff --git a/crates/openhuman-core/src/artifacts/tiny_store_tests.rs b/crates/openhuman-core/src/artifacts/tiny_store_tests.rsindex 59f8960280..0b7e5f4977 100644--- a/crates/openhuman-core/src/artifacts/tiny_store_tests.rs+++ b/crates/openhuman-core/src/artifacts/tiny_store_tests.rs@@ -195,15 +195,13 @@ async fn explicit_artifact_context_binds_records_and_blobs_to_the_same_profile()None,);assert!(artifacts_b.get(&id).await.unwrap().is_none());- assert!(- files_b- .as_ref()- .unwrap()- .metadata(&file.key)- .await- .unwrap()- .is_none()- );+ assert!(files_b+ .as_ref()+ .unwrap()+ .metadata(&file.key)+ .await+ .unwrap()+ .is_none());let card_a = CoreContext::scope(core_a.clone(), async {super::super::store::get_artifact(&workspace, &id).await@@ -476,20 +474,16 @@ async fn deleting_an_artifact_removes_its_card() {.await.unwrap();let id = saved.record.id;- assert!(- super::super::store::get_artifact(&workspace, &id)- .await- .is_ok()- );+ assert!(super::super::store::get_artifact(&workspace, &id)+ .await+ .is_ok());let (removed, notice) = artifacts.delete(&id).await.unwrap();assert!(removed);assert!(notice.is_none(), "{notice:?}");- assert!(- super::super::store::get_artifact(&workspace, &id)- .await- .is_err()- );+ assert!(super::super::store::get_artifact(&workspace, &id)+ .await+ .is_err());}#[test]diff --git a/crates/openhuman-core/src/artifacts/version_documents.rs b/crates/openhuman-core/src/artifacts/version_documents.rsindex 3eac9d0d99..0004a98cbb 100644--- a/crates/openhuman-core/src/artifacts/version_documents.rs+++ b/crates/openhuman-core/src/artifacts/version_documents.rs@@ -29,10 +29,10 @@ use serde_json::Value;use tiny_artifacts::{ArtifactRecord, ArtifactStore};use tinystoragedrivers::{CollectionSpec, Precondition, Query, Sort};-use super::storage_schema::{VERSIONS, version_body, version_record};-use crate::storage::DocumentStoreExt;+use super::storage_schema::{version_body, version_record, VERSIONS};use crate::storage::documents::Repo;use crate::storage::schema_support::key_of;+use crate::storage::DocumentStoreExt;const DOMAIN: &str = "artifacts::versions";fn collections() -> Vec<CollectionSpec> {diff --git a/crates/openhuman-core/src/artifacts/version_documents_tests.rs b/crates/openhuman-core/src/artifacts/version_documents_tests.rsindex b436a48336..e2f7c982c3 100644--- a/crates/openhuman-core/src/artifacts/version_documents_tests.rs+++ b/crates/openhuman-core/src/artifacts/version_documents_tests.rs@@ -35,11 +35,9 @@ async fn records_round_trip_through_the_document_store() {assert!(store.get("a-1").await.unwrap().is_none());assert!(!store.delete("a-1").await.unwrap());// Nothing is written as a file.- assert!(- !super::super::tiny_store::legacy_versioned_dir(&ws)- .join("a-2.json")- .exists()- );+ assert!(!super::super::tiny_store::legacy_versioned_dir(&ws)+ .join("a-2.json")+ .exists());}#[tokio::test]diff --git a/crates/openhuman-core/src/channels/bus/delivery.rs b/crates/openhuman-core/src/channels/bus/delivery.rsindex d6c30e7510..55391d012a 100644--- a/crates/openhuman-core/src/channels/bus/delivery.rs+++ b/crates/openhuman-core/src/channels/bus/delivery.rs@@ -8,7 +8,7 @@ use tinychannels_bus::module_progressive::{ProgressiveCommand, ProgressiveEvent, ProgressiveResult, ProgressiveTransportRequest,ProgressiveTransportResult,};-use tinychannels_bus::{ChannelBackendRequest, ChannelBackendResult, methods};+use tinychannels_bus::{methods, ChannelBackendRequest, ChannelBackendResult};fn request_channel(request: &ProgressiveTransportRequest) -> &str {match request {diff --git a/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs b/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rsindex bffce5fba7..f71f9a2de1 100644--- a/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs+++ b/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs@@ -15,12 +15,10 @@ fn channel_message_body_adds_deterministic_idempotency_key() {assert_eq!(left["text"], "hello");assert_eq!(left["threadId"], "topic-1");assert_eq!(left["idempotencyKey"], right["idempotencyKey"]);- assert!(- left["idempotencyKey"]- .as_str()- .expect("idempotency key")- .starts_with("legacy-send:telegram:")- );+ assert!(left["idempotencyKey"]+ .as_str()+ .expect("idempotency key")+ .starts_with("legacy-send:telegram:"));}#[test]diff --git a/crates/openhuman-core/src/channels/bus_test_support_tests.rs b/crates/openhuman-core/src/channels/bus_test_support_tests.rsindex e33eb8cc02..6ecc68b630 100644--- a/crates/openhuman-core/src/channels/bus_test_support_tests.rs+++ b/crates/openhuman-core/src/channels/bus_test_support_tests.rs@@ -2,7 +2,7 @@use tinychannels::channel::derive_inbound_thread_id;use tinychannels::delivery::progressive::{- StreamingState, extract_message_id, latest_thinking_snippet,+ extract_message_id, latest_thinking_snippet, StreamingState,};pub fn extract_message_id_for_test(resp: &serde_json::Value) -> Option<String> {diff --git a/crates/openhuman-core/src/channels/context.rs b/crates/openhuman-core/src/channels/context.rsindex a29f8d50b2..71f2b7c383 100644--- a/crates/openhuman-core/src/channels/context.rs+++ b/crates/openhuman-core/src/channels/context.rs@@ -11,9 +11,9 @@ use std::sync::{Arc, Mutex};use tinytools::Tool;pub(crate) use tinychannels_bus::context::{- CHANNEL_MESSAGE_TIMEOUT_SECS, CHANNEL_TYPING_REFRESH_INTERVAL_SECS, ChannelRouteSelection,- ConversationHistoryMap, DEFAULT_CHANNEL_INITIAL_BACKOFF_SECS, DEFAULT_CHANNEL_MAX_BACKOFF_SECS,- MAX_CHANNEL_HISTORY, clear_sender_history, compact_sender_history,+ clear_sender_history, compact_sender_history, ChannelRouteSelection, ConversationHistoryMap,+ CHANNEL_MESSAGE_TIMEOUT_SECS, CHANNEL_TYPING_REFRESH_INTERVAL_SECS,+ DEFAULT_CHANNEL_INITIAL_BACKOFF_SECS, DEFAULT_CHANNEL_MAX_BACKOFF_SECS, MAX_CHANNEL_HISTORY,};#[cfg(test)]@@ -23,7 +23,7 @@ pub(crate) use tinychannels_bus::context::{#[cfg(test)]pub(crate) use tinychannels::context::{- MIN_CHANNEL_MESSAGE_TIMEOUT_SECS, effective_channel_message_timeout_secs,+ effective_channel_message_timeout_secs, MIN_CHANNEL_MESSAGE_TIMEOUT_SECS,};pub(crate) type TurnModelSourceCacheMap = Arc<Mutex<HashMap<String, TurnModelSource>>>;diff --git a/crates/openhuman-core/src/channels/context_tests.rs b/crates/openhuman-core/src/channels/context_tests.rsindex 36a7a11a0a..ef309460ba 100644--- a/crates/openhuman-core/src/channels/context_tests.rs+++ b/crates/openhuman-core/src/channels/context_tests.rs@@ -118,22 +118,22 @@ fn clear_and_compact_sender_history_update_cached_messages() {}clear_sender_history(&ctx.conversation_histories, sender);- assert!(- !ctx.conversation_histories- .lock()- .unwrap()- .contains_key(sender)- );+ assert!(!ctx+ .conversation_histories+ .lock()+ .unwrap()+ .contains_key(sender));}#[tokio::test]async fn overflow_detection_covers_edge_cases() {let ctx = runtime_context();- assert!(- is_context_window_overflow_error(&ctx, &anyhow::anyhow!("Maximum context length exceeded"))- .await- .unwrap()- );+ assert!(is_context_window_overflow_error(+ &ctx,+ &anyhow::anyhow!("Maximum context length exceeded")+ )+ .await+ .unwrap());assert!(!is_context_window_overflow_error(&ctx, &anyhow::anyhow!("network timeout")).awaitdiff --git a/crates/openhuman-core/src/channels/contract_schema.rs b/crates/openhuman-core/src/channels/contract_schema.rsindex b9491f04b2..4371baee33 100644--- a/crates/openhuman-core/src/channels/contract_schema.rs+++ b/crates/openhuman-core/src/channels/contract_schema.rs@@ -7,8 +7,8 @@//! schemas the contract defines.use tinychannels_bus::controllers::{- ChannelControllerField, ChannelControllerFieldType, ChannelControllerSchema,- channel_controller_schema,+ channel_controller_schema, ChannelControllerField, ChannelControllerFieldType,+ ChannelControllerSchema,};use crate::core::{ControllerSchema, FieldSchema, TypeSchema};diff --git a/crates/openhuman-core/src/channels/controllers/backend.rs b/crates/openhuman-core/src/channels/controllers/backend.rsindex a404c6d6ca..fef919d25b 100644--- a/crates/openhuman-core/src/channels/controllers/backend.rs+++ b/crates/openhuman-core/src/channels/controllers/backend.rs@@ -1,19 +1,19 @@//! TinyChannels backend implementation for OpenHuman controller operations.-use serde_json::Value;#[cfg(test)]use serde_json::json;+use serde_json::Value;use crate::config::{ChannelsConfig, Config};use crate::core::Outcome;use super::ops;-#[cfg(test)]-use tinychannels_bus::SendMessage;use tinychannels_bus::controllers::{ChannelAuthMode, ChannelDisconnectResult, ChannelReactionResult, ChannelSendMessageResult,ChannelStatusEntry, ChannelThreadListResult, ChannelThreadResult,};+#[cfg(test)]+use tinychannels_bus::SendMessage;/// OpenHuman-owned implementation of the TinyChannels backend contract.#[derive(Debug, Clone)]diff --git a/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rsindex 35b1c97210..47d3b6f859 100644--- a/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rs+++ b/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rs@@ -1,7 +1,7 @@//! Disconnecting a channel: removing stored credentials and clearing its//! runtime config, optionally along with its memory chunks.-use serde_json::{Value, json};+use serde_json::{json, Value};use crate::config::Config;use crate::core::Outcome;@@ -9,7 +9,7 @@ use crate::security::credentials;use super::memory::clear_channel_memory;use super::shared::credential_provider;-use tinychannels_bus::controllers::{ChannelAuthMode, find_channel_definition};+use tinychannels_bus::controllers::{find_channel_definition, ChannelAuthMode};/// Disconnect a channel by removing stored credentials.pub async fn disconnect_channel(diff --git a/crates/openhuman-core/src/channels/controllers/ops/connect/memory_tests.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/memory_tests.rsindex f85b4b15a3..7ce2d79e8f 100644--- a/crates/openhuman-core/src/channels/controllers/ops/connect/memory_tests.rs+++ b/crates/openhuman-core/src/channels/controllers/ops/connect/memory_tests.rs@@ -179,16 +179,12 @@ async fn clears_stamped_and_legacy_channel_conversations_without_mutating_legacy.await.unwrap().items;- assert!(- remaining- .iter()- .any(|item| { item.kind == ItemKind::Learning && item.text == "durable preference" })- );- assert!(- remaining.iter().any(|item| {- item.kind == ItemKind::Document && item.text == "durable brain document"- })- );+ assert!(remaining+ .iter()+ .any(|item| { item.kind == ItemKind::Learning && item.text == "durable preference" }));+ assert!(remaining+ .iter()+ .any(|item| { item.kind == ItemKind::Document && item.text == "durable brain document" }));assert!(remaining.iter().any(|item| {item.kind == ItemKind::Conversation&& item.meta.thread_id.as_deref() == Some("telegram-current")@@ -482,11 +478,9 @@ async fn offline_snapshot_scans_every_thread_and_message_page() {.await.unwrap();assert_eq!(threads.len(), 66);- assert!(- threads[..64]- .iter()- .all(|thread| thread.id != target_thread)- );+ assert!(threads[..64]+ .iter()+ .all(|thread| thread.id != target_thread));assert!(threads.iter()@@ -503,11 +497,9 @@ async fn offline_snapshot_scans_every_thread_and_message_page() {.await.unwrap();assert_eq!(messages.len(), 66);- assert!(- messages[..64]- .iter()- .all(|message| message.extra_metadata.get("channel").is_none())- );+ assert!(messages[..64]+ .iter()+ .all(|message| message.extra_metadata.get("channel").is_none()));assert_eq!(messages[64].extra_metadata["channel"], "discord");assert!(messages[65].extra_metadata.get("channel").is_none());assert!(diff --git a/crates/openhuman-core/src/channels/controllers/ops/connect/status.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/status.rsindex 19cdea98f6..dc64e6e3eb 100644--- a/crates/openhuman-core/src/channels/controllers/ops/connect/status.rs+++ b/crates/openhuman-core/src/channels/controllers/ops/connect/status.rs@@ -1,7 +1,7 @@//! Channel connection status, the default proactive-delivery channel, and//! the merged set of currently-connected channel slugs.-use serde_json::{Value, json};+use serde_json::{json, Value};use crate::config::Config;use crate::core::Outcome;diff --git a/crates/openhuman-core/src/channels/controllers/ops/connect/test_channel.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/test_channel.rsindex 281f236073..86b970a0aa 100644--- a/crates/openhuman-core/src/channels/controllers/ops/connect/test_channel.rs+++ b/crates/openhuman-core/src/channels/controllers/ops/connect/test_channel.rs@@ -1,7 +1,7 @@//! Testing credentials through the module without persisting host configuration.use serde_json::Value;-use tinychannels_bus::{ChannelControllerRequest, ChannelControllerResult, methods};+use tinychannels_bus::{methods, ChannelControllerRequest, ChannelControllerResult};use crate::config::Config;use crate::core::Outcome;diff --git a/crates/openhuman-core/src/channels/controllers/ops/discord.rs b/crates/openhuman-core/src/channels/controllers/ops/discord.rsindex 957012c7ce..7709d54c4f 100644--- a/crates/openhuman-core/src/channels/controllers/ops/discord.rs+++ b/crates/openhuman-core/src/channels/controllers/ops/discord.rs@@ -8,8 +8,8 @@ use crate::core::Outcome;use crate::modules::channel_controller::{self, DiscordReply};use crate::security::credentials;use tinychannels_bus::{- ChannelControllerRequest,controllers::{BotPermissionCheck, DiscordGuild, DiscordTextChannel},+ ChannelControllerRequest,};use super::connect::shared::credential_provider;diff --git a/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rs b/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rsindex 0f6585ae18..3eb7b58b83 100644--- a/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rs+++ b/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rs@@ -558,12 +558,10 @@ async fn set_default_channel_rejects_unknown_and_empty() {.await.expect("seed discord");- assert!(- set_default_channel(&mut config, "myspace")- .await- .unwrap_err()- .contains("unknown channel"),- );+ assert!(set_default_channel(&mut config, "myspace")+ .await+ .unwrap_err()+ .contains("unknown channel"),);assert!(set_default_channel(&mut config, " ").await.is_err());// A rejected set must not clobber the previously persisted value.diff --git a/crates/openhuman-core/src/channels/controllers/schemas.rs b/crates/openhuman-core/src/channels/controllers/schemas.rsindex cb9e1c17fa..b5f02e8a21 100644--- a/crates/openhuman-core/src/channels/controllers/schemas.rs+++ b/crates/openhuman-core/src/channels/controllers/schemas.rs@@ -1,14 +1,14 @@//! RPC controller schemas and handlers for the channels domain.use crate::core::runtime::DispatchCtx;-use serde::Deserialize;use serde::de::DeserializeOwned;+use serde::Deserialize;use serde_json::{Map, Value};use crate::config::Config;+use crate::core::all::{ControllerFuture, RegisteredController};use crate::core::ControllerSchema;use crate::core::Outcome;-use crate::core::all::{ControllerFuture, RegisteredController};use super::backend::OpenHumanChannelBackend;use crate::channels::contract_schema::from_channel_controller_schema;diff --git a/crates/openhuman-core/src/channels/host/channel_events.rs b/crates/openhuman-core/src/channels/host/channel_events.rsindex d8f426e46b..ea713f0ba4 100644--- a/crates/openhuman-core/src/channels/host/channel_events.rs+++ b/crates/openhuman-core/src/channels/host/channel_events.rs@@ -1,12 +1,12 @@//! Host-owned approval routing and turn events over the channel module.-use crate::channels::{Channel, outbound::text_message};+use crate::channels::{outbound::text_message, Channel};use crate::core::events::DomainEvent;use async_trait::async_trait;use std::collections::HashMap;use std::path::PathBuf;use std::sync::{Arc, Mutex};-use tinybus::EventHandler;use tinybus::module::ModuleClient;+use tinybus::EventHandler;#[derive(Clone)]struct ReplyContext {diff --git a/crates/openhuman-core/src/channels/host/host_tests.rs b/crates/openhuman-core/src/channels/host/host_tests.rsindex 87b5943afe..a03eb07e33 100644--- a/crates/openhuman-core/src/channels/host/host_tests.rs+++ b/crates/openhuman-core/src/channels/host/host_tests.rs@@ -63,8 +63,8 @@ async fn event_sink_rejects_non_object_payload() {#[tokio::test]async fn event_sink_routes_channel_reactions_to_domain_bus() {let sink = OpenHumanEventSink;- assert!(- sink.publish(+ assert!(sink+ .publish("channel","reaction_received",serde_json::json!({@@ -73,10 +73,9 @@ async fn event_sink_routes_channel_reactions_to_domain_bus() {}),).await- .is_ok()- );- assert!(- sink.publish(+ .is_ok());+ assert!(sink+ .publish("channel","reaction_sent",serde_json::json!({@@ -85,19 +84,16 @@ async fn event_sink_routes_channel_reactions_to_domain_bus() {}),).await- .is_ok()- );+ .is_ok());// Unknown domain/kind is a benign no-op.- assert!(- sink.publish("mystery", "x", serde_json::json!({}))- .await- .is_ok()- );- assert!(- sink.publish("channel", "unknown", serde_json::json!({}))- .await- .is_ok()- );+ assert!(sink+ .publish("mystery", "x", serde_json::json!({}))+ .await+ .is_ok());+ assert!(sink+ .publish("channel", "unknown", serde_json::json!({}))+ .await+ .is_ok());}// --- ConversationHistoryStore --------------------------------------------diff --git a/crates/openhuman-core/src/channels/host/mod.rs b/crates/openhuman-core/src/channels/host/mod.rsindex eb0ba8ae10..d5746235fe 100644--- a/crates/openhuman-core/src/channels/host/mod.rs+++ b/crates/openhuman-core/src/channels/host/mod.rs@@ -17,10 +17,10 @@ pub use channel_events::{ChannelApprovalSurfaceSubscriber, ChannelTurnStateSubsc#[cfg(test)]use std::sync::Arc;-#[cfg(test)]-use tinychannels::ChannelHost;#[cfg(test)]use tinychannels::host::ChannelHostBuilder;+#[cfg(test)]+use tinychannels::ChannelHost;#[cfg(test)]use crate::config::Config;diff --git a/crates/openhuman-core/src/channels/host/remote_control.rs b/crates/openhuman-core/src/channels/host/remote_control.rsindex 592028bec4..6b433b3aa5 100644--- a/crates/openhuman-core/src/channels/host/remote_control.rs+++ b/crates/openhuman-core/src/channels/host/remote_control.rs@@ -1,6 +1,6 @@//! Captured host conversation and session state supplied to the channel module.-use crate::channels::context::{ChannelRuntimeContext, clear_sender_history};+use crate::channels::context::{clear_sender_history, ChannelRuntimeContext};use crate::core::runtime::DispatchCtx;use crate::threads::store::{self as conversations, CreateConversationThread};diff --git a/crates/openhuman-core/src/channels/module_fixture_tests.rs b/crates/openhuman-core/src/channels/module_fixture_tests.rsindex 0df7989762..38ea3cb9ad 100644--- a/crates/openhuman-core/src/channels/module_fixture_tests.rs+++ b/crates/openhuman-core/src/channels/module_fixture_tests.rs@@ -8,8 +8,8 @@//! on a process-lifetime runtime, so it outlives the short Tokio runtimes of//! individual tests.-use crate::config::Config;use crate::config::schema::ModuleSourceMode;+use crate::config::Config;use crate::modules::linked::register_linked;use crate::modules::{ops, runtime};use std::sync::{Arc, MutexGuard};@@ -95,10 +95,10 @@ async fn linked_module_prepares_runtime_limits_over_confidential_bus_call() {#[cfg(feature = "e2e-test-support")]async fn linked_module_prepares_legacy_inbound_facts_over_confidential_bus_call() {let _storage = install_memory_storage();- use tinychannels_bus::ChannelMessage;use tinychannels_bus::module_inbound::{ChannelInboundSource, PrepareChannelInboundRequest, PreparedChannelInbound,};+ use tinychannels_bus::ChannelMessage;let message = ChannelMessage {id: "message-1".into(),diff --git a/crates/openhuman-core/src/channels/proactive.rs b/crates/openhuman-core/src/channels/proactive.rsindex 5f7d1decdc..442f189263 100644--- a/crates/openhuman-core/src/channels/proactive.rs+++ b/crates/openhuman-core/src/channels/proactive.rs@@ -19,11 +19,11 @@//! (step 1). This avoids double-delivering to a channel that doesn't//! exist.-use crate::channels::Channel;use crate::channels::outbound::text_message;+use crate::channels::Channel;use crate::core::events::DomainEvent;-use crate::web_chat::WebChannelEvent;use crate::web_chat::publish_web_channel_event;+use crate::web_chat::WebChannelEvent;use async_trait::async_trait;use std::collections::HashMap;use std::sync::{Arc, RwLock};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/channel.rs b/crates/openhuman-core/src/channels/providers/relay/channel.rsindex 2960e9c9d7..0f67ca541b 100644--- a/crates/openhuman-core/src/channels/providers/relay/channel.rs+++ b/crates/openhuman-core/src/channels/providers/relay/channel.rs@@ -10,7 +10,7 @@ use std::sync::Mutex;use async_trait::async_trait;use serde_json::json;-use crate::web_chat::{WebChannelEvent, publish_web_channel_event};+use crate::web_chat::{publish_web_channel_event, WebChannelEvent};use tinychannels_bus::channel::{ContentPart, OutboundContentPart};use tinychannels_bus::{Channel, ChannelOutboundMessage};diff --git a/crates/openhuman-core/src/channels/providers/relay/mod.rs b/crates/openhuman-core/src/channels/providers/relay/mod.rsindex d2c9ebde8c..725be88e74 100644--- a/crates/openhuman-core/src/channels/providers/relay/mod.rs+++ b/crates/openhuman-core/src/channels/providers/relay/mod.rs@@ -26,10 +26,10 @@ mod params;mod schemas;mod store;-pub use channel::{CHANNEL_OUTBOUND_EVENT, RelayChannel};+pub use channel::{RelayChannel, CHANNEL_OUTBOUND_EVENT};pub use ops::channel_relay_inbound;pub use params::{- DEFAULT_RELAY_CLIENT_ID, MAX_CHANNEL_LEN, MAX_ID_LEN, MAX_SENDER_NAME_CHARS, MAX_TEXT_BYTES,- RESERVED_CHANNELS, RelayInboundParams, validate_channel, validate_id,+ validate_channel, validate_id, RelayInboundParams, DEFAULT_RELAY_CLIENT_ID, MAX_CHANNEL_LEN,+ MAX_ID_LEN, MAX_SENDER_NAME_CHARS, MAX_TEXT_BYTES, RESERVED_CHANNELS,};pub use schemas::{all_relay_controller_schemas, all_relay_registered_controllers};diff --git a/crates/openhuman-core/src/channels/providers/relay/ops.rs b/crates/openhuman-core/src/channels/providers/relay/ops.rsindex f844f8607f..3a9ea146ee 100644--- a/crates/openhuman-core/src/channels/providers/relay/ops.rs+++ b/crates/openhuman-core/src/channels/providers/relay/ops.rs@@ -3,7 +3,7 @@use std::collections::HashMap;use std::sync::Arc;-use serde_json::{Value, json};+use serde_json::{json, Value};use super::channel::RelayChannel;use super::params::RelayInboundParams;@@ -11,8 +11,8 @@ use super::store::{self, Recorded};use crate::channels::context::MAX_CHANNEL_HISTORY;use crate::channels::outbound::text_message;use crate::channels::runtime::{- PromptToolDescs, RuntimeChannelMessage, build_channel_turn_parts, prepare_runtime_limits,- process_channel_runtime_message, runtime_context,+ build_channel_turn_parts, prepare_runtime_limits, process_channel_runtime_message,+ runtime_context, PromptToolDescs, RuntimeChannelMessage,};use crate::config::Config;use crate::core::Outcome;diff --git a/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs b/crates/openhuman-core/src/channels/providers/relay/ops_tests.rsindex 7ba8d0a672..a601cfc039 100644--- a/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs+++ b/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs@@ -1,6 +1,6 @@use super::super::channel::CHANNEL_OUTBOUND_EVENT;use super::*;-use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, mock_agent_run_turn};+use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};use crate::core::runtime::{ContextOverlay, CoreContext, DomainSet};use crate::security::turn_origin::AgentTurnOrigin;use std::sync::Mutex;diff --git a/crates/openhuman-core/src/channels/providers/relay/params.rs b/crates/openhuman-core/src/channels/providers/relay/params.rsindex 7360772ce5..01eb1edb69 100644--- a/crates/openhuman-core/src/channels/providers/relay/params.rs+++ b/crates/openhuman-core/src/channels/providers/relay/params.rs@@ -7,7 +7,7 @@ use serde_json::Value;#[cfg(test)]use crate::channels::bus::derive_inbound_thread_id;use tinychannels_bus::{- ChannelInboundEnvelope, ChannelRef, ConversationRef, SenderRef, channel::ContentPart,+ channel::ContentPart, ChannelInboundEnvelope, ChannelRef, ConversationRef, SenderRef,};/// Longest channel name: `telegram`, `imessage`, `discord`, ...diff --git a/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs b/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rsindex 3b2e3facb1..555179bc7b 100644--- a/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs+++ b/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs@@ -25,11 +25,9 @@ fn the_controller_is_channel_relay_inbound() {#[test]fn the_controller_is_registered() {- assert!(- crate::core::all::all_registered_controllers()- .iter()- .any(|c| c.rpc_method_name() == "openhuman.channel_relay_inbound")- );+ assert!(crate::core::all::all_registered_controllers()+ .iter()+ .any(|c| c.rpc_method_name() == "openhuman.channel_relay_inbound"));}#[tokio::test]diff --git a/crates/openhuman-core/src/channels/routes.rs b/crates/openhuman-core/src/channels/routes.rsindex 1088f6cc55..01101e4bf3 100644--- a/crates/openhuman-core/src/channels/routes.rs+++ b/crates/openhuman-core/src/channels/routes.rs@@ -1,7 +1,7 @@//! Per-sender routing and runtime command handling.-use super::context::{ChannelRouteSelection, ChannelRuntimeContext, clear_sender_history};-use super::{Channel, outbound::text_message};+use super::context::{clear_sender_history, ChannelRouteSelection, ChannelRuntimeContext};+use super::{outbound::text_message, Channel};use std::sync::Arc;use tinychannels_bus as traits;use tinychannels_bus::module_control::{diff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rsindex 6050c1e066..c51f86e8ff 100644--- a/crates/openhuman-core/src/channels/routes_tests.rs+++ b/crates/openhuman-core/src/channels/routes_tests.rs@@ -1,6 +1,6 @@use super::*;use crate::channels::context::{- ChannelRuntimeContext, RouteSelectionMap, TurnModelSourceCacheMap, conversation_history_key,+ conversation_history_key, ChannelRuntimeContext, RouteSelectionMap, TurnModelSourceCacheMap,};use crate::channels::host::ChannelTurnStateSubscriber;use crate::core::events::DomainEvent;@@ -480,13 +480,12 @@ async fn handle_runtime_command_set_model_clears_sender_history_and_persists_rou.await;assert!(handled);- assert!(- ctx.conversation_histories- .lock()- .unwrap()- .get(key)- .is_none()- );+ assert!(ctx+ .conversation_histories+ .lock()+ .unwrap()+ .get(key)+ .is_none());assert_eq!(get_route_selection(&ctx, key),ChannelRouteSelection {@@ -608,9 +607,7 @@ async fn handle_runtime_command_telegram_sessions_reports_empty_store() {let sent = channel_impl.sent.lock().unwrap();assert_eq!(sent.len(), 1);- assert!(- sent_text(&sent[0]).contains("No conversation threads yet. Send `/new` to create one.")- );+ assert!(sent_text(&sent[0]).contains("No conversation threads yet. Send `/new` to create one."));assert_eq!(sent[0].thread_id.as_deref(), Some("42"));}@@ -645,13 +642,12 @@ async fn handle_runtime_command_telegram_new_status_and_sessions_round_trip() {).await);- assert!(- ctx.conversation_histories- .lock()- .unwrap()- .get(sender_key)- .is_none()- );+ assert!(ctx+ .conversation_histories+ .lock()+ .unwrap()+ .get(sender_key)+ .is_none());ctx.conversation_histories.lock()@@ -730,10 +726,9 @@ async fn handle_runtime_command_telegram_new_status_and_sessions_round_trip() {assert!(sent_text(&sent[2]).contains("**Recent sessions**"));assert!(sent_text(&sent[2]).contains("→ `Telegram"));- assert!(- sent.iter()- .all(|message| message.thread_id.as_deref() == Some("42"))- );+ assert!(sent+ .iter()+ .all(|message| message.thread_id.as_deref() == Some("42")));}#[tokio::test]diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rsindex e6b9267229..85a8e490e0 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::core::runtime::DispatchCtx;use std::sync::Arc;-use tokio::sync::{Notify, oneshot};+use tokio::sync::{oneshot, Notify};struct DeferredTyping {started: Notify,diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rsindex f76919ba9e..52bc9b8bab 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs@@ -3,13 +3,13 @@//! still goes to the orchestrator over the bus.use super::*;-use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, mock_agent_run_turn};+use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};use crate::agent::host_agents::{self, HostAgent, HostAgentResolver};-use crate::channels::Channel;-use crate::channels::context::{CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext};+use crate::channels::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};use crate::channels::runtime::process_channel_message;+use crate::channels::Channel;use crate::core::runtime::{CoreContext, DomainSet};-use serde_json::{Value, json};+use serde_json::{json, Value};use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rsindex 65db6b53ee..dfad28932d 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rs@@ -29,7 +29,7 @@ use tinychannels_bus as traits;pub(crate) mod posture;mod turn;-pub(crate) use turn::{HostChannelTurn, run_host_agent_turn, seed_rows};+pub(crate) use turn::{run_host_agent_turn, seed_rows, HostChannelTurn};/// What a channel's binding resolves to for one message.pub(crate) enum HostRoute {diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture_tests.rsindex a73e103e55..a7df3a5833 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture_tests.rs@@ -1,8 +1,8 @@use super::*;use crate::agent::HostTurnTools;-use serde_json::{Value, json};-use std::sync::Arc;+use serde_json::{json, Value};use std::sync::atomic::{AtomicUsize, Ordering};+use std::sync::Arc;use tinytools::{ToolCallOptions, ToolResult};fn external() -> AgentTurnOrigin {diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/mod.rs b/crates/openhuman-core/src/channels/runtime/dispatch/mod.rsindex e59049ad48..ef475d3eda 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/mod.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/mod.rs@@ -19,7 +19,7 @@ mod processor;mod routing;pub(crate) use processor::{- RuntimeChannelMessage, process_channel_runtime_message, run_message_dispatch_loop,+ process_channel_runtime_message, run_message_dispatch_loop, RuntimeChannelMessage,};#[cfg(test)]@@ -38,7 +38,7 @@ use helpers::build_channel_context_block;use helpers::select_acknowledgment_reaction;#[cfg(test)]-use routing::{AgentScoping, build_visible_tool_set};+use routing::{build_visible_tool_set, AgentScoping};#[cfg(any(test, debug_assertions))]#[path = "mod_test_support_tests.rs"]diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor.rsindex 5976705f83..6c9b6712d5 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor.rs@@ -23,7 +23,7 @@ mod bus_turn;mod in_order;mod turn;-use super::inbound_batch::{QueuedInbound, merge_channel_batch};+use super::inbound_batch::{merge_channel_batch, QueuedInbound};use crate::channels::context::ChannelRuntimeContext;use crate::config::InboundDebounceConfig;use crate::inbound_debounce::{KeyedDebouncer, Push};@@ -64,8 +64,8 @@ impl RuntimeChannelMessage {}}-pub(crate) use admit::AdmittedInbound;use admit::admit_runtime_message;+pub(crate) use admit::AdmittedInbound;#[cfg(test)]pub(crate) use approval::channel_has_approval_surface;#[cfg(test)]diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/admit.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/admit.rsindex ecfc057963..4843f733d9 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/admit.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/admit.rs@@ -10,8 +10,8 @@ use crate::util::truncate_with_ellipsis;use std::sync::Arc;use tinychannels_bus::ChannelInboundEnvelope;-use super::RuntimeChannelMessage;use super::approval::{channel_has_approval_surface, try_route_approval_reply};+use super::RuntimeChannelMessage;/// A prepared inbound message that still needs an agent turn: not a runtime/// command and not an approval reply.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 072649449b..37f50c1cb2 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@@ -1,7 +1,7 @@//! The orchestrator path: an unbound channel's turn goes over the native bus//! to the `agent.run_turn` handler, with the orchestrator's tool scoping.-use crate::agent::bus::{AGENT_RUN_TURN_METHOD, AgentTurnRequest, AgentTurnResponse};+use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHOD};use crate::channels::context::{ChannelRouteSelection, ChannelRuntimeContext};use crate::core::bus::BUS;use crate::progress::AgentProgress;diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rsindex e732589d1f..6e2b9c73f4 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs@@ -4,7 +4,7 @@use crate::agent::bus::AgentTurnResponse;use crate::channels::context::{- ChannelRuntimeContext, compact_sender_history, is_context_window_overflow_error,+ compact_sender_history, is_context_window_overflow_error, ChannelRuntimeContext,};use crate::channels::outbound::text_message;use crate::channels::routes::{get_or_create_turn_model_source, get_route_selection};@@ -15,20 +15,20 @@ use crate::util::truncate_with_ellipsis;use std::sync::Arc;use std::time::{Duration, Instant};use tinyagents_session::transcript::TranscriptMessage;-use tinychannels_bus::ChannelInboundEnvelope;use tinychannels_bus::context::ChatMessage;+use tinychannels_bus::ChannelInboundEnvelope;use tokio_util::sync::CancellationToken;use tokio_util::task::AbortOnDropHandle;use super::super::helpers::{- REPLY_LOG_TRUNCATE_CHARS, build_channel_context_block, log_worker_join_result,- spawn_typing_task,+ build_channel_context_block, log_worker_join_result, spawn_typing_task,+ REPLY_LOG_TRUNCATE_CHARS,};-use super::super::host_agent::{self, HostChannelTurn, HostRoute, run_host_agent_turn, seed_rows};-use super::RuntimeChannelMessage;-use super::admit::{AdmittedInbound, admit_runtime_message};+use super::super::host_agent::{self, run_host_agent_turn, seed_rows, HostChannelTurn, HostRoute};+use super::admit::{admit_runtime_message, AdmittedInbound};use super::approval::channel_has_approval_surface;use super::bus_turn::dispatch_bus_turn;+use super::RuntimeChannelMessage;pub(crate) async fn process_channel_message(ctx: Arc<ChannelRuntimeContext>,diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rsindex 79edf395d7..08dd70b791 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs@@ -8,12 +8,12 @@use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};use crate::config::Config;-use crate::integrations::ConnectedIntegration;use crate::integrations::composio::orchestrator_actions;use crate::integrations::composio::{- FetchConnectedIntegrationsStatus, cached_active_integrations,- fetch_connected_integrations_status,+ cached_active_integrations, fetch_connected_integrations_status,+ FetchConnectedIntegrationsStatus,};+use crate::integrations::ConnectedIntegration;use std::collections::HashSet;use std::time::Duration;use tinyagents_definition::ToolScope;diff --git a/crates/openhuman-core/src/channels/runtime/mod.rs b/crates/openhuman-core/src/channels/runtime/mod.rsindex a3ff8afff5..47ca37fc04 100644--- a/crates/openhuman-core/src/channels/runtime/mod.rs+++ b/crates/openhuman-core/src/channels/runtime/mod.rs@@ -22,9 +22,9 @@ pub(crate) use startup::start_channels_with_session;#[cfg(feature = "channels")]pub(crate) use dispatch::process_channel_message;#[cfg(feature = "channels")]-pub(crate) use dispatch::{RuntimeChannelMessage, process_channel_runtime_message};+pub(crate) use dispatch::{process_channel_runtime_message, RuntimeChannelMessage};#[cfg(feature = "channels")]-pub(crate) use startup::{PromptToolDescs, build_channel_turn_parts, runtime_context};+pub(crate) use startup::{build_channel_turn_parts, runtime_context, PromptToolDescs};#[cfg(feature = "channels")]#[cfg(any(test, debug_assertions))]diff --git a/crates/openhuman-core/src/channels/runtime/session_tests.rs b/crates/openhuman-core/src/channels/runtime/session_tests.rsindex 3502a55425..6aa6d4da36 100644--- a/crates/openhuman-core/src/channels/runtime/session_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/session_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::core::runtime::DispatchCtx;-use std::sync::Arc;use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};+use std::sync::Arc;#[tokio::test]async fn independent_local_runtime_does_not_need_an_account_session() {diff --git a/crates/openhuman-core/src/channels/runtime/startup.rs b/crates/openhuman-core/src/channels/runtime/startup.rsindex 36ec65dfd9..d9f8324fd3 100644--- a/crates/openhuman-core/src/channels/runtime/startup.rs+++ b/crates/openhuman-core/src/channels/runtime/startup.rs@@ -66,7 +66,7 @@ pub(crate) async fn prepare_runtime_limits(pub use start_channels::start_channels;pub(crate) use start_channels::start_channels_with_session;-pub(crate) use turn_parts::{PromptToolDescs, build_channel_turn_parts, runtime_context};+pub(crate) use turn_parts::{build_channel_turn_parts, runtime_context, PromptToolDescs};// Re-exported at module scope (rather than left as private `pub(super)`// items reached only through their owning submodule) so the `#[path]` test@@ -75,7 +75,7 @@ pub(crate) use turn_parts::{PromptToolDescs, build_channel_turn_parts, runtime_c#[cfg(test)]use crate::config::Config;#[cfg(test)]-use chat_workload::{ChatWorkloadResolution, resolve_chat_workload};+use chat_workload::{resolve_chat_workload, ChatWorkloadResolution};#[cfg(any(test, debug_assertions))]use credentials::resolve_yuanbao_app_secret;#[cfg(test)]diff --git a/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs b/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rsindex dfeb77958b..54c6ba363d 100644--- a/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs@@ -18,12 +18,12 @@use std::collections::BTreeMap;use std::path::Path;-use crate::storage::{Scope, documents::Repo};-use serde_json::{Value, json};+use crate::storage::{documents::Repo, Scope};+use serde_json::{json, Value};use sha2::Digest;use tinychannels_bus::module_delivery::{- DELIVERY_PENDING_CAPACITY, DELIVERY_RECORD_BYTES, DELIVERY_RESULT_CAPACITY,- DELIVERY_RESULT_TTL_SECONDS, DeliveryQueueEntry, DeliveryTerminalResult,+ DeliveryQueueEntry, DeliveryTerminalResult, DELIVERY_PENDING_CAPACITY, DELIVERY_RECORD_BYTES,+ DELIVERY_RESULT_CAPACITY, DELIVERY_RESULT_TTL_SECONDS,};use tinystoragedrivers::{CollectionSpec, ErrorKind, Precondition, StorageBackend};diff --git a/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rsindex 2639ed3dd9..6a549d9bd0 100644--- a/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs@@ -10,11 +10,11 @@ use async_trait::async_trait;use std::collections::HashMap;use std::sync::{Arc, OnceLock, Weak};use tinybus::module::{ModuleCallError, ModuleClient, ModuleObjectClient};-use tinychannels_bus::Channel;use tinychannels_bus::module_runtime::{ChannelIngressKind, ChannelMessagePreparation, ConfiguredChannelInfo,};use tinychannels_bus::module_supervision::ChannelSupervisionPolicy;+use tinychannels_bus::Channel;use tinychannels_bus::{ChannelInteraction, ChannelInteractionResult};use tokio::sync::mpsc;diff --git a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rsindex 3a21ab2e91..473621dc38 100644--- a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs@@ -3,7 +3,7 @@use super::super::dispatch::run_message_dispatch_loop;use super::module_providers::ModuleChannelRuntime;-use super::turn_parts::{PromptToolDescs, build_channel_turn_parts, runtime_context};+use super::turn_parts::{build_channel_turn_parts, runtime_context, PromptToolDescs};use crate::config::Config;use crate::core::bus::BUS;use crate::core::events::DomainEvent;diff --git a/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs b/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rsindex 1aa2cbb033..667760e896 100644--- a/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs@@ -6,7 +6,7 @@//! the caller's own config and policy, so a relayed turn never runs with the//! operator's tools or workspace.-use super::chat_workload::{ChatWorkloadResolution, resolve_chat_workload};+use super::chat_workload::{resolve_chat_workload, ChatWorkloadResolution};use super::prompt::format_access_context;use crate::channels::context::ChannelRuntimeContext;use crate::channels::system_prompt::{ChannelPromptInputs, ChannelSystemPrompt};diff --git a/crates/openhuman-core/src/channels/runtime/startup_tests.rs b/crates/openhuman-core/src/channels/runtime/startup_tests.rsindex a74dfe7b3b..b34feaf01f 100644--- a/crates/openhuman-core/src/channels/runtime/startup_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/startup_tests.rs@@ -7,7 +7,7 @@//! (cloud) path is preserved for users who haven't picked a local ///! BYOK model, and the override path activates for those who have.-use super::{ChatWorkloadResolution, RelayInboundMessageHandler, resolve_chat_workload};+use super::{resolve_chat_workload, ChatWorkloadResolution, RelayInboundMessageHandler};use crate::config::Config;use tinychannels::relay::RelayInboundHandler;diff --git a/crates/openhuman-core/src/channels/runtime/supervision.rs b/crates/openhuman-core/src/channels/runtime/supervision.rsindex 08791296eb..b239a61c8b 100644--- a/crates/openhuman-core/src/channels/runtime/supervision.rs+++ b/crates/openhuman-core/src/channels/runtime/supervision.rs@@ -94,7 +94,7 @@ pub(crate) fn spawn_supervised_listener(}#[cfg(test)]-pub(crate) use tinychannels::runtime::{MAX_JITTER_MS, jitter_millis};+pub(crate) use tinychannels::runtime::{jitter_millis, MAX_JITTER_MS};#[cfg(test)]#[path = "supervision_tests.rs"]diff --git a/crates/openhuman-core/src/channels/runtime/supervision_tests.rs b/crates/openhuman-core/src/channels/runtime/supervision_tests.rsindex 4ac995ef2a..cfdf387ad5 100644--- a/crates/openhuman-core/src/channels/runtime/supervision_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/supervision_tests.rs@@ -1,5 +1,5 @@use super::super::super::Channel;-use super::{MAX_JITTER_MS, jitter_millis, spawn_supervised_listener};+use super::{jitter_millis, spawn_supervised_listener, MAX_JITTER_MS};use std::sync::{Arc, Mutex};use tinychannels_bus as traits;use tinychannels_bus::SendMessage;diff --git a/crates/openhuman-core/src/channels/runtime/test_support.rs b/crates/openhuman-core/src/channels/runtime/test_support.rsindex 085620f4ad..85dc8134b8 100644--- a/crates/openhuman-core/src/channels/runtime/test_support.rs+++ b/crates/openhuman-core/src/channels/runtime/test_support.rs@@ -1,12 +1,12 @@//! Debug-build harnesses for raw integration coverage of the channel runtime.pub use super::dispatch::test_support::build_channel_context_block_for_test;-use super::dispatch::{RuntimeChannelMessage, process_channel_runtime_message};+use super::dispatch::{process_channel_runtime_message, RuntimeChannelMessage};pub use super::startup::test_support::resolve_yuanbao_app_secret_for_test;-use crate::agent::bus::{AGENT_RUN_TURN_METHOD, AgentTurnRequest, AgentTurnResponse};+use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHOD};+use crate::channels::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};use crate::channels::Channel;use crate::channels::ChannelSystemPrompt;-use crate::channels::context::{CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext};use crate::config::{MultimodalConfig, MultimodalFileConfig, ReliabilityConfig};use crate::core::bus::BUS;use crate::core::events::DomainEvent;diff --git a/crates/openhuman-core/src/channels/system_prompt.rs b/crates/openhuman-core/src/channels/system_prompt.rsindex e36ba20f39..a171646c40 100644--- a/crates/openhuman-core/src/channels/system_prompt.rs+++ b/crates/openhuman-core/src/channels/system_prompt.rs@@ -21,8 +21,8 @@//! bytes, which is the whole point.use crate::channels::prompt::{- ProjectContextPlacement, PromptIdentityOverride, build_system_prompt_with_identity,- render_project_context,+ build_system_prompt_with_identity, render_project_context, ProjectContextPlacement,+ PromptIdentityOverride,};use std::collections::hash_map::DefaultHasher;use std::hash::{Hash, Hasher};diff --git a/crates/openhuman-core/src/channels/tests/discord_integration.rs b/crates/openhuman-core/src/channels/tests/discord_integration.rsindex 20d4ea27af..16ad2fc814 100644--- a/crates/openhuman-core/src/channels/tests/discord_integration.rs+++ b/crates/openhuman-core/src/channels/tests/discord_integration.rs@@ -23,12 +23,12 @@//! ever reverts to calling `run_tool_call_loop` directly, this test//! starts failing.-use super::super::Channel;use super::super::context::{- CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext, conversation_history_key,+ conversation_history_key, ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS,};use super::super::runtime::process_channel_message;-use super::common::{HistoryCaptureModel, channel_envelope};+use super::super::Channel;+use super::common::{channel_envelope, HistoryCaptureModel};use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};diff --git a/crates/openhuman-core/src/channels/tests/health.rs b/crates/openhuman-core/src/channels/tests/health.rsindex 6ff214a8dd..5596b27866 100644--- a/crates/openhuman-core/src/channels/tests/health.rs+++ b/crates/openhuman-core/src/channels/tests/health.rs@@ -1,8 +1,8 @@-use super::super::Channel;use super::super::runtime::spawn_supervised_listener;+use super::super::Channel;use super::common::AlwaysFailChannel;-use std::sync::Arc;use std::sync::atomic::{AtomicUsize, Ordering};+use std::sync::Arc;use std::time::Duration;use tinychannels_bus as traits;@@ -37,12 +37,10 @@ async fn supervised_listener_marks_error_and_restarts_on_failures() {assert_eq!(component["status"], "error");assert!(component["restart_count"].as_u64().unwrap_or(0) >= 1);- assert!(- component["last_error"]- .as_str()- .unwrap_or("")- .contains("listen boom")- );+ assert!(component["last_error"]+ .as_str()+ .unwrap_or("")+ .contains("listen boom"));assert!(calls.load(Ordering::SeqCst) >= 1);}diff --git a/crates/openhuman-core/src/channels/tests/prompt.rs b/crates/openhuman-core/src/channels/tests/prompt.rsindex ffcf8290d9..eefb9d3fe5 100644--- a/crates/openhuman-core/src/channels/tests/prompt.rs+++ b/crates/openhuman-core/src/channels/tests/prompt.rs@@ -1,5 +1,5 @@use super::common::make_workspace;-use crate::channels::prompt::{BOOTSTRAP_MAX_CHARS, build_system_prompt};+use crate::channels::prompt::{build_system_prompt, BOOTSTRAP_MAX_CHARS};use tempfile::TempDir;#[test]diff --git a/crates/openhuman-core/src/channels/tests/runtime_debounce.rs b/crates/openhuman-core/src/channels/tests/runtime_debounce.rsindex 0f373caa44..8d0836be45 100644--- a/crates/openhuman-core/src/channels/tests/runtime_debounce.rs+++ b/crates/openhuman-core/src/channels/tests/runtime_debounce.rs@@ -1,15 +1,15 @@+use super::super::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};+use super::super::runtime::{run_message_dispatch_loop, RuntimeChannelMessage};use super::super::Channel;-use super::super::context::{CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext};-use super::super::runtime::{RuntimeChannelMessage, run_message_dispatch_loop};-use super::common::{RecordingChannel, SlowModel, TelegramRecordingChannel, channel_envelope};-use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, mock_agent_run_turn};+use super::common::{channel_envelope, RecordingChannel, SlowModel, TelegramRecordingChannel};+use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};use crate::config::InboundDebounceConfig;use crate::core::bus_testing::MockBusGuard;use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use std::time::Duration;-use tokio::sync::{Notify, mpsc};+use tokio::sync::{mpsc, Notify};use tokio::task::JoinHandle;#[derive(Default)]@@ -251,16 +251,12 @@ async fn messages_during_a_running_turn_become_one_follow_up_that_sees_its_histoassert_eq!(turns.peak.load(Ordering::SeqCst), 1);assert!(turns.last_user(1).ends_with("second\nthird"));let history = turns.history(1);- assert!(- history- .iter()- .any(|(role, content)| role == "assistant" && content == "reply 1")- );- assert!(- history- .iter()- .any(|(role, content)| role == "user" && content.ends_with("first"))- );+ assert!(history+ .iter()+ .any(|(role, content)| role == "assistant" && content == "reply 1"));+ assert!(history+ .iter()+ .any(|(role, content)| role == "user" && content.ends_with("first")));run.finish().await;assert_eq!(channel.sent_messages.lock().await.len(), 2);}diff --git a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rsindex af2751c1c8..055fcb1246 100644--- a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs+++ b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs@@ -1,11 +1,11 @@-use super::super::Channel;-use super::super::context::{CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext};-use super::super::runtime::test_support::{DispatchHarnessOptions, run_dispatch_harness};+use super::super::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};+use super::super::runtime::test_support::{run_dispatch_harness, DispatchHarnessOptions};use super::super::runtime::{- RuntimeChannelMessage, process_channel_message, run_message_dispatch_loop,+ process_channel_message, run_message_dispatch_loop, RuntimeChannelMessage,};-use super::common::{RecordingChannel, SlowModel, channel_envelope, use_real_agent_handler};-use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, mock_agent_run_turn};+use super::super::Channel;+use super::common::{channel_envelope, use_real_agent_handler, RecordingChannel, SlowModel};+use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};use crate::core::events::DomainEvent;use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};@@ -678,10 +678,8 @@ async fn dispatch_replies_with_timeout_notice_when_handler_exceeds_deadline() {..Default::default()}).await;- assert!(- timed_out- .sends- .iter()- .any(|send| send.content.contains("Request timed out"))- );+ assert!(timed_out+ .sends+ .iter()+ .any(|send| send.content.contains("Request timed out")));}diff --git a/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs b/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rsindex 88a6d8eefa..91e14b7641 100644--- a/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs+++ b/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs@@ -1,12 +1,12 @@-use super::super::Channel;use super::super::context::{- CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRouteSelection, ChannelRuntimeContext,- conversation_history_key,+ conversation_history_key, ChannelRouteSelection, ChannelRuntimeContext,+ CHANNEL_MESSAGE_TIMEOUT_SECS,};use super::super::runtime::process_channel_message;+use super::super::Channel;use super::common::{- IterativeToolModel, MockPriceTool, ModelCaptureModel, RecordingChannel,- TelegramRecordingChannel, ToolCallingModel, channel_envelope,+ channel_envelope, IterativeToolModel, MockPriceTool, ModelCaptureModel, RecordingChannel,+ TelegramRecordingChannel, ToolCallingModel,};use std::collections::HashMap;use std::sync::atomic::Ordering;diff --git a/crates/openhuman-core/src/channels/tests/telegram_integration.rs b/crates/openhuman-core/src/channels/tests/telegram_integration.rsindex 78c836c4b3..4633cc43cb 100644--- a/crates/openhuman-core/src/channels/tests/telegram_integration.rs+++ b/crates/openhuman-core/src/channels/tests/telegram_integration.rs@@ -5,12 +5,12 @@//! captures every `SendMessage` — including `thread_ts` — so assertions can be made//! about exactly what the channel receives, without needing a real Telegram HTTP server.-use super::super::Channel;use super::super::context::{- CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext, conversation_history_key,+ conversation_history_key, ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS,};use super::super::runtime::process_channel_message;-use super::common::{SlowModel, channel_envelope};+use super::super::Channel;+use super::common::{channel_envelope, SlowModel};use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};diff --git a/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider_tests.rs b/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider_tests.rsindex e5596af443..f87b0e9103 100644--- a/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider_tests.rs+++ b/crates/openhuman-core/src/config/migrations/migrate_legacy_embedding_provider_tests.rs@@ -110,7 +110,7 @@ async fn reachable_probe_false_when_no_server() {#[tokio::test]async fn reachable_probe_true_for_2xx_server() {- use axum::{Router, routing::get};+ use axum::{routing::get, Router};use tokio::net::TcpListener;let app = Router::new().route("/api/tags", get(|| async { "{\"models\":[]}" }));diff --git a/crates/openhuman-core/src/config/migrations/reconcile_orphaned_providers_tests.rs b/crates/openhuman-core/src/config/migrations/reconcile_orphaned_providers_tests.rsindex 57fb4b5f84..6c14a60a36 100644--- a/crates/openhuman-core/src/config/migrations/reconcile_orphaned_providers_tests.rs+++ b/crates/openhuman-core/src/config/migrations/reconcile_orphaned_providers_tests.rs@@ -1,8 +1,8 @@//! Tests for migration 5 → 6 (`reconcile_orphaned_providers`).use super::*;-use crate::config::Config;use crate::config::schema::cloud_providers::CloudProviderCreds;+use crate::config::Config;/// Minimal cloud-provider entry for tests — only `id` and `slug` matter here.fn provider(id: &str, slug: &str) -> CloudProviderCreds {diff --git a/crates/openhuman-core/src/config/migrations/retire_configured_agents_tests.rs b/crates/openhuman-core/src/config/migrations/retire_configured_agents_tests.rsindex 107188a869..f91a39d58a 100644--- a/crates/openhuman-core/src/config/migrations/retire_configured_agents_tests.rs+++ b/crates/openhuman-core/src/config/migrations/retire_configured_agents_tests.rs@@ -14,9 +14,7 @@ fn removes_only_the_top_level_agents_table_idempotently() {assert_eq!(document, first);assert_eq!(document["default_model"].as_str(), Some("kept"));assert!(document.get("agents").is_none());- assert!(- document["memory"]["agents"]["local"]["recall"]- .as_bool()- .unwrap()- );+ assert!(document["memory"]["agents"]["local"]["recall"]+ .as_bool()+ .unwrap());}diff --git a/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings.rs b/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings.rsindex 04e2e216ac..0be60154f1 100644--- a/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings.rs+++ b/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings.rs@@ -39,8 +39,8 @@//! - Migrates `inference_url` into a `Custom` cloud provider entry when the//! URL doesn't look like a registered managed backend.+use crate::config::schema::cloud_providers::{generate_provider_id, AuthStyle, CloudProviderCreds};use crate::config::Config;-use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds, generate_provider_id};/// Counters returned by [`run`] for diagnostics. Logged at INFO once per/// successful migration run.diff --git a/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings_tests.rs b/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings_tests.rsindex 1637b961e7..00b9139539 100644--- a/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings_tests.rs+++ b/crates/openhuman-core/src/config/migrations/unify_ai_provider_settings_tests.rs@@ -1,8 +1,8 @@//! Tests for the 1 → 2 AI-provider unification migration.use super::*;-use crate::config::Config;use crate::config::schema::{LocalAiConfig, LocalAiUsage};+use crate::config::Config;fn make_legacy_config_local_on() -> Config {let mut c = Config::default();diff --git a/crates/openhuman-core/src/config/mod.rs b/crates/openhuman-core/src/config/mod.rsindex a3fb92922a..3468c2e290 100644--- a/crates/openhuman-core/src/config/mod.rs+++ b/crates/openhuman-core/src/config/mod.rs@@ -21,7 +21,7 @@ pub mod workspace_handle;#[allow(unused_imports)]pub use daemon::DaemonConfig;pub use enrichers::{- ConfigEnricher, register_enricher, register_enricher_in, run_enrichers, unregister_enricher,+ register_enricher, register_enricher_in, run_enrichers, unregister_enricher, ConfigEnricher,};/// RPC operations for configuration.@@ -29,11 +29,11 @@ pub use ops as rpc;pub use ops::*;pub use schema::{- PRE_LOGIN_USER_ID, WORKLOAD_ROLES, action_dir_env_override, active_user_marker_path,- active_workspace_dir, active_workspace_dir_cached, active_workspace_snapshot,- clear_active_user, default_action_dir, default_files_dir, default_projects_dir,- default_root_openhuman_dir, pre_login_user_dir, read_active_user_id, resolve_action_dir,- resolve_files_dir, user_openhuman_dir, write_active_user_id,+ action_dir_env_override, active_user_marker_path, active_workspace_dir,+ active_workspace_dir_cached, active_workspace_snapshot, clear_active_user, default_action_dir,+ default_files_dir, default_projects_dir, default_root_openhuman_dir, pre_login_user_dir,+ read_active_user_id, resolve_action_dir, resolve_files_dir, user_openhuman_dir,+ write_active_user_id, PRE_LOGIN_USER_ID, WORKLOAD_ROLES,};pub use workspace_handle::workspace_handle;// Crate-internal: workspace→config-dir resolver reused by the cloud embedder.@@ -41,30 +41,30 @@ pub(crate) use schema::resolve_config_dir_for_workspace;pub(crate) use schema::set_cli_inference_overrides;#[allow(unused_imports)]pub use schema::{- AgentConfig, AuditConfig, AutonomyConfig, BrowserComputerUseConfig, BrowserConfig,- BudgetAction, BudgetPeriod, BudgetPolicy, BudgetScope, CapabilityProviderConfig,+ apply_runtime_proxy_to_builder, build_runtime_proxy_client,+ build_runtime_proxy_client_with_timeouts, device_time_zone, normalize_time_zone,+ output_language_directive, runtime_proxy_config, set_runtime_proxy_config, AgentConfig,+ AuditConfig, AutonomyConfig, BrowserComputerUseConfig, BrowserConfig, BudgetAction,+ BudgetPeriod, BudgetPolicy, BudgetScope, CapabilityProviderConfig,CapabilityProviderTrustState, ChannelsConfig, CompactionSettings, CompactionStrategy,ComposioConfig, ComposioDirectBaseUrls, ComposioHostCredential, ComputerConfig, Config,ContextConfig, CostConfig, CronConfig, CurlConfig, DashboardConfig, DecisionModel,DiagramViewerConfig, DiscordConfig, DockerRuntimeConfig, EmailConfig, EmbeddingRouteConfig,GitbooksConfig, HttpHeader, HttpRequestConfig, IMessageConfig, IntegrationToggle,IntegrationsConfig, LarkConfig, LegacySearchInputs, LinqConfig, LocalAiConfig, LocalJailConfig,- MANAGED_SEARCH_PROVIDERS, MatrixConfig, McpAuthConfig, McpClientConfig,- McpClientIdentityConfig, McpServerConfig, McpToolExposure, MemoryConfig, MemoryLayoutMode,- ModelRouteConfig, MultimodalConfig, MultimodalFileConfig, ObservabilityConfig,- OrchestratorModelConfig, PresentationMode, PrivacyConfig, PrivacyMode, ProviderRoute,- ProxyConfig, ProxyScope, ReliabilityConfig, ResourceLimitsConfig, RuntimeConfig,+ MatrixConfig, McpAuthConfig, McpClientConfig, McpClientIdentityConfig, McpServerConfig,+ McpToolExposure, MemoryConfig, MemoryLayoutMode, ModelRouteConfig, MultimodalConfig,+ MultimodalFileConfig, ObservabilityConfig, OrchestratorModelConfig, PresentationMode,+ PrivacyConfig, PrivacyMode, ProviderRoute, ProxyConfig, ProxyScope, ReliabilityConfig,+ ResourceLimitsConfig, RuntimeConfig, SandboxBackend, SandboxConfig, SchedulerConfig,+ SchedulerGateConfig, SchedulerGateMode, SearchConfig, SearchEngineCredentials,+ SearchHostCredential, SearchProviderSettings, SearxngConfig, SecretsConfig, SecurityConfig,+ ShellConfig, SlackConfig, StreamMode, SttEngine, TeamModelConfig, TelegramConfig,+ TokenjuiceConfig, UnknownKeyedSearchProvider, UpdateConfig, UpdateRestartStrategy,+ VoiceServerConfig, WebSearchConfig, WebhookConfig, YuanbaoConfig, MANAGED_SEARCH_PROVIDERS,SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED,SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS,- SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH, SEARCH_ROLES, SandboxBackend,- SandboxConfig, SchedulerConfig, SchedulerGateConfig, SchedulerGateMode, SearchConfig,- SearchEngineCredentials, SearchHostCredential, SearchProviderSettings, SearxngConfig,- SecretsConfig, SecurityConfig, ShellConfig, SlackConfig, StreamMode, SttEngine,- TeamModelConfig, TelegramConfig, TokenjuiceConfig, UnknownKeyedSearchProvider, UpdateConfig,- UpdateRestartStrategy, VoiceServerConfig, WebSearchConfig, WebhookConfig, YuanbaoConfig,- apply_runtime_proxy_to_builder, build_runtime_proxy_client,- build_runtime_proxy_client_with_timeouts, device_time_zone, normalize_time_zone,- output_language_directive, runtime_proxy_config, set_runtime_proxy_config,+ SEARCH_ROLES, SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,};// Kept as a separate re-export (issue #4117) so the large alphabetized group// above stays byte-identical and rustfmt-stable.diff --git a/crates/openhuman-core/src/config/ops/agent_paths.rs b/crates/openhuman-core/src/config/ops/agent_paths.rsindex f1f2da4705..8fe894f438 100644--- a/crates/openhuman-core/src/config/ops/agent_paths.rs+++ b/crates/openhuman-core/src/config/ops/agent_paths.rs@@ -5,8 +5,8 @@ use std::path::{Path, PathBuf};use serde_json::json;use crate::config::Config;-use crate::core::Outcome;use crate::core::runtime::DispatchCtx;+use crate::core::Outcome;use super::agent::AgentPathsPatch;diff --git a/crates/openhuman-core/src/config/ops/cloud_providers.rs b/crates/openhuman-core/src/config/ops/cloud_providers.rsindex 8df7c6a1f7..a5882463d3 100644--- a/crates/openhuman-core/src/config/ops/cloud_providers.rs+++ b/crates/openhuman-core/src/config/ops/cloud_providers.rs@@ -1,7 +1,7 @@//! RPC input conversion for cloud-provider settings.use crate::config::schema::cloud_providers::{- AuthStyle, CloudProviderCreds, builtin_cloud_provider, generate_provider_id, is_slug_reserved,+ builtin_cloud_provider, generate_provider_id, is_slug_reserved, AuthStyle, CloudProviderCreds,};use serde::Deserialize;diff --git a/crates/openhuman-core/src/config/ops/computer.rs b/crates/openhuman-core/src/config/ops/computer.rsindex d486da3b69..44632aa135 100644--- a/crates/openhuman-core/src/config/ops/computer.rs+++ b/crates/openhuman-core/src/config/ops/computer.rs@@ -2,8 +2,8 @@//! rescue models the module runs a task with.use crate::config::{ComputerConfig, Config, DecisionModel};-use crate::core::Outcome;use crate::core::runtime::DispatchCtx;+use crate::core::Outcome;use super::loader::snapshot_config_json;diff --git a/crates/openhuman-core/src/config/ops/loader.rs b/crates/openhuman-core/src/config/ops/loader.rsindex f4f781c171..a2a907785f 100644--- a/crates/openhuman-core/src/config/ops/loader.rs+++ b/crates/openhuman-core/src/config/ops/loader.rs@@ -20,13 +20,13 @@ pub(crate) use reset_local_data::reset_local_data_for_paths;#[cfg(all(test, windows))]pub(crate) use reset_local_data::reset_local_data_remove_error;pub use reset_local_data::{get_data_paths, get_data_paths_for_user, reset_local_data};+pub use runtime_flags::{+ agent_server_status, core_rpc_url_from_env, get_runtime_flags, set_browser_allow_all,+ RuntimeFlagsOut,+};#[cfg(test)]pub(crate) use runtime_flags::{- BROWSER_ALLOW_ALL_ENV, BROWSER_ALLOW_ALL_RPC_ENABLE_ENV, env_flag_enabled,-};-pub use runtime_flags::{- RuntimeFlagsOut, agent_server_status, core_rpc_url_from_env, get_runtime_flags,- set_browser_allow_all,+ env_flag_enabled, BROWSER_ALLOW_ALL_ENV, BROWSER_ALLOW_ALL_RPC_ENABLE_ENV,};pub use snapshot::{client_config_json, get_config_snapshot, get_dashboard_settings,diff --git a/crates/openhuman-core/src/config/ops/loader_current_tests.rs b/crates/openhuman-core/src/config/ops/loader_current_tests.rsindex bddbea4dc5..3f5fc959f1 100644--- a/crates/openhuman-core/src/config/ops/loader_current_tests.rs+++ b/crates/openhuman-core/src/config/ops/loader_current_tests.rs@@ -1,7 +1,7 @@use super::*;-use crate::config::schema::{EPHEMERAL_ROUTE_SLUG, EphemeralRoute};+use crate::config::schema::{EphemeralRoute, EPHEMERAL_ROUTE_SLUG};use crate::core::runtime::DispatchCtx;-use crate::core::runtime::{DomainSet, context::CoreContext};+use crate::core::runtime::{context::CoreContext, DomainSet};fn context_with(config: Config) -> std::sync::Arc<CoreContext> {CoreContext::for_test_with_config(DomainSet::full(), config)@@ -47,12 +47,10 @@ async fn a_context_without_a_route_loads_unchanged_providers() {.expect("context config loads");assert!(loaded.ephemeral_route.is_none());- assert!(- loaded- .cloud_providers- .iter()- .all(|entry| entry.slug != EPHEMERAL_ROUTE_SLUG)- );+ assert!(loaded+ .cloud_providers+ .iter()+ .all(|entry| entry.slug != EPHEMERAL_ROUTE_SLUG));assert_ne!(loaded.chat_provider.as_deref(),Some(format!("{EPHEMERAL_ROUTE_SLUG}:ctx-model").as_str())diff --git a/crates/openhuman-core/src/config/ops/loader_explicit_ctx_tests.rs b/crates/openhuman-core/src/config/ops/loader_explicit_ctx_tests.rsindex 970a1c3c88..45d2109cb8 100644--- a/crates/openhuman-core/src/config/ops/loader_explicit_ctx_tests.rs+++ b/crates/openhuman-core/src/config/ops/loader_explicit_ctx_tests.rs@@ -1,7 +1,7 @@//! `load_config_in` reads the context it is handed, not the one the task has.use super::*;-use crate::core::runtime::{DispatchCtx, DomainSet, context::CoreContext};+use crate::core::runtime::{context::CoreContext, DispatchCtx, DomainSet};use std::sync::Arc;fn tenant(model: &str) -> Arc<CoreContext> {diff --git a/crates/openhuman-core/src/config/ops/mod.rs b/crates/openhuman-core/src/config/ops/mod.rsindex 42e3b32bd4..b871707d06 100644--- a/crates/openhuman-core/src/config/ops/mod.rs+++ b/crates/openhuman-core/src/config/ops/mod.rs@@ -71,9 +71,9 @@ pub(crate) fn config_save_conflict(// ── Public re-exports (preserving the flat external API) ─────────────────────pub use agent::{- AgentPathsPatch, AgentSettingsPatch, AutonomySettingsPatch, add_auto_approve_tool,- apply_agent_settings, apply_autonomy_settings, get_agent_settings, get_autonomy_settings,- load_and_apply_agent_settings, load_and_apply_autonomy_settings,+ add_auto_approve_tool, apply_agent_settings, apply_autonomy_settings, get_agent_settings,+ get_autonomy_settings, load_and_apply_agent_settings, load_and_apply_autonomy_settings,+ AgentPathsPatch, AgentSettingsPatch, AutonomySettingsPatch,};pub use agent_paths::{apply_agent_paths_settings, ensure_agent_dirs, ensure_usable_cwd, expand_tilde,@@ -81,12 +81,12 @@ pub use agent_paths::{};pub use loader::{- RuntimeFlagsOut, agent_server_status, client_config_json, core_rpc_url_from_env,- get_config_snapshot, get_dashboard_settings, get_data_paths, get_data_paths_for_user,- get_runtime_flags, load_and_get_client_config_snapshot, load_and_get_config_snapshot,+ agent_server_status, client_config_json, core_rpc_url_from_env, get_config_snapshot,+ get_dashboard_settings, get_data_paths, get_data_paths_for_user, get_runtime_flags,+ load_and_get_client_config_snapshot, load_and_get_config_snapshot,load_config_for_workspace_with_timeout, load_config_in, load_config_with_timeout,load_current_or_init, reload_config_from_paths, reload_config_snapshot_with_timeout,- reset_local_data, set_browser_allow_all, snapshot_config_json,+ reset_local_data, set_browser_allow_all, snapshot_config_json, RuntimeFlagsOut,};// expose internal helpers needed by tests (ops_tests.rs uses super::*)#[cfg(test)]@@ -97,9 +97,9 @@ pub(crate) use loader::normalize_loaded_config;pub(crate) use loader::reset_local_data_remove_error;#[cfg(test)]pub(crate) use loader::{- BROWSER_ALLOW_ALL_ENV, BROWSER_ALLOW_ALL_RPC_ENABLE_ENV, active_workspace_marker_path,- config_openhuman_dir, default_openhuman_dir, env_flag_enabled, fallback_workspace_dir,- reset_local_data_for_paths,+ active_workspace_marker_path, config_openhuman_dir, default_openhuman_dir, env_flag_enabled,+ fallback_workspace_dir, reset_local_data_for_paths, BROWSER_ALLOW_ALL_ENV,+ BROWSER_ALLOW_ALL_RPC_ENABLE_ENV,};#[cfg(test)]pub(crate) use model::resolve_backend_api_url;@@ -107,41 +107,42 @@ pub(crate) use model::resolve_backend_api_url;pub(crate) use std::path::PathBuf;pub use model::{- ComposioTriggerSettingsPatch, LocalAiSettingsPatch, MemorySettingsPatch, ModelSettingsPatch,- RuntimeSettingsPatch, apply_composio_trigger_settings, apply_local_ai_settings,- apply_memory_settings, apply_model_settings, apply_runtime_settings, collect_provider_ca_certs,+ apply_composio_trigger_settings, apply_local_ai_settings, apply_memory_settings,+ apply_model_settings, apply_runtime_settings, collect_provider_ca_certs,get_composio_trigger_settings, load_and_apply_composio_trigger_settings,load_and_apply_local_ai_settings, load_and_apply_memory_settings,load_and_apply_model_settings, load_and_apply_runtime_settings, load_and_resolve_api_url,+ ComposioTriggerSettingsPatch, LocalAiSettingsPatch, MemorySettingsPatch, ModelSettingsPatch,+ RuntimeSettingsPatch,};-pub use cloud_providers::{CloudProviderUpdate, build_cloud_provider_creds};+pub use cloud_providers::{build_cloud_provider_creds, CloudProviderUpdate};pub(crate) use primary_cloud::{legacy_inference_slug, resolve_primary_cloud_provider_string};pub use privacy::{- PrivacySettingsPatch, apply_privacy_settings, get_privacy_mode, load_and_apply_privacy_settings,+ apply_privacy_settings, get_privacy_mode, load_and_apply_privacy_settings, PrivacySettingsPatch,};mod computer;pub use computer::{- ComputerSettingsPatch, apply_computer_settings, load_and_apply_computer_settings,+ apply_computer_settings, load_and_apply_computer_settings, ComputerSettingsPatch,};pub use sandbox::{- SandboxSettingsPatch, apply_sandbox_settings, get_sandbox_settings,- load_and_apply_sandbox_settings,+ apply_sandbox_settings, get_sandbox_settings, load_and_apply_sandbox_settings,+ SandboxSettingsPatch,};pub use search::{- SearchProviderPatch, SearchSettingsPatch, apply_search_settings, get_search_settings,- load_and_apply_search_settings, search_settings_json,+ apply_search_settings, get_search_settings, load_and_apply_search_settings,+ search_settings_json, SearchProviderPatch, SearchSettingsPatch,};pub use ui::{- AnalyticsSettingsPatch, BrowserSettingsPatch, apply_analytics_settings, apply_browser_settings,- apply_user_timezone, get_onboarding_completed, load_and_apply_analytics_settings,- load_and_apply_browser_settings, load_and_apply_user_timezone, set_onboarding_completed,- user_timezone_json, workspace_onboarding_flag_exists, workspace_onboarding_flag_resolve,- workspace_onboarding_flag_set,+ apply_analytics_settings, apply_browser_settings, apply_user_timezone,+ get_onboarding_completed, load_and_apply_analytics_settings, load_and_apply_browser_settings,+ load_and_apply_user_timezone, set_onboarding_completed, user_timezone_json,+ workspace_onboarding_flag_exists, workspace_onboarding_flag_resolve,+ workspace_onboarding_flag_set, AnalyticsSettingsPatch, BrowserSettingsPatch,};#[cfg(test)]diff --git a/crates/openhuman-core/src/config/ops/model.rs b/crates/openhuman-core/src/config/ops/model.rsindex 52e00aac65..92389ed376 100644--- a/crates/openhuman-core/src/config/ops/model.rs+++ b/crates/openhuman-core/src/config/ops/model.rs@@ -1,8 +1,8 @@//! Model/provider config operations: AI providers, memory, runtime, local AI, Composio.use crate::config::Config;-use crate::core::Outcome;use crate::core::runtime::DispatchCtx;+use crate::core::Outcome;use super::loader::snapshot_config_json;diff --git a/crates/openhuman-core/src/config/ops/model_byok_tests.rs b/crates/openhuman-core/src/config/ops/model_byok_tests.rsindex f3d35c7481..4b20383637 100644--- a/crates/openhuman-core/src/config/ops/model_byok_tests.rs+++ b/crates/openhuman-core/src/config/ops/model_byok_tests.rs@@ -17,8 +17,8 @@ fn provider_ca_updates_validate_bundles_and_normalize_slugs() {let certs = collect_provider_ca_certs([(" team ", Some(""))]).unwrap();assert_eq!(certs.get("team").map(String::as_str), Some(""));}-use crate::config::Config;use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};+use crate::config::Config;fn config_with(inference_url: Option<&str>, api_key: Option<&str>, model: Option<&str>) -> Config {let mut config = Config::default();diff --git a/crates/openhuman-core/src/config/ops/primary_cloud.rs b/crates/openhuman-core/src/config/ops/primary_cloud.rsindex 44a52b854a..348aef6cef 100644--- a/crates/openhuman-core/src/config/ops/primary_cloud.rs+++ b/crates/openhuman-core/src/config/ops/primary_cloud.rs@@ -1,7 +1,7 @@//! Primary cloud-provider selection and legacy direct-inference compatibility.-use crate::config::Config;use crate::config::schema::cloud_providers::CloudProviderCreds;+use crate::config::Config;use crate::inference::provider::factory::{BYOK_INCOMPLETE_SENTINEL, PROVIDER_OPENHUMAN};/// Keep endpoint paths out of config diagnostics while using TinyInference'sdiff --git a/crates/openhuman-core/src/config/ops/privacy.rs b/crates/openhuman-core/src/config/ops/privacy.rsindex 2a50e5d668..daeab025da 100644--- a/crates/openhuman-core/src/config/ops/privacy.rs+++ b/crates/openhuman-core/src/config/ops/privacy.rs@@ -6,8 +6,8 @@//! immediately, without a core restart.use crate::config::{Config, PrivacyMode};-use crate::core::Outcome;use crate::core::runtime::DispatchCtx;+use crate::core::Outcome;/// Partial update for the `[privacy]` block. `None` leaves the mode unchanged.#[derive(Debug, Clone, Default)]diff --git a/crates/openhuman-core/src/config/ops/sandbox.rs b/crates/openhuman-core/src/config/ops/sandbox.rsindex d867058624..2d908ab084 100644--- a/crates/openhuman-core/src/config/ops/sandbox.rs+++ b/crates/openhuman-core/src/config/ops/sandbox.rs@@ -1,8 +1,8 @@//! Sandbox / Docker runtime config operations.use crate::config::Config;-use crate::core::Outcome;use crate::core::runtime::DispatchCtx;+use crate::core::Outcome;use super::loader::snapshot_config_json;diff --git a/crates/openhuman-core/src/config/ops/search.rs b/crates/openhuman-core/src/config/ops/search.rsindex 24acc740e1..b971a43ada 100644--- a/crates/openhuman-core/src/config/ops/search.rs+++ b/crates/openhuman-core/src/config/ops/search.rs@@ -9,14 +9,14 @@ use crate::core::runtime::DispatchCtx;use std::collections::BTreeMap;use serde::Deserialize;-use serde_json::{Value, json};+use serde_json::{json, Value};use crate::config::{- Config, MANAGED_SEARCH_PROVIDERS, PresentationMode, ProviderRoute, SEARCH_PROVIDERS,+ Config, PresentationMode, ProviderRoute, MANAGED_SEARCH_PROVIDERS, SEARCH_PROVIDERS,};use crate::core::Outcome;use crate::search::providers;-use tinysearch_bus::{ROLES, parse_role, role_key};+use tinysearch_bus::{parse_role, role_key, ROLES};/// Partial update of one provider.#[derive(Debug, Clone, Default, Deserialize)]diff --git a/crates/openhuman-core/src/config/ops/search_tests.rs b/crates/openhuman-core/src/config/ops/search_tests.rsindex 452c0eea32..d7561a5079 100644--- a/crates/openhuman-core/src/config/ops/search_tests.rs+++ b/crates/openhuman-core/src/config/ops/search_tests.rs@@ -64,27 +64,23 @@ fn routes_a_provider_cannot_take_are_rejected() {).unwrap_err();assert!(err.contains("does not support the managed route"), "{err}");- assert!(- apply_search_patch(- &mut config,- patch(json!({"providers": {"bing": {"enabled": true}}}))- )- .unwrap_err()- .contains("unknown search provider")- );+ assert!(apply_search_patch(+ &mut config,+ patch(json!({"providers": {"bing": {"enabled": true}}}))+ )+ .unwrap_err()+ .contains("unknown search provider"));let err = apply_search_patch(&mut config,patch(json!({"providers": {"parallel": {"route": "managed"}}})),).unwrap_err();assert!(err.contains("does not support the managed route"), "{err}");- assert!(- apply_search_patch(- &mut config,- patch(json!({"providers": {"searxng": {"api_key": "x"}}}))- )- .is_err()- );+ assert!(apply_search_patch(+ &mut config,+ patch(json!({"providers": {"searxng": {"api_key": "x"}}}))+ )+ .is_err());}#[test]@@ -154,13 +150,11 @@ fn seltz_and_searxng_patches_update_their_sections() {assert_eq!(config.seltz.api_key.as_deref(), Some("s"));assert!(config.searxng.enabled);assert_eq!(config.searxng.base_url, "https://sx.example");- assert!(- apply_search_patch(- &mut config,- patch(json!({"providers": {"searxng": {"base_url": "ftp://x"}}}))- )- .is_err()- );+ assert!(apply_search_patch(+ &mut config,+ patch(json!({"providers": {"searxng": {"base_url": "ftp://x"}}}))+ )+ .is_err());}#[test]@@ -185,13 +179,11 @@ fn settings_view_reports_status_roles_and_never_keys() {assert_eq!(view["effective_roles"]["answer"], json!(["gemini", "exa"]));assert_eq!(view["effective_roles"]["search"], json!(["exa", "gemini"]));assert!(!view.to_string().contains("secret-gemini"));- assert!(- view["providers"]- .as_array()- .unwrap()- .iter()- .all(|p| p["id"] != "gemini_deep_research")- );+ assert!(view["providers"]+ .as_array()+ .unwrap()+ .iter()+ .all(|p| p["id"] != "gemini_deep_research"));let signed_out = search_settings_json_with(&config, false);assert_eq!(provider(&signed_out, "exa")["status"], "sign_in_required");@@ -223,16 +215,12 @@ fn settings_report_the_search_component_as_disabled() {let off = search_settings_json_with(&config, true);assert_eq!(off["enabled"], false);assert_eq!(off["component_disabled"], true);- assert!(- off["component_disabled_reason"]- .as_str()- .unwrap()- .starts_with("COMPONENT_DISABLED:search")- );- assert!(- off["effective_roles"]["search"]- .as_array()- .unwrap()- .is_empty()- );+ assert!(off["component_disabled_reason"]+ .as_str()+ .unwrap()+ .starts_with("COMPONENT_DISABLED:search"));+ assert!(off["effective_roles"]["search"]+ .as_array()+ .unwrap()+ .is_empty());}diff --git a/crates/openhuman-core/src/config/ops_loader_and_search_tests.rs b/crates/openhuman-core/src/config/ops_loader_and_search_tests.rsindex ba7e2f050d..8ae686eee1 100644--- a/crates/openhuman-core/src/config/ops_loader_and_search_tests.rs+++ b/crates/openhuman-core/src/config/ops_loader_and_search_tests.rs@@ -30,13 +30,11 @@ async fn reset_local_data_removes_active_user_and_markers_only() {assert!(!user_marker.exists());// … but the shared root itself survives.assert!(default_openhuman_dir.exists());- assert!(- outcome- .value- .get("removed_paths")- .and_then(|value| value.as_array())- .is_some_and(|paths| !paths.is_empty())- );+ assert!(outcome+ .value+ .get("removed_paths")+ .and_then(|value| value.as_array())+ .is_some_and(|paths| !paths.is_empty()));}#[tokio::test]@@ -81,13 +79,11 @@ async fn reset_local_data_tolerates_absent_paths() {.unwrap();assert!(default_openhuman_dir.exists());- assert!(- outcome- .value- .get("removed_paths")- .and_then(|value| value.as_array())- .is_some_and(|paths| paths.is_empty())- );+ assert!(outcome+ .value+ .get("removed_paths")+ .and_then(|value| value.as_array())+ .is_some_and(|paths| paths.is_empty()));}#[test]@@ -141,11 +137,10 @@ fn core_rpc_url_from_env_uses_override_when_set() {fn fallback_workspace_dir_ends_in_workspace_under_openhuman() {let p = fallback_workspace_dir();assert!(p.ends_with("workspace"));- assert!(- p.parent()- .map(|d| d.ends_with(".openhuman"))- .unwrap_or(false)- );+ assert!(p+ .parent()+ .map(|d| d.ends_with(".openhuman"))+ .unwrap_or(false));}#[test]@@ -563,13 +558,11 @@ async fn apply_search_settings_stores_and_clears_tavily_key() {.await.expect("clear Tavily key");assert!(cfg.search.tavily.api_key.is_none());- assert!(- !result.value["effective_roles"]["search"]- .as_array()- .unwrap()- .iter()- .any(|p| p == "tavily")- );+ assert!(!result.value["effective_roles"]["search"]+ .as_array()+ .unwrap()+ .iter()+ .any(|p| p == "tavily"));}#[tokio::test]diff --git a/crates/openhuman-core/src/config/ops_model_and_local_ai_tests.rs b/crates/openhuman-core/src/config/ops_model_and_local_ai_tests.rsindex 7cadbd91b4..edd70e5e24 100644--- a/crates/openhuman-core/src/config/ops_model_and_local_ai_tests.rs+++ b/crates/openhuman-core/src/config/ops_model_and_local_ai_tests.rs@@ -118,11 +118,10 @@ async fn apply_model_settings_replaces_model_registry_when_some_and_keeps_when_n};let _ = apply_model_settings(&mut cfg, set).await.expect("set");assert_eq!(cfg.model_registry.len(), 1);- assert!(- cfg.model_registry- .iter()- .any(|e| e.id == "my-llava" && e.vision)- );+ assert!(cfg+ .model_registry+ .iter()+ .any(|e| e.id == "my-llava" && e.vision));// None — leave registry alone.let _ = apply_model_settings(@@ -347,12 +346,10 @@ async fn apply_autonomy_settings_updates_action_budget() {outcome.value["config"]["autonomy"]["max_actions_per_hour"],serde_json::json!(64));- assert!(- outcome- .logs- .iter()- .any(|l| l.contains("autonomy settings saved to"))- );+ assert!(outcome+ .logs+ .iter()+ .any(|l| l.contains("autonomy settings saved to")));}#[tokio::test]diff --git a/crates/openhuman-core/src/config/ops_voice_and_autonomy_tests.rs b/crates/openhuman-core/src/config/ops_voice_and_autonomy_tests.rsindex 6494a4aaa8..0c04bdc708 100644--- a/crates/openhuman-core/src/config/ops_voice_and_autonomy_tests.rs+++ b/crates/openhuman-core/src/config/ops_voice_and_autonomy_tests.rs@@ -7,12 +7,10 @@ async fn get_config_snapshot_wraps_snapshot_in_rpc_outcome() {let cfg = tmp_config(&tmp);let outcome = get_config_snapshot(&cfg).await.expect("snapshot");assert!(outcome.value.get("config").is_some());- assert!(- outcome- .logs- .iter()- .any(|l| l.contains("config loaded from"))- );+ assert!(outcome+ .logs+ .iter()+ .any(|l| l.contains("config loaded from")));}#[tokio::test]@@ -462,12 +460,10 @@ async fn apply_agent_settings_updates_timeout_and_persists_snapshot() {outcome.value["config"]["agent"]["agent_timeout_secs"],serde_json::json!(300));- assert!(- outcome- .logs- .iter()- .any(|l| l.contains("agent settings saved to"))- );+ assert!(outcome+ .logs+ .iter()+ .any(|l| l.contains("agent settings saved to")));// With no env override, the live runtime now reflects the saved value.assert_eq!(crate::tools::timeout::tool_execution_timeout_secs(), 300);}diff --git a/crates/openhuman-core/src/config/schema/cloud_providers.rs b/crates/openhuman-core/src/config/schema/cloud_providers.rsindex c769e7fbf8..ecab991081 100644--- a/crates/openhuman-core/src/config/schema/cloud_providers.rs+++ b/crates/openhuman-core/src/config/schema/cloud_providers.rs@@ -15,8 +15,8 @@ use std::sync::Arc;use crate::core::slots::HookSlot;use tinyinference_providers::builtin::{- BUILTIN_CLOUD_PROVIDERS as UPSTREAM_BUILTINS, BuiltinAuthStyle,- BuiltinCloudProvider as UpstreamBuiltinCloudProvider, BuiltinPresets,+ BuiltinAuthStyle, BuiltinCloudProvider as UpstreamBuiltinCloudProvider, BuiltinPresets,+ BUILTIN_CLOUD_PROVIDERS as UPSTREAM_BUILTINS,};static HOSTED_PRESETS: HookSlot<BuiltinCloudProvider> =diff --git a/crates/openhuman-core/src/config/schema/cloud_providers_tests.rs b/crates/openhuman-core/src/config/schema/cloud_providers_tests.rsindex cb825a94f6..346b4a7603 100644--- a/crates/openhuman-core/src/config/schema/cloud_providers_tests.rs+++ b/crates/openhuman-core/src/config/schema/cloud_providers_tests.rs@@ -1,6 +1,6 @@//! Tests for the surrounding module.-use super::{AuthStyle, builtin_cloud_providers, builtin_presets, is_slug_reserved};+use super::{builtin_cloud_providers, builtin_presets, is_slug_reserved, AuthStyle};use tinyinference_providers::builtin::endpoint_host;#[test]@@ -186,10 +186,8 @@ fn hosted_presets_and_classification_are_context_scoped() {"host additions must not replace a generic provider");assert!(super::builtin_presets().host_is_builtin_cloud_provider("tenant.example"));- assert!(- super::builtin_presets()- .endpoint_host_is_chat_completions_only("https://tenant.example/v1")- );+ assert!(super::builtin_presets()+ .endpoint_host_is_chat_completions_only("https://tenant.example/v1"));assert!(super::builtin_cloud_provider("tenant-hosted").is_some());assert!(super::is_hosted_cloud_identity("tenant-hosted"));assert!(!super::is_hosted_auth_style(AuthStyle::Bearer));@@ -285,10 +283,8 @@ fn host_is_builtin_cloud_provider_recognises_inference_hosts() {/// the slug is not builtin.#[test]fn nvidia_host_is_chat_completions_only_regardless_of_slug() {- assert!(- builtin_presets()- .endpoint_host_is_chat_completions_only("https://integrate.api.nvidia.com/v1")- );+ assert!(builtin_presets()+ .endpoint_host_is_chat_completions_only("https://integrate.api.nvidia.com/v1"));// Other chat-only built-in hosts too.for endpoint in ["https://api.deepseek.com/v1",@@ -363,11 +359,9 @@ fn generated_provider_ids_sanitize_and_bound_the_slug_prefix() {assert!(id.starts_with("p_provider_with_spaces_"));let suffix = id.rsplit('_').next().expect("suffix");assert_eq!(suffix.len(), 5);- assert!(- suffix- .chars()- .all(|c| c.is_ascii_lowercase() || c.is_ascii_digit())- );+ assert!(suffix+ .chars()+ .all(|c| c.is_ascii_lowercase() || c.is_ascii_digit()));}#[test]diff --git a/crates/openhuman-core/src/config/schema/ephemeral_route_tests.rs b/crates/openhuman-core/src/config/schema/ephemeral_route_tests.rsindex 9f405c2fe0..2ebeb3b88e 100644--- a/crates/openhuman-core/src/config/schema/ephemeral_route_tests.rs+++ b/crates/openhuman-core/src/config/schema/ephemeral_route_tests.rs@@ -220,12 +220,10 @@ fn apply_without_a_model_changes_nothing() {apply(&mut config, route());assert!(config.ephemeral_route.is_none());assert!(config.chat_provider.is_none());- assert!(- config- .cloud_providers- .iter()- .all(|entry| entry.slug != EPHEMERAL_ROUTE_SLUG)- );+ assert!(config+ .cloud_providers+ .iter()+ .all(|entry| entry.slug != EPHEMERAL_ROUTE_SLUG));}#[test]diff --git a/crates/openhuman-core/src/config/schema/inbound_sources_tests.rs b/crates/openhuman-core/src/config/schema/inbound_sources_tests.rsindex 5acc6f4f3a..a39fc31da2 100644--- a/crates/openhuman-core/src/config/schema/inbound_sources_tests.rs+++ b/crates/openhuman-core/src/config/schema/inbound_sources_tests.rs@@ -82,12 +82,10 @@ fn an_unusable_source_is_refused_and_left_out() {);assert!(inbound.source("x:dms").unwrap_err().contains("agent_id"));assert!(inbound.source("x:zero").unwrap_err().contains("max_batch"));- assert!(- inbound- .source("composio:gmail")- .unwrap_err()- .contains("reserved")- );+ assert!(inbound+ .source("composio:gmail")+ .unwrap_err()+ .contains("reserved"));let usable: Vec<&str> = inbound.usable_sources().map(|(name, _)| name).collect();assert_eq!(usable, ["x:mentions"]);assert!(inbound.is_pinned("x:mentions"));diff --git a/crates/openhuman-core/src/config/schema/load/branches.rs b/crates/openhuman-core/src/config/schema/load/branches.rsindex 825fb5ea0d..9019c5e7c2 100644--- a/crates/openhuman-core/src/config/schema/load/branches.rs+++ b/crates/openhuman-core/src/config/schema/load/branches.rs@@ -5,7 +5,7 @@//! made its poll frame ~440 KB on top of the agent tower (#6379).use super::super::Config;-use super::dirs::{ConfigResolutionSource, default_action_dir, resolve_action_dir};+use super::dirs::{default_action_dir, resolve_action_dir, ConfigResolutionSource};use super::env::EnvLookup;use super::impl_load::migration_source;use super::migrate::{diff --git a/crates/openhuman-core/src/config/schema/load/context_overlay.rs b/crates/openhuman-core/src/config/schema/load/context_overlay.rsindex ed99ff31a0..61042f92e5 100644--- a/crates/openhuman-core/src/config/schema/load/context_overlay.rs+++ b/crates/openhuman-core/src/config/schema/load/context_overlay.rs@@ -1,10 +1,10 @@//! Per-context config overrides reapplied after a fresh persisted reload.-use crate::config::Config;use crate::config::schema::{AppliedInferenceOverride, ComposioHostCredential, EphemeralRoute, ResolvedEndpoints,SearchHostCredential,};+use crate::config::Config;use crate::profiles::provider_settings::ProfileProviderSettings;use serde_json::Value;use std::collections::{BTreeMap, BTreeSet};diff --git a/crates/openhuman-core/src/config/schema/load/diagnostics_tests.rs b/crates/openhuman-core/src/config/schema/load/diagnostics_tests.rsindex 35a58dfe36..ca483c7ee6 100644--- a/crates/openhuman-core/src/config/schema/load/diagnostics_tests.rs+++ b/crates/openhuman-core/src/config/schema/load/diagnostics_tests.rs@@ -78,13 +78,11 @@ async fn loader_records_legacy_inference_url_migration() {.await.unwrap();- assert!(- config- .load_diagnostics()- .migrated_keys- .iter()- .any(|key| key == "api_url")- );+ assert!(config+ .load_diagnostics()+ .migrated_keys+ .iter()+ .any(|key| key == "api_url"));assert_eq!(config.inference_url.as_deref(),Some("https://example.test/v1/chat/completions")@@ -99,10 +97,8 @@ fn default_config_has_empty_load_diagnostics() {assert!(config.load_diagnostics().parse_error.is_none());assert_eq!(config.load_diagnostics().fallback, ConfigLoadFallback::None);assert!(config.load_diagnostics().migrated_keys.is_empty());- assert!(- serde_json::to_value(&config)- .unwrap()- .get("load_diagnostics")- .is_none()- );+ assert!(serde_json::to_value(&config)+ .unwrap()+ .get("load_diagnostics")+ .is_none());}diff --git a/crates/openhuman-core/src/config/schema/load/dirs.rs b/crates/openhuman-core/src/config/schema/load/dirs.rsindex 74b4322ce2..c95b98ffd8 100644--- a/crates/openhuman-core/src/config/schema/load/dirs.rs+++ b/crates/openhuman-core/src/config/schema/load/dirs.rs@@ -6,9 +6,8 @@ use std::path::{Path, PathBuf};use tokio::fs;pub use load_user_state::{- PRE_LOGIN_USER_ID, active_user_marker_path, clear_active_user, pre_login_user_dir,- read_active_user_id, read_active_user_id_checked_async, user_openhuman_dir,- write_active_user_id,+ active_user_marker_path, clear_active_user, pre_login_user_dir, read_active_user_id,+ read_active_user_id_checked_async, user_openhuman_dir, write_active_user_id, PRE_LOGIN_USER_ID,};// Sync variant is consumed only by the `read_active_user_id` wrapper (in// load_user_state) and the load_tests module; the async resolver below usesdiff --git a/crates/openhuman-core/src/config/schema/load/env_overlay.rs b/crates/openhuman-core/src/config/schema/load/env_overlay.rsindex ee937d060b..edcfca9e54 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay.rs@@ -14,8 +14,8 @@ mod runtime;mod search;mod update;+use super::super::proxy::{set_runtime_proxy_config, ProxyScope};use super::super::Config;-use super::super::proxy::{ProxyScope, set_runtime_proxy_config};use std::path::PathBuf;/// Classification of an `OPENHUMAN_SHELL_HIDE_WINDOW` env value. Split out fromdiff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/components.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/components.rsindex 09f5adcf2f..357872e65f 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/components.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/components.rs@@ -1,8 +1,8 @@//! Env overrides for `[components]`: `OPENHUMAN_COMPONENT_<NAME>=0|1`.-use crate::config::schema::Config;use crate::config::schema::components::COMPONENT_NAMES;use crate::config::schema::load::env::EnvLookup;+use crate::config::schema::Config;/// Parse a `0|1|true|false|on|off|yes|no` flag; `None` for anything else.pub(crate) fn parse_flag(raw: &str) -> Option<bool> {diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/context.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/context.rsindex 062815d639..1c9e366a1f 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/context.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/context.rs@@ -1,7 +1,7 @@//! Env overrides for 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_context_env<E: EnvLookup + ?Sized>(&mut self, env: &E) {diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/embeddings.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/embeddings.rsindex 310a1130a4..9cd6566bdc 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/embeddings.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/embeddings.rs@@ -1,7 +1,7 @@//! Env overrides for the embedding settings kept under `[memory]`.-use crate::config::schema::Config;use crate::config::schema::load::env::EnvLookup;+use crate::config::schema::Config;impl Config {/// `OPENHUMAN_MEMORY_EMBED_RATE_LIMIT` — embedding requests per minute.diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/inbound_debounce.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/inbound_debounce.rsindex babfa0c21b..d07b92af3b 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/inbound_debounce.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/inbound_debounce.rs@@ -1,8 +1,8 @@//! Env overrides for inbound message batching (`[inbound_debounce]`).-use crate::config::schema::Config;-use crate::config::schema::load::env::EnvLookup;use crate::config::schema::load::env::parse_env_bool;+use crate::config::schema::load::env::EnvLookup;+use crate::config::schema::Config;fn parse_ms(name: &str, raw: &str) -> Option<u64> {let trimmed = raw.trim();diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/modules.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/modules.rsindex a7f116e400..34e9ed0906 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/modules.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/modules.rs@@ -6,7 +6,7 @@use crate::config::schema::load::env::EnvLookup;use crate::config::schema::{- Config, MODULE_SOURCE_ENV, ModuleOverride, ModuleSourceMode, module_source_env_for,+ module_source_env_for, Config, ModuleOverride, ModuleSourceMode, MODULE_SOURCE_ENV,};impl Config {diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/observability.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/observability.rsindex b32dfffc24..5f45f0907c 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/observability.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/observability.rs@@ -1,7 +1,7 @@//! Env overrides for Sentry, analytics, and agent-tracing content capture.-use crate::config::schema::Config;use crate::config::schema::load::env::EnvLookup;+use crate::config::schema::Config;impl Config {pub(super) fn apply_observability_env<E: EnvLookup + ?Sized>(&mut self, env: &E) {diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/proxy.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/proxy.rsindex cb35a5e31d..33e01a846e 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/proxy.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/proxy.rs@@ -1,11 +1,11 @@//! Env overrides for the outbound proxy configuration.-use crate::config::schema::Config;use crate::config::schema::load::env::EnvLookup;use crate::config::schema::proxy::{normalize_no_proxy_list, normalize_proxy_url_option, normalize_service_list,parse_proxy_enabled, parse_proxy_scope,};+use crate::config::schema::Config;impl Config {pub(super) fn apply_proxy_env<E: EnvLookup + ?Sized>(&mut self, env: &E) {diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rsindex e2a26f890f..b1b74d1b84 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/runtime.rs@@ -1,8 +1,8 @@//! Environment overrides for token compression and related settings.-use crate::config::schema::Config;-use crate::config::schema::load::env::EnvLookup;use crate::config::schema::load::env::parse_env_bool;+use crate::config::schema::load::env::EnvLookup;+use crate::config::schema::Config;impl Config {pub(super) fn apply_runtime_env<E: EnvLookup + ?Sized>(&mut self, env: &E) {diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/search.rsindex 13b9e2c67b..a7b7cc9ce0 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs@@ -1,11 +1,11 @@//! Env overrides for web search: provider set, routes, roles, keys, and the//! Seltz/SearXNG options.-use crate::config::schema::load::env::EnvLookup;use crate::config::schema::load::env::parse_env_bool;+use crate::config::schema::load::env::EnvLookup;use crate::config::schema::{- Config, MANAGED_SEARCH_PROVIDERS, PresentationMode, ProviderRoute, SEARCH_PROVIDERS,- SEARCH_ROLES, SearchProviderSettings,+ Config, PresentationMode, ProviderRoute, SearchProviderSettings, MANAGED_SEARCH_PROVIDERS,+ SEARCH_PROVIDERS, SEARCH_ROLES,};impl Config {diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/update.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/update.rsindex 72f5b7de9e..32dd21d309 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/update.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/update.rs@@ -1,9 +1,9 @@//! Env overrides for the auto-updater (`[update]`).+use crate::config::schema::load::env::parse_env_bool;+use crate::config::schema::load::env::EnvLookup;use crate::config::schema::Config;use crate::config::schema::UpdateRestartStrategy;-use crate::config::schema::load::env::EnvLookup;-use crate::config::schema::load::env::parse_env_bool;impl Config {pub(super) fn apply_update_env<E: EnvLookup + ?Sized>(&mut self, env: &E) {diff --git a/crates/openhuman-core/src/config/schema/load/impl_load.rs b/crates/openhuman-core/src/config/schema/load/impl_load.rsindex 9faffa9c69..83a1cf0215 100644--- a/crates/openhuman-core/src/config/schema/load/impl_load.rs+++ b/crates/openhuman-core/src/config/schema/load/impl_load.rs@@ -2,8 +2,8 @@ use super::super::Config;use super::branches::pre_login_config_boxed;use super::context_refresh::is_document_conflict;use super::dirs::{- ConfigResolutionSource, default_action_dir, default_config_and_workspace_dirs,- resolve_action_dir, resolve_config_dirs_ignoring_env, resolve_runtime_config_dirs_with,+ default_action_dir, default_config_and_workspace_dirs, resolve_action_dir,+ resolve_config_dirs_ignoring_env, resolve_runtime_config_dirs_with, ConfigResolutionSource,};use super::env::{EnvLookup, NoEnv, ProcessEnv, ProcessEnvWithoutWorkspace};use super::migrate::{@@ -17,8 +17,8 @@ use std::path::Path;use std::sync::{Mutex, OnceLock};use tokio::fs;-pub(crate) use super::config_file_read::CONFIG_OWNER_MISMATCH_MARKER;pub(crate) use super::config_file_read::parse_config_with_recovery;+pub(crate) use super::config_file_read::CONFIG_OWNER_MISMATCH_MARKER;pub(super) use super::config_file_read::{describe_config_ownership, migration_source, parse_config_boxed, parse_toml_off_worker,};diff --git a/crates/openhuman-core/src/config/schema/load/mod.rs b/crates/openhuman-core/src/config/schema/load/mod.rsindex cdd8aabf67..526354d91f 100644--- a/crates/openhuman-core/src/config/schema/load/mod.rs+++ b/crates/openhuman-core/src/config/schema/load/mod.rs@@ -27,10 +27,11 @@ mod diagnostics_tests;pub use active_workspace::active_workspace_dir_cached;pub(crate) use active_workspace::invalidate_active_workspace;pub use dirs::{- PRE_LOGIN_USER_ID, action_dir_env_override, active_user_marker_path, active_workspace_dir,+ action_dir_env_override, active_user_marker_path, active_workspace_dir,active_workspace_snapshot, clear_active_user, default_action_dir, default_files_dir,default_projects_dir, default_root_openhuman_dir, pre_login_user_dir, read_active_user_id,resolve_action_dir, resolve_files_dir, user_openhuman_dir, write_active_user_id,+ PRE_LOGIN_USER_ID,};// redact_url_for_log is pub(super) for the schema module; tests inside load@@ -45,8 +46,8 @@ pub(super) use migrate::redact_url_for_log;pub(crate) use impl_load::CONFIG_OWNER_MISMATCH_MARKER;pub(crate) use migrate::apply_loaded_config_migrations;pub(crate) use provenance::{- ConfigProvenance, DotenvLoadProvenance, ProvenanceSource, ValueProvenance, current_dotenv_load,- dotenv_loaded_variable, set_current_dotenv_load,+ current_dotenv_load, dotenv_loaded_variable, set_current_dotenv_load, ConfigProvenance,+ DotenvLoadProvenance, ProvenanceSource, ValueProvenance,};// Items needed by load_tests.rs (loaded as `mod tests` below).@@ -63,7 +64,7 @@ pub(crate) use dirs::read_active_user_id_checked;// holds `auth-profiles.json`.pub(crate) use dirs::resolve_config_dir_for_workspace;pub(crate) use dirs::{- ConfigResolutionSource, load_persisted_workspace_dirs, read_active_user_id_checked_async,+ load_persisted_workspace_dirs, read_active_user_id_checked_async, ConfigResolutionSource,};#[cfg(test)]pub(crate) use dirs::{resolve_runtime_config_dirs, resolve_runtime_config_dirs_with};diff --git a/crates/openhuman-core/src/config/schema/load/source/concurrency_tests.rs b/crates/openhuman-core/src/config/schema/load/source/concurrency_tests.rsindex 236dcf1daa..33152191e3 100644--- a/crates/openhuman-core/src/config/schema/load/source/concurrency_tests.rs+++ b/crates/openhuman-core/src/config/schema/load/source/concurrency_tests.rs@@ -1,5 +1,5 @@use super::*;-use crate::core::runtime::{ContextOverlay, DispatchCtx, DomainSet, context::CoreContext};+use crate::core::runtime::{context::CoreContext, ContextOverlay, DispatchCtx, DomainSet};use serde_json::json;#[tokio::test]diff --git a/crates/openhuman-core/src/config/schema/load/source/document.rs b/crates/openhuman-core/src/config/schema/load/source/document.rsindex 97473c7590..ccd6bb66c1 100644--- a/crates/openhuman-core/src/config/schema/load/source/document.rs+++ b/crates/openhuman-core/src/config/schema/load/source/document.rs@@ -2,21 +2,21 @@use std::sync::{Arc, Mutex};-use anyhow::{Context, Result, anyhow};+use anyhow::{anyhow, Context, Result};use async_trait::async_trait;use serde_json::json;-use tinystoragedrivers::secrets::{KeyProvider, crypto};+use tinystoragedrivers::secrets::{crypto, KeyProvider};use tinystoragedrivers::{CollectionSpec, Precondition};use tinystoragedrivers_api::DocumentStore;use super::{- ConfigRead, ConfigSource, ConfigSourceAnchor, DocumentBackendIdentity, FileConfigSource,- apply_bootstrap, strip_bootstrap,+ apply_bootstrap, strip_bootstrap, ConfigRead, ConfigSource, ConfigSourceAnchor,+ DocumentBackendIdentity, FileConfigSource,};use crate::storage::Scope;-pub(crate) use super::storage_schema::CONFIG_COLLECTION;use super::storage_schema::document_id;+pub(crate) use super::storage_schema::CONFIG_COLLECTION;/// The document field holding the encrypted TOML body (`enc2:` hex).const BODY_FIELD: &str = "toml_enc";diff --git a/crates/openhuman-core/src/config/schema/load/source/mod_tests.rs b/crates/openhuman-core/src/config/schema/load/source/mod_tests.rsindex 7ef806f6fb..1627d5adba 100644--- a/crates/openhuman-core/src/config/schema/load/source/mod_tests.rs+++ b/crates/openhuman-core/src/config/schema/load/source/mod_tests.rs@@ -1,9 +1,9 @@use super::tests_support::ForcedDocumentSource;use super::*;use crate::config::Config;-use crate::storage::{Scope, Storage, StorageBackend, test_support::memory_backend};+use crate::storage::{test_support::memory_backend, Scope, Storage, StorageBackend};use std::sync::Arc;-use tinystoragedrivers::secrets::{DerivedKeys, KeyProvider, crypto};+use tinystoragedrivers::secrets::{crypto, DerivedKeys, KeyProvider};use zeroize::Zeroizing;fn keys(byte: u8) -> Arc<dyn KeyProvider> {diff --git a/crates/openhuman-core/src/config/schema/load/source/revision_loader_tests.rs b/crates/openhuman-core/src/config/schema/load/source/revision_loader_tests.rsindex 43f1da9c71..6834ee2610 100644--- a/crates/openhuman-core/src/config/schema/load/source/revision_loader_tests.rs+++ b/crates/openhuman-core/src/config/schema/load/source/revision_loader_tests.rs@@ -1,5 +1,5 @@use super::*;-use crate::core::runtime::{ContextOverlay, DispatchCtx, DomainSet, context::CoreContext};+use crate::core::runtime::{context::CoreContext, ContextOverlay, DispatchCtx, DomainSet};use serde_json::json;use std::sync::Arc;use tinytools::Tool;diff --git a/crates/openhuman-core/src/config/schema/load/source/storage_schema.rs b/crates/openhuman-core/src/config/schema/load/source/storage_schema.rsindex 84b81a0ed6..0ab2c19ff6 100644--- a/crates/openhuman-core/src/config/schema/load/source/storage_schema.rs+++ b/crates/openhuman-core/src/config/schema/load/source/storage_schema.rs@@ -7,7 +7,7 @@use tinystoragedrivers::CollectionSpec;-use crate::storage::schema_support::{LegacyTargetRecord, key_of, map_legacy_collection};+use crate::storage::schema_support::{key_of, map_legacy_collection, LegacyTargetRecord};/// The v2 collection holding one config document per scope.pub(crate) const CONFIG_COLLECTION: &str = "config.documents";diff --git a/crates/openhuman-core/src/config/schema/load_active_user_and_dirs_tests.rs b/crates/openhuman-core/src/config/schema/load_active_user_and_dirs_tests.rsindex 7c1a781b6e..6585f55196 100644--- a/crates/openhuman-core/src/config/schema/load_active_user_and_dirs_tests.rs+++ b/crates/openhuman-core/src/config/schema/load_active_user_and_dirs_tests.rs@@ -321,7 +321,7 @@ fn apply_env_overrides_shell_hide_window_parses_truthy_falsy() {#[test]fn classify_shell_hide_window_distinguishes_unset_from_unrecognized() {- use super::super::env_overlay::{ShellHideWindowParse as P, classify_shell_hide_window};+ use super::super::env_overlay::{classify_shell_hide_window, ShellHideWindowParse as P};// The key distinction the change relies on: an empty / whitespace-only value// is `Unset` (silent no-op), NOT `Unrecognized` (which warns on every boot).// Testing the classifier directly proves this — the field-unchanged assertiondiff --git a/crates/openhuman-core/src/config/schema/load_env_overlay_tests.rs b/crates/openhuman-core/src/config/schema/load_env_overlay_tests.rsindex 4f14827c75..ab91286d2c 100644--- a/crates/openhuman-core/src/config/schema/load_env_overlay_tests.rs+++ b/crates/openhuman-core/src/config/schema/load_env_overlay_tests.rs@@ -146,12 +146,11 @@ fn env_overlay_output_language_accepts_non_empty_value() {cfg.apply_env_overlay_with(&HashMapEnv::new().with("OPENHUMAN_OUTPUT_LANGUAGE", "zh-CN"));assert_eq!(cfg.output_language.as_deref(), Some("zh-CN"));- assert!(- cfg.output_language_directive()- .as_deref()- .unwrap_or_default()- .contains("Simplified Chinese")- );+ assert!(cfg+ .output_language_directive()+ .as_deref()+ .unwrap_or_default()+ .contains("Simplified Chinese"));cfg.apply_env_overlay_with(&HashMapEnv::new().with("OPENHUMAN_OUTPUT_LANGUAGE", " "));assert_eq!(diff --git a/crates/openhuman-core/src/config/schema/load_managed_provider_tests.rs b/crates/openhuman-core/src/config/schema/load_managed_provider_tests.rsindex 90e423c6bd..80a1bda5c8 100644--- a/crates/openhuman-core/src/config/schema/load_managed_provider_tests.rs+++ b/crates/openhuman-core/src/config/schema/load_managed_provider_tests.rs@@ -45,12 +45,10 @@ async fn bare_core_advances_schema_without_inventing_hosted_defaults() {let tmp = tempfile::tempdir().unwrap();let mut config = load_or_init_for_workspace(tmp.path()).await;assert!(config.default_model.is_none());- assert!(- config- .cloud_providers- .iter()- .all(|provider| provider.slug != "openhuman")- );+ assert!(config+ .cloud_providers+ .iter()+ .all(|provider| provider.slug != "openhuman"));config.schema_version = 7;config.default_model = Some("reasoning-v1".to_string());diff --git a/crates/openhuman-core/src/config/schema/load_migration_tests.rs b/crates/openhuman-core/src/config/schema/load_migration_tests.rsindex 542033fa24..3f8802c691 100644--- a/crates/openhuman-core/src/config/schema/load_migration_tests.rs+++ b/crates/openhuman-core/src/config/schema/load_migration_tests.rs@@ -256,12 +256,10 @@ backend = "sqlite".unwrap();assert!(saved.contains("engine = \"\""));let saved_config: toml::Value = toml::from_str(&saved).unwrap();- assert!(- !saved_config["memory"]- .as_table()- .unwrap()- .contains_key("backend")- );+ assert!(!saved_config["memory"]+ .as_table()+ .unwrap()+ .contains_key("backend"));let reloaded = load_or_init_for_workspace(tmp.path()).await;diff --git a/crates/openhuman-core/src/config/schema/mod.rs b/crates/openhuman-core/src/config/schema/mod.rsindex ef966e2141..b28415158b 100644--- a/crates/openhuman-core/src/config/schema/mod.rs+++ b/crates/openhuman-core/src/config/schema/mod.rs@@ -3,7 +3,7 @@//! Split into submodules; this module re-exports the main `Config` and all public types.pub mod cloud_providers;-pub use cloud_providers::{AuthStyle, CloudProviderCreds, generate_provider_id, is_slug_reserved};+pub use cloud_providers::{generate_provider_id, is_slug_reserved, AuthStyle, CloudProviderCreds};fn generate_provider_id_with_prefix(prefix: &str, slug: &str) -> String {use std::time::{SystemTime, UNIX_EPOCH};@@ -35,7 +35,7 @@ fn generate_provider_id_with_prefix(prefix: &str, slug: &str) -> String {format!("{prefix}_{safe_slug}_{suffix}")}pub mod ephemeral_route;-pub use ephemeral_route::{EPHEMERAL_ROUTE_SLUG, EphemeralRoute};+pub use ephemeral_route::{EphemeralRoute, EPHEMERAL_ROUTE_SLUG};pub mod resolved_endpoints;pub use resolved_endpoints::ResolvedEndpoints;mod agent;@@ -62,7 +62,7 @@ pub use hosting::HostingConfig;pub mod storage;pub use storage::StorageConfig;pub mod profile_layout;-pub use profile_layout::{ProfileLayout, users_dir};+pub use profile_layout::{users_dir, ProfileLayout};mod identity_cost;mod inbound_debounce;pub(crate) mod load;@@ -71,11 +71,11 @@ pub(crate) use load::source::storage_schema::collection_specs as config_storage_#[cfg(feature = "legacy-import")]pub(crate) use load::source::storage_schema::upgrade_records as upgrade_config_records;pub use load::{- PRE_LOGIN_USER_ID, action_dir_env_override, active_user_marker_path, active_workspace_dir,+ action_dir_env_override, active_user_marker_path, active_workspace_dir,active_workspace_dir_cached, active_workspace_snapshot, clear_active_user, default_action_dir,default_files_dir, default_projects_dir, default_root_openhuman_dir, pre_login_user_dir,read_active_user_id, resolve_action_dir, resolve_files_dir, user_openhuman_dir,- write_active_user_id,+ write_active_user_id, PRE_LOGIN_USER_ID,};// Crate-internal: the invalidation half of the cached active workspace. The// marker writers in `load_user_state` call it from outside `load`; the@@ -134,18 +134,19 @@ pub use inbound_debounce::{InboundDebounceConfig, InboundDebounceOverride};pub use local_ai::{LocalAiConfig, LocalAiUsage};pub use memes::MemesConfig;pub use memory::{- MEMORY_CORTEXDB_KEY_NAME, MemoryAgentConfig, MemoryConfig, MemoryConversationsConfig,+ migrate_legacy_source, MemoryAgentConfig, MemoryConfig, MemoryConversationsConfig,MemoryEngineSettings, MemoryLayoutMode, MemorySourceConfig, MemorySourceKind, RecallSettings,- migrate_legacy_source,+ MEMORY_CORTEXDB_KEY_NAME,};pub use modules::{- MODULE_SOURCE_ENV, ModuleOverride, ModuleSourceMode, ModulesConfig, module_source_env_for,+ module_source_env_for, ModuleOverride, ModuleSourceMode, ModulesConfig, MODULE_SOURCE_ENV,};pub use observability::{AgentTracingBackend, AgentTracingConfig, ObservabilityConfig};pub use privacy::{PrivacyConfig, PrivacyMode};pub use proxy::{- ProxyConfig, ProxyScope, apply_runtime_proxy_to_builder, build_runtime_proxy_client,+ apply_runtime_proxy_to_builder, build_runtime_proxy_client,build_runtime_proxy_client_with_timeouts, runtime_proxy_config, set_runtime_proxy_config,+ ProxyConfig, ProxyScope,};pub use routes::{EmbeddingRouteConfig, ModelRouteConfig};pub use runtime::{@@ -156,17 +157,17 @@ pub use scheduler_gate::{PauseReason, Policy, SchedulerGateConfig, SchedulerGatepub use task_sources::TaskSourcesConfig;pub use tokenjuice::TokenjuiceConfig;pub use tools::{- BrowserComputerUseConfig, BrowserConfig, COMPOSIO_MODE_BACKEND, COMPOSIO_MODE_DIRECT,- COMPOSIO_MODE_DISABLED, ComposioConfig, ComposioDirectBaseUrls, ComposioHostCredential,- CurlConfig, GitbooksConfig, HttpHeader, HttpRequestConfig, IntegrationToggle,- IntegrationsConfig, LegacySearchInputs, MANAGED_SEARCH_PROVIDERS, McpAuthConfig,- McpClientConfig, McpClientIdentityConfig, McpServerConfig, McpToolExposure, MultimodalConfig,- MultimodalFileConfig, PresentationMode, ProviderRoute, SEARCH_ENGINE_BRAVE,- SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL,- SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLE_ANSWER,- SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH, SEARCH_ROLES, SearchConfig, SearchEngineCredentials,+ BrowserComputerUseConfig, BrowserConfig, ComposioConfig, ComposioDirectBaseUrls,+ ComposioHostCredential, CurlConfig, GitbooksConfig, HttpHeader, HttpRequestConfig,+ IntegrationToggle, IntegrationsConfig, LegacySearchInputs, McpAuthConfig, McpClientConfig,+ McpClientIdentityConfig, McpServerConfig, McpToolExposure, MultimodalConfig,+ MultimodalFileConfig, PresentationMode, ProviderRoute, SearchConfig, SearchEngineCredentials,SearchHostCredential, SearchProviderSettings, SearxngConfig, SecretsConfig, SeltzConfig,- UnknownKeyedSearchProvider, WebSearchConfig,+ UnknownKeyedSearchProvider, WebSearchConfig, COMPOSIO_MODE_BACKEND, COMPOSIO_MODE_DIRECT,+ COMPOSIO_MODE_DISABLED, MANAGED_SEARCH_PROVIDERS, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED,+ SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT,+ SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS,+ SEARCH_ROLE_SEARCH,};pub use update::{UpdateConfig, UpdateRestartStrategy};pub use web_chat_config::WebChatConfig;@@ -176,8 +177,8 @@ pub mod voice_live;pub mod voice_providers;pub use voice_live::LiveVoiceConfig;pub use voice_providers::{- BUILTIN_VOICE_PROVIDERS, BuiltinVoiceProvider, VoiceCapability, VoiceProviderCreds,- generate_voice_provider_id, is_voice_slug_reserved,+ generate_voice_provider_id, is_voice_slug_reserved, BuiltinVoiceProvider, VoiceCapability,+ VoiceProviderCreds, BUILTIN_VOICE_PROVIDERS,};mod types;pub(crate) use types::ConfigDocumentSnapshot;diff --git a/crates/openhuman-core/src/config/schema/tools/browser_tests.rs b/crates/openhuman-core/src/config/schema/tools/browser_tests.rsindex cd562adaaf..fbc171e7e9 100644--- a/crates/openhuman-core/src/config/schema/tools/browser_tests.rs+++ b/crates/openhuman-core/src/config/schema/tools/browser_tests.rs@@ -45,11 +45,9 @@ fn unknown_unattended_names_are_reported_and_never_allow_anything() {assert!(!config.allows_unattended("navigate"));assert!(!config.allows_unattended("hover"));assert!(!config.allows_unattended("*"));- assert!(- with_unattended(&["double_click", "select", "check"])- .unknown_unattended_actions()- .is_empty()- );+ assert!(with_unattended(&["double_click", "select", "check"])+ .unknown_unattended_actions()+ .is_empty());}#[test]diff --git a/crates/openhuman-core/src/config/schema/tools/mod.rs b/crates/openhuman-core/src/config/schema/tools/mod.rsindex c747cfb3ac..fcda1d5afe 100644--- a/crates/openhuman-core/src/config/schema/tools/mod.rs+++ b/crates/openhuman-core/src/config/schema/tools/mod.rs@@ -10,9 +10,9 @@ pub mod search;pub use browser::{BrowserComputerUseConfig, BrowserConfig};pub use http::{CurlConfig, HttpRequestConfig};pub use integrations::{- COMPOSIO_MODE_BACKEND, COMPOSIO_MODE_DIRECT, COMPOSIO_MODE_DISABLED, ComposioConfig,- ComposioDirectBaseUrls, ComposioHostCredential, IntegrationToggle, IntegrationsConfig,- SecretsConfig,+ ComposioConfig, ComposioDirectBaseUrls, ComposioHostCredential, IntegrationToggle,+ IntegrationsConfig, SecretsConfig, COMPOSIO_MODE_BACKEND, COMPOSIO_MODE_DIRECT,+ COMPOSIO_MODE_DISABLED,};pub use mcp::{GitbooksConfig, HttpHeader, McpAuthConfig, McpClientConfig, McpClientIdentityConfig,@@ -20,10 +20,10 @@ pub use mcp::{};pub use multimodal::{MultimodalConfig, MultimodalFileConfig};pub use search::{- LegacySearchInputs, MANAGED_SEARCH_PROVIDERS, PresentationMode, ProviderRoute,- SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED,- SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS,- SEARCH_ROLE_ANSWER, SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH, SEARCH_ROLES, SearchConfig,- SearchEngineCredentials, SearchHostCredential, SearchProviderSettings, SearxngConfig,- SeltzConfig, UnknownKeyedSearchProvider, WebSearchConfig,+ LegacySearchInputs, PresentationMode, ProviderRoute, SearchConfig, SearchEngineCredentials,+ SearchHostCredential, SearchProviderSettings, SearxngConfig, SeltzConfig,+ UnknownKeyedSearchProvider, WebSearchConfig, MANAGED_SEARCH_PROVIDERS, SEARCH_ENGINE_BRAVE,+ SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL,+ SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLES, SEARCH_ROLE_ANSWER,+ SEARCH_ROLE_CONTENTS, SEARCH_ROLE_SEARCH,};diff --git a/crates/openhuman-core/src/config/schema/tools/search.rs b/crates/openhuman-core/src/config/schema/tools/search.rsindex 609bc5078b..d60dda8655 100644--- a/crates/openhuman-core/src/config/schema/tools/search.rs+++ b/crates/openhuman-core/src/config/schema/tools/search.rs@@ -202,7 +202,11 @@ impl SearchEngineCredentials {pub fn key(&self) -> Option<&str> {self.api_key.as_deref().and_then(|s| {let t = s.trim();- if t.is_empty() { None } else { Some(t) }+ if t.is_empty() {+ None+ } else {+ Some(t)+ }})}}diff --git a/crates/openhuman-core/src/config/schema/tools/search_migrate.rs b/crates/openhuman-core/src/config/schema/tools/search_migrate.rsindex 08c2efd4bc..112f536dab 100644--- a/crates/openhuman-core/src/config/schema/tools/search_migrate.rs+++ b/crates/openhuman-core/src/config/schema/tools/search_migrate.rs@@ -5,10 +5,10 @@use std::collections::BTreeMap;use super::{- LegacySearchInputs, ProviderRoute, SEARCH_ENGINE_BRAVE, SEARCH_ENGINE_DISABLED,- SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL, SEARCH_ENGINE_QUERIT,- SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLE_SEARCH, SEARCH_SCHEMA_PROVIDERS,- SEARCH_SCHEMA_VERSION, SearchConfig, SearchProviderSettings,+ LegacySearchInputs, ProviderRoute, SearchConfig, SearchProviderSettings, SEARCH_ENGINE_BRAVE,+ SEARCH_ENGINE_DISABLED, SEARCH_ENGINE_EXA, SEARCH_ENGINE_MANAGED, SEARCH_ENGINE_PARALLEL,+ SEARCH_ENGINE_QUERIT, SEARCH_ENGINE_TAVILY, SEARCH_PROVIDERS, SEARCH_ROLE_SEARCH,+ SEARCH_SCHEMA_PROVIDERS, SEARCH_SCHEMA_VERSION,};impl SearchConfig {diff --git a/crates/openhuman-core/src/config/schema/types/defaults.rs b/crates/openhuman-core/src/config/schema/types/defaults.rsindex 36e3bc2315..964a33b4be 100644--- a/crates/openhuman-core/src/config/schema/types/defaults.rs+++ b/crates/openhuman-core/src/config/schema/types/defaults.rs@@ -4,8 +4,8 @@ use directories::UserDirs;use std::collections::HashMap;use std::path::PathBuf;-use super::config::DEFAULT_TEMPERATURE;use super::config::default_temperature_unsupported_models;+use super::config::DEFAULT_TEMPERATURE;use crate::config::schema::*;impl Default for Config {diff --git a/crates/openhuman-core/src/config/schemas/controllers/agent.rs b/crates/openhuman-core/src/config/schemas/controllers/agent.rsindex fa3110b799..7c294eed5e 100644--- a/crates/openhuman-core/src/config/schemas/controllers/agent.rs+++ b/crates/openhuman-core/src/config/schemas/controllers/agent.rs@@ -7,9 +7,9 @@ use crate::config::rpc as config_rpc;use crate::core::all::ControllerFuture;use super::super::helpers::{- AgentSettingsUpdate, AutonomySettingsUpdate, BrowserSettingsUpdate, ComputerSettingsUpdate,- PrivacyModeUpdate, SandboxSettingsUpdate, SetBrowserAllowAllParams, deserialize_params,- to_json,+ deserialize_params, to_json, AgentSettingsUpdate, AutonomySettingsUpdate,+ BrowserSettingsUpdate, ComputerSettingsUpdate, PrivacyModeUpdate, SandboxSettingsUpdate,+ SetBrowserAllowAllParams,};pub(crate) fn handle_get_autonomy_settings(diff --git a/crates/openhuman-core/src/config/schemas/controllers/inference.rs b/crates/openhuman-core/src/config/schemas/controllers/inference.rsindex 93bc61ac27..8e911e9250 100644--- a/crates/openhuman-core/src/config/schemas/controllers/inference.rs+++ b/crates/openhuman-core/src/config/schemas/controllers/inference.rs@@ -7,8 +7,8 @@ use crate::config::rpc as config_rpc;use crate::core::all::ControllerFuture;use super::super::helpers::{- LocalAiSettingsUpdate, MemorySettingsUpdate, ModelSettingsUpdate, RuntimeSettingsUpdate,- deserialize_params, to_json,+ deserialize_params, to_json, LocalAiSettingsUpdate, MemorySettingsUpdate, ModelSettingsUpdate,+ RuntimeSettingsUpdate,};pub(super) fn handle_get_config(ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {diff --git a/crates/openhuman-core/src/config/schemas/controllers/integrations.rs b/crates/openhuman-core/src/config/schemas/controllers/integrations.rsindex 26c90b2834..544175915c 100644--- a/crates/openhuman-core/src/config/schemas/controllers/integrations.rs+++ b/crates/openhuman-core/src/config/schemas/controllers/integrations.rs@@ -6,7 +6,7 @@ use serde_json::{Map, Value};use crate::config::rpc as config_rpc;use crate::core::all::ControllerFuture;-use super::super::helpers::{ComposioTriggerSettingsUpdate, deserialize_params, to_json};+use super::super::helpers::{deserialize_params, to_json, ComposioTriggerSettingsUpdate};pub(super) fn handle_update_search_settings(ctx: DispatchCtx,diff --git a/crates/openhuman-core/src/config/schemas/controllers/registry.rs b/crates/openhuman-core/src/config/schemas/controllers/registry.rsindex 5157bf2d05..66214f8e02 100644--- a/crates/openhuman-core/src/config/schemas/controllers/registry.rs+++ b/crates/openhuman-core/src/config/schemas/controllers/registry.rs@@ -1,7 +1,7 @@//! Controller registry for the `config` namespace: schema list and handler wiring.-use crate::core::ControllerSchema;use crate::core::all::RegisteredController;+use crate::core::ControllerSchema;use super::super::schema_defs::schemas;use super::agent::{diff --git a/crates/openhuman-core/src/config/schemas/controllers/workspace.rs b/crates/openhuman-core/src/config/schemas/controllers/workspace.rsindex 16e24f51e3..19d229ec9e 100644--- a/crates/openhuman-core/src/config/schemas/controllers/workspace.rs+++ b/crates/openhuman-core/src/config/schemas/controllers/workspace.rs@@ -7,9 +7,9 @@ use crate::config::rpc as config_rpc;use crate::core::all::ControllerFuture;use super::super::helpers::{- AgentPathsUpdate, AnalyticsSettingsUpdate, DEFAULT_ONBOARDING_FLAG_NAME,+ deserialize_params, to_json, AgentPathsUpdate, AnalyticsSettingsUpdate,OnboardingCompletedSetParams, UserTimezoneUpdate, WorkspaceOnboardingFlagParams,- WorkspaceOnboardingFlagSetParams, deserialize_params, to_json,+ WorkspaceOnboardingFlagSetParams, DEFAULT_ONBOARDING_FLAG_NAME,};pub(super) fn handle_workspace_onboarding_flag_exists(diff --git a/crates/openhuman-core/src/config/schemas/helpers.rs b/crates/openhuman-core/src/config/schemas/helpers.rsindex c3da77ee58..c0753faa80 100644--- a/crates/openhuman-core/src/config/schemas/helpers.rs+++ b/crates/openhuman-core/src/config/schemas/helpers.rs@@ -1,5 +1,5 @@-use serde::Deserialize;use serde::de::{DeserializeOwned, Deserializer};+use serde::Deserialize;use serde_json::{Map, Value};use crate::core::Outcome;diff --git a/crates/openhuman-core/src/config/schemas/mod.rs b/crates/openhuman-core/src/config/schemas/mod.rsindex 914127e9ae..12aaaa34b9 100644--- a/crates/openhuman-core/src/config/schemas/mod.rs+++ b/crates/openhuman-core/src/config/schemas/mod.rs@@ -51,10 +51,9 @@ use controllers::{};#[cfg(test)]use helpers::{- AutonomySettingsUpdate, DEFAULT_ONBOARDING_FLAG_NAME, LocalAiSettingsUpdate,- MemorySettingsUpdate, ModelSettingsUpdate, OnboardingCompletedSetParams,- SetBrowserAllowAllParams, WorkspaceOnboardingFlagParams, WorkspaceOnboardingFlagSetParams,- deserialize_params,+ deserialize_params, AutonomySettingsUpdate, LocalAiSettingsUpdate, MemorySettingsUpdate,+ ModelSettingsUpdate, OnboardingCompletedSetParams, SetBrowserAllowAllParams,+ WorkspaceOnboardingFlagParams, WorkspaceOnboardingFlagSetParams, DEFAULT_ONBOARDING_FLAG_NAME,};#[cfg(test)]use serde_json::{Map, Value};diff --git a/crates/openhuman-core/src/config/workspace/ops_tests.rs b/crates/openhuman-core/src/config/workspace/ops_tests.rsindex a6bcd71a56..aa099db4f0 100644--- a/crates/openhuman-core/src/config/workspace/ops_tests.rs+++ b/crates/openhuman-core/src/config/workspace/ops_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::config::TEST_ENV_LOCK as ENV_LOCK;use crate::config::test_env::EnvVarGuard;+use crate::config::TEST_ENV_LOCK as ENV_LOCK;use crate::core::runtime::DispatchCtx;use tempfile::tempdir;diff --git a/crates/openhuman-core/src/config/workspace/schemas.rs b/crates/openhuman-core/src/config/workspace/schemas.rsindex 9d58fb1082..ab3bed0cf2 100644--- a/crates/openhuman-core/src/config/workspace/schemas.rs+++ b/crates/openhuman-core/src/config/workspace/schemas.rs@@ -3,8 +3,8 @@ use serde::de::DeserializeOwned;use serde_json::{Map, Value};use crate::config::workspace::rpc as workspace_rpc;-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/config/workspace/state.rs b/crates/openhuman-core/src/config/workspace/state.rsindex 850ae2b736..32755bf4ec 100644--- a/crates/openhuman-core/src/config/workspace/state.rs+++ b/crates/openhuman-core/src/config/workspace/state.rs@@ -8,7 +8,7 @@use std::path::{Path, PathBuf};use std::sync::Arc;-use anyhow::{Context, Result, anyhow};+use anyhow::{anyhow, Context, Result};use serde::{Deserialize, Serialize};use serde_json::Value;use sha2::{Digest, Sha256};diff --git a/crates/openhuman-core/src/config/workspace/tools.rs b/crates/openhuman-core/src/config/workspace/tools.rsindex 0176fd663e..a94071e838 100644--- a/crates/openhuman-core/src/config/workspace/tools.rs+++ b/crates/openhuman-core/src/config/workspace/tools.rs@@ -11,10 +11,10 @@use std::sync::Arc;use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};-use crate::config::Config;use crate::config::workspace::{ops, rpc};+use crate::config::Config;use tinytools::{PermissionLevel, Tool, ToolResult};fn req_str(args: &serde_json::Value, key: &str) -> anyhow::Result<String> {diff --git a/crates/openhuman-core/src/config/workspace_handle_tests.rs b/crates/openhuman-core/src/config/workspace_handle_tests.rsindex 885b381f5c..15da13d953 100644--- a/crates/openhuman-core/src/config/workspace_handle_tests.rs+++ b/crates/openhuman-core/src/config/workspace_handle_tests.rs@@ -1,6 +1,6 @@use std::path::{Path, PathBuf};-use super::{HANDLE_HEX_LEN, HANDLE_PREFIX, workspace_handle};+use super::{workspace_handle, HANDLE_HEX_LEN, HANDLE_PREFIX};#[test]fn handle_is_stable_for_the_same_directory() {diff --git a/crates/openhuman-core/src/inference/provider/factory.rs b/crates/openhuman-core/src/inference/provider/factory.rsindex 2b06f763a4..05aae9e577 100644--- a/crates/openhuman-core/src/inference/provider/factory.rs+++ b/crates/openhuman-core/src/inference/provider/factory.rs@@ -22,13 +22,13 @@ mod managed_backend;mod routing;mod subprocess_providers;-pub(crate) use chat_model::{OpenHumanModelFactory, resolves_to_managed_backend};pub use chat_model::{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,};+pub(crate) use chat_model::{resolves_to_managed_backend, OpenHumanModelFactory};pub(crate) use cloud_slug::resolve_cloud_slug_for;-pub(crate) use cloud_spec::{CloudCredentialResolver, cloud_provider_spec};+pub(crate) use cloud_spec::{cloud_provider_spec, CloudCredentialResolver};pub use credentials::{auth_key_for_slug, lookup_key_for_slug};pub(crate) use credentials::{openai_bearer_is_oauth, redact_endpoint_origin, resolve_codex_routing,@@ -39,8 +39,8 @@ pub(crate) use inspection::{};pub(crate) use local_runtime::create_local_chat_model_from_string;pub(crate) use routing::fallback_diagnostics_for_role;-pub(crate) use routing::{ConfigRouteSource, workload_router};pub use routing::{provider_for_role, role_bypasses_managed_credits};+pub(crate) use routing::{workload_router, ConfigRouteSource};// Factory-internal helpers shared across the implementation modules.use access_gates::{emit_inference_egress, enforce_local_only_inference};@@ -68,8 +68,8 @@ 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::config::Config;use crate::security::egress::EgressLedger;use std::sync::Arc;use tinyinference_llm::model::ChatModel;diff --git a/crates/openhuman-core/src/inference/provider/factory/chat_model.rs b/crates/openhuman-core/src/inference/provider/factory/chat_model.rsindex 1ec02ce53d..2e740cb59c 100644--- a/crates/openhuman-core/src/inference/provider/factory/chat_model.rs+++ b/crates/openhuman-core/src/inference/provider/factory/chat_model.rs@@ -4,8 +4,6 @@#[cfg(any(test, feature = "e2e-test-support", feature = "rss-bench"))]use super::test_provider_override;use super::{- BYOK_INCOMPLETE_SENTINEL, CLAUDE_AGENT_SDK_PREFIX, CLAUDE_AGENT_SDK_PROVIDER,- PROVIDER_OPENHUMAN,access_gates::{emit_inference_egress, enforce_local_only_inference},cloud_slug::{resolve_cloud_slug_for, resolve_cloud_slug_with_access,@@ -15,9 +13,11 @@ use super::{local_runtime::try_create_local_runtime_chat_model_from_string,provider_for_role,subprocess_providers::OpenHumanMcpEndpoint,+ BYOK_INCOMPLETE_SENTINEL, CLAUDE_AGENT_SDK_PREFIX, CLAUDE_AGENT_SDK_PROVIDER,+ PROVIDER_OPENHUMAN,};-use crate::config::Config;use crate::config::ops::resolve_primary_cloud_provider_string;+use crate::config::Config;use crate::core::runtime::DispatchCtx;use crate::security::egress::EgressLedger;use std::sync::Arc;diff --git a/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs b/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rsindex 50818beda2..e29d4a46e0 100644--- a/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs+++ b/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs@@ -2,15 +2,15 @@//! abstract-tier remapping, credentials, codex routing) and the crate-native builders.use super::{- BYOK_INCOMPLETE_SENTINEL, CLAUDE_AGENT_SDK_PREFIX, CLAUDE_AGENT_SDK_PROVIDER,- InspectionOutputBudgetCapability, PROVIDER_OPENHUMAN,access_gates::enforce_local_only_inference, cloud_spec, credentials::CredentialAccess,local_runtime::OptionalChatModelResult, managed_backend::managed_chat_model_for,openai_bearer_is_oauth, provider_for_role, redact_endpoint_origin, resolve_codex_routing,+ InspectionOutputBudgetCapability, BYOK_INCOMPLETE_SENTINEL, CLAUDE_AGENT_SDK_PREFIX,+ CLAUDE_AGENT_SDK_PROVIDER, PROVIDER_OPENHUMAN,};-use crate::config::Config;use crate::config::ops::resolve_primary_cloud_provider_string;use crate::config::schema::cloud_providers::AuthStyle;+use crate::config::Config;#[cfg(not(test))]use crate::inference::provider::factory::access_gates::verify_backend_session_active;#[cfg(not(test))]@@ -22,8 +22,8 @@ use std::sync::Arc;use tinyinference_llm::model::ChatModel;use tinyinference_llm::providers::anthropic::endpoint_is_anthropic_messages;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::registry::resolve_slug_model;use tinyinference_providers::route::split_model_and_temperature;diff --git a/crates/openhuman-core/src/inference/provider/factory/cloud_spec.rs b/crates/openhuman-core/src/inference/provider/factory/cloud_spec.rsindex 7d65d86e5b..15af5e2e6d 100644--- a/crates/openhuman-core/src/inference/provider/factory/cloud_spec.rs+++ b/crates/openhuman-core/src/inference/provider/factory/cloud_spec.rs@@ -9,8 +9,8 @@//! provider with a custom CA bundle.use super::*;-use tinyinference_llm::providers::openai::AuthStyle as CompatAuthStyle;use tinyinference_llm::providers::openai::codex::OpenAiCodexRouting;+use tinyinference_llm::providers::openai::AuthStyle as CompatAuthStyle;use tinyinference_llm::providers::registry::{ProviderBuildOptions, ProviderRegistry};use tinyinference_llm::{ProviderKind, ProviderSpec};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 4abd9bcca4..e77502eb88 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@@ -78,12 +78,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/inspection.rs b/crates/openhuman-core/src/inference/provider/factory/inspection.rsindex 0638032f7d..c6dae846c3 100644--- a/crates/openhuman-core/src/inference/provider/factory/inspection.rs+++ b/crates/openhuman-core/src/inference/provider/factory/inspection.rs@@ -1,7 +1,6 @@//! Read-only provider preparation for doctor inspections.use super::{- InspectionOutputBudgetCapability, InspectionRequestIdentity, PreparedInspectionChatModel,chat_model::{resolves_to_managed_backend, unresolved_chat_model_error_for_access,with_default_temperature,@@ -15,9 +14,10 @@ use super::{try_create_claude_agent_sdk_chat_model_for_inspection,try_create_claude_code_chat_model_for_inspection,},+ InspectionOutputBudgetCapability, InspectionRequestIdentity, PreparedInspectionChatModel,};-use crate::config::Config;use crate::config::resolve_primary_cloud_provider_string;+use crate::config::Config;use crate::core::runtime::DispatchCtx;use crate::security::egress::EgressLedger;use std::sync::Arc;diff --git a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rsindex a9772a3d86..370e5bb93f 100644--- a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs+++ b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs@@ -3,8 +3,8 @@use super::*;use crate::inference::provider::factory::access_gates::verify_provider_session;-use tinyinference_llm::providers::openai::AuthStyle as CompatAuthStyle;use tinyinference_llm::providers::openai::build_local_runtime_chat_model;+use tinyinference_llm::providers::openai::AuthStyle as CompatAuthStyle;/// Local OpenAI-compatible runtimes (Ollama / LM Studio / MLX / OMLX //// local-openai) as a crate-native [`ChatModel`] (issue #4727).@@ -79,7 +79,7 @@ fn try_create_local_runtime_chat_model_from_string_with_identity(inspection_identity: Option<&mut Option<(String, String, String)>>,) -> 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/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_crate_native_cloud_tests.rs b/crates/openhuman-core/src/inference/provider/factory_crate_native_cloud_tests.rsindex 0be74bcf34..03a57b3bfa 100644--- a/crates/openhuman-core/src/inference/provider/factory_crate_native_cloud_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_crate_native_cloud_tests.rs@@ -1,8 +1,8 @@-use super::super::super::OpenHumanModelFactory;use super::super::super::cloud_slug::{try_create_cloud_slug_chat_model, try_create_cloud_slug_chat_model_from_string,try_create_cloud_slug_chat_model_from_string_with_native_tools,};+use super::super::super::OpenHumanModelFactory;use super::super::{anthropic_entry, deepseek_entry, install_test_managed_provider, oh_entry, openai_entry,};@@ -148,11 +148,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_crate_native_tests.rs b/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rsindex 6f4cc8586f..e537d2f839 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@@ -135,11 +135,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.@@ -375,27 +373,23 @@ fn explicit_local_provider_string_routes_to_crate_native_model() {fn try_create_local_runtime_returns_none_for_managed_and_cloud() {let _guard = crate::inference::inference_test_guard();// Default config resolves to the managed backend, not a local runtime.- assert!(- super::local_runtime::try_create_local_runtime_chat_model(- "chat",- &Config::default(),- &EgressLedger::none(),- )- .is_none()- );+ assert!(super::local_runtime::try_create_local_runtime_chat_model(+ "chat",+ &Config::default(),+ &EgressLedger::none(),+ )+ .is_none());// A BYOK cloud slug is not a local runtime either — it falls through to the// `Provider` path.let mut cloud = Config::default();cloud.cloud_providers.push(openai_entry("p_oai", "openai"));cloud.chat_provider = Some("openai:gpt-4o-mini".to_string());- assert!(- super::local_runtime::try_create_local_runtime_chat_model(- "chat",- &cloud,- &EgressLedger::none(),- )- .is_none()- );+ assert!(super::local_runtime::try_create_local_runtime_chat_model(+ "chat",+ &cloud,+ &EgressLedger::none(),+ )+ .is_none());}#[test]@@ -479,11 +473,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_explicit_ctx_tests.rs b/crates/openhuman-core/src/inference/provider/factory_explicit_ctx_tests.rsindex 63b61e4422..dfe26a72b1 100644--- a/crates/openhuman-core/src/inference/provider/factory_explicit_ctx_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_explicit_ctx_tests.rs@@ -8,8 +8,8 @@ async fn managed_factory_and_probe_use_the_explicit_provider_entry() {use crate::core::runtime::{CoreContext, DispatchCtx, DomainSet};use crate::core::slots::Extensions;use crate::inference::registry::ProviderContext;- use std::sync::Arc;use std::sync::atomic::{AtomicBool, Ordering};+ use std::sync::Arc;use tinyinference_llm::message::Message;use tinyinference_llm::model::ModelRequest;@@ -132,11 +132,11 @@ async fn managed_factory_and_probe_use_the_explicit_provider_entry() {#[tokio::test]async fn hosted_cloud_slug_uses_explicit_auth_policy_and_model_entry() {use crate::config::schema::cloud_providers::{- AuthStyle, CloudProviderCreds, register_hosted_cloud_provider_policy_in,+ register_hosted_cloud_provider_policy_in, AuthStyle, CloudProviderCreds,};use crate::core::runtime::{CoreContext, DispatchCtx, DomainSet};use crate::core::slots::Extensions;- use crate::inference::registry::{ProviderContext, register_catalog_in};+ use crate::inference::registry::{register_catalog_in, ProviderContext};use std::sync::Arc;use tinyinference_llm::message::Message;use tinyinference_llm::model::ModelRequest;diff --git a/crates/openhuman-core/src/inference/provider/factory_tests.rs b/crates/openhuman-core/src/inference/provider/factory_tests.rsindex 25806f7f31..b0f0358172 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;use wiremock::matchers::{method, path};@@ -403,13 +403,11 @@ async fn inspection_construction_does_not_refresh_unselected_expired_codex_oauth).expect("named OAuth profile is readable without refreshing").expect("expired OAuth profile exists");- assert!(- oauth- .token_set- .as_ref()- .and_then(|token_set| token_set.expires_at)- .is_some_and(|expires_at| expires_at < Utc::now())- );+ assert!(oauth+ .token_set+ .as_ref()+ .and_then(|token_set| token_set.expires_at)+ .is_some_and(|expires_at| expires_at < Utc::now()));let selected_codex_credential =super::credentials::lookup_key_for_slug_read_only("openai", &config).expect("read selected OpenAI API-key credential");@@ -481,13 +479,11 @@ async fn inspection_construction_does_not_refresh_unselected_expired_codex_oauthSome("expired-oauth-access-token"),"inspection must not replace an expired token with a refreshed one");- assert!(- oauth_after- .token_set- .as_ref()- .and_then(|token_set| token_set.expires_at)- .is_some_and(|expires_at| expires_at < Utc::now())- );+ assert!(oauth_after+ .token_set+ .as_ref()+ .and_then(|token_set| token_set.expires_at)+ .is_some_and(|expires_at| expires_at < Utc::now()));}#[tokio::test(flavor = "multi_thread")]@@ -597,7 +593,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_model_tests.rs b/crates/openhuman-core/src/inference/provider_model_tests.rsindex 5d6cddd054..047425a6b1 100644--- a/crates/openhuman-core/src/inference/provider_model_tests.rs+++ b/crates/openhuman-core/src/inference/provider_model_tests.rs@@ -224,7 +224,7 @@ fn registered_model_defaults_and_aliases_are_context_scoped() {fn native_provider_metadata_resolves_by_context_and_preserves_request_fields() {use crate::core::slots::Extensions;use crate::inference::registry::{- ProviderContext, register_chat_model, register_chat_model_in, unregister_chat_model,+ register_chat_model, register_chat_model_in, unregister_chat_model, ProviderContext,};use serde_json::json;use std::sync::Arc;@@ -397,7 +397,7 @@ fn native_provider_metadata_resolves_by_context_and_preserves_request_fields() {#[test]fn managed_builder_uses_the_entry_selected_before_metadata_resolution() {use crate::core::slots::Extensions;- use crate::inference::registry::{ProviderContext, register_chat_model_in};+ use crate::inference::registry::{register_chat_model_in, ProviderContext};use std::sync::Arc;let _guard = crate::inference::inference_test_guard();diff --git a/crates/openhuman-core/src/media/generation/artifact_tool.rs b/crates/openhuman-core/src/media/generation/artifact_tool.rsindex 4178378e61..b6756fbe4f 100644--- a/crates/openhuman-core/src/media/generation/artifact_tool.rs+++ b/crates/openhuman-core/src/media/generation/artifact_tool.rs@@ -9,7 +9,7 @@ use std::sync::{Arc, RwLock};use async_trait::async_trait;use futures_util::StreamExt;-use serde_json::{Value, json};+use serde_json::{json, Value};use tinyagents_harness_tools::media::{ArtifactFiling, FiledArtifact, GeneratedArtifact, MediaArtifactKind, MediaInnerFactory,MediaProgressFn,@@ -20,8 +20,8 @@ use tinytools::{};use tokio::io::AsyncWriteExt;-use crate::artifacts::ArtifactKind;use crate::artifacts::production::Production;+use crate::artifacts::ArtifactKind;use tinystoragedrivers_api::BlobStore;/// A host adapter that retains OpenHuman artifact behavior while delegating@@ -121,9 +121,9 @@ impl<T: Tool + 'static> MediaArtifactTool<T> {pub fn with_per_call_inner(self,build: impl for<'a> Fn(MediaProgressFn, Option<&'a dyn ToolRunContext>) -> T- + Send- + Sync- + 'static,+ + Send+ + Sync+ + 'static,) -> Self {let Self {inner,diff --git a/crates/openhuman-core/src/media/generation/artifact_tool_tests.rs b/crates/openhuman-core/src/media/generation/artifact_tool_tests.rsindex 169829956f..6aa04f26a6 100644--- a/crates/openhuman-core/src/media/generation/artifact_tool_tests.rs+++ b/crates/openhuman-core/src/media/generation/artifact_tool_tests.rs@@ -1,5 +1,5 @@use async_trait::async_trait;-use serde_json::{Value, json};+use serde_json::{json, Value};use std::path::Path;use std::sync::Arc;use tinyagents_harness::media::MediaOutput;@@ -8,7 +8,7 @@ use tinystoragedrivers_api::BlobStore;use tinytools::{PermissionLevel, Tool, ToolCategory, ToolContent, ToolResult};use super::{- MediaArtifactTool, OpenHumanArtifactFiling, copy_blob_to_file, has_reusable_files_reference,+ copy_blob_to_file, has_reusable_files_reference, MediaArtifactTool, OpenHumanArtifactFiling,};use crate::artifacts::{ArtifactKind, ArtifactStatus, FileRoots};@@ -65,11 +65,10 @@ async fn artifact_history_refresh_failure_fails_closed_for_cached_files() {.with_reference_allowlist(Arc::clone(&allowed));assert!(allowed.lock().unwrap().contains(&replacement));- assert!(- tool.execute(json!({ "references": [replacement.to_string_lossy()] }))- .await- .is_err()- );+ assert!(tool+ .execute(json!({ "references": [replacement.to_string_lossy()] }))+ .await+ .is_err());}/// A minimal stand-in for `GenerateImageTool` / `GenerateVideoTool`: writes@@ -211,13 +210,11 @@ async fn files_a_blob_backed_generated_artifact() {Some(format!("Saved image at {}\nCost: $0.01", canonical_file.display()).as_str()));assert_eq!(std::fs::read(&file).unwrap(), b"blob-media-bytes");- assert!(- blobs- .get("generated-media/stub-0.png")- .await- .unwrap()- .is_none()- );+ assert!(blobs+ .get("generated-media/stub-0.png")+ .await+ .unwrap()+ .is_none());let (_, failed_file) = crate::artifacts::create_artifact_for_call(&workspace,@@ -280,15 +277,13 @@ async fn files_a_blob_backed_generated_artifact() {"failed regeneration retains the previous non-empty file");fresh.refresh_allowed_references().await.unwrap();- assert!(- !fresh- .allowed_references- .as_ref()- .unwrap()- .lock()- .unwrap()- .contains(&canonical_file)- );+ assert!(!fresh+ .allowed_references+ .as_ref()+ .unwrap()+ .lock()+ .unwrap()+ .contains(&canonical_file));}#[tokio::test]@@ -432,11 +427,10 @@ async fn files_every_artifact_when_n_greater_than_one() {.await.expect("artifact metadata is persisted");assert_eq!(meta.status, ArtifactStatus::Ready);- assert!(- meta.file- .as_deref()- .is_some_and(|file| std::path::Path::new(file).exists())- );+ assert!(meta+ .file+ .as_deref()+ .is_some_and(|file| std::path::Path::new(file).exists()));}}diff --git a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rsindex 019a22e988..d9964d8303 100644--- a/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs+++ b/crates/openhuman-core/src/skills/e2e_plumbing_tests.rs@@ -30,7 +30,7 @@ use parking_lot::Mutex;use crate::channels::run_channel_turn;use crate::config::{Config, MultimodalConfig, MultimodalFileConfig};use crate::skills::ops_create::{- CreateWorkflowParams, WorkflowCreateInputDef, create_workflow_inner,+ create_workflow_inner, CreateWorkflowParams, WorkflowCreateInputDef,};use crate::skills::registry::get_workflow;use crate::skills::run_log;diff --git a/crates/openhuman-core/src/storage/sessions/tenant_router.rs b/crates/openhuman-core/src/storage/sessions/tenant_router.rsindex 75217cdaa6..224ad77ea2 100644--- a/crates/openhuman-core/src/storage/sessions/tenant_router.rs+++ b/crates/openhuman-core/src/storage/sessions/tenant_router.rs@@ -121,10 +121,9 @@ impl TenantSessionStores {let tenant_for_conditioned_factory = tenant.clone();let conditioned_factory: ConditionedAgentStorageFactory =Arc::new(move |agent_id, condition| {- let owner_scope = crate::storage::scope::Scope::new(- tenant_for_conditioned_factory.as_str(),- )?- .agent(agent_id)?;+ let owner_scope =+ crate::storage::scope::Scope::new(tenant_for_conditioned_factory.as_str())?+ .agent(agent_id)?;let scope = PortScope::new(owner_scope.as_str())?;let storage = backend.for_scope_conditioned(&owner_scope, condition)?;Ok(ScopedStorage::new(storage, scope))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 2a6abba9b6..2667860162 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@@ -2,10 +2,10 @@//! Python encoding defaults used by OpenHuman's runtime adapter.use super::*;-use crate::tools::ShellTool;use crate::modules::tinybox::host_runtime::{host_shell_flavor, ShellFlavor};#[cfg(feature = "modules")]use crate::tools::system::shell_support::{python_env_defaults, PYTHON_ENV_DEFAULTS};+use crate::tools::ShellTool;use std::collections::HashMap;use std::ffi::OsString;diff --git a/crates/openhuman-core/src/tools/ops_tests.rs b/crates/openhuman-core/src/tools/ops_tests.rsindex ece8b45aa3..26d404ba0d 100644--- a/crates/openhuman-core/src/tools/ops_tests.rs+++ b/crates/openhuman-core/src/tools/ops_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::config::{BrowserConfig, Config};+use crate::security::credentials::{AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME};use crate::security::AuditLogger;-use crate::security::credentials::{APP_SESSION_PROVIDER, AuthService, DEFAULT_AUTH_PROFILE_NAME};use crate::tools::ops::{all_tools, tool_group};use tempfile::TempDir;use tinytools::ToolContent;diff --git a/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs b/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rsindex 8f00bee316..15af6b8c9b 100644--- a/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs+++ b/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs@@ -354,8 +354,8 @@ fn memory_tool_classifies_as_memory_family() {/// A narrowed DomainSet axis still keeps the ordinary platform tools.#[tokio::test]async fn full_domain_set_keeps_platform_tools() {- use crate::core::runtime::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 421b6c5fa4..688e6ad5f7 100644--- a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs+++ b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs@@ -27,11 +27,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.///@@ -418,11 +416,9 @@ fn all_tools_default_registry_contains_expected_baseline_surface() {"image_info",];assert_contains_all(&names, &expected);- assert!(- !names- .iter()- .any(|name| matches!(name.as_str(), "wait" | "wait_loop"))- );+ assert!(!names+ .iter()+ .any(|name| matches!(name.as_str(), "wait" | "wait_loop")));}#[test]fn all_tools_default_registry_has_no_duplicate_tool_names() {diff --git a/crates/openhuman-core/src/triage/escalation_model_tests.rs b/crates/openhuman-core/src/triage/escalation_model_tests.rsindex bf0bfc695d..66bf72e660 100644--- a/crates/openhuman-core/src/triage/escalation_model_tests.rs+++ b/crates/openhuman-core/src/triage/escalation_model_tests.rs@@ -177,11 +177,9 @@ async fn react_dispatch_keeps_routing_without_creating_child_lifecycle_records().map(|tool| tool.name.as_str()).collect();assert!(tool_names.contains(&"read_workspace_state"));- assert!(- !tool_names- .iter()- .any(|name| { *name == "spawn_subagent" || name.starts_with("delegate_") })- );+ assert!(!tool_names+ .iter()+ .any(|name| { *name == "spawn_subagent" || name.starts_with("delegate_") }));assert!(!tool_names.contains(&"shell"));assert!(!tool_names.contains(&"file_write"));}@@ -302,13 +300,11 @@ async fn direct_turn_model_source_metadata_probe_does_not_duplicate_egress_disclrequests[0].1, model_marker,"the expected model served the turn");- assert!(- requests[0]- .2- .messages- .iter()- .any(|message| { message.text().contains("send this trigger reply") })- );+ assert!(requests[0]+ .2+ .messages+ .iter()+ .any(|message| { message.text().contains("send this trigger reply") }));}let sentinel = "triage-direct-source-egress-sentinel";BUS.publish(crate::core::events::DomainEvent::ExternalTransferPending {@@ -508,11 +504,9 @@ async fn escalate_dispatch_preserves_orchestrator_tools_without_child_delegationtool_names.contains(&"grep"),"the orchestrator keeps its advertised coding tool");- assert!(- !tool_names- .iter()- .any(|name| { *name == "spawn_subagent" || name.starts_with("delegate_") })- );+ assert!(!tool_names+ .iter()+ .any(|name| { *name == "spawn_subagent" || name.starts_with("delegate_") }));}#[tokio::test]