github kenryu42/cc-safety-net v2.4.3

5 hours ago

This release adds OpenCode 2.0.6+ support alongside the existing OpenCode v1 integration. It also raises the minimum supported OpenCode v1 version to 1.18.29.

Highlights

  • Added OpenCode 2.0.6+ support, using the same policy, analyzer, and audit behavior as the v1 integration. (#123)

Added

  • Added protection on OpenCode v2 through its tool hook, covering shell commands and read, edit, write, patch, grep, glob, and unknown-tool inputs, with typed tool denials. Code Mode child tool calls pass through the same hook. (#122)
  • Added v2 installation and updates to npx -y cc-safety-net@latest install --opencode, which detects the host version and uses opencode plugin add and opencode plugin update, then confirms the plugin is registered in opencode plugin list.
  • Added a shell plugin option for OpenCode v2 that sets the expected dialect (posix or powershell). The plugin defaults to POSIX on Unix and PowerShell on Windows, verifies the actual executable before a shell starts, and rejects a mismatched or unsupported shell rather than analyzing it with the wrong parser. See docs/opencode-compatibility.md.
  • Added the /cc-safety-net command on OpenCode v2. A command of that name already present when the plugin loads is preserved.
  • Added the cc-safety-net/opencode/v2 entry point for TypeScript consumers using the OpenCode v2 SDK. v1 consumers continue to use CCSafetyNetPlugin from cc-safety-net.

Changed

  • Changed install --opencode to stop with a migration message when an OpenCode v2 config already lists cc-safety-net under a spec other than cc-safety-net@latest, instead of creating a duplicate plugin ID. Change that entry's package spec, keeping its options and comments, then retry.

Fixed

  • Fixed OpenCode config discovery to honor the OPENCODE_CONFIG_DIR override, which affects both integration detection and uninstall.
  • Fixed uninstall to remove cc-safety-net entries from every detected OpenCode config file instead of stopping at the first one, and to report accurately whether an entry was removed.
  • Fixed OpenCode detection and uninstall to recognize both the plugin and plugins arrays and object-form plugin entries, and to match only the cc-safety-net package spec instead of any entry whose name contains it.
  • Improved OpenCode config editing so removing a plugin entry preserves neighboring comments in JSONC configs.

Breaking Changes

  • Raised the minimum supported OpenCode v1 version to 1.18.29, up from 1.18.3. install --opencode now stops with a version error on older releases.
    • Migration: Upgrade OpenCode to 1.18.29+ or 2.0.6+ before updating CC Safety Net.

Don't miss a new cc-safety-net release

NewReleases is sending notifications on new releases.