When developing an Agent or executing tasks in the DSH (DeepSeek Harness) environment, confirming whether a task has completed is a frequent operation in daily development. Usually, developers need to manually refresh the interface or check logs to obtain the status. This plugin detects task status through a polling mechanism and pops up a completion notification in the bottom right corner of the desktop when the task finishes (similar to the behavior of opencode), solving the inconvenience of manual confirmation.
Plugin Overview¶
This is a DeepSeek Harness plugin maintained by weijianguizhou. Its core value is to pop up a completion notification in the bottom right corner of the desktop when a task/Agent run finishes. The plugin runs as a pure client-side enhancement bundle and does not modify any official code.
Core Features¶
- Task completion detection: Polls
sessions.listto detect changes in session status from “running” to “stopped” (using the same mechanism as the task board). - Result determination: Reads
turn/endevents fromsessions.historyand determines the result based onreason.kind:erroris treated as failure,cancelled/abortedas cancellation, and all others as success. - Desktop notification: Prioritizes the native
Notificationfrom the Electron renderer process (system notification in the bottom right corner on Windows); if unavailable, it falls back to an in-page toast in the bottom right corner. - Do not disturb: Notifications are only shown when the window is not in the foreground. A 4-second polling interval and a 3-second minimum notification interval are configured to prevent notification spam.
- Theme-adaptive: The color of the fallback toast is taken from DSH theme variables (
--dsw-*). - Zero intrusion: As a pure client-side enhancement bundle, it does not modify any official code.
Installation and Enablement¶
In the target profile, install it as a link dependency and add it to the bundle layer:
dsh plugin --profile desktop add link:/path/to/dsh-task-notify
Or manually add the dependency to profiles/<name>/package.json, and ensure the plugin appears in the dsh.profile.bundles list. After installation, restart DSH Desktop to make it take effect.
How It Works¶
- Registration: The client bundle (
lib/client.js) registers asdsh.client.platform: web, is scanned by the harness’sClientModuleRegistry, and is delivered to the browser. - Polling: The plugin calls
connection.api.sessions.list({})every 4 seconds, maintaining a set of “running sessions”. - Determination: When a session changes from running to stopped, it calls
connection.api.sessions.history({ sessionId })to obtain theturn/endevent. - Notification: The result is determined based on the event’s
reason.kind. If the window is not focused, a nativeNotificationis used to show the notification; if that fails, an in-page.ntf-toastis rendered.
Notes¶
- The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license before installation.
- Notifications are triggered only when the window is not in the foreground.
- To prevent notification spam, a minimum notification interval of 3 seconds and a polling interval of 4 seconds are configured.
Conclusion¶
dsh-task-notify provides visualized feedback for DSH task execution through native system notifications and an in-page fallback mechanism. This plugin is a community plugin. Its source code and directory are accessible at the following links: