Expand description
Conversation compaction strategies.
Strategies are pure transforms over message lists. Runtime hosts decide when to compact; this crate decides how.
Maturity: core.
Re-exports§
pub use max_messages::MaxMessages;pub use prune::DropPrefix;pub use prune::PruneToolResults;pub use prune::StripImages;pub use prune::SummarizingCompaction;pub use select::CompactionRange;pub use select::apply_range;pub use select::is_safe_split;pub use select::select_compaction_range;pub use select::snap_split_forward;pub use select::tool_pair_invariant_holds;pub use strategy::CompactionOutcome;pub use strategy::CompactionStrategy;pub use token_threshold::TokenThreshold;
Modules§
- max_
messages - Keep at most N messages, preserving leading system and tail.
- prune
- Light compaction: prune tool results and strip images (W4.2).
- select
- Compaction range selection with tool-pair invariant (W4.1).
- strategy
- Compaction strategy trait.
- token_
threshold - Compact when estimated tokens exceed a threshold.