Repository navigation
Support OpenCode 2 (0.2.0) - #1
Merged
Merged
Conversation
OpenCode 2 does not run OpenCode 1 plugins. Default-export one object with an OpenCode 2 setup(), which registers the mrscraper MCP server and the four skills through MCP and skill transforms, and an OpenCode 1 server(), which keeps the existing config hook. A user-defined mrscraper server or same-named skill is kept in both. Tested with packed tarballs in clean profiles: OpenCode 2.0.26, 1.19.0, and 1.18.29 each show mrscraper as needs authentication and load the four skills; with the README API-key configuration each shows connected.
Collaborator
|
lgtm |
pray-mrscraper
self-requested a review
October 12, 2026 02:13
pray-mrscraper
approved these changes
Oct 12, 2026
riandradiva18
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenCode 2 (released 2026-10-10 as
@opencode/cli) does not run OpenCode 1 plugins, so@mrscraper/opencode@0.1.0does nothing for users who upgrade.Changes
index.ts: one default export with an OpenCode 2setup()(registers themrscraperMCP server throughctx.mcp.transformand the four skills throughctx.skill.transform, parsingSKILL.mdthe way OpenCode 2 does) and an OpenCode 1server()(the existing config hook). This is the dual-version pattern from OpenCode's plugin docs ("Support V1"). A user-definedmrscraperserver or same-named skill is kept in both.@opencode/pluginis used for types only (Plugin.defineis an identity function).MrScraperPluginnamed export is removed.Verification
npm ci && npm run checkandnpm pack --dry-runfrom a clean checkout; skills identical tomrscraper-claude-plugin.mcp.list→mrscraperneeds_auth;skill.listincludes the four skills; with the README API-key config →✓ mrscraper connected(user entry kept). The API key must be in the background service's environment (opencode service restartfrom that shell) — verified.mcp list→⚠ mrscraper needs authentication;debug skilllists the four skills; with the API-key config →✓ mrscraper connected.