Conversation
…gin discovery - Remove npm global prefix lookup (execSync npm config get prefix) - Add user config directory: ~/.config/opencode/node_modules/ - Plugin discovery now searches: user config -> local (last wins) - Remove unused execSync import
The isUnified field was never set on plugin descriptors. Singlerepo plugins have content directories in package root, monorepo plugins have them in .opencode/ subdirectory. Now correctly uses descriptor.type to determine the source directory path.
When running from the OpenCode user config directory (~/.config/opencode), plugins are now linked directly there instead of to a .opencode subdirectory. Changes: - Add isUserConfigDir() helper to detect user config directory - Update resolveTargetDir() to return 'user-config' source - Skip opencode.json creation in user-config dir (uses config.json) - Skip duplicate scan in discoverPlugins() when targetDir is user-config
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.
Summary
~/.config/opencode/node_modules/)~/.config/opencodewhen running from user config directoryChanges
~/.config/opencode/node_modules/instead of npm global prefix~/.config/opencode, links directly there (no.opencodesubdirectory)descriptor.type === 'singlerepo'instead of non-existentisUnifiedfieldSee CHANGELOG.md for details.