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: apply rustfmt formatting across relay, mcp, and embed tests
Steven Enamakel4bc9a6dab0f3
diff --git a/crates/openhuman-core/src/channels/providers/relay/channel.rs b/crates/openhuman-core/src/channels/providers/relay/channel.rsindex d1524107ee..d68e94dd44 100644--- a/crates/openhuman-core/src/channels/providers/relay/channel.rs+++ b/crates/openhuman-core/src/channels/providers/relay/channel.rs@@ -11,7 +11,7 @@ use async_trait::async_trait;use serde_json::json;use crate::channels::traits::{Channel, ChannelMessage, SendMessage};-use crate::web_chat::{WebChannelEvent, publish_web_channel_event};+use crate::web_chat::{publish_web_channel_event, WebChannelEvent};/// 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/providers/relay/mod.rs b/crates/openhuman-core/src/channels/providers/relay/mod.rsindex d2c9ebde8c..725be88e74 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::{CHANNEL_OUTBOUND_EVENT, RelayChannel};+pub use channel::{RelayChannel, CHANNEL_OUTBOUND_EVENT};pub use ops::channel_relay_inbound;pub use params::{- DEFAULT_RELAY_CLIENT_ID, MAX_CHANNEL_LEN, MAX_ID_LEN, MAX_SENDER_NAME_CHARS, MAX_TEXT_BYTES,- RESERVED_CHANNELS, RelayInboundParams, validate_channel, validate_id,+ validate_channel, validate_id, RelayInboundParams, DEFAULT_RELAY_CLIENT_ID, MAX_CHANNEL_LEN,+ MAX_ID_LEN, MAX_SENDER_NAME_CHARS, MAX_TEXT_BYTES, RESERVED_CHANNELS,};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 d4b38fb90b..094d7345e4 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::{Value, json};+use serde_json::{json, Value};use super::channel::RelayChannel;use super::params::RelayInboundParams;use super::store::{self, Recorded};use crate::channels::context::MAX_CHANNEL_HISTORY;use crate::channels::runtime::{- PromptToolDescs, build_channel_turn_parts, prepare_runtime_limits,- process_channel_runtime_message, runtime_context,+ build_channel_turn_parts, prepare_runtime_limits, process_channel_runtime_message,+ runtime_context, PromptToolDescs,};use crate::config::Config;use crate::core::Outcome;diff --git a/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs b/crates/openhuman-core/src/channels/providers/relay/ops_tests.rsindex a54b7367ab..b84087bf32 100644--- a/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs+++ b/crates/openhuman-core/src/channels/providers/relay/ops_tests.rs@@ -1,6 +1,6 @@use super::super::channel::CHANNEL_OUTBOUND_EVENT;use super::*;-use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, mock_agent_run_turn};+use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};use crate::agent::turn_origin::AgentTurnOrigin;use crate::core::runtime::{ContextOverlay, CoreContext, DomainSet};use std::sync::Mutex;diff --git a/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs b/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rsindex 8f0be869cb..c696065b47 100644--- a/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs+++ b/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs@@ -24,11 +24,9 @@ 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/mcp/module_client.rs b/crates/openhuman-core/src/mcp/module_client.rsindex a93951576f..cc800b1eb7 100644--- a/crates/openhuman-core/src/mcp/module_client.rs+++ b/crates/openhuman-core/src/mcp/module_client.rs@@ -467,26 +467,24 @@ impl McpConfiguredClient {pub(crate) fn agent_close_pending(data_dir: &std::path::Path) -> bool {Self::cleanup_pending(data_dir)|| CLIENTS- .get()- .and_then(|clients| {- clients- .lock()- .unwrap_or_else(std::sync::PoisonError::into_inner)- .get(data_dir)- .map(|client| client.retiring.load(Ordering::Acquire))- })- .unwrap_or(false)+ .get()+ .and_then(|clients| {+ clients+ .lock()+ .unwrap_or_else(std::sync::PoisonError::into_inner)+ .get(data_dir)+ .map(|client| client.retiring.load(Ordering::Acquire))+ })+ .unwrap_or(false)}fn cleanup_pending(data_dir: &std::path::Path) -> bool {- CLEANUP_RESERVATIONS- .get()- .is_some_and(|reservations| {- reservations- .lock()- .unwrap_or_else(std::sync::PoisonError::into_inner)- .contains_key(data_dir)- })+ CLEANUP_RESERVATIONS.get().is_some_and(|reservations| {+ reservations+ .lock()+ .unwrap_or_else(std::sync::PoisonError::into_inner)+ .contains_key(data_dir)+ })}fn reservation_for(data_dir: &std::path::Path) -> Arc<CleanupReservation> {diff --git a/crates/openhuman-core/src/modules/tinybox_tests.rs b/crates/openhuman-core/src/modules/tinybox_tests.rsindex fe5acb28c4..cb6a5c430f 100644--- a/crates/openhuman-core/src/modules/tinybox_tests.rs+++ b/crates/openhuman-core/src/modules/tinybox_tests.rs@@ -2,7 +2,7 @@use std::sync::{Arc, Mutex};-use serde_json::{Value, json};+use serde_json::{json, Value};use tinybus::broker::Broker;use tinybus::service::Interface;use tinybus::transport::memory::MemoryBus;@@ -557,8 +557,8 @@ async fn no_workspace_docker_refusal_is_not_retried_as_an_ordinary_call() {}#[tokio::test]-async fn docker_controls_use_typed_calls_with_validated_contract_capability()--> Result<(), Box<dyn std::error::Error>> {+async fn docker_controls_use_typed_calls_with_validated_contract_capability(+) -> Result<(), Box<dyn std::error::Error>> {let (_service, client, calls) = mock_client().await;let status = call_docker_status_with_client(&client,diff --git a/crates/openhuman-embed/tests/approval_lifecycle.rs b/crates/openhuman-embed/tests/approval_lifecycle.rsindex 50e86fdc01..e85a6cb752 100644--- a/crates/openhuman-embed/tests/approval_lifecycle.rs+++ b/crates/openhuman-embed/tests/approval_lifecycle.rs@@ -371,10 +371,10 @@ async fn removal_reserves_ids_until_cleanup_finishes(runtime: Arc<Runtime>, scraruntime.agent_ids().iter().any(|reserved| reserved == id),"removal must retain the id reservation until cleanup finishes");- assert!(- openhuman_core::agent::host_agents::resolve(id).is_none(),- "removed agents must not admit new sessions through core drivers"- );+ assert!(+ openhuman_core::agent::host_agents::resolve(id).is_none(),+ "removed agents must not admit new sessions through core drivers"+ );assert!(matches!(runtime.remove_agent(id).await, Err(AgentError::UnknownId(ref removed)) if removed == id),"a second removal cannot claim the same cleanup reservation"