pub struct ToolHistoryPolicy {
pub dedup_arg: Option<&'static str>,
pub summary_arg: Option<&'static str>,
pub compactable_result: bool,
pub pins_active_plan: bool,
}Expand description
Tool-authored context-retention hints for history transforms.
The core loop does not interpret these policies directly. They are
narrow metadata for ContextTransform plugins that need to summarize
or trim history without maintaining a parallel list of tool names.
Fields§
§dedup_arg: Option<&'static str>Argument whose string value identifies duplicate calls of the same tool. Older successful results for the same value may be replaced by a marker that points at the latest result.
summary_arg: Option<&'static str>Argument to render in compact one-line summaries.
compactable_result: boolWhether old successful results are re-fetchable enough to clear during time-based microcompaction.
pins_active_plan: boolWhether the latest successful result should be pinned near the newest user turn as the active plan.
Implementations§
Source§impl ToolHistoryPolicy
impl ToolHistoryPolicy
pub const fn new() -> Self
pub const fn dedup_arg(self, arg: &'static str) -> Self
pub const fn summary_arg(self, arg: &'static str) -> Self
pub const fn compactable_result(self) -> Self
pub const fn pins_active_plan(self) -> Self
Trait Implementations§
Source§impl Clone for ToolHistoryPolicy
impl Clone for ToolHistoryPolicy
Source§fn clone(&self) -> ToolHistoryPolicy
fn clone(&self) -> ToolHistoryPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolHistoryPolicy
impl Debug for ToolHistoryPolicy
Source§impl Default for ToolHistoryPolicy
impl Default for ToolHistoryPolicy
Source§impl PartialEq for ToolHistoryPolicy
impl PartialEq for ToolHistoryPolicy
Source§fn eq(&self, other: &ToolHistoryPolicy) -> bool
fn eq(&self, other: &ToolHistoryPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ToolHistoryPolicy
impl Eq for ToolHistoryPolicy
impl StructuralPartialEq for ToolHistoryPolicy
Auto Trait Implementations§
impl Freeze for ToolHistoryPolicy
impl RefUnwindSafe for ToolHistoryPolicy
impl Send for ToolHistoryPolicy
impl Sync for ToolHistoryPolicy
impl Unpin for ToolHistoryPolicy
impl UnsafeUnpin for ToolHistoryPolicy
impl UnwindSafe for ToolHistoryPolicy
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.