opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat(plugin): use SDK v2

Open eXamadeus opened this issue 17 hours ago • 2 comments

What does this PR do?

Fixes #7641.

While investigating this for my own plugin, I arrived at a similar direction as #7639. I'm wasn't sure why several of the changes in that PR were made, and it also introduces breaking changes for plugin developers. So I decided to roll a new PR out.

This PR takes a different approach with a minimal set of updates to enable the plugin system to use the v2 client. It also exposes the v2 client as clientNext via PluginInput.

[!IMPORTANT] Providing two clients avoids the backwards-compatibility issue. Keeping the original client intact allows clientNext to adopt SDK v2 without forcing developers to migrate immediately. Plugin authors can move at their own pace, and we can defer any breaking changes until the next major release.

How did you verify your code works?

  • Type checks
  • Local testing with my plugins

eXamadeus avatar Jan 14 '26 06:01 eXamadeus