pub enum Event {
Show 25 variants
RunStarted {
run: RunId,
task: String,
agent: String,
},
RouteSelected {
run: RunId,
chain: Vec<String>,
context_window: u64,
},
ModelSwitched {
run: RunId,
from: String,
to: String,
reason: String,
},
ThinkingDelta {
run: RunId,
text: String,
},
ReasoningDelta {
run: RunId,
text: String,
},
Message {
run: RunId,
role: String,
text: String,
},
ToolUseProposed {
run: RunId,
id: String,
name: String,
args: Value,
risk: RiskLevel,
},
ApprovalRequested {
run: RunId,
id: String,
summary: String,
},
ApprovalResolved {
run: RunId,
id: String,
decision: Decision,
},
ToolUseStarted {
run: RunId,
id: String,
},
ToolOutput {
run: RunId,
id: String,
blocks: Vec<Block>,
},
DiffProposed {
run: RunId,
file: String,
patch: String,
plus: u32,
minus: u32,
},
DiffApplied {
run: RunId,
file: String,
},
TestResult {
run: RunId,
passed: u32,
failed: u32,
detail: String,
},
AgentSpawned {
run: RunId,
role: String,
model: String,
},
AgentStatus {
run: RunId,
role: String,
status: AgentStatus,
note: String,
},
CheckpointCreated {
run: RunId,
id: CheckpointId,
label: String,
},
SkillLearned {
run: RunId,
name: String,
},
CostUpdate {
run: RunId,
usd: f64,
},
TokenUsage {
run: RunId,
input: u64,
output: u64,
},
TokenUsageEstimated {
run: RunId,
input: u64,
output: u64,
reason: String,
},
AutonomyChanged {
run: RunId,
level: AutonomyLevel,
},
RunFinished {
run: RunId,
outcome: OutcomeSummary,
},
Error {
run: RunId,
message: String,
},
Compacted {
run: RunId,
before_chars: usize,
after_chars: usize,
handoff_path: Option<String>,
},
}Expand description
Every surface renders from this stream; replay records from it. This enum is the contract that connects runtime ↔ surfaces ↔ replay.
Variants§
RunStarted
RouteSelected
ModelSwitched
ThinkingDelta
ReasoningDelta
Opaque provider reasoning state. Surfaces should not render this as
assistant-visible text, but session persistence must keep it so
reasoning-mode providers can receive reasoning_content on the next
turn when they require it.
Message
ToolUseProposed
ApprovalRequested
ApprovalResolved
ToolUseStarted
ToolOutput
DiffProposed
DiffApplied
TestResult
AgentSpawned
AgentStatus
CheckpointCreated
SkillLearned
CostUpdate
TokenUsage
TokenUsageEstimated
AutonomyChanged
RunFinished
Error
Compacted
A compaction pass has just completed. Surfaces the before/after sizes (in chars) and the path of the handoff doc, if any.
Implementations§
Source§impl Event
impl Event
Sourcepub fn is_public(&self) -> bool
pub fn is_public(&self) -> bool
Returns true for events that may be streamed to user-facing feeds.
ReasoningDelta is provider-internal continuity state: the engine and
session stores consume it so reasoning-mode providers can receive the
required reasoning_content on the next turn, but exposing every delta
as NDJSON/WebSocket output floods users with opaque token fragments.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Event
impl<'de> Deserialize<'de> for Event
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>,
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> 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more