Expand description
Deterministic output compression for tool results entering model context.
This module implements MEM-007 active context compression, starting with
bash tool output. Compression applies only to the model-facing
representation; raw output is preserved on the UI event/export surface.
§Design Constraints
- Deterministic: same input always produces same compressed bytes. No timestamps, no random state, no session-dependent ordering.
- Default OFF: compression must be explicitly enabled via
[
Agent::with_bash_compression]. - Stable prefix safe: compression applies only to tool results entering the dynamic suffix, never to cached-prefix messages.
- bash only: other tools are unaffected by this module.
Structs§
- Bash
Output Compressor - Deterministic compressor for bash tool output.
- Compressed
Output - Result of compressing bash tool output.
- Compression
Metrics - Retrieval
Metrics
Constants§
- DEFAULT_
BASH_ LINE_ THRESHOLD - Default line threshold for bash output compression.