pub struct ChannelsConfig {Show 40 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 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 voice_call: HashMap<String, VoiceCallConfig>,
pub voice_wake: HashMap<String, VoiceWakeConfig>,
pub voice_duplex: HashMap<String, VoiceDuplexConfig>,
pub mqtt: HashMap<String, MqttConfig>,
pub message_timeout_secs: u64,
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>]).
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>]).
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>]).
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.
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.
Sourcepub fn secret_field_terminals() -> Vec<&'static str>
pub fn secret_field_terminals() -> Vec<&'static str>
Static enumeration of every #[secret] field’s terminal name
(snake_case, matching the on-disk TOML key) reachable from
this type via #[nested] traversal. Unlike secret_fields(),
this requires no instance — the per-struct codegen literals
are joined at call time with recursive calls into the inner
types’ own secret_field_terminals().
Used by the migration crate’s raw-TOML encrypt walker as the
secret-key allowlist. prop_fields()-derived allowlists skip
compound (non-Vec) #[secret] fields, so this method is the
authoritative source.
Sourcepub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
pub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
Encrypt all secret fields in place using the provided store.
Sourcepub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
pub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<()>
Decrypt all secret fields in place using the provided store.
Sourcepub fn set_secret(&mut self, name: &str, value: String) -> Result<()>
pub fn set_secret(&mut self, name: &str, value: String) -> Result<()>
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>
pub fn get_prop(&self, name: &str) -> Result<String>
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<()>
pub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<()>
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.
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.
Sourcepub fn nested_option_entries(&self) -> Vec<NestedOptionEntry>
pub fn nested_option_entries(&self) -> Vec<NestedOptionEntry>
Snapshot of every #[nested] Option<T> field on this struct
as (field_name, is_some) tuples, in declaration order.
field_name is the raw Rust ident (snake_case) — consumers
can map to display names via their own table. The schema
is the single source of truth: adding a new
pub foo: Option<FooConfig> field with #[nested] surfaces
here without touching any caller.
Sourcepub fn create_map_key(
&mut self,
section_path: &str,
map_key: &str,
) -> Result<bool, String>
pub fn create_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
Insert a default-valued entry under a map-keyed section, or
append to a list-shaped one, with map_key as the new entry’s
natural identifier (HashMap key for Map sections; identifier
field for List sections).
Returns Ok(true) if a new entry was created, Ok(false) if
the entry already existed (idempotent), or Err(reason) if
the section path doesn’t resolve to a Map/List in this tree.
Sourcepub fn delete_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>
Remove the entry identified by map_key from the map-keyed
section at section_path.
Returns Ok(true) if the entry existed and was removed,
Ok(false) if it didn’t exist, or Err(reason) if the
section path doesn’t resolve.
Sourcepub fn rename_map_key(
&mut self,
section_path: &str,
map_key: &str,
new_key: &str,
) -> Result<bool, String>
pub fn rename_map_key( &mut self, section_path: &str, map_key: &str, new_key: &str, ) -> Result<bool, String>
Rename map_key to new_key within the map-keyed section at
section_path, preserving the entry’s value.
Returns Ok(true) if renamed, Ok(false) if map_key didn’t
exist, or Err(reason) if new_key already exists or the
section path doesn’t resolve.
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.
Trait Implementations§
Source§impl Clone for ChannelsConfig
impl Clone for ChannelsConfig
Source§fn clone(&self) -> ChannelsConfig
fn clone(&self) -> ChannelsConfig
1.0.0 · Source§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§impl<'de> Deserialize<'de> for ChannelsConfig
impl<'de> Deserialize<'de> for ChannelsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::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: &Self)
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