Feature 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.
Feature hasn't been suggested before.
Describe the enhancement you want to request
A local plugin declared in
opencode.jsonccan point at a directory (one that holds apackage.jsonor anindex.*) and it resolves fine. But the zero-configplugins/(andplugin/) 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 apackage.jsonor 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 ownsrc/ornode_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.