pub enum EventMsg {
Show 28 variants
Error(ErrorEvent),
TaskStarted,
TaskComplete(TaskCompleteEvent),
TokenCount(TokenUsage),
AgentMessage(AgentMessageEvent),
AgentMessageDelta(AgentMessageDeltaEvent),
AgentReasoning(AgentReasoningEvent),
AgentReasoningDelta(AgentReasoningDeltaEvent),
AgentReasoningRawContent(AgentReasoningRawContentEvent),
AgentReasoningRawContentDelta(AgentReasoningRawContentDeltaEvent),
AgentReasoningSectionBreak(AgentReasoningSectionBreakEvent),
SessionConfigured(SessionConfiguredEvent),
McpToolCallBegin(McpToolCallBeginEvent),
McpToolCallEnd(McpToolCallEndEvent),
ExecCommandBegin(ExecCommandBeginEvent),
ExecCommandOutputDelta(ExecCommandOutputDeltaEvent),
ExecCommandEnd(ExecCommandEndEvent),
ExecApprovalRequest(ExecApprovalRequestEvent),
ApplyPatchApprovalRequest(ApplyPatchApprovalRequestEvent),
BackgroundEvent(BackgroundEventEvent),
PatchApplyBegin(PatchApplyBeginEvent),
PatchApplyEnd(PatchApplyEndEvent),
TurnDiff(TurnDiffEvent),
GetHistoryEntryResponse(GetHistoryEntryResponseEvent),
McpListToolsResponse(McpListToolsResponseEvent),
PlanUpdate(UpdatePlanArgs),
TurnAborted(TurnAbortedEvent),
ShutdownComplete,
}Expand description
Response event from the agent
Variants§
Error(ErrorEvent)
Error while executing a submission
TaskStarted
Agent has started a task
TaskComplete(TaskCompleteEvent)
Agent has completed all actions
TokenCount(TokenUsage)
Token count event, sent periodically to report the number of tokens used in the current session.
AgentMessage(AgentMessageEvent)
Agent text output message
AgentMessageDelta(AgentMessageDeltaEvent)
Agent text output delta message
AgentReasoning(AgentReasoningEvent)
Reasoning event from agent.
AgentReasoningDelta(AgentReasoningDeltaEvent)
Agent reasoning delta event from agent.
AgentReasoningRawContent(AgentReasoningRawContentEvent)
Raw chain-of-thought from agent.
AgentReasoningRawContentDelta(AgentReasoningRawContentDeltaEvent)
Agent reasoning content delta event from agent.
AgentReasoningSectionBreak(AgentReasoningSectionBreakEvent)
Signaled when the model begins a new reasoning summary section (e.g., a new titled block).
SessionConfigured(SessionConfiguredEvent)
Ack the client’s configure message.
McpToolCallBegin(McpToolCallBeginEvent)
McpToolCallEnd(McpToolCallEndEvent)
ExecCommandBegin(ExecCommandBeginEvent)
Notification that the server is about to execute a command.
ExecCommandOutputDelta(ExecCommandOutputDeltaEvent)
Incremental chunk of output from a running command.
ExecCommandEnd(ExecCommandEndEvent)
ExecApprovalRequest(ExecApprovalRequestEvent)
ApplyPatchApprovalRequest(ApplyPatchApprovalRequestEvent)
BackgroundEvent(BackgroundEventEvent)
PatchApplyBegin(PatchApplyBeginEvent)
Notification that the agent is about to apply a code patch. Mirrors
ExecCommandBegin so front‑ends can show progress indicators.
PatchApplyEnd(PatchApplyEndEvent)
Notification that a patch application has finished.
TurnDiff(TurnDiffEvent)
GetHistoryEntryResponse(GetHistoryEntryResponseEvent)
Response to GetHistoryEntryRequest.
McpListToolsResponse(McpListToolsResponseEvent)
List of MCP tools available to the agent.
PlanUpdate(UpdatePlanArgs)
TurnAborted(TurnAbortedEvent)
ShutdownComplete
Notification that the agent is shutting down.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EventMsg
impl<'de> Deserialize<'de> for EventMsg
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EventMsg, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EventMsg, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for EventMsg
impl Serialize for EventMsg
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 EventMsg
impl RefUnwindSafe for EventMsg
impl Send for EventMsg
impl Sync for EventMsg
impl Unpin for EventMsg
impl UnwindSafe for EventMsg
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.