pub enum OrchestratorEvent {
Spawned {
id: SessionId,
project_id: String,
},
SessionRestored {
id: SessionId,
project_id: String,
status: SessionStatus,
},
StatusChanged {
id: SessionId,
from: SessionStatus,
to: SessionStatus,
},
ActivityChanged {
id: SessionId,
prev: Option<ActivityState>,
next: ActivityState,
},
Terminated {
id: SessionId,
reason: TerminationReason,
},
TickError {
id: SessionId,
message: String,
},
ReactionTriggered {
id: SessionId,
reaction_key: String,
action: ReactionAction,
},
ReactionEscalated {
id: SessionId,
reaction_key: String,
attempts: u32,
},
UiNotification {
notification: UiNotification,
},
}Variants§
Spawned
A session was created after the lifecycle loop was already running.
The loop decides “new” by comparing session.created_at against its
own startup timestamp — a session observed on the first tick whose
created_at predates startup is reported via SessionRestored
instead, so watch output distinguishes “brand new spawn” from
“restored from disk”.
SessionRestored
A session that already existed on disk was observed by the
lifecycle loop on its first tick after startup. Emitted at most
once per session and only during the first tick — subsequent
appearances use Spawned. Consumers use this to suppress the
“N sessions just spawned” flood on reconnect.
Fields
status: SessionStatusOn-disk status at the moment of observation. Useful for UI filtering (e.g. skip terminal sessions) without an extra snapshot round-trip.
StatusChanged
Lifecycle-driven status transition. from == to is never emitted.
ActivityChanged
Polled activity changed. prev is None on the first successful poll.
Terminated
Runtime process is gone. Emitted exactly once per session.
TickError
Polling-loop error for one session. The loop itself keeps running.
ReactionTriggered
A configured reaction successfully ran its action. The engine emits this on every successful dispatch — subscribers use it to surface “ao-rs just fired X” in the CLI and for assertions in tests.
action is the action the engine actually took, which may differ
from the configured action if the engine escalated mid-flight
(SendToAgent → Notify). Pair with ReactionEscalated to tell
first-time successes apart from escalations.
Fields
action: ReactionActionAction the engine actually executed this attempt.
ReactionEscalated
The retry budget for a reaction was exhausted and the engine fell
back to Notify. Emitted in addition to the ReactionTriggered
that represents the escalated notify — so subscribers that only
care about “something was escalated” can filter on this event
alone without having to join on attempts counts.
Fields
UiNotification
UI-friendly notification event (dashboard/desktop toasts).
Emitted in addition to ReactionTriggered for reactions that should
surface to users in real time.
Fields
notification: UiNotificationTrait Implementations§
Source§impl Clone for OrchestratorEvent
impl Clone for OrchestratorEvent
Source§fn clone(&self) -> OrchestratorEvent
fn clone(&self) -> OrchestratorEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more