pub struct ToolRequest {
pub id: String,
pub title: Option<String>,
pub kind: Option<String>,
pub raw_input: Option<Value>,
pub locations: Vec<PathBuf>,
pub status: Option<String>,
}Expand description
What an agent is asking to do, in the protocol’s terms: the title is prose for a person; the kind, the raw input and the locations are what the policy reads — never the title.
Fields§
§id: StringThe call’s id.
title: Option<String>For a person; None until the agent sends one.
kind: Option<String>read, edit, delete, move, search, execute, think,
fetch, switch_mode, other.
raw_input: Option<Value>The arguments the agent passed.
locations: Vec<PathBuf>Paths the call names.
status: Option<String>The latest status reported.
Implementations§
Source§impl ToolRequest
impl ToolRequest
Sourcepub fn merge(&mut self, r: &ToolReport)
pub fn merge(&mut self, r: &ToolReport)
Folds a later report in: a field it carries replaces the stored one; a field it omits leaves it alone.
Sourcepub fn shown_title(&self) -> String
pub fn shown_title(&self) -> String
The title for a person: the agent’s, or untitled call <id>.
Trait Implementations§
Source§impl Clone for ToolRequest
impl Clone for ToolRequest
Source§impl Debug for ToolRequest
impl Debug for ToolRequest
Source§impl Default for ToolRequest
impl Default for ToolRequest
Source§impl PartialEq for ToolRequest
impl PartialEq for ToolRequest
impl StructuralPartialEq for ToolRequest
Auto Trait Implementations§
impl Forget for ToolRequest
impl Freeze for ToolRequest
impl RefUnwindSafe for ToolRequest
impl Send for ToolRequest
impl Sync for ToolRequest
impl Unpin for ToolRequest
impl UnsafeUnpin for ToolRequest
impl UnwindSafe for ToolRequest
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
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,
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.
Creates a shared type from an unshared type.