diff --git a/CHANGELOG.md b/CHANGELOG.md index 2854adb..4db2011 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,24 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/ ## [Unreleased] +## [2.0.0] + +### Changed + +- Graduate the qualified native Beads integration from beta to the stable line: eleven permissioned operations, 29 workflow commands plus `oc-beads:diagnostics`, packaged guidance and scope-bounded task execution. +- **Breaking:** require OpenCode `>=2.2.6 <2.3`; upgrade OpenCode before selecting 2.0.0. No parallel 2.1 compatibility layer or automatic migration is provided; existing exact 1.x/beta pins remain available. Beads minimum remains 1.3.1. +- Reflect actual request capabilities: native composition when available, directly exposed Beads leaves when execute is unavailable, and independently permissioned direct shell. Preserve per-operation rejection, actor attribution and Stop/Cancel. + +### Fixed + +- Restore durable workflow and once-captured diagnostic instructions after OpenCode 2.2 projects messages without metadata: resolve one native current-context snapshot map by retained user-message ID, with location/cancellation/generation checks and no new cache or side store. +- Reconcile README installation, migration and compatibility guidance with the accepted exact OpenCode 2.2.6 qualification. Runtime and packaged guidance are unchanged from the final Opus-reviewed candidate; version/README metadata create a new release artifact. + +### Known limitations + +- Native compaction followed by switching to a model unable to replay the native window can leave older command instructions or captured diagnostics inaccessible. Report unavailable guidance instead of reconstructing it; Beads issue data is unaffected. Upstream #57424 / `opencode-beads-o66` remain unresolved. +- A declined nested operation need not end the entire composition; later operations retain independent permissions. Explicit Stop/Cancel is the cancellation boundary. + ## [1.1.0-beta.5] ### Fixed @@ -360,7 +378,8 @@ Documentation-only release; the plugin code is unchanged from 1.0.0. It updates - Josh Thomas (maintainer) -[unreleased]: https://github.com/snarkipus/opencode-beads/compare/v1.1.0-beta.5...HEAD +[unreleased]: https://github.com/snarkipus/opencode-beads/compare/v2.0.0...HEAD +[2.0.0]: https://github.com/snarkipus/opencode-beads/releases/tag/v2.0.0 [1.1.0-beta.5]: https://github.com/snarkipus/opencode-beads/releases/tag/v1.1.0-beta.5 [1.1.0-beta.4]: https://github.com/snarkipus/opencode-beads/releases/tag/v1.1.0-beta.4 [1.1.0-beta.3]: https://github.com/snarkipus/opencode-beads/releases/tag/v1.1.0-beta.3 diff --git a/README.md b/README.md index 9194396..0b0d5f2 100644 --- a/README.md +++ b/README.md @@ -7,27 +7,32 @@ [Beads](https://github.com/gastownhall/beads) issue tracker integration for [OpenCode](https://opencode.ai). -`@snarkipus/opencode-beads` is a maintained OpenCode adapter that gives OpenCode 2 the integration `bd setup claude` gives Claude Code: `bd prime` workflow context on every request, refreshed after compaction and when a session resumes, plus a bounded task agent. Published 1.0.2 completes one Bead per invocation; the published beta/next release follows the authorized scope. It does not replace Beads: the installed `bd` CLI remains authoritative for issues, project initialization, skills, migrations, backups, and Dolt synchronization. +`@snarkipus/opencode-beads` is a maintained OpenCode adapter that supplies `bd prime` workflow context, native permissioned Beads tools, compact workflow commands and a scope-bounded task agent. Exact assignments stop with their item; an already-authorized batch may continue within its bounds. The installed `bd` CLI remains authoritative for issues, project initialization, shared skills, migrations and Dolt synchronization; the plugin does not replace it. This is an independent project maintained by Matt Jackson under the MIT license. It began as a fork of [Josh Thomas's `opencode-beads`](https://github.com/joshuadavidthomas/opencode-beads), and the original work remains credited to its author. 1.0 rebuilt the plugin for OpenCode 2, and development now continues here independently. It vendors nothing from upstream Beads; instead, every Beads release is checked against the `bd` behavior the plugin relies on (see [Tracking upstream Beads](#tracking-upstream-beads)). -This release is **1.1.0-beta.5**, an opt-in beta targeting npm dist-tag `next`; its integration diagnostic command is `oc-beads:diagnostics`. Beta.1 used `oc-beads:status`; the rename is documented below. The beta's normal public entrypoint enables the eleven qualified operations in the native `beads` code-mode namespace on supported hosts: find, get, edges, memories, recall, claim, note, selected-field update, close, create and remember. No wrapper, internal dependency injection, manual skill copy or activation setting is needed. The opt-in is selecting the beta artifact. The published stable 1.0.2 package is unchanged. +Version **2.0.0** is the stable integration line for OpenCode `>=2.2.6 <2.3`. The normal public entrypoint enables the eleven qualified operations in the native `beads` code-mode namespace: find, get, edges, memories, recall, claim, note, selected-field update, close, create and remember. No wrapper, internal dependency injection, manual skill copy or activation setting is needed. The integration diagnostic command is `oc-beads:diagnostics`. Existing exact 1.x and beta pins remain available; installations are not upgraded automatically. -The beta registers 29 `oc-beads:` workflows plus `oc-beads:diagnostics` through ordinary native command registration and owns its packaged `oc-beads` skill at the installed path, with all 15 corpus resources plus CODE_MODE and ADR (17 links). User configuration/file commands retain native precedence on load and rebuild; removing an override restores the package definition. Other plugin conflicts follow native ordering. Diagnostics reports observed registration and name/description mismatches; identical-description overrides and public owner identity remain unobservable. +The plugin registers 29 `oc-beads:` workflows plus `oc-beads:diagnostics` through ordinary native command registration and owns its packaged `oc-beads` skill at the installed path, with all 15 corpus resources plus CODE_MODE and ADR (17 links). User configuration/file commands retain native precedence on load and rebuild; removing an override restores the package definition. Other plugin conflicts follow native ordering. Diagnostics reports observed registration and name/description mismatches; identical-description overrides and public owner identity remain unobservable. Typed registration requires the host tool, permission and session interfaces. The integration diagnostic command reports unavailable interfaces honestly; actual request capabilities, catalog discovery and per-operation permissions determine which operations can run. Native shell remains direct-only and cannot be called inside execute. Structured results preserve partial, failed and uncertain outcomes, and writes retain the actual session-and-agent Beads actor. Read [CODE_MODE.md](assets/oc-beads/resources/CODE_MODE.md) for composition and recovery. -All 16 implementation tasks have parent acceptance on exact OpenCode 2.1.1 / Beads 1.3.1. The [final acceptance record](docs/code-mode-final-acceptance-vuy9.md) and [bounded installed/model evaluation](docs/opencode-installed-model-continuation-vuy9.md) retain their historical candidates and probes; the published beta adds the public entrypoint and release-channel wiring. **Known limitation:** plain decline of a nested permission request does not stop the entire composition; a later independent operation can ask again. Use explicit Stop/Cancel to stop the composition. No token-saving, cross-provider checkpoint portability or multi-hour reliability claim is made. +Exact OpenCode 2.2.6 has accepted native-host qualification plus one genuine OpenAI Sol High workflow; see the [qualification and final Opus review record](docs/opencode-22-qualification-5rj2.md). The 2.0.0 metadata preparation preserves that qualified runtime and all packaged guidance byte-for-byte. The [earlier acceptance record](docs/code-mode-final-acceptance-vuy9.md) retains the historical OpenCode 2.1.1 evidence. **Known permission behavior:** a rejected nested operation does not promise termination of the entire composition; each later operation retains its own permission check. Use explicit Stop/Cancel to stop the composition. No token-saving, cross-provider checkpoint portability or multi-hour reliability claim is made. -### Unreleased OpenCode 2.2.6 source adaptation +### Upgrading to 2.0.0 -This checkout contains an unreleased source candidate targeting `@opencode/plugin` 2.2.6 and host admission `>=2.2.6 <2.3`. It is still package version `1.1.0-beta.5`; the published beta.5 artifact and its `>=2.1.1 <2.2` compatibility range have not changed. The candidate has not passed live host qualification and does not alter operator configuration or Beads data. +Upgrade OpenCode before changing the plugin pin: 2.0.0 requires `>=2.2.6 <2.3`, with no 2.1 compatibility layer. Then replace the existing plugin entry rather than stacking a second version, and check `/oc-beads:diagnostics` for the loaded package/host identities and actual capabilities. OpenCode upgrades and plugin installation remain operator-owned actions. -**Known workflow-guidance limitation:** after native conversation compaction on model A, switching to model B that cannot replay A's native context can make earlier workflow instruction snapshots and captured diagnostics unavailable. The candidate restores them only when OpenCode's current native session context contains matching user-message IDs; otherwise it reports the workflow guidance unavailable and continues with the ordinary request. This is the model-switch case tracked by [upstream issue #57424](https://github.com/anomalyco/opencode/issues/57424) and local deficiency `opencode-beads-o66`; it remains unresolved. The limitation affects prompt guidance only: it does not change or repair the Beads issue database or its stored data. +- Staying on OpenCode 2.1? Keep the exact beta.5 pin rather than following `latest`; beta.5 retains its historical `>=2.1.1 <2.2` range. Stable 1.0.2 remains a historical option for its separately qualified host. +- Moving from stable 1.0.2? Task execution now follows the explicitly authorized scope instead of imposing one Bead per invocation. Exact assignments still stop with their item; discovery never grants authority. +- Beta.1 used `oc-beads:status`; 2.0.0 uses `oc-beads:diagnostics`. Existing user overrides are not silently renamed. +- The accepted snapshot-recovery deficiency below remains unresolved; upgrading does not reconstruct inaccessible historical guidance. + +**Known workflow-guidance limitation:** after native conversation compaction on model A, switching to model B that cannot replay A's native context can make earlier workflow instruction snapshots and captured diagnostics unavailable. The plugin resolves them only when OpenCode's current native session context contains matching user-message IDs; otherwise it reports the workflow guidance unavailable and continues with the ordinary request. This is the model-switch case tracked by [upstream issue #57424](https://github.com/anomalyco/opencode/issues/57424) and local deficiency `opencode-beads-o66`; it remains unresolved. The limitation affects prompt guidance only: it does not change or repair the Beads issue database or its stored data. ## Design -The published beta/next release uses scope-bounded task execution: +The 2.0 integration uses scope-bounded task execution: - The primary OpenCode thread retains planning context, decisions, and control. - An exact assignment or explicit one-bead mode stops with that item; read-only graph requests never authorize claims or writes. @@ -37,7 +42,8 @@ The published beta/next release uses scope-bounded task execution: ## Installation -The published beta.5 requires OpenCode `>=2.1.1 <2.2` and `bd` 1.3.1 or later. Exact OpenCode 2.1.1 has bounded native, Stop and installed/model evidence; other admitted 2.1 patches are not inferred qualified. The unreleased source candidate instead admits `>=2.2.6 <2.3`; that range is a source target, not host qualification. The external `bd` CLI and project initialization remain prerequisites; the plugin does not install or upgrade them. Stable 1.0.2 remains separately qualified against OpenCode 2.0.26. +Version 2.0.0 requires OpenCode `>=2.2.6 <2.3` and `bd` 1.3.1 or later. Exact OpenCode 2.2.6 has bounded native and genuine-model evidence; a compatible range is admission, not proof that every future patch was tested. Native qualification used Beads 1.3.4 while the existing supported-minimum contract evidence remains 1.3.1. The external `bd` CLI and project initialization remain prerequisites; the plugin does not install or upgrade them. + 1. Install the [`bd` CLI](https://github.com/gastownhall/beads/blob/main/docs/getting-started/installation.md) once on the host, then initialize each project: ```bash @@ -45,17 +51,17 @@ The published beta.5 requires OpenCode `>=2.1.1 <2.2` and `bd` 1.3.1 or later. E bd init ``` - `bd init` owns project initialization and creates the canonical shared Beads skill at `.agents/skills/beads`, which OpenCode discovers. It also writes a minimal Beads section to `AGENTS.md` that points to `bd prime`, the same pointer Beads gives Claude Code in `CLAUDE.md`. The published stable package relies on that shared skill. The beta additionally owns its packaged `oc-beads` skill; it does not write startup files or change `.agents/skills/beads/SKILL.md`. + `bd init` owns project initialization and creates the canonical shared Beads skill at `.agents/skills/beads`, which OpenCode discovers. It also writes a minimal Beads section to `AGENTS.md` that points to `bd prime`, the same pointer Beads gives Claude Code in `CLAUDE.md`. The plugin additionally owns its packaged `oc-beads` skill; it does not write startup files or change `.agents/skills/beads/SKILL.md`. 2. Add the published, version-pinned plugin to `~/.config/opencode/opencode.json` for every project, or to a project's `.opencode/opencode.json`: ```json { - "plugins": ["@snarkipus/opencode-beads@1.1.0-beta.5"] + "plugins": ["@snarkipus/opencode-beads@2.0.0"] } ``` - To follow the published beta channel, use `"plugins": ["@snarkipus/opencode-beads@next"]` instead. To stay on stable, use `"plugins": ["@snarkipus/opencode-beads@latest"]` (currently 1.0.2); do not select the beta. Stable promotion requires separate approval. + To follow stable releases, use `"plugins": ["@snarkipus/opencode-beads@latest"]` and check the resolved version before upgrading. `"plugins": ["@snarkipus/opencode-beads@next"]` is a separate historical beta channel, not a promise of a newer or compatible release. An exact version pin is recommended. OpenCode loads configuration changes automatically. Update the pin explicitly when upgrading; an unpinned package entry is less reproducible. OpenCode 1.x plugins are not supported; use 0.10.x or earlier there. @@ -69,7 +75,7 @@ Plugin options use the object form: { "plugins": [ { - "package": "@snarkipus/opencode-beads@1.1.0-beta.5", + "package": "@snarkipus/opencode-beads@2.0.0", "options": { "luna": true, "autoMigrate": false } } ] @@ -198,13 +204,13 @@ The package vendors nothing from upstream. It depends on the installed `bd` CLI | Component | Expected range | Validated baseline | | --- | --- | --- | -| OpenCode (published beta.5) | `>=2.1.1 <2.2` | 2.1.1 (bounded accepted evidence) | -| OpenCode (unreleased source candidate) | `>=2.2.6 <2.3` | 2.2.6 (source target; host gate pending) | +| OpenCode (historical beta.5) | `>=2.1.1 <2.2` | 2.1.1 (bounded accepted evidence) | +| OpenCode (2.0.0) | `>=2.2.6 <2.3` | 2.2.6 (accepted native and genuine-model qualification) | | OpenCode (stable 1.0.2 historical) | 2.0.26 | 2.0.26 | | `bd` CLI | 1.3.1 through 1.x | 1.3.1 | | Bun (OpenCode host runtime) | >=1.3.14 | 1.4.2 | -Published beta.5 type-checks against `@opencode/plugin` 2.1.1 and declares an optional peer range of `>=2.1.1 <2.2`. This checkout's unreleased source candidate type-checks against 2.2.6 and declares `>=2.2.6 <2.3`; its source admission guard does not qualify that host range. Exact 2.1.1 has bounded accepted evidence for the published beta, and future 2.1 patches are admitted there as candidates rather than tested versions. The stable 1.0.2 qualification on 2.0.26 is historical. See the [OpenCode V2 contract](docs/opencode-sdk-contract.md). The `bd` baseline was reviewed against Beads v1.3.1 (commit `c1c4b642ac1c08d8c828007a1c2f96e47e43ef7c`). +Version 2.0.0 type-checks against `@opencode/plugin` 2.2.6 and declares optional peer range `>=2.2.6 <2.3`. Exact 2.2.6 has accepted bounded qualification; admission does not qualify future patches. Beta.5 remains historically scoped to `>=2.1.1 <2.2`, with exact 2.1.1 evidence. Stable 1.0.2 qualification on 2.0.26 is historical. See the [OpenCode V2 contract](docs/opencode-sdk-contract.md) and [current qualification](docs/opencode-22-qualification-5rj2.md). The `bd` baseline was reviewed against Beads v1.3.1 (commit `c1c4b642ac1c08d8c828007a1c2f96e47e43ef7c`). ## Troubleshooting diff --git a/docs/opencode-22-qualification-5rj2.md b/docs/opencode-22-qualification-5rj2.md index 1cd20bf..b0e8c04 100644 --- a/docs/opencode-22-qualification-5rj2.md +++ b/docs/opencode-22-qualification-5rj2.md @@ -34,7 +34,7 @@ Durable raw evidence and offline analyzers are under `/opt/data/research/opencod ## Limitations retained -- **Frozen README status:** `README.md:24` still says the candidate has not passed live host qualification, and its compatibility-table row at line 202 says `2.2.6 (source target; host gate pending)`. Those are frozen packed text, superseded by this summary for archive SHA-256 `072d9c29ef89fa2697109be072798e79cf4af622111266de40ef65e7950ac836`. Update both README statements and their `tests/docs.test.ts` compatibility-row assertion in the separately authorized 2.0.0 metadata change; do not mutate or silently repackage this qualified archive. +- **Historical frozen README status:** The qualified canary archive retains the old README statements at lines 24 and 202 saying qualification was pending; this summary supersedes them for digest `072d9c29ef89fa2697109be072798e79cf4af622111266de40ef65e7950ac836`. The separately tracked 2.0.0 metadata preparation reconciles the current README and its compatibility assertions. It does not mutate or silently repackage the original qualified archive. - **`opencode-beads-o66` remains unresolved and upstream-blocked.** After native compaction on A then switching to non-replayable B, old ordinary transcript commands can lack accessible saved snapshots. The controlled native run verified the selected outcome: explicit unavailable-guidance disclosure, expansion of accessible snapshots, and no invented historical instructions. This is a verified limitation, not restored old snapshots or a fixed deficiency. README and the active specification retain it. - Stop aborted the selected waiting operation and prevented its write, but the old host permission entry remained listed through session deletion. That stronger retirement observation remains failed historical evidence; no target execution, bypass or adapter repair requirement is inferred. The genuine run's final execution/permission inventories were empty. diff --git a/docs/opencode-sdk-contract.md b/docs/opencode-sdk-contract.md index a2a50de..29e6cb4 100644 --- a/docs/opencode-sdk-contract.md +++ b/docs/opencode-sdk-contract.md @@ -1,8 +1,8 @@ # OpenCode V2 Plugin Contract -## Unreleased source adaptation — OpenCode 2.2.6 +## 2.0.0 release candidate — OpenCode 2.2.6 -This local source candidate pins development types to `@opencode/plugin` `2.2.6`, declares optional peer range `@opencode/plugin` `>=2.2.6 <2.3`, and admits hosts in that range. Exact OpenCode 2.2.6 qualification is parent-accepted for archive SHA-256 `072d9c29ef89fa2697109be072798e79cf4af622111266de40ef65e7950ac836`; see [current qualification](opencode-22-qualification-5rj2.md). The `opencode-beads-o66` deficiency remains unresolved. Package version remains `1.1.0-beta.5`; the published beta.5 artifact retains its historical `>=2.1.1 <2.2` range. This source change is not a release or operator activation. +The 2.0.0 release candidate pins development types to `@opencode/plugin` `2.2.6`, declares optional peer range `@opencode/plugin` `>=2.2.6 <2.3`, and admits hosts in that range. Exact OpenCode 2.2.6 qualification is parent-accepted for archive SHA-256 `072d9c29ef89fa2697109be072798e79cf4af622111266de40ef65e7950ac836`; see [current qualification](opencode-22-qualification-5rj2.md). The `opencode-beads-o66` deficiency remains unresolved. The 2.0.0 candidate preserves the qualified runtime and packaged guidance; its version/README metadata produce a different archive from that qualified canary. The published beta.5 artifact retains its historical `>=2.1.1 <2.2` range. Preparation is not registry publication or operator activation. With the installed 2.2.6 SDK, OpenCode projects durable user records into `@opencode/ai` request `Message` values without their metadata while retaining message IDs. The candidate checks session location before calling the supported `ctx.session.context({ sessionID })` API, then matches each projected typed user-message ID to the durable `SessionMessageInfo` record. One request-local read builds the ID map; no snapshot cache or alternate message API is used. The current `ocBeadsWorkflow` snapshot takes precedence over legacy `ocBeadsSync`; workflow instructions and captured diagnostics are expanded only by the existing primary and compaction hooks. A failed or incomplete native read reports guidance unavailable and leaves ordinary input intact. Location, generation and cancellation are checked at the existing host boundary. @@ -166,7 +166,7 @@ Reviewed on 2026-10-11 for the narrow OpenCode boundary used by the published st ## Versions and sources - Historical stable 1.0.2 declarations used optional peer range `@opencode/plugin` `>=2.0.26 <3` and development dependency `2.0.26`. The only import is type-only (`import type { Plugin } from "@opencode/plugin"`), so packages install nothing from OpenCode and use the host's runtime. -- Published beta.5 declarations use optional peer range `@opencode/plugin` `>=2.1.1 <2.2` and development typing dependency `@opencode/plugin` `2.1.1`; exact 2.1.1 has bounded accepted evidence for that artifact. This checkout's unreleased source candidate uses `@opencode/plugin` `>=2.2.6 <2.3` and `2.2.6` for development typing only. Exact OpenCode 2.2.6 qualification is parent-accepted for archive SHA-256 `072d9c29ef89fa2697109be072798e79cf4af622111266de40ef65e7950ac836`; see [current qualification](opencode-22-qualification-5rj2.md). The `opencode-beads-o66` deficiency remains unresolved. +- Published beta.5 declarations use optional peer range `@opencode/plugin` `>=2.1.1 <2.2` and development typing dependency `@opencode/plugin` `2.1.1`; exact 2.1.1 has bounded accepted evidence for that artifact. This checkout's 2.0.0 release candidate uses `@opencode/plugin` `>=2.2.6 <2.3` and `2.2.6` for development typing only. Exact OpenCode 2.2.6 qualification is parent-accepted for archive SHA-256 `072d9c29ef89fa2697109be072798e79cf4af622111266de40ef65e7950ac836`; see [current qualification](opencode-22-qualification-5rj2.md). The `opencode-beads-o66` deficiency remains unresolved. - Authoritative sources: the installed `@opencode/plugin` 2.0.26 declarations, the [plugin guide](https://opencode.ai/v2/docs/build/plugins/), the [V1 migration guide](https://opencode.ai/v2/docs/build/plugins/migrate-v1/), [plugin configuration](https://opencode.ai/v2/docs/plugins/), the [skills reference](https://opencode.ai/v2/docs/skills/), the published OpenAPI document (`https://opencode.ai/v2/openapi.json`), and `@opencode/schema` 2.0.26 for event names. - Qualification: a throwaway V2 plugin (`opencode-beads-2zs.1`) and the actual source plugin were loaded into disposable projects on OpenCode 2.0.26. Results were read with `opencode debug agents`, a JSONL trace from the plugin, and short `opencode run` sessions. Test sessions were deleted afterwards. diff --git a/package.json b/package.json index da6d5e8..a7aa2b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@snarkipus/opencode-beads", - "version": "1.1.0-beta.5", + "version": "2.0.0", "type": "module", "description": "A maintained OpenCode V2 integration for the Beads issue tracker: bd prime context injection with a schema-migration guard, and a bounded task agent.", "author": "Matt Jackson", diff --git a/tests/docs.test.ts b/tests/docs.test.ts index 634922c..3e0edf6 100644 --- a/tests/docs.test.ts +++ b/tests/docs.test.ts @@ -102,7 +102,7 @@ describe("documentation contracts", () => { expect(troubleshooting).toContain("## Deletion and identifier migration"); }); - test("documents beta opt-in, normal public registration, stable opt-out and known Stop limits", () => { + test("documents stable 2.0 installation, historical pins and known Stop limits", () => { expect(readme).toContain(`${packageManifest.name}@next`); expect(readme).toContain(`${packageManifest.name}@latest`); expect(readme).toContain("normal public entrypoint enables the eleven qualified operations"); @@ -111,8 +111,8 @@ describe("documentation contracts", () => { expect(readme).not.toContain("Ordinary typed continuity execution remains withheld"); }); - test("presents the 1.x contract and credits the original project", () => { - expect(packageManifest.version).toMatch(/^1\.\d+\.\d+(?:-beta\.[1-9]\d*)?$/); + test("presents the stable 2.x contract and credits the original project", () => { + expect(packageManifest.version).toMatch(/^2\.\d+\.\d+$/); expect(readme).not.toContain("This plugin is intentionally small in scope"); expect(readme).not.toContain("limits its scope to bug fixes"); expect(readme).toContain("maintained OpenCode adapter"); @@ -144,7 +144,7 @@ describe("documentation contracts", () => { "bd init", "creates the canonical shared Beads skill", "`.agents/skills/beads`", - "The beta additionally owns its packaged `oc-beads` skill", + "The plugin additionally owns its packaged `oc-beads` skill", "does not write startup files", "Update the pin explicitly when upgrading", "**Do not run `bd setup opencode`.**", @@ -200,7 +200,7 @@ describe("documentation contracts", () => { } }); - test("keeps the compatibility record on the selected beta/next OpenCode baseline", () => { + test("keeps the compatibility record on the selected plugin 2.0 OpenCode baseline", () => { expect(sdkContract).toContain("# OpenCode V2 Plugin Contract"); expect(packageManifest.peerDependencies["@opencode/plugin"]).toBe(">=2.2.6 <2.3"); expect(packageManifest.peerDependenciesMeta["@opencode/plugin"]?.optional).toBeTrue(); @@ -214,8 +214,11 @@ describe("documentation contracts", () => { expect(sdkContract).toContain("[current qualification](opencode-22-qualification-5rj2.md)"); expect(sdkContract).not.toContain("The 2.2.6 runtime candidate has not been qualified"); expect(sdkContract).not.toContain("1.18."); - expect(readme).toContain("| OpenCode (published beta.5) | `>=2.1.1 <2.2` | 2.1.1 (bounded accepted evidence) |"); - expect(readme).toContain("| OpenCode (unreleased source candidate) | `>=2.2.6 <2.3` | 2.2.6 (source target; host gate pending) |"); + expect(readme).toContain("| OpenCode (historical beta.5) | `>=2.1.1 <2.2` | 2.1.1 (bounded accepted evidence) |"); + expect(readme).toContain(`| OpenCode (${packageManifest.version}) | \`>=2.2.6 <2.3\` | 2.2.6 (accepted native and genuine-model qualification) |`); + expect(readme).not.toContain("The candidate has not passed live host qualification"); + expect(readme).toContain("Upgrade OpenCode before changing the plugin pin"); + expect(readme).toContain("Existing exact 1.x and beta pins remain available"); expect(readme).toContain("after native conversation compaction on model A, switching to model B"); expect(readme).toContain("upstream issue #57424"); expect(readme).toContain("opencode-beads-o66"); diff --git a/tests/workflows.test.ts b/tests/workflows.test.ts index ec31372..57392d8 100644 --- a/tests/workflows.test.ts +++ b/tests/workflows.test.ts @@ -590,10 +590,10 @@ describe("packaged native workflows", () => { } }); - test("beta package manifest includes owned assets at the selected prerelease version", async () => { + test("stable 2.x package manifest includes the owned assets", async () => { const manifest = await Bun.file("package.json").json(); expect(manifest.files).toContain("assets/oc-beads"); - expect(manifest.version).toBe("1.1.0-beta.5"); + expect(manifest.version).toMatch(/^2\.\d+\.\d+$/); }); });