dsh-whale-notifier 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +83 -2
- package/assets/chime.wav +0 -0
- package/assets/notify.ps1 +718 -0
- package/assets/whale-dizzy.png +0 -0
- package/assets/whale-happy.png +0 -0
- package/client.js +120 -0
- package/cordis.patch.yml +4 -0
- package/docs/DETAIL.md +86 -0
- package/icon.svg +7 -0
- package/index.js +949 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +57 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 yyywaiwaiwia
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,84 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-whale-notifier
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> 本项目授权 [DSH Plugin](https://dsh-plugin.org/) 收录本仓库,并在该站展示插件信息。
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness 任务完成提醒插件。一轮任务结束时,屏幕右下角滑出一张纯白卡片:左边斜贴一枚鲸娘贴纸,右边是任务名和耗时。成功是开心鲸娘,出错是扶额晕头鲸娘;长任务名自动横向滚动,多张卡片自动往上叠而不重叠。点一下卡片会跳回对应会话并把 DSH 窗口拉到前台。
|
|
6
|
+
|
|
7
|
+
**一句话价值**:装上它,长任务在后台跑完时用一张会跳回会话的鲸娘贴纸卡片提醒你,不用一直盯着窗口。
|
|
8
|
+
|
|
9
|
+
> **仅支持 Windows 桌面版**。渲染用 PowerShell + WPF;缺少 WPF 时自动退回系统 toast。
|
|
10
|
+
|
|
11
|
+
## 安装
|
|
12
|
+
|
|
13
|
+
DSH 社区插件市场收录后,可在「插件中心」搜索 `dsh-whale-notifier` 一键安装。命令行安装:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
dsh plugin --profile web add dsh-whale-notifier
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
安装后在 **Plugins** 里启用 `task-notifier` 这一行,重启一次 DSH 以加载点击跳会话的宿主路由(插件热重载不换模块代)。
|
|
20
|
+
|
|
21
|
+
## 什么时候会弹
|
|
22
|
+
|
|
23
|
+
| 结束原因 | 行为 |
|
|
24
|
+
|---|---|
|
|
25
|
+
| `completed` 正常结束 | 弹(开心鲸娘) |
|
|
26
|
+
| `error` 出错 | 弹(晕头鲸娘,不受最短时长限制) |
|
|
27
|
+
| `ask_user_question` 向你提问 | 弹蓝色 info 卡(只提醒不抢答) |
|
|
28
|
+
| `max-tokens` / `blocked` | 默认静默,可在配置里打开 |
|
|
29
|
+
| `aborted` / `interrupted` / `forked` | 始终静默 |
|
|
30
|
+
| 子代理完成 | 默认不弹(可设 `notifySubagents: true`) |
|
|
31
|
+
| 用时短于 `minDurationMs` | 静默(error 例外) |
|
|
32
|
+
|
|
33
|
+
## 配置
|
|
34
|
+
|
|
35
|
+
写在 `cordis.patch.yml` 的 `config:` 里:
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
- insert:
|
|
39
|
+
- id: task-notifier
|
|
40
|
+
name: 'dsh-whale-notifier'
|
|
41
|
+
config:
|
|
42
|
+
style: card # card=贴纸卡片;toast=系统通知
|
|
43
|
+
holdMs: 5200 # 卡片停留毫秒(<1200 会钳回 5200)
|
|
44
|
+
jumpOnClick: true # 点卡片跳到对应会话
|
|
45
|
+
sound: true # 出现时播提示音
|
|
46
|
+
minDurationMs: 5000 # 短于此时长不提醒(error 例外)
|
|
47
|
+
notifySubagents: false
|
|
48
|
+
notifyOnQuestion: true
|
|
49
|
+
notifyOnError: true
|
|
50
|
+
notifyOnMaxTokens: false
|
|
51
|
+
notifyOnBlocked: false
|
|
52
|
+
maxTitleChars: 16
|
|
53
|
+
maxStatusChars: 80
|
|
54
|
+
replayWindowMs: 60000
|
|
55
|
+
minNotifyIntervalMs: 1500
|
|
56
|
+
appId: com.deepseek.dsh
|
|
57
|
+
powershellPath: '' # 留空用系统自带 Windows PowerShell
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
完整配置说明见 [docs/DETAIL.md](docs/DETAIL.md)。
|
|
61
|
+
|
|
62
|
+
## 实现与素材
|
|
63
|
+
|
|
64
|
+
- 卡片由独立的 PowerShell/WPF 进程绘制,不改动 DSH 自身文件,不写注册表;只在 `%TEMP%\dsh-task-notifier\` 下放几个临时文件(槽位、点击队列、诊断日志)。
|
|
65
|
+
- 鲸娘贴纸为本项目自生成图(本地 ComfyUI 图生图 + 自写去白底脚本),未引用第三方表情包素材。
|
|
66
|
+
- 提示音 `assets/chime.wav` 为 2.7 秒单声道音效。
|
|
67
|
+
|
|
68
|
+
## 兼容与分类
|
|
69
|
+
|
|
70
|
+
- 能力分类:会话与消息 `session` / 通知与提醒
|
|
71
|
+
- 兼容:DSH >= 0.2.0-rc.5,Node.js >= 20;仅 Windows 桌面版(需 WPF,缺失时退回系统 toast)
|
|
72
|
+
- 权限:只读任务结束事件、在临时目录写少量状态文件;无外部网络服务
|
|
73
|
+
- 已知限制:macOS / Linux 下不弹卡片
|
|
74
|
+
|
|
75
|
+
## 开发
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm run check # 语法检查
|
|
79
|
+
npm test # 38 项冒烟测试
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
MIT
|
package/assets/chime.wav
ADDED
|
Binary file
|