fix(drive): support live current OpenCode checkouts - #46
Closed
kitlangton wants to merge 2 commits into
Closed
Conversation
Contributor
Author
|
Closing this in favor of a smaller replacement. Current OpenCode already owns the Drive frontend/backend under packages/simulation; this PR duplicated that runtime and its source-rewrite hook did not run against the V2 revision used by the successful smoke test. The replacement will keep only the V2 standalone launch adaptation and validate the real native simulation path end to end. |
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.
What
Restore live
--devcompatibility with current OpenCode checkouts. Drive now provides the simulated model through the current provider contract, bridges the current TUI plugin host and transport, and launches V2 checkouts through their isolated standalone server path.Before / After
Before: Starting Drive against a current OpenCode checkout produced an empty provider list. The TUI opened
Connect a provider, Drive never reached readiness, andstarttimed out. V2 checkouts also respawned a managed Bun service without Drive's Solid preloads, causing the child process to exit while compiling TSX.After: Drive waits for the simulated provider, supplies the current provider and legacy bootstrap surfaces, and exposes UI/LLM control over its bridge. Checkouts with V2 standalone support use a private in-process server; managed-service checkouts inherit the required Bun preloads.
How
packages/drive/src/instance/default-config.jsoncuses the current provider API shape.packages/drive/src/instance/dev-integration.tsprovides the UI WebSocket bridge and OpenAI-compatible streaming simulation transport.packages/drive/src/instance/dev-preload.tsinstalls the bridge at the current TUI plugin-host seams.packages/drive/src/instance/dev.tsprepares absolute inheritable preloads and selects--standalonewhen the checkout supports it.packages/drive/src/instance/runtime.tspropagates dev preloads throughBUN_OPTIONSso child Bun processes retain them.Scope
This currently restores detached live
start --devusage only. Scripted--devis not release-ready: the V2 path still needs a separate service launch boundary and current service-discovery client compatibility. Normal installedopencode2launches and OpenCode provider behavior are unchanged.Testing
bun run release:validateorigin/v2at3c259fc552: Drive reached ready,Simulated Modelloaded withoutConnect a provider,ui.statereturned the focused editor, andCtrl-P, typing, and Enter commands executed1e17856ba4passedFlow