use machi_types::{MachiError, Message};
#[derive(Debug, Clone)]
pub struct CompactionOutcome {
pub messages: Vec<Message>,
pub changed: bool,
pub strategy: &'static str,
}
pub trait CompactionStrategy: Send + Sync {
fn name(&self) -> &'static str;
fn should_compact(&self, messages: &[Message], token_estimate: u64) -> bool;
fn compact(&self, messages: Vec<Message>) -> Result<CompactionOutcome, MachiError>;
}