Repository navigation
zn-gate 1.9.0
zn-gate 1.9.0 makes npx -y zn-gate init the one command that sets up zn for the coding agents on your machine, and adds zn-gate check to show that zn stops your agent from reading a secret. Block messages for commands only you may run now give the exact command. Update with npm install -g zn-gate@1.9.0; the Python package has no code changes and moves to 1.9.0 to keep the versions in step.
Breaking for scripts: zn-gate init without options no longer wraps the MCP servers in your agent configs. Use zn-gate init --wrap-mcp.
Added
zn-gate initis now a guided setup: it finds Claude Code, Codex CLI, Cursor and OpenCode, shows the one route that protects each agent that is not protected yet (the zn-gate plugin for Claude Code,zn hooks installfor the others, from a global install rather than the npx cache), runs each step after you confirm it in your own terminal, and ends withzn-gate check. When an AI agent or a script runs it, it only prints the steps.zn-gate check(alsozn-gate doctor) shows that zn stops your coding agent from reading a secret. For each agent set up for your user (Claude Code through the zn-gate plugin orzn hooks install, Codex CLI, Cursor, OpenCode), it asks zn's hook to let the agent read a.envfile with a fake key and an ordinary file, in a temporary folder. An agent counts as protected only when the first is blocked and the second allowed. For Claude Code, Codex CLI and Cursor it also runs the installed hook, which finds a hook that cannot start or that blocks every file (on Windows, hooks installed aszn hook <agent>are checked against zn's rules instead, and the output says so). It says how to fix an agent that is not protected. Nothing is sent over the network and no setting changes. See docs/check.md.zn hooks install claude-codeandzn-gate statuswarn when Claude Code settings stop zn from running: an organization policy that turns off all hooks (disableAllHooks), runs only its own hooks (allowManagedHooksOnly), or does not allow thesecretsMCP server (managed-mcp.json,allowManagedMcpServersOnly,allowedMcpServers,deniedMcpServers), ordisableAllHooksin your own settings. Claude Code does not show these. Only the settings files are read, not policy sent through claude.ai, MDM or the Windows registry.
Changed
- The READMEs start with
npx -y zn-gate init; the steps for each agent are under "Manual install". - Block messages, third batch: zn commands that only the user may run (
hooks installanduninstall,unlock,lock,stats share on,secret,env shadow,pins approve,init) each say what the command does and the command for the user to run, with the agent, secret name or file name when the agent's command had one, instead of one message about secret values for all of them. Reading or changing~/.znnow says how a command can still use a secret, and a secret after a shell keyword says why it cannot be filled in. - Breaking for scripts:
zn-gate initwithout options no longer wraps the MCP servers in your agent configs: that is nowzn-gate init --wrap-mcp.--dry-run,--shadowand--revertstill select it. The guidedzn-gate initruns only in your own terminal and asks before each step; zn's hooks also refuse the usual ways an AI agent would start it, as they refusezn hooks install(the zn-gate plugin for Claude Code gets this rule once it is pinned to 1.9.0).--wrap-mcpis not affected. - CI: draft pull requests skip the test, package, plugin, Rust, Windows and action jobs until they are marked ready for review, and pushes that change only documentation skip the test and plugin workflows (Markdown in the packages and plugins still runs them); the plugin checks also skip documentation-only pull requests. On release pull requests, which are opened before the plugin can be pinned, a plugin pin one step behind the release is a warning in
Public facts; it still fails onmainandnext, somainstays red after a release merge until the plugin is pinned. ThePlugin repositoryworkflow ends with a warning instead of failing while the plugin repository's copy of its checks is out of date. - CI: pushes to
nextleave out the macOS jobs of the leak bench and the scrubber and vault tests, and run the plugin checks on macOS with Node.js 22 only; Ubuntu and Windows still run every version. The full matrix still runs onmain, on pull requests intomainand release branches, with thefull-cilabel and on manual runs. A new push tonextcancels the CI runs still going for the previous one; runs onmainalways complete. - CI: the Rust build cache is saved only from
main;nextand pull requests restore it and save nothing, so the repository stays under its 10 GB Actions cache limit. A new weeklyCache cleanupworkflow deletes the caches of closed pull requests and can be run by hand as a dry run. - The hash-pinned tool lists used by the CI and release workflows (
.github/ci-test-requirements.txt,.github/release-requirements.txt) now say how to regenerate them with uv when a security alert names them, since Dependabot cannot update them.
How to verify these files: docs/verify-release.md