[PAB-24] Add selectable backend environments#102
Merged
Conversation
Co-authored-by: multica-agent <github@multica.ai>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
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.
This PR adds the ability to select and switch between different backend environments for the Nevermind service, allowing users to connect to either the production backend or a custom backend URL.
Key changes:
Backend environment switching — A new "Nevermind: Switch Backend Environment" command is exposed in the account extension, letting users choose between Production or a custom HTTPS URL. The custom URL option prompts the user to enter a backend URL.
Validation and security — When switching backends, the custom URL is validated for proper HTTPS format. Packaged builds are blocked from using localhost/loopback addresses. The selected backend must also pass a compatibility manifest check before the switch is accepted.
Environment state persistence — The selected backend environment (type and base URL) is stored in user state and persisted across sessions. The auth file now also records which environment was used for sign-in.
Seamless re-authentication — Switching backends automatically signs out of the current session, invalidates the old compatibility cache, signs into the new environment, warms the new compatibility cache, disposes existing AI sessions, and broadcasts the auth change to extensions.
Compatibility cache invalidation — A new
invalidateNevermindCompatibilityCachefunction allows targeted (by URL) or full cache clearing, ensuring stale manifests don't interfere with backend switches.Sign-in routing — All sign-in paths (extension login, host jobs, etc.) now route through a unified
signInToSelectedNevermindEnvironmentfunction that uses the currently selected backend environment rather than a hardcoded default.