Skip to main content

Event

Enum Event 

Source
pub enum Event {
Show 35 variants MessageStarted { index: usize, }, MessageDelta { index: usize, content: String, }, MessageComplete { index: usize, }, ThinkingStarted { index: usize, }, ThinkingDelta { index: usize, content: String, }, ThinkingComplete { index: usize, }, ToolCallStarted { id: String, name: String, input: Value, }, ToolCallProgress { id: String, output: String, }, ToolCallComplete { id: String, name: String, result: Result<ToolResult, ToolError>, }, TurnStarted { turn_id: String, }, ModelRequestPrepared { static_prefix_sha256: String, full_prefix_sha256: String, }, TurnComplete { usage: Usage, last_request_input_tokens: Option<u32>, status: TurnOutcomeStatus, error: Option<String>, step_count: u32, tool_names: Vec<String>, end_reason: Option<String>, }, CompactionStarted { id: String, auto: bool, message: String, }, CompactionCompleted { id: String, auto: bool, message: String, messages_before: Option<usize>, messages_after: Option<usize>, }, CompactionFailed { id: String, auto: bool, message: String, }, CycleAdvanced { from: u32, to: u32, briefing: CycleBriefing, }, CapacityDecision { session_id: String, turn_id: String, h_hat: f64, c_hat: f64, slack: f64, min_slack: f64, violation_ratio: f64, p_fail: f64, risk_band: String, action: String, cooldown_blocked: bool, reason: String, }, CapacityIntervention { session_id: String, turn_id: String, action: String, before_prompt_tokens: usize, after_prompt_tokens: usize, compaction_size_reduction: usize, replay_outcome: Option<String>, replan_performed: bool, }, CapacityMemoryPersistFailed { session_id: String, turn_id: String, action: String, error: String, }, CoherenceState { state: CoherenceState, label: String, description: String, reason: String, }, AgentSpawned { id: String, prompt: String, }, AgentProgress { id: String, status: String, }, AgentComplete { id: String, result: String, }, AgentList { agents: Vec<SubAgentResult>, }, SubAgentMailbox { seq: u64, message: MailboxMessage, }, Error { envelope: ErrorEnvelope, recoverable: bool, }, Status { message: String, }, PauseEvents, ResumeEvents, ApprovalRequired { id: String, tool_name: String, description: String, approval_key: String, }, UserInputRequired { id: String, request: UserInputRequest, }, SessionUpdated { messages: Vec<Message>, system_prompt: Option<SystemPrompt>, model: String, workspace: PathBuf, }, CraftVerdict { agent_id: String, agent_type: String, task_id: Option<String>, verdict: String, summary: Option<String>, items: Value, }, CraftBoardUpdated { task_id: String, partition: String, agent_id: String, }, ElevationRequired { tool_id: String, tool_name: String, command: Option<String>, denial_reason: String, blocked_network: bool, blocked_write: bool, },
}
Expand description

Events emitted by the engine to update the UI.

Variants§

§

MessageStarted

Fields

§index: usize
§

MessageDelta

Fields

§index: usize
§content: String
§

MessageComplete

Fields

§index: usize
§

ThinkingStarted

Fields

§index: usize
§

ThinkingDelta

Fields

§index: usize
§content: String
§

ThinkingComplete

Fields

§index: usize
§

ToolCallStarted

Fields

§name: String
§input: Value
§

ToolCallProgress

Fields

§output: String
§

ToolCallComplete

§

TurnStarted

Fields

§turn_id: String
§

ModelRequestPrepared

Prefix-cache fingerprint for one model API request (kernel-v2 M5).

Fields

§static_prefix_sha256: String
§full_prefix_sha256: String
§

TurnComplete

Fields

§usage: Usage
§last_request_input_tokens: Option<u32>
§step_count: u32
§tool_names: Vec<String>
§end_reason: Option<String>
§

CompactionStarted

Fields

§auto: bool
§message: String
§

CompactionCompleted

Fields

§auto: bool
§message: String
§messages_before: Option<usize>
§messages_after: Option<usize>
§

CompactionFailed

Fields

§auto: bool
§message: String
§

CycleAdvanced

Fields

§from: u32
§to: u32
§briefing: CycleBriefing
§

CapacityDecision

Fields

§session_id: String
§turn_id: String
§h_hat: f64
§c_hat: f64
§slack: f64
§min_slack: f64
§violation_ratio: f64
§p_fail: f64
§risk_band: String
§action: String
§cooldown_blocked: bool
§reason: String
§

CapacityIntervention

Fields

§session_id: String
§turn_id: String
§action: String
§before_prompt_tokens: usize
§after_prompt_tokens: usize
§compaction_size_reduction: usize
§replay_outcome: Option<String>
§replan_performed: bool
§

CapacityMemoryPersistFailed

Fields

§session_id: String
§turn_id: String
§action: String
§error: String
§

CoherenceState

Fields

§label: String
§description: String
§reason: String
§

AgentSpawned

Fields

§prompt: String
§

AgentProgress

Fields

§status: String
§

AgentComplete

Fields

§result: String
§

AgentList

Fields

§

SubAgentMailbox

Fields

§seq: u64
§

Error

Fields

§envelope: ErrorEnvelope
§recoverable: bool
§

Status

Fields

§message: String
§

PauseEvents

§

ResumeEvents

§

ApprovalRequired

Fields

§tool_name: String
§description: String
§approval_key: String
§

UserInputRequired

Fields

§

SessionUpdated

Fields

§messages: Vec<Message>
§system_prompt: Option<SystemPrompt>
§model: String
§workspace: PathBuf
§

CraftVerdict

CRAFT: structured verdict from a completing sub-agent (B-L1).

Fields

§agent_id: String
§agent_type: String
§task_id: Option<String>
§verdict: String
§summary: Option<String>
§items: Value
§

CraftBoardUpdated

CRAFT: blackboard partition updated under .deepseek/blackboards/ (B-L1).

Fields

§task_id: String
§partition: String
§agent_id: String
§

ElevationRequired

Fields

§tool_id: String
§tool_name: String
§command: Option<String>
§denial_reason: String
§blocked_network: bool
§blocked_write: bool

Implementations§

Source§

impl Event

Source

pub fn error(envelope: ErrorEnvelope) -> Self

Source

pub fn status(message: impl Into<String>) -> Self

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnsafeUnpin for Event

§

impl UnwindSafe for Event

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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<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