Skip to content

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

chore: files changed crates/openhuman-core/src/channels/routes_tests.rs

Steven Enamakel0c33dc7b9770
diff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rs
index 8473dfce25..e70a3b6915 100644
--- a/crates/openhuman-core/src/channels/routes_tests.rs
+++ b/crates/openhuman-core/src/channels/routes_tests.rs
@@ -1,7 +1,7 @@
use super::*;
use crate::agent::messages::ChatMessage;
use crate::channels::context::{ChannelRuntimeContext, RouteSelectionMap, TurnModelSourceCacheMap};
-use crate::channels::telegram::{TelegramRemoteCommand, TelegramRemoteSubscriber};
+use crate::channels::host::ChannelTurnStateSubscriber;
use crate::channels::traits::ChannelMessage;
use crate::core::events::DomainEvent;
use crate::memory::{Memory, MemoryCategory, MemoryEntry};
@@ -170,18 +170,23 @@ fn runtime_command_parsing_and_provider_support_are_channel_scoped() {
);
assert_eq!(
parse_runtime_command("telegram", "/status@OpenHumanBot"),
- Some(ChannelRuntimeCommand::TelegramRemote(
- TelegramRemoteCommand::Status
- ))
+ Some(ChannelRuntimeCommand::Remote(RemoteCommand::Status))
);
assert_eq!(
parse_runtime_command("telegram", "/help"),
- Some(ChannelRuntimeCommand::TelegramRemote(
- TelegramRemoteCommand::Help
- ))
+ Some(ChannelRuntimeCommand::Remote(RemoteCommand::Help))
);
assert_eq!(parse_runtime_command("slack", "/models"), None);
- assert_eq!(parse_runtime_command("discord", "/status"), None);
+ // Remote control is a provider capability, not a Telegram special case.
+ assert_eq!(
+ parse_runtime_command("discord", "/status"),
+ Some(ChannelRuntimeCommand::Remote(RemoteCommand::Status))
+ );
+ assert_eq!(
+ parse_runtime_command("slack", "/new"),
+ Some(ChannelRuntimeCommand::Remote(RemoteCommand::New))
+ );
+ assert_eq!(parse_runtime_command("email", "/status"), None);
assert_eq!(parse_runtime_command("telegram", "hello"), None);
}
@@ -506,7 +511,7 @@ async fn handle_runtime_command_telegram_new_status_and_sessions_round_trip() {
},
);
- let subscriber = TelegramRemoteSubscriber::new(tempdir.path().to_path_buf());
+ let subscriber = ChannelTurnStateSubscriber::new(tempdir.path().to_path_buf());
subscriber
.handle(&DomainEvent::ChannelMessageReceived {
channel: "telegram".into(),