edison-watch
v0.1.3
Published
Trust-aware hook guard for Claude Code and OpenCode with local regex policy and optional Edison backend integration.
Downloads
14
Readme
Edison Local Guard
Trust-aware security hook for Claude Code and OpenCode. Blocks unsafe tool calls when an AI agent has been exposed to both private data and untrusted content.
Learn more at edison.watch.
Install
npx edison-watch claude installFor OpenCode:
npx edison-watch opencode installCheck status or uninstall:
npx edison-watch claude status
npx edison-watch claude uninstallHow It Works
Every tool call is classified against regex pattern lists. The guard tracks trust flags per session and blocks write operations when the "lethal trifecta" is met:
- Session has accessed private data (e.g.
.env, secrets) - Session has seen untrusted content (e.g.
curl, external URLs) - Current command is a write (e.g.
rm,git push)
Blocked commands exit with code 2 and a human-readable reason. All events are logged to ~/.edison-watch/claude-plugin/logs/.
Configuration
Override defaults by creating ~/.edison-watch/claude-plugin/config.json or setting EDISON_CLAUDE_GUARD_CONFIG=/path/to/config.json.
| Key | Default | Description |
| --- | ------- | ----------- |
| mode | "enforce" | Set to "dry_run" to log without blocking. |
| patterns.allow | | Regex allowlist -- bypasses blocking. |
| patterns.private | | Patterns for private data access. |
| patterns.untrusted | | Patterns for untrusted content. |
| patterns.write | | Patterns for write/mutation commands. |
| backend.enabled | false | Forward events to an Edison Watch backend. |
See the full config reference at edison.watch/docs.
License
MIT
