Feature Description
Expose the resolved Desktop connection mode (local or remote) to supported Hermes extension surfaces: skills, MCP servers, and Desktop plugins.
Desktop already has the authoritative connection descriptor through:
window.hermesDesktop.getConnection(): Promise<HermesConnection>
The descriptor includes the resolved mode: 'local' | 'remote', but that value is not currently available to skills, MCP servers, or the supported Desktop plugin API.
Motivation
Hermes can execute on a gateway while the user operates the Desktop UI on another machine. A gateway-local path such as:
is not necessarily accessible from the Desktop machine.
Without the connection mode, extensions cannot reliably determine whether an artifact is already local to the Desktop or must be transferred before presenting it for localized viewing or editing outside the agent. This causes incorrect MEDIA:/file-link behavior and makes remote file workflows ambiguous.
Proposed Solution
Expose only a narrow runtime value:
type HermesConnectionMode = 'local' | 'remote'
For example, through an appropriately scoped session/context value:
{
"desktop_connection_mode": "local"
}
or:
{
"desktop_connection_mode": "remote"
}
The exact API shape is open, but it should be a documented, supported interface rather than requiring extensions to reach through the raw Electron bridge.
Expected Behavior
- Return
local when Desktop uses its local backend.
- Return
remote when Desktop connects to an SSH, URL, or cloud backend.
- Reflect the active connection/profile after a Desktop connection switch.
- Be unavailable or
null for CLI, TUI, messaging, and other non-Desktop sessions.
- Expose no authentication tokens, SSH keys, credentials, or unnecessary connection URLs.
Extension Use Case
A file-delivery skill, MCP server, or Desktop plugin could then do:
if desktop_connection_mode == "local":
present the local file directly
elif desktop_connection_mode == "remote":
transfer the gateway file to the Desktop machine first
then present the localized file for viewing/editing
This is intended to support localized file viewing/editing outside the agent while preserving the existing execution boundary.
Acceptance Criteria
- A documented supported API exposes only the resolved
local/remote mode.
- Skills, MCP servers, and Desktop plugins can read it when running in a Desktop session.
- The value updates after switching the active Desktop connection/profile.
- Non-Desktop surfaces remain unaffected.
- No sensitive connection metadata is exposed.
- The implementation does not rely on a user-configurable
HERMES_* environment variable.
Related Work
Feature Description
Expose the resolved Desktop connection mode (
localorremote) to supported Hermes extension surfaces: skills, MCP servers, and Desktop plugins.Desktop already has the authoritative connection descriptor through:
The descriptor includes the resolved
mode: 'local' | 'remote', but that value is not currently available to skills, MCP servers, or the supported Desktop plugin API.Motivation
Hermes can execute on a gateway while the user operates the Desktop UI on another machine. A gateway-local path such as:
is not necessarily accessible from the Desktop machine.
Without the connection mode, extensions cannot reliably determine whether an artifact is already local to the Desktop or must be transferred before presenting it for localized viewing or editing outside the agent. This causes incorrect
MEDIA:/file-link behavior and makes remote file workflows ambiguous.Proposed Solution
Expose only a narrow runtime value:
For example, through an appropriately scoped session/context value:
{ "desktop_connection_mode": "local" }or:
{ "desktop_connection_mode": "remote" }The exact API shape is open, but it should be a documented, supported interface rather than requiring extensions to reach through the raw Electron bridge.
Expected Behavior
localwhen Desktop uses its local backend.remotewhen Desktop connects to an SSH, URL, or cloud backend.nullfor CLI, TUI, messaging, and other non-Desktop sessions.Extension Use Case
A file-delivery skill, MCP server, or Desktop plugin could then do:
This is intended to support localized file viewing/editing outside the agent while preserving the existing execution boundary.
Acceptance Criteria
local/remotemode.HERMES_*environment variable.Related Work
fix(desktop): save remote gateway files nativelyfix(gateway): make /api/files/download streamable and auth-able for remote mediaDesktop Remote Gateway should make Terminal/File Explorer execution target explicit