Repository navigation
0.11.0 — OpenCode 2 support, authoritative live leases, fail-closed verifier switching
v0.11.0 — OpenCode 2 support, authoritative live leases, fail-closed verifier switching
Released on 2026-09-30. Release notes backfilled on 2026-10-30 from CHANGELOG.md.
-
Normalize directory separators with a linear scan, preventing adversarial location strings from causing regular-expression backtracking.
-
Keep live persistence owners authoritative regardless of claim age. On OpenCode 2 location reloads, explicitly dispose the previous same-process plugin instance before initializing its replacement; do not steal a live claim on a timer.
-
Fail closed when an OpenCode 2 agent switch fails or the completion verifier's identity/permissions differ from the owned definition. Revoke previously confirmed audit readiness on config conflicts, wait for the child execution before reading its verdict, and map child removal when the host exposes it.
-
Make Windows-path case assertions platform-aware while preserving POSIX location isolation.
-
Make the release contracts pass under npm 12 on machines whose
~/.npmrc
setsallow-scripts:npm runre-exports that entry as environment config,
which npm 12 rejects withEALLOWSCRIPTSwhen the child install also passes
--ignore-scripts, so the type, packed-host, and packed-tool contracts now
strip script-policynpm_config_*keys from the environment they hand to
child npm. The same three scripts also normalize npm 12'spack --json
output (keyed by package name instead of a bare array): the packed-host and
packed-tool contracts accepted only the array shape and failed at the
install step, and the type contract crashed in its final success log even
after bothtscpasses because it still indexed the raw result. All three
contracts now pass locally (type contract passed (NodeNext + Bundler; opencode-goal-plugin-0.11.0.tgz),packed host contract passed,
packed tool contract passed … 11 tools). -
Extend the live OpenCode 2.0.16 verification of the OpenCode 2 adapter and
record it indocs/compatibility.md: command ownership over a legacy config
command.goalentry on a cold boot (the plugin's framed control result is
the admitted turn and the config template text never reaches the model), a
full goal run to completion throughgoal_completeon a live provider, the
auto-continue loop (two<goal_continuation>prompts with a live
<progress_budget>countdown before the talk-only stall gate paused the
goal), the session-title status indicator, agent registration with system
prompts and translated permission rules, and the plugin-options precedence
rule for a package listed in both user-level and project config. -
Add OpenCode 2 support. The default export now carries a
setupentrypoint next toserver: OpenCode 1 keeps readingid+server(the V1 hook map), OpenCode 2 readsid+setupand ignoresserver, so one package serves both lines andengines.opencodewidens from>=1.17.15 <2to>=1.17.15. The newsrc/v2-bridge.jsadapts OpenCode 2's plugin context onto the existing V1 hook contract instead of forking the workflow, so the goal core (state machine, persistence lease, budgets, ledger, tool surface) is unchanged:session.hook("prompt")driveschat.message, twosession.hook("context")registrations drivechat.paramsand the system block,session.hook("compaction")drivesexperimental.session.compacting,tool.hook("execute.before")keeps the throw-to-block contract,tool.transform/agent.transformreplace thetoolmap andconfighook (Zod v4 passes through as Standard Schema, V1 agent permission/tool maps translate to ordered V2 rules with both spellings of renamed actions),command.transformregisters/goaland submits the routed control result as the prompt itself, andevent.subscribe()normalizes the V2 stream back to the V1 event shapes (session.execution.succeeded→session.idle,…failed→session.error,…interrupted→ abort,session.compaction.ended→session.compacted,session.step.ended→message.updated,session.agent/model.selected→session.updated). Because V2 messages carry noparentID, it is derived from transcript order and from the last admitted prompt; becausesession.createhas noparentIDfield, the completion auditor's child records the parent link in session metadata; V2 step failures are not treated as terminal (V2 retries them) and terminal errors come fromsession.execution.failed; V2 has noclient.app.log, so advisory diagnostics use the existing console fallback; and V2 has no post-compaction auto-continue, soexperimental.compaction.autocontinueneeds no replacement.test/v2-bridge.test.jspins every mapping, the session-client contract, and an end-to-end/goal setcommand turn that creates a goal instead of being read as user input. -
Register the slash command so OpenCode 2's config ordering cannot shadow it. OpenCode 2 registers config
command/commandsentries after user plugins, which would let a legacycommand.goalentry override the plugin's handler; the bridge re-asserts its registration after activation (retriggered bycommand.updated/config.updated) and warns if a foreign definition still owns the name. A configcommandentry is now required only on OpenCode 1 — OpenCode 2 users should drop it. -
Verify OpenCode 2.0.16 against a real host: plugin load to
state: activethrough both a package spec and a local.opencode/plugins/*.jsentry, the/goalcommand listed byGET /api/command, and the nativegoal/goal-verifyagents present inGET /api/agent.docs/compatibility.mdnow records the supported surface, the full hook mapping, the divergences above, and the current validation boundaries. A configured plugin directory that contains apackage.jsonis resolved by name@version into OpenCode's npm cache, so a local checkout loads only through.opencode/plugins/<file>.js. -
On OpenCode 2, stop exposing the V1 tool aliases
get_goalandset_goal, which duplicategoal_statusandgoal_set. Two spellings of one operation led a model to inventget_goal_statusright after a goal was set.get_goal_history,update_goalandclear_goalhave no canonical twin and stay; OpenCode 1 is unchanged. -
Invalidate pending completion approvals when the objective changes, and give auditors isolated goal snapshots so an old verdict cannot complete a newly edited goal.
-
Apply the planning-only agent hold to every work command, including add, sequence, resume and focus, and to goal creation/resume tools. Preserve routed first-turn protection when the host reports its agent after the command hook.
-
Reject contradictory completion check results, invalid exit codes, excessive per-criterion evidence and structured evidence that exceeds the completion budget.
-
Return structured failures from canonical goal creation when validation fails, including invalid budgets, while preserving legacy tool messages.
-
Honor the configured SDK shape in the built-in completion verifier's create, prompt, timeout abort and cleanup calls.
-
Fix persistence lease acquisition on filesystems that cap timestamps at 2038. New compatibility guards use a representable timestamp, existing 2100 guards remain valid, and expiring guards fail closed.
-
Keep ordinary chat available when goal leases encounter unsupported hard links (including
ENOSYS), unsafe lease paths, or an unusable guard timestamp. Goal controls returnpersistence_unavailablewith recovery guidance; migration failures release the session lease before entering passive mode.