plugin
Manifest validApprove tool calls, watch streaming output and answer questions from a phone over a zero-knowledge relay, with payload-level end-to-end encryption.
DSH远控宿主插件(@dsh-remote/plugin)
在手机上远程操作 DeepSeek Harness(DSH):下发指令、看流式输出、审批工具调用、回答问题, 并让主机在任务跑完前保持唤醒。
载荷级端到端加密:中继从头到尾只见 base64(nonce ‖ secretbox)——不是"我们不查",
而是密钥在协议层的依赖图上就不可达(中继的构建产物里没有任何密码学实现,有测试锁住)。
安装
dsh plugin --profile web add @dsh-remote/plugin
桌面端把 --profile web 换成 --profile desktop。装完必须重启 Harness ——
HMR 只热更 cordis.patch.yml 的配置,不会重新 import dist;浏览器面还要刷新页面
才拉得到新的 client.cjs。不重启的表现是"改了的代码没生效"。
从源码构建(开发者)见第 2 步。
这是四仓里的主推库:装上它 + 一台中继 + 官方小程序,就能在手机上看着 DSH 干活并随时插话。
| 角色 | 仓 | 说明 |
|---|---|---|
| 宿主插件(本仓) | dsh-remote/plugin | 跑在 DSH 进程里:配对、中继、会话与命令、审批转发、状态栏 pill |
| 官方小程序 | dsh-remote/client | 微信小程序:扫码配对 / 会话列表 / 对话 / 审批 / 提问 |
| 中继 | dsh-remote/relay | 零知识 WebSocket 中继,单文件产物,可自托管 |
| 协议层 | dsh-remote/protocol | 帧与载荷 schema、E2E crypto、配对 URI。纯函数、零 I/O |
官方小程序:黑鲸远控
微信扫上面这张码(或直接搜小程序名 黑鲸远控)即可打开官方客户端 —— 2026-10-13 起已过审并在微信正式上线,任何人都能用(之前只在开发者/体验名单里)。
- 打开即用,无需安装:不装 App、不注册账号。
- 配对只需扫一次主机状态栏那颗 pill 给出的二维码,之后每次连都是自动的。
- 自建中继的用户注意:配对二维码里的地址来自主机侧配置(
serverUrl), 小程序只管扫,不需要手填任何地址。
教程
1. 前置
- 一台跑着 DeepSeek Harness 的机器(本仓要装进它的 profile)。
- 一台中继(生产实例已提供;自托管见
dsh-remote/relay的 SELF-HOSTING)。 - 一个主机 token:中继与插件必须逐字一致(
openssl rand -hex 32生成)。 把它放进中继的DRC_HOST_TOKEN,插件侧只给变量名。
2. 装插件
用户路径(从 npm 装,推荐):
dsh plugin --profile web add @dsh-remote/plugin
dsh plugin 转发的就是 pnpm —— 它把 @dsh-remote/plugin 写进 profile 的依赖并安装。
桌面端换成 --profile desktop。装完必须重启 Harness(理由见顶部「安装」一节)。
开发者路径(从本仓源码装):
pnpm install
pnpm build # 产出两半:dist/bundle/index.js(宿主侧)+ client.cjs(浏览器面)
node scripts/install-to-profile.mjs
装进 ~/.dsh/profiles/desktop;其他 profile 用 DSH_PROFILE=… 指定。
脚本只拷产物、不跑 pnpm add——profile 里不需要 node_modules。
⚠️ 两条路不要混用:
install-to-profile.mjs装出来的是软链时它会拒绝运行, 而dsh plugin add装的是 npm 包。同一个 profile 里先后用过两条路,表现是 "文件都在、插件不加载"——三个名字(包名 /bundles条目 /insert.name)必须一致。
3. 用
小程序里:会话列表点开会话 → 输入框下发指令 → 流式输出实时回显 → 主机要审批 / 提问时手机上直接答。 任务跑完前主机保持唤醒(防休眠由插件发命令,可配空闲多久释放)。
4. 排错
第一入口永远是状态快照:
cat ~/.dsh/dsh-remote-control/status.json
四个关键字段:
| 字段 | 看什么 |
|---|---|
relay | online / connecting / offline |
relayProblem | 连不上时的具体原因(token 不一致、地址错、中继没起…) |
carrier | services=真内核 / mock=内存替身 / none=配置或载体有问题 |
pill | 七条路由的软探测:registered / webServer=none / disabled / `miniprogramCode=ok |
pill 不是 registered ⇒ 这台主机配不了对(配对入口只有它)。此时看 problems 里有没有
warn:pill,原因在那条 pill 探针里。
pill 背后的七条同域路由(改状态的那三条要带自定义头——那是同源判据,不是装饰;
第六条是官方小程序那张静态码,只读、可缓存,与带 PSK 的 /pairing.png 是两件东西):
# 设置页那张静态小程序码(只读;200 + image/jpeg,或图不在包里时 204)
curl -sI http://127.0.0.1:<pillPort>/plugins/dsh-remote-control/miniprogram.jpg
# 状态(只读;Host 必须环回)
curl -s http://127.0.0.1:<pillPort>/plugins/dsh-remote-control/status
# 触发发码(幂等;跨站会先触发 CORS 预检而被拦下)
curl -X POST -H 'x-drc-pair: 1' \
http://127.0.0.1:<pillPort>/plugins/dsh-remote-control/pairing/new
设计上的三条硬线
- 零知识:插件配置里只有
hostTokenEnv(变量名),没有 token 明文; 中继经手的载荷是密封记录,密钥只经二维码过一次网络。 - 凭据落盘一律 0600:
status.json、配对密钥簿(conversations-<hostId>.json, 含每个会话的 PSK)、宿主身份文件、附件目录都走同一个落盘端口; win32 上chmod只切只读位时会显式告警,而不是假装生效。 - 审批必须真的过 waterfall:只有参与宿主
approval/request才能到达手机; 没有手机在线时交还桌面 UI。approval/asked|decided是审计事件,不能当应答通道用。
开发
pnpm install
pnpm typecheck # 两个编译面:宿主侧(NodeNext)与浏览器半(DOM lib)
pnpm format:check # ⚠️ 排在 test 之前,release workflow 也是这个顺序
pnpm test # 676 条判据
改完跑一遍 node scripts/install-to-profile.mjs + 重启 Harness 再验。
许可
MIT
Comments
Loading…
Similar plugins
by ChenJun25
Pair a phone with this computer's DSH instance by QR code or a six-digit code, then drive it remotely — send instructions, view images, answer approvals — from the panel, with public-tunnel support fo
★ 0
JavaScript
Oct 12, 2026
dsh plugin --profile web add dsh-console-pluginby kinderao
Phone and remote access to the DSH Web UI: scan a LAN QR code, or reach your PC from anywhere through a self-hosted relay server you run yourself instead of a cloudflared tunnel. Per-device credential
★ 4
GPL-2.0
JavaScript
Sep 17, 2026
dsh plugin --profile web add dsh-pocket-relayby AprilCrystal
OpenAI-compatible HTTP endpoint plus a mobile panel for the DeepSeek Harness: drive a session from a phone, read any session's transcript, browse and stage files, answer approvals, switch the model, watch and compact the context, and change the sandbox preset behind a code that is shown on the desktop.
★ 0
NOASSERTION
JavaScript
Oct 6, 2026
dsh plugin --profile web add dsh-openai-bridgeDeepSeek Harness 移动端插件:手机远程操控宿主,提供受限移动 API、中转隧道与局域网配对(可作无头宿主运行)
★ 0
MIT
JavaScript
dsh plugin --profile web add dsh-mobile-pluginDeepSeek Harness 远程控制插件:手机扫码、电脑确认后,用手机浏览器继续会话、审批和管理设置。
★ 0
MIT
TypeScript
dsh plugin --profile web add @copylee/dsh-remote-controlby ZSeven-W
DeepSeek Harness plugin for Android — build, run, and interact with a live emulator or USB device stream inside a conversation, driven entirely through adb.
★ 196
MIT
TypeScript
Oct 8, 2026
dsh plugin --profile web add @zseven-w/dsh-android