使用自建机器人应用,将一个 DSH Host 接入 Slack 和飞书。
安装
# npm 包(预构建)
dsh plugin --profile web add dsh-messaging-gateway
# Release 预构建包
dsh plugin --profile web add -w "https://github.com/aa2246740/dsh-gateway/releases/download/v0.2.3/dsh-messaging-gateway-0.2.3.tgz"
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:aa2246740/dsh-gateway
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
安装
官方 DeepSeek Harness 桌面 App
打开 设置 → 插件 → 添加插件,在“包名或地址”中输入:
dsh-messaging-gateway@0.2.6
桌面端插件管理器负责 Desktop profile 和内置包管理器。本发布已包含 lib/;普通使用不需要 clone 或本地构建。若应用提示刷新或重新打开,请按提示完成。
Web CLI
dsh plugin --profile web add dsh-messaging-gateway@0.2.6
这条官方 CLI 命令只写入 web profile,不能修改 Desktop App 的 profile。对于已经运行的 Web Host,请重新打开该 Host 一次,再刷新网页。
需要官方 DeepSeek Harness 0.2.2-rc.5(tag dsh-v0.2.2-rc.5,SHA 9c2670d3bce5275e0d1610272958121af87787bb,npm @deepseek-ai/dsh@0.2.2-rc.5)。本包版本是 0.2.6。Harness peers 是 >=0.2.2-rc.5 <0.2.3-0:接受 0.2.2-rc.5 与 0.2.2,拒绝 0.2.2-rc.4、0.2.1-rc.5、0.2.0 与 0.1.7-rc.2。
dsh 不在 PATH 时:
npx @deepseek-ai/dsh plugin --profile web add dsh-messaging-gateway@0.2.6
官方 CLI 只管理 web profile;Desktop App 请使用上面的应用内“添加插件”入口。
本地 clone(开发/本地测试):
git clone https://github.com/aa2246740/dsh-gateway.git
dsh plugin --profile web add file:./dsh-gateway
卸掉:
dsh plugin --profile web remove dsh-messaging-gateway
一台 DeepSeek Harness Host,一个 Gateway。你自己建 Slack 应用和飞书应用,把 token 贴进这台 DSH,就能从手机跟同一个 agent 说话。
没有官方共享 bot。token 不离开这台机器。
Loader id:dsh-messaging-gateway。装完并重启后打开 DSH 设置 → 消息。
Gateway 读状态或恢复聊天前,会原子租用 $DSH_HOME/messaging-gateway/instance.lock。同一 Home 上已有别的 Host 占着,这个 Gateway 就保持不活动。修好重复 Host,留下那个主人进程。
新会话默认工作目录:
$DSH_HOME/messaging-gateway/workspaces/slack$DSH_HOME/messaging-gateway/workspaces/feishu
设置页可以改成绝对路径,并给每个平台设 provider/model。两个平台填同一个目录就是故意共享。已有会话保留当时记录的 cwd。
中文:自己配对
装好并重启 Host 之后:
- DSH → 左下角 设置 → 左侧 消息。徽章
已绑定/已连接才算接通。密钥输入框永远是空的。 - Slack:在消息页点 复制 Manifest,到 From a manifest 创建并 Install。填 Bot token
xoxb-、带connections:write的 App-level tokenxapp-、你自己的 member idU…。保存后给 bot 发一条私信。频道里要 @bot 才会回。 - 飞书:在 开放平台 建企业自建应用,启用机器人。权限发布一个新版本后才生效:
application:app_slash_command:write、application:app_slash_command:read、im:message.p2p_msg:readonly、im:message.group_at_msg:readonly、im:message:send_as_bot。事件订阅选长连接,订阅接收消息 v2.0。填 App IDcli_…、App Secret、你自己的ou_…。保存后给机器人发一条私信。斜杠面板大约 5 分钟后出现,官方桌面端 PC ≥ 7.70、手机 ≥ 7.71。 - 模型和推理强度在 设置 → 消息 → Slack / 飞书 里和目录一起保存,用于首次私信以及
/new//reset。手机也可以/model provider/model high。 - 未在 allowlist 里的人私信 bot 会收到 pairing code。当前消息页还没有批准访客按钮。自己用就填自己的 id,不要把 bot 公开到陌生频道。
Slack DM 和飞书 DM 都是真正的 DSH 会话。/new 或 /reset 在这个聊天里开新会话。/compact 压缩上下文。/help 看目录。
状态在 $DSH_HOME/messaging-gateway/state.json。不要在 transcript 里打印 token 或 dump 这份文件。
许可
MIT。见 LICENSE。
链接
同类插件
xmanrui/dsh-im★ 3832
通过二维码或机器人凭据将 IM 机器人接入 DeepSeek Harness(支持飞书、微信、钉钉、企业微信、QQ、Slack、Telegram、Discord 和 WhatsApp 共 9 种渠道)。
shaobeichen/dsh-pocket★ 3187
手机远程访问 DSH Web 界面:扫码即用局域网或公网(cloudflared 隧道)访问,实时同屏、移动端适配布局,带设置页管理。
c1overzz/dsh-bili-scroll★ 1478
让你的 DSH 自己刷 B站 —— 读字幕原文挑内容、写日报,遇到值得看的会发评论 @ 你。
OpenPetsHQ/openpets#dsh★ 1416
将 DeepSeek Harness 的生命周期状态、错误与审批请求,桥接到本地运行的 OpenPets 桌面伙伴。
inclusionAI/Avernet#deepseek-harness-channel-bcn★ 611
通过 WebSocket V2 将 DeepSeek Harness 接入 Avernet Bot 协作网络,支持自动注册、Agent 会话隔离、工具调用事件和多 Bot 路由工具。
zaofan-make/dsh-qqbot★ 286
QQ 官方机器人通道(tencent-connect/dsh-qqbot 的增强 fork):群/私聊ai陪聊、富媒体收发、表情包打标入库+检索发图、入群审批/禁言/群发、定时唤醒、QQ 远程审批与提问卡、互动按钮卡、多账号多实例、扩展接口、群友记忆注入、按消息价值唤醒省token、上下文自动压缩、悬浮球设置面板。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。