Skip to content

fix(plugin): detect symlinked monorepo sub-plugins in discoverPlugins#487

Merged
jackwener merged 2 commits intojackwener:mainfrom
ByteYue:fix/plugin-symlink-discovery
Mar 27, 2026
Merged

fix(plugin): detect symlinked monorepo sub-plugins in discoverPlugins#487
jackwener merged 2 commits intojackwener:mainfrom
ByteYue:fix/plugin-symlink-discovery

Conversation

@ByteYue
Copy link
Copy Markdown
Collaborator

@ByteYue ByteYue commented Mar 27, 2026

Problem

discoverPlugins() uses entry.isDirectory() to filter plugin directories, but monorepo sub-plugins are installed as symlinks pointing into ~/.opencli/monorepos/. On most Node.js versions, isDirectory() returns false for symlinks, causing monorepo plugin commands to be silently skipped during discovery.

Fix

Add entry.isSymbolicLink() check so symlinked plugin directories are properly discovered and their commands registered.

Testing

All 337 unit tests pass.

ByteYue and others added 2 commits March 27, 2026 14:07
discoverPlugins() used entry.isDirectory() to filter plugin directories,
but monorepo sub-plugins are installed as symlinks pointing into
~/.opencli/monorepos/. On most Node.js versions, isDirectory() returns
false for symlinks, causing monorepo plugin commands to be silently
skipped during discovery.

Add entry.isSymbolicLink() check so symlinked plugin directories are
properly discovered and their commands registered.
@jackwener jackwener force-pushed the fix/plugin-symlink-discovery branch from 3ba77e9 to caefcb0 Compare March 27, 2026 06:10
@jackwener
Copy link
Copy Markdown
Owner

Thanks for the contribution! I pushed a small follow-up fix to keep symlinked monorepo plugins discoverable without letting broken symlinks turn startup into a failure. The overall discovery direction here is solid.

@jackwener jackwener merged commit 5e2e1df into jackwener:main Mar 27, 2026
23 checks passed
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.

2 participants