安装
在 DeepSeek Harness 里通过 dsh-market 安装
dsh plugin --profile web add dshmarket
或使用命令行
dsh plugin --profile web add github:YuMo226/dsh-task-notify
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络。请先审阅源码,并尽量锁定 commit(github:owner/repo#sha)。
README
一个 DeepSeek Harness (DSH) 插件:每当任务完成时(目标完成或 Agent 结束一轮),弹出原生系统通知。支持 Windows / macOS / Linux。
特性
- 各平台原生系统通知 — Windows toast、macOS 通知中心、Linux libnotify;真实系统横幅,非模态弹窗,不打断工作。
- 两个「任务完成」触发(可分别开关):
- 目标(goal)进入
complete状态 - Agent 一轮正常结束
- 目标(goal)进入
- CJK 安全 — Windows 通知文本经 UTF-8 临时文件传递,中文/日文/韩文不损坏。
- 零运行时依赖 — 仅用 Node 内置模块 + 系统原生命令(PowerShell、osascript、notify-send)。
- 防刷屏 — 两次通知之间可设置最小间隔。
平台支持
| 系统 | 机制 | 前提 |
|---|---|---|
| Windows | WinRT toast(通知中心) | 无(运行时自动注册 AUMID) |
| macOS | osascript display notification |
macOS 10.8+ |
| Linux | notify-send(libnotify) |
libnotify;缺失时回退 zenity → kdialog |
工作原理(Windows)
- 首次通知时注册 AppUserModelID(
dsh.tasknotify)到HKCU\Software\Classes\AppUserModelId,使CreateToastNotifier能投递到交互桌面。 - 任务完成时,把标题/正文写入 UTF-8 临时文件,运行一段小 PowerShell 脚本,通过
ToastNotificationManager展示 WinRTToastText02通知。 - 之后删除临时文件;失败只写入日志、绝不抛错,不影响 Agent 运行。
每次通知(及失败)都会记录到审计日志 <home>/task-notify.log。
安装
作为 dsh bundle,可通过 profile 插件管理器安装:
dsh plugin --profile web add dsh-task-notify
或直接安装该仓库:
dsh plugin --profile web add github:YuMo226/dsh-task-notify
手动安装(无 pnpm)
把本包复制到 profile 的 hoisted node_modules,并添加 loader entry:
- insert:
- id: notify
name: dsh-task-notify
config:
onGoalComplete: true
onTurnEnd: true
title: 'DeepSeek Harness'
minIntervalMs: 4000
安装后请重启
dsh web以便插件挂载。
配置
| 键 | 类型 | 默认 | 说明 |
|---|---|---|---|
onGoalComplete |
boolean | true |
目标完成时通知 |
onTurnEnd |
boolean | true |
Agent 一轮正常结束时通知 |
title |
string | DeepSeek Harness |
通知标题 |
minIntervalMs |
number | 4000 |
相邻两次通知的最小间隔(防刷屏) |
常见问题
- Windows:确认通知中心已开启,专注助手未处于「仅闹钟」/「仅优先事项」模式。
- Linux:安装 libnotify(提供
notify-send);缺失时插件回退 zenity,再 kdialog。 - 若未弹通知,查看
<home>/task-notify.log的报错记录,并可提交 issue。