The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed crates/openhuman-core/src/channels/bus/delivery.rs,crates/openhuman-core/src/ch
Steven Enamakelad911e674b1b
diff --git a/crates/openhuman-core/src/channels/bus/delivery.rs b/crates/openhuman-core/src/channels/bus/delivery.rsindex f27402365b..8cdf632c97 100644--- a/crates/openhuman-core/src/channels/bus/delivery.rs+++ b/crates/openhuman-core/src/channels/bus/delivery.rs@@ -2,17 +2,17 @@use crate::backend::{BackendApiError, BackendClient};use crate::modules::channel_runtime::ChannelRuntimeLease;use crate::security::credentials::session_support::{- get_session_token, is_local_session_token, BackendCredential,+ BackendCredential, get_session_token, is_local_session_token,};-use serde_json::json;#[cfg(test)]use serde_json::Value;+use serde_json::json;use tinybus::module::ModuleCallError;use tinychannels_bus::module_progressive::{ProgressiveCommand, ProgressiveEvent, ProgressiveResult, ProgressiveTransportRequest,ProgressiveTransportResult,};-use tinychannels_bus::{methods, ChannelBackendRequest, ChannelBackendResult};+use tinychannels_bus::{ChannelBackendRequest, ChannelBackendResult, methods};/// Transport refusals are typed facts; recovery and retry budgets belong to the module.pub(super) fn map_backend_error(error: anyhow::Error) -> ProgressiveTransportResult {diff --git a/crates/openhuman-core/src/channels/bus/delivery_tests.rs b/crates/openhuman-core/src/channels/bus/delivery_tests.rsindex 9e8d49c9fa..f50da2e333 100644--- a/crates/openhuman-core/src/channels/bus/delivery_tests.rs+++ b/crates/openhuman-core/src/channels/bus/delivery_tests.rs@@ -16,12 +16,14 @@ async fn transport_captures_no_local_or_missing_hosted_credential() {let _env_lock = crate::config::TEST_ENV_LOCK.lock().await;let workspace = tempfile::tempdir().expect("temporary workspace");let _workspace_env = EnvVarGuard::workspace_unlocked(workspace.path());- assert!(ManagedTransport::capture(- &crate::config::Config::default(),- "telegram".into(),- tokio_util::sync::CancellationToken::new()- )- .is_err());+ assert!(+ ManagedTransport::capture(+ &crate::config::Config::default(),+ "telegram".into(),+ tokio_util::sync::CancellationToken::new()+ )+ .is_err()+ );}#[test]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 f71f9a2de1..bffce5fba7 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,10 +15,12 @@ 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 6ecc68b630..e33eb8cc02 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::{- extract_message_id, latest_thinking_snippet, StreamingState,+ StreamingState, extract_message_id, latest_thinking_snippet,};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 92a804ae4b..f8df65b49b 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_runtime::context::{- 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,+ 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,};#[cfg(test)]@@ -23,7 +23,7 @@ pub(crate) use tinychannels_runtime::context::{#[cfg(test)]pub(crate) use tinychannels::context::{- effective_channel_message_timeout_secs, MIN_CHANNEL_MESSAGE_TIMEOUT_SECS,+ MIN_CHANNEL_MESSAGE_TIMEOUT_SECS, effective_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 edbfeeab97..c5dee4251d 100644--- a/crates/openhuman-core/src/channels/context_tests.rs+++ b/crates/openhuman-core/src/channels/context_tests.rs@@ -114,22 +114,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 4371baee33..b9491f04b2 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::{- channel_controller_schema, ChannelControllerField, ChannelControllerFieldType,- ChannelControllerSchema,+ ChannelControllerField, ChannelControllerFieldType, ChannelControllerSchema,+ channel_controller_schema,};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 004644c6e9..c99239ca29 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 d1c223a575..b9edd23f90 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::{json, Value};+use serde_json::{Value, json};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::{find_channel_definition, ChannelAuthMode};+use tinychannels_bus::controllers::{ChannelAuthMode, find_channel_definition};/// Disconnect a channel by removing stored credentials.pub async fn disconnect_channel(diff --git a/crates/openhuman-core/src/channels/controllers/ops/connect/status.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/status.rsindex 9b32b27be5..ba70d0fe33 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::{json, Value};+use serde_json::{Value, json};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 86b970a0aa..281f236073 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::{methods, ChannelControllerRequest, ChannelControllerResult};+use tinychannels_bus::{ChannelControllerRequest, ChannelControllerResult, methods};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 7709d54c4f..957012c7ce 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::{- controllers::{BotPermissionCheck, DiscordGuild, DiscordTextChannel},ChannelControllerRequest,+ controllers::{BotPermissionCheck, DiscordGuild, DiscordTextChannel},};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 253f5dec47..a603f1f955 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@@ -462,10 +462,12 @@ 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 b5f02e8a21..cb9e1c17fa 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::de::DeserializeOwned;use serde::Deserialize;+use serde::de::DeserializeOwned;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 b140482891..41382cbe98 100644--- a/crates/openhuman-core/src/channels/host/channel_events.rs+++ b/crates/openhuman-core/src/channels/host/channel_events.rs@@ -6,8 +6,8 @@ use async_trait::async_trait;use std::collections::HashMap;use std::path::PathBuf;use std::sync::{Arc, Mutex};-use tinybus::module::ModuleClient;use tinybus::EventHandler;+use tinybus::module::ModuleClient;use tinychannels_bus::ChannelMessage;#[derive(Clone)]diff --git a/crates/openhuman-core/src/channels/host/host_tests.rs b/crates/openhuman-core/src/channels/host/host_tests.rsindex a03eb07e33..87b5943afe 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,9 +73,10 @@ 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!({@@ -84,16 +85,19 @@ 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 db5f6564d8..68fa4633ae 100644--- a/crates/openhuman-core/src/channels/host/mod.rs+++ b/crates/openhuman-core/src/channels/host/mod.rs@@ -19,10 +19,10 @@ pub use channel_events::{ChannelApprovalSurfaceSubscriber, ChannelTurnStateSubsc#[cfg(test)]use std::sync::Arc;-#[cfg(test)]-use tinychannels::host::ChannelHostBuilder;#[cfg(test)]use tinychannels::ChannelHost;+#[cfg(test)]+use tinychannels::host::ChannelHostBuilder;#[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 6b433b3aa5..592028bec4 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::{clear_sender_history, ChannelRuntimeContext};+use crate::channels::context::{ChannelRuntimeContext, clear_sender_history};use crate::core::runtime::DispatchCtx;use crate::threads::store::{self as conversations, CreateConversationThread};diff --git a/crates/openhuman-core/src/channels/host/voice.rs b/crates/openhuman-core/src/channels/host/voice.rsindex be4b9ba82a..fc81ff8120 100644--- a/crates/openhuman-core/src/channels/host/voice.rs+++ b/crates/openhuman-core/src/channels/host/voice.rs@@ -5,8 +5,8 @@//! here logs request ids, sizes and durations; transcripts, reply text and//! audio are never logged.-use crate::config::schema::{ChannelVoiceConfig, VoiceReplyMode};use crate::config::Config;+use crate::config::schema::{ChannelVoiceConfig, VoiceReplyMode};use parking_lot::Mutex;use std::collections::VecDeque;use std::sync::Arc;diff --git a/crates/openhuman-core/src/channels/mod.rs b/crates/openhuman-core/src/channels/mod.rsindex 7680f0cda0..f9c4c54592 100644--- a/crates/openhuman-core/src/channels/mod.rs+++ b/crates/openhuman-core/src/channels/mod.rs@@ -4,11 +4,6 @@//! TinyChannels TinyBus module. Serialized configuration, messages, and//! schemas come from `tinychannels-bus`; OpenHuman retains host policy and//! lifecycle orchestration.-#![allow(- deprecated,- reason = "the v21 ChannelMessage/SendMessage shims stay in use here until the single inbound path (senamakel/openhuman#136) moves the host to canonical v22 content"-)]-// Always-compiled carve-outs (see module docs).pub(crate) mod capabilities;pub mod contract_schema;diff --git a/crates/openhuman-core/src/channels/module_fixture_tests.rs b/crates/openhuman-core/src/channels/module_fixture_tests.rsindex dc4ead440f..6701c57247 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::schema::ModuleSourceMode;use crate::config::Config;+use crate::config::schema::ModuleSourceMode;use crate::modules::linked::register_linked;use crate::modules::{ops, runtime};use std::sync::Arc;@@ -140,10 +140,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/providers/relay/mod.rs b/crates/openhuman-core/src/channels/providers/relay/mod.rsindex 725be88e74..d2c9ebde8c 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::{RelayChannel, CHANNEL_OUTBOUND_EVENT};+pub use channel::{CHANNEL_OUTBOUND_EVENT, RelayChannel};pub use ops::channel_relay_inbound;pub use params::{- validate_channel, validate_id, RelayInboundParams, DEFAULT_RELAY_CLIENT_ID, MAX_CHANNEL_LEN,- MAX_ID_LEN, MAX_SENDER_NAME_CHARS, MAX_TEXT_BYTES, RESERVED_CHANNELS,+ DEFAULT_RELAY_CLIENT_ID, MAX_CHANNEL_LEN, MAX_ID_LEN, MAX_SENDER_NAME_CHARS, MAX_TEXT_BYTES,+ RESERVED_CHANNELS, RelayInboundParams, validate_channel, validate_id,};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 a1bbbf283b..80638f6679 100644--- a/crates/openhuman-core/src/channels/providers/relay/ops.rs+++ b/crates/openhuman-core/src/channels/providers/relay/ops.rs@@ -3,15 +3,15 @@use std::collections::HashMap;use std::sync::Arc;-use serde_json::{json, Value};+use serde_json::{Value, json};use super::channel::RelayChannel;use super::params::RelayInboundParams;use super::store::{self, Recorded};use crate::channels::context::MAX_CHANNEL_HISTORY;use crate::channels::runtime::{- build_channel_turn_parts, prepare_runtime_limits, process_channel_runtime_message,- runtime_context, PromptToolDescs,+ PromptToolDescs, build_channel_turn_parts, prepare_runtime_limits,+ process_channel_runtime_message, runtime_context,};use crate::config::Config;use crate::core::Outcome;diff --git a/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs b/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rsindex 555179bc7b..3b2e3facb1 100644--- a/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs+++ b/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs@@ -25,9 +25,11 @@ 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 d7d51fda4b..7bef3bd80a 100644--- a/crates/openhuman-core/src/channels/routes.rs+++ b/crates/openhuman-core/src/channels/routes.rs@@ -1,6 +1,6 @@//! Per-sender routing and runtime command handling.-use super::context::{clear_sender_history, ChannelRouteSelection, ChannelRuntimeContext};+use super::context::{ChannelRouteSelection, ChannelRuntimeContext, clear_sender_history};use super::{Channel, ChannelSendExt, SendMessage};use crate::inference::provider;use std::sync::Arc;diff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rsindex c0a3e9aa4a..f4cbf67b94 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::{- conversation_history_key, ChannelRuntimeContext, RouteSelectionMap, TurnModelSourceCacheMap,+ ChannelRuntimeContext, RouteSelectionMap, TurnModelSourceCacheMap, conversation_history_key,};use crate::channels::host::ChannelTurnStateSubscriber;use crate::core::events::DomainEvent;@@ -337,9 +337,11 @@ async fn handle_runtime_command_unknown_provider_sends_helpful_error() {let sent = channel_impl.sent.lock().unwrap();assert_eq!(sent.len(), 1);- assert!(sent[0]- .content- .contains("Unknown provider `definitely-not-a-provider`"));+ assert!(+ sent[0]+ .content+ .contains("Unknown provider `definitely-not-a-provider`")+ );assert_eq!(sent[0].thread_ts.as_deref(), Some("thread-1"));}@@ -375,12 +377,13 @@ 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 {@@ -485,9 +488,11 @@ async fn handle_runtime_command_telegram_help_replies_with_remote_command_list()assert!(sent[0].content.contains("`/status`"));assert!(sent[0].content.contains("`/sessions`"));assert!(sent[0].content.contains("`/new`"));- assert!(sent[0]- .content- .contains("Model routing: `/model`, `/models`"));+ assert!(+ sent[0]+ .content+ .contains("Model routing: `/model`, `/models`")+ );}#[tokio::test]@@ -520,9 +525,11 @@ async fn handle_runtime_command_telegram_sessions_reports_empty_store() {let sent = channel_impl.sent.lock().unwrap();assert_eq!(sent.len(), 1);- assert!(sent[0]- .content- .contains("No conversation threads yet. Send `/new` to create one."));+ assert!(+ sent[0]+ .content+ .contains("No conversation threads yet. Send `/new` to create one.")+ );assert_eq!(sent[0].thread_ts.as_deref(), Some("42"));}@@ -561,12 +568,13 @@ 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()@@ -642,9 +650,11 @@ async fn handle_runtime_command_telegram_new_status_and_sessions_round_trip() {let sent = channel_impl.sent.lock().unwrap();assert_eq!(sent.len(), 3);assert!(sent[0].content.contains("Started new session"));- assert!(sent[0]- .content- .contains("In-memory channel history cleared for this chat."));+ assert!(+ sent[0]+ .content+ .contains("In-memory channel history cleared for this chat.")+ );assert!(sent[1].content.contains("**Status**"));assert!(sent[1].content.contains("Thread: `Telegram"));@@ -655,9 +665,10 @@ async fn handle_runtime_command_telegram_new_status_and_sessions_round_trip() {assert!(sent[2].content.contains("**Recent sessions**"));assert!(sent[2].content.contains("→ `Telegram"));- assert!(sent- .iter()- .all(|message| message.thread_ts.as_deref() == Some("42")));+ assert!(+ sent.iter()+ .all(|message| message.thread_ts.as_deref() == Some("42"))+ );}#[tokio::test]@@ -701,9 +712,11 @@ async fn handle_runtime_command_telegram_new_reports_unavailable_storage() {"{}",sent[0].content);- assert!(sent[0]- .content- .contains("failed to persist the chat binding"));+ assert!(+ sent[0]+ .content+ .contains("failed to persist the chat binding")+ );assert!(sent[0].content.contains("host storage is unavailable"));assert_eq!(sent[0].thread_ts.as_deref(), Some("42"));}diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rsindex bf6d113625..4b5b2b37e2 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::{oneshot, Notify};+use tokio::sync::{Notify, oneshot};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 b654af7706..bd3a0e14ba 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::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};+use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, mock_agent_run_turn};use crate::agent::host_agents::{self, HostAgent, HostAgentResolver};-use crate::channels::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};+use crate::channels::context::{CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext};use crate::channels::runtime::process_channel_message;use crate::channels::{Channel, SendMessage};use crate::core::runtime::{CoreContext, DomainSet};-use serde_json::{json, Value};+use serde_json::{Value, json};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 9a00a48d80..83edd4670e 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::{run_host_agent_turn, seed_rows, HostChannelTurn};+pub(crate) use turn::{HostChannelTurn, run_host_agent_turn, seed_rows};/// 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.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture.rsindex 897b06d53f..512bb00296 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture.rs@@ -11,8 +11,8 @@use tinytools::{PermissionLevel, Tool};-use crate::agent::turn_origin::AgentTurnOrigin;use crate::agent::HostTools;+use crate::agent::turn_origin::AgentTurnOrigin;use crate::config::Config;/// The most a host agent may do on a turn from `origin`; `None` leaves thediff --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 a7df3a5833..a73e103e55 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::{json, Value};-use std::sync::atomic::{AtomicUsize, Ordering};+use serde_json::{Value, json};use std::sync::Arc;+use std::sync::atomic::{AtomicUsize, Ordering};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 6fb02f67b5..6681828b69 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/mod.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/mod.rs@@ -16,8 +16,8 @@ mod processor;mod routing;pub(crate) use processor::{- process_channel_message, process_channel_runtime_message, run_message_dispatch_loop,- RuntimeChannelMessage,+ RuntimeChannelMessage, process_channel_message, process_channel_runtime_message,+ run_message_dispatch_loop,};// `channel_has_approval_surface` stays pub(crate) on processor; re-export so@@ -33,7 +33,7 @@ use helpers::build_channel_context_block;use helpers::select_acknowledgment_reaction;#[cfg(test)]-use routing::{build_visible_tool_set, AgentScoping};+use routing::{AgentScoping, build_visible_tool_set};#[cfg(any(test, debug_assertions))]use tinychannels_bus as traits;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 dbf254e092..9f0ddb08b4 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::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHOD};+use crate::agent::bus::{AGENT_RUN_TURN_METHOD, AgentTurnRequest, AgentTurnResponse};use crate::agent::turn_origin::AgentTurnOrigin;use crate::channels::context::{ChannelRouteSelection, ChannelRuntimeContext};use crate::core::bus::BUS;diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rsindex 08d232035a..2ec3229453 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::{- compact_sender_history, is_context_window_overflow_error, ChannelRuntimeContext,+ ChannelRuntimeContext, compact_sender_history, is_context_window_overflow_error,};use crate::channels::routes::{get_or_create_turn_model_source, get_route_selection, handle_runtime_command_if_needed,@@ -23,13 +23,13 @@ use tokio_util::sync::CancellationToken;use tokio_util::task::AbortOnDropHandle;use super::super::helpers::{- build_channel_context_block, log_worker_join_result, spawn_typing_task,- REPLY_LOG_TRUNCATE_CHARS,+ REPLY_LOG_TRUNCATE_CHARS, build_channel_context_block, log_worker_join_result,+ spawn_typing_task,};-use super::super::host_agent::{self, run_host_agent_turn, seed_rows, HostChannelTurn, HostRoute};+use super::super::host_agent::{self, HostChannelTurn, HostRoute, run_host_agent_turn, seed_rows};+use super::RuntimeChannelMessage;use super::approval::{channel_has_approval_surface, try_route_approval_reply};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 803fd74a03..195095eb90 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs@@ -10,8 +10,8 @@ use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionReguse crate::agent::prompts::ConnectedIntegration;use crate::config::Config;use crate::integrations::composio::{- cached_active_integrations, fetch_connected_integrations_status,- FetchConnectedIntegrationsStatus,+ FetchConnectedIntegrationsStatus, cached_active_integrations,+ fetch_connected_integrations_status,};use crate::tools::orchestrator_tools;use std::collections::HashSet;diff --git a/crates/openhuman-core/src/channels/runtime/mod.rs b/crates/openhuman-core/src/channels/runtime/mod.rsindex 87b8ee69b1..626aafc365 100644--- a/crates/openhuman-core/src/channels/runtime/mod.rs+++ b/crates/openhuman-core/src/channels/runtime/mod.rs@@ -14,8 +14,8 @@ pub(crate) use startup::start_channels_with_session;// through the same pipeline, with a context built from the caller's config.#[cfg(test)]pub(crate) use dispatch::process_channel_message;-pub(crate) use dispatch::{process_channel_runtime_message, RuntimeChannelMessage};-pub(crate) use startup::{build_channel_turn_parts, runtime_context, PromptToolDescs};+pub(crate) use dispatch::{RuntimeChannelMessage, process_channel_runtime_message};+pub(crate) use startup::{PromptToolDescs, build_channel_turn_parts, runtime_context};#[cfg(any(test, debug_assertions))]pub mod test_support;diff --git a/crates/openhuman-core/src/channels/runtime/session_tests.rs b/crates/openhuman-core/src/channels/runtime/session_tests.rsindex 6aa6d4da36..3502a55425 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::atomic::{AtomicBool, AtomicUsize, Ordering};use std::sync::Arc;+use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};#[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 8092b220a9..b4b21ff1f8 100644--- a/crates/openhuman-core/src/channels/runtime/startup.rs+++ b/crates/openhuman-core/src/channels/runtime/startup.rs@@ -53,7 +53,7 @@ pub(crate) async fn prepare_runtime_limits(pub(crate) use credentials::hydrate_channel_credentials;pub use start_channels::start_channels;pub(crate) use start_channels::start_channels_with_session;-pub(crate) use turn_parts::{build_channel_turn_parts, runtime_context, PromptToolDescs};+pub(crate) use turn_parts::{PromptToolDescs, build_channel_turn_parts, runtime_context};// Re-exported at module scope (rather than left as private `pub(super)`// items reached only through their owning submodule) so the `#[path]` test@@ -62,7 +62,7 @@ pub(crate) use turn_parts::{build_channel_turn_parts, runtime_context, PromptToo#[cfg(test)]use crate::config::Config;#[cfg(test)]-use chat_workload::{resolve_chat_workload, ChatWorkloadResolution};+use chat_workload::{ChatWorkloadResolution, resolve_chat_workload};#[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 a5af7e1111..cbdd61affc 100644--- a/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs@@ -19,11 +19,11 @@ use std::collections::BTreeMap;use std::path::Path;use std::sync::Arc;-use serde_json::{json, Value};+use serde_json::{Value, json};use sha2::Digest;use tinychannels_bus::module_delivery::{- DeliveryQueueEntry, DeliveryTerminalResult, DELIVERY_PENDING_CAPACITY, DELIVERY_RECORD_BYTES,- DELIVERY_RESULT_CAPACITY, DELIVERY_RESULT_TTL_SECONDS,+ DELIVERY_PENDING_CAPACITY, DELIVERY_RECORD_BYTES, DELIVERY_RESULT_CAPACITY,+ DELIVERY_RESULT_TTL_SECONDS, DeliveryQueueEntry, DeliveryTerminalResult,};use tinystoragedrivers::{CollectionSpec, DocumentStore, ErrorKind, Precondition};@@ -148,7 +148,7 @@ async fn import_into(docs: &Arc<dyn DocumentStore>, workspace: &Path) -> anyhow:return Err(anyhow::anyhow!("write {collection} record: {:?}",error.kind()- ))+ ));}}}diff --git a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rsindex 26e46f47bb..5d456a0a5d 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::{build_channel_turn_parts, runtime_context, PromptToolDescs};+use super::turn_parts::{PromptToolDescs, build_channel_turn_parts, runtime_context};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 7d9dfe7093..e61c878585 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::{resolve_chat_workload, ChatWorkloadResolution};+use super::chat_workload::{ChatWorkloadResolution, resolve_chat_workload};use super::prompt::format_access_context;use crate::agent::host_runtime;use crate::channels::context::ChannelRuntimeContext;diff --git a/crates/openhuman-core/src/channels/runtime/startup_tests.rs b/crates/openhuman-core/src/channels/runtime/startup_tests.rsindex e8af9daf17..691e9fd8da 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::{resolve_chat_workload, ChatWorkloadResolution, RelayInboundMessageHandler};+use super::{ChatWorkloadResolution, RelayInboundMessageHandler, resolve_chat_workload};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 53b33638b6..0e9007956d 100644--- a/crates/openhuman-core/src/channels/runtime/supervision.rs+++ b/crates/openhuman-core/src/channels/runtime/supervision.rs@@ -86,7 +86,7 @@ pub(crate) fn spawn_supervised_listener(}#[cfg(test)]-pub(crate) use tinychannels::runtime::{jitter_millis, MAX_JITTER_MS};+pub(crate) use tinychannels::runtime::{MAX_JITTER_MS, jitter_millis};#[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 37facf80f2..29aa464962 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::{jitter_millis, spawn_supervised_listener, MAX_JITTER_MS};+use super::{MAX_JITTER_MS, jitter_millis, spawn_supervised_listener};use std::sync::{Arc, Mutex};use tinychannels_bus as traits;use tokio::time::Instant;diff --git a/crates/openhuman-core/src/channels/runtime/test_support.rs b/crates/openhuman-core/src/channels/runtime/test_support.rsindex b05ae7e243..ff17edb0ac 100644--- a/crates/openhuman-core/src/channels/runtime/test_support.rs+++ b/crates/openhuman-core/src/channels/runtime/test_support.rs@@ -2,13 +2,13 @@pub use super::dispatch::test_support::build_channel_context_block_for_test;use super::dispatch::{- process_channel_message, process_channel_runtime_message, RuntimeChannelMessage,+ RuntimeChannelMessage, process_channel_message, process_channel_runtime_message,};pub use super::startup::test_support::resolve_yuanbao_app_secret_for_test;-use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHOD};-use crate::channels::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};+use crate::agent::bus::{AGENT_RUN_TURN_METHOD, AgentTurnRequest, AgentTurnResponse};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 3933c952ed..a006d958b9 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::agent::context::channels_prompt::{- build_system_prompt_with_identity, render_project_context, ProjectContextPlacement,- PromptIdentityOverride,+ ProjectContextPlacement, PromptIdentityOverride, build_system_prompt_with_identity,+ render_project_context,};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 20a0eb9809..ea8a3b2d74 100644--- a/crates/openhuman-core/src/channels/tests/discord_integration.rs+++ b/crates/openhuman-core/src/channels/tests/discord_integration.rs@@ -24,7 +24,7 @@//! starts failing.use super::super::context::{- conversation_history_key, ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS,+ CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext, conversation_history_key,};use super::super::runtime::process_channel_message;use super::super::{Channel, SendMessage};diff --git a/crates/openhuman-core/src/channels/tests/health.rs b/crates/openhuman-core/src/channels/tests/health.rsindex 17e0230fe7..63ad7ab500 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::runtime::spawn_supervised_listener;use super::super::Channel;+use super::super::runtime::spawn_supervised_listener;use super::common::AlwaysFailChannel;-use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::Arc;+use std::sync::atomic::{AtomicUsize, Ordering};use std::time::Duration;use tinychannels_bus as traits;@@ -33,10 +33,12 @@ 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 b9c1d3bd41..0cd6152d56 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::agent::context::channels_prompt::{build_system_prompt, BOOTSTRAP_MAX_CHARS};+use crate::agent::context::channels_prompt::{BOOTSTRAP_MAX_CHARS, build_system_prompt};use tempfile::TempDir;#[test]diff --git a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rsindex 87e8e826cb..8ec56206be 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::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};-use super::super::runtime::test_support::{run_dispatch_harness, DispatchHarnessOptions};+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::runtime::{- process_channel_message, run_message_dispatch_loop, RuntimeChannelMessage,+ RuntimeChannelMessage, process_channel_message, run_message_dispatch_loop,};-use super::super::Channel;-use super::common::{use_real_agent_handler, RecordingChannel, SlowModel};-use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};+use super::common::{RecordingChannel, SlowModel, use_real_agent_handler};+use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, mock_agent_run_turn};use crate::core::events::DomainEvent;use crate::inference::provider;use std::collections::HashMap;@@ -699,8 +699,10 @@ 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 08096e3de9..36ef01c7c1 100644--- a/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs+++ b/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs@@ -1,9 +1,9 @@+use super::super::Channel;use super::super::context::{- conversation_history_key, ChannelRouteSelection, ChannelRuntimeContext,- CHANNEL_MESSAGE_TIMEOUT_SECS,+ CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRouteSelection, ChannelRuntimeContext,+ conversation_history_key,};use super::super::runtime::process_channel_message;-use super::super::Channel;use super::common::{IterativeToolModel, MockPriceTool, ModelCaptureModel, RecordingChannel,TelegramRecordingChannel, ToolCallingModel,diff --git a/crates/openhuman-core/src/channels/tests/telegram_integration.rs b/crates/openhuman-core/src/channels/tests/telegram_integration.rsindex ce530b5dbc..2f5a8ec783 100644--- a/crates/openhuman-core/src/channels/tests/telegram_integration.rs+++ b/crates/openhuman-core/src/channels/tests/telegram_integration.rs@@ -6,7 +6,7 @@//! about exactly what the channel receives, without needing a real Telegram HTTP server.use super::super::context::{- conversation_history_key, ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS,+ CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext, conversation_history_key,};use super::super::runtime::process_channel_message;use super::super::{Channel, SendMessage};diff --git a/crates/openhuman-core/src/cron/bus.rs b/crates/openhuman-core/src/cron/bus.rsindex e9ca71932d..7fac646ddb 100644--- a/crates/openhuman-core/src/cron/bus.rs+++ b/crates/openhuman-core/src/cron/bus.rs@@ -5,11 +5,6 @@//! of directly constructing channel instances. The [`CronDeliverySubscriber`]//! picks up those events and dispatches to the appropriate channel, keeping//! channel construction out of the scheduler.-#![allow(- deprecated,- reason = "the v21 ChannelMessage/SendMessage shims stay in use here until the single inbound path (senamakel/openhuman#136) moves the host to canonical v22 content"-)]-use crate::core::events::DomainEvent;use async_trait::async_trait;use std::collections::HashMap;diff --git a/crates/openhuman-core/src/cron/channel_bridge.rs b/crates/openhuman-core/src/cron/channel_bridge.rsindex 66c35d98ec..29ccae9e4d 100644--- a/crates/openhuman-core/src/cron/channel_bridge.rs+++ b/crates/openhuman-core/src/cron/channel_bridge.rs@@ -7,16 +7,11 @@//! channel instances (to send through). The runtime registers both here when//! it starts; nothing registers in a core with no channels, and every accessor//! then answers "unavailable" instead of failing.-#![allow(- deprecated,- reason = "the v21 ChannelMessage/SendMessage shims stay in use here until the single inbound path (senamakel/openhuman#136) moves the host to canonical v22 content"-)]-use std::collections::HashMap;use std::sync::{Arc, Mutex, RwLock};use tinychannels_bus::SendMessage;-use tinychannels_runtime::context::ChatMessage;use tinychannels_runtime::Channel;+use tinychannels_runtime::context::ChatMessage;/// Same shape as `channels::context::ConversationHistoryMap`, spelled out so/// cron does not depend on the feature-gated `channels` module.diff --git a/crates/openhuman-core/src/cron/channel_bridge_tests.rs b/crates/openhuman-core/src/cron/channel_bridge_tests.rsindex 541bdc3ce2..c7b47e3664 100644--- a/crates/openhuman-core/src/cron/channel_bridge_tests.rs+++ b/crates/openhuman-core/src/cron/channel_bridge_tests.rs@@ -70,7 +70,9 @@ async fn bridge_reads_appends_trims_and_sends() {"42|cron:j:r1","the send carries the run-specific idempotency key");- assert!(send_to_channel("slack", "42", None, "hi", "k")- .await- .is_err());+ assert!(+ send_to_channel("slack", "42", None, "hi", "k")+ .await+ .is_err()+ );}diff --git a/crates/openhuman-core/src/threads/store/bus.rs b/crates/openhuman-core/src/threads/store/bus.rsindex eda8d8b063..80de886309 100644--- a/crates/openhuman-core/src/threads/store/bus.rs+++ b/crates/openhuman-core/src/threads/store/bus.rs@@ -20,11 +20,6 @@//! there is exactly one thread-id derivation again rather than a copy and a//! promise, and this file's behaviour is untouched by the move — which matters,//! because it decides the id under which channel turns are persisted.-#![allow(- deprecated,- reason = "the v21 ChannelMessage/SendMessage shims stay in use here until the single inbound path (senamakel/openhuman#136) moves the host to canonical v22 content"-)]-use crate::core::runtime::DispatchCtx;use std::path::{Path, PathBuf};use std::sync::{Arc, OnceLock, RwLock};@@ -41,7 +36,7 @@ use tinychannels_bus::ChannelMessage;use tinychannels_runtime::context::conversation_history_key;use super::{- append_message, ensure_thread, get_messages, ConversationMessage, CreateConversationThread,+ ConversationMessage, CreateConversationThread, append_message, ensure_thread, get_messages,};static CONVERSATION_PERSISTENCE_HANDLE: OnceLock<SubscriptionHandle> = OnceLock::new();