Skip to main content

Step

Struct Step 

Source
pub struct Step {
    pub trajectory_id: String,
    pub step_index: u32,
    pub state: StepUpdateState,
    pub source: StepUpdateSource,
    pub target: StepUpdateTarget,
    pub kind: StepKind,
    pub text: String,
    pub thinking: String,
    pub text_delta: String,
    pub error_message: Option<String>,
    pub update: StepUpdate,
}
Available on crate feature async-client only.
Expand description

A step, merged across every update the harness has sent for it.

Fields§

§trajectory_id: String

The trajectory this step belongs to. The main conversation and each subagent get their own.

§step_index: u32

Position within the trajectory.

§state: StepUpdateState

Lifecycle state as of this update.

§source: StepUpdateSource

Who produced the step.

§target: StepUpdateTarget

Who it is addressed to.

§kind: StepKind

What the step is doing.

§text: String

Text accumulated so far, deltas included.

§thinking: String

Reasoning accumulated so far, deltas included.

§text_delta: String

Only the text that arrived in this update, for incremental rendering.

§error_message: Option<String>

Failure detail, when Self::state is StepUpdateState::Error.

§update: StepUpdate

The frame this snapshot came from, for anything the summary omits.

Implementations§

Source§

impl Step

Source

pub fn id(&self) -> String

A stable key for this step: "{trajectory_id}:{step_index}".

Source

pub fn is_final(&self) -> bool

True once the harness will not update this step again.

Source

pub fn text(&self) -> Option<&str>

The accumulated text, if there is any.

Source

pub fn user_facing_text(&self) -> Option<&str>

Text addressed to the user, as opposed to the model or the environment.

This is the filter to use when rendering a conversation: it drops the echo of the user’s own input and the agent’s tool chatter.

Trait Implementations§

Source§

impl Clone for Step

Source§

fn clone(&self) -> Step

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 Step

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Step

§

impl RefUnwindSafe for Step

§

impl Send for Step

§

impl Sync for Step

§

impl Unpin for Step

§

impl UnsafeUnpin for Step

§

impl UnwindSafe for Step

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> 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
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 = Infallible

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