Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

style: reorder imports across core modules

Steven Enamakel24c35504db57
diff --git a/crates/openhuman-core/src/agent/tools/todo_tests.rs b/crates/openhuman-core/src/agent/tools/todo_tests.rs
index 7d7963d204..addda0cd70 100644
--- a/crates/openhuman-core/src/agent/tools/todo_tests.rs
+++ b/crates/openhuman-core/src/agent/tools/todo_tests.rs
@@ -1,6 +1,6 @@
use super::*;
-use tinyagents_graph::todos::{TodoItem, TodoStatus};
use serde_json::{json, Value};
+use tinyagents_graph::todos::{TodoItem, TodoStatus};
/// Serialize tests that share the process-global scratch store. Same lock
/// as `todos::ops` — otherwise the two test modules race under `cargo test`'s
diff --git a/crates/openhuman-core/src/channels/bus/subscriber.rs b/crates/openhuman-core/src/channels/bus/subscriber.rs
index babcabb282..aac934e4a9 100644
--- a/crates/openhuman-core/src/channels/bus/subscriber.rs
+++ b/crates/openhuman-core/src/channels/bus/subscriber.rs
@@ -7,11 +7,11 @@
//! [`BackendProgressiveSender`].
use super::delivery::BackendProgressiveSender;
-use tinychannels::channel::{derive_inbound_client_id, derive_inbound_thread_id};
use crate::core::events::DomainEvent;
use async_trait::async_trait;
use std::sync::Arc;
use tinybus::EventHandler;
+use tinychannels::channel::{derive_inbound_client_id, derive_inbound_thread_id};
use tinychannels::delivery::progressive::{
ProgressiveReply, EDIT_FLUSH_INTERVAL, FILLER_INTERVAL, TYPING_REFRESH_INTERVAL,
};
diff --git a/crates/openhuman-core/src/channels/controllers/ops/connect/connect_channel.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/connect_channel.rs
index 1930dbdce9..acd88e014c 100644
--- a/crates/openhuman-core/src/channels/controllers/ops/connect/connect_channel.rs
+++ b/crates/openhuman-core/src/channels/controllers/ops/connect/connect_channel.rs
@@ -1,12 +1,12 @@
//! Module-owned connection preparation, followed by host credential custody
//! and configuration persistence.
-use tinychannels_bus::controllers::ChannelConnectionResult;
use super::shared::credential_provider;
use crate::config::Config;
use crate::core::Outcome;
use crate::modules::client::{ModuleCallError, ModuleClient};
use crate::security::credentials;
use serde_json::Value;
+use tinychannels_bus::controllers::ChannelConnectionResult;
use tinychannels_bus::module_controller::{ChannelConfigUpdate, PreparedChannelConnection};
use tinychannels_bus::{ChannelAuthMode, ChannelControllerRequest, HttpProxyPolicy};
diff --git a/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rs
index 1107f1ecea..d1c223a575 100644
--- a/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rs
+++ b/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rs
@@ -7,9 +7,9 @@ use crate::config::Config;
use crate::core::Outcome;
use crate::security::credentials;
-use tinychannels_bus::controllers::{find_channel_definition, ChannelAuthMode};
use super::memory::clear_channel_memory;
use super::shared::credential_provider;
+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/status.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/status.rs
index 19db5dcd7d..808d6da0e0 100644
--- a/crates/openhuman-core/src/channels/controllers/ops/connect/status.rs
+++ b/crates/openhuman-core/src/channels/controllers/ops/connect/status.rs
@@ -7,9 +7,9 @@ use crate::config::Config;
use crate::core::Outcome;
use crate::security::credentials;
-use tinychannels_bus::controllers::{all_channel_definitions, find_channel_definition};
-use tinychannels_bus::controllers::ChannelStatusEntry;
use super::shared::{channel_config_connected, credential_provider, merge_listener_health};
+use tinychannels_bus::controllers::ChannelStatusEntry;
+use tinychannels_bus::controllers::{all_channel_definitions, find_channel_definition};
/// Get connection status for one or all channels.
pub async fn channel_status(
diff --git a/crates/openhuman-core/src/channels/controllers/ops/discord.rs b/crates/openhuman-core/src/channels/controllers/ops/discord.rs
index beaa1b6e4e..51fc027537 100644
--- a/crates/openhuman-core/src/channels/controllers/ops/discord.rs
+++ b/crates/openhuman-core/src/channels/controllers/ops/discord.rs
@@ -15,8 +15,8 @@ use tinychannels_bus::{
ChannelControllerRequest,
};
-use tinychannels_bus::controllers::ChannelAuthMode;
use super::connect::shared::credential_provider;
+use tinychannels_bus::controllers::ChannelAuthMode;
// ---------------------------------------------------------------------------
// Discord guild/channel discovery
diff --git a/crates/openhuman-core/src/channels/controllers/ops_tests.rs b/crates/openhuman-core/src/channels/controllers/ops_tests.rs
index 17dcb4dfb2..e8a2787001 100644
--- a/crates/openhuman-core/src/channels/controllers/ops_tests.rs
+++ b/crates/openhuman-core/src/channels/controllers/ops_tests.rs
@@ -1,9 +1,9 @@
-use tinychannels_bus::controllers::ChannelConnectionResult;
use super::*;
use crate::config::schema::{DiscordConfig, IMessageConfig};
use crate::core::Outcome;
use tempfile::tempdir;
use tinychannels_bus::config::{EmailConfig, YuanbaoConfig};
+use tinychannels_bus::controllers::ChannelConnectionResult;
fn isolated_test_config() -> (tempfile::TempDir, Config) {
let tmp = tempdir().expect("failed to create temp dir");
diff --git a/crates/openhuman-core/src/channels/controllers/schemas.rs b/crates/openhuman-core/src/channels/controllers/schemas.rs
index 76077351ee..6178ce7d78 100644
--- a/crates/openhuman-core/src/channels/controllers/schemas.rs
+++ b/crates/openhuman-core/src/channels/controllers/schemas.rs
@@ -11,10 +11,10 @@ use crate::core::ControllerSchema;
use crate::core::Outcome;
use super::backend::OpenHumanChannelBackend;
-use tinychannels_bus::controllers::ChannelAuthMode;
use crate::channels::contract_schema::from_channel_controller_schema;
use crate::security::credentials::channel_credential_provider;
use tinychannels::{ChannelManager, ChannelsConfig};
+use tinychannels_bus::controllers::ChannelAuthMode;
use tinychannels_bus::controllers::{all_channel_controller_schemas, channel_controller_schema};
// ---------------------------------------------------------------------------
diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs
index 1f6479fd0b..5d51b2930b 100644
--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs
@@ -144,10 +144,10 @@ async fn flow_tool_allowed(
slug: &str,
connected_toolkits: Option<&[String]>,
) -> bool {
- use crate::integrations::composio::ops::load_user_scope_pref;
use crate::integrations::composio::contract::{
catalog_for_toolkit, classify_unknown, find_curated, toolkit_from_slug,
};
+ use crate::integrations::composio::ops::load_user_scope_pref;
let Some(toolkit) = toolkit_from_slug(slug) else {
tracing::debug!(target: "flows", %slug, "[flows] tool_call curation: reject — slug has no extractable toolkit prefix");
diff --git a/crates/openhuman-core/src/integrations/composio/ops/providers_ops.rs b/crates/openhuman-core/src/integrations/composio/ops/providers_ops.rs
index b41184976a..fec650833a 100644
--- a/crates/openhuman-core/src/integrations/composio/ops/providers_ops.rs
+++ b/crates/openhuman-core/src/integrations/composio/ops/providers_ops.rs
@@ -8,8 +8,8 @@
use crate::config::Config;
use crate::core::Outcome;
-use super::super::module_client::{self as connectors, methods};
use super::super::contract::ProviderUserProfile;
+use super::super::module_client::{self as connectors, methods};
use super::super::types::{
reencode, ComposioRefreshIdentitiesResponse, ComposioUserProfile, ComposioUserProfileRequest,
};
diff --git a/crates/openhuman-core/src/integrations/composio/tools/execute.rs b/crates/openhuman-core/src/integrations/composio/tools/execute.rs
index f5fe60fbcc..b8828aad90 100644
--- a/crates/openhuman-core/src/integrations/composio/tools/execute.rs
+++ b/crates/openhuman-core/src/integrations/composio/tools/execute.rs
@@ -15,8 +15,8 @@ use crate::agent::harness::definition::SandboxMode;
use crate::config::Config;
use tinytools::{PermissionLevel, Tool, ToolCategory, ToolResult};
-use super::super::ops::load_user_scope_pref;
use super::super::contract::{toolkit_from_slug, ToolScope};
+use super::super::ops::load_user_scope_pref;
use super::visibility::{
action_mutates_external_state, evaluate_tool_visibility, resolve_action_scope,
scope_error_message, ToolDecision,
diff --git a/crates/openhuman-core/src/integrations/composio/tools/visibility.rs b/crates/openhuman-core/src/integrations/composio/tools/visibility.rs
index be784d95c7..29a9c14d20 100644
--- a/crates/openhuman-core/src/integrations/composio/tools/visibility.rs
+++ b/crates/openhuman-core/src/integrations/composio/tools/visibility.rs
@@ -11,11 +11,11 @@ use serde_json::Value;
use crate::config::Config;
-use super::super::ops::load_user_scope_pref;
use super::super::contract::{
catalog_for_toolkit, classify_unknown, find_curated, toolkit_from_slug, ToolScope,
UserScopePref,
};
+use super::super::ops::load_user_scope_pref;
/// Decision returned by [`evaluate_tool_visibility`].
pub(super) enum ToolDecision {
diff --git a/crates/openhuman-core/src/threads/ops/live_state_tests.rs b/crates/openhuman-core/src/threads/ops/live_state_tests.rs
index bfce537a75..84f02fde38 100644
--- a/crates/openhuman-core/src/threads/ops/live_state_tests.rs
+++ b/crates/openhuman-core/src/threads/ops/live_state_tests.rs
@@ -7,8 +7,8 @@
//! env var at a fresh tempdir for the duration of the test.
use super::*;
-use tinyagents_graph::todos::{TodoItem, TodoStatus};
use crate::config::TEST_ENV_LOCK;
+use tinyagents_graph::todos::{TodoItem, TodoStatus};
#[test]
fn thread_live_state_request_parses_thread_id() {
diff --git a/crates/openhuman-core/src/tools/ops_tests.rs b/crates/openhuman-core/src/tools/ops_tests.rs
index ae7bcb3193..32ab299c8f 100644
--- a/crates/openhuman-core/src/tools/ops_tests.rs
+++ b/crates/openhuman-core/src/tools/ops_tests.rs
@@ -2,10 +2,10 @@ use super::*;
use crate::config::{BrowserConfig, Config};
use crate::security::credentials::{AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME};
use crate::security::AuditLogger;
-use tinytools::ToolContent;
use crate::tools::ops::{all_tools, tool_group};
use std::collections::HashMap;
use tempfile::TempDir;
+use tinytools::ToolContent;
use tinytools::ToolResult;
#[path = "../integrations/test_support.rs"]
diff --git a/crates/openhuman-core/src/voice/cli.rs b/crates/openhuman-core/src/voice/cli.rs
index a4fbace42e..ac82e93944 100644
--- a/crates/openhuman-core/src/voice/cli.rs
+++ b/crates/openhuman-core/src/voice/cli.rs
@@ -9,8 +9,8 @@
use anyhow::{anyhow, Result};
use crate::core::logging::{init_for_cli_run, CliLogDefault};
-use tinyvoice_bus::hotkey::ActivationMode;
use crate::voice::server::{run_standalone, VoiceServerConfig};
+use tinyvoice_bus::hotkey::ActivationMode;
/// Parse and execute the `openhuman voice` / `openhuman dictate` subcommand.
///
diff --git a/crates/openhuman-core/src/voice/schemas/handlers/provider_server.rs b/crates/openhuman-core/src/voice/schemas/handlers/provider_server.rs
index 4744f62afb..84e064a40c 100644
--- a/crates/openhuman-core/src/voice/schemas/handlers/provider_server.rs
+++ b/crates/openhuman-core/src/voice/schemas/handlers/provider_server.rs
@@ -415,8 +415,8 @@ pub(crate) fn handle_voice_test_provider(params: Map<String, Value>) -> Controll
pub(crate) fn handle_voice_server_start(params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
- use tinyvoice_bus::hotkey::ActivationMode;
use crate::voice::server::{global_server, VoiceServerConfig};
+ use tinyvoice_bus::hotkey::ActivationMode;
let config = config_rpc::load_config_with_timeout().await?;
diff --git a/crates/openhuman-core/src/voice/server.rs b/crates/openhuman-core/src/voice/server.rs
index 2fe1df0355..314c7f4288 100644
--- a/crates/openhuman-core/src/voice/server.rs
+++ b/crates/openhuman-core/src/voice/server.rs
@@ -29,8 +29,6 @@ use crate::config::Config;
#[cfg(test)]
use crate::voice::audio_capture::RecordingHandle;
#[cfg(test)]
-use tinyvoice_bus::hotkey::ActivationMode;
-#[cfg(test)]
use pipeline::{
build_initial_prompt, capture_expected_app_name, process_recording_bg, push_recent_transcript,
truncate_for_log, update_state_if_current,
@@ -38,6 +36,8 @@ use pipeline::{
#[cfg(test)]
use std::sync::Arc;
#[cfg(test)]
+use tinyvoice_bus::hotkey::ActivationMode;
+#[cfg(test)]
use tokio::sync::Mutex;
#[cfg(test)]
use types::DEFAULT_SILENCE_THRESHOLD;