Skip to main content

StepResponse

Struct StepResponse 

Source
pub struct StepResponse {
Show 22 fields pub id: Uuid, pub trace_id: Uuid, pub run_id: Uuid, pub name: String, pub kind: StepKind, pub position: u32, pub status: StepStatus, pub attempt: u32, pub input: Option<Value>, pub output: Option<Value>, pub error: Option<String>, pub duration_ms: u64, pub cost_usd: Decimal, pub input_tokens: Option<u64>, pub output_tokens: Option<u64>, pub created_at: DateTime<Utc>, pub updated_at: DateTime<Utc>, pub started_at: Option<DateTime<Utc>>, pub completed_at: Option<DateTime<Utc>>, pub dependencies: Vec<Uuid>, pub debug_messages: Option<Value>, pub artifacts: Vec<ArtifactResponse>,
}
Expand description

Step response DTO — public API representation of a step.

§Examples

use ironflow_store::models::Step;
use ironflow_api::entities::StepResponse;

Fields§

§id: Uuid

Unique step identifier.

§trace_id: Uuid

Deterministic trace ID for log correlation.

§run_id: Uuid

Parent run ID.

§name: String

Step name.

§kind: StepKind

Step operation type.

§position: u32

Execution order (0-based).

§status: StepStatus

Current status.

§attempt: u32

Which run attempt produced this step (1-based).

A run retried twice exposes steps with attempt 1, 2 and 3. Steps from earlier attempts are kept so a failed attempt stays inspectable.

§input: Option<Value>

Input configuration.

§output: Option<Value>

Step output.

§error: Option<String>

Optional error message.

§duration_ms: u64

Execution duration in milliseconds.

§cost_usd: Decimal

Cost in USD.

§input_tokens: Option<u64>

Input token count (agent steps).

§output_tokens: Option<u64>

Output token count (agent steps).

§created_at: DateTime<Utc>

When created.

§updated_at: DateTime<Utc>

When updated.

§started_at: Option<DateTime<Utc>>

When execution started.

§completed_at: Option<DateTime<Utc>>

When execution completed.

§dependencies: Vec<Uuid>

IDs of steps this step depends on (direct dependencies).

§debug_messages: Option<Value>

Verbose conversation trace for agent steps (thinking blocks, tool calls, tool results, per-turn usage). None when verbose mode was off or the step is not an agent step.

§artifacts: Vec<ArtifactResponse>

Files this step produced, downloadable through the artifact route.

Empty when the step produced none or when artifact storage is not configured on the server.

Implementations§

Source§

impl StepResponse

Source

pub fn with_dependencies(step: Step, dependencies: Vec<Uuid>) -> Self

Build a response from a step entity with pre-resolved dependencies.

Artifacts are left empty; use with_dependencies_and_artifacts when they have been fetched.

Source

pub fn with_dependencies_and_artifacts( step: Step, dependencies: Vec<Uuid>, artifacts: Vec<ArtifactResponse>, ) -> Self

Build a response from a step entity with its dependencies and artifacts.

Trait Implementations§

Source§

impl Debug for StepResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for StepResponse

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<Step> for StepResponse

Source§

fn from(step: Step) -> Self

Converts to this type from the input type.
Source§

impl Serialize for StepResponse

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more