8e8b5c9689
CI / Test (Node 22) (push) Has been skipped
CI / Test (Node 26) (push) Has been skipped
CI / Test (Node 24) (push) Has been skipped
CI / E2E (OpenCode 1.19.3 + 2.1.0) (push) Has been skipped
Release / Verify (push) Has been skipped
CI / E2E (OpenCode 1.18.31 + 2.0.32) (push) Has been skipped
Release / Publish to npm (push) Has been skipped
Release / GitHub Release (push) Has been skipped
5.0 KiB
5.0 KiB
Changelog
0.1.0 (2026-10-21)
Added
- OpenCode 2 support. The default export is now
{ id: "envsitter-guard", setup, server }: OpenCode 2 callssetup(ctx), OpenCode 1 (1.18.29+) callsserver(). - OpenCode 2 tools are registered with
ctx.tool.transformandcodemode: false, so agents see them directly instead of behind Code Mode. - OpenCode 2 blocking runs in
ctx.tool.hook("execute.before")(which also sees calls made inside Code Mode) plus actx.permission.hook("evaluate")layer that deniesread,edit, andshellchecks on protected files. - Blocks
patch/apply_patchcalls whose patch touches a protected file. - Blocks shell commands (
bash/shell) that name a protected file; envsitter CLI invocations stay allowed. - Hides
grepmatches from protected files (V1tool.execute.after, V2execute.after). - Blocks any other tool, such as MCP filesystem tools, whose path arguments point at a protected file.
npm run test:e2e: cross-version end-to-end check that drives the real OpenCode 1 and OpenCode 2 CLIs with a scripted model in an isolated home. Verified against OpenCode 1.18.31 + 2.0.32 (the minimums) and 1.19.3 + 2.1.0.- Release automation: CI on every push and pull request (unit tests on Node 22, 24, and 26 plus the OpenCode 1 + 2 end-to-end check against both version pairs), and tag-driven releases that only publish after that CI passes, using npm trusted publishing with provenance.
- Documentation page at https://boxpositron.github.io/envsitter/guard/.
- Tool output scrubbing: secret-looking values from the project's protected env files are replaced with
[envsitter: KEY redacted]in the output of every non-EnvSitter tool (OpenCode 1tool.execute.after, OpenCode 2execute.after), so commands that never name.env(grep -r,cat *, log files) no longer hand values to the model. Uses envsitter's redactor; env files are found up to three levels deep and re-read when they change. - Weekly end-to-end run against the newest OpenCode 1 and 2 releases (
e2e-latest.yml), and Dependabot for npm dependencies and GitHub Actions.
Changed
- Breaking: the named export
EnvSitterGuardis now the plugin definition object, not a V1 plugin function. Code that calledEnvSitterGuard(input)directly should callEnvSitterGuard.server(input). Re-exporting it from a local plugin file keeps working. - OpenCode 1 support now requires 1.18.29 or newer (object-form plugin entrypoint).
- Protected files now come from envsitter's path policy: named env files such as
api.envandconfig.env.localare protected, and EnvSitter tools accept them. - Example/template files
.env.sample,.env.template,.env.dist, and.env.default(s)are now readable, matching envsitter's definition (previously only.env.example). - Tool definitions are shared between OpenCode 1 and 2; V2 receives JSON Schema generated from the same argument schemas, and inputs are validated before execution.
- Bumped
envsitterdependency to^0.1.0. - Bumped
@opencode-ai/plugindependency to^1.19.3.
Fixed
- OpenCode 1.19 names its patch tool
apply_patch; the previouspatchcheck never matched it.
0.0.4
Added
envsitter_add: add a new key to a dotenv file (fails if key exists; dry-run unlesswrite: true).envsitter_set: set a key's value (creates or updates; dry-run unlesswrite: true).envsitter_unset: unset a key's value to empty string (keeps the key; dry-run unlesswrite: true).envsitter_delete: delete key(s) from a dotenv file entirely (dry-run unlesswrite: true).envsitter_help: comprehensive help tool explaining all EnvSitter tools to agents. Supports topics:overview,reading,matching,mutations,file_ops,all.
Changed
- Blocking behavior is now silent (error message only, no toast notifications).
- Improved error messages to reference
envsitter_helpfor guidance. - Bumped
envsitterdependency to^0.0.4.
0.0.3
Added
envsitter_validate: validate dotenv syntax (issues only; never values).envsitter_copy: copy keys between dotenv files (dry-run unlesswrite: true; never values).envsitter_format/envsitter_reorder: format/reorder dotenv files (dry-run unlesswrite: true; never values).envsitter_annotate: annotate dotenv keys with comments (dry-run unlesswrite: true; never values).
Changed
envsitter_match: uses EnvSitter outside-in matching forop: "is_equal".- Block warnings: removed prompt append (toast-only) to avoid writing into OpenCode's input.
- Bumped
envsitterdependency to^0.0.3.
0.0.2
Added
envsitter_match: safe boolean matching for.envkeys (single key, bulk keys, or all keys) with support for the EnvSitter match operators.envsitter_match_by_key: safe candidates-by-key matching (returns booleans only).envsitter_scan: safe shape scanning (jwt,url,base64) without returning values.envsitter_keys.filterRegex: optional regex filter for key listing.
Changed
- Bumped
envsitterdependency to^0.0.2.