TARS-snail/dsh-notify0

dsh-notify

DSH 会话桌面通知插件:仅在用户离开时,针对任务完成和用户提问发送系统通知。

AI 分析

核心用途是在后台运行长任务时,及时提醒用户智能体的最新状态。适合经常让 AI 执行耗时任务并切到其他窗口工作的用户。

包名
dsh-notify
版本
0.1.1
许可证
MIT
最近更新
2026年8月25日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:TARS-snail/dsh-notify

2. 安装进某个 profile(首次使用该 profile 会自动初始化)

dsh plugin --profile web add /path/to/DSH_remind


`dsh plugin` 检测到包声明了 `dsh.bundle` 后,会自动把它追加进该 profile 的 `dsh.profile.bundles` 层列表。重启该 profile(如 `dsh web`)后生效。

### 从 GitHub 安装

发布到仓库后:

```sh
dsh plugin --profile web add github:you/dsh-notify#

git 依赖安装时 pnpm 会执行 prepare 脚本(即 npm run build)自动构建 lib/;pnpm ≥ 10 需要你在 profile 目录的 pnpm-workspace.yaml 里允许执行构建脚本(首次 add 失败时 dsh 会打印确切的键):

allowBuilds:
  dsh-notify: true

验证配置层(不启动)

dsh --profile web --patch /path/to/DSH_remind/cordis.patch.yml --dump-config

### 验证配置层(不启动)

```sh
dsh --profile web --patch /path/to/DSH_remind/cordis.patch.yml --dump-config

## 配置

默认零配置可用。在 profile 的 `cordis.patch.yml`(用户层)中按 id 覆盖该行:

```yaml
- id: notify
  name: dsh-notify
  config:
    backend: notify-send
    urgency: normal
    expireMs: 10000
    onTurnComplete: true
    onGoalComplete: true
    onUserQuestion: true
    onlyQuestionsWithChoices: false
    onlyWhenAway: true
    presenceTtlMs: 45000
    playSound: true
    titlePrefix: DSH
    previewMaxChars: 120
    debounceMs: 1000
字段类型默认说明
backendauto | notify-send | console | commandautoauto:有 notify-send 用桌面通知,否则降级控制台
commandstring''command 后端的命令模板,经 /bin/sh -c 执行;{title}{message} 被替换,引号转义由命令作者负责
urgencylow | normal | criticalnormalnotify-send 的紧急度
expireMsnumber10000notify-send 展示时长(毫秒,0 = 常驻直到关闭)
titlePrefixstringDSH通知标题前缀
onTurnCompletebooleantrue一轮回答完成时通知
onGoalCompletebooleantruegoal(长期任务)完成时通知
onUserQuestionbooleantrueagent 提问时通知
onlyQuestionsWithChoicesbooleanfalsetrue 时只通知带选项(需选择)的问题
onlyWhenAwaybooleantruetrue 时,正在浏览该会话(当前标签页且窗口有焦点)就不弹通知;离开才弹
presenceTtlMsnumber45000浏览器上报的在场状态有效期(毫秒);标签页停止上报(崩溃/断连)后超过该时长即视为离开
playSoundbooleantrue弹通知时播放系统默认提示音(canberra-gtk-play -i messagepw-play/paplay 兜底)
previewMaxCharsnumber120通知正文中回答摘要/目标内容的截断长度
debounceMsnumber0 及以上同类通知的最小间隔(毫秒),避免同一时刻连发多条

自定义命令示例(macOS):

config:
  backend: command
  command: 'osascript -e "display notification \"{message}\" with title \"{title}\""'