pub struct StepEntry {Show 14 fields
pub step_id: StepId,
pub step_ref: Option<String>,
pub status: Option<String>,
pub binding_digest: Option<BindingDigest>,
pub at: u64,
pub attempt: Option<u32>,
pub started_at_ms: Option<i64>,
pub completed_at_ms: Option<i64>,
pub duration_ms: Option<u64>,
pub worker_kind: Option<String>,
pub model: Option<String>,
pub usage: Option<TokenUsage>,
pub num_turns: Option<u32>,
pub adapter_data: Option<Value>,
}Expand description
One entry in a Run’s step trace — appended as the engine dispatches (and finishes) each step. Purely observational: no field here is consulted for flow control.
The per-step stats extension (started/completed timestamps, duration,
token usage, model, worker kind, variant-specific adapter_data) is
additive: every field is Option + #[serde(default)] so rows
written before the extension deserialize unchanged, and a dispatch
where no boundary reported stats still appends a valid entry. The
entry stays write-once — in-flight visibility belongs to the
sibling crate::store::trace::TraceEvent stream, never to
in-place updates here.
Fields§
§step_id: StepIdThe step this entry traces.
step_ref: Option<String>The Blueprint step ref (Step.ref) that was dispatched, if known.
status: Option<String>Free-form status label for this step at the time the entry was
recorded (e.g. "dispatched", "passed", "blocked").
binding_digest: Option<BindingDigest>Immutable Runner/Agent/Context snapshot digest used for this step.
None for rows created before BoundAgent launch wiring.
at: u64Unix epoch seconds — when this entry was recorded.
attempt: Option<u32>The attempt number the stats below describe (the LAST attempt the dispatch ran), when a worker boundary reported one.
started_at_ms: Option<i64>Unix epoch milliseconds — when the dispatcher began this step.
completed_at_ms: Option<i64>Unix epoch milliseconds — when the step reached its outcome.
duration_ms: Option<u64>Wall-clock dispatch duration in milliseconds (dispatcher-measured, worker-kind independent).
worker_kind: Option<String>Worker kind label ("agent_block" / "subprocess" / "operator"
/ …) as reported by the worker boundary.
model: Option<String>The model that served the attempt, when known.
usage: Option<TokenUsage>Normalized token usage, when a worker boundary reported one.
num_turns: Option<u32>Number of LLM turns the attempt ran, when reported.
adapter_data: Option<Value>Worker-kind-specific raw payload (size-capped, engine-opaque).
Implementations§
Source§impl StepEntry
impl StepEntry
Sourcepub fn basic(
step_id: StepId,
step_ref: Option<String>,
status: Option<String>,
binding_digest: Option<BindingDigest>,
at: u64,
) -> Self
pub fn basic( step_id: StepId, step_ref: Option<String>, status: Option<String>, binding_digest: Option<BindingDigest>, at: u64, ) -> Self
Construct an entry with only the pre-stats fields set — the shape
every pre-extension writer produced. Stats fields default to
None; the dispatcher’s fold fills them when available.
Sourcepub fn with_worker_stats(self, stats: WorkerStats) -> Self
pub fn with_worker_stats(self, stats: WorkerStats) -> Self
Fold a boundary-reported crate::store::trace::WorkerStats
into this entry (the dispatcher’s outcome-time fold). None
fields in stats leave the entry untouched; adapter_data is
size-capped via crate::store::trace::cap_payload.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for StepEntry
impl<'de> Deserialize<'de> for StepEntry
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>,
Source§impl JsonSchema for StepEntry
impl JsonSchema for StepEntry
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for StepEntry
impl RefUnwindSafe for StepEntry
impl Send for StepEntry
impl Sync for StepEntry
impl Unpin for StepEntry
impl UnsafeUnpin for StepEntry
impl UnwindSafe for StepEntry
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