Struct SignalConfig
pub struct SignalConfig {
pub enabled: bool,
pub http_url: String,
pub account: String,
pub group_ids: Vec<String>,
pub dm_only: bool,
pub ignore_attachments: bool,
pub ignore_stories: bool,
pub proxy_url: Option<String>,
pub approval_timeout_secs: u64,
pub excluded_tools: Vec<String>,
pub reply_min_interval_secs: u64,
pub reply_queue_depth_max: u16,
}Expand description
Signal channel configuration.
Default is implemented below rather than derived. A derived Default
zeroes every field, which disagrees with the serde defaults, and for
approval_timeout_secs that disagreement is load-bearing: 0 is an
already-elapsed deadline, so an alias built in Rust would deny every
approval while an alias parsed from a file waits the documented 300s.
Fields§
§enabled: boolWhether this channel is active. The runtime only loads channels whose
enabled = true. Default: false so an operator who pastes a partial
[channels.<type>.<alias>] block doesn’t accidentally bring a channel
live before the rest of its config is filled in.
http_url: StringBase URL for the signal-cli HTTP daemon (e.g. "http://127.0.0.1:8686").
account: StringE.164 phone number of the signal-cli account (e.g. “+1234567890”).
group_ids: Vec<String>Group IDs to filter messages. Empty = accept all messages (DMs and
groups). When non-empty, only messages from listed groups are
accepted (DMs are still accepted unless dm_only flips the policy
to DMs-only). Migrated from the legacy group_id singular field.
dm_only: boolWhen true, only accept direct messages and ignore all group traffic.
Mutually exclusive with group_ids (which is ignored when this is
set). Migrated from the legacy group_id = "dm" sentinel.
ignore_attachments: boolSkip messages that are attachment-only (no text body).
ignore_stories: boolSkip incoming story messages.
proxy_url: Option<String>Per-channel proxy URL (http, https, socks5, socks5h).
Overrides the global [proxy] setting for this channel only.
approval_timeout_secs: u64Seconds to wait for operator approval on always_ask tools before auto-denying.
excluded_tools: Vec<String>Tools excluded from this channel’s tool spec. When set, these tools are not exposed to the model when responding via this channel.
reply_min_interval_secs: u64Per-(channel, recipient) outbound pacing floor in seconds.
Range: 0..=REPLY_MIN_INTERVAL_MAX_SECS (0 disables).
reply_queue_depth_max: u16Per-(channel, recipient) outbound pacing queue depth.
Range: 0..=REPLY_QUEUE_DEPTH_CEILING. When reply_min_interval_secs > 0
and this value is 0, the pacing wrapper substitutes
DEFAULT_REPLY_QUEUE_DEPTH (16). When the queue is full, the
newest send is dropped and a WARN is logged.
Implementations§
Source§impl SignalConfig
impl SignalConfig
Sourcepub fn configurable_prefix() -> &'static str
pub fn configurable_prefix() -> &'static str
Returns the #[prefix] value for this Configurable struct.
Sourcepub fn init_requires_explicit_config() -> bool
pub fn init_requires_explicit_config() -> bool
True when this struct has a required leaf field that a
bare/ancestor-prefix init_defaults scaffold must not
materialize (it would fill the field with its Rust
Default, which prune_empty_leaves then strips on save,
leaving a partial sub-table that fails strict reload).
Explicitly targeting this section (or a descendant of it)
still scaffolds regardless of this flag, so the section can
be materialized for the operator to fill in.
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 SignalConfig
impl SignalConfig
Sourcepub fn has_required_credentials(&self) -> bool
pub fn has_required_credentials(&self) -> bool
Whether both required credentials (http_url, account) are
present. Mirrors WhatsAppConfig::is_cloud_config’s role: the
channel orchestrator uses this bool to decide whether to build the
channel at all, skipping (with a warning) an enabled-but-uncredentialed
alias instead of building a listener that can never connect and
crashloops its per-channel supervisor.
Sourcepub fn validate_required(&self, alias: &str) -> Result<(), Error>
pub fn validate_required(&self, alias: &str) -> Result<(), Error>
Validate this alias’s required credentials once enabled. Mirrors
TelegramConfig::validate_bot_token / DiscordConfig::validate_bot_token:
an enabled Signal channel built with an empty http_url or account
never connects and crashloops its per-channel supervisor, so reject
it at config-load time instead.
Trait Implementations§
Source§impl ChannelConfig for SignalConfig
impl ChannelConfig for SignalConfig
Source§impl Clone for SignalConfig
impl Clone for SignalConfig
Source§fn clone(&self) -> SignalConfig
fn clone(&self) -> SignalConfig
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 SignalConfig
impl Debug for SignalConfig
Source§impl Default for SignalConfig
impl Default for SignalConfig
Source§fn default() -> SignalConfig
fn default() -> SignalConfig
Built by deserializing an object supplying only http_url and
account, the two fields with no serde default - a Signal channel
must always name its daemon and account, so they stay required
rather than gaining one. Every other field either declares a serde
default or is an Option, so this is the minimal object that makes
the deserialize total; those defaults stay the only source of truth
for everything but http_url and account.
Source§impl<'de> Deserialize<'de> for SignalConfig
impl<'de> Deserialize<'de> for SignalConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SignalConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SignalConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl HasReplyPacing for SignalConfig
impl HasReplyPacing for SignalConfig
fn reply_min_interval_secs(&self) -> u64
fn reply_queue_depth_max(&self) -> u16
Source§impl JsonSchema for SignalConfig
impl JsonSchema for SignalConfig
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 SignalConfig
impl MaskSecrets for SignalConfig
fn mask_secrets(&mut self)
fn restore_secrets_from(&mut self, current: &SignalConfig)
Source§impl Serialize for SignalConfig
impl Serialize for SignalConfig
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 SignalConfig
impl RefUnwindSafe for SignalConfig
impl Send for SignalConfig
impl Sync for SignalConfig
impl Unpin for SignalConfig
impl UnsafeUnpin for SignalConfig
impl UnwindSafe for SignalConfig
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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