dsh-session-hub: Unifying Remote DSH Sessions and Local Tool History in One Session Tree

Preface

The DSH plugin ecosystem provides an extension entry point for the web UI. The dsh-session-hub described below solves a specific problem: dsh web sessions on remote machines, as well as historical conversations from local Codex CLI, Claude Code, opencode, and Pi, do not naturally appear in the same session tree by default. This plugin integrates both types of sessions into DSH’s official session tree, continuing to use the official sidebar and conversation area.

Plugin Positioning

dsh-session-hub is a plugin designed for the web profile. Both the repository and the directory page are under the Asaiuta namespace, licensed under MIT. The current installation uses @alpha, the README marks it as alpha, and the tarball tag is v0.1.0-alpha.2.

Core Capabilities

To summarize: it does not replace DSH’s UI, but primarily handles merging and routing at the /api data layer.

  • Remote Session Aggregation: Integrates DSH sessions from multiple remote dsh web servers into the official session tree; supports viewing history, real-time token-by-token streaming, approval cards, question questionnaires, and supports sending, cancelling, and renaming.
  • Local History Import: Imports historical conversations from Codex CLI, Claude Code, opencode, and Pi into the tree, organized by project directory; logs from software not clicked for import are not read.
  • SSH Tunnel Management: The plugin manages SSH tunnels itself, including keep-alive reconnection and automatic local port allocation.
  • Incremental Model Configuration Sync: Fills in providers, default models, and API keys that exist locally but are missing on the remote, without overwriting existing remote configurations.
  • Feature Toggles: features.aggregate, features.tunnel, features.modelSync, and features.importer can independently control the corresponding capabilities.

Installation and Activation

First, install the plugin:

dsh plugin --profile web add dsh-session-hub@alpha

After installation, restart dsh web and refresh the page. Navigate to Settings → Plugins. If the Session Hub tab appears, the plugin is ready.

To install using a GitHub tarball:

dsh plugin --profile web add https://github.com/Asaiuta/dsh-session-hub/archive/refs/tags/v0.1.0-alpha.2.tar.gz

To modify the code for debugging:

git clone https://github.com/Asaiuta/dsh-session-hub && cd dsh-session-hub
npm install && npm run build
dsh plugin --profile web add file:$(pwd)

Requirements

  • Local DSH: Tested with @deepseek-ai/dsh@0.1.0-rc.6.
  • Node: ^22.19 || >=24.
  • Profile: web only; installing into headless / tui will leave it pending forever and cause startup failure for that profile.
  • Remote DSH: Must be a dsh web instance without this plugin installed, capable of responding to standard /api requests.
  • Network: Currently, DSH only allows loopback binding, so remote servers typically require an SSH tunnel or an existing ssh -L forward.

Typical Usage

Connecting a Remote Machine

First, start DSH Web on the remote machine:

dsh web --port 3080

After installing and restarting the plugin locally, open the official Web UI, navigate to Settings → Plugins → Session Hub → Add Server. Fill in the name, host, SSH user, private key path, and remote dsh port. Add it after the test passes.

The local port is allocated automatically by the plugin. Following these steps, the remote server will appear in the workspace tree; sessions within the group can be viewed, streamed in real-time, and interacted with (approval cards, question questionnaires) using the official conversation area, which also supports sending, cancelling, and renaming.

Importing Sessions from Other Local Tools

Navigate to Settings → Plugins → Session Hub → External Sessions and click import for Codex CLI, Claude Code, opencode, and Pi one by one.

Imported sessions are read-only in the tree. If you send a message directly to an imported session, it will be converted into a real DSH session, and the original read-only copy will be hidden. Source logs are opened read-only and are never modified or deleted.

Configuring Feature Toggles

In the profile’s cordis.yml / cordis.patch.yml, you can configure dataFile, trustedHosts, or the features toggles.

For example, to keep only the importer and disable multi-server aggregation:

- id: dsh-session-hub
  config:
    features:
      aggregate: false

For example, to disable importing logs from other local tools:

- id: dsh-session-hub
  config:
    features:
      importer: false

Disabling the importer prevents reading logs; disabling aggregation prevents outgoing connections.

Notes

  • The plugin runs with the permissions of the current DSH process and can read authorized local tool logs and communicate with configured servers. Review the source code, license, and configuration options before installing.
  • The configuration format, routing tables, and /hub/events frame protocol for the alpha version may undergo breaking changes before version 1.0.
  • The README states that only one environment has been verified: a Windows local machine + Tencent Cloud Linux, running cross-machine conversations, approval responses, and real-time streaming via an SSH tunnel.
  • The plugin does not require any API key or token environment variables; the only relevant environment variable is DSH_HOME, which affects the default registry path.
  • For complete removal, besides removing the plugin configuration and restarting, you also need to delete $DSH_HOME/plugins/dsh-session-hub.json and $DSH_HOME/plugins/dsh-session-hub-imports.json.

Links

  • Directory page: https://www.skillhub.cn/plugins/Asaiuta/dsh-session-hub
  • GitHub: https://github.com/Asaiuta/dsh-session-hub
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye