jev-permission-gate

Reviewed at commit 9958bff

Caution: Auto-approves Bash, WebFetch and WebSearch calls in auto mode when TypeSafe's Jev model judges them safe, skipping the built-in classifier, and can deny calls it rates risky.

Sends data to TypeSafe (api.typesafe.ai), only when you set a key

Uses TypeSafe's Jev to allow or deny routine tool calls in auto mode, and hands uncertain ones to the built-in classifier

Made by
Madison Rickert
What we checked

In auto mode, sends each pending Bash, WebFetch or WebSearch call, your last three messages (with recognisable secrets withheld) and the project path to TypeSafe's Jev model, which can approve the call without asking, deny it, or leave it to Claude Code's built-in classifier. It does nothing without a TypeSafe API key. Decision logs and conversation captures are written to ~/.claude only if you switch them on.

Review details

Static review of the source at the pinned commit; not run. Registers session.start (registers /jev-gate), session.receive, classic.UserPromptSubmit and classic.PostToolUse (only to learn the permission mode and tool run time), tool.call (timing and capture finishing, passes the result through) and tool.check. tool.check acts only when the engine's own decision is 'ask', the mode is 'auto' and the tool is Bash, WebFetch or WebSearch. It POSTs the last 3 user messages (clipped to about 1500 characters, inline secrets now replaced with [secret withheld]), up to 3 other-session messages, the call (command, description, URL, prompt or query) and the project directory to https://api.typesafe.ai/v1/systemone with the API key as Bearer token via $.http.fetch, 1500 ms timeout. Tool results and Claude's prose are not sent. From the answers it returns allow (clearly requested, every risk at most 0.1), deny (a risk at 0.8 or more and not requested) or defers. A new optional 'mismatch' question is off by default (askMismatch false) and can only support a denial. Before asking, a shell lexer (hooks/shell.ts, pure parsing, no execution) and blocklist (sudo, ssh, eval, cloud CLIs, destructive git, credential paths, .env, global installs, curl|sh, writes outside the project and similar) make such calls deny-only; calls with inline secrets, credential files or invisible characters are never sent. On timeout, HTTP error, invalid answer or missing key it defers. The API key comes from the plugin setting, TYPESAFE_API_KEY, or a .env file in the plugin folder (only that key); HOME and TYPESAFE_DEFAULT_MODEL are also read. Files: reads ~/.claude/jev-permission-gate/gate.json (mode and capture override, re-read every 5 s); with decision_logs on, or in shadow or measure mode, writes decisions.jsonl and compare.jsonl (last 1000 lines, call summaries cut to 120 characters) under ~/.claude/jev-permission-gate/logs. New in this version: an opt-in capture setting (off by default, also switchable with "capture": true in gate.json, disclosed in the setting text and README) writes one JSON file per gated call to ~/.claude/jev-permission-gate/captures/<date>/ holding the full tool input, the last 30 user and assistant messages with the inputs of earlier tool calls (which can include file contents Claude wrote), the state sent to Jev and its answers; pattern-matched secrets are withheld and strings clipped to 4000 characters, but other sensitive text can remain. No programs are run.

What it uses
  • Reads your prompts: yes
  • Sees tool calls: yes
  • Blocks or changes tool calls: yes
  • Reads or writes files: yes
  • 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
Made this mod? Add a badge to your README

modsforClaude badge for jev-permission-gate

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/jev-permission-gate.svg)](https://modsforclaude.com/mods/jev-permission-gate/)

← All mods