pub struct ContextCompactedData {Show 18 fields
pub checkpoint_id: Option<String>,
pub strategy_used: String,
pub messages_before: usize,
pub messages_after: usize,
pub tokens_before: Option<u64>,
pub tokens_after: Option<u64>,
pub bytes_before: Option<u64>,
pub bytes_after: Option<u64>,
pub duration_ms: u64,
pub steps: Vec<CompactionStepData>,
pub trigger: CompactionTrigger,
pub model: String,
pub provider: Option<String>,
pub driver: Option<String>,
pub budget_remaining_tokens: Option<u64>,
pub source_sequence: Option<i64>,
pub cache_read_tokens: Option<u32>,
pub cache_creation_tokens: Option<u32>,
}Expand description
Data for context.compacted event (compaction completed).
Fields§
§checkpoint_id: Option<String>Durable checkpoint installed by this compaction, when applicable.
strategy_used: StringCombined strategy description (e.g., “observation_masking+native”).
messages_before: usizeNumber of messages before compaction.
messages_after: usizeNumber of messages after compaction.
tokens_before: Option<u64>Estimated or provider-reported input tokens before compaction.
tokens_after: Option<u64>Provider-reported output tokens after compaction, when available.
bytes_before: Option<u64>Serialized request-context bytes before compaction, when measurable.
bytes_after: Option<u64>Serialized compact output bytes, when measurable.
duration_ms: u64Total duration of all compaction steps in milliseconds.
steps: Vec<CompactionStepData>Individual steps in the cascade.
trigger: CompactionTriggerWhat triggered this compaction: context-window budget or cost pressure.
model: StringModel that performed the compaction.
provider: Option<String>Provider backend (e.g. “openai”), when known.
driver: Option<String>Local driver identifier, when known.
budget_remaining_tokens: Option<u64>Tokens of headroom remaining when the install completed, when measurable.
source_sequence: Option<i64>Source message sequence the compaction ran at, when known.
cache_read_tokens: Option<u32>Cached input tokens read after compaction, when reported.
cache_creation_tokens: Option<u32>Cache-creation tokens written after compaction, when reported.
Trait Implementations§
Source§impl Clone for ContextCompactedData
impl Clone for ContextCompactedData
Source§fn clone(&self) -> ContextCompactedData
fn clone(&self) -> ContextCompactedData
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more