pub struct SessionPolicy {
pub min_occurrences: u32,
pub max_active_bindings: usize,
pub turn_decay: f32,
pub min_term_words: usize,
}Expand description
Tunable thresholds for promotion and pool size.
Defaults are chosen to compound at turn ~3 on a typical agent loop while keeping the alias header small enough that one-shot turns do not pay for it.
Fields§
§min_occurrences: u32Minimum number of observed occurrences before a term is eligible for promotion to an alias.
max_active_bindings: usizeMaximum number of active bindings simultaneously held by the session. When exceeded, the lowest-utility binding is evicted.
turn_decay: f32Per-turn multiplicative decay applied to every term’s score. 1.0 disables decay; 0.0 forgets immediately. Default 0.85 gives ~5-turn half-life.
min_term_words: usizeMinimum token-length of a candidate term (in whitespace-split units). 2 prevents single common words from polluting the pool.
Trait Implementations§
Source§impl Clone for SessionPolicy
impl Clone for SessionPolicy
Source§fn clone(&self) -> SessionPolicy
fn clone(&self) -> SessionPolicy
Returns a duplicate of the value. Read more
1.0.0 · 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 SessionPolicy
impl Debug for SessionPolicy
Source§impl Default for SessionPolicy
impl Default for SessionPolicy
impl Copy for SessionPolicy
Auto Trait Implementations§
impl Freeze for SessionPolicy
impl RefUnwindSafe for SessionPolicy
impl Send for SessionPolicy
impl Sync for SessionPolicy
impl Unpin for SessionPolicy
impl UnsafeUnpin for SessionPolicy
impl UnwindSafe for SessionPolicy
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<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>
Converts
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>
Converts
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 more