Repository navigation
Releases
opencode-cordon 0.1.3
README images now use absolute raw.githubusercontent.com URLs so the banner, architecture diagram and report screenshot render on the npm package page as well as on GitHub. No code changes.
opencode-cordon 0.1.2 - clearer README & assets
Presentation release. No behaviour change to the policy engine.
What changed
- README (English root, Chinese in
docs/) rewritten around: the problem, a live 2.2.5 regression, how it works, verification, and what it is not. - New assets: banner, architecture diagram, a real audit-report screenshot from the live session, and a social-preview image.
- CI now asserts the deny exit code instead of treating a correct deny as a failure; the badge is green.
- npm package page now uses the English root README.
Install
opencode plugin add opencode-cordon
npx opencode-cordon init
Verified on OpenCode 2.2.5: .env read tightened ask -> deny, rm -rf tightened allow -> deny under --auto, both audited.
opencode-cordon 0.1.0
First public release: a declarative permission cordon with an audit trail for OpenCode 2.
Highlights
- JSONC policy with relaxed / balanced / strict presets; glob matching on action, tool, path, command and agent.
- permission.evaluate hook that only tightens: deny always wins, ask upgrades an allow, allow/no-match never touches the native decision.
- Append-only JSONL audit log (secrets redacted, commands hashed) plus a self-contained HTML report.
- CLI: check / evaluate / audit / init / redact. Zero runtime dependencies, Node >= 20.
- 57 tests, including a plugin adapter suite that drives the real @opencode/plugin hooks.
Verified
Live regression on OpenCode 2.2.5 with --auto: .env read tightened ask -> deny, rm -rf ./scratch tightened allow -> deny, both recorded in the audit log, target file survived. See docs/REGRESSION.md.
Install
opencode plugin add opencode-cordon npx opencode-cordon init
Requires OpenCode 2.2.x. Not a sandbox; not an LLM reviewer; not a V1 compatibility layer.