pub struct TodoTool { /* private fields */ }Expand description
Holds the list for the lifetime of the agent.
Implementations§
Trait Implementations§
Source§impl Tool for TodoTool
impl Tool for TodoTool
Source§fn carried_state(&self) -> Option<CarriedState>
fn carried_state(&self) -> Option<CarriedState>
The list survives a compaction verbatim.
The model re-reads its plan every turn through the echo in the last
todo result — which is a message, and therefore exactly the kind of
thing a compaction summarises away. That made this tool’s whole
mechanism quietly conditional on the transcript never getting long,
which is the one situation the list matters most in: the measured
failure of summarisation is that it keeps what is true and drops how
far you got, and this list is nothing but how far you got.
Rendered rather than summarised, because the tool holds the exact current answer and a summariser would only be a lossy path to a worse copy of it.
fn name(&self) -> &str
fn description(&self) -> &str
fn input_schema(&self) -> Value
Source§fn read_only(&self) -> bool
fn read_only(&self) -> bool
Read-only tools skip the approval gate and are safe to run in parallel.
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
input: Value,
_ctx: &'life1 ToolCtx,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn capabilities(&self) -> Capabilities
fn capabilities(&self) -> Capabilities
Declared risk surface. The default is the conservative one for a tool
nobody has classified: assume it does nothing special.
Source§fn denial_remedy(&self) -> Option<String>
fn denial_remedy(&self) -> Option<String>
How the operator could make a call like the one just refused safe —
one sentence appended to a trifecta denial, or
None when nothing
short of policy would change the answer. Read moreSource§fn fixed_workspace(&self) -> Option<PathBuf>
fn fixed_workspace(&self) -> Option<PathBuf>
Source§fn narrows_surface_to(&self) -> Option<Vec<String>>
fn narrows_surface_to(&self) -> Option<Vec<String>>
Tool names this tool is currently restricting the surface to, if it is
restricting it at all. Read more
Source§fn forget_conversation_state(&self)
fn forget_conversation_state(&self)
Drop state that belonged to the conversation that just ended. Read more
fn spec(&self) -> ToolSpec
Auto Trait Implementations§
impl !Freeze for TodoTool
impl RefUnwindSafe for TodoTool
impl Send for TodoTool
impl Sync for TodoTool
impl Unpin for TodoTool
impl UnsafeUnpin for TodoTool
impl UnwindSafe for TodoTool
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