pub enum TurnEvent {
Activity(ActivityEvent),
ThoughtDelta(String),
Output(OutputEvent),
Notice(TurnNotice),
UsageUpdated(TurnUsage),
Failed(String),
PidUpdate(Option<u32>),
}Expand description
Incremental event emitted during one agent turn.
Events are sent through an mpsc::UnboundedSender as the turn
progresses, enabling transient loader updates and structured activity
delivery without appending partial answers into the persisted transcript.
Variants§
Activity(ActivityEvent)
Provider-observed tool or skill lifecycle snapshot.
ThoughtDelta(String)
A streamed thinking/planning or tool-status fragment shown in the transient loader.
Output(OutputEvent)
Model output streamed by an in-process harness turn, shown transiently until the turn result is persisted.
Notice(TurnNotice)
Something about how the turn ran that the user should know, such as a compaction of the session’s earlier context.
UsageUpdated(TurnUsage)
Cumulative usage of the turn so far, sent after each model request
whose usage the backend reports while the turn runs. The final
TurnResult::usage supersedes it.
Failed(String)
The turn failed with an error description.
PidUpdate(Option<u32>)
A child process PID update.
Announces a running or retained runtime (Some(pid)) or clears it
when the runtime shuts down (None). Consumers update resource
accounting. Cancellation belongs to the runtime owner; hosts must not
signal a sampled accounting PID.