Skip to content

0.11.3 — Final release: ledger recovery, verifier integrity, maintenance mode

Choose a tag to compare

@william-ricchiuti william-ricchiuti released this 30 Oct 20:54
· 5 commits to main since this release
169f4b2

v0.11.3 — Final release: ledger recovery, verifier integrity, maintenance mode

Superseded by v0.11.4, which adds one Windows lease fix; use that version.

Final planned release. OpenCode ships a built-in /goal as of v2.2.1; on 2.2.1 and later use the built-in command unless you need this plugin's independent verifier, limits, agent tools or multi-goal sequences. The plugin keeps working on OpenCode 1 and OpenCode 2 and receives bug and security fixes only. With both installed the plugin takes over /goal; set commandName to keep both (see the README).

Install: "plugins": ["opencode-goal-plugin@0.11.3"] (OpenCode 2) or "plugin": [...] plus a goal command entry (OpenCode 1). npm. Verified on OpenCode 1.17.15, 2.0.16, 2.0.26 and 2.2.2.

Changes

  • Stop ledger recovery from bringing back replaced goals. Replacing a goal with /goal <objective>, goal_set or /goal sequence left no terminal ledger event, so after a truncated, corrupt or wrong-version state.json the old goal came back as a paused goal in /goal list. Replacements now record a replaced event, which recovery treats like completed and cleared. Ledgers written before this change keep the old behavior.
  • Start a new ledger line when the last one was torn. A crash mid-append left a line without a newline, and the next event was appended onto it, so both were skipped as malformed and a later cleared or completed event could be lost.
  • Report a ledger append as durable only when every byte was written. A short write used to count as success; the append now finishes the write or reports failure.
  • Quarantine an invalid state.json as state.json.corrupt.* whenever it fails to load. It was kept only when the ledger rebuilt at least one goal; otherwise the next save overwrote it and the data was lost.
  • On Windows, retry removing the persistence lease claim on release when the unlink fails with EPERM, EACCES or EBUSY, with the same 10 ms to 160 ms backoff as the 0.11.2 rename retry. One such failure left the instance's own claim behind, and because the owner process is always alive to itself, a same-process replacement after an OpenCode 2 location reload stayed passive until OpenCode restarted. A claim that stays locked past the retries still fails the release as before; other platforms are unchanged.
  • Only affects users who set auditorOptions.failurePolicy: "approve": a completion verifier whose prompt or permissions differ from the plugin's own goal-verify definition on OpenCode 2, or a verifier child session linked to a different parent session, was treated as an operational failure and auto-approved. These integrity failures now always reject; an unavailable API, missing child-session ID, provider error or timeout still follows the configured policy.
  • Give the built-in completion verifier the whole completion claim, up to the 8000-character claim limit. It was cut to the last 1000 characters, so a structured goal_complete claim lost its summary and early criteria before the verifier saw it.
  • Keep the recorded reason when a goal that is already stopped sees a later provider error, abort or rejected permission. A goal the assistant marked [goal:blocked] was relabelled paused with provider error, user interrupted or permission rejected when, for example, the turn the user spent resolving the blocker failed, so /goal status lost the blocker. User pauses and audit rejections were overwritten the same way.
  • On OpenCode 2.2, find a goal session's existing child sessions again. 2.2 returns session.list as a page ({ data, cursor }), which the bridge did not unwrap, so noContinueWhileChildrenActive only saw children created while the current plugin instance was running and missed any that started before a reload. Earlier 2.0 hosts have no session.list in the plugin context and are unchanged.
  • On OpenCode 2, release the /goal registration the plugin re-asserts over a shadowing config command when the plugin is unloaded, and skip the re-assertion if the plugin was unloaded while it was checking. Real hosts already scope plugin registrations to the plugin, so this only matters for embedders.
  • Docs: on OpenCode 2 a file: plugin entry that points at src/goal-plugin.js is rejected (configured plugin path must be a directory) and, on 2.2.1 and later, the built-in /goal answers instead, so the README's local-development section and the demo now give the OpenCode 2 routes (.opencode/plugins/<file>.js or a packed tarball) next to the OpenCode 1 file: form. Restructure the README's first screen around the maintenance status, why the plugin existed and its engineering highlights, and correct the CI claim: Node 18–24 runs on Linux, with macOS and Windows covering the filesystem-sensitive tests. Retire the feature-request issue template and add maintenance notices to CONTRIBUTING and SECURITY.
  • Docs: add a maintenance-status note. OpenCode 2.2.1 ships a built-in /goal; with default options this plugin takes over the command and the built-in does not run, and setting commandName keeps both (verified on a live 2.2.2 host). Record OpenCode 2.0.26 and 2.2.2 as verified hosts alongside 2.0.16.
  • Docs: correct several claims that no longer matched the code. OpenCode 2 exposes 9 tools (not 11), the token budget is the peak context size including cache tokens, audit children are deleted on hosts with session.remove, per-session state lives under state.json.sessions/, the upgrade notes described 0.11.0 instead of the current release, budgetWrapupRatio applies to the token budget only, and /goal stop clears rather than pauses.
  • Correct the comment on the lease liveness check, and the 0.11.1 entry's reasoning: signal 0 is only an existence check under Node and OpenCode's embedded Bun, including on Windows (verified on windows-latest for #81), so it never terminated the OpenCode service. Skipping it for the host's own process stays as a harmless shortcut.