dshbase

插件目录 / Developer / dsh-chat-link

dsh-chat-link

已验证 · 实测可装 KeFan-J

✓ 持续维护 基于 1 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-14最近推送
跨平台平台

功能简介

Peer-to-peer conversation linking for DeepSeek Harness (DSH): @-mention any session, wake it up, chat across conversations. Type @ in the composer, pick a session, send — the target agent is woken via agent.send. Persistent message board, native-feel inbox panel, 5 chat_link_* tools. dsh-plugin.

✅
我们的评价
可用 — 实测通过,早期项目

Peer-to-peer conversation linking for DeepSeek Harness (DSH): @-mention any session, wake it up, chat across conversations. Type @ in the composer, pick a session, send — the target agent is woken via agent.send. Persistent message board, native-feel inbox panel, 5 chat_link_* tools. dsh-plugin. 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-chat-link · 会话联动

English | 中文

DeepSeek Harness (DSH) 多会话对等互聊插件 —— 让任意两个会话像 IM 一样直接对话,输入框打 @ 就能把消息发给另一个会话,对方会被自动唤醒并处理。

License: MIT
DSH


✨ 它解决什么问题

DSH 本身只有「会话内」的多代理协作(subagent 父子关系)。dsh-chat-link 补齐了缺失的一环:对等的、跨会话的实时对话。

  • 会话 A 在输入框打 @B 帮我查一下今天的任务 → 会话 B 被自动唤醒,把消息作为任务处理;
  • B 回复时 A 又被唤醒 —— 两个会话真正互聊,不需要人当传话筒;
  • 消息持久化在本地文件(~/.dsh/chat-link/),重启 DSH 不丢。

🚀 功能特性

1. @ 会话引用(像调用技能一样)

  • 输入框直接打 @ → 弹出系统原生选择菜单(会话名 + 在线/未读状态,支持过滤);
  • 选中后输入框里出现蓝色 chip 标签(@会话名)—— 和 DSH 的技能引用/斜杠命令同一套机制;
  • 发送时 chip 自动投影为 @会话名 内容,由 Agent 转发给目标会话。

2. 唤醒投递

  • 目标会话在线 → 通过 DSH 原生 agent.send(message, 'next-turn', true) 立即唤醒处理;
  • 目标未打开 → 消息存在消息板,3 秒轮询兜底补投,对方打开会话即收到。

3. 原生质感收件箱

  • 侧边栏「⇄ 会话联动」入口(DOM 注入,与 dsh-ssh / 任务看板同款机制,React 重渲染自愈);
  • 点击后接管中间主内容区(非浮层),与 DSH 设计系统一致(--dsw-* 主题变量,跟随皮肤);
  • 未读消息卡片 + 会话列表双栏;点击任意消息/会话直接跳转到对应会话;
  • 打开会话自动清除未读红点;未读数在侧边栏入口实时角标。

4. 五个模型工具(所有会话可用)

工具 用途
chat_link_send 给指定会话发送联动消息(名称 / sessionId / 前缀寻址)
chat_link_inbox 查看并领取本会话未读联动消息
chat_link_history 查看本会话的联动消息往来
chat_link_roster 列出全部联动会话(名称/在线/未读)
chat_link_register 给本会话设置自定义联动名称

5. 命名实时同步

  • 联动名称实时派生自会话标题 —— 在工作区重命名会话,联动列表自动更新;
  • chat_link_register 可设置自定义名称(优先于标题)。

📦 安装

🚀 一键安装(推荐)

bash -c "$(curl -fsSL https://raw.githubusercontent.com/KeFan-J/dsh-chat-link/main/install.sh)"

脚本自动完成:克隆代码 → 安装依赖 → 挂载到 DSH web profile。完成后只需重启 DSH(Ctrl+C → npx @deepseek-ai/dsh web)并强制刷新浏览器(Cmd+Shift+R)。

自定义安装目录:bash -c "$(curl -fsSL <上面的URL>)" - /path/to/dir
更新插件:重新执行一键安装命令即可(自动 git pull)。

