Struct ChannelMessage
pub struct ChannelMessage {Show 15 fields
pub id: String,
pub sender: String,
pub reply_target: String,
pub content: String,
pub channel: String,
pub channel_alias: Option<String>,
pub timestamp: u64,
pub thread_ts: Option<String>,
pub interruption_scope_id: Option<String>,
pub attachments: Vec<MediaAttachment>,
pub subject: Option<String>,
pub internal_sop_event: Option<String>,
pub passive_context: bool,
pub explicitly_addressed: bool,
pub conversation_scope: ChannelConversationScope,
}Expand description
A message received from or sent to a channel
Fields§
§id: String§sender: String§reply_target: String§content: String§channel: String§channel_alias: Option<String>ZeroClaw channel alias (the <alias> half of [channels.<type>.<alias>])
when the platform supports multiple bot instances. Session-key
construction uses this so two bots on the same platform compute
distinct session IDs and don’t share conversation history. None
for channels without an alias concept (webhook, cli).
timestamp: u64§thread_ts: Option<String>Platform thread identifier (e.g. Slack ts, Discord thread ID).
When set, replies should be posted as threaded responses.
interruption_scope_id: Option<String>Thread scope identifier for interruption/cancellation grouping.
Distinct from thread_ts (reply anchor): this is Some only when the message
is genuinely inside a reply thread and should be isolated from other threads.
None means top-level — scope is sender+channel only.
attachments: Vec<MediaAttachment>Media attachments (audio, images, video) for the media pipeline. Channels populate this when they receive media alongside a text message. Defaults to empty — existing channels are unaffected.
subject: Option<String>Email subject for reply threading.
internal_sop_event: Option<String>Internal SOP-ingress marker carrying the event topic, set ONLY by the
git/forge channel producer. The orchestrator routes a message into the
SOP engine when (and only when) this is Some, so the decision can
never be driven by user-controlled fields like subject or content.
Never round-trips through serde.
passive_context: boolWhen true, the orchestrator records this as context only and must not start an agent turn or emit visible channel side effects.
explicitly_addressed: boolChannel adapter observed that this inbound message explicitly addressed the bot through a platform-level signal such as an @mention.
conversation_scope: ChannelConversationScopeControls whether conversation history is sender-scoped or room-scoped.
Implementations§
Source§impl ChannelMessage
impl ChannelMessage
Sourcepub fn new(
id: impl Into<String>,
sender: impl Into<String>,
reply_target: impl Into<String>,
content: impl Into<String>,
channel: impl Into<String>,
timestamp: u64,
) -> Self
pub fn new( id: impl Into<String>, sender: impl Into<String>, reply_target: impl Into<String>, content: impl Into<String>, channel: impl Into<String>, timestamp: u64, ) -> Self
Construct a ChannelMessage with all required fields set and all optional
fields zeroed. Prefer this over raw struct literals so that new optional
fields added to ChannelMessage in the future don’t require mechanical
updates at every call site.
Trait Implementations§
Source§impl Clone for ChannelMessage
impl Clone for ChannelMessage
Source§fn clone(&self) -> ChannelMessage
fn clone(&self) -> ChannelMessage
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more