pub struct TelegramConfig {
pub token: Option<String>,
pub allowed_users: Vec<String>,
pub skills: ChannelSkillsConfig,
pub allowed_tools: Option<Vec<String>>,
pub stream_interval_ms: u64,
pub guest_mode: bool,
pub bot_to_bot: bool,
pub allowed_bots: Vec<String>,
pub max_bot_chain_depth: u32,
}Expand description
Telegram channel configuration, nested under [telegram] in TOML.
When present, Zeph connects to Telegram as a bot using the provided token.
The token must be resolved from the vault at runtime via ZEPH_TELEGRAM_TOKEN.
§Example (TOML)
[telegram]
allowed_users = ["myusername"]
stream_interval_ms = 3000
guest_mode = true
bot_to_bot = true
allowed_bots = ["@my_bot"]
max_bot_chain_depth = 1Fields§
§token: Option<String>Bot token. Set to None and resolve from vault via ZEPH_TELEGRAM_TOKEN.
allowed_users: Vec<String>Telegram usernames allowed to interact with the bot (empty = allow all).
skills: ChannelSkillsConfigSkill allowlist for this channel.
allowed_tools: Option<Vec<String>>Tool allowlist for this channel. None means all tools are permitted.
Some(vec![]) denies all tools. Some(vec!["shell"]) allows only listed tools.
stream_interval_ms: u64Minimum interval in milliseconds between streaming message edits.
Defaults to 3000 ms (3 seconds) to stay within Telegram’s rate limits. Values below 500 ms are clamped to 500 ms with a warning; the Telegram Bot API enforces a hard limit of ~30 edits/second per chat.
guest_mode: boolEnable responding to @mentions in any chat (Bot API 10.0 Guest Mode).
When false (default), guest_message updates are ignored.
bot_to_bot: boolEnable receiving messages from other bots (Bot API 10.0).
When false (default), messages where from.is_bot = true are silently dropped.
allowed_bots: Vec<String>Bot usernames allowed to interact when bot_to_bot = true.
Empty list (default) allows all bots. Include the @ prefix (e.g. "@my_bot").
max_bot_chain_depth: u32Maximum reply chain depth before Zeph stops responding to bot messages.
Prevents infinite loops between bots. Checked against both the structural
reply_to_message depth (spec FR-007) and the consecutive-reply counter
for the same chat. Default: 1.
Note: Telegram API payloads only expose one level of reply_to_message
nesting, so values greater than 1 have no additional effect on structural
depth alone. The consecutive-reply counter provides secondary loop
prevention across multiple top-level exchanges.
Trait Implementations§
Source§impl Clone for TelegramConfig
impl Clone for TelegramConfig
Source§fn clone(&self) -> TelegramConfig
fn clone(&self) -> TelegramConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TelegramConfig
impl Debug for TelegramConfig
Source§impl<'de> Deserialize<'de> for TelegramConfig
impl<'de> Deserialize<'de> for TelegramConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TelegramConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TelegramConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for TelegramConfig
impl Serialize for TelegramConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for TelegramConfig
impl RefUnwindSafe for TelegramConfig
impl Send for TelegramConfig
impl Sync for TelegramConfig
impl Unpin for TelegramConfig
impl UnsafeUnpin for TelegramConfig
impl UnwindSafe for TelegramConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request