Skip to content

fix(plugin): align OpenCode plugin SDK version and pin quota plugin#242

Merged
kyaulabs-bot merged 3 commits into
developfrom
fix/kyau-4aa4-plugin-sdk-version-parity
Jul 23, 2026
Merged

fix(plugin): align OpenCode plugin SDK version and pin quota plugin#242
kyaulabs-bot merged 3 commits into
developfrom
fix/kyau-4aa4-plugin-sdk-version-parity

Conversation

@kyaulabs-bot

@kyaulabs-bot kyaulabs-bot commented Jul 23, 2026

Copy link
Copy Markdown
Member

📋 Summary

Three commits that together eliminate a @opencode-ai/plugin SDK version skew between root package.json (1.17.15) and .opencode/package.json (1.18.4), pin the previously unpinned @slkiser/opencode-quota plugin to prevent supply-chain drift, and clean up dead config left over from the original quota-plugin integration.

📦 Changes by Phase

Phase A — SDK version parity guard + alignment

  • Modified: .github/scripts/validate-harness.sh — added check_sdk_version_parity() with get_sdk_version() helper, produces ERROR on mismatch, OK on alignment, skip if neither manifest declares the SDK
  • Modified: package.json@opencode-ai/plugin bumped 1.17.151.18.4
  • Modified: package-lock.json — regenerated via npm install
  • Tests: tests/Shell/validate-harness_test.sh — added Test 39 (mismatch → ERROR) and Test 40 (match → PASS)

Phase B — Pin quota plugin

  • Modified: .opencode/package.json — added "@slkiser/opencode-quota": "4.0.1" (exact version, no range)
  • Modified: .opencode/package-lock.json — regenerated via npm install
  • New: tests/Shell/plugin_supply_chain_test.sh — Test 1 (exact version pinned), Test 2 (lockfile contains it)

Phase C — Config cleanup

  • Modified: tui.jsonc — removed duplicate "plugin" key (already declared in opencode.jsonc)
  • Modified: opencode-quota/quota-toast.jsonmaintainerAnnouncements.enabled: truefalse
  • Tests: tests/Shell/plugin_supply_chain_test.sh — extended with Test 3 (no plugin key in tui.jsonc), Test 4 (announcements disabled)

📜 ADRs

None new, amended, or superseded by this change.

✅ Verification

Gate Result
validate-harness_test.sh 46 passed, 0 failed (incl. Tests 39–40)
plugin_supply_chain_test.sh 4 passed, 0 failed (all new)
npm run test:plugin 12 suites, 64 pass, 0 fail (SDK 1.18.4 compatible)
validate-harness.sh (real repo) PASSED — SDK version aligned: @opencode-ai/plugin@1.18.4 in both manifests
@code-review 5/5 AC covered, SAST 0 findings, 1 deferred (duplicated JSON-read pattern)

🏗️ Architect Conditions (if applicable)

Not required per the pipeline — no cross-cutting ADR conditions were flagged by @from-issue at triage time.

📝 Commits (3 total)

Atomic, conventional-commits-formatted, signed. Not yet pushed.

Hash Subject
5b9fb89 fix(plugin): align @opencode-ai/plugin SDK version across manifests
0f16624 fix(plugin): pin @slkiser/opencode-quota with exact version
6143921 fix(config): remove dead tui.jsonc plugin key, disable maintainer announcements

🧪 Test Plan

For reviewer verification:

  • bash tests/Shell/validate-harness_test.sh — verify 46 passed, 0 failed
  • bash tests/Shell/plugin_supply_chain_test.sh — verify 4 passed, 0 failed
  • npm run test:plugin — verify all 64 tests pass against SDK 1.18.4
  • bash .github/scripts/validate-harness.sh — verify OK on SDK version parity line
  • grep '@opencode-ai/plugin' package.json .opencode/package.json — both show 1.18.4

kyau added 3 commits July 22, 2026 21:19
Root package.json pinned 1.17.15 while .opencode/package.json pinned
1.18.4, causing compile-time hook-name guards to type-check against
the wrong SDK. Aligned both to 1.18.4 and added a permanent parity
check to validate-harness.sh.

Fixes: #185
Authored-by: glm-5.2
Tested-by: deepseek-v4-pro
Signed-off-by: kyau <git@kyaulabs.com>
The quota plugin was referenced unpinned in opencode.jsonc, letting
the runtime resolve the latest from npm on every startup. Pinned it
as an exact-version dependency in .opencode/package.json.

Refs: #185
Authored-by: glm-5.2
Tested-by: deepseek-v4-pro
Signed-off-by: kyau <git@kyaulabs.com>
…ouncements

The quota plugin was declared in both opencode.jsonc and tui.jsonc;
the tui.jsonc entry is a dead duplicate. Removed it. Disabled
maintainerAnnouncements.enabled in quota-toast.json.

Fixes: #185
Authored-by: glm-5.2
Tested-by: deepseek-v4-pro
Signed-off-by: kyau <git@kyaulabs.com>

@kyau kyau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️ Approved by: @kyau

@kyaulabs-bot
kyaulabs-bot merged commit 8700b78 into develop Jul 23, 2026
6 checks passed
@kyaulabs-bot
kyaulabs-bot deleted the fix/kyau-4aa4-plugin-sdk-version-parity branch July 23, 2026 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants