pub struct ToolExecutionOutput {
pub result: ToolResult,
pub next_provider_parts: Vec<ContentPart>,
}Expand description
Output of an authorized tool execution that may carry a provider-neutral continuation artifact (ADR-051).
Most tools produce only the normal ToolResult. A tool like
read_image additionally returns next_provider_parts — a
Vec<ContentPart> that the agent delivers to the immediately
following provider request exactly once and then discards.
The continuation artifact is never persisted in the session
transcript, TLOG, UI, hooks, exports, or compaction. It exists
solely for the next stream_with_tools call.
Fields§
§result: ToolResultThe normal textual tool result (same as ToolResult).
next_provider_parts: Vec<ContentPart>Provider-neutral content parts to carry to the next provider request. Empty for all existing tools.
Implementations§
Source§impl ToolExecutionOutput
impl ToolExecutionOutput
Sourcepub fn success(content: impl Into<String>) -> Self
pub fn success(content: impl Into<String>) -> Self
Creates an output with a successful text result and no continuation parts.
Sourcepub fn error(content: impl Into<String>) -> Self
pub fn error(content: impl Into<String>) -> Self
Creates an output with an error text result and no continuation parts.
Sourcepub fn from_result(result: ToolResult) -> Self
pub fn from_result(result: ToolResult) -> Self
Wraps an existing ToolResult with no continuation parts.
Trait Implementations§
Source§impl Clone for ToolExecutionOutput
impl Clone for ToolExecutionOutput
Source§fn clone(&self) -> ToolExecutionOutput
fn clone(&self) -> ToolExecutionOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more