pub struct KnowledgeEntry {
pub key: Option<CompactString>,
pub message: Message,
pub tokens: u32,
pub pinned: bool,
pub evict_at_boundary: bool,
pub pending: Option<Box<(Message, u32)>>,
}Expand description
One durable knowledge entry. Unlike history messages, knowledge entries have IDENTITY — a host-assigned key enabling upsert (refresh a pinned reference) and targeted removal — plus lifecycle flags driving the boundary sweep (K1/K2 of the dynamic-control spec).
Fields§
§key: Option<CompactString>None ⇒ legacy unkeyed append (initialMemory, old snapshots). Keyed entries upsert.
message: Message§tokens: u32§pinned: boolHost-pinned ⇒ never budget-evicted (K2). Skill pins are NOT host-pinned (K3 governs them).
evict_at_boundary: boolMarked for removal at the next compaction/renewal boundary. Knowledge renders into the
cached system[1] block, so existing bytes are only rewritten where the prompt-cache prefix
is being rebuilt anyway — the same principle as reset_collapse_generation.
pending: Option<Box<(Message, u32)>>Deferred upsert: a same-key push mid-generation stages its replacement here instead of
rewriting rendered bytes; applied by KnowledgePartition::sweep_at_boundary.
Trait Implementations§
Source§impl Clone for KnowledgeEntry
impl Clone for KnowledgeEntry
Source§fn clone(&self) -> KnowledgeEntry
fn clone(&self) -> KnowledgeEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more