fix(drive): launch current V2 checkouts - #47
Closed
kitlangton wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
Superseded by #48, which includes the current V2 launch changes plus the packaged standalone-script runtime and final validation. |
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
Launch current OpenCode V2 development checkouts through OpenCode's native simulation frontend and backend. This supersedes #46 with the small launch adaptation that the current V2 architecture actually needs.
Before / After
Before: Detached
start --devlaunched the V2 TUI through its managed background-service path, so the TUI exited before Drive's UI endpoint became ready. Scripted runs also launched their managed service on V2's channel-wide default port, which collided with an existing local V2 service.After: Drive detects standalone-capable V2 checkouts and adds
--standaloneonly to the detached TUI command. Scripted runs keep separate service and TUI-client commands, with a private persisted port for the per-run managed service. Source-spawned server processes receive the Solid/browser Bun options they need, then sanitize them before tools or terminal commands inherit the environment.How
src/instance/dev.tsvalidates the current V2 entrypoint, uses the checkout's absolute Solid preload, and generates a tiny launcher that removes inherited Bun compilation options when the process becomes a server.src/instance/runtime.tsappends--standaloneonly for detached launch and persists an isolated scripted service port in the run's private V2 service configuration.Scope
This does not add a Drive-owned simulation bridge, rewrite OpenCode source files, replace providers, or duplicate OpenCode's JSON-RPC/runtime integration. Those responsibilities remain in OpenCode's existing
packages/simulationfrontend and backend.Testing
bun run release:validate(203 Effect/Vitest tests, 57 CLI integration tests, lint, typecheck, and pack dry run)opencode-drive@1.4.0tarball installed under/tmp/opencode drive packed consumer/tmp/opencode v2 checkout: ready, focused editor,Simulated Modelvisible,Connect a providerabsentFlow
sequenceDiagram participant Drive participant Service as V2 service participant TUI as V2 TUI participant Sim as OpenCode simulation alt detached Drive->>TUI: base source command + --standalone TUI->>Sim: native frontend/backend integration else scripted Drive->>Service: base source command + serve --service Note over Service: Private service-local.json supplies the port Service->>Sim: native backend integration Drive->>TUI: base source command TUI->>Service: discover isolated per-run service TUI->>Sim: native frontend integration end