Skip to content

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

refactor(channels): update context imports to use tinychannels_bus

Steven Enamakel53b0b03e412d
diff --git a/crates/openhuman-core/src/channels/context.rs b/crates/openhuman-core/src/channels/context.rs
index 263cc41ee9..cf18bb176f 100644
--- a/crates/openhuman-core/src/channels/context.rs
+++ b/crates/openhuman-core/src/channels/context.rs
@@ -10,14 +10,14 @@ use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use tinytools::Tool;
-pub(crate) use tinychannels_runtime::context::{
- ChannelRouteSelection, CHANNEL_MESSAGE_TIMEOUT_SECS, CHANNEL_TYPING_REFRESH_INTERVAL_SECS,
+pub(crate) use tinychannels_bus::{
+ CHANNEL_MESSAGE_TIMEOUT_SECS, CHANNEL_TYPING_REFRESH_INTERVAL_SECS, ChannelRouteSelection,
DEFAULT_CHANNEL_INITIAL_BACKOFF_SECS, DEFAULT_CHANNEL_MAX_BACKOFF_SECS, MAX_CHANNEL_HISTORY,
};
#[cfg(test)]
pub(crate) use tinychannels::context::{
- effective_channel_message_timeout_secs, MIN_CHANNEL_MESSAGE_TIMEOUT_SECS,
+ MIN_CHANNEL_MESSAGE_TIMEOUT_SECS, effective_channel_message_timeout_secs,
};
pub(crate) type TurnModelSourceCacheMap = Arc<Mutex<HashMap<String, TurnModelSource>>>;
diff --git a/crates/openhuman-core/src/channels/context_tests.rs b/crates/openhuman-core/src/channels/context_tests.rs
index efc293cb22..6753bcd625 100644
--- a/crates/openhuman-core/src/channels/context_tests.rs
+++ b/crates/openhuman-core/src/channels/context_tests.rs
@@ -90,12 +90,11 @@ fn timeout_and_history_keys_respect_channel_rules() {
#[tokio::test]
async fn overflow_detection_covers_edge_cases() {
let ctx = runtime_context();
- assert!(is_context_window_overflow_error(
- &ctx,
- &anyhow::anyhow!("Maximum context length exceeded")
- )
- .await
- .unwrap());
+ assert!(
+ is_context_window_overflow_error(&ctx, &anyhow::anyhow!("Maximum context length exceeded"))
+ .await
+ .unwrap()
+ );
assert!(
!is_context_window_overflow_error(&ctx, &anyhow::anyhow!("network timeout"))
.await