You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: plugins/ folder only auto-discovers flat files, not plugin directories #33389
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
A local plugin declared in opencode.jsonc can point at a directory (one that holds a package.json or an index.*) and it resolves fine. But the zero-config plugins/ (and plugin/) folder convention only scans {plugin,plugins}/*.{ts,js}, so a plugin shipped as a directory is silently never discovered. You are forced to list it explicitly in config, even though the directory-resolution machinery already exists.
Proposed approach: in the plugins/ scan, also match immediate subdirectories that contain a package.json or an index file, and hand the directory to the same entrypoint resolver that config-declared directory plugins already use. Keeping it to a single level means a package's own src/ or node_modules/ are never mistaken for plugins.
Benefit: removes a surprising inconsistency between explicit-config and folder-convention plugins, and lets you drop a real plugin package into plugins/ with no config at all.
Activity