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
context: ContextPackBudget-validated context to send to the model.
AwaitingModelResponse
A model request was recorded; the run is waiting for the response.
Fields
context: ContextPackBudget-validated context retained if the request fails.
AwaitingToolCall
The model response contained at least one tool proposal.
Fields
proposals: Vec<ToolProposal>Model-authored proposals awaiting host validation and classification.
AwaitingPolicy
A validated tool call is waiting for policy evaluation.
AwaitingApproval
Policy requires approval before tool execution.
Fields
PolicyDenied
Policy denied the tool call; the turn is concluded and may continue or fail.
ApprovalDenied
A human or host actor denied the pending approval; the turn is concluded and may continue or fail.
Fields
call_id: ToolCallIdCall denied before execution.
ReadyToExecuteTool
The tool call may be executed.
ToolRunning
Tool execution has started.
Fields
call_id: ToolCallIdCall that crossed the host execution boundary.
ToolFailed
A tool failed; the turn is concluded and may continue or fail.
Fields
call_id: ToolCallIdCall whose execution failed.
TurnConcluded
The current turn completed successfully; the host may finish or continue.
Finished
The run finished successfully.
Failed
The run finished unsuccessfully.