手动安装

前置要求
  • DeepSeek Harness 0.1.0-rc.6(npx @deepseek-ai/dsh web 启动的 Web GUI)
  • Node.js ≥ 22、pnpm(corepack enable 或 npm i -g pnpm)
步骤
# 1. 克隆本仓库
git clone https://github.com/KeFan-J/dsh-chat-link.git
cd dsh-chat-link

# 2. 安装依赖(仅 @deepseek-ai/dsh-tools)
pnpm install

# 3. 挂载到 DSH web profile(bundle 机制,自动加入插件层)
dsh plugin --profile web add link:$(pwd)

# 4. 重启 DSH
#    终端 Ctrl+C → 重新运行 npx @deepseek-ai/dsh web

# 5. 浏览器强制刷新页面(Cmd+Shift+R)

注:DSH 通过 ~/.dsh/vendor/plugins/ 加载插件。若你使用 vendor 目录部署模式,更新代码后需同步:

cp -r lib ~/.dsh/vendor/plugins/dsh-chat-link/

🎮 使用

方式一:输入框 @(推荐)

  1. 在任意会话的输入框打 @;
  2. 从菜单选择目标会话(或继续输入过滤);
  3. 输入内容并发送 —— 消息自动转发,对方被唤醒;
  4. 对方回复时,你也会被唤醒(侧边栏入口出现未读角标)。

方式二:收件箱面板

点击侧边栏底部「⇄ 会话联动」:

  • 查看未读消息,点击跳转到来源会话;
  • 会话列表点击跳转;「复制」按钮一键复制 @名称;
  • 「全部已读」清空未读。

方式三:直接跟 Agent 说

用 chat_link_roster 看看有哪些会话
给「XXX」发条消息说:……

🏗️ 架构

┌─────────────────────────────── 宿主进程 (Host) ───────────────────────────────┐
│  lib/index.js                                                                │
│   ├─ 消息板: ~/.dsh/chat-link/messages.jsonl + identity.json(磁盘持久化)      │
│   ├─ 5 个模型工具(全局注册,所有会话可调)                                       │
│   ├─ 唤醒投递: agent.send(msg, 'next-turn', true) + 3s 轮询补投               │
│   ├─ 会话打开即已读(agent/session-start)                                      │
│   └─ HTTP 路由: /api/dsh-chat-link/state · /mark-read                         │
└──────────────────────────────────────────────────────────────────────────────┘
                          ▲ fetch / 事件
┌─────────────────────────────── 浏览器 (Client) ───────────────────────────────┐
│  lib/client.js(ModuleLoader bundle)                                          │
│   ├─ '@' 输入触发器(框架标准 inputTriggers 协议,chip 引用)                    │
│   ├─ 侧边栏入口(DOM 注入 + MutationObserver 自愈)                              │
│   ├─ 收件箱面板(接管中间主内容区,--dsw-* 皮肤变量)                             │
│   └─ 与 dsh-ssh / 任务看板互斥(dsh-panel-activate 事件)                       │
└──────────────────────────────────────────────────────────────────────────────┘

🔒 数据与隐私

  • 所有数据仅存本机 ~/.dsh/chat-link/(消息板 + 会话身份映射);
  • 无任何云端依赖、无遥测、无外部请求;
  • 卸载插件(dsh plugin --profile web remove @linxin666/dsh-chat-link)不影响历史会话。

🧩 兼容与依赖

  • 依赖 @deepseek-ai/dsh-tools@^0.1.0-rc.6(运行时);
  • 通过 DSH 标准 bundle 机制挂载(dsh.bundle.patch + dsh.client 声明),无需修改 DSH 源码;
  • 与其他全家桶插件(dsh-ssh、任务看板、Git 图谱等)互不干扰。

📄 License

MIT © Jinkefan


Made for the DeepSeek Harness plugin community.

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-chat-link」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:KeFan-J/dsh-chat-link

Headless(CLI)profile:

dsh plugin --profile headless add github:KeFan-J/dsh-chat-link

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7819 个插件 →