Skip to content

feat(desktop): expose resolved connection mode to skills, MCP, and plugins #82140

Description

@rahlquist

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:

/home/user/report.md

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/desktopElectron desktop app (apps/desktop/*)comp/pluginsPlugin system and bundled pluginstool/mcpMCP client and OAuthtype/featureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions