@khaentertainment/pi-greenlight
Greenlight: System One classifiers (TypeSafe Jev and others, via TypeSafe, OpenRouter, Cloudflare and more) as a decision layer for Pi: judges mutating tool calls before they run, reads tool output for secrets and failure class after, escalates flagged ca
Package details
Install @khaentertainment/pi-greenlight from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@khaentertainment/pi-greenlight- Package
@khaentertainment/pi-greenlight- Version
0.5.3- Published
- Nov 3, 2026
- Downloads
- 749/mo · 295/wk
- Author
- bbrenner2217
- License
- MIT
- Types
- extension
- Size
- 175 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
The go-ahead from whoever's in charge
When your coding agent tries something risky, it asks its boss first.
Try it | The problem | The solution | Full reference
The problem
You let AI agents work in your repo and step away. One of them is fixing a test, and decides the fastest fix is to delete a folder and force-push to main.
pi-jev already catches that for Pi. Before a risky command runs, it asks a fast decision model (Jev) whether it's a good idea, then warns you or asks you to confirm.
That works when you're at the keyboard. More and more, you aren't. Agents run under other agents: an orchestrator splits the work and hands pieces to helpers. When a helper's command gets flagged, a warning goes unread and a confirm prompt waits forever. The safety check either does nothing or freezes the work.
The solution
Greenlight sends the decision up the chain of command.
When a command looks risky, Greenlight pauses it and asks the agent's orchestrator: approve, deny, or ask a human. The orchestrator knows the plan, so it can tell a planned cleanup from a mistake. If it doesn't answer in time, you're asked instead, the same as in pi-jev.
It works with:
- Traycer, the first supported agentic development environment (ADE). A helper agent's flagged command goes straight to its parent agent in Traycer.
- A parent Pi agent, when one Pi runs another.
- Any orchestrator that speaks A2A, the open agent-to-agent protocol.
- You, if you're working one-on-one with an agent.
Orca and Xirp, two more ADEs, are next.
Greenlight also lets you reach Jev through the provider you already use: TypeSafe, OpenRouter, Cloudflare, Vercel, or OpenCode. Jev is the default, not the only option: Mercury Decide can run the output check, and Clef Flash through OpenRouter is calibrated for the gate with the same thresholds. The calibration data covers all three.
Everything pi-jev does is still here. It checks risky commands in about a third of a second, warns when a command prints a password, and never blocks your agent if the check itself fails.
Try it in two minutes
Install it:
pi install npm:@khaentertainment/pi-greenlightGive it a key. Run
/login typesafein Pi, or setTYPESAFE_API_KEY.Keep working as usual. Greenlight starts by only warning you, so nothing gets blocked. Run
/greenlight logto see what it caught.Running agents under Traycer or another orchestrator? Hand the decisions up the chain:
/greenlight mode escalateWorking alone? Use
/greenlight mode enforceto be asked before risky commands run.
Install Greenlight now, and give your agents a boss to answer to.
Want the details?
Orchestrator setup, providers, settings, and the measurements behind every threshold are in the reference guide.
A fork of y0usaf/pi-jev, which built the command check this is based on. MIT licensed.