Skip to content

[FEATURE]: plugins/ folder only auto-discovers flat files, not plugin directories #33390

Closed as not planned

Description

@licat2023

Feature hasn't been suggested before.

  • 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

  1. github-actions commented on Jun 22, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of an existing issue. Please check:

  2. licat2023 commented on Jun 22, 2026

    @licat2023
    Author

    This issue might be a duplicate of an existing issue. Please check:

    Fixed

  3. github-actions commented on Aug 22, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions