Struct SopRun
pub struct SopRun {Show 18 fields
pub run_id: String,
pub sop_name: String,
pub initiating_agent: Option<String>,
pub trigger_event: SopEvent,
pub frame_marker_id: String,
pub status: SopRunStatus,
pub current_step: u32,
pub total_steps: u32,
pub started_at: String,
pub completed_at: Option<String>,
pub failure_reason: Option<String>,
pub step_results: Vec<SopStepResult>,
pub waiting_since: Option<String>,
pub llm_calls_saved: u64,
pub revision: u32,
pub revision_base: u32,
pub decided_mode: Option<SopExecutionMode>,
pub decisions: BTreeMap<u32, f64>,
}Expand description
A full SOP execution run (from trigger to completion).
Fields§
§run_id: String§sop_name: String§initiating_agent: Option<String>The agent whose turn started this run, for runs that began inside one
(sop_execute). A headless trigger has no initiating turn and leaves it
None.
Persisted because it has to outlive the thing it came from: an unowned
at an approval resumes on the headless driver — possibly in a later
daemon generation — with that turn long gone. #[serde(default)] so runs
persisted before this field restore as None rather than failing to
load.
trigger_event: SopEvent§frame_marker_id: StringStable per-run boundary marker for untrusted trigger framing.
status: SopRunStatus§current_step: u32§total_steps: u32§started_at: String§completed_at: Option<String>§failure_reason: Option<String>Why this run reached a Failed terminal state, captured at the
transition that failed it. None while the run is live and for runs
that ended any other way. Serialized only when present, so runs
persisted before this field existed round-trip unchanged.
step_results: Vec<SopStepResult>§waiting_since: Option<String>ISO-8601 timestamp when the run entered WaitingApproval (for timeout tracking).
llm_calls_saved: u64Number of LLM calls saved by deterministic execution in this run.
revision: u32Gate-presentation counter: bumped on each Revise re-presentation AND on
each new checkpoint park after the first, so EVERY prompt this run ever
sends has a unique revision-qualified reference (<run_id>#<rev>; bare =
0, the run’s very first gate). An answer on a superseded prompt — an older
draft, or an earlier GATE’s leftover buttons — can never resolve the
current one.
revision_base: u32revision as of the CURRENT gate’s first presentation. revision - revision_base = re-drafts spent at this gate (the per-gate revise cap);
reset when a new checkpoint parks, untouched by revise re-parks.
decided_mode: Option<SopExecutionMode>Execution mode a decision model chose for this run at dispatch. When set it replaces the SOP’s authored mode for this run’s approval gating; step-level confirmations and checkpoints still apply.
decisions: BTreeMap<u32, f64>p(yes) the decision model gave each conditional-part step (decide)
at dispatch, keyed by step number. A step whose answer is below the
SOP’s part_threshold is skipped; a step missing here runs. Also
exposed to when: conditions as $.decisions.<step>.
Trait Implementations§
Source§impl Attributable for SopRun
impl Attributable for SopRun
fn role(&self) -> Role
fn alias(&self) -> &str
Source§fn tool_provenance(&self) -> ToolProvenance
fn tool_provenance(&self) -> ToolProvenance
Source§impl<'de> Deserialize<'de> for SopRun
impl<'de> Deserialize<'de> for SopRun
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 SopRun
impl RefUnwindSafe for SopRun
impl Send for SopRun
impl Sync for SopRun
impl Unpin for SopRun
impl UnsafeUnpin for SopRun
impl UnwindSafe for SopRun
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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