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
style(channels): reorder imports and tidy formatting
Steven Enamakel0694c7568ab2
diff --git a/crates/openhuman-core/src/channels/host/adapters.rs b/crates/openhuman-core/src/channels/host/adapters.rsindex e0fd050e7f..1d87aabc58 100644--- a/crates/openhuman-core/src/channels/host/adapters.rs+++ b/crates/openhuman-core/src/channels/host/adapters.rs@@ -205,4 +205,3 @@ async fn publish_event(domain: &str, kind: &str, payload: serde_json::Value) ->}Ok(())}-diff --git a/crates/openhuman-core/src/channels/host/channel_events.rs b/crates/openhuman-core/src/channels/host/channel_events.rsindex d007da6036..430d54a14e 100644--- a/crates/openhuman-core/src/channels/host/channel_events.rs+++ b/crates/openhuman-core/src/channels/host/channel_events.rs@@ -1,9 +1,9 @@//! Host-owned approval routing and turn events over the channel module.use crate::channels::capabilities::capabilities_for;use crate::channels::runtime::ChannelHandle;-use crate::channels::SendMessage;#[cfg(test)]use crate::channels::ChannelSendExt;+use crate::channels::SendMessage;use crate::core::events::DomainEvent;use async_trait::async_trait;use std::collections::HashMap;diff --git a/crates/openhuman-core/src/channels/host/host_tests.rs b/crates/openhuman-core/src/channels/host/host_tests.rsindex b06daab423..3a75bdcad6 100644--- a/crates/openhuman-core/src/channels/host/host_tests.rs+++ b/crates/openhuman-core/src/channels/host/host_tests.rs@@ -317,4 +317,3 @@ async fn event_sink_routes_channel_reactions_to_domain_bus() {.await.is_ok());}-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 615b215c94..16e7d76fff 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@@ -21,9 +21,9 @@ use std::sync::Arc;use crate::agent::host_agents::HostAgent;use crate::channels::context::ChannelRuntimeContext;-use crate::channels::SendMessage;#[cfg(test)]use crate::channels::ChannelSendExt;+use crate::channels::SendMessage;use crate::config::Config;use crate::core::bus::BUS;use crate::core::events::DomainEvent;diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rsindex a6c7035bff..cab9e3c2b3 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs@@ -5,9 +5,9 @@ use crate::channels::context::{is_context_window_overflow_error, ChannelRuntimeC#[cfg(test)]use crate::channels::routes::get_or_create_turn_model_source;use crate::channels::routes::{get_route_selection, handle_runtime_command_with_reset};-use crate::channels::SendMessage;#[cfg(test)]use crate::channels::ChannelSendExt;+use crate::channels::SendMessage;use crate::core::bus::BUS;use crate::core::events::DomainEvent;use crate::util::truncate_with_ellipsis;diff --git a/crates/openhuman-core/src/channels/runtime/mod.rs b/crates/openhuman-core/src/channels/runtime/mod.rsindex d0d6e7cfe0..4b94a797aa 100644--- a/crates/openhuman-core/src/channels/runtime/mod.rs+++ b/crates/openhuman-core/src/channels/runtime/mod.rs@@ -6,9 +6,9 @@ mod startup;pub(crate) use startup::hydrate_channel_credentials;pub(crate) use startup::prepare_runtime_limits;-pub(crate) use startup::ChannelHandle;pub use startup::start_channels;pub(crate) use startup::start_channels_with_session;+pub(crate) use startup::ChannelHandle;// The hosted-channel relay (`channels::providers::relay`) runs one message// through the same pipeline, with a context built from the caller's config.#[cfg(test)]diff --git a/crates/openhuman-core/src/channels/runtime/startup.rs b/crates/openhuman-core/src/channels/runtime/startup.rsindex cfd4a1c9df..73866529f5 100644--- a/crates/openhuman-core/src/channels/runtime/startup.rs+++ b/crates/openhuman-core/src/channels/runtime/startup.rs@@ -55,10 +55,7 @@ impl ChannelHandle {}}- pub(crate) async fn send(- &self,- message: &tinychannels_bus::SendMessage,- ) -> anyhow::Result<()> {+ pub(crate) async fn send(&self, message: &tinychannels_bus::SendMessage) -> anyhow::Result<()> {match self {Self::Module(channel) => channel.send_prepared(message).await,Self::Relay(channel) => channel.send(message).await,@@ -74,22 +71,26 @@ impl ChannelHandle {pub(crate) async fn start_typing(&self, recipient: &str) -> anyhow::Result<()> {match self {- Self::Module(channel) => channel- .interact(tinychannels_bus::ChannelInteraction::StartTyping {- recipient: recipient.to_owned(),- })- .await,+ Self::Module(channel) => {+ channel+ .interact(tinychannels_bus::ChannelInteraction::StartTyping {+ recipient: recipient.to_owned(),+ })+ .await+ }Self::Relay(_) => Ok(()),}}pub(crate) async fn stop_typing(&self, recipient: &str) -> anyhow::Result<()> {match self {- Self::Module(channel) => channel- .interact(tinychannels_bus::ChannelInteraction::StopTyping {- recipient: recipient.to_owned(),- })- .await,+ Self::Module(channel) => {+ channel+ .interact(tinychannels_bus::ChannelInteraction::StopTyping {+ recipient: recipient.to_owned(),+ })+ .await+ }Self::Relay(_) => Ok(()),}}@@ -152,7 +153,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::{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@@ -161,7 +162,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/module_providers.rs b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rsindex f99d0b63c9..866abd2f9e 100644--- a/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs@@ -14,10 +14,10 @@ use tinychannels_bus::module_runtime::{ChannelIngressKind, ChannelMessagePreparation, ConfiguredChannelInfo,};use tinychannels_bus::module_supervision::ChannelSupervisionPolicy;-use tinychannels_bus::{ChannelInteraction, ChannelInteractionResult};-use tinychannels_bus::SendMessage;#[cfg(test)]use tinychannels_bus::ChannelMessage;+use tinychannels_bus::SendMessage;+use tinychannels_bus::{ChannelInteraction, ChannelInteractionResult};#[cfg(test)]use tinychannels_runtime::Channel;#[cfg(test)]diff --git a/crates/openhuman-core/src/channels/runtime/startup_tests.rs b/crates/openhuman-core/src/channels/runtime/startup_tests.rsindex 980a71ceaa..42c2c7dde8 100644--- a/crates/openhuman-core/src/channels/runtime/startup_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/startup_tests.rs@@ -56,4 +56,3 @@ fn chat_provider_local_and_byok_strings_resolve_to_workload() {}}}-diff --git a/crates/openhuman-core/src/channels/runtime/test_support.rs b/crates/openhuman-core/src/channels/runtime/test_support.rsindex 880a2ba558..bfd31ef8a0 100644--- a/crates/openhuman-core/src/channels/runtime/test_support.rs+++ b/crates/openhuman-core/src/channels/runtime/test_support.rs@@ -8,7 +8,6 @@ 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::channels::ChannelSystemPrompt;-use tinychannels_runtime::Channel;use crate::config::{MultimodalConfig, MultimodalFileConfig, ReliabilityConfig};use crate::core::bus::BUS;use crate::core::events::DomainEvent;@@ -22,6 +21,7 @@ use std::sync::{Arc, Mutex};use std::time::Duration;use tinyagents_harness::progress::AgentProgress;use tinychannels_bus::{ChannelMessage, SendMessage};+use tinychannels_runtime::Channel;use tinyinference_llm::model::{ChatModel, ModelRequest, ModelResponse};use tinytools::{Tool, ToolResult};