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: sort imports and drop stray blank lines
Steven Enamakel552a45d80ecc
diff --git a/crates/openhuman-core/src/channels/context_tests.rs b/crates/openhuman-core/src/channels/context_tests.rsindex 15058bb9f8..89e7b20ae3 100644--- a/crates/openhuman-core/src/channels/context_tests.rs+++ b/crates/openhuman-core/src/channels/context_tests.rs@@ -1,6 +1,6 @@use super::*;-use tinychannels_bus as traits;use async_trait::async_trait;+use tinychannels_bus as traits;use tinytools::{Tool, ToolResult};struct DummyTool;diff --git a/crates/openhuman-core/src/channels/host/channel_events_tests.rs b/crates/openhuman-core/src/channels/host/channel_events_tests.rsindex 5dff851e43..d08fb1a7ee 100644--- a/crates/openhuman-core/src/channels/host/channel_events_tests.rs+++ b/crates/openhuman-core/src/channels/host/channel_events_tests.rs@@ -1,11 +1,11 @@//! Tests for the channel approval-surface and turn-state subscribers.use super::*;-use tinychannels_bus::{ChannelMessage, SendMessage};use std::path::Path;use std::sync::Mutex as StdMutex;use tempfile::tempdir;use tinychannels::remote::session_store::with_store_read;+use tinychannels_bus::{ChannelMessage, SendMessage};struct RecordingChannel {name: String,diff --git a/crates/openhuman-core/src/channels/module_fixture_tests.rs b/crates/openhuman-core/src/channels/module_fixture_tests.rsindex 074e83c1b5..ac7ec108f6 100644--- a/crates/openhuman-core/src/channels/module_fixture_tests.rs+++ b/crates/openhuman-core/src/channels/module_fixture_tests.rs@@ -11,8 +11,6 @@use crate::modules::client::ModuleClient;use tinychannels_bus::methods;--/// Return a client for the compiled, linked TinyChannels module fixture.////// BLOCKED on the tinybus epic: `tinychannels-module` v0.1.29 pins `tinybus =0.1.4`diff --git a/crates/openhuman-core/src/channels/proactive_tests.rs b/crates/openhuman-core/src/channels/proactive_tests.rsindex fa643f66f1..2ea0f7b3e0 100644--- a/crates/openhuman-core/src/channels/proactive_tests.rs+++ b/crates/openhuman-core/src/channels/proactive_tests.rs@@ -1,6 +1,6 @@use super::*;-use tinychannels_bus::ChannelMessage;use std::sync::atomic::{AtomicUsize, Ordering};+use tinychannels_bus::ChannelMessage;use tokio::sync::mpsc;struct MockChannel {diff --git a/crates/openhuman-core/src/channels/providers/relay/channel.rs b/crates/openhuman-core/src/channels/providers/relay/channel.rsindex ed68c76116..d3426ddf8d 100644--- a/crates/openhuman-core/src/channels/providers/relay/channel.rs+++ b/crates/openhuman-core/src/channels/providers/relay/channel.rs@@ -10,8 +10,8 @@ use std::sync::Mutex;use async_trait::async_trait;use serde_json::json;-use tinychannels_bus::{Channel, ChannelMessage, SendMessage};use crate::web_chat::{publish_web_channel_event, WebChannelEvent};+use tinychannels_bus::{Channel, ChannelMessage, SendMessage};/// The event name a relayed reply is published under.pub const CHANNEL_OUTBOUND_EVENT: &str = "channel_outbound";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 a27dc92c7d..3e044a7937 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@@ -7,13 +7,13 @@ use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponseuse crate::agent::host_agents::{self, HostAgent, HostAgentResolver};use crate::channels::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};use crate::channels::runtime::process_channel_message;-use tinychannels_bus as traits;use crate::channels::{Channel, SendMessage};use crate::core::runtime::{CoreContext, DomainSet};use serde_json::{json, Value};use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};+use tinychannels_bus as traits;use tinytools::{PermissionLevel, Tool, ToolResult};use wiremock::matchers::{method, path};use wiremock::{Mock, MockServer, ResponseTemplate};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 17a1ae92b3..fb5614a25a 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@@ -20,11 +20,11 @@ use std::sync::Arc;use crate::agent::host_agents::HostAgent;use crate::channels::context::ChannelRuntimeContext;-use tinychannels_bus as traits;use crate::channels::{ChannelSendExt, SendMessage};use crate::config::Config;use crate::core::bus::BUS;use crate::core::events::DomainEvent;+use tinychannels_bus as traits;pub(crate) mod posture;mod turn;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 86e931be99..251acd5081 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@@ -5,11 +5,11 @@ use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHuse crate::agent::progress::AgentProgress;use crate::agent::turn_origin::AgentTurnOrigin;use crate::channels::context::{ChannelRouteSelection, ChannelRuntimeContext};-use tinychannels_bus as traits;use crate::core::bus::BUS;use std::sync::Arc;use tinyagents_session::transcript::TranscriptMessage;use tinybus::NativeRequestError;+use tinychannels_bus as traits;use super::super::routing::resolve_target_agent;diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rsindex 0f5b52fb83..dc523dae2c 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs@@ -10,7 +10,6 @@ use crate::channels::context::{use crate::channels::routes::{get_or_create_turn_model_source, get_route_selection, handle_runtime_command_if_needed,};-use tinychannels_bus as traits;use crate::channels::{ChannelSendExt, SendMessage};use crate::core::bus::BUS;use crate::core::events::DomainEvent;@@ -18,6 +17,7 @@ use crate::util::truncate_with_ellipsis;use std::sync::Arc;use std::time::{Duration, Instant};use tinyagents_session::transcript::TranscriptMessage;+use tinychannels_bus as traits;use tokio_util::sync::CancellationToken;use tokio_util::task::AbortOnDropHandle;diff --git a/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rsindex 96a65a7659..44f0583b7d 100644--- a/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs@@ -3,7 +3,6 @@use super::callback::ChannelHostCallbacks;use super::credentials::hydrate_channel_credentials;use crate::channels::runtime::dispatch::RuntimeChannelMessage;-use tinychannels_bus::{Channel, ChannelMessage, SendMessage};use crate::config::Config;use crate::modules::channel_runtime::ChannelRuntimeLease;use crate::modules::client::{ModuleCallError, ModuleClient, ModuleObjectClient};@@ -15,6 +14,7 @@ use tinychannels_bus::module_runtime::{ChannelIngressKind, ChannelMessagePreparation, ConfiguredChannelInfo,};use tinychannels_bus::module_supervision::ChannelSupervisionPolicy;+use tinychannels_bus::{Channel, ChannelMessage, SendMessage};use tinychannels_bus::{ChannelInteraction, ChannelInteractionResult};use tokio::sync::mpsc;diff --git a/crates/openhuman-core/src/channels/runtime/supervision.rs b/crates/openhuman-core/src/channels/runtime/supervision.rsindex 72174ab9ac..53b33638b6 100644--- a/crates/openhuman-core/src/channels/runtime/supervision.rs+++ b/crates/openhuman-core/src/channels/runtime/supervision.rs@@ -1,11 +1,11 @@//! OpenHuman observer adapter for TinyChannels listener supervision.-use tinychannels_bus as traits;use super::super::Channel;use crate::core::bus::BUS;use crate::core::events::DomainEvent;use std::sync::Arc;use tinychannels::runtime::ListenerObserver;+use tinychannels_bus as traits;/// Publishes reusable listener lifecycle facts onto OpenHuman's domain bus.struct OpenHumanListenerObserver;diff --git a/crates/openhuman-core/src/channels/runtime/supervision_tests.rs b/crates/openhuman-core/src/channels/runtime/supervision_tests.rsindex 735c25ff35..37facf80f2 100644--- a/crates/openhuman-core/src/channels/runtime/supervision_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/supervision_tests.rs@@ -1,7 +1,7 @@use super::super::super::Channel;-use tinychannels_bus as traits;use super::{jitter_millis, spawn_supervised_listener, MAX_JITTER_MS};use std::sync::{Arc, Mutex};+use tinychannels_bus as traits;use tokio::time::Instant;#[test]diff --git a/crates/openhuman-core/src/channels/runtime/test_support.rs b/crates/openhuman-core/src/channels/runtime/test_support.rsindex fee6947499..d9b74b8eb4 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::agent::progress::AgentProgress;use crate::channels::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};-use tinychannels_bus::{ChannelMessage, SendMessage};use crate::channels::Channel;use crate::channels::ChannelSystemPrompt;use crate::config::{MultimodalConfig, MultimodalFileConfig, ReliabilityConfig};@@ -23,6 +22,7 @@ use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use std::time::Duration;use tinyagents_session::transcript::TranscriptMessage;+use tinychannels_bus::{ChannelMessage, SendMessage};use tinyinference_llm::model::{ChatModel, ModelRequest, ModelResponse};use tinytools::{Tool, ToolResult};diff --git a/crates/openhuman-core/src/channels/tests/common.rs b/crates/openhuman-core/src/channels/tests/common.rsindex f55e7c0447..936e36ebe4 100644--- a/crates/openhuman-core/src/channels/tests/common.rs+++ b/crates/openhuman-core/src/channels/tests/common.rs@@ -1,9 +1,9 @@-use tinychannels_bus as traits;use crate::channels::{Channel, SendMessage};use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use std::time::Duration;use tempfile::TempDir;+use tinychannels_bus as traits;use tinyinference_llm::message::{AssistantMessage, Message};use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};use tinyinference_llm::tool::ToolCall;diff --git a/crates/openhuman-core/src/channels/tests/discord_integration.rs b/crates/openhuman-core/src/channels/tests/discord_integration.rsindex 6e138db4d8..d6eb6682e9 100644--- a/crates/openhuman-core/src/channels/tests/discord_integration.rs+++ b/crates/openhuman-core/src/channels/tests/discord_integration.rs@@ -27,12 +27,12 @@ use super::super::context::{conversation_history_key, ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS,};use super::super::runtime::process_channel_message;-use tinychannels_bus as traits;use super::super::{Channel, SendMessage};use super::common::HistoryCaptureModel;use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};+use tinychannels_bus as traits;use tinyinference_llm::model::{ChatModel, ModelRequest, ModelResponse};// ── Test helpers ────────────────────────────────────────────────────────────diff --git a/crates/openhuman-core/src/channels/tests/health.rs b/crates/openhuman-core/src/channels/tests/health.rsindex b4d2f73b40..17e0230fe7 100644--- a/crates/openhuman-core/src/channels/tests/health.rs+++ b/crates/openhuman-core/src/channels/tests/health.rs@@ -1,10 +1,10 @@use super::super::runtime::spawn_supervised_listener;use super::super::Channel;-use tinychannels_bus as traits;use super::common::AlwaysFailChannel;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::Arc;use std::time::Duration;+use tinychannels_bus as traits;#[tokio::test]async fn supervised_listener_marks_error_and_restarts_on_failures() {diff --git a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rsindex 2ece39fc87..ee67152b93 100644--- a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs+++ b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs@@ -4,7 +4,6 @@ use super::super::runtime::{process_channel_message, run_message_dispatch_loop, RuntimeChannelMessage,};use super::super::Channel;-use tinychannels_bus as traits;use super::common::{use_real_agent_handler, RecordingChannel, SlowModel};use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};use crate::core::events::DomainEvent;@@ -13,6 +12,7 @@ use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use std::time::Duration;+use tinychannels_bus as traits;use tokio::sync::Barrier;#[tokio::test]diff --git a/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs b/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rsindex ff68ea6e2e..11356dae45 100644--- a/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs+++ b/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs@@ -4,7 +4,6 @@ use super::super::context::{};use super::super::runtime::process_channel_message;use super::super::Channel;-use tinychannels_bus as traits;use super::common::{IterativeToolModel, MockPriceTool, ModelCaptureModel, RecordingChannel,TelegramRecordingChannel, ToolCallingModel,@@ -13,6 +12,7 @@ use crate::inference::provider;use std::collections::HashMap;use std::sync::atomic::Ordering;use std::sync::{Arc, Mutex};+use tinychannels_bus as traits;use tinyinference_llm::model::ChatModel;#[tokio::test]diff --git a/crates/openhuman-core/src/channels/tests/telegram_integration.rs b/crates/openhuman-core/src/channels/tests/telegram_integration.rsindex 23c3b54789..7ab7c5acdf 100644--- a/crates/openhuman-core/src/channels/tests/telegram_integration.rs+++ b/crates/openhuman-core/src/channels/tests/telegram_integration.rs@@ -9,13 +9,13 @@ use super::super::context::{conversation_history_key, ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS,};use super::super::runtime::process_channel_message;-use tinychannels_bus as traits;use super::super::{Channel, SendMessage};use super::common::SlowModel;use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use std::time::Duration;+use tinychannels_bus as traits;use tinyinference_llm::model::{ChatModel, ModelRequest, ModelResponse};// ── Test helpers ────────────────────────────────────────────────────────────diff --git a/crates/openhuman-core/src/cron/bus.rs b/crates/openhuman-core/src/cron/bus.rsindex 616407115e..fe1a72afd7 100644--- a/crates/openhuman-core/src/cron/bus.rs+++ b/crates/openhuman-core/src/cron/bus.rs@@ -6,12 +6,12 @@//! picks up those events and dispatches to the appropriate channel, keeping//! channel construction out of the scheduler.-use tinychannels_bus::{Channel, SendMessage};use crate::core::events::DomainEvent;use async_trait::async_trait;use std::collections::HashMap;use std::sync::Arc;use tinybus::EventHandler;+use tinychannels_bus::{Channel, SendMessage};/// Subscribes to `CronDeliveryRequested` events and dispatches/// the output to the named channel.diff --git a/crates/openhuman-core/src/cron/channel_bridge.rs b/crates/openhuman-core/src/cron/channel_bridge.rsindex a3d89307fa..a2aa3ffd3b 100644--- a/crates/openhuman-core/src/cron/channel_bridge.rs+++ b/crates/openhuman-core/src/cron/channel_bridge.rs@@ -8,10 +8,10 @@//! it starts; nothing registers in a core with no channels, and every accessor//! then answers "unavailable" instead of failing.-use tinychannels_bus::{Channel, SendMessage};use std::collections::HashMap;use std::sync::{Arc, Mutex, RwLock};use tinyagents_session::transcript::TranscriptMessage;+use tinychannels_bus::{Channel, SendMessage};/// Same shape as `channels::context::ConversationHistoryMap`, spelled out so/// cron does not depend on the feature-gated `channels` module.diff --git a/crates/openhuman-modules-linked/src/lib_tests.rs b/crates/openhuman-modules-linked/src/lib_tests.rsindex 0de29f62b6..807c969ddd 100644--- a/crates/openhuman-modules-linked/src/lib_tests.rs+++ b/crates/openhuman-modules-linked/src/lib_tests.rs@@ -3,12 +3,10 @@ use super::*;#[test]fn every_enabled_feature_registers_exactly_its_own_id() {let ids: Vec<&str> = linked_modules().iter().map(|(id, _)| *id).collect();- let expected: Vec<&str> = [- cfg!(feature = "tinydocs").then_some("tinydocs"),- ]- .into_iter()- .flatten()- .collect();+ let expected: Vec<&str> = [cfg!(feature = "tinydocs").then_some("tinydocs")]+ .into_iter()+ .flatten()+ .collect();assert_eq!(ids, expected);}diff --git a/tests/raw_coverage/channels_round24_raw_coverage_e2e.rs b/tests/raw_coverage/channels_round24_raw_coverage_e2e.rsindex 5e2ef37087..f2b70c0737 100644--- a/tests/raw_coverage/channels_round24_raw_coverage_e2e.rs+++ b/tests/raw_coverage/channels_round24_raw_coverage_e2e.rs@@ -3,12 +3,12 @@//! Parser/state seams only: no real network traffic.use openhuman_core::channels::test_support as runtime_support;-use tinychannels::ChannelMessage;use serde_json::json;use tinychannels::delivery::progressive::{extract_message_id, latest_thinking_snippet, StreamingState,};use tinychannels::providers::email_channel::test_support as email_support;+use tinychannels::ChannelMessage;fn channel_message(channel: &str, reply_target: &str, content: &str) -> ChannelMessage {ChannelMessage {