pub struct PrunTool { /* private fields */ }Expand description
Model-invocable tool for surgical context pruning.
The pending queue is shared with the agent loop via AgentLoopConfig.prun_pending
(an Arc<Mutex<Vec<PrunRequest>>>). One PrunTool per variant; both variants
share the same pending queue so cross-variant ordering is preserved.
Implementations§
Source§impl PrunTool
impl PrunTool
Sourcepub fn new(pending: Arc<Mutex<Vec<PrunRequest>>>, variant: PrunVariant) -> Self
pub fn new(pending: Arc<Mutex<Vec<PrunRequest>>>, variant: PrunVariant) -> Self
Create a new PrunTool bound to a shared pending queue.
Call once per variant (Prun + PrunWithMemo) passing the same Arc<Mutex<_>>
so both tools enqueue into the same drain. BasicAgent::with_prun_tool()
does this wiring automatically.
Trait Implementations§
Source§impl AgentTool for PrunTool
impl AgentTool for PrunTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Description for the LLM
Source§fn parameters_schema(&self) -> Value
fn parameters_schema(&self) -> Value
JSON Schema for parameters
Auto Trait Implementations§
impl Freeze for PrunTool
impl RefUnwindSafe for PrunTool
impl Send for PrunTool
impl Sync for PrunTool
impl Unpin for PrunTool
impl UnsafeUnpin for PrunTool
impl UnwindSafe for PrunTool
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