DSH Needs You
Agent 在等你审批,你在另一个窗口。
macOS 应该先告诉你。
给 DeepSeek Harness(dsh)补上系统通知:
审批、提问、登录 —— 每一次「停下来等你」,都变成一条可点的通知。
快速开始 · 为什么需要 · 配置 · FAQ · English · GitHub
快速开始
dsh plugin --profile desktop add dsh-needs-you-mac
或者:侧栏 插件 → 添加插件 → 输入 dsh-needs-you-mac,然后重启 DeepSeek Harness。
第一次弹通知时允许一次系统权限,之后每次 Agent 停下来等你,都会有一条点一下就回到 DSH 的通知。
它解决什么问题
DSH 的审批和提问只渲染在聊天输入区。一旦你去写代码、开会、刷别的窗口,Agent 就会安静地卡在那里 —— 没有系统通知、没有 Dock 提醒、没有声音。等你回来,可能已经过去二十分钟。
这个插件补的只是「叫你回来」这一环:
- 通知归属正确 —— 通知来自 DeepSeek Harness 本身,不是脚本编辑器;
- 点一下就回来 —— 点横幅直接把 DeepSeek Harness 切到前台,窗口最小化也会恢复;
- 不替你做决定 —— 只观察,从不返回审批结果,批准仍然只能由你点。
0.1.x 用
osascript发通知,macOS 会把通知算在脚本编辑器头上,点开的是脚本编辑器。0.2.0 改成在宿主进程内调用原生UserNotifications,这个问题没有了。
| 0.1.x | 0.2.0 | |
|---|---|---|
| 通知归属 | 脚本编辑器 | DeepSeek Harness |
| 点击横幅 | 打开脚本编辑器 | 切回 DeepSeek Harness |
| 提示音 | 指定音名 | 系统默认通知声(原生后端) |
覆盖场景
| 场景 | 监听事件 | 通知副标题 |
|---|---|---|
| 工具审批、沙箱升级、插件安装/列表、工作区外写入 | approval/request |
需要你审批一次操作 |
ask_user_question、计划审核 |
user-questions/request |
需要你回答问题 / 需要你审核计划 |
| 模型请求需要登录、登录过期 | deepseek-account/model-sign-in-required、deepseek-account/session-expired |
需要你登录 DeepSeek 账号 |
通知正文只包含工具名、原因、会话短 ID 或问题文本 —— 全部留在本机。
防打扰:没真的卡住就不弹
审批请求到达后先等 delayMs(默认 1200 ms)。如果这段时间里请求已经被自动审核等非人类的 answerer 答复,就不通知。只有真正停在「等你」这一步的请求才会弹。
安装
桌面版(推荐)
侧栏 插件 → 添加插件 → 输入 dsh-needs-you-mac → 重启 DeepSeek Harness。
CLI
# Desktop profile(使用桌面应用自带的 dsh 命令)
dsh plugin --profile desktop add dsh-needs-you-mac
# Web profile
dsh plugin --profile web add dsh-needs-you-mac
dsh plugin add 会把包追加进对应 profile 的 dsh.profile.bundles,然后重启 dsh 生效。
Desktop 和 Web 的 profile 是独立的:装到
web不会自动出现在桌面版。原生通知后端需要桌面版宿主(进程在DeepSeek Harness.app内)。
首次授权
原生后端发出第一条通知时,macOS 会问一次:
“DeepSeek Harness”想要发送通知
点 允许 即可。没弹出、没点或点了拒绝时:
- 打开 系统设置 → 通知 → 应用程序通知 → DeepSeek Harness,打开「允许通知」;
- 确认没有开启专注模式 / 勿扰;
- 重启 DSH(或等下一次通知)后生效。
不需要重装。插件会自己检测授权状态,未授权时在日志里说明原因,并退回 terminal-notifier → osascript。
配置
在 profile 的 cordis.patch.yml 里覆盖 config。注意 config 是整段替换,不是深合并,覆盖时请把需要的键都写出来:
- id: dsh-needs-you-mac
name: dsh-needs-you-mac
config:
enabled: true
notifyApproval: true
notifyQuestion: true
notifySignIn: true
delayMs: 1200
title: DeepSeek Harness
sound: Glass
maxBodyChars: 220
backend: auto
| 字段 | 默认 | 含义 |
|---|---|---|
enabled |
true |
总开关 |
notifyApproval |
true |
工具审批 / 沙箱升级 / 插件安装等 approval/request |
notifyQuestion |
true |
ask_user_question、计划审核等 user-questions/request |
notifySignIn |
true |
模型请求需要登录 / 登录过期 |
delayMs |
1200 |
请求到达后等待多久再通知,给自动审核留时间;范围 100–10000 |
title |
DeepSeek Harness |
通知标题 |
sound |
Glass |
macOS 提示音;none 静音(原生后端使用系统默认通知声) |
maxBodyChars |
220 |
通知正文最大长度;范围 40–500 |
backend |
auto |
auto = 原生 → terminal-notifier → osascript;native = 只用原生;osascript = 强制旧后端 |
安全
- 只监听 DSH 事件,从不返回审批结果,也不截断 waterfall —— 审批仍必须由你点。
- 不联网、不读取凭据、不读写你的文件。
- 原生后端是
native/dsh_notify.mm编译出的 N-API 动态库(native/dsh_notify.node,arm64 + x86_64 通用二进制),源码随包发布,只调用系统UserNotifications。 - 兜底通知由固定的
/usr/bin/osascript(或terminal-notifier)通过 argv 参数启动,不经过 shell 拼接。 - 通知正文只包含工具名、原因、会话短 ID 或问题文本,全部留在本机。
常见问题
装了但一条通知都没收到?
先确认宿主是桌面版(原生后端需要 app 身份),再看 系统设置 → 通知 → DeepSeek Harness 是否允许。插件日志会写明当前用的是哪个后端、为什么回退。另外:如果每个请求都在 delayMs 内被自动通过,本来就不会通知。
点通知打开的不是 DeepSeek Harness?
说明当前走的是 osascript 或 terminal-notifier 兜底后端。授权原生通知后点击就会回到 DSH;backend: osascript 会强制旧行为。
我用 dsh web 的 CLI 宿主,会怎样?
CLI 宿主没有 app 身份,原生后端不可用,会退回 osascript,点击横幅仍是脚本编辑器。这是宿主限制,不是插件配置问题。
支持 Windows / Linux 吗? 不支持,这个包只做 macOS。非 darwin 平台会直接禁用并打日志。
会不会替我把审批点了?
不会。插件只读事件、只发通知,所有 waterfall listener 都会继续调用 next()。
和系统自己的权限弹窗有关系吗? 没有。录屏、辅助功能、文件夹访问这些 macOS 系统权限弹窗不经过 DSH,这个插件管不到。
限制
- 仅支持 macOS。
- 原生后端需要 DSH 桌面版;
dsh web的 CLI 宿主会退回osascript。 - 原生后端使用系统默认通知声,
sound里的具体音名只在osascript/terminal-notifier后端生效。 - 已在 DSH
0.2.1-rc.5、macOS 27 上实测;engines.dsh声明为>=0.2.1-rc.5 <0.3.0-0。 - 当前插件市场不支持原地升级,更新方式是卸载后重装,或重新执行
dsh plugin add dsh-needs-you-mac@latest。
开发
无构建步骤的 Host 插件,只有原生通知需要编译一次(产物已提交):
node --check index.js
native/build.sh # 重新生成 native/dsh_notify.node(需要 Xcode CLT)
pnpm pack # 检查发布的 tarball 内容
目录结构:
index.js Host 插件入口(事件监听、通知分发)
cordis.patch.yml 插件包声明
locale/ 插件页中英文文案
native/dsh_notify.mm 原生通知 N-API 实现
native/build.sh 通用二进制构建脚本
English
DSH Needs You sends a macOS notification whenever DeepSeek Harness blocks waiting for a human.
The problem: DSH renders approvals and questions only inside the chat composer. Step away for a moment and the agent sits there silently — no notification, no Dock badge, no sound.
What this does:
- Tool approvals, sandbox escalation, plugin installs (
approval/request) ask_user_questionand plan review (user-questions/request)- Sign-in required / expired session (
deepseek-account/*)
Notifications are posted from inside the Harness host process through a small N-API addon, so macOS attributes them to DeepSeek Harness itself and clicking one brings the harness window to the front. In 0.1.x they went through osascript, which macOS attributed to Script Editor — clicking opened Script Editor instead.
Install:
dsh plugin --profile desktop add dsh-needs-you-mac
Or Plugins → Add plugin → dsh-needs-you-mac in the desktop app, then restart DSH.
Notes:
- One-time "DeepSeek Harness wants to send notifications" permission. If denied, the plugin falls back to
terminal-notifier(if installed) and thenosascript, and says why in the log. - A request that settles within
delayMs(default 1200 ms) — e.g. answered by an automatic reviewer — produces no notification. - The plugin only observes: every waterfall listener calls
next(), so the original approval UI still owns the decision. No network access, no credentials, no file access. - Requires macOS and DSH
>=0.2.1-rc.5 <0.3.0-0. Theosascriptfallback is required for CLI hosts, which have no app identity. - Config:
backendacceptsauto(default),native, orosascript. Full key list is in the 配置 table above.
Looking for more plugins? dsh.so indexes the community market — add https://cdn.dsh.so/market/index.json as an index source in DSH's Discover page.
License
MIT © dsh-needs-you-mac contributors
No comments yet. Be the first to write one.