Jev Compactor
Compacts AI agent context by selectively dropping irrelevant messages verbatim and safety-gating destructive commands.
jev-compactor is a TypeScript library, CLI, and MCP server designed to efficiently manage an AI agent's context window without resorting to summarization. Leveraging TypeSafe's Jev model, it identifies and removes messages deemed irrelevant to the current goal, while preserving the exact original content of the remaining messages. Beyond compaction, it proactively identifies and gates dangerous commands like `rm -rf` and potential data exfiltration, providing a robust safety layer for AI agent operations. It offers significant cost and latency advantages over traditional LLM-based summarization, making it ideal for maintaining critical context in long, tool-using agent sessions.