pub struct SchedulerDecision {Show 16 fields
pub schema_version: String,
pub protocol_version: String,
pub graph_id: Uuid,
pub sequence: u64,
pub node_id: String,
pub kind: SchedulerDecisionKind,
pub from_state: AgentNodeState,
pub to_state: AgentNodeState,
pub session_id: Option<Uuid>,
pub delegation_id: Option<Uuid>,
pub receipt_hash: Option<String>,
pub workspace_generation: Option<String>,
pub reason_code: Option<String>,
pub detail: Option<String>,
pub previous_hash: Option<String>,
pub hash: String,
}Expand description
One hash-chained scheduler state transition.
Fields§
§schema_version: StringPublic Proofborne schema identifier.
protocol_version: StringAgent-graph protocol identifier.
graph_id: UuidGraph receiving this transition.
sequence: u64Zero-based append-only transition sequence.
node_id: StringGraph-local node receiving the transition.
kind: SchedulerDecisionKindRuntime-owned transition reason.
from_state: AgentNodeStatePersisted state before the transition.
to_state: AgentNodeStatePersisted state after the transition.
session_id: Option<Uuid>Provider-backed session, when one completed.
delegation_id: Option<Uuid>Materialized P3A worker delegation, when applicable.
receipt_hash: Option<String>Canonical digest of the handoff, review, merge, or failure receipt.
workspace_generation: Option<String>Parent workspace generation observed by this transition.
reason_code: Option<String>Stable machine-readable terminal reason.
detail: Option<String>Operator-facing failure detail for terminal failure transitions.
previous_hash: Option<String>Hash of the immediately preceding scheduler decision.
hash: StringCanonical digest over all preceding decision fields.
Implementations§
Source§impl SchedulerDecision
impl SchedulerDecision
Sourcepub fn new(
graph_id: Uuid,
sequence: u64,
node_id: impl Into<String>,
kind: SchedulerDecisionKind,
from_state: AgentNodeState,
to_state: AgentNodeState,
session_id: Option<Uuid>,
delegation_id: Option<Uuid>,
receipt_hash: Option<String>,
workspace_generation: Option<String>,
reason_code: Option<String>,
previous_hash: Option<String>,
detail: Option<String>,
) -> Result<Self, AgentGraphError>
pub fn new( graph_id: Uuid, sequence: u64, node_id: impl Into<String>, kind: SchedulerDecisionKind, from_state: AgentNodeState, to_state: AgentNodeState, session_id: Option<Uuid>, delegation_id: Option<Uuid>, receipt_hash: Option<String>, workspace_generation: Option<String>, reason_code: Option<String>, previous_hash: Option<String>, detail: Option<String>, ) -> Result<Self, AgentGraphError>
Constructs and hashes one deterministic transition.
Sourcepub fn validate(&self) -> Result<(), AgentGraphError>
pub fn validate(&self) -> Result<(), AgentGraphError>
Validates schema, transition semantics, and its canonical digest.
Trait Implementations§
Source§impl Clone for SchedulerDecision
impl Clone for SchedulerDecision
Source§fn clone(&self) -> SchedulerDecision
fn clone(&self) -> SchedulerDecision
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more