#[non_exhaustive]pub enum OpsEvent {
Show 18 variants
SupervisorStateChange {
tenant: Option<TenantId>,
agent: AgentId,
state: String,
reason: Option<String>,
},
SupervisorStallDetected {
tenant: Option<TenantId>,
agent: AgentId,
missed_heartbeats: u32,
},
KillSwitchTripped {
tenant: Option<TenantId>,
trigger: String,
reason: String,
},
GovernorDenial {
tenant: Option<TenantId>,
resource: String,
provider: Option<ProviderId>,
host: Option<String>,
reason: String,
},
GovernorFence {
tenant: Option<TenantId>,
scope: String,
reason: Option<String>,
},
GovernorBudgetSnapshot {
tenant: Option<TenantId>,
scope: String,
remaining: i64,
limit: i64,
},
GateDecision {
tenant: Option<TenantId>,
tool: String,
decision: String,
gate: String,
policy_ref: Option<String>,
reason: Option<String>,
},
EscalationRaised {
tenant: Option<TenantId>,
ticket: String,
severity: String,
reason: String,
provenance_root: Option<String>,
},
EscalationStateChanged {
tenant: Option<TenantId>,
ticket: String,
from: String,
to: String,
reason: Option<String>,
},
EscalationResolved {
tenant: Option<TenantId>,
ticket: String,
outcome: String,
reason: Option<String>,
},
WorkPlanned {
tenant: Option<TenantId>,
work_id: String,
title: String,
depends_on: Vec<String>,
},
WorkDependencyAdded {
tenant: Option<TenantId>,
child: String,
on: String,
},
WorkDispatched {
tenant: Option<TenantId>,
work_id: String,
},
WorkTransition {
tenant: Option<TenantId>,
work_id: String,
from: String,
to: String,
reason: Option<String>,
},
HandoffPackaged {
tenant: Option<TenantId>,
from_run: String,
merkle_root: String,
},
HandoffDelivered {
tenant: Option<TenantId>,
from_run: String,
to_agent: String,
},
HandoffVerified {
tenant: Option<TenantId>,
from_run: String,
},
HandoffVerificationFailed {
tenant: Option<TenantId>,
from_run: Option<String>,
reason: String,
},
}Expand description
Operational-layer event. Carried inside Episode::Ops(serde_json::Value).
The tenant field is part of the canonical signed payload — chain
signatures cover it, so a tampered tenant tag invalidates the chain.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SupervisorStateChange
Supervisor lifecycle event.
Fields
SupervisorStallDetected
Supervisor detected a stalled agent.
Fields
KillSwitchTripped
Kill-switch tripped.
Fields
GovernorDenial
Governor denied an LLM or egress acquire.
Fields
resource: StringResource kind: currently "llm" or "egress". Stringly-typed
in v0.2 because the field name was forced by the serde tag
collision (see ADR-008). A typed enum may replace this in v0.3.
provider: Option<ProviderId>Provider id (LLM only).
GovernorFence
Governor fenced a scope.
Fields
GovernorBudgetSnapshot
Periodic budget snapshot.
Fields
GateDecision
Gate evaluated a tool invocation.
Fields
EscalationRaised
New escalation ticket raised.
Fields
EscalationStateChanged
Escalation state transition (e.g. raised → acknowledged, acknowledged → resolved, or requeued + escalated to a higher severity).
Fields
EscalationResolved
Escalation resolved with a terminal outcome (Resolved / AutoDenied / TimedOut / Halted).
Fields
WorkPlanned
Work item planned (entered the DAG).
Fields
WorkDependencyAdded
Dependency relationship added between two existing work items.
Fields
WorkDispatched
Work item dispatched (enqueued onto the JobQueue for execution).
WorkTransition
Work item state transition.
Fields
HandoffPackaged
Handoff envelope packaged and signed.
Fields
HandoffDelivered
Handoff envelope delivered to a receiver agent.
Fields
HandoffVerified
Handoff verification succeeded.
HandoffVerificationFailed
Handoff verification failed (bad sig, expired, prefix proof invalid, or redaction schema fail).
Implementations§
Source§impl OpsEvent
impl OpsEvent
Sourcepub fn into_episode_payload(self) -> Result<Value, Error>
pub fn into_episode_payload(self) -> Result<Value, Error>
Convert to the opaque serde_json::Value shape consumed by
Episode::Ops. Returns an error only if serde_json cannot serialise
the value — practically impossible for this type, but must not panic
in production code paths.
Sourcepub fn from_episode_payload(v: &Value) -> Option<Self>
pub fn from_episode_payload(v: &Value) -> Option<Self>
Round-trip from an opaque Episode::Ops payload. Returns
None if the payload doesn’t match the known shape.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OpsEvent
impl<'de> Deserialize<'de> for OpsEvent
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 OpsEvent
impl RefUnwindSafe for OpsEvent
impl Send for OpsEvent
impl Sync for OpsEvent
impl Unpin for OpsEvent
impl UnsafeUnpin for OpsEvent
impl UnwindSafe for OpsEvent
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>,
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