hotpot-labs/dsh-notifier-plugin0

dsh-notifier-plugin

Native desktop notifications for DeepSeek Harness (dsh): run completion, model questions, and approval requests on macOS, Linux, and Windows. Includes a web settings card consistent with the dsh web UI.

包名
dsh-notifier-plugin
版本
0.1.0
许可证
MIT
最近更新
2026年9月2日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:hotpot-labs/dsh-notifier-plugin

Usage

  1. After installing, restart the web process (dsh --profile web web) and hard-refresh the page.
  2. Grant the notification permission: open the settings card and click Send test notification — the recommended way, since browsers require a user gesture for requestPermission().
  3. Toggle options in the card; changes take effect live, no restart.

Notifications fire only while a dsh web page (or the Tauri desktop window) is open — delivery lives in the webview, so a headless CLI run with no connected page produces none.

Notification bodies

EventBody
run completed任务已完成 - 任务:
run failed任务失败 - 任务:…
aborted / max-tokens / blocked / interrupted任务已中止 / 任务达到 token 上限 / 任务被阻塞 / 任务被中断
question需要回答: —
approval需要批准: — —

The session title comes from the session list row (a host projection) — very early notifications may omit it.

Permissions

  • Browser: the first notification (or the card's Send test notification button) triggers the permission prompt. Note that a requestPermission() call without a user gesture is silently denied by modern Chrome — if the first real notification doesn't prompt, click Send test notification once (a real click counts as the required gesture). If you previously denied it, re-enable notifications for the dsh origin in your browser's site settings.
  • Tauri: granted via requestPermission() from the notification plugin; macOS may additionally ask at the OS level on first use.

macOS: the OS level can still block banners

Even with the site permission granted, macOS decides whether banners actually appear:

  1. System Settings → Notifications → Google Chrome (or your browser / the Tauri app): enable Allow notifications, and pick the Banners style (Alerts work too but stay until dismissed). Chrome posts web notifications through Google Chrome Helper (Alerts) — if that entry exists, check it as well.
  2. Focus / Do Not Disturb: an active Focus mode suppresses banners without any error anywhere.
  3. Quick self-check in the DevTools console of the dsh page:
    Notification.permission                       // must be "granted"
    new Notification('测试', { body: '手动测试' })  // granted but no banner => OS-level blocking
    
    If the manual notification also shows nothing, the cause is in macOS settings, not the plugin.

The plugin logs every delivery decision at debug level (filter the console by dsh-notifier-plugin): notify delivered means the notification was constructed successfully — if no banner follows, it's the OS/browser layer; notify skipped (permission) means the site permission is missing.