opencode
opencode copied to clipboard
[FEATURE]: Plugin discovery should support subdirectories like agents and commands
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Description
The plugin discovery glob pattern uses {plugin,plugins}/*.{ts,js} which only finds plugins at the top level of the plugin directory. This is inconsistent with agents and commands which use ** for recursive discovery.
Current behavior: // config.ts line 299 const PLUGIN_GLOB = new Bun.Glob("{plugin,plugins}/*.{ts,js}") // Non-recursive
Agents/Commands behavior: const COMMAND_GLOB = new Bun.Glob("{command,commands}//*.md") // Recursive const AGENT_GLOB = new Bun.Glob("{agent,agents}//*.md") // Recursive