Skip to content

fix: migrate core plugins to OpenCode V2 - #108

Merged
striderZA merged 3 commits into
masterfrom
fix/issue-107-opencode-v2-plugins
Oct 6, 2026
Merged

striderZA merged 3 commits into
masterfrom
fix/issue-107-opencode-v2-plugins

Conversation

@striderZA

Copy link
Copy Markdown
Owner

Summary

  • Port CCGSHooks, DriftDetector, and ChangelogGenerator to the OpenCode V2 id/setup(ctx) plugin contract and V2 hook payloads.
  • Scope event handling to the plugin project, using envelope/nested location or session.get() when location is omitted.
  • Register all three entrypoints under the V2 plugins config key and update core-module copies and plugin documentation.
  • Report asset validation failures through the completed tool result instead of throwing from execute.after.

Verification

  • node --import tsx --test .opencode/plugins/tests/test-plugin-v2.mjs — 18 passed.
  • Bun import check — all six runtime/module plugin exports expose V2 IDs and setup functions.
  • git diff --check — clean.

Compatibility and limitations

  • V2-only migration, as approved; these plugin implementations no longer support OpenCode 1.x.
  • The exact OpenCode 2.0.23 CLI was not available locally (installed CLI is 1.14.33). The migration was checked against the 2.0.23 SDK/schema and tested with Bun.

@striderZA striderZA linked an issue Oct 6, 2026 that may be closed by this pull request
@Ghostbird

Copy link
Copy Markdown

Solves the issue on my machine. Thanks for the quick reaction!

@striderZA

Copy link
Copy Markdown
Owner Author

Solves the issue on my machine. Thanks for the quick reaction!

Some additional fixes incoming.

@striderZA
striderZA merged commit e4540a7 into master Oct 6, 2026
5 checks passed
@striderZA striderZA mentioned this pull request Oct 6, 2026
striderZA added a commit that referenced this pull request Oct 6, 2026
## Summary
- Add v0.13.1 changelog entry (OpenCode V2 plugin migration #106 #107
#108)

## Verification
- Full suite green (177/177) on merged master prior to this
changelog-only commit
- Changelog follows Keep a Changelog format per existing entries
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.

Plugins don't work with OpenCode v2 API

2 participants