jev-auto-compact
Reviewed
at commit 9a0a90b
Sends data to TypeSafe Jev (api.typesafe.ai)
Jev-powered verbatim compaction: once context reaches 60%, prunes stale tool calls with zero generation. Skips (never falls back to the LLM summarizer) when…
0 upvotes
Log in to upvote or save- Made by
- vexjoy-agent
- Pinned commit
-
9a0a90bc03254c1bc9f5038b428be60ce36eae68 - What we checked
-
When your context reaches 60%, it compacts the conversation by asking TypeSafe's Jev service which older tool calls and results to drop or truncate, replacing Claude Code's own summary. Your last prompts, message text and tool inputs go to TypeSafe after secret redaction, using your TypeSafe key. It keeps a small log of compaction stats in its own store.
Review details
Static review of the source at the pinned commit; not run. Registers turn.complete and session.compact. On turn.complete (main loop only) it reads context usage via $.session.usage, stores a usage record, and once percent >= 60 calls $.session.compact() (re-asks only after 8 new messages or 5 points more context if the last attempt was skipped). On session.compact it pairs tool calls with results, pins the first message and the last 6, pre-drops Glob, ListDirectory, ls, pwd and git status calls, and sends the rest to POST https://api.typesafe.ai/v1/systemone via $.http.fetch with the TypeSafe key as Bearer token, one to four requests per compaction, each with a 20 s timeout; after a 401 or 402 it sends nothing more. The key comes from $.env.get('TYPESAFE_API_KEY') or the env block of $.settings.read(); no other settings are used. The state sent holds the last three user prompts (500 chars each), message text and tool inputs (tool results are replaced by a size note), all passed through redact.mjs (regex redaction of bearer tokens, cookies, JWTs, AWS/GitHub/OpenAI/Slack/Google keys, PEM blocks, URL credentials, KEY=VALUE secrets; inputs naming .env, .ssh, .aws, .pem, credentials are withheld whole). Redaction is best effort. Pruned results are returned as the new transcript: dropped calls and results are removed, others truncated to 300 chars with a marker. With no key, a Jev error, or under 15% reduction on an engine-requested compaction it falls back to the built-in summarizer; for its own 60% trigger it skips instead. Only answers to the questions asked are used and malformed answers keep the call. Evidence (session id, timestamps, token counts, stats, no content; error bodies are never logged) is kept in a 500-entry ring buffer in $.store. Bundled files are only the hook module and redact.mjs; no shell hooks, commands or MCP servers. The tests folder was not reviewed.
- What it uses
-
- Reads your prompts: yes
- Sees tool calls: yes
- Blocks or changes tool calls: yes
- Reads or writes files: no
- Runs programs on your machine: no
- Calls the model (uses tokens): no
- Sends data over the network: yes
- Stores data: yes
- Shows something on screen: yes
- Hooked events
Jev-powered verbatim compaction: once context reaches 60%, prunes stale tool calls with zero generation. Skips (never falls back to the LLM summarizer) when nothing is prunable; records evidence for learning.db.
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/jev-auto-compact/)