Skip to main content

StepResponse

Struct StepResponse 

Source
pub struct StepResponse {
Show 35 fields pub account: Option<StepAccountResponse>, pub account_id: Option<Uuid>, pub agent_role: Option<String>, pub approval_assignee: Option<String>, pub approval_deadline_at: Option<DateTime<Utc>>, pub approval_requirement: Option<ApprovalRequirement>, pub approval_seconds_remaining: Option<i64>, pub approvals: Vec<StepApproval>, pub approvals_required: Option<i32>, pub artifacts: Vec<ArtifactResponse>, pub attempt: i32, pub cache_creation_input_tokens: Option<i64>, pub cache_read_input_tokens: Option<i64>, pub completed_at: Option<DateTime<Utc>>, pub cost_usd: f64, pub created_at: DateTime<Utc>, pub debug_messages: Option<Value>, pub dependencies: Vec<Uuid>, pub duration_ms: i64, pub environment_id: Option<String>, pub error: Option<String>, pub id: Uuid, pub input: Option<Map<String, Value>>, pub input_tokens: Option<i64>, pub kind: String, pub name: String, pub output: Option<Map<String, Value>>, pub output_tokens: Option<i64>, pub position: i32, pub run_id: Uuid, pub session_id: Option<String>, pub started_at: Option<DateTime<Utc>>, pub status: StepStatus, pub trace_id: Uuid, pub updated_at: DateTime<Utc>,
}
Expand description

Step response DTO — public API representation of a step.

§Examples

