Skip to main content

RunPhase

Enum RunPhase 

Source
pub enum RunPhase {
Show 15 variants NotStarted, ReadyForContext, ReadyToRequestModel { turn_id: TurnId, step: u32, context: ContextPack, }, AwaitingModelResponse { turn_id: TurnId, step: u32, context: ContextPack, }, AwaitingToolCall { turn_id: TurnId, proposals: Vec<ToolProposal>, }, AwaitingPolicy { call: ToolCall, }, AwaitingApproval { call: ToolCall, reason: String, }, PolicyDenied { call_id: ToolCallId, reason: String, }, ApprovalDenied { call_id: ToolCallId, reason: String, }, ReadyToExecuteTool { call: ToolCall, }, ToolRunning { call_id: ToolCallId, }, ToolFailed { call_id: ToolCallId, reason: String, }, TurnConcluded, Finished, Failed { reason: String, },
}
Expand description

Current phase of one run.

Variants§

§

NotStarted

No run_started event has been applied.

§

ReadyForContext

The run is waiting for context to be built for the next model turn.

§

ReadyToRequestModel

Context is built and the next command is a model request.

Fields

§turn_id: TurnId

Turn whose context is ready.

§step: u32

Monotonic model step expected in the request and response events.

§context: ContextPack

Budget-validated context to send to the model.

§

AwaitingModelResponse

A model request was recorded; the run is waiting for the response.

Fields

§turn_id: TurnId

Turn awaiting a model response.

§step: u32

Model step the response must match.

§context: ContextPack

Budget-validated context retained if the request fails.

§

AwaitingToolCall

The model response contained at least one tool proposal.

Fields

§turn_id: TurnId

Turn that produced the proposals.

§proposals: Vec<ToolProposal>

Model-authored proposals awaiting host validation and classification.

§

AwaitingPolicy

A validated tool call is waiting for policy evaluation.

Fields

§call: ToolCall

Validated and effect-classified call to evaluate.

§

AwaitingApproval

Policy requires approval before tool execution.

Fields

§call: ToolCall

Call withheld until approval is recorded.

§reason: String

Policy explanation for requiring approval.

§

PolicyDenied

Policy denied the tool call; the turn is concluded and may continue or fail.

Fields

§call_id: ToolCallId

Call rejected by policy.

§reason: String

Recorded policy explanation.

§

ApprovalDenied

A human or host actor denied the pending approval; the turn is concluded and may continue or fail.

Fields

§call_id: ToolCallId

Call denied before execution.

§reason: String

Recorded approval denial explanation.

§

ReadyToExecuteTool

The tool call may be executed.

Fields

§call: ToolCall

Policy-allowed or approved call ready for host execution.

§

ToolRunning

Tool execution has started.

Fields

§call_id: ToolCallId

Call that crossed the host execution boundary.

§

ToolFailed

A tool failed; the turn is concluded and may continue or fail.

Fields

§call_id: ToolCallId

Call whose execution failed.

§reason: String

Recorded host failure explanation.

§

TurnConcluded

The current turn completed successfully; the host may finish or continue.

§

Finished

The run finished successfully.

§

Failed

The run finished unsuccessfully.

Fields

§reason: String

Durable terminal failure explanation.

Trait Implementations§

Source§

impl Clone for RunPhase

Source§

fn clone(&self) -> RunPhase

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 RunPhase

Source§

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

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

impl PartialEq for RunPhase

Source§

fn eq(&self, other: &RunPhase) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RunPhase

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