Struct ChannelsConfig
pub struct ChannelsConfig {Show 45 fields
pub cli: bool,
pub telegram: HashMap<String, TelegramConfig>,
pub discord: HashMap<String, DiscordConfig>,
pub slack: HashMap<String, SlackConfig>,
pub mattermost: HashMap<String, MattermostConfig>,
pub webhook: HashMap<String, WebhookConfig>,
pub imessage: HashMap<String, IMessageConfig>,
pub matrix: HashMap<String, MatrixConfig>,
pub signal: HashMap<String, SignalConfig>,
pub whatsapp: HashMap<String, WhatsAppConfig>,
pub linq: HashMap<String, LinqConfig>,
pub wati: HashMap<String, WatiConfig>,
pub nextcloud_talk: HashMap<String, NextcloudTalkConfig>,
pub email: HashMap<String, EmailConfig>,
pub gmail_push: HashMap<String, GmailPushConfig>,
pub irc: HashMap<String, IrcConfig>,
pub twitch: HashMap<String, TwitchConfig>,
pub lark: HashMap<String, LarkConfig>,
pub line: HashMap<String, LineConfig>,
pub dingtalk: HashMap<String, DingTalkConfig>,
pub wecom: HashMap<String, WeComConfig>,
pub wecom_ws: HashMap<String, WeComWsConfig>,
pub wechat: HashMap<String, WeChatConfig>,
pub qq: HashMap<String, QQConfig>,
pub twitter: HashMap<String, TwitterConfig>,
pub mochat: HashMap<String, MochatConfig>,
pub nostr: HashMap<String, NostrConfig>,
pub clawdtalk: HashMap<String, ClawdTalkConfig>,
pub reddit: HashMap<String, RedditConfig>,
pub bluesky: HashMap<String, BlueskyConfig>,
pub git: HashMap<String, GitConfig>,
pub voice_call: HashMap<String, VoiceCallConfig>,
pub voice_wake: HashMap<String, VoiceWakeConfig>,
pub voice_duplex: HashMap<String, VoiceDuplexConfig>,
pub mqtt: HashMap<String, MqttConfig>,
pub amqp: HashMap<String, AmqpConfig>,
pub filesystem: HashMap<String, FilesystemConfig>,
pub message_timeout_secs: u64,
pub max_concurrent_per_channel: usize,
pub ack_reactions: bool,
pub show_tool_calls: bool,
pub session_persistence: bool,
pub session_backend: String,
pub session_ttl_hours: u32,
pub debounce_ms: u64,
}Expand description
Top-level channel configurations ([channels] section).
each channel type is a keyed table of named instances (aliases).
[channels.telegram.default] is the conventional single-instance key.
Access via config.channels.telegram.get("default").
Fields§
§cli: boolEnable the CLI interactive channel. Default: true.
telegram: HashMap<String, TelegramConfig>Telegram bot channel instances ([channels.telegram.<alias>]).
discord: HashMap<String, DiscordConfig>Discord bot channel instances ([channels.discord.<alias>]).
slack: HashMap<String, SlackConfig>Slack bot channel instances ([channels.slack.<alias>]).
mattermost: HashMap<String, MattermostConfig>Mattermost bot channel instances ([channels.mattermost.<alias>]).
webhook: HashMap<String, WebhookConfig>Webhook channel instances ([channels.webhook.<alias>]).
imessage: HashMap<String, IMessageConfig>iMessage channel instances ([channels.imessage.<alias>], macOS only).
matrix: HashMap<String, MatrixConfig>Matrix channel instances ([channels.matrix.<alias>]).
signal: HashMap<String, SignalConfig>Signal channel instances ([channels.signal.<alias>]).
whatsapp: HashMap<String, WhatsAppConfig>WhatsApp channel instances ([channels.whatsapp.<alias>]).
linq: HashMap<String, LinqConfig>Linq Partner API channel instances ([channels.linq.<alias>]).
wati: HashMap<String, WatiConfig>WATI WhatsApp Business API channel instances ([channels.wati.<alias>]).
nextcloud_talk: HashMap<String, NextcloudTalkConfig>Nextcloud Talk bot channel instances ([channels.nextcloud_talk.<alias>]).
email: HashMap<String, EmailConfig>Email channel instances ([channels.email.<alias>]).
gmail_push: HashMap<String, GmailPushConfig>Gmail Pub/Sub push notification channel instances ([channels.gmail_push.<alias>]).
irc: HashMap<String, IrcConfig>IRC channel instances ([channels.irc.<alias>]).
twitch: HashMap<String, TwitchConfig>Twitch chat channel instances ([channels.twitch.<alias>]).
lark: HashMap<String, LarkConfig>Lark channel instances ([channels.lark.<alias>]).
line: HashMap<String, LineConfig>LINE Messaging API channel instances ([channels.line.<alias>]).
dingtalk: HashMap<String, DingTalkConfig>DingTalk channel instances ([channels.dingtalk.<alias>]).
wecom: HashMap<String, WeComConfig>WeCom (WeChat Enterprise) Bot Webhook channel instances ([channels.wecom.<alias>]).
wecom_ws: HashMap<String, WeComWsConfig>WeCom AI Bot WebSocket channel instances ([channels.wecom_ws.<alias>]).
wechat: HashMap<String, WeChatConfig>WeChat personal iLink Bot channel instances ([channels.wechat.<alias>]).
qq: HashMap<String, QQConfig>QQ Official Bot channel instances ([channels.qq.<alias>]).
twitter: HashMap<String, TwitterConfig>X/Twitter channel instances ([channels.twitter.<alias>]).
mochat: HashMap<String, MochatConfig>Mochat customer service channel instances ([channels.mochat.<alias>]).
nostr: HashMap<String, NostrConfig>§clawdtalk: HashMap<String, ClawdTalkConfig>ClawdTalk voice channel instances ([channels.clawdtalk.<alias>]).
reddit: HashMap<String, RedditConfig>Reddit channel instances ([channels.reddit.<alias>]).
bluesky: HashMap<String, BlueskyConfig>Bluesky channel instances ([channels.bluesky.<alias>]).
git: HashMap<String, GitConfig>Git-forge channel instances ([channels.git.<alias>]). GitHub is
the first provider; the provider field selects the forge.
voice_call: HashMap<String, VoiceCallConfig>Voice call channel instances ([channels.voice_call.<alias>]).
voice_wake: HashMap<String, VoiceWakeConfig>Voice wake word detection channel instances ([channels.voice_wake.<alias>]).
voice_duplex: HashMap<String, VoiceDuplexConfig>Voice duplex instances ([channels.voice_duplex.<alias>]).
mqtt: HashMap<String, MqttConfig>MQTT channel instances ([channels.mqtt.<alias>]).
amqp: HashMap<String, AmqpConfig>AMQP channel instances ([channels.amqp.<alias>]).
filesystem: HashMap<String, FilesystemConfig>Filesystem SOP listener instances ([channels.filesystem.<alias>]).
message_timeout_secs: u64Base timeout in seconds for processing a single channel message (LLM + tools). Runtime uses this as a per-turn budget that scales with tool-loop depth (up to 4x, capped) so one slow/retried model call does not consume the entire conversation budget. Default: 300s for on-device LLMs (Ollama) which are slower than cloud APIs.
max_concurrent_per_channel: usizePer-channel multiplier for the global channel message in-flight budget.
Runtime multiplies this value by the configured channel count, then
applies its global minimum and maximum bounds to one shared dispatcher
semaphore. Default: 4.
ack_reactions: boolWhether to add acknowledgement reactions (👀 on receipt, ✅/⚠️ on
completion) to incoming channel messages. Default: true.
show_tool_calls: boolWhether to send tool-call notification messages (e.g. 🔧 web_search_tool: …)
to channel users. When false, tool calls are still logged server-side but
not forwarded as individual channel messages. Default: false.
session_persistence: boolPersist channel conversation history to JSONL files so sessions survive
daemon restarts. Files are stored in {workspace}/sessions/. Default: true.
session_backend: StringSession persistence backend: "jsonl" (legacy) or "sqlite" (new default).
SQLite provides FTS5 search, metadata tracking, and TTL cleanup.
session_ttl_hours: u32Auto-archive stale sessions older than this many hours. 0 disables. Default: 0.
debounce_ms: u64Inbound message debounce window in milliseconds. When a sender fires
multiple messages within this window, they are accumulated and dispatched
as a single concatenated message. 0 disables debouncing. Default: 0.
Implementations§
Source§impl ChannelsConfig
impl ChannelsConfig
Sourcepub fn configurable_prefix() -> &'static str
pub fn configurable_prefix() -> &'static str
Returns the #[prefix] value for this Configurable struct.
Sourcepub fn secret_fields(&self) -> Vec<SecretFieldInfo>
pub fn secret_fields(&self) -> Vec<SecretFieldInfo>
Returns metadata about all #[secret] fields on this struct and nested children.
pub fn secret_field_terminals() -> Vec<&'static str>
Sourcepub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
pub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
Encrypt all secret fields in place using the provided store.
Sourcepub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
pub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
Decrypt all secret fields in place using the provided store.
Sourcepub fn set_secret(&mut self, name: &str, value: String) -> Result<(), Error>
pub fn set_secret(&mut self, name: &str, value: String) -> Result<(), Error>
Set a secret field by its full dotted name, dispatching to nested children.
Sourcepub fn prop_fields(&self) -> Vec<PropFieldInfo>
pub fn prop_fields(&self) -> Vec<PropFieldInfo>
Returns metadata about all property fields on this struct and nested children.
Sourcepub fn get_prop(&self, name: &str) -> Result<String, Error>
pub fn get_prop(&self, name: &str) -> Result<String, Error>
Get a property value by its full dotted name, returning it as a display string.
Sourcepub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<(), Error>
pub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<(), Error>
Set a property value by its full dotted name, parsing from string.
Sourcepub fn prop_is_secret(name: &str) -> bool
pub fn prop_is_secret(name: &str) -> bool
Check if a property name refers to a secret field (static, no instance needed).
Sourcepub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
pub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
Instantiate None nested sections whose prefix matches.
Returns the prefixes that were initialized.
Sourcepub fn map_key_sections() -> Vec<MapKeySection>
pub fn map_key_sections() -> Vec<MapKeySection>
Enumerate every map-keyed (HashMap<String, T>) and list-shaped
(Vec<T>) section discoverable from this Configurable’s tree.
The dashboard / CLI consume this to surface “+ Add” affordances
without hardcoding the section list.
Sourcepub fn nested_section_help(name: &str) -> Option<&'static str>
pub fn nested_section_help(name: &str) -> Option<&'static str>
Help blurb for a #[nested] field on this struct, sourced from
the field-level /// docstring. Returns None for unknown
names so callers can fall through to a different lookup.
pub fn nested_section_group(name: &str) -> Option<&'static str>
Sourcepub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
pub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
Return the current alias keys at section_path, or None if
the path doesn’t resolve to a map-keyed section in this tree.
pub fn nested_option_entries(&self) -> Vec<NestedOptionEntry>
pub fn create_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
pub fn delete_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
pub fn rename_map_key( &mut self, section_path: &str, map_key: &str, new_key: &str, ) -> Result<bool, String>
Source§impl ChannelsConfig
impl ChannelsConfig
Sourcepub fn channels(&self) -> Vec<ChannelInfo>
pub fn channels(&self) -> Vec<ChannelInfo>
Returns metadata and configuration status for every known channel type.
Always returns the full set of channel types regardless of compile-time
feature flags — the configured flag reflects whether the operator has
populated that channel’s config section. For a list restricted to only
the channels compiled into this binary use
zeroclaw_channels::listing::compiled_channels instead.
Sourcepub fn has_any_enabled(&self) -> bool
pub fn has_any_enabled(&self) -> bool
Returns true when at least one channel entry across all channel types
has enabled = true. Used by the daemon to decide whether the channels
supervisor should be started — a config with only enabled = false
entries (e.g. partially-configured or disabled bots) must not start the
supervisor, otherwise it exits immediately and restarts in a tight loop.
Sourcepub fn channel_presence(&self) -> [(&'static str, bool, bool); 36]
pub fn channel_presence(&self) -> [(&'static str, bool, bool); 36]
One (canonical_name, configured, deliverable) row per channel in the
registry. Single source for name-addressed channel lookups so no surface
has to hardcode a subset of the channel list. deliverable is false
for input-only transports whose Channel::send is a no-op (mqtt and
amqp are fan-in listeners; voice_wake is input-only), so a name-addressed
outbound surface such as heartbeat.target can refuse them at validation
instead of accepting a target the delivery layer silently drops.
Sourcepub fn is_channel_configured(&self, name: &str) -> bool
pub fn is_channel_configured(&self, name: &str) -> bool
Whether a channel named name (case-insensitive) is a known channel
with at least one configured instance. Used by name-addressed surfaces
(e.g. heartbeat.target) without hardcoding a subset of the registry.
Sourcepub fn is_known_channel(&self, name: &str) -> bool
pub fn is_known_channel(&self, name: &str) -> bool
Whether name (case-insensitive) names a channel in the registry,
regardless of whether it is configured.
Sourcepub fn is_channel_deliverable(&self, name: &str) -> bool
pub fn is_channel_deliverable(&self, name: &str) -> bool
Whether name (case-insensitive) names a channel that can actually
deliver an outbound message. Input-only transports (mqtt, amqp,
voice_wake) are known and may be configured, but their Channel::send
is a no-op, so they are not valid outbound targets.
Trait Implementations§
Source§impl Clone for ChannelsConfig
impl Clone for ChannelsConfig
Source§fn clone(&self) -> ChannelsConfig
fn clone(&self) -> ChannelsConfig
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChannelsConfig
impl Debug for ChannelsConfig
Source§impl Default for ChannelsConfig
impl Default for ChannelsConfig
Source§fn default() -> ChannelsConfig
fn default() -> ChannelsConfig
Source§impl<'de> Deserialize<'de> for ChannelsConfig
impl<'de> Deserialize<'de> for ChannelsConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChannelsConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChannelsConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ChannelsConfig
impl JsonSchema for ChannelsConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl MaskSecrets for ChannelsConfig
impl MaskSecrets for ChannelsConfig
fn mask_secrets(&mut self)
fn restore_secrets_from(&mut self, current: &ChannelsConfig)
Source§impl Serialize for ChannelsConfig
impl Serialize for ChannelsConfig
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 ChannelsConfig
impl RefUnwindSafe for ChannelsConfig
impl Send for ChannelsConfig
impl Sync for ChannelsConfig
impl Unpin for ChannelsConfig
impl UnsafeUnpin for ChannelsConfig
impl UnwindSafe for ChannelsConfig
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more