pub enum PruningStrategy {
Reactive,
TaskAware,
Mig,
Subgoal,
SubgoalMig,
}Expand description
Pruning strategy for tool-output eviction inside the compaction pipeline (#1851, #2022).
When context-compression feature is enabled, this replaces the default oldest-first
heuristic with scored eviction.
Variants§
Reactive
Oldest-first eviction — current default behavior.
TaskAware
Short LLM call extracts a task goal; blocks are scored by keyword overlap and pruned
lowest-first. Requires context-compression feature.
Mig
Coarse-to-fine MIG scoring: relevance − redundancy with temporal partitioning.
Requires context-compression feature.
Subgoal
Subgoal-aware pruning: tracks the agent’s current subgoal via fire-and-forget LLM
extraction and partitions tool outputs into Active/Completed/Outdated tiers (#2022).
Requires context-compression feature.
SubgoalMig
Subgoal-aware pruning combined with MIG redundancy scoring (#2022).
Requires context-compression feature.
Implementations§
Source§impl PruningStrategy
impl PruningStrategy
Sourcepub fn is_subgoal(self) -> bool
pub fn is_subgoal(self) -> bool
Returns true when the strategy is subgoal-aware (Subgoal or SubgoalMig).
Trait Implementations§
Source§impl Clone for PruningStrategy
impl Clone for PruningStrategy
Source§fn clone(&self) -> PruningStrategy
fn clone(&self) -> PruningStrategy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PruningStrategy
impl Debug for PruningStrategy
Source§impl Default for PruningStrategy
impl Default for PruningStrategy
Source§fn default() -> PruningStrategy
fn default() -> PruningStrategy
Source§impl<'de> Deserialize<'de> for PruningStrategy
impl<'de> Deserialize<'de> for PruningStrategy
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl FromStr for PruningStrategy
impl FromStr for PruningStrategy
Source§impl PartialEq for PruningStrategy
impl PartialEq for PruningStrategy
Source§impl Serialize for PruningStrategy
impl Serialize for PruningStrategy
impl Copy for PruningStrategy
impl Eq for PruningStrategy
impl StructuralPartialEq for PruningStrategy
Auto Trait Implementations§
impl Freeze for PruningStrategy
impl RefUnwindSafe for PruningStrategy
impl Send for PruningStrategy
impl Sync for PruningStrategy
impl Unpin for PruningStrategy
impl UnsafeUnpin for PruningStrategy
impl UnwindSafe for PruningStrategy
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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§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
key and return true if they are equal.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>
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>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request