dsh-plugin-completion-notify 0.1.0

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/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # dsh-plugin-completion-notify
2
+
3
+ 任务完成时弹出**系统桌面通知**的 dsh web 插件(`dsh-plugin` 社区插件)。
4
+
5
+ ## 功能
6
+
7
+ - **非当前会话完成** → 弹出系统通知(无论页面在前台还是后台)
8
+ - **当前会话在后台完成**(用户切走/最小化,`document.hidden`)→ 弹出系统通知
9
+ - 当前会话在前台完成 → 不打扰(你看得到)
10
+ - 同一会话完成只通知一次;会话恢复/移除后再次完成可再通知
11
+ - General 设置页提供启用开关(默认开启)
12
+ - 权限在用户首次交互或开启开关时请求(浏览器要求手势)
13
+
14
+ ## 依赖
15
+
16
+ peer 依赖(npm 已发布):
17
+ - `@deepseek-ai/cordis`
18
+ - `@deepseek-ai/dsh-client-locale`
19
+ - `@deepseek-ai/dsh-client-runtime`
20
+ - `@deepseek-ai/dsh-client-ui-settings`
21
+ - `@deepseek-ai/dsh-client-ui-slots`
22
+ - `@deepseek-ai/dsh-settings`(host 半注册 settings 命名空间)
23
+ - `@deepseek-ai/schemastery`(host 半 settings schema)
24
+ - `react`
25
+
26
+ ## 构建
27
+
28
+ ```sh
29
+ pnpm install
30
+ pnpm run build
31
+ ```
32
+
33
+ 产物:`lib/index.js`(host 半,注册 `ui-completion-notify` settings 命名空间)、`lib/client.js`(浏览器半)。
34
+
35
+ ## 挂载
36
+
37
+ 在 dsh profile 的 `cordis.patch.yml` 加行:
38
+
39
+ ```yaml
40
+ - insert:
41
+ - id: completion-notify
42
+ name: dsh-plugin-completion-notify
43
+ ```
44
+
45
+ 并确保插件包可被 profile 解析(workspace 链接或 npm 安装)。
46
+
47
+ ## 发布
48
+
49
+ ```sh
50
+ npm publish
51
+ ```
52
+
53
+ GitHub 仓库添加 `dsh-plugin` 话题。
54
+
55
+ ## 已知限制
56
+
57
+ - **浏览器通知权限必须授予**:首次交互时请求;被拒则静默
58
+ - **页面关闭后无通知**(无 service worker push)
59
+ - **刷新后可能补弹一次**:去重集合是页面生命周期内的内存态