Repository navigation
feat: support OpenCode V2 alongside V1 - #87
Conversation
Remove Connect another account and Choose account from /supabase. Those plugin-defined actions expanded the compatibility migration into an account-management feature without stakeholder review. Keep Continue with current account and confirmed Disconnect current account. OpenCode V2 already provides add, switch and rename in its native /connect integration UI; retain active-credential resolution, account-specific refresh and isolation safeguards. Document native dialog ownership and global account scope. Disconnect names the credential and warns when the host will activate another saved account; regressions cover cancellation, current-only removal and the two-action menu. Refs #87
Release plan — reference onlyUse the single active acceptance checklist. This is not a second set of tests. This older comment combined release policy, automated/synthetic evidence, test setup, Linux/Windows/V1 manual checks, and merge/release approvals. The newer walkthrough repeated the manual part. The audit carries across the nine maintainer-checked Windows steps: install/login, plugin API calls, Continue, restart, cancellation, disconnect, disconnected rejection, and reconnect. Four formerly open Windows summary items and registry identity are now recorded complete below. Windows refresh remains open. The original five source/CI/synthetic/documentation checks stay complete at their named source; they do not need manual repetition. The diagnostic publication actually used the separately approved beta route, not the original Outstanding work now appears only as R1–R5 in the active comment. Full Linux V2 acceptance, the preserved-profile upgrade, the focused live V1 check, configuration isolation, final-head CI, and explicit approvals remain required. Windows V2 CI, scheduled canaries, and automated callback/config-isolation checks remain deferred hardening, not extra manual gates. Audited original plan — historical detail, not another checkbox listCandidate references in this original plan describe its earlier snapshot. Use the active checklist's frozen package for remaining acceptance. Items below use status labels rather than duplicate editable checkboxes. Release-readiness checklist — acceptance before mergeCandidate source: If the candidate changes, record its new commit/package identity and rerun affected checks. Results from another artifact must remain explicitly attributed to that artifact. Agreed scopeV1 keeps its existing login/storage/dialog flow. V2 uses native integration credentials and OpenCode's selection component, with plugin-defined Continue with current account and Disconnect current account actions. Do not add a plugin-owned add/switch/rename UI. Advanced account management stays in V2's native The V2 active credential is profile-global, not repository-specific. Disconnect removes a local credential without revoking Supabase authorization; another saved connection can become active. V1 credentials are not imported into V2, and rollback does not copy V2 credentials into V1 storage. Already established at
|
OpenCode 2 rejects the legacy-only server export and uses a different TUI and credential lifecycle. Expose both host hooks at the existing entrypoints and port /supabase to native V2 integration APIs. Resolve tools through the active host connection and refresh the supplied account instead of borrowing V1 project-local tokens. Scope OAuth cleanup to its attempt and Location; preserve V1 storage and real Zod schemas. Add required V2 packed-TUI CI coverage and document reconnect on upgrade. Lint, typecheck, 213 tests and package checks pass. The same tarball passes /supabase render checks twice on V1 1.17.14 and V2 2.0.27. Real-account browser authorization remains unchecked. Builds on Rafael Santos (@rafaelsnv) and the initial migration in PR #79: #79 Refs #79
Replace the native picker row "Continue Use Supabase" with "Continue with current account". The old description used the first stored credential, which need not be the active account. Keep Continue on the existing account and cover the label and absence of credential activation in the TUI regression test.
Remove Connect another account and Choose account from /supabase. Those plugin-defined actions expanded the compatibility migration into an account-management feature without stakeholder review. Keep Continue with current account and confirmed Disconnect current account. OpenCode V2 already provides add, switch and rename in its native /connect integration UI; retain active-credential resolution, account-specific refresh and isolation safeguards. Document native dialog ownership and global account scope. Disconnect names the credential and warns when the host will activate another saved account; regressions cover cancellation, current-only removal and the two-action menu. Refs #87
Store the V2 onboarding message as synthetic context, not a paused user prompt. OpenCode counts prompts admitted with resume=false as pending work, which left the session tab busy and delayed input after account continuation. Retain the one-time onboarding notice without scheduling an assistant turn; use the session synthetic API with resume=false.
Acceptance checklist — one active listWindows installation, OAuth, plugin API access, Continue, restart, and disconnect/reconnect are complete. Do not repeat them. Only Windows refresh remains. The nine checked steps below are maintainer-reported results for the package identified here. The earlier release checklist duplicated this walkthrough. It is now reference only. Completed automated and synthetic checks are not extra manual work. Remaining manual work
Coordinator / maintainer gate — not another manual test suite
GitHub currently reports PR head Stable release is separate: after feature merge, review the Changesets release PR, combined changesets, and any candidate differences. Obtain explicit approval before stable publication. Neither these checkboxes nor the diagnostic beta authorize a merge or stable release. Candidate identity and safe test rulesThe downloaded tarball matches the publish log's SHA-1 Keep normal, preserved-upgrade, Windows V2, disposable Linux V2, and V1 profiles separate. Never wipe the preserved profile. Use fresh chats: old chats can retain the previous build's queued onboarding item. Do not reconnect while waiting for a refresh test. Use only registered Supabase plugin tools for API evidence. Direct shell/curl requests and credential-file reads do not prove plugin access. Never post tokens, JWTs, authorization URLs/codes, credential databases, raw credential exports, or raw logs/transcripts. For failures, record platform, package/host version, step, exact error, and a cropped sanitized screenshot. Do other isolated-profile work while tokens expire. Start each natural-expiry wait early; do not change either system clock. R2 expected results — one Linux V2 run, not separate test suites
Completed evidence — no repeat neededAutomated / synthetic baseline at
|
3324f53 to
008c8d7
Compare
Summary
Builds on Rafael Santos (@rafaelsnv) and his initial V2 migration in PR #79. Thanks for starting the migration. This maintainer follow-up completes the dual-host entrypoints, native V2 credential lifecycle and
/supabaseport; it does not merge #79 as-is./connectmanages service integrations, including Supabase, not only model providers.2.0.27to required packed-TUI CI, correct thepluginsconfig key, prune V2's npm cache before diagnostic uploads, and document install/migration behavior with a minor changeset.Evidence
94edb4c) installs on OpenCode2.0.27, but two isolated TUI runs select the legacysrc/server/index.tsexport and reject it withPlugin must export a default definition with an id and an effect or setup function./supabasenever registers.After: the current implementation tarball loads and renders
/supabaseconfirmation plus the pending-browser dialog on V11.17.14and V22.0.27. Both use the same artifact (SHA-2562384c64bd9e155cf48b48934304859b883e42fa2c8e08f2a99935e1dc6c4b312). The V2 check disables ancestor project-config discovery and uses fresh HOME/XDG directories.3324f53:bun run lint,bun run typecheck,bun run test(214 pass, 0 fail), andbun run verify:packpass./connectlists Supabase, shows its account manager, and opens the existing rename input. No live credentials or provider API calls are used by this check.4df7906:opencode-supabase@0.6.0-pr87.20261014t072939z.sha.g4df7906cef32underpr87matches its prepared tarball byte-for-byte and passes V11.17.14/ V22.0.27TUI smoke. User reports successful browser OAuth, organization/project calls through plugin tools, restart persistence without another login, and another successful login. This snapshot still contains the earlier four-action menu; it is not the current narrowed UI.latestandbetaremain unchanged.All CI checks for current head pass: build/source checks, changeset, the same packed artifact across V1
1.17.4, V11.17.14, and V22.0.27, Windows V1 install smoke, and the requiredcoreaggregate.Still unchecked: live token refresh, live-account disconnect, Windows V2 behavior, and registry installation of the narrowed
3324f53UI. Synthetic disconnect checks are not live OAuth lifecycle evidence. No stable release accompanies this PR.Merge Danger
Door: two-way
Code can be reverted. V2 credentials live in the native host integration store by design; this is not a requirement for all V2 plugins. V1 project-local credentials are not imported automatically. Users must reconnect on V2. A rollback does not copy native V2 credentials into the V1 local store.
Blast Radius: integration
Both server and TUI entrypoints, OAuth lifecycle and host dependencies change. The active Supabase account is shared by projects using the same OpenCode profile, not bound to a repository. Disconnect removes only the named current credential and does not revoke Supabase authorization; OpenCode activates another saved account if one exists, and the confirmation warns about this. Removing our chooser does not disable native multi-account management or change credential scope.
Complete the remaining live lifecycle checks and final review before stable-release approval.
Refs #79.