Skip to content

electron: implement server env probe for in-process server#21196

Merged
Brendonovich merged 4 commits intobrendan/electron-remove-clifrom
brendan/electron-envs-fix
Apr 7, 2026
Merged

electron: implement server env probe for in-process server#21196
Brendonovich merged 4 commits intobrendan/electron-remove-clifrom
brendan/electron-envs-fix

Conversation

@Brendonovich
Copy link
Copy Markdown
Member

@Brendonovich Brendonovich commented Apr 6, 2026

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 token query param instead of just relying on Authorization headers, 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_USERNAME and OPENCODE_SERVER_PASSWORD weren't being set in the global process.env.
When the server's Effect migration is 100% complete we'll be able to handle this much more nicely as we can provide Config layers that don't modify the global env, or even provide credentials via dedicated servers.

@Brendonovich Brendonovich merged commit b9e0583 into brendan/electron-remove-cli Apr 7, 2026
2 checks passed
@Brendonovich Brendonovich deleted the brendan/electron-envs-fix branch April 7, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant