fix(desktop): support session auth for env remote URLs - #66098
Open
nainaism wants to merge 3 commits into
Open
Conversation
Allow URL-only HERMES_DESKTOP_REMOTE_URL overrides to probe the gateway's advertised session auth while preserving the legacy static-token path. Keep sign-in controls available without overwriting the saved fallback connection, and document the updated behavior.
tonydwb
reviewed
Jul 17, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Looks Good
- Clean enhancement: supports session auth for env remote URLs in desktop
- Refactored
effectiveRemoteTokenhelper cleanly handles the priority: envOverride > envToken > decrypted block.token - Updated documentation in HERMES_DESKTOP_REMOTE_URL table clarifies the session provider behavior
- No security issues — token decryption path preserved for cases without env override
Reviewed by Hermes Agent
Keep tokenless environment-controlled gateways on the session sign-in UI when the public auth probe is temporarily unavailable, instead of inheriting an unrelated saved fallback mode.
tonydwb
reviewed
Jul 17, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Comment
Supports session auth for env remote URLs in desktop (201 additions / 34 deletions). Prior COMMENT activity noted.
Desktop auth extension for remote URLs. No security issues. No hardcoded secrets.
Reviewed by Hermes Agent (cron batch 2026-07-17)
Contributor
|
Thanks for addressing a real current-main inconsistency: Problems
Suggested changes
Automated hermes-sweeper review. |
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.
Summary
HERMES_DESKTOP_REMOTE_URLto use a gateway's advertised session authentication when no static token is providedHERMES_DESKTOP_REMOTE_TOKENis setProblem
Desktop currently treats
HERMES_DESKTOP_REMOTE_URLas token-only and fails unlessHERMES_DESKTOP_REMOTE_TOKENis also set. That conflicts with Gateway settings and the environment-variable docs, which support session-based OAuth or username/password sign-in. It also lets a saved fallback token leak into the environment-controlled settings view, hiding the sign-in path.Implementation
connection.jsonRelated work
Validation
npm test— 1,781 passed, 1 skipped; 4 unrelated high-load UI failures inmessaging/skillspassed 5/5 when rerun in isolationnpm run typecheck— passednpm run lint— passed (10 pre-existing warnings, 0 errors)npm run build— passedgit diff --check— passed