Skip to content

feat: v0.1.0 - User config directory support and singlerepo plugin fix#1

Merged
wagnert merged 4 commits intomainfrom
develop
Mar 4, 2026
Merged

feat: v0.1.0 - User config directory support and singlerepo plugin fix#1
wagnert merged 4 commits intomainfrom
develop

Conversation

@wagnert
Copy link
Copy Markdown
Member

@wagnert wagnert commented Mar 4, 2026

Summary

  • User config directory support (~/.config/opencode/node_modules/)
  • Direct linking to ~/.config/opencode when running from user config directory
  • Fix singlerepo plugin source directory detection

Changes

  • Plugin discovery: Now searches ~/.config/opencode/node_modules/ instead of npm global prefix
  • User config support: When running from ~/.config/opencode, links directly there (no .opencode subdirectory)
  • Singlerepo fix: Use descriptor.type === 'singlerepo' instead of non-existent isUnified field

See CHANGELOG.md for details.

wagnert added 4 commits March 4, 2026 16:50
…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
@wagnert wagnert merged commit 4568699 into main Mar 4, 2026
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.

1 participant