Skip to main content

AgentMessage

Enum AgentMessage 

Source
pub enum AgentMessage {
Show 29 variants StreamChunk { text: String, }, StreamEnd { finish_reason: Option<String>, }, ToolCallStart { id: String, name: String, server: Option<String>, input: Value, }, ToolProgress { name: String, message: String, progress: Option<f64>, }, ToolResult { id: String, name: String, output: Option<String>, error: Option<String>, }, ConversationSync { session_id: String, model: String, messages: Vec<DisplayMessage>, status: String, is_busy: bool, tool_mode: ToolMode, mcp_servers: Vec<String>, }, MessageAdded { message: DisplayMessage, }, StatusUpdate { status: String, }, TaskUpdate { task_tree: String, task_count: usize, completed_count: usize, }, Error { message: String, fatal: bool, }, Exiting { reason: String, }, Ack { command: String, }, SlashCommandResult { command: String, success: bool, output: Option<String>, action_taken: Option<String>, error: Option<String>, blocked: bool, }, Toast { message: String, duration_ms: u64, }, SealStatus { enabled: bool, entity_count: usize, last_resolution: Option<String>, quality_score: f32, }, LockResult { success: bool, resource_type: ResourceLockType, scope: String, error: Option<String>, blocking_agent: Option<String>, }, LockReleased { resource_type: ResourceLockType, scope: String, }, LockStatus { locks: Vec<LockInfo>, }, LockChanged { change: LockChangeType, lock: LockInfo, }, AgentSpawned { new_session_id: String, parent_session_id: String, spawn_reason: String, model: String, }, AgentList { agents: Vec<AgentMetadata>, }, AgentExiting { session_id: String, reason: String, children_notified: Vec<String>, }, ParentSignalReceived { signal: ParentSignalType, parent_session_id: String, }, PlanModeEntered { plan_session_id: String, messages: Vec<DisplayMessage>, status: String, }, PlanModeExited { summary: Option<String>, }, PlanModeSync { plan_session_id: String, main_session_id: String, messages: Vec<DisplayMessage>, status: String, is_busy: bool, }, PlanModeMessageAdded { message: DisplayMessage, }, PlanModeStreamChunk { text: String, }, PlanModeStreamEnd { finish_reason: Option<String>, },
}
Expand description

Messages sent from Agent to Viewer (TUI)

Variants§

§

StreamChunk

Streaming text chunk from AI response

Fields

§text: String

The text delta

§

StreamEnd

Stream completed (full response received)

Fields

§finish_reason: Option<String>

Optional finish reason

§

ToolCallStart

Tool call started

Fields

§id: String

Tool use ID

§name: String

Tool name

§server: Option<String>

Server name (for MCP tools)

§input: Value

Tool input parameters

§

ToolProgress

Tool execution progress update

Fields

§name: String

Tool name

§message: String

Progress message

§progress: Option<f64>

Progress percentage (0.0-1.0) if known

§

ToolResult

Tool execution completed

Fields

§id: String

Tool use ID

§name: String

Tool name

§output: Option<String>

Result output (if successful)

§error: Option<String>

Error message (if failed)

§

ConversationSync

Full conversation state (sent on attach or sync request)

Fields

§session_id: String

Session ID

§model: String

Current model name

§messages: Vec<DisplayMessage>

Full conversation history (for display)

§status: String

Current status message

§is_busy: bool

Whether an operation is in progress

§tool_mode: ToolMode

Current tool mode

§mcp_servers: Vec<String>

Connected MCP servers

§

MessageAdded

New message added to conversation

Fields

§message: DisplayMessage

The message that was added

§

StatusUpdate

Status update (e.g., “Working…”, “Connected to MCP server X”)

Fields

§status: String

New status message

§

TaskUpdate

Task list update

Fields

§task_tree: String

Formatted task tree for display

§task_count: usize

Total task count

§completed_count: usize

Completed task count

§

Error

Error occurred

Fields

§message: String

Error message

§fatal: bool

Whether this is a fatal error (agent will exit)

§

Exiting

Agent is exiting

Fields

§reason: String

Reason for exit

§

Ack

Acknowledgment of viewer command

Fields

§command: String

Original command type that was acknowledged

§

SlashCommandResult

Result of a slash command execution (for remote control)

Fields

§command: String

The command that was executed (without leading /)

§success: bool

Whether the command executed successfully

§output: Option<String>

Output/result of the command (for Message or Help results)

§action_taken: Option<String>

Description of action taken (for Action results)

§error: Option<String>

Error message if command failed

§blocked: bool

Whether the command was blocked by security policy

§

Toast

Toast notification

Fields

§message: String

Message to display

§duration_ms: u64

Duration in milliseconds

§

SealStatus

SEAL status update

Fields

§enabled: bool

Whether SEAL is enabled

§entity_count: usize

Entity count

§last_resolution: Option<String>

Last resolution (if any)

§quality_score: f32

Quality score (0.0-1.0)

§

LockResult

Lock acquisition result

Fields

§success: bool

Whether the lock was acquired

§resource_type: ResourceLockType

Resource type

§scope: String

Scope

§error: Option<String>

Error message if failed

§blocking_agent: Option<String>

Info about blocking lock if failed

§

LockReleased

Lock released confirmation

Fields

§resource_type: ResourceLockType

Resource type

§scope: String

Scope

§

LockStatus

Response to QueryLocks

Fields

§locks: Vec<LockInfo>

All current locks

§

LockChanged

Lock state changed notification (for other viewers)

Fields

§change: LockChangeType

The change type

§lock: LockInfo

Lock info

§

AgentSpawned

A new child agent was spawned

Fields

§new_session_id: String

Session ID of the new agent

§parent_session_id: String

Session ID of the parent that spawned it

§spawn_reason: String

Reason for spawning

§model: String

Model used by the new agent

§

AgentList

Response to ListAgents request

Fields

§agents: Vec<AgentMetadata>

All active agents with their metadata

§

AgentExiting

An agent is exiting (sent to TUI and potentially to children)

Fields

§session_id: String

Session ID of the exiting agent

§reason: String

Reason for exit

§children_notified: Vec<String>

Child agents that were notified

§

ParentSignalReceived

Signal received from parent agent

Fields

§signal: ParentSignalType

The signal type

§parent_session_id: String

Parent’s session ID

§

PlanModeEntered

Plan mode entered successfully

Fields

§plan_session_id: String

Plan session ID

§messages: Vec<DisplayMessage>

Display messages from plan mode

§status: String

Current status

§

PlanModeExited

Plan mode exited

Fields

§summary: Option<String>

Optional summary of the planning session

§

PlanModeSync

Plan mode state sync (response to PlanModeSyncRequest)

Fields

§plan_session_id: String

Plan session ID

§main_session_id: String

Main session ID

§messages: Vec<DisplayMessage>

Display messages from plan mode

§status: String

Current status

§is_busy: bool

Whether an operation is in progress

§

PlanModeMessageAdded

New message added to plan mode conversation

Fields

§message: DisplayMessage

The message that was added

§

PlanModeStreamChunk

Streaming text chunk in plan mode

Fields

§text: String

The text delta

§

PlanModeStreamEnd

Plan mode stream completed

Fields

§finish_reason: Option<String>

Optional finish reason

Trait Implementations§

Source§

impl Clone for AgentMessage

Source§

fn clone(&self) -> AgentMessage

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AgentMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AgentMessage

Source§

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 Serialize for AgentMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,