Skip to content

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

style: reorder imports and wrap long signature

Steven Enamakela9f533c40e9f
diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions.rs b/crates/openhuman-core/src/agent/orchestration/background_completions.rs
index 863d55b339..3818f8fe18 100644
--- a/crates/openhuman-core/src/agent/orchestration/background_completions.rs
+++ b/crates/openhuman-core/src/agent/orchestration/background_completions.rs
@@ -24,10 +24,10 @@
use crate::core::runtime::DispatchCtx;
use std::collections::{HashMap, HashSet, VecDeque};
mod thread_index;
+use thread_index::{key, note_thread_workspace};
pub(crate) use thread_index::{
note_session_thread, router_for_thread, thread_for_session, workspace_for_thread,
};
-use thread_index::{key, note_thread_workspace};
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex, OnceLock};
diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery.rs
index 9fa49c53b3..99c88611e3 100644
--- a/crates/openhuman-core/src/agent/orchestration/background_delivery.rs
+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery.rs
@@ -44,9 +44,9 @@ use tinybus::EventHandler;
use tinybus::SubscriptionHandle;
mod slot;
-use slot::DeliverySlot;
#[cfg(test)]
use slot::delivering;
+use slot::DeliverySlot;
use super::background_completions;
use super::busy_guard::is_busy;
diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rs
index 725ded3aea..bfabbc4017 100644
--- a/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rs
+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery/slot.rs
@@ -28,7 +28,11 @@ pub(super) struct DeliverySlot {
impl DeliverySlot {
/// `None` when a delivery is already in flight for the thread.
- pub(super) fn claim(ctx: &DispatchCtx, thread_id: &str, router: Arc<CompletionRouter>) -> Option<Self> {
+ pub(super) fn claim(
+ ctx: &DispatchCtx,
+ thread_id: &str,
+ router: Arc<CompletionRouter>,
+ ) -> Option<Self> {
let key = tenant::profile_key_in(&super::super::busy_guard::caller(ctx), thread_id);
let mut d = delivering().lock().expect("delivering poisoned");
if !d.insert(key.clone()) {
diff --git a/crates/openhuman-core/src/security/devices/rpc.rs b/crates/openhuman-core/src/security/devices/rpc.rs
index 5299345a2c..09ef1b8054 100644
--- a/crates/openhuman-core/src/security/devices/rpc.rs
+++ b/crates/openhuman-core/src/security/devices/rpc.rs
@@ -138,10 +138,7 @@ pub async fn devices_create_pairing(
core_pubkey: core_pubkey.clone(),
rpc_url: rpc_url.clone(),
expires_at: expires_at.clone(),
- agent: ctx
- .tenant()
- .ok()
- .and_then(|tenant| tenant.agent),
+ agent: ctx.tenant().ok().and_then(|tenant| tenant.agent),
},
);