Repository navigation
Upstream: @opencode/plugin@2.2.1 compatibility report #96
Description
TL;DR: @opencode/plugin 2.2.1 changes nothing that breaks these plugins. All five V2 plugins need only the dev pin bump. The V1-only prompt-inheritance plugin doesn't depend on this package. No published version breaks on OpenCode 2.2.1, and no peer range needs tightening. Two problems turned up that 2.2.1 did not cause: the vendored prompt sync has been broken since July, and the smoke scripts fail under the repo's pinned Bun 1.3.12.
Base: main @ cb6d3dde2. Bump: @opencode/plugin 2.2.0 → 2.2.1 (release, compare). OpenTUI stays at 0.7.0 in the upstream catalog.
Per-plugin verdict
Package (published latest) |
Verdict | Peer range | Notes |
|---|---|---|---|
opencode-agents-loader (2.0.2) |
needs pin bump only | >=2.0.2 <3: OK |
built server.js resolves and loads |
opencode-adversarial-review (2.0.2) |
needs pin bump only | >=2.0.2 <3: OK |
bun run smoke passes |
opencode-double-tap-timeline (2.0.1) |
needs pin bump only | >=2.0.0 <3 (optional): OK |
built ./tui resolves and loads |
opencode-output-styles (2.2.0) |
needs pin bump only | >=2.2.0 <3: OK |
uses ctx.session.instructions.entry.*, which 2.2.1 types as experimental (see watch items) |
opencode-ram-monitor (2.1.1) |
needs pin bump only | >=2.1.0 <3 (optional): OK |
|
opencode-agent-prompt-inheritance (1.0.1, V1) |
unaffected | @opencode-ai/plugin >=1.19.3 <2: OK |
the vendored prompts have drifted from upstream (see below) |
Are published versions broken for users on 2.2.1? No. I diffed the 2.2.0 and 2.2.1 npm tarballs, and the shipped runtime JS is identical. The promise/adapter.js code that builds ctx.session.instructions / wait is unchanged, and host.js (the resolver) is unchanged. Only .d.ts files and package.json differ.
Gate results (scratch clone, dev pins bumped to 2.2.1 in 5 packages, bun install → lockfile moves @opencode/{plugin,ai,client,protocol,schema,util} to 2.2.1)
| Gate | Result |
|---|---|
bun run typecheck |
✅ pass |
bun run lint |
✅ pass |
bun run test |
✅ pass (release guard 61/61; packages: loader 28, timeline 18, output-styles 99, ram-monitor 77, adversarial-review 70, prompt-inheritance 39; 0 fail) |
bun run build |
✅ pass |
adversarial-review: bun run smoke |
✅ pass (Bun 1.3.12 and 1.4.4) |
output-styles: bun run smoke |
|
ram-monitor: bun run smoke |
|
loader / timeline built-entry load through @opencode/plugin/host resolve() |
✅ on Bun 1.4.4 (loader → dist/index.js via server.js; timeline → ./tui → dist/index.js) |
Upstream changes that matter
Type-level only. None of these change runtime behavior for these plugins.
SessionDomainnow pickswaitandinstructionsfromExperimentalSessionApiinstead ofSessionApi(#59072, "group experimental SDK methods underclient.experimental"). Property names and the adapter are unchanged, soctx.session.instructions.entry.{list,put,remove}inopencode-output-styles/src/server.tsstill typechecks and runs. Upstream now classes it as experimental.GenerateApi→ExperimentalGenerateApiforctx.generate. The old alias is marked@deprecated … Removed in the next minor. No plugin here usesgenerate.- New hook
session.hook("experimental.idle", …)withbackgroundinfo (#59437,/goal). This is additive. - GUI plugin SDK: new composer-pill
menupopover and extraIconNames. Additive; nothing here uses the GUI SDK. - Plugin loading / config:
ManagedPolicywas removed from the plugin supervisor, the module loader and the config policy plugin (#59609, #59595). Plugin deny decisions now come only from config entries. The config schema addstimezone,experimental.image_generate(#60096) andexperimental.schedules(#59457). Package resolution (host.js) did not change, and there were no keymap or command-registry changes. New built-in TUI commands are/goaland/schedule; no plugin here registers either name (AGENTS.md command-collision rule). - The "Breaking changes" in the release notes only affect direct imports of
@opencode/aiprovider entry points, which the repo doesn't use.
Watch items (not blocking):
session.instructionsis now experimental upstream. The output-styles style switching depends on it, so check the 2.3 notes for a rename or move.- The deprecated
GenerateApialias goes away in the next minor. Only relevant ifctx.generategets adopted.
Pre-existing problems found (not caused by 2.2.1)
1. Vendored prompt sync is broken (opencode-agent-prompt-inheritance)
bun run sync:prompts fails with Failed to fetch …: 404. The default ref dev no longer has packages/opencode/ at all: 44b6938b2 "removed packages/opencode" (2026-07-21). The scheduled Sync OpenCode Prompts workflow has failed on every recent run I listed (Oct 25–28).
Did the upstream prompts change? Yes, compared with the V1 line (v1.19.5):
default.txtdiffers: upstream dropped two verbosity examples ("2 + 2", "golf balls in a jetta") in 548648a3d (#26821).copilot-gpt-5.txtwas deleted upstream as unused in b01498d3f (#59669, shipped in v1.19.5). Upstreamsystem.tshas no copilot branch any more. It also addedgpt-6→gpt-astra.txt,muse→meta.txt, and kimi provider-ID matching, none of whichprovider-prompt.tsmirrors.anthropic,beast,codex,gemini,gpt,kimi,trinity: identical.
Suggested fix (not applied):
// scripts/sync-upstream-prompts.ts
const ref = process.env.OPENCODE_UPSTREAM_REF ?? "v1"; // V1 sources live on the v1 line; `dev` is V2-only
export const ALLOWED_FILES = [
"anthropic.txt", "beast.txt", "codex.txt", "default.txt", "gemini.txt",
"gpt.txt", "gpt-astra.txt", "kimi.txt", "meta.txt", "trinity.txt",
] as const; // copilot-gpt-5.txt removed upstream (#59669)Then either keep the bundled copilot-gpt-5.txt as a frozen fixture (drop it from ALLOWED_FILES only) or align providerPromptForModel with upstream V1 system.ts. That second option is a behavior change for Copilot model IDs, so it's a maintainer call. Upstream V1 sources live on the v1 branch.
2. smoke scripts fail on Bun 1.3.12
output-styles and ram-monitor smoke fail with Cannot find module '@capybearista/opencode-output-styles/rpc' (and the …/server equivalent), and do so with both 2.2.0 and 2.2.1 pins. Root cause: @opencode/plugin/host resolve() only swallows probe errors when error instanceof Error. Under Bun 1.3.12 a failed Bun.resolveSync throws a ResolveMessage that is not instanceof Error (verified: instanceof Error: false, code: ERR_MODULE_NOT_FOUND), so the probe for a missing rpc/server subpath gets rethrown. Under Bun 1.4.4 (upstream's packageManager) both smokes pass. Users aren't affected, because OpenCode runs on its own bundled Bun. CI doesn't run smoke, so this hasn't shown up there.
Suggested fix (not applied): bump the root packageManager and the workflows' bun-version to Bun ≥ 1.4.4 together, or run smoke with that Bun version:
// package.json
"packageManager": "bun@1.4.4"Peer ranges
No tightening needed. Nothing new in 2.2.1 is used, so >=2.0.x / >=2.1.0 / >=2.2.0 stay correct. Per AGENTS.md, keep the peer strings different from the new 2.2.1 dev pin so Dependabot doesn't rewrite them.
Method: npm tarball diff of @opencode/plugin and @opencode/client 2.2.0 vs 2.2.1, upstream tree diffs of packages/{plugin,sdk} and packages/core/src/{plugin,config}, and gates run in a throwaway clone that has since been deleted. Nothing was pushed.
Activity