Repository navigation
Port provider registration to the OpenCode 2.0.22 plugin API - #7
Closed
HendrikPetertje wants to merge 2 commits into
Closed
HendrikPetertje wants to merge 2 commits into
HendrikPetertje wants to merge 2 commits into
Conversation
OpenCode 2.0.22 removed context.catalog, so plugin setup crashed with "undefined is not an object (evaluating 'context.catalog.transform')". - Register Kiro models through context.provider.transform/reload. Rich entries are intersected with the runtime list as before; otherwise the provider is added (or its models replaced) with only the models the runtime returns. - Move the dev and peer dependency from @opencode-ai/[email protected] to @opencode/[email protected], and bump @opentui/solid to 0.5.14 to meet its peer floor. - Update the test mocks to the ProviderEditor shape, and update the pin tables in README, docs/COMPATIBILITY and the beta.5 CHANGELOG section.
npm 12 prints an object keyed by package name instead of an array of manifests, which made the packed-tarball tests crash with "object is not iterable". Parse both shapes through a shared helper.
3 of 6 tasks
Author
|
Just pulled your beta 7 down. it looks like you've managed to migrate the details that needed migrating to opencode v2 yourself. fantastic! |
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.
Linked issue
I didn't open an issue, just this PR.
Type of change
What does this PR do?
OpenCode 2.0.22 removed context.catalog, so plugin setup crashed every time i open opencode v2.022. the error i got in the toast was:
what this change does it that it registers models through context.provider.transform/reload
Then it bumps the peer dep on opencode-ai(plugin from the dev version to the now released 2.0.22 version.
Test mocks are updated. same with docs.
How did you verify it?
npm testpassesManual check (describe below)
Removed the beta 5 plugin from opencode plugins
Cloned a copy of my fork (that didn't have deps installed and all that) to .config/opencode/plugins/opencode-kiro
Ran a fresh npm ci && npm run build on that dir
Opened opencode, noticed that the error was gone and i was once again able to start new chats with my various Kiro models through kiro ACP.
Checklist
npm testpassesnpm run typecheckpasses