Skip to content

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

chore: reorder imports and module declarations

Steven Enamakel9869456ea039
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
index 0766e94df0..5119e85a2b 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
@@ -1,9 +1,9 @@
use super::{ArchetypeDelegationTool, DelegationTarget, SpawnSubagentTool};
-use crate::tools::r#impl::threads::SpawnWorkerThreadTool;
use crate::agent::harness::ParentExecutionContext;
-use crate::integrations::ConnectedIntegration;
use crate::agent_registry::host_definition::AgentDefinitionRegistry;
+use crate::integrations::ConnectedIntegration;
use crate::threads::store as conversations;
+use crate::tools::r#impl::threads::SpawnWorkerThreadTool;
use async_trait::async_trait;
use parking_lot::Mutex;
use serde_json::json;
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session.rs b/crates/openhuman-core/src/agent/session_host/runtime_session.rs
index dcd0035064..fbe1ef2b52 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session.rs
@@ -5,12 +5,12 @@
//! prefix reconciliation, tool snapshots, resume and persistence remain inside
//! the runtime session.
-#[path = "../../memory/lifecycle/session_hooks.rs"]
-mod session_hooks;
mod permanent;
mod post_commit;
#[path = "runtime_session/prompt_surface.rs"]
mod prompt_surface;
+#[path = "../../memory/lifecycle/session_hooks.rs"]
+mod session_hooks;
mod tool_rules;
mod transcript;
#[path = "runtime_session_turn.rs"]
diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
index 9f0b00f533..ee9cb0a69b 100644
--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
@@ -22,13 +22,13 @@ use crate::agent::orchestration::tools::{
ListSubagentsDispatch, SpawnAsyncSubagentDispatch, SpawnParallelAgentsDispatch,
SpawnSubagentDispatch, SteerSubagentDispatch, WaitSubagentDispatch,
};
-use crate::tools::r#impl::threads::SpawnWorkerThreadDispatch;
use crate::agent::tinyagents::host::OpenHumanRunContext;
use crate::agent::tinyagents::host::run_context::HostOperationContext;
use crate::agent::tinyagents::turn_policy::is_subagent_spawn_or_delegate_tool;
use crate::agent::tinyagents::use_skill_dispatch::UseSkillDispatch;
use crate::agent::tools::{DelegateToolDispatch, TodoToolDispatch};
use crate::core::runtime::CoreContext;
+use crate::tools::r#impl::threads::SpawnWorkerThreadDispatch;
type RegisteredToolDispatch = Arc<dyn ToolDispatch<(), OpenHumanRunContext>>;
type ToolDispatchSelectorFn =
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_exec.rs b/crates/openhuman-core/src/agent/tinyagents/turn_exec.rs
index e527fcbca8..bddb413952 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_exec.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_exec.rs
@@ -524,10 +524,7 @@ async fn drive_turn(
hosted_security_gate,
pause_at_cap,
run_mode: run_context.thread_id.as_deref().map(|thread_id| {
- crate::threads::run_mode::handle_for_thread(
- &run_context.dispatch_ctx(),
- thread_id,
- )
+ crate::threads::run_mode::handle_for_thread(&run_context.dispatch_ctx(), thread_id)
}),
memory_turn: run_context.memory_turn.clone(),
summarizer_model,
diff --git a/crates/openhuman-core/src/threads/mod.rs b/crates/openhuman-core/src/threads/mod.rs
index 2163ff9f65..3acfe6e4ba 100644
--- a/crates/openhuman-core/src/threads/mod.rs
+++ b/crates/openhuman-core/src/threads/mod.rs
@@ -7,8 +7,8 @@
pub mod artifact_rows;
pub mod error;
pub mod ops;
-pub(crate) mod run_mode;
pub mod rpc_models;
+pub(crate) mod run_mode;
pub mod schemas;
pub mod store;
#[cfg(test)]
@@ -18,13 +18,13 @@ pub mod welcome_migration;
pub(crate) mod worker_mirror;
pub(crate) mod worker_thread;
-pub use error::{ThreadsError, THREAD_NOT_FOUND_KIND};
+pub use error::{THREAD_NOT_FOUND_KIND, ThreadsError};
pub use rpc_models::*;
pub use schemas::{
all_controller_schemas as all_threads_controller_schemas,
all_registered_controllers as all_threads_registered_controllers,
};
-pub use welcome_migration::{migrate_welcome_agent_artifacts, WelcomeMigrationResult};
+pub use welcome_migration::{WelcomeMigrationResult, migrate_welcome_agent_artifacts};
/// Log prefix for thread-title generation (grep-friendly).
pub(crate) const THREAD_TITLE_LOG_PREFIX: &str = "[threads:title]";
diff --git a/crates/openhuman-core/src/web_chat/ops/channel_ops.rs b/crates/openhuman-core/src/web_chat/ops/channel_ops.rs
index e09f7a45f0..cdde7c1e85 100644
--- a/crates/openhuman-core/src/web_chat/ops/channel_ops.rs
+++ b/crates/openhuman-core/src/web_chat/ops/channel_ops.rs
@@ -2,10 +2,10 @@
//! cancelling in-flight turns (primary and parallel, scoped or unscoped), and
//! inspecting/clearing a thread's run queue.
-use serde_json::{json, Value};
+use serde_json::{Value, json};
-use crate::core::runtime::DispatchCtx;
use crate::core::Outcome;
+use crate::core::runtime::DispatchCtx;
use crate::web_chat::WebChannelEvent;
use super::super::event_bus::publish_web_channel_event_in;