task-complete-notify-for-dsh

notifynpmMIT

Sends a desktop notification and chime when a DeepSeek Harness run completes, errors, or waits for approval, with a configurable duration threshold.

下载量 / Downloads
669

Install

dsh plugin --profile web add task-complete-notify-for-dsh

Sandbox test

This plugin has not been tested yet. Submit a test →

README

task-complete-notify-for-dsh

DSH (DeepSeek Harness) plugin: desktop notification + chime when a run finishes — completion, errors, and approval requests — with a configurable duration threshold.

The essence: a custom chime that works on all three OSes. Replace
lib/assets/prompt-tone.mp3 with any audio you like and the sound changes
everywhere — Windows, macOS, Linux — not just Linux.

Cross-platform

Runs on Windows, macOS and Linux from the same package — no code changes.

Notification and the custom chime work on each OS (see

[Platform support](#platform-support)).

Features

Feature · Details

Run completion · ✅ notify + chime

Run error (turn/end reason=error) · ✅ critical "任务失败"

Approval request (approval/asked) · ✅ critical "等待审批"

Model question (ask_user_question) · ✅ critical "模型需要你回答"

Duration threshold · ✅ configurable

Model-callable notify tool · ✅ (rate-limited)

notify-threshold command · ✅ persists to user config

Cross-platform · ✅ Windows / macOS / Linux

Custom chime · ✅ chimeFile config or replace the mp3

i18n messages · ✅ lang: 'zh' (default) or 'en'

Anti-spam cooldowns · ✅ for approval retries and tool calls

Failure diagnostics · ✅ every notification/persistence failure is logged

Why this is a safer install than curl | bash plugins

This package ships pre-built lib/ with no prepare/postinstall/install build script — dsh plugin add has nothing to execute beyond loading the published JS. Build-time code only runs on the author's machine at publish (prepublishOnly), never on your machine at install. This avoids the "install runs a remote build script" supply-chain concern.

Install

Source: github.com/lxp731/agents-plugins/tree/main/task-complete-notify-for-dsh

From npm (recommended):

dsh plugin --profile web add task-complete-notify-for-dsh

From the GitHub monorepo (alternative): the plugin lives in the

agents-plugins monorepo, so point dsh at the subdirectory with #path::

dsh plugin --profile web add github:lxp731/agents-plugins#path:/task-complete-notify-for-dsh

Then restart dsh web. Or via the dsh-market panel: Settings → Plugin Market.

How it works

  • One notification per run, not per turn. A run can span many turns; the plugin records the latest turn/end reason and fires once when the root agent returns to agent/status 'idle' (the harness's own "run ended" signal).
  • Errors and token limits carry the final turn/end reason, so a run that errors gets a critical "任务失败" with the true final result.
  • Approval / question fire an immediate critical notification, because each is a separate "the session is waiting on you" moment.
  • Subagent sessions are excluded (header.origin === 'subagent') so a top-level run produces one notification.

Configuration

Declare the row in ~/.dsh/profiles/web/cordis.patch.yml (the user layer, applied last):

- id: task-complete-notify
  name: task-complete-notify-for-dsh
  config:
    enabled: true             # master switch
    threshold: 0              # min run duration (s) before notifying; 0 = always
    title: DeepSeek Harness   # notification title
    sound: true               # play a chime
    onQuestion: true          # notify when the model asks a question
    onApproval: true          # notify when the harness waits for approval
    chimeFile: ''             # absolute path to a custom mp3; empty = bundled default
    lang: zh                  # message language: 'zh' (default) or 'en'
    blockedCooldownSec: 60    # min seconds between question/approval notifications per session
    toolCooldownSec: 10       # min seconds between model-invoked notify tool calls

Field · Type · Default · Description

enabled · boolean · true · Master switch; false disables everything

threshold · number · 0 · Only notify when the run took longer than this (seconds). 0 = always notify

title · string · DeepSeek Harness · Notification title

sound · boolean · true · Play a chime with the notification

onQuestion · boolean · true · Notify when the model calls ask_user_question

onApproval · boolean · true · Notify when the harness waits for approval

chimeFile · string · '' · Absolute path to a custom chime mp3, e.g. /usr/local/music/xx.mp3. Overrides the bundled prompt-tone.mp3. Empty uses the default

lang · string · 'zh' · Message language for notifications and command replies ('zh' / 'en')

blockedCooldownSec · number · 60 · Minimum seconds between blocking-event notifications (question/approval) for the same session — retries no longer spam while you're away

toolCooldownSec · number · 10 · Minimum seconds between model-invoked notify tool calls; faster calls return { ok: false, throttled: true }

Runtime threshold (/notify-threshold) — persists

/notify-threshold <秒> sets the threshold and persists it to the user layer

(cordis.patch.yml), so it survives a restart — no need to edit the file by

hand. With no argument it prints the current value. Example:

/notify-threshold 30 notifies only on runs longer than 30s.

Custom chime (chimeFile)

Point chimeFile at your own audio file to override the bundled prompt:

- id: task-complete-notify
  name: task-complete-notify-for-dsh
  config:
    chimeFile: /usr/local/music/xx.mp3

Any mp3 works; the file is played on all platforms (see Platform support). If

chimeFile is configured but the file is missing, the plugin logs a warning at

startup and falls back to the default.

Model-callable notify tool

The model can explicitly notify the user for important events:

notify(message: "Dat

…(truncated)

Rendered from the README published on npm. Formatted only, not edited.

Versions

Published on npm::2,最后更新 2026-08-25

Links

GitHub · Homepage · npm

Same category