pub enum ToolMetadata {
Show 16 variants
None,
ReadFile {
paths: Vec<String>,
line_count: usize,
byte_count: usize,
truncated: bool,
},
WriteFile {
path: String,
line_count: usize,
byte_count: usize,
created: Option<bool>,
},
ApplyPatch {
added: Vec<String>,
modified: Vec<String>,
deleted: Vec<String>,
renamed: Vec<(String, String)>,
fuzzy: bool,
},
DeleteFile {
path: String,
},
CreateDirectory {
path: String,
},
WebSearch {
queries: Vec<String>,
requested_count: usize,
result_count: usize,
sources: Vec<String>,
},
WebFetch {
url: String,
title: Option<String>,
line_count: usize,
byte_count: usize,
},
ExecuteCommand {
command: String,
working_dir: Option<String>,
exit_code: Option<i32>,
timed_out: bool,
background: bool,
stdout_lines: usize,
stderr_lines: usize,
detected_urls: Vec<String>,
pid: Option<u32>,
log_path: Option<String>,
denied_by_sandbox: bool,
},
ComputerUse {
action: String,
params: Value,
},
Mcp {
server: String,
tool: String,
},
Subagent {
model_id: String,
agent_id: String,
},
Tasks {
action: String,
completed: u32,
total: u32,
},
Questions {
answers: Vec<QuestionAnswer>,
remembered: bool,
},
Plan {
path: String,
body: String,
start: bool,
fresh: bool,
fork: bool,
model: Option<String>,
},
Custom {
name: String,
data: Value,
},
}Expand description
Typed metadata produced by a specific tool implementation.
Variants§
None
ReadFile
WriteFile
ApplyPatch
Fields
DeleteFile
CreateDirectory
WebSearch
WebFetch
ExecuteCommand
Fields
ComputerUse
Mcp
Subagent
Fields
Tasks
The task checklist tools (task_create / task_update / task_list).
action is the wire tool suffix (“create” / “update” / “list”);
counts are over visible (non-deleted) tasks after the call.
Questions
ask_user_question resolved with answers. Kept structured so the
transcript can replay each question → answer pair rather than a bare
duration.
Fields
answers: Vec<QuestionAnswer>Plan
exit_plan_mode resolved with an APPROVED plan: the transcript
renders the plan body as a markdown block, and handle_tool_finished
keys the post-approval mechanics (clear session.plan, seed the
checklist, optionally auto-submit) on this variant. A
request-for-changes outcome carries no metadata.
Fields
fresh: boolExecution begins in a FRESH conversation seeded with the handoff preamble + plan (clear-context execute, or a fresh-session handoff). The exploration context is left behind on disk.
Custom
Trait Implementations§
Source§impl Clone for ToolMetadata
impl Clone for ToolMetadata
Source§fn clone(&self) -> ToolMetadata
fn clone(&self) -> ToolMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ToolMetadata
impl Debug for ToolMetadata
Source§impl Default for ToolMetadata
impl Default for ToolMetadata
Source§fn default() -> ToolMetadata
fn default() -> ToolMetadata
Source§impl<'de> Deserialize<'de> for ToolMetadata
impl<'de> Deserialize<'de> for ToolMetadata
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>,
Source§impl PartialEq for ToolMetadata
impl PartialEq for ToolMetadata
Source§impl Serialize for ToolMetadata
impl Serialize for ToolMetadata
impl StructuralPartialEq for ToolMetadata
Auto Trait Implementations§
impl Freeze for ToolMetadata
impl RefUnwindSafe for ToolMetadata
impl Send for ToolMetadata
impl Sync for ToolMetadata
impl Unpin for ToolMetadata
impl UnsafeUnpin for ToolMetadata
impl UnwindSafe for ToolMetadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more