#[non_exhaustive]pub enum RunnerOutput {
TextContent {
text: String,
},
BuiltinToolCall {
tool_use_id: String,
name: String,
input: Value,
},
CustomToolCall {
custom_tool_use_id: String,
name: String,
input: Value,
},
McpToolCall {
tool_use_id: String,
name: String,
input: Value,
},
TurnComplete {
stop_reason: StopReason,
},
}Expand description
Represents a Runner output event that needs to be mapped to a SessionEvent.
This is the internal representation that normalizes provider-specific event
formats before they become provider-neutral session events. The session loop
constructs RunnerOutput values from the raw Runner event stream.
§Variants
TextContent: LLM generated text →agent.messageBuiltinToolCall: Built-in tool invocation →agent.tool_useCustomToolCall: Custom (client-executed) tool →agent.custom_tool_useMcpToolCall: MCP tool invocation →agent.mcp_tool_useTurnComplete: Turn finished with a stop reason →status.idle
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TextContent
LLM generated text content.
BuiltinToolCall
LLM requested a built-in tool call (executes server-side in sandbox).
Fields
CustomToolCall
LLM requested a custom (client-executed) tool call. The session loop will park until the client delivers a result.
Fields
McpToolCall
LLM requested an MCP tool call.
Fields
TurnComplete
Turn completed with a stop reason.
Fields
§
stop_reason: StopReasonWhy the turn ended.
Trait Implementations§
Source§impl Clone for RunnerOutput
impl Clone for RunnerOutput
Source§fn clone(&self) -> RunnerOutput
fn clone(&self) -> RunnerOutput
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RunnerOutput
impl Debug for RunnerOutput
Source§impl<'de> Deserialize<'de> for RunnerOutput
impl<'de> Deserialize<'de> for RunnerOutput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RunnerOutput
impl RefUnwindSafe for RunnerOutput
impl Send for RunnerOutput
impl Sync for RunnerOutput
impl Unpin for RunnerOutput
impl UnsafeUnpin for RunnerOutput
impl UnwindSafe for RunnerOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more