Skip to content

V2 plugin support (OpenCode 2.x) #618

Description

@spectralis

Problem

On OpenCode v2.0.5 the plugin fails to load:

Plugin must export a default definition with an id and an effect or setup function. (cause: SchemaError(Expected object at ["default"]))

Cause

The package is V1-only (latest 3.1.15 depends on @opencode-ai/sdk ^1.4.3, no Plugin.define / @opencode/plugin entrypoint). V2 does not run V1 plugin implementations (https://opencode.ai/v2/docs/build/plugins/migrate-v1).

Request

Ship a V2 entrypoint (a default export built with Plugin.define({ id, setup }), ideally keeping the V1 implementation alongside for backwards compat, as the migration guide describes). Happy to test a prerelease against OpenCode 2.0.5.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    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