pub struct ToolOutput {
pub tool_name: ToolName,
pub summary: String,
pub blocks_executed: u32,
pub filter_stats: Option<FilterStats>,
pub diff: Option<DiffData>,
pub streamed: bool,
pub terminal_id: Option<String>,
pub locations: Option<Vec<String>>,
pub raw_response: Option<Value>,
pub claim_source: Option<ClaimSource>,
}Expand description
Structured result from tool execution.
Returned by every ToolExecutor implementation on success. The agent loop uses
ToolOutput::summary as the tool result text injected into the LLM context.
§Example
use zeph_tools::{ToolOutput, executor::ClaimSource};
use zeph_common::ToolName;
let output = ToolOutput {
tool_name: ToolName::new("shell"),
summary: "hello\n".to_owned(),
blocks_executed: 1,
filter_stats: None,
diff: None,
streamed: false,
terminal_id: None,
locations: None,
raw_response: None,
claim_source: Some(ClaimSource::Shell),
};
assert_eq!(output.to_string(), "hello\n");Fields§
§tool_name: ToolNameName of the tool that produced this output (e.g. "shell", "web-scrape").
summary: StringHuman-readable result text injected into the LLM context.
blocks_executed: u32Number of code blocks processed in this invocation.
filter_stats: Option<FilterStats>Output filter statistics when filtering was applied, None otherwise.
diff: Option<DiffData>File diff data for TUI display when the tool modified a tracked file.
streamed: boolWhether this tool already streamed its output via ToolEvent channel.
terminal_id: Option<String>Terminal ID when the tool was executed via IDE terminal (ACP terminal/* protocol).
locations: Option<Vec<String>>File paths touched by this tool call, for IDE follow-along (e.g. ToolCallLocation).
raw_response: Option<Value>Structured tool response payload for ACP intermediate tool_call_update notifications.
claim_source: Option<ClaimSource>Provenance of this tool result. Set by the executor at construction time.
None in pass-through wrappers, mocks, and tests.
Trait Implementations§
Source§impl Clone for ToolOutput
impl Clone for ToolOutput
Source§fn clone(&self) -> ToolOutput
fn clone(&self) -> ToolOutput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToolOutput
impl Debug for ToolOutput
Auto Trait Implementations§
impl Freeze for ToolOutput
impl RefUnwindSafe for ToolOutput
impl Send for ToolOutput
impl Sync for ToolOutput
impl Unpin for ToolOutput
impl UnsafeUnpin for ToolOutput
impl UnwindSafe for ToolOutput
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.