s11phere/dsh-away-notify

dsh 插件:离开 dsh 页面时可收到桌面通知,点击回到对应会话。Windows / WSL 原生 Toast,零依赖。

Project Overview项目介绍

dsh-away-notify is a desktop-notification plugin built specifically for DeepSeek Harness. It ships with zero runtime dependencies and no build step, and is installed via the dsh plugin add command or, for the web profile, dsh plugin --profile web add /path/to/dsh-away-notify, after which it is loaded at dsh web startup and surfaces in dsh --profile web --dump-config. The plugin covers three deployment shapes: native Windows runs shell out to powershell.exe and emit WinRT Toasts; dsh running inside WSL forwards the call to a Windows-side powershell.exe; and plain Linux desktops fall back to notify-send, degrading to log-only when that binary is missing. It fires on five event categories — turn complete, turn error/aborted/max-tokens, awaiting approval, agent question, and goal complete — each of which can be toggled independently in cordis.patch.yml, and combines them with a 45-second-TTL presence detector so notifications are suppressed only while a fresh, visible, focused dsh tab exists.

The typical workflow is to check the repo out onto the same drive as $DSH_HOME (Windows users are pointed at scripts\install-windows.ps1, which guards against the cross-drive silent failure), run the add command, then restart dsh web and hard-refresh the browser so that the client-side bundle is picked up. Long-running jobs then notify on completion, error, or goal milestones only when the user has actually left the dsh tab; on Windows the Toast is sent with scenario="reminder" so it stays on screen until clicked or until that session is revisited, and the click handler focuses the originating window — preferring an existing dsh tab, using UI Automation to select the right tab when title matching fails, and finally opening a new window — in roughly 0.1–0.2 seconds. The target audience is Windows and WSL users who leave dsh Web running for long sessions, rely on /goal automations, or run multiple dsh instances side by side and need a way to be alerted without sitting at the browser.

Dependencies include Windows 10/11 with WinRT Toast support, a WSL setup that can reach Windows-side powershell.exe, and a persistent small Node helper process that handles click focusing, UI Automation tab selection, and the dshnotify:// protocol registration. The default includeToken: true embeds the localhost startup token into the Toast's click URL so a click works even with the browser fully closed, which means the token will appear in the local Windows notification history — users uncomfortable with that can flip it off, accepting that a fully closed browser will then land on a 401 page. First-run checks should temporarily enable notifyOnLoad: true and debug: true in cordis.patch.yml to confirm wiring via a one-shot Toast plus $DSH_HOME/dsh-away-notify.log, then disable them so startup is silent and the log file does not grow unbounded; node scripts/selftest-notify.mjs can independently validate the toast channel without dsh running at all. Multi-instance Windows+WSL setups must keep titleTag: true so the port-tagged title distinguishes windows, and the plugin is licensed under MIT.

dsh-away-notify 是一个为 DeepSeek Harness 量身定制的桌面通知插件,零运行时依赖、零构建步骤,通过 dsh plugin add 或 dsh plugin --profile web add <路径> 即可挂载到 web profile,并随 dsh web 启动加载。插件同时覆盖三类部署形态:Windows 原生运行走 powershell.exe 调用 WinRT Toast,WSL 内的 dsh 转发到 Windows 侧的 powershell,普通 Linux 桌面则降级使用 notify-snd,缺失时只记录日志。它触发五类事件——回合完成、出错或中断或达到输出上限、等待审批、agent 提问、goal 完成——且每类均可独立开关,配合 45 秒 TTL 的在场状态判定,确保提醒不会在你正看 dsh 标签页时打扰你。

典型工作流是:把插件检出到与 $DSH_HOME 同一盘符的目录(Windows 推荐用仓库自带的 scripts\install-windows.ps1 一键安装器),运行 dsh plugin --profile web add 后重启 dsh web 并刷新浏览器,通过 cordis.patch.yml 调整七类开关、冷却时间、子代理过滤与点击回跳行为;任务跑长时离开座位,Windows 上 Toast 用 scenario="reminder" 常驻,点击即可在 0.1–0.2 秒内聚焦到出事的那条会话。目标用户是长时间挂着 dsh Web、依赖 /goal 长时间运行、或同时跑多个 dsh 实例的 Windows / WSL 用户,需要避免桌面静默黑洞、又要能在离开时收到通知并一键回到具体会话。

依赖方面需要 Windows 10/11 支持 WinRT Toast、WSL 需能跨边界调用 powershell.exe,并依赖一个常驻的 Node 小助手进程做点击聚焦与 UI Automation 选标签;includeToken: true 会把 localhost 启动 token 写入通知中心历史记录,不接受可关掉。首次运行建议先在 cordis.patch.yml 里临时打开 notifyOnLoad 与 debug 确认通路,再关闭;多实例共存时需保留 titleTag: true 才能按端口区分窗口。许可证为 MIT。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
  • Desktop client: installation downloads an executable - verify the publisher and checksums桌面客户端:安装会下载可执行文件,请核对发布者与校验和
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:s11phere/dsh-away-notify

