Skip to main content

Module compression

Module compression 

Source
Expand description

TACO: self-evolving tool output compression.

The core abstraction is OutputCompressor, an async trait that post-processes raw tool output before it is injected into the LLM context. When disabled, the IdentityCompressor is wired in — its compress always returns Ok(None) and is zero-cost beyond one virtual call per tool output.

§Architecture

§Invariants

  • T1: IdentityCompressor is the only compressor when [tools.compression] enabled = false.
  • T4: Audit logging happens inside individual tool implementations, not inside CompressedExecutor. Because compression wraps outside the tool boundary, audit JSONL always records the raw pre-compression payload.

Re-exports§

pub use decorator::CompressedExecutor;

Modules§

decorator
CompressedExecutor<E> — decorator that post-processes tool output through a compressor.

Structs§

CompressionRule
A single compression rule stored in the database.
CompressionRuleStore
Persistence layer for TACO compression rules.
IdentityCompressor
Pass-through compressor that never modifies tool output.
RuleBasedCompressor
Regex-based compressor that applies operator- and LLM-evolved rules to tool output.

Enums§

CompressionError
Error variants for compression operations.

Traits§

OutputCompressor
Core abstraction for tool output compression.

Functions§

safe_compile
Compile a regex pattern with DoS protection.