Skip to content

v2.0.2 - OpenCode v2 OAuth integration + API alignment

Choose a tag to compare

@github-actions github-actions released this 08 Oct 00:20
· 26 commits to main since this release

v2.0.2 - OpenCode v2 OAuth integration + API alignment

Fixes the OpenCode v2 authentication gap (issue #30) and aligns every v2 registration with the real @opencode/plugin 2.0.24 contracts.

Fixed

  • OAuth integration (#30): setupV2 now registers the google Antigravity OAuth method via ctx.integration.transform (id: antigravity-oauth). opencode auth login and the TUI connect flow now offer OAuth with Google (Antigravity) instead of only the core API-key method.
  • Multi-account pool: each successful authorization is persisted through persistAccountPool, appended/deduplicated into antigravity-accounts.json and picked up by the rotation engine. Connecting again adds the 4th, 5th, ... account.
  • Model catalog: removed the non-existent ModelEditor.add branch; models register through editor.update("google", modelID, draft => ...), which seeds Model.Info.default and adds the model under an available provider. Drafts set enabled, capabilities and map variants to the real Model.Variant shape { id, settings }.
  • Tools: ToolEditor.add no longer receives a bogus id (v2 derives it from name).
  • Slash commands: execute now delivers output via ctx.session.synthetic; previously a returned string was silently ignored.
  • Types: replaced the hand-rolled V2Context with typed local contracts mirroring @opencode/plugin@2.0.24 (no new runtime dependency).

Added

  • Regression test asserting the v2 OAuth method is registered.

Upgrade

opencode auth login   # pick "OAuth with Google (Antigravity)"

Restart OpenCode so the new plugin build is loaded. Existing antigravity-accounts.json accounts are preserved.

Full Changelog: v2.0.1...v2.0.2