use ironflow_store::models::Step;
use ironflow_api::entities::StepResponse;
JSON schema
{
 "description": "Step response DTO — public API representation of a step.\n\n# Examples\n\n```\nuse ironflow_store::models::Step;\nuse ironflow_api::entities::StepResponse;\n```",
 "type": "object",
 "required": [
   "attempt",
   "cost_usd",
   "created_at",
   "dependencies",
   "duration_ms",
   "id",
   "kind",
   "name",
   "position",
   "run_id",
   "status",
   "trace_id",
   "updated_at"
 ],
 "properties": {
   "account": {
     "$ref": "#/components/schemas/StepAccountResponse"
   },
   "account_id": {
     "description": "Provider Account the agent step ran under, if any.",
     "type": [
       "string",
       "null"
     ],
     "format": "uuid"
   },
   "agent_role": {
     "description": "Name of the `AgentRole` the agent step was created from; null for any\nother step, an agent step built by hand, or a step stored before roles\nwere recorded.",
     "type": [
       "string",
       "null"
     ]
   },
   "approval_assignee": {
     "description": "Who the approval is currently assigned to.\n\nSerialized as a prefixed string: `user:{name}` or `group:{name}`.",
     "type": [
       "string",
       "null"
     ]
   },
   "approval_deadline_at": {
     "description": "When this approval gate expires, if it carries an SLA deadline.",
     "type": [
       "string",
       "null"
     ],
     "format": "date-time"
   },
   "approval_requirement": {
     "$ref": "#/components/schemas/ApprovalRequirement"
   },
   "approval_seconds_remaining": {
     "description": "Seconds left before the gate escalates. Clamped at 0, `None` when the\nstep has no deadline.",
     "type": [
       "integer",
       "null"
     ],
     "format": "int64"
   },
   "approvals": {
     "description": "Votes cast on the approval gate so far, at most one per user.",
     "type": "array",
     "items": {
       "$ref": "#/components/schemas/StepApproval"
     }
   },
   "approvals_required": {
     "description": "Distinct approvals the gate needs: the requirement's count, `1` for an\napproval step without rules, `None` for any other step kind.",
     "type": [
       "integer",
       "null"
     ],
     "format": "int32",
     "minimum": 0.0
   },
   "artifacts": {
     "description": "Files this step produced, downloadable through the artifact route.\n\nEmpty when the step produced none or when artifact storage is not\nconfigured on the server.",
     "type": "array",
     "items": {
       "$ref": "#/components/schemas/ArtifactResponse"
     }
   },
   "attempt": {
     "description": "Which run attempt produced this step (1-based).\n\nA run retried twice exposes steps with `attempt` 1, 2 and 3. Steps from\nearlier attempts are kept so a failed attempt stays inspectable.",
     "type": "integer",
     "format": "int32",
     "minimum": 0.0
   },
   "cache_creation_input_tokens": {
     "description": "Input tokens written to the prompt cache (agent steps).",
     "type": [
       "integer",
       "null"
     ],
     "format": "int64",
     "minimum": 0.0
   },
   "cache_read_input_tokens": {
     "description": "Input tokens served from the prompt cache (agent steps).",
     "type": [
       "integer",
       "null"
     ],
     "format": "int64",
     "minimum": 0.0
   },
   "completed_at": {
     "description": "When execution completed.",
     "type": [
       "string",
       "null"
     ],
     "format": "date-time"
   },
   "cost_usd": {
     "description": "Cost in USD.",
     "type": "number",
     "format": "double"
   },
   "created_at": {
     "description": "When created.",
     "type": "string",
     "format": "date-time"
   },
   "debug_messages": {
     "description": "Verbose conversation trace for agent steps (thinking blocks, tool\ncalls, tool results, per-turn usage). `None` when verbose mode was\noff or the step is not an agent step."
   },
   "dependencies": {
     "description": "IDs of steps this step depends on (direct dependencies).",
     "type": "array",
     "items": {
       "type": "string",
       "format": "uuid"
     }
   },
   "duration_ms": {
     "description": "Execution duration in milliseconds.",
     "type": "integer",
     "format": "int64",
     "minimum": 0.0
   },
   "environment_id": {
     "description": "Persistent environment the agent step ran in, if any. Pass it to\n`Agent::resume_environment` to continue a later step in the same\nworkspace.",
     "type": [
       "string",
       "null"
     ]
   },
   "error": {
     "description": "Optional error message.",
     "type": [
       "string",
       "null"
     ]
   },
   "id": {
     "description": "Unique step identifier.",
     "type": "string",
     "format": "uuid"
   },
   "input": {
     "description": "Input configuration.",
     "type": [
       "object",
       "null"
     ],
     "additionalProperties": {}
   },
   "input_tokens": {
     "description": "Uncached input token count (agent steps).",
     "type": [
       "integer",
       "null"
     ],
     "format": "int64",
     "minimum": 0.0
   },
   "kind": {
     "description": "Step operation type.",
     "type": "string"
   },
   "name": {
     "description": "Step name.",
     "type": "string"
   },
   "output": {
     "description": "Step output.",
     "type": [
       "object",
       "null"
     ],
     "additionalProperties": {}
   },
   "output_tokens": {
     "description": "Output token count (agent steps).",
     "type": [
       "integer",
       "null"
     ],
     "format": "int64",
     "minimum": 0.0
   },
   "position": {
     "description": "Execution order (0-based).",
     "type": "integer",
     "format": "int32",
     "minimum": 0.0
   },
   "run_id": {
     "description": "Parent run ID.",
     "type": "string",
     "format": "uuid"
   },
   "session_id": {
     "description": "Claude Code session the agent step ran in, if any. A step interrupted\nby a lost lease resumes it on its next execution.",
     "type": [
       "string",
       "null"
     ]
   },
   "started_at": {
     "description": "When execution started.",
     "type": [
       "string",
       "null"
     ],
     "format": "date-time"
   },
   "status": {
     "$ref": "#/components/schemas/StepStatus"
   },
   "trace_id": {
     "description": "Deterministic trace ID for log correlation.",
     "type": "string",
     "format": "uuid"
   },
   "updated_at": {
     "description": "When updated.",
     "type": "string",
     "format": "date-time"
   }
 }
}
```ignore
</details>

Fields§

§account: Option<StepAccountResponse>§account_id: Option<Uuid>

Provider Account the agent step ran under, if any.

§agent_role: Option<String>

Name of the AgentRole the agent step was created from; null for any other step, an agent step built by hand, or a step stored before roles were recorded.

§approval_assignee: Option<String>

Who the approval is currently assigned to.

Serialized as a prefixed string: user:{name} or group:{name}.

§approval_deadline_at: Option<DateTime<Utc>>

When this approval gate expires, if it carries an SLA deadline.

§approval_requirement: Option<ApprovalRequirement>§approval_seconds_remaining: Option<i64>

Seconds left before the gate escalates. Clamped at 0, None when the step has no deadline.

§approvals: Vec<StepApproval>

Votes cast on the approval gate so far, at most one per user.

§approvals_required: Option<i32>

Distinct approvals the gate needs: the requirement’s count, 1 for an approval step without rules, None for any other step kind.

§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.

§attempt: i32

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.

§cache_creation_input_tokens: Option<i64>

Input tokens written to the prompt cache (agent steps).

§cache_read_input_tokens: Option<i64>

Input tokens served from the prompt cache (agent steps).

§completed_at: Option<DateTime<Utc>>

When execution completed.

§cost_usd: f64

Cost in USD.

§created_at: DateTime<Utc>

When created.

§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.

§dependencies: Vec<Uuid>

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

§duration_ms: i64

Execution duration in milliseconds.

§environment_id: Option<String>

Persistent environment the agent step ran in, if any. Pass it to Agent::resume_environment to continue a later step in the same workspace.

§error: Option<String>

Optional error message.

§id: Uuid

Unique step identifier.

§input: Option<Map<String, Value>>

Input configuration.

§input_tokens: Option<i64>

Uncached input token count (agent steps).

§kind: String

Step operation type.

§name: String

Step name.

§output: Option<Map<String, Value>>

Step output.

§output_tokens: Option<i64>

Output token count (agent steps).

§position: i32

Execution order (0-based).

§run_id: Uuid

Parent run ID.

§session_id: Option<String>

Claude Code session the agent step ran in, if any. A step interrupted by a lost lease resumes it on its next execution.

§started_at: Option<DateTime<Utc>>

When execution started.

§status: StepStatus§trace_id: Uuid

Deterministic trace ID for log correlation.

§updated_at: DateTime<Utc>

When updated.

Implementations§

Trait Implementations§

Source§

impl Clone for StepResponse

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
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<StepResponse> for StepResponse

Source§

fn from(value: StepResponse) -> 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
Source§

impl TryFrom<StepResponse> for StepResponse

Source§

type Error = ConversionError

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

fn try_from(value: StepResponse) -> Result<Self, ConversionError>

Performs the conversion.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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, !>

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