[PR #8380] feat(plugin): use SDK v2 #12720

Closed
opened 2026-02-16 18:17:37 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/8380

State: closed
Merged: No


What does this PR do?

Fixes #7641

While investigating this for my own plugin, I arrived at a similar direction as #7639 but wanted to avoid the breaking changes. This PR avoids breaking by exposing the v2 client as clientNext alongside the "v1" client.

Note

@aryasaatvik has closed #7639 in favor of working together on this one. Thanks for the help!

Providing two clients avoids the backwards-compatibility issue completely. Keeping the original client intact allows plugin authors to adopt SDK v2 without forcing immediate migration. Plugin authors can move at their own pace, and we can defer any breaking changes until the next major release.

Important

This is not a breaking change. That said, we likely wouldn't want a clientNext and client forever. I would be glad to help plan out a full migration down the road, assuming this gets merged.

How did you verify your code works?

  • Type checks
  • I maintain a plugin built using this fork
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8380 **State:** closed **Merged:** No --- ### What does this PR do? Fixes #7641 While investigating this for my own plugin, I arrived at a similar direction as #7639 but wanted to avoid the breaking changes. This PR avoids breaking by exposing the `v2` client as `clientNext` alongside the "v1" `client`. > [!NOTE] > _**@aryasaatvik has closed #7639 in favor of working together on this one. Thanks for the help!**_ Providing two clients avoids the backwards-compatibility issue completely. Keeping the original `client` intact allows plugin authors to adopt SDK v2 without forcing immediate migration. Plugin authors can move at their own pace, and we can defer any breaking changes until the next major release. > [!IMPORTANT] > This is **not** a breaking change. That said, we likely wouldn't want a `clientNext` and `client` forever. I would be glad to help plan out a full migration down the road, assuming this gets merged. ### How did you verify your code works? - Type checks - I maintain a plugin built using this fork
yindo added the pull-request label 2026-02-16 18:17:37 -05:00
yindo closed this issue 2026-02-16 18:17:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12720