jev-gate
A Claude Code plugin with one PreToolUse hook. Before each Bash, Write, Edit, MultiEdit, NotebookEdit or WebFetch call runs, the hook asks Jev, TypeSafe's decision model, four questions about it:
| Signal | Question |
|---|
destructive | Would this delete or irreversibly change something that isn't a build or cache artifact? |
exfiltration | Does this send local files, code, env vars, or credentials to a remote host? |
secrets | Does this read, print, or write secrets (.env, keys, tokens)? |
off_task | Is this something the user didn't ask for? Asked only when the transcript holds a user request. |
It also logs a 4-level risk score for reference. That score never triggers the gate.
The hook starts in shadow mode: it never changes what Claude Code does, it only appends one JSONL line per call. After a week or so, bun run report shows how many calls each threshold would have flagged and lists the highest-scoring ones, so you can check them for false positives. Then you decide whether to turn on enforce mode.
Pure Bun, no runtime dependencies. Every failure (no key, timeout, HTTP error, bad response) fails open.
Install
From the ACMElabs marketplace, the documented route:
/plugin marketplace add acmelabs-15/marketplace
/plugin install jev-gate@acmelabs
The install asks for a TypeSafe API key. If you don't have one yet, leave it empty and follow Get a TypeSafe API key. Without a key, every call is logged as skipped, and each new session opens with a one-line reminder.
Not sure what to do? Ask Claude "how do I set up jev-gate?". The plugin ships a jev-gate:setup skill that explains Jev, walks you through the signup, and checks the result.
To run it from a clone instead, add the clone as its own marketplace with /plugin marketplace add <path to the clone> and install jev-gate@jev-gate. settings.example.json shows the same hook wired straight into settings, with no plugin.
Get a TypeSafe API key
Jev is a decision model from TypeSafe AI. It returns probabilities instead of text, in about 70 to 500 ms. jev-gate calls it once per gated tool call, so it needs your own TypeSafe account and key.
-
Sign up. Go to console.typesafe.ai and sign in with Google or an email code. There's no password.
-
Add billing if asked. TypeSafe suspended its $5 free credit for new accounts in late September 2026, so the console may ask for a card. A low spending limit, such as $5 or $10, is plenty.
-
Create a key. Open API Keys, create a key named something like jev-gate, and copy it at once. It may be shown only once.
-
Store it. Pick one:
| Where | How | Notes |
|---|
| The plugin's configure dialog (recommended) | Run /plugin configure jev-gate@acmelabs, or open /plugin, select jev-gate on the Installed tab, and choose Configure. Paste the key into TypeSafe API key. | Masked input. Claude Code keeps the key in secure storage, not in settings.json. |
~/.claude/settings.json | Add "JEV_API_KEY": "<your key>" inside the "env" block. If the file already has an "env" block, add the line inside it; a second "env" block replaces the first. | Plain text. Use it where the dialog isn't available. |
When both are set, the dialog's key wins.
-
Check it. Restart Claude Code, run any command, then read the report (see Read the log). scored should go up. An HTTP 401 or 403 error means TypeSafe rejected the key.
What it costs. $0.042 per million input tokens, and output tokens are free (TypeSafe's published rates, October 2026). Each gated call sends about 1,000 to 2,000 tokens, so 1,000 calls a day cost about $2 a month.
Don't paste the key into a chat. A key in a transcript counts as exposed. If that happens, revoke it on the API Keys page and create a new one.
No TypeSafe account? Vercel's AI Gateway serves Jev too: set JEV_BASE_URL to https://ai-gateway.vercel.sh/typesafe, JEV_MODEL to typesafe-ai/jev, and JEV_API_KEY to your AI Gateway key. Or run a local /v1/systemone server such as Kev, which needs no key at all.
Configuration