use crate::Cancellation;
use crate::components::message::Messages;
pub type Error = crate::Error;
/// Context compression is a pure component operation. Harness coordinates
/// triggering and Session updates; runtime::agent owns run accounting.
pub trait Compressor: Send + Sync {
/// Trigger threshold used by an automatic-compression owner. This is not
/// the target summary length or the model's max_tokens. Direct compress
/// calls do not require it; automatic assembly must reject None/Some(0).
fn size(&self) -> Option<u64> {
None
}
fn compress(
&self,
input: Messages,
cancellation: &Cancellation,
) -> impl std::future::Future<Output = Result<Messages, Error>>;
}