pub enum AgentEvent {
Show 38 variants
UserTaskSubmitted {
text: String,
content_parts: Vec<ContentPart>,
submitted_at: Option<u64>,
},
ModelOutput {
text: String,
thinking: Option<String>,
},
ModelDelta {
text: String,
},
ModelThinkingDelta {
text: String,
},
ToolRequested(ToolInvocation),
ToolCompleted(ToolResult),
SubagentActivity {
invocation_id: String,
message: String,
},
SubagentTranscript {
invocation_id: String,
item: SubagentTranscriptItem,
},
HarnessTrace(Value),
HarnessStopped {
reason: String,
message: String,
tool_name: Option<String>,
},
PatchProposed(PatchProposal),
ApprovalRequested(ApprovalRequest),
ApprovalResolved(ApprovalDecision),
CapabilityRecorded(CapabilityLedgerEntry),
QuestionRequested(QuestionRequest),
QuestionResolved(QuestionResponse),
PlanReviewRequested(PlanReviewRequest),
PlanReviewResolved(PlanReviewResponse),
SudoPasswordRequested(SudoPasswordRequest),
RepeatedToolCallWarning {
tool_name: String,
message: String,
},
RepetitionDetected {
kind: RepetitionWarningKind,
message: String,
},
Error {
message: String,
},
AutoDreamStarted {
hours_since_last: u64,
sessions_reviewed: usize,
},
AutoDreamCompleted {
marked_stale: usize,
duplicates_merged: usize,
active_count: usize,
},
AutoDreamFailed {
reason: String,
},
UsageReported {
input_tokens: u64,
output_tokens: u64,
cache_creation_tokens: u64,
cache_read_tokens: u64,
},
SessionRecap {
summary: String,
suppressed: bool,
},
StreamResuming {
accumulated_chars: usize,
attempt: u32,
},
SetGoalRequested {
objective: String,
short_description: Option<String>,
token_budget: Option<i64>,
},
GoalUpdated {
session_id: String,
goal_id: String,
objective: String,
short_description: Option<String>,
status: GoalStatus,
tokens_used: i64,
token_budget: Option<i64>,
},
MicroCompactApplied {
messages_cleared: usize,
},
AutoCompactStarted,
AutoCompactCompleted {
tokens_saved: u64,
},
AutoCompactFailed {
reason: String,
},
PlanProposed {
title: String,
steps: Vec<String>,
},
AgentModeChanged {
mode: AgentMode,
},
NotificationRequested {
title: String,
body: String,
urgency: NotificationUrgency,
category: Option<String>,
},
UpdateAvailable {
current_version: String,
latest_version: String,
latest_tag: String,
release_url: String,
body: Option<String>,
prerelease: bool,
},
}Expand description
A high-level agent event suitable for client consumption.
Unlike RuntimeEventKind, agent events represent the semantic actions
a client cares about: user input, model output, tool calls, approvals,
compaction, usage, and errors.
Variants§
UserTaskSubmitted
The user submitted a new task or message.
Fields
content_parts: Vec<ContentPart>Optional multimodal content parts (images + text).
ModelOutput
A complete model output with optional thinking/reasoning content.
Fields
ModelDelta
A streaming text delta from the model.
ModelThinkingDelta
A streaming thinking/reasoning delta from the model.
ToolRequested(ToolInvocation)
The assistant requested a tool invocation.
ToolCompleted(ToolResult)
A tool invocation completed.
SubagentActivity
Transient status for a nested subagent.
Fields
SubagentTranscript
Transient drill-down transcript item for a nested subagent.
Fields
item: SubagentTranscriptItemTranscript item to append for this UI session.
HarnessTrace(Value)
A harness-level diagnostic trace.
HarnessStopped
The harness stopped a turn before another model iteration.
Fields
PatchProposed(PatchProposal)
A file patch was proposed by the assistant.
ApprovalRequested(ApprovalRequest)
A tool invocation requires user approval.
ApprovalResolved(ApprovalDecision)
An approval request was resolved.
CapabilityRecorded(CapabilityLedgerEntry)
A capability lifecycle event was recorded by the policy layer.
QuestionRequested(QuestionRequest)
The assistant requested an interactive user choice.
QuestionResolved(QuestionResponse)
An interactive user choice was resolved.
PlanReviewRequested(PlanReviewRequest)
Plan tool create is waiting for user review (blocks the turn).
PlanReviewResolved(PlanReviewResponse)
User finished plan review (approve / changes / quit).
SudoPasswordRequested(SudoPasswordRequest)
Bash/sudo needs a password; TUI shows a masked modal. Password is
never included in this event — only a correlation id. The secret is
delivered solely through the sudo password resolver oneshot.
RepeatedToolCallWarning
The same tool was called consecutively with identical arguments. The tool is NOT executed; this is a notification to the user.
Fields
RepetitionDetected
Repetitive/degenerate model output was detected (character runs, alternating patterns, or duplicate thinking blocks).
Fields
kind: RepetitionWarningKindWhat kind of repetition was detected.
Error
An error occurred.
AutoDreamStarted
Auto-dream memory consolidation has started.
Fields
AutoDreamCompleted
Auto-dream memory consolidation has completed.
Fields
AutoDreamFailed
Auto-dream memory consolidation has failed.
UsageReported
Token usage was reported by the model provider.
Fields
SessionRecap
Short post-turn session recap (“Recap” line).
Fields
StreamResuming
The provider stream broke mid-generation and is being resumed via prefill (assistant continuation). The UI can show a transient hint.
Fields
SetGoalRequested
The agent requested to set a goal via natural language.
Fields
GoalUpdated
The session goal was updated (created, status change, budget exceeded).
Fields
status: GoalStatusCurrent goal status.
MicroCompactApplied
Micro-compaction cleared stale tool results from history.
AutoCompactStarted
Automatic conversation compaction started.
AutoCompactCompleted
Automatic conversation compaction completed.
AutoCompactFailed
Automatic conversation compaction failed.
PlanProposed
The agent proposed a plan in Plan mode.
AgentModeChanged
The agent mode changed (e.g. Default → Plan or Plan → Default).
NotificationRequested
Host should surface a user-visible notification.
Desktop hosts call OS toasts; browser hosts map this to the Web
Notifications API. Payload mirrors crate::notify::NotifyRequest.
UpdateAvailable
A newer NAVI release is available (from update check).
Trait Implementations§
Source§impl Clone for AgentEvent
impl Clone for AgentEvent
Source§fn clone(&self) -> AgentEvent
fn clone(&self) -> AgentEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more