New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

dsh-task-notify

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsh-task-notify

DSH task completion system notifications (host-side node-notifier)

npmnpm
Version
0.1.0
Version published
Weekly downloads
81
62%
Maintainers
1
Weekly downloads
 
Created
Source

dsh-task-notify

DSH(DeepSeek Harness)插件:模型完成一轮任务(回合完成)后弹出系统通知。

  • 触发信号:session/event → turn/end(reason.kind === 'completed')
  • 通知方式:host 端 node-notifier(Windows 通知中心 / macOS / Linux 原生通知)
  • 正文预览:该轮最后一条 assistant 消息的开头文本(可配置长度)
  • 防打扰:默认仅在页面不在前台时通知;快速回复(< minTurnMs)不通知;子代理会话默认不通知

安装

# 从 npm(发布后)
dsh plugin --profile web add dsh-task-notify

# 本地开发(link)
cd ~/.dsh/profiles/web
pnpm add "dsh-task-notify@link:D:\DeepSeekHarness\dsh-task-notify"

host 端改动需重启 dsh web;client 设置面板改动硬刷新即可。

配置

在 DSH 设置页的「任务通知」区块,或通过 cordis patch 覆盖:

- id: task-notify
  name: 'dsh-task-notify'
  config:
    enabled: true
    onlyWhenBlurred: true
    notifyOnError: false
    maxBodyChars: 120
    minTurnMs: 0
    sessions: top-level   # all | top-level
    showCwd: true

工作原理

  • host 端订阅 ctx.on('session/event'),turn/end 且 reason 为 completed 时触发
  • 从会话日志提取该 turn 最后一条 assistant/message 的文本作正文
  • client 端通过 /task-notify/api/visibility 上报页面可见性,host 据此做 onlyWhenBlurred 门控
  • 所有 /task-notify/api/* 路由经过与 /api 相同的 Host 头信任围栏

构建

pnpm install
pnpm build    # tsc + tsdown → lib/index.js + lib/client.js

Keywords

dsh

FAQs

Package last updated on 15 Aug 2026

Related posts