把 s11phere/dsh-away-notify 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-away-notify

像 Codex 那样提醒你:只有当你没在看 dsh 页面时,任务完成 / 出错 / 等待审批 / agent 提问 / goal 完成才弹桌面通知,点击通知能回到对应会话。

零运行时依赖、零构建,dsh plugin add 装完即用。

部署形态

部署形态 通知通道
dsh 原生跑在 Windows powershell.exe → WinRT Toast
dsh 跑在 WSL 里 调 Windows 侧 powershell.exe → WinRT Toast
dsh 跑在普通 Linux 桌面 notify-send(缺失则降级为只记日志)

⚠️ Windows 用户请先看 docs/windows.md。 插件检出与 $DSH_HOME 不在 同一盘符时,dsh plugin add 会静默装出一个永远不会加载的插件——退出码还是 0。仓库里带了 一键安装器替你兜住这件事,见 Windows 原生。


安装

Windows 原生

先读 docs/windows.md(跨盘符会把插件装坏,而且没有任何报错)。用仓库里的 安装器,它会跑正常命令、校验结果、并修好 pnpm 弄坏的东西:

cd <插件检出目录>
powershell -NoProfile -ExecutionPolicy Bypass -File scripts\install-windows.ps1

WSL / Linux

dsh plugin --profile web add github:s11phere/dsh-away-notify

直接从 GitHub 装(pnpm 会自己去 clone,不需要本地检出)。要装你改过的版本,就把最后的 spec 换成检出目录的绝对路径:dsh plugin --profile web add /path/to/dsh-away-notify。

装完之后

重启 dsh web,并刷新浏览器页面。

新增 bundle 只有启动时才会被读进 dsh.profile.bundles;浏览器半部(client.js)也需要刷新 页面才会加载。profile 的 cordis.patch.yml 是热监视的,改配置不用重启。

验证是否挂上(不启动服务):

dsh --profile web --dump-config | grep -A2 dsh-away-notify

首次接线自检

先确认「通知通道」本身是通的,不必等真实的回合结束:

node scripts/selftest-notify.mjs "标题" "正文"

它会实际弹一条 Toast,并回读 Windows 通知中心来客观确认落地。再要看插件侧的日志(已加载 / 已抑制(<原因>) / 已撤回通知),在 profile 的 cordis.patch.yml 里临时打开 notifyOnLoad 与 debug,步骤与接线成功的标志见 docs/windows.md 的「通知通道自检」——确认通路后记得把这两项 关掉。

出问题了先看故障排查:不弹 / 点了回不去 / 提醒赖着不走都有对照表。


配置

在 profile 的 cordis.patch.yml 里按 id 覆盖(该文件被热监视,但新增 bundle 后首次仍需重启):

- id: dsh-away-notify
  config:
    # 五类触发
    onTurnComplete: true
    onTurnError: true
    onTurnAborted: true
    onTurnMaxTokens: true
    onApproval: true
    onQuestion: true
    onGoalComplete: true
    # 行为
    suppressGoalRounds: true   # /goal 中间轮次静默
    rootsOnly: true            # 子代理会话不打扰
    cooldownMs: 10000          # 同会话同类型最小间隔
    presenceTtlMs: 45000       # 在场状态有效期
    previewMaxChars: 140       # 正文摘要截断长度
    sound: true                # 系统提示音
    openOnClick: true          # Toast 可点击回跳
    persistent: true           # 通知一直停留,直到点它或切回 dsh
    dismissOnReturn: true      # 切到某会话时撤回它自己的通知(按会话比对,不误伤别的会话)
    includeToken: true         # URL 带鉴权 token(取舍见 docs/security.md)
    useProtocolHandler: true   # 注册 dshnotify: 协议,点击优先聚焦已有窗口
    titleTag: true             # 给标题加 [dsh:<port>],多实例时精确聚焦对应窗口
    spoolDir: ''               # 点击请求与焦点助手的工作目录;留空 = <插件目录>/.focus-spool
    focusWindowMarker: 'DeepSeek Harness'  # 用窗口标题里的这个串识别 dsh 窗口
    focusTtlMs: 90000          # 「待跳转会话」有效期
    titlePrefix: 'DSH'
    appName: 'DeepSeek Harness'
    appId: 'DeepSeek Harness'  # Windows 通知来源名
    webUrl: ''                 # 留空则自动探测
    debug: false               # 写文件日志
    notifyOnLoad: false        # 加载时发自检通知

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-manager-plugin 下一个 Next pixel-skin →