Skip to main content
Glama
newbeebnb

hermes-dsh-bridge

by newbeebnb

hermes-dsh-bridge

License: MIT Node >=22 dsh-plugin

Hermes Agent ↔ DeepSeek Harness (DSH) 桥:让 Hermes 把任务派发给 DSH 执行, 并在 DSH 侧边栏以 UI 可见会话 实时观看执行过程。

主线能力:

  • Hermes → DSH 派单 — POST /mcp/collab JSON-RPC:dispatch_task(one-shot / continuable),返回真实 token 用量,支持任务信封、知识切片、项目记忆注入。

  • 可见派单 (visible dispatch) — 默认把 one-shot 任务落地为 DSH 侧边栏可见的根会话(不是隐藏子代理):你能亲眼看到 agent 一步步执行 SSH、改文件、跑命令。

  • DSH → Hermes 工具 — 10 个工具:list_hermes_sessions、import_hermes_session、load_hermes_persona、consult_hermes、hermes_inbox、hermes_inbox_append、load_hermes_project_memory、mirror_session_to_hermes、session_mirror、dispatch_status、rotate_outbox_now。

  • 会话镜像 — 把任意 Hermes 会话作为原生 DSH 会话继续对话(side-by-side)。

  • MCP 工具暴露 — 通过 dsh-mcp-client 把外部 MCP server(如 hermes-web)暴露给 DSH 子代理。


快速开始

前置:DSH Desktop >= 0.7.x、Node >= 22、Hermes Agent(任意版本,只要有会话目录)。

# 1. 安装插件
dsh plugin --profile web add hermes-dsh-bridge

# 2. 创建磁盘连接(源码方式)
#    把本仓库 clone 到本地,在 profile 的 package.json dependencies 里
#    用 "link:" / junction 指向 packages/dsh-hermes-link

# 3. 配置 Hermes 家目录(必须与你的 Hermes 安装一致)
$env:HERMES_HOME = 'C:\Users\<you>\AppData\Local\hermes'   # Windows
# 或
export HERMES_HOME="$HOME/.hermes"                         # Linux/macOS

启动 DSH Desktop 后,插件健康检查:

curl http://127.0.0.1:<port>/mcp/collab/health
# {"ok":true,"version":"0.5.1","hermes_home":"...","importer_ready":true,...}

DSH Desktop 每次启动 HTTP 端口随机;从 harness.log 尾部取 dsh web: http://127.0.0.1:PORT/?token=... 获得当前端口与 token。

Related MCP server: DSH Crew

派单示例

curl -X POST http://127.0.0.1:<port>/mcp/collab \
  -H 'content-type: application/json' \
  -H "cookie: dsh-auth=<token>" \
  -d '{
    "jsonrpc": "2.0", "id": "t1", "method": "tools/call",
    "params": {
      "name": "dispatch_task",
      "arguments": {
        "task_id": "demo-001",
        "skill": "pwsh",
        "task": "检查本机磁盘空间,汇报使用率",
        "model": "deepseek/deepseek-v4-flash",
        "visible": true
      }
    }
  }'

visible: true(默认)时,返回体带 visible_session_id 与 workspace_title—— 打开 DSH 侧边栏对应工作区即可看到该会话实时执行。

环境变量

变量

默认

作用

HERMES_HOME

~/.hermes

Hermes 会话/记忆根目录

DSH_LINK_LLM_PROVIDER

commandcode

子代理 LLM provider

DSH_LINK_VISIBLE_WORKSPACE

空

可见派单落地的 workspace(workspaceId/title/path 子串)

DSH_LINK_SSH_HOST / DSH_LINK_SSH_KEY

空

给子代理的 SSH 直连提示(避免探测主机)

DSH_LINK_PROXY

空

子代理 HTTP 代理提示

DSH_LINK_TZ_HINT

空

时区提示(如 server logs are UTC; Beijing = UTC+8)

架构

┌─────────────┐   POST /mcp/collab (JSON-RPC)   ┌─────────────────────┐
│   Hermes    │ ──────────────────────────────▶ │  DSH Desktop        │
│  Agent      │     dispatch_task / followup    │  ┌───────────────┐  │
└─────────────┘ ◀────────────────────────────── │  │ dsh-hermes-   │  │
      ▲               run.result / consult      │  │ link plugin   │  │
      │                                         │  └───────┬───────┘  │
      │      MCP tools (list_hermes_sessions,   │          │ creates  │
      └──────────────────────────────────────── │    UI-visible root  │
              import, mirror, consult ...)      │    session (侧边栏) │
                                                └─────────────────────┘

安全模型

  • POST /mcp/collab 由 DSH web token 鉴权(HERMES_LINK_TOKEN,当前 auth: open 仅供本地回环)。

  • 派单信封带 task_id 与 skill 白名单;子代理只能用一个工具(toolFilter.allow=[skill])。

  • amend/consult 协议带 nonce 认证;审计全量落盘 audit.jsonl。

  • 详细见 docs/security-model.md。

文档

License

MIT。本项目代码继承自 dsh-hermes-link (MIT, Copyright (c) 2026 Tianbuyu-wwx),并在其之上继续演进。

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables hosts like Claude Code, Codex, Antigravity, and Grok to dispatch work to full DeepSeek Harness agent sessions that appear as native subagents with live progress, tier/effort presets, failure escalation, and workspace-cycle guardrails. Also lends a text-only harness multimodal abilities by describing pasted images and generating images through DeepSeek's vision model, existing CLIs, or a custom endpoint.
    354 npm
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables orchestrators like Claude Code, Codex, Antigravity, and Grok to dispatch work to DeepSeek Harness agents as native subagents with live progress, tier policy, and escalation. It also provides a multimodal bridge that lends the text-only harness vision and image generation.
    354 npm
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables coding hosts like Claude Code, Codex, Antigravity and Grok to dispatch tasks to full DeepSeek Harness agent sessions that appear as native subagents with live progress, tier and effort presets, escalation on failure, workspace locking and a jobs board. It also bridges text-only harness models to vision and image generation through DeepSeek's VL model, existing CLI tools, or any OpenAI-compatible endpoint.
    354 npm
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables hosts such as Claude Code, Codex, Antigravity and Grok to dispatch work to DeepSeek Harness agents while keeping native subagent progress, tier/effort policy, escalation, guardrails and a jobs board. Also lends text-only harnesses vision and image generation by routing through VL models or the host's own CLIs.
    354 npm
    MIT