Invoice-Downloader
EthanYoQ
电子发票整理与报销准备工具:从邮箱批量收集 PDF/OFD/XML 发票,OCR 识别、分类归档并生成 Excel 汇总;提供 Windows/macOS 桌面版与 DSH 插件。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:xuwhao/dsh-needs-you-mac
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
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 提醒、没有声音。等你回来,可能已经过去二十分钟。
这个插件补的只是「叫你回来」这一环:
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。
# 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”想要发送通知
点 允许 即可。没弹出、没点或点了拒绝时:
不需要重装。插件会自己检测授权状态,未授权时在日志里说明原因,并退回 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 = 强制旧后端 |
native/dsh_notify.mm 编译出的 N-API 动态库(native/dsh_notify.node,arm64 + x86_64 通用二进制),源码随包发布,只调用系统 UserNotifications。/usr/bin/osascript(或 terminal-notifier)通过 argv 参数启动,不经过 shell 拼接。装了但一条通知都没收到?
先确认宿主是桌面版(原生后端需要 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,这个插件管不到。
dsh web 的 CLI 宿主会退回 osascript。sound 里的具体音名只在 osascript / terminal-notifier 后端生效。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 通用二进制构建脚本
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:
approval/request)ask_user_question and plan review (user-questions/request)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:
terminal-notifier (if installed) and then osascript, and says why in the log.delayMs (default 1200 ms) — e.g. answered by an automatic reviewer — produces no notification.next(), so the original approval UI still owns the decision. No network access, no credentials, no file access.>=0.2.1-rc.5 <0.3.0-0. The osascript fallback is required for CLI hosts, which have no app identity.backend accepts auto (default), native, or osascript. 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.
MIT © dsh-needs-you-mac contributors
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: notification。