pub enum ServerEvent {
AgentStatus {
agent_id: String,
run_id: String,
status: String,
stage: String,
iteration: usize,
tool_calls: usize,
accepts_messages: bool,
wait_reason: Option<WaitReason>,
},
ContextUpdate {
agent_id: String,
run_id: String,
total_tokens: usize,
max_tokens: usize,
},
Log {
agent_id: String,
run_id: String,
line: String,
},
InteractionNeeded {
agent_id: String,
run_id: String,
request: Value,
},
AgentSpawned {
agent_id: String,
run_id: String,
parent_id: Option<String>,
blueprint: String,
},
AgentCompleted {
agent_id: String,
run_id: String,
status: String,
result: Option<String>,
final_output: Option<FinalOutputResp>,
},
Tokens {
agent_id: String,
run_id: String,
prompt_tokens: usize,
completion_tokens: usize,
cached_tokens: usize,
cache_write_tokens: usize,
},
World {
event: Value,
},
}Expand description
Events broadcast to WebSocket subscribers.
Variants§
AgentStatus
Where a run stands, re-sent whenever any of it changes.
Fields
accepts_messages: boolWhether a client may send this run a mid-run message. False for a
stage that declared accepts_messages = false, and for a run that
has finished.
wait_reason: Option<WaitReason>Why the run is parked, when it is.
Omitted for a run that is moving. Without it a subscriber sees a
run turn waiting or paused and has to fetch the run to learn
whether somebody is needed, which is the guess this vocabulary
exists to remove.
ContextUpdate
How full the run’s context window is, after a turn changed it.
Fields
Log
One log line, as also written to the stage’s log files.
Fields
InteractionNeeded
The run is blocked on a person, and this is what it is asking.
Fields
AgentSpawned
A run started, including one spawned as a child of another.
Fields
AgentCompleted
A run reached a terminal status.
Fields
Tokens
Running token totals for the whole run, after an inference landed.
Fields
World
A world event with no dedicated WebSocket translation (stage
transitions, tool call start/finish, and whatever the runtime adds
next), forwarded verbatim. event is the runtime’s own serde-tagged
WorldEvent JSON, so clients get
new event kinds without a server release.
Implementations§
Trait Implementations§
Source§impl Clone for ServerEvent
impl Clone for ServerEvent
Source§fn clone(&self) -> ServerEvent
fn clone(&self) -> ServerEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerEvent
impl Debug for ServerEvent
Auto Trait Implementations§
impl Freeze for ServerEvent
impl RefUnwindSafe for ServerEvent
impl Send for ServerEvent
impl Sync for ServerEvent
impl Unpin for ServerEvent
impl UnsafeUnpin for ServerEvent
impl UnwindSafe for ServerEvent
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> ConditionalSend for Twhere
T: Send,
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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