Skip to content

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

style: apply rustfmt formatting to core and test files

Steven Enamakel87ca7385c3c0
diff --git a/crates/openhuman-core/src/core/runtime/subscribers_tests.rs b/crates/openhuman-core/src/core/runtime/subscribers_tests.rs
index a09ae0d9a4..d9ea879b3f 100644
--- a/crates/openhuman-core/src/core/runtime/subscribers_tests.rs
+++ b/crates/openhuman-core/src/core/runtime/subscribers_tests.rs
@@ -240,12 +240,20 @@ fn proactive_message_reaches_web_on_channelless_core_boot() {
None,
),
));
- profile_host.provision(&id).await.expect("provision profile");
+ profile_host
+ .provision(&id)
+ .await
+ .expect("provision profile");
let profile = profile_host.open(&id).await.expect("open profile");
crate::profiles::host::install(profile_host);
- let ctx = crate::core::runtime::DispatchCtx::new(std::sync::Arc::clone(profile.context()));
+ let ctx = crate::core::runtime::DispatchCtx::new(std::sync::Arc::clone(
+ profile.context(),
+ ));
let tenant = ctx.event_tenant();
- assert_eq!(tenant.as_ref().and_then(|tenant| tenant.profile.as_deref()), Some("proactive-test"));
+ assert_eq!(
+ tenant.as_ref().and_then(|tenant| tenant.profile.as_deref()),
+ Some("proactive-test")
+ );
super::register_domain_subscribers(
std::env::temp_dir(),
diff --git a/crates/openhuman-core/src/modules/mod.rs b/crates/openhuman-core/src/modules/mod.rs
index 88dc3ebe00..bbac80e115 100644
--- a/crates/openhuman-core/src/modules/mod.rs
+++ b/crates/openhuman-core/src/modules/mod.rs
@@ -170,7 +170,10 @@ pub use types::{LoadPolicy, ModuleRecord, ModuleSource, ModuleState, ModuleStatu
/// Imports tinymcp's legacy SQLite files under `data_dir` into the module's
/// storage, once per directory. Never fails the caller: an error is logged and
/// the import is retried at the next open.
-pub async fn import_legacy_mcp(ctx: &crate::core::runtime::DispatchCtx, data_dir: &std::path::Path) {
+pub async fn import_legacy_mcp(
+ ctx: &crate::core::runtime::DispatchCtx,
+ data_dir: &std::path::Path,
+) {
#[cfg(feature = "modules")]
match storage_import_tinymcp::import_legacy(ctx, data_dir).await {
Ok(outcome) => log::debug!("[mcp] legacy storage import: {outcome:?}"),
diff --git a/crates/openhuman-core/src/web_chat/proactive.rs b/crates/openhuman-core/src/web_chat/proactive.rs
index e53ccc1714..117464bb26 100644
--- a/crates/openhuman-core/src/web_chat/proactive.rs
+++ b/crates/openhuman-core/src/web_chat/proactive.rs
@@ -59,44 +59,47 @@ impl EventHandler<DomainEvent> for WebProactiveSubscriber {
};
let thread_id = format!("proactive:{}", job_name.as_deref().unwrap_or("system"));
- publish_web_channel_event_in(&ctx, WebChannelEvent {
- event: "proactive_message".to_string(),
- client_id: "system".to_string(),
- thread_id,
- request_id: uuid::Uuid::new_v4().to_string(),
- full_response: Some(message.clone()),
- message: None,
- error_type: None,
- error_source: None,
- error_retryable: None,
- error_retry_after_ms: None,
- error_provider: None,
- error_fallback_available: None,
- copy_key: None,
- copy_params: None,
- tool_name: None,
- skill_id: None,
- args: None,
- output: None,
- success: Some(true),
- round: None,
- segment_index: None,
- segment_total: None,
- delta: None,
- delta_kind: None,
- tool_call_id: None,
- failure: None,
- citations: None,
- subagent: None,
- tool_display_label: None,
- tool_display_detail: None,
- elapsed_ms: None,
- structured: None,
- usage: None,
- // This event is outside the seq-stamping progress bridge.
- seq: None,
- ..Default::default()
- });
+ publish_web_channel_event_in(
+ &ctx,
+ WebChannelEvent {
+ event: "proactive_message".to_string(),
+ client_id: "system".to_string(),
+ thread_id,
+ request_id: uuid::Uuid::new_v4().to_string(),
+ full_response: Some(message.clone()),
+ message: None,
+ error_type: None,
+ error_source: None,
+ error_retryable: None,
+ error_retry_after_ms: None,
+ error_provider: None,
+ error_fallback_available: None,
+ copy_key: None,
+ copy_params: None,
+ tool_name: None,
+ skill_id: None,
+ args: None,
+ output: None,
+ success: Some(true),
+ round: None,
+ segment_index: None,
+ segment_total: None,
+ delta: None,
+ delta_kind: None,
+ tool_call_id: None,
+ failure: None,
+ citations: None,
+ subagent: None,
+ tool_display_label: None,
+ tool_display_detail: None,
+ elapsed_ms: None,
+ structured: None,
+ usage: None,
+ // This event is outside the seq-stamping progress bridge.
+ seq: None,
+ ..Default::default()
+ },
+ );
tracing::debug!(
source = %source,
diff --git a/tests/storage_desktop_upgrade_e2e.rs b/tests/storage_desktop_upgrade_e2e.rs
index de82318da0..45e883f821 100644
--- a/tests/storage_desktop_upgrade_e2e.rs
+++ b/tests/storage_desktop_upgrade_e2e.rs
@@ -430,7 +430,11 @@ async fn a_desktop_upgrade_is_lossless_and_leaves_the_legacy_files_untouched(cas
// TinyAgents' run ledger imports `sessions.db` (and appends to it) with
// checked batches, which a driver without `ValidatedBatch` refuses.
let local = case.backend().for_scope(&Scope::local()).unwrap();
- if !local.documents().capabilities().contains(Capability::ValidatedBatch) {
+ if !local
+ .documents()
+ .capabilities()
+ .contains(Capability::ValidatedBatch)
+ {
// Written to the stderr handle, not with `eprintln!`, which the test
// harness captures for a passing test: the skip must show in the log.
use std::io::Write;