hermes-agent/apps/desktop/src
Ben 385a508e43 fix(desktop): don't fall back to a dead WS ticket on OAuth re-mint failure
The reconnect and boot paths resolved the WS URL with
`(await getGatewayWsUrl().catch(() => null)) || conn.wsUrl`. For OAuth
gateways the cached conn.wsUrl carries a single-use, ~30s-TTL ticket; the
desktop connection is memoized for the process lifetime, so on reconnect
that ticket is both expired and already consumed. A failed fresh mint
therefore fell back to a guaranteed-dead ticket and surfaced as an opaque
"connection closed", masking the gateway's actionable "session expired,
sign in again" message.

Extract resolveGatewayWsUrl() (with unit tests): in OAuth mode a mint
failure throws a tagged GatewayReauthRequiredError instead of falling back;
token/local modes keep the long-lived-token fallback. Thread that error
through the reconnect path so requestGateway surfaces the reauth message
rather than the generic transport error that triggered the retry.

Co-authored-by: Kenmege <205099287+Kenmege@users.noreply.github.com>
2026-06-04 01:11:34 -07:00
..
app fix(desktop): don't fall back to a dead WS ticket on OAuth re-mint failure 2026-06-04 01:11:34 -07:00
components feat(desktop): dedicated Providers settings + polished Accounts/API-keys UX (#38551) 2026-06-04 03:03:42 -05:00
hooks Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
lib fix(desktop): don't fall back to a dead WS ticket on OAuth re-mint failure 2026-06-04 01:11:34 -07:00
store feat(desktop): dedicated Providers settings + polished Accounts/API-keys UX (#38551) 2026-06-04 03:03:42 -05:00
themes Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00
types feat(desktop): dedicated Providers settings + polished Accounts/API-keys UX (#38551) 2026-06-04 03:03:42 -05:00
global.d.ts desktop: OAuth-aware remote gateway connection 2026-06-04 01:11:34 -07:00
hermes.ts fix(desktop): configure local/custom endpoint without an API key or UI changes 2026-06-03 17:48:55 -07:00
main.tsx fix(desktop): stabilize project folder sessions (#37586) 2026-06-02 20:23:09 +00:00
styles.css feat(desktop): dedicated Providers settings + polished Accounts/API-keys UX (#38551) 2026-06-04 03:03:42 -05:00
vite-env.d.ts Add Hermes desktop app (#20059) 2026-05-31 17:46:56 -05:00