Module compact

Module compact 

Source
Expand description

Context compaction module (forge-inspired)

Provides intelligent compaction of conversation history:

  • Configurable thresholds (tokens, turns, messages)
  • Smart eviction strategy (protects tool-call/result adjacency)
  • Droppable message support for ephemeral content
  • Summary frame generation for compressed history

Re-exports§

pub use strategy::CompactionStrategy;
pub use strategy::EvictionRange;
pub use summary::ContextSummary;
pub use summary::SummaryFrame;

Modules§

strategy
Compaction strategy - decides what to evict
summary
Summary frame generation for compacted context

Structs§

CompactConfig
Complete compaction configuration
CompactThresholds
Thresholds that trigger compaction