Conversation
Guard retry callbacks across unsubscribe and resubscribe, and recheck the TUI route while draining queued events. Add regressions for both scheduler races identified during review.
Keep the native Plugin.Definition contract as a type-only import so a plugin-manager checkout can load directly in OpenCode. Verify the entrypoint in a clean temporary directory with package installation disabled.
Resolve an unset buffer-local autoread option through its global value while preserving explicit buffer overrides. Cover both inheritance directions and verify settlement and reconnect reloads inside the native TUI.
Document external server connections, writable CLI bridge registration, native event hooks, and review delivery. Include migration steps and validation coverage for the v2 port.
krmcbride
force-pushed
the
feat/opencode-v2
branch
from
September 15, 2026 00:46
fd8c6fc to
90d1436
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Port the plugin to native OpenCode v2 while preserving the external-server workflow: Neovim opens a TUI in Snacks and connects to a separately managed server, which can run inside a third-party sandbox. The v2 CLI, plugin SDK, HTTP API, and event envelopes replace the v1 contracts.
Changes
--server, positional directory, and new/continue/explicit-session behavior. Load the native TUI bridge directly from a plugin checkout without installing development dependencies.autoreadsettings while preserving dirty buffers.Compatibility and migration
This is a breaking, v2-only migration. V1 users should pin
aa2a146. Register the repository's absolute path in writable v2cli.json, and provide the backend password in Neovim's environment.The migration guide covers client registration, authentication, custom event hooks, and an upgrade checklist. Update bridge registration and any custom event hooks when upgrading. Server installation and service management remain external to the plugin.
Validation
nix develop --command bun run typecheck— passed against the published v2 SDK.nix develop --command bun run test— 8 Bun tests and 15 headless Lua tests passed. The Lua suite also passed with Neovim 0.12.4, alongside the dev shell's 0.11.5.nix develop --command stylua --check lua plugin testsand diff whitespace checks — passed.node_modulesloaded successfully.Permission/form interactive UI flows and remote workspace runtimes have fixture/source coverage only. Runtime testing used 2.0.1; the relevant contracts were also checked against upstream v2 source at
195158c3.The commits separate the TUI port, backend/review port, regression fixes, and migration documentation for review.