Summary
OpenCode 2.0 (the beta installed as opencode2) uses a new plugin API, and this plugin is currently V1-only. It fails to load on V2.
Symptom (V2 server log)
failed to load plugin target=@sunerpy/opencode-kiro-auth
cause=SchemaError(Missing key at ["default"]["effect"] / ["default"]["setup"])
The package (latest v0.20.6) depends on @opencode-ai/plugin@^1.15.11 (V1 API). Per the V2 migration guide: "V1 plugins will not work in V2."
What changed in V2
- Config field
plugin → plugins (the V1 entry is auto-translated, so no config change needed).
- Plugins must export a default object from
Plugin.define({ id, setup }) using @opencode-ai/plugin (beta / /v2 entrypoints).
- The plugin context is now an OpenCode server client; transforms live on
ctx.agent, ctx.catalog.provider, ctx.catalog.model, ctx.integration, ctx.session, etc. Full reference: https://opencode.ai/v2/docs/build/plugins
Request
Port the plugin to the V2 plugin API and publish a V2-compatible release, or at least add a V2 entrypoint/branch. I'm happy to test against opencode2 (currently 0.0.0-next-17444) once a build is available.
Environment: macOS arm64, opencode v1.18.18 (works) + opencode2 V2 beta (broken).
Summary
OpenCode 2.0 (the beta installed as
opencode2) uses a new plugin API, and this plugin is currently V1-only. It fails to load on V2.Symptom (V2 server log)
The package (latest v0.20.6) depends on
@opencode-ai/plugin@^1.15.11(V1 API). Per the V2 migration guide: "V1 plugins will not work in V2."What changed in V2
plugin→plugins(the V1 entry is auto-translated, so no config change needed).Plugin.define({ id, setup })using@opencode-ai/plugin(beta //v2entrypoints).ctx.agent,ctx.catalog.provider,ctx.catalog.model,ctx.integration,ctx.session, etc. Full reference: https://opencode.ai/v2/docs/build/pluginsRequest
Port the plugin to the V2 plugin API and publish a V2-compatible release, or at least add a V2 entrypoint/branch. I'm happy to test against
opencode2(currently0.0.0-next-17444) once a build is available.Environment: macOS arm64,
opencodev1.18.18 (works) +opencode2V2 beta (broken).