Repository navigation
Conversation
The config and TUI layers install @opencode-ai/plugin into every config directory using the binary version. Builds whose version is not published to npm (forks and custom builds) fail that install on every start, and local tools in .opencode/tool then cannot resolve their import. Add an optional OPENCODE_PLUGIN_VERSION build define. When it is set, the dependency install uses it; when it is not, the plugin version follows the binary version, so default builds behave exactly as before.
This branch has not been deployed
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.
Issue for this PR
Closes #37806
Same failure as #30197, #30908, #37024 and #31708.
Type of change
What does this PR do?
The config and TUI layers install
@opencode-ai/plugininto every config directory, using the binary version as the package version. When that version is not published to npm, the install fails on every start (No matching version found for @opencode-ai/plugin@<version>). The linked issues hit this withlocal; forks and custom builds hit it with their own version numbers. Local tools in.opencode/toolthen cannot resolve their import, and prompts fail.This adds an optional
OPENCODE_PLUGIN_VERSIONbuild define. When it is set, the dependency install uses it. When it is not set,InstallationPluginVersionfalls back toInstallationVersion, so default builds behave exactly as before.How did you verify your code works?
bun typecheckinpackages/opencodeandpackages/core.bun test test/installation/installation.test.ts test/config/config.test.ts test/config/tui.test.tsinpackages/opencode, including a new test for the fallback.OPENCODE_PLUGIN_VERSIONset to a published plugin version: the background install succeeded and.opencode/toolloaded. Before the change the same build loggedNpmInstallFailedErroron every start.Screenshots / recordings
Not a UI change.
Checklist