pub enum MessageSource {
Human {
channel: String,
sender: String,
},
ToolResult {
tool_use_id: String,
},
ScheduledTask {
task_name: String,
},
System,
Assistant,
}Expand description
Origin of a message — distinguishes real human input from system-generated messages.
Used by the hallucination guard to detect self-conversation loops: if no message
with MessageSource::Human has arrived in N rounds, the pulse is talking to itself.
Variants§
Human
Message from a real human via an input channel (HTTP, Discord, voice, REPL).
ToolResult
Tool execution result injected by the tool loop.
ScheduledTask
Message generated by a scheduled/autonomous task.
System
System-generated message (compaction summary, context injection, etc.).
Assistant
LLM-generated assistant response.
Trait Implementations§
Source§impl Clone for MessageSource
impl Clone for MessageSource
Source§impl Debug for MessageSource
impl Debug for MessageSource
Source§impl<'de> Deserialize<'de> for MessageSource
impl<'de> Deserialize<'de> for MessageSource
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MessageSource
impl PartialEq for MessageSource
Source§impl Serialize for MessageSource
impl Serialize for MessageSource
impl StructuralPartialEq for MessageSource
Auto Trait Implementations§
impl Freeze for MessageSource
impl RefUnwindSafe for MessageSource
impl Send for MessageSource
impl Sync for MessageSource
impl Unpin for MessageSource
impl UnsafeUnpin for MessageSource
impl UnwindSafe for MessageSource
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
Mutably borrows from an owned value. Read more