You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(channels): Telegram Guest Mode and Bot-to-Bot communication (Bot API 10.0) (#3748)
Implement two Bot API 10.0 features for zeph-channels:
Guest Mode (#3729): bot responds to @mentions in any Telegram chat without
membership. A local bidirectional axum proxy intercepts getUpdates traffic,
injecting "guest_message" into allowed_updates and forwarding guest_message
updates to the agent via a shared mpsc channel. Responses are routed through
answerGuestQuery (one-shot, no editMessageText). Access control checks
allowed_users before any LLM call. System prompt is annotated with guest
context when is_guest_context is set on ChannelMessage.
Bot-to-Bot communication (#3730): bot can receive and respond to messages
from other Telegram bots. Calls setManagedBotAccessSettings at startup when
bot_to_bot = true. Loop prevention uses dual-check: structural reply chain
depth (spec FR-007, walk reply_to_message bounded by max+1) plus consecutive
bot-reply counter per chat (defense-in-depth). Default max_bot_chain_depth=1
to reflect the Telegram API payload's single nesting level.
New config fields under [telegram]:
guest_mode = false
bot_to_bot = false
allowed_bots = []
max_bot_chain_depth = 1
New ChannelMessage fields: is_guest_context, is_from_bot.
All 31 construction sites across the workspace updated.
9 new unit tests in zeph-channels (9089 total, +10 vs main).
Closes#3729, Closes#3730
0 commit comments