pub enum SessionEventWire {
Show 36 variants
Stream(StreamEvent),
TurnStarted {
turn_baseline: usize,
trigger: TurnTrigger,
user_text: Option<String>,
},
Conversation(ConversationSnapshot),
Prompt(PromptRequest),
PromptResolved {
prompt_id: u64,
},
External(Event),
AutoTurnCapReached {
cap: u32,
},
Idle,
Steered {
text: String,
delivered: bool,
},
Dequeued {
text: String,
},
SystemNotice(String),
LoaderProgress(ExtensionLoaderEvent),
ExtensionNotification {
extension_id: String,
method: String,
params: Value,
},
SettingChanged(SettingApplied),
QueryResult {
id: u64,
value: Value,
},
Attached {
client: ClientId,
snapshot: AttachSnapshot,
},
ClientJoined {
client: ClientId,
kind: ClientKind,
},
ClientLeft {
client: ClientId,
},
Ended {
reason: EndReason,
},
Aborted {
context_saved: bool,
},
Cleared {
session_id: String,
},
CompactionStarted {
source: String,
disclosure: String,
},
CompactionApplied {
previous_session_id: String,
session_id: String,
chains_advanced: Vec<String>,
queued_restored: Option<String>,
msg_count: usize,
},
CompactionFailed {
message: String,
panicked: bool,
},
CompactionCancelled,
SubagentRows(Vec<SubagentDisplayRow>),
Resumed {
id: u64,
old_id: String,
new_id: String,
via: Option<String>,
clamp_notice: Option<String>,
},
InputOwnerChanged {
from: Option<ClientId>,
to: Option<ClientId>,
reason: OwnerChangeReason,
},
Refused {
client: ClientId,
command: String,
reason: String,
},
AttachRefused {
message: String,
},
Lifecycle(SessionLifecycle),
Reloading {
generation: u64,
retry_after_ms: u64,
},
DriverArmed {
plugin_id: String,
run_id: String,
models: Vec<Selection>,
selection: Selection,
deadline_ms: Option<u64>,
notice: String,
},
DriverRevoked {
reason: String,
undelivered_steering: Vec<String>,
},
DriverTurnOutcome {
outcome: Outcome,
selection: Selection,
feedback: Option<String>,
},
CostCapReached {
scope: String,
cost: f64,
cap: f64,
},
}Expand description
What a session tells its clients. Stream carries the un-serialised
StreamEvent in-process (LocalTransport) — that IS the byte-identical
contract. The socket boundary converts to wire::WireSessionEvent.
Variants§
Stream(StreamEvent)
TurnStarted
Actor bookkeeping the client needs to mirror App fields exactly.
user_text = the queued text on QueuedAuto (TUI pushes the User
card + scroll); None otherwise.
Conversation(ConversationSnapshot)
Emitted after every MessageHistory / Done / Error / Cancel / Compact so mirrors never diverge: the actor’s api_messages IS the truth.
Prompt(PromptRequest)
PromptResolved
So mirrors dismiss the modal.
External(Event)
Drained event card — presentation only.
AutoTurnCapReached
Idle
The turn machine is idle: a stream ended (Done/Error/Cancel) and NO auto-turn followed. Headless hosts gate stdin on this so a queued auto-turn is never raced by the next line.
Steered
“→ steering:” vs “queued:”.
Dequeued
SystemNotice(String)
Any ChatMessage::System the actor would have pushed.
LoaderProgress(ExtensionLoaderEvent)
ExtensionNotification
SettingChanged(SettingApplied)
QueryResult
Attached
Only to the attaching client.
ClientJoined
ClientLeft
Ended
Aborted
Cancel landed. TUI: drop_empty_thinking, push Error(abort_msg), subagents.clear(), streaming=false.
Cleared
/clear. TUI: transcript.clear, counters=0, “new session started”.
CompactionStarted
(B2) disclosure = preview_compaction_disclosure().render_line().
CompactionApplied
Fields
CompactionFailed
“compaction failed: {e}” vs “compaction task panicked: {e}”.
CompactionCancelled
SubagentRows(Vec<SubagentDisplayRow>)
runtime.subagent_registry().display_rows() — at Done/Error and at
1 Hz while any row is non-terminal.
Resumed
/resume reply (Resume{id}).
InputOwnerChanged
(B1) sent to the previous owner on takeover, and to everyone on any owner change.
Refused
(B1) a non-owner sent an input command. Only the sender renders it.
AttachRefused
(B3) targeted like Attached: the attach could not be honoured.
Lifecycle(SessionLifecycle)
(B3) lifecycle transitions for mirrors and sessions listings.
Reloading
(C3) daemon is about to exec itself; clients reconnect.
DriverArmed
(E-P0) Driver armed on this session.
Fields
DriverRevoked
(E-P0) Driver revoked.
DriverTurnOutcome
(E-P0) One driver turn completed.
CostCapReached
(E-P7, §S3) A spend ceiling was breached: the turn was cancelled and any
armed driver revoked. scope is “session” (config cap) or “run” (the
driver grant’s per-run cap). Additive v3 driver event — old clients skip
it via #[serde(other)].
Trait Implementations§
Source§impl Clone for SessionEventWire
impl Clone for SessionEventWire
Source§impl Debug for SessionEventWire
impl Debug for SessionEventWire
Source§impl From<SessionEventWire> for WireSessionEvent
impl From<SessionEventWire> for WireSessionEvent
Source§fn from(e: SessionEventWire) -> Self
fn from(e: SessionEventWire) -> Self
Source§impl From<WireSessionEvent> for SessionEventWire
impl From<WireSessionEvent> for SessionEventWire
Source§fn from(e: WireSessionEvent) -> Self
fn from(e: WireSessionEvent) -> Self
Auto Trait Implementations§
impl Freeze for SessionEventWire
impl RefUnwindSafe for SessionEventWire
impl Send for SessionEventWire
impl Sync for SessionEventWire
impl Unpin for SessionEventWire
impl UnsafeUnpin for SessionEventWire
impl UnwindSafe for SessionEventWire
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>. Box<dyn Any> can
then be further downcast into Box<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>. Rc<Any> 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.