electron: implement server env probe for in-process server#21196
Merged
Brendonovich merged 4 commits intobrendan/electron-remove-clifrom Apr 7, 2026
Merged
electron: implement server env probe for in-process server#21196Brendonovich merged 4 commits intobrendan/electron-remove-clifrom
Brendonovich merged 4 commits intobrendan/electron-remove-clifrom
Conversation
Brendonovich
added a commit
that referenced
this pull request
Apr 7, 2026
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.
Adapts the existing env probe logic to work with the in-process server by 1. Dynamic importing the server so that top-level envs aren't resolved until the probe is done, 2. Providing the same default envs that were passed to the CLI (OPENCODE_CLIENT, XDG_STATE_HOME, etc), and 3. Patching the server auth handler to allow providing a
tokenquery param instead of just relying onAuthorizationheaders, as it seems that either the Node server or chrome isn't translating from username + password to basic auth header properly.The CLI-less betas that have been working prior to this PR have actually had no auth on their servers since
OPENCODE_SERVER_USERNAMEandOPENCODE_SERVER_PASSWORDweren't being set in the globalprocess.env.When the server's Effect migration is 100% complete we'll be able to handle this much more nicely as we can provide
Configlayers that don't modify the global env, or even provide credentials via dedicated servers.