#[non_exhaustive]pub struct Config {
pub max_entries: usize,
pub token_budget: usize,
pub db_path: PathBuf,
pub eviction_policy: EvictionPolicy,
pub recency_half_life_secs: f64,
pub scrub: ScrubConfig,
}Expand description
Runtime configuration for the context engine.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_entries: usizeMaximum number of entries to retain.
token_budget: usizeTotal token budget for context injection.
db_path: PathBufPath to the backing database file.
The default (:memory:) is an in-memory SQLite database that is
ephemeral — all data is lost when the connection pool is
dropped. Set a real filesystem path for durable persistence.
eviction_policy: EvictionPolicyStrategy used when the store reaches capacity.
recency_half_life_secs: f64Recency decay half-life in seconds.
Controls how fast older entries lose relevance. A value of 259200 (72 hours) means an entry’s score halves every 3 days.
scrub: ScrubConfigSecret-scrubbing configuration applied to entry content at save time.
Trait Implementations§
Source§impl Default for Config
impl Default for Config
Source§fn default() -> Self
fn default() -> Self
Defaults: 10,000 max entries, an 8,192-token budget, an in-memory
database (see Self::db_path for persistence caveats), LRU
eviction, the default 72-hour recency half-life, and secret
scrubbing enabled.