Skip to content

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

fix: replace `tinychannels` with `tinychannels_bus` across five modules

Steven Enamakeld2e98d2f29ea
diff --git a/src/core/events.rs b/src/core/events.rs
index cd030d59d7..2b456a1d76 100644
--- a/src/core/events.rs
+++ b/src/core/events.rs
@@ -390,7 +390,7 @@ pub enum DomainEvent {
thread_ts: Option<String>,
/// Provider-neutral envelope projected from the inbound channel message.
/// Legacy publishers may omit it until they adopt TinyChannels.
- inbound_envelope: Option<tinychannels::ChannelInboundEnvelope>,
+ inbound_envelope: Option<tinychannels_bus::ChannelInboundEnvelope>,
/// Workspace directory active when this event was published.
/// Subscribers that persist data must reject events whose
/// `workspace_dir` does not match their own workspace binding.
diff --git a/src/openhuman/config/schema/channels.rs b/src/openhuman/config/schema/channels.rs
index 2cedc6e7ad..ffd2d3f56f 100644
--- a/src/openhuman/config/schema/channels.rs
+++ b/src/openhuman/config/schema/channels.rs
@@ -4,7 +4,7 @@
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
-pub use tinychannels::config::{
+pub use tinychannels_bus::config::{
ChannelsConfig, DingTalkConfig, DiscordConfig, EmailConfig, IMessageConfig, IrcConfig,
LarkConfig, LarkReceiveMode, LinqConfig, MatrixConfig, MattermostConfig, QQConfig,
SignalConfig, SlackConfig, StreamMode, TelegramConfig, WebhookConfig, WhatsAppConfig,
diff --git a/src/openhuman/cron/bus.rs b/src/openhuman/cron/bus.rs
index 1d62e24558..33ea25588c 100644
--- a/src/openhuman/cron/bus.rs
+++ b/src/openhuman/cron/bus.rs
@@ -11,7 +11,7 @@ use async_trait::async_trait;
use std::collections::HashMap;
use std::sync::Arc;
use tinybus::EventHandler;
-use tinychannels::{Channel, SendMessage};
+use tinychannels_bus::{Channel, SendMessage};
/// Subscribes to `CronDeliveryRequested` events and dispatches
/// the output to the named channel.
@@ -100,7 +100,7 @@ impl EventHandler<DomainEvent> for CronDeliverySubscriber {
mod tests {
use super::*;
use std::sync::atomic::{AtomicUsize, Ordering};
- use tinychannels::ChannelMessage;
+ use tinychannels_bus::ChannelMessage;
use tokio::sync::mpsc;
/// Minimal mock channel that tracks send() calls.
diff --git a/src/openhuman/memory/conversations/bus.rs b/src/openhuman/memory/conversations/bus.rs
index 890ec1d789..cd7cd08cf2 100644
--- a/src/openhuman/memory/conversations/bus.rs
+++ b/src/openhuman/memory/conversations/bus.rs
@@ -12,8 +12,8 @@ use serde_json::json;
use crate::core::events::DomainEvent;
use tinybus::EventHandler;
use tinybus::SubscriptionHandle;
-use tinychannels::context::conversation_history_key;
-use tinychannels::ChannelMessage;
+use tinychannels_bus::context::conversation_history_key;
+use tinychannels_bus::ChannelMessage;
use tinycortex::memory::conversations::{
append_message, ensure_thread, get_messages, ConversationMessage, CreateConversationThread,
@@ -302,11 +302,11 @@ fn persist_channel_turn(
Ok(())
}
-fn tinychannels_session_key(envelope: &tinychannels::ChannelInboundEnvelope) -> String {
- tinychannels::build_session_key_for_inbound_envelope(
+fn tinychannels_session_key(envelope: &tinychannels_bus::ChannelInboundEnvelope) -> String {
+ tinychannels_bus::build_session_key_for_inbound_envelope(
"main",
envelope,
- tinychannels::channel::SessionKeyPolicy::default(),
+ tinychannels_bus::channel::SessionKeyPolicy::default(),
)
}
@@ -375,7 +375,7 @@ mod tests {
let temp = TempDir::new().expect("tempdir");
let subscriber = ConversationPersistenceSubscriber::new(temp.path().to_path_buf());
let mut inbound_envelope =
- tinychannels::inbound_envelope_from_legacy_message(&ChannelMessage {
+ tinychannels_bus::inbound_envelope_from_legacy_message(&ChannelMessage {
channel: "slack".into(),
id: "m1".into(),
sender: "alice".into(),
@@ -384,7 +384,7 @@ mod tests {
thread_ts: Some("thread-1".into()),
timestamp: 0,
});
- inbound_envelope.conversation.kind = tinychannels::channel::ConversationKind::Channel;
+ inbound_envelope.conversation.kind = tinychannels_bus::channel::ConversationKind::Channel;
inbound_envelope.conversation.scope_id = Some("T123".into());
subscriber
diff --git a/src/openhuman/security/pairing.rs b/src/openhuman/security/pairing.rs
index 7ba69608cb..2b69bfba78 100644
--- a/src/openhuman/security/pairing.rs
+++ b/src/openhuman/security/pairing.rs
@@ -13,7 +13,7 @@ use std::os::unix::fs::OpenOptionsExt as _;
/// `PairingGuard`, `constant_time_eq`, and the pairing lockout constants now
/// live in tinychannels (portable, self-contained); re-export them so existing
/// callers (channels, `core::auth`, tests) keep their paths.
-pub use tinychannels::security::{
+pub use tinychannels_bus::security::{
constant_time_eq, generate_code, generate_token, hash_token, is_token_hash, PairingGuard,
MAX_PAIR_ATTEMPTS, PAIR_LOCKOUT_SECS,
};