pub struct UpdatePlanTool { /* private fields */ }Expand description
A lightweight tool that records and displays a plan checklist to the user.
§Behavior
- Validates the incoming
UpdatePlanArgs(non-empty plan, at most onein_progressstep, no empty step text). - Broadcasts a
RuntimeEvent::PlanUpdatedevent for UI rendering. - Returns a short summary — it does NOT store, execute, or drive the plan.
This is a display-only protocol, inspired by Codex’s update_plan.
Implementations§
Source§impl UpdatePlanTool
impl UpdatePlanTool
pub fn new() -> Self
Sourcepub fn with_description(self, desc: String) -> Self
pub fn with_description(self, desc: String) -> Self
Override the tool description with a custom string.
The default description is written for the generic agent-base framework. Consumers like ops-agent can use this to inject domain-specific usage guidelines (e.g. step granularity rules, when to use/not use plans).
Trait Implementations§
Source§impl Default for UpdatePlanTool
impl Default for UpdatePlanTool
Source§impl Tool for UpdatePlanTool
impl Tool for UpdatePlanTool
fn name(&self) -> &'static str
fn definition(&self) -> Value
Source§fn metadata(&self) -> ToolMetadata
fn metadata(&self) -> ToolMetadata
Machine-readable metadata for tool introspection. Read more
Source§fn as_framework_tool(&self) -> Option<&dyn FrameworkTool>
fn as_framework_tool(&self) -> Option<&dyn FrameworkTool>
Return
Some(&dyn FrameworkTool) if this tool is a framework-internal tool
that needs engine infrastructure injection (EventBus).
Default returns None — user-defined tools need not override this.fn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: &'life1 Value,
_ctx: &'life2 ToolContext,
) -> Pin<Box<dyn Future<Output = AgentResult<ToolOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Auto Trait Implementations§
impl !Freeze for UpdatePlanTool
impl RefUnwindSafe for UpdatePlanTool
impl Send for UpdatePlanTool
impl Sync for UpdatePlanTool
impl Unpin for UpdatePlanTool
impl UnsafeUnpin for UpdatePlanTool
impl UnwindSafe for UpdatePlanTool
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