edwardyen724-g

Jev Compactor — AI skill for Claude Code

AI community

Context compaction and safety gating for AI agents via TypeSafe Jev: keeps messages verbatim, no summarization.

How to install Jev Compactor

This entry records only its repository, not the path inside it, so there is no exact command to give. Open edwardyen724-g/jev-compactor and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Jev Compactor does

Context compaction and safety gating for AI agents via TypeSafe Jev: keeps messages verbatim, no summarization. OpenAI, Anthropic, LangChain, CLI, MCP.

Alternatives in AI

  • WindsurfAPI — Turn Windsurf / Devin Desktop's 100+ AI models (Claude, GPT, Gemini, DeepSeek, Kimi, GLM, SWE) into OpenAI-, A 3k ★
  • Anthropic SDK TypeScript — Access to Anthropic's safety-first language model APIs in TypeScript 2.1k ★
  • Vllm Mlx — High-performance OpenAI and Anthropic compatible LLM inference server for Apple Silicon 1.5k ★

README

jev-compactor: deterministic context compaction for AI agents

[![npm version](https://img.shields.io/npm/v/jev-compactor)](https://www.npmjs.com/package/jev-compactor) [![ci](https://github.com/edwardyen724-g/jev-compactor/actions/workflows/ci.yml/badge.svg)](https://github.com/edwardyen724-g/jev-compactor/actions/workflows/ci.yml) [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![node >= 20](https://img.shields.io/badge/node-%3E%3D20-brightgreen)](https://nodejs.org)

**jev-compactor** is an open-source TypeScript library, CLI and MCP server that reduces an AI agent's context window without summarizing it. It keeps the original messages byte for byte, drops the ones [TypeSafe's Jev](https://typesafe.ai) judges irrelevant to the current goal, and catches destructive commands such as `rm -rf` in the same ~300 ms pass. It is framework-agnostic: it wraps an OpenAI, Anthropic or LangChain client in two lines, works on plain `{role, content}` message arrays, and runs from a CLI or as an MCP server.

Jev is TypeSafe's System One model: it does not generate text. It takes a state plus named questions and returns calibrated probabilities, evaluating every question in parallel against the same state. jev-compactor asks it one question per message — *should this stay in working memory for the goal?* — and decides everything else in code.

**Jev judges relevance. Code decides structure.** Nothing kept is ever rewritten; every drop is attributable with a probability; destructive commands and thrashing loops are caught in the same ~300 ms pass that compacts the history.

import { withCompaction } from 'jev-compactor';

const openai = withCompaction(new OpenAI(), { maxTokens: 15_000, safetyGating: true });

Install

npm install jev-compactor

Node ≥ 20. You need a TypeSafe API key in `TYPESAFE_API_KEY` (get one at [typesafe.ai](https://typesafe.ai), or pass `apiKey`). The CLI, the MCP server and the tests also read the near