Chinesezjc/dsh-interconnect 预览 preview

Chinesezjc/dsh-interconnect

Plugin插件 Native原生 ⭐ 35 MIT Subagents & Orchestration子代理与编排

DSH(互连服务 + 工具)的跨实例消息/事件交接插件

Project Overview项目介绍

dsh-interconnect is a native plugin purpose-built for the DeepSeek Harness (DSH) agent framework. It enables cross-instance and cross-machine message delivery, liveness detection, and two-way event pushing between multiple running DSH instances. The package is published to the npm registry, so you can install it directly via the DSH CLI with the command dsh plugin --profile <name> add dsh-interconnect, or install it from a local checked-out path for development. It ships with pre-built JavaScript and type definitions, so you do not need to run a build step after installation.

This plugin is designed for DSH users who need to implement multi-agent collaboration across multiple DSH instances or distribute agent tasks across different machines. To get started, you configure a mapping of peer instance IDs and their network endpoints in your DSH profile, then set a shared authentication token in the credentials file of all instances that will communicate. After restarting the DSH web service, agents can use the built-in tools to send messages, list active sessions on peer instances, check liveness, and reply directly to incoming messages without extra configuration.

dsh-interconnect is released under the permissive MIT open source license. For development, you need to check out the public DeepSeek Harness monorepo as a sibling directory, because peer dependencies are provided by that checkout, and you use pnpm to install dependencies and run the build and test suite. All 164 unit tests pass, and the plugin has been validated working in real cross-machine communication scenarios, so you can expect it to work as documented out of the box.

dsh-interconnect 是专为 DeepSeek Harness (DSH) 开发的跨实例消息互通与事件通知原生插件。它允许一个 DSH 实例向同实例、同机器或不同机器上的其他 DSH 实例发送消息、探测活性,并支持实例之间双向推送事件。该插件通过 npm 分发,可使用 DSH 的 CLI 直接从 npm 注册表或本地源码路径安装。

该插件面向需要在多个 DSH 实例之间实现多代理协作、跨机器任务分发的 DSH 用户开发。典型工作流程为:在互通的两端实例上分别配置对端实例映射和共享鉴权密钥,重启服务后,代理即可调用插件提供的工具投递消息、列出在线会话、探测对端活性,还能直接回复收到的消息。

该插件采用 MIT 许可证开源,开发阶段依赖公开的 DeepSeek Harness 主仓库作为兄弟检出,使用 pnpm 进行依赖管理和构建。所有工具调用都基于持久 WebSocket 连接,从 v0.9 起不再支持 HTTP 端点回退,未连接的对端会直接返回不可达结果,项目已经过完整单元测试和实际场景验证。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 35 stars - an early-stage project星标 35,属于早期项目
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-interconnect

把 Chinesezjc/dsh-interconnect 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-interconnect

跨实例消息互通与事件通知插件,用于 DeepSeek Harness (DSH)。 让一个 DSH 实例能向同一个实例、另一台机器、或另一台机器上的别的 DSH 实例发送消息、探测活性,并在实例之间双向推送事件。

项目状态(2026-09-16):本仓库是该插件的树外(out-of-tree)主源。并入 DSH monorepo 的计划(PR #3243)已按「保持树外」的评审意见关闭;插件继续经 npm 分发(dsh-interconnect),并由团队内部的插件集合仓以 git submodule 引用本仓库。

包含三个插件

interconnect —— host 服务(ctx.interconnect):

  • 全走持久 WebSocket 链接:跨实例、跨机器投递消息、枚举 live session、探测活性(send/reply/ping/list 经 /interconnect/link 的 msg/query 帧)
  • /interconnect/link WebSocket 端点:双向实时事件推流,含心跳与指数退避重连;也承载 send/reply 消息(msg/msg-result 帧,WS 优先 + HTTP 回退)
  • 事件 fan-out(HTTP + WebSocket),入站事件以 interconnect/event 发出
  • 共享密钥鉴权(DSH_INTERCONNECT_TOKEN,bearer,fail-closed,timing-safe 比较)

tool-interconnect —— 模型可见工具:

  • interconnect_send:向对端实例的指定 session 投递消息;可选 delivery 选投递模式、resume 唤醒离线 session
  • interconnect_list:列出对端实例的 live session(id + 标题 + 状态),用于在不预先知道 session id 时寻址
  • interconnect_ping:探测对端实例活性与身份
  • interconnect_reply:向记录过的发送方回传消息,只需文本;回信 session 是本 agent 自己的,无需再次寻址

skill-interconnect —— 配套 skill:

  • 向模型注册 dsh-interconnect skill,说明 list/ping/send/reply 的完整用法、 投递模式、resume 唤醒语义与失败处理。
  • 明确告知模型:interconnect_send 会自动注入发送方的 instanceId 和 sessionId, 接收方凭记录的 sender 即可用 interconnect_reply 回信,不需要手工传地址。
  • 依赖 interconnect 服务,只有传输层存在时才注册进 ctx.skills。

用法

寻址(0.9 起用 instanceId,全走持久链接)

从 0.9 起,传输只走 WebSocket 持久链接,不再有 HTTP 端点,寻址参数从 baseUrl 改为 instanceId:

  • interconnect_send(instanceId="peer", sessionId=..., text=...)
  • interconnect_ping(instanceId="peer")
  • interconnect_list(instanceId="peer")
  • interconnect_reply(text=...)(只需文本;回信 session 是本 agent 自己的,目标从记录的 sender 解析)

instanceId 是 interconnect 行 peers 映射里的键;真正用来拨号的 origin 由该映射的值给出(例如隧道端点 http://127.0.0.1:13080),instanceId 本身从不出现在线上,也不参与路由——origin 才是唯一的拨号依据。到未配置 / 未联通的对端 send/ping/list 返回 unreachable(无 HTTP 回退)。

interconnect_list 返回对端当前 live 的 session,每一行的 sessionId 在调用时刻都是合法的投递目标:

session-264d37b0-…  重构 interconnect 插件  [idle]
session-b07326da-…                          [running]

title 与 status 是尽力而为的:标题来自可选的 title projection 服务,对端没装该服务、或 该 session 还没有标题时,整个键不出现(而不是空字符串),所以「无标题」与「该对端不提供 标题」可以区分。projection 抛错只会让那一行降级成只有 id,不会让整个列表失败。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev aginxbrowser 下一个 Next dsh-tui →