Hermes Desktop starts its own local gateway by default. Use a remote gateway when you want this app to control
- an already-running Hermes backend on another machine or behind a trusted proxy.
+ an already-running Hermes backend on another machine or behind a trusted proxy. Pick a profile below to give it
+ its own remote host.
+ {namedProfiles.length > 0 ? (
+
+
+ Applies to
+
+
+ setScope(null)} />
+ {namedProfiles.map(profile => (
+ setScope(profile.name)}
+ />
+ ))}
+
+
+ {scope === null
+ ? 'Default connection for every profile that has no override of its own.'
+ : `Connection used only when “${scope}” is the active profile. Set it to Local to inherit the default.`}
+
+
+ ) : null}
+
{state.envOverride ? (
diff --git a/apps/desktop/src/components/boot-failure-reauth.test.ts b/apps/desktop/src/components/boot-failure-reauth.test.ts
index 21d7f822972..613b43f6535 100644
--- a/apps/desktop/src/components/boot-failure-reauth.test.ts
+++ b/apps/desktop/src/components/boot-failure-reauth.test.ts
@@ -8,6 +8,7 @@ function config(overrides: Partial
= {}): DesktopConnec
return {
envOverride: false,
mode: 'remote',
+ profile: null,
remoteAuthMode: 'oauth',
remoteOauthConnected: false,
remoteTokenPreview: null,
diff --git a/apps/desktop/src/global.d.ts b/apps/desktop/src/global.d.ts
index 6cbb359946e..43718037a1d 100644
--- a/apps/desktop/src/global.d.ts
+++ b/apps/desktop/src/global.d.ts
@@ -12,7 +12,7 @@ declare global {
touchBackend: (profile?: string | null) => Promise<{ ok: boolean }>
getGatewayWsUrl: (profile?: null | string) => Promise
getBootProgress: () => Promise
- getConnectionConfig: () => Promise
+ getConnectionConfig: (profile?: null | string) => Promise
saveConnectionConfig: (payload: DesktopConnectionConfigInput) => Promise
applyConnectionConfig: (payload: DesktopConnectionConfigInput) => Promise
testConnectionConfig: (payload: DesktopConnectionConfigInput) => Promise
@@ -190,6 +190,9 @@ export interface DesktopActiveProfile {
export interface DesktopConnectionConfig {
envOverride: boolean
mode: 'local' | 'remote'
+ // The profile this config describes, or null for the global/default
+ // connection. Per-profile entries let a profile point at its own backend.
+ profile: null | string
remoteAuthMode: 'oauth' | 'token'
remoteOauthConnected: boolean
remoteTokenPreview: string | null
@@ -199,6 +202,9 @@ export interface DesktopConnectionConfig {
export interface DesktopConnectionConfigInput {
mode: 'local' | 'remote'
+ // When set, the save/apply/test targets this profile's per-profile remote
+ // override instead of the global connection.
+ profile?: null | string
remoteAuthMode?: 'oauth' | 'token'
remoteToken?: string
remoteUrl?: string