app: refactor server management backend#13813
Merged
Brendonovich merged 16 commits intodevfrom Feb 18, 2026
Merged
Conversation
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
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.
Refactors
context/server.tsand broader server connection management to support more than just plan HTTP clients. The app is now aware of servers that are managed externally via sidecar and SSH, and app hosts can inject their own servers alongside saved into storage by the app itself.This PR
ServerConnection
httpproperty which is what the app actually uses in fetch/wsServerConnection.keycan be used to get a branded string that uniquely identifies a given connection. Replaces using the raw url as a connection key as in some cases the same connection can have a different key across launches (SSH http servers and sidecars are ephemeral but are always resolve to the same host under the hood)Auth
httpsection of eachServerConnectionstores the username & password needed to authenticate to the OC server__OPENCODE__.serverPassword!SDK Clients
createOpencodeClienthas been replaced bycreateSdkForServer, which takes in aServerConnectioninstead ofbaseUrl. This ensures that all sdk instances are created with appropriate authSDKProviderandGlobalSDKProvidernow havecreateClientutilities to facilitate creating sub-clients that share the same url/server but have different directories, error throwing semantics, etc. Just helps to keep things uniformOther
Further Work