Skip to content

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

style(startup): reorder imports and fix formatting

Steven Enamakel7798f63fd177
diff --git a/crates/openhuman-core/src/channels/runtime/startup.rs b/crates/openhuman-core/src/channels/runtime/startup.rs
index 0215d71717..939431462c 100644
--- a/crates/openhuman-core/src/channels/runtime/startup.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup.rs
@@ -5,8 +5,8 @@ mod chat_workload;
mod credentials;
mod delivery_import;
mod module_providers;
-mod prompt;
mod progressive_transport;
+mod prompt;
#[cfg(test)]
mod relay;
mod start_channels;
@@ -54,7 +54,7 @@ pub(crate) async fn prepare_runtime_limits(
pub(crate) use credentials::hydrate_channel_credentials;
pub use start_channels::start_channels;
pub(crate) use start_channels::start_channels_with_session;
-pub(crate) use turn_parts::{build_channel_turn_parts, runtime_context, PromptToolDescs};
+pub(crate) use turn_parts::{PromptToolDescs, build_channel_turn_parts, runtime_context};
// Re-exported at module scope (rather than left as private `pub(super)`
// items reached only through their owning submodule) so the `#[path]` test
@@ -63,7 +63,7 @@ pub(crate) use turn_parts::{build_channel_turn_parts, runtime_context, PromptToo
#[cfg(test)]
use crate::config::Config;
#[cfg(test)]
-use chat_workload::{resolve_chat_workload, ChatWorkloadResolution};
+use chat_workload::{ChatWorkloadResolution, resolve_chat_workload};
#[cfg(any(test, debug_assertions))]
use credentials::resolve_yuanbao_app_secret;
#[cfg(test)]
diff --git a/crates/openhuman-core/src/channels/runtime/startup/callback.rs b/crates/openhuman-core/src/channels/runtime/startup/callback.rs
index fd2ecc77f2..5da24d9fd7 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/callback.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/callback.rs
@@ -302,7 +302,9 @@ impl ChannelHostCallbacks {
.as_deref()
.ok_or_else(|| Error::failed("progressive output turn identity is required"))?;
if let Some(observer) = &self.output_observer {
- observer.observe(channel, conversation, turn_id, *sequence, event).await?;
+ observer
+ .observe(channel, conversation, turn_id, *sequence, event)
+ .await?;
}
return Ok(ProgressiveTransportResult::Acknowledged);
}
diff --git a/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs b/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs
index a5af7e1111..cbdd61affc 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs
@@ -19,11 +19,11 @@ use std::collections::BTreeMap;
use std::path::Path;
use std::sync::Arc;
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use sha2::Digest;
use tinychannels_bus::module_delivery::{
- DeliveryQueueEntry, DeliveryTerminalResult, DELIVERY_PENDING_CAPACITY, DELIVERY_RECORD_BYTES,
- DELIVERY_RESULT_CAPACITY, DELIVERY_RESULT_TTL_SECONDS,
+ DELIVERY_PENDING_CAPACITY, DELIVERY_RECORD_BYTES, DELIVERY_RESULT_CAPACITY,
+ DELIVERY_RESULT_TTL_SECONDS, DeliveryQueueEntry, DeliveryTerminalResult,
};
use tinystoragedrivers::{CollectionSpec, DocumentStore, ErrorKind, Precondition};
@@ -148,7 +148,7 @@ async fn import_into(docs: &Arc<dyn DocumentStore>, workspace: &Path) -> anyhow:
return Err(anyhow::anyhow!(
"write {collection} record: {:?}",
error.kind()
- ))
+ ));
}
}
}
diff --git a/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs
index e712d08b5d..5989f0b1d3 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs
@@ -587,4 +587,3 @@ impl ModuleChannel {
}
}
}
-
diff --git a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
index 26e46f47bb..5d456a0a5d 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
@@ -3,7 +3,7 @@
use super::super::dispatch::run_message_dispatch_loop;
use super::module_providers::ModuleChannelRuntime;
-use super::turn_parts::{build_channel_turn_parts, runtime_context, PromptToolDescs};
+use super::turn_parts::{PromptToolDescs, build_channel_turn_parts, runtime_context};
use crate::config::Config;
use crate::core::bus::BUS;
use crate::core::events::DomainEvent;
diff --git a/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs b/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs
index 7d9dfe7093..e61c878585 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs
@@ -6,7 +6,7 @@
//! the caller's own config and policy, so a relayed turn never runs with the
//! operator's tools or workspace.
-use super::chat_workload::{resolve_chat_workload, ChatWorkloadResolution};
+use super::chat_workload::{ChatWorkloadResolution, resolve_chat_workload};
use super::prompt::format_access_context;
use crate::agent::host_runtime;
use crate::channels::context::ChannelRuntimeContext;
diff --git a/crates/openhuman-core/src/channels/runtime/startup_tests.rs b/crates/openhuman-core/src/channels/runtime/startup_tests.rs
index e8af9daf17..691e9fd8da 100644
--- a/crates/openhuman-core/src/channels/runtime/startup_tests.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup_tests.rs
@@ -7,7 +7,7 @@
//! (cloud) path is preserved for users who haven't picked a local /
//! BYOK model, and the override path activates for those who have.
-use super::{resolve_chat_workload, ChatWorkloadResolution, RelayInboundMessageHandler};
+use super::{ChatWorkloadResolution, RelayInboundMessageHandler, resolve_chat_workload};
use crate::config::Config;
use tinychannels::relay::RelayInboundHandler;