dsh-win-approval-notify
中文文档 · English
A DeepSeek Harness (DSH) desktop plugin: sends a native Windows toast notification when DSH needs your approval, is waiting for your answer / review, or finishes a turn — with the full reason in the notification. Every switch is graphical, on DSH's Plugins page, and applies on save — no restart.
- Delivery channel: WinRT toast through Windows PowerShell 5.1; the source shows as DeepSeek Harness (AUMID
com.deepseek.dsh) and lands in the Windows notification center. - The "session" field shows the session title (the workspace folder name when there is no title), never the session id.
- It only listens to session events; it does not register the
approval/request/user-questions/requestwaterfalls, so it never takes part in approving or answering. - Every scenario can be turned off independently; the approval scenarios also support a tool-name allowlist.
- Background tasks (subagents, e.g. dsh-mnemon's memory housekeeping) are not announced by default; enable them on the settings page if needed.
Requirements
- Windows 10/11 with
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exepresent (the WinRT toast projection is only available in PowerShell 5.1). - DSH desktop, profile
desktop, runtime0.2.x(developed on0.2.1-rc.3). - In Windows Settings → System → Notifications, allow "DeepSeek Harness" and turn off Focus Assist / Do Not Disturb (on Windows 11 also clear "turn on do not disturb automatically when using full screen").
Install
Option 1 — Add it inside DSH (recommended)
- Open DeepSeek Harness and click Plugins in the sidebar.
- Click Add plugin.
- Enter the package name
dsh-win-approval-notify(to pin a version, writedsh-win-approval-notify@0.1.1) and click Install. - Fully quit and restart DeepSeek Harness once installed.
If the default install source (the China mirror) cannot find the package yet, switch the install source to the official npm registry and install again.
Option 2 — Command line
Run this in a normal PowerShell window (not DSH's sandboxed terminal):
& "<DSH install dir>\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add dsh-win-approval-notify
Option 3 — local link: for development
Point it at the cloned directory:
& "<DSH install dir>\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add "link:E:/codeDir/ds_tools/dsh-approval-notify"
Then fully quit and restart DeepSeek Harness (session history is preserved). dsh plugin add installs the dependencies into the profile and adds this package to dsh.profile.bundles.
For a local link: install, install the dependencies (@deepseek-ai/schemastery, @deepseek-ai/cosmokit) in this directory first with pnpm install; an install from npm brings them along automatically.
To verify it loaded: Plugins → Installed → dsh-win-approval-notify → row approval-notify; the row details should show a Configure button.
Configuration
Plugins → dsh-win-approval-notify → row approval-notify → Configure. The page has four groups:
| Group | Contents |
|---|---|
| What to notify about | approval (+ tool allowlist), questions, plan review, turn finished / errored / blocked / interrupted / limit reached (8 independent switches) |
| Trigger and pacing | background-task switch, per-session cooldown, delayed coalescing, concurrent-notification cap |
| Notification appearance | display duration, silent, title prefix, AUMID, whether to include the full reason / question text |
| Diagnostics | send a test notification per scenario, last result, log paths, debug logging |
The page only writes when you click Save; the write goes into the current profile's Cordis patch and takes effect immediately through a volatile config reference (no restart). Restore defaults resets the draft only and still needs a Save.
The default values are also written into cordis.patch.yml, so the plugin works even if the settings page has never been opened.
Self-test
- Open the settings page → Diagnostics → pick a scenario → Send test notification: the matching toast should appear and the page reports success or the failure reason.
- Real scenario: have the agent run an operation that needs a permission upgrade (for example writing a file outside the workspace) → the approval panel appears and a notification arrives after about 0.5 s.
- You can also verify the channel without DSH, in a normal PowerShell window:
$ps = "$env:SystemRoot\System32\WindowsPowerShell\v1.0\powershell.exe"
$task = Join-Path $env:TEMP "dsh-toast-test.json"
'{"title":"Test","body":"Channel OK","appId":"com.deepseek.dsh","duration":"long","silent":false}' | Set-Content $task -Encoding UTF8
& $ps -NoProfile -ExecutionPolicy Bypass `
-File "$env:USERPROFILE\.dsh\profiles\desktop\node_modules\dsh-win-approval-notify\lib\toast.ps1" `
-TaskFile $task
Note: a PowerShell process launched inside DSH's sandboxed terminal runs at Low integrity, and Windows rejects WinRT toasts from it (
0x80073D54). Run channel self-tests in a normal PowerShell window.
Troubleshooting
- No notification at all: check that the master switch and the switch for that scenario are both on; the Windows notification master switch; Focus Assist; and whether the app was restarted (the first run after installing always needs a restart).
- It is in the notification center but no banner appears: Windows Settings → System → Notifications → find "DeepSeek Harness" → toggle "Show notification banners" off and on again. That rewrites the app's banner switch into the system and has been observed to fix "lands in the center but no banner".
- Logs:
%TEMP%\dsh-win-approval-notify\notify.logrecords delivery / skip / failure;%TEMP%\dsh-win-approval-notify\toast-error.logrecords the HRESULT when the toast itself fails;%TEMP%\dsh-win-approval-notify\diag.logrecords the notification status the system reports for this app (Enabled/ empty), which is what to use for banner problems. - Toast rejected:
toast rejectedshows up in the log; the plugin then tries a native topmost card as a fallback. Usually the AUMID is not registered or system notifications are off — leave AUMID empty on the settings page (use the default) or check the Windows notification settings. - Background tasks are announced too: settings page → Trigger and pacing → turn on "Do not notify for background tasks" (on by default). Subagents and dsh-mnemon memory housekeeping count as such.
- Settings page is missing: check that the profile was restarted and that the
approval-notifyrow is enabled; older DSH versions have noplugins.row.configslot, in which case editcordis.patch.ymlinstead (functionality is unaffected).
Uninstall
& "E:\azml\deepseek\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop remove dsh-win-approval-notify
Then restart the app. The plugin is its own bundle row, so removing it does not affect other plugins; override values written by the settings page stop applying along with the row.
Security
- It makes no network requests and reads no credentials; it writes no files other than the task files / logs under
%TEMP%\dsh-win-approval-notify\. - Notification text reaches PowerShell only through a UTF-8 JSON task file and is never spliced into a command line.
- Logs record only the event type, a short session id, the tool name and the outcome — never the full reason / question text.
- The diagnostics route accepts loopback requests only and returns non-sensitive status only.
License
MIT
No comments yet. Be the first to write one.