@game25011/dsh-notify-toast 0.4.2 → 0.4.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.3 — 2026-11-07
4
+
5
+ - 修复 DSH 0.2.2 设置页导航图标重复:优先注册原生 `settings.section.icon` slot,让 shell 用铃铛替换默认齿轮;旧版 DSH 保留 DOM fallback。
6
+ - 未改变通知核心逻辑;单测、client smoke 和 Host probe 通过。
7
+
3
8
  ## 0.4.2 — 2026-11-07
4
9
 
5
10
  - 元数据与兼容声明补丁:支持 DSH Desktop 0.2.2-rc.1,`engines.dsh` 显式覆盖 `0.2.2-rc.x` 范围,更新 README 徽标。
package/README.en.md CHANGED
@@ -8,15 +8,19 @@ English | [中文](./README.md)
8
8
 
9
9
  > An unofficial, MIT-licensed Windows 10/11 plugin for DSH that provides native Windows background toast notifications without disturbing focus, featuring an unread taskbar badge that counts distinct root sessions (counting multiple completions in the same session as one, showing numbers 1–3 and a red dot for over 3). Major code was generated by an AI coding assistant, with the human maintainer responsible for requirements, debugging, testing, and release.
10
10
 
11
- - Source/local package: `dsh-notify-toast` · Version: `0.4.2` · License: MIT
12
- - npm package: `@game25011/dsh-notify-toast@0.4.2` (scoped distribution; the repository package name stays `dsh-notify-toast`).
11
+ - Source/local package: `dsh-notify-toast` · Version: `0.4.3` · License: MIT
12
+ - npm package: `@game25011/dsh-notify-toast@0.4.3` (scoped distribution; the repository package name stays `dsh-notify-toast`).
13
13
  - Chinese display name: 桌面通知(Windows 原生 toast); the npm package name, directory, and row id stay ASCII `dsh-notify-toast` (a documented naming exception).
14
14
  - Works with: DeepSeek Harness Desktop `0.2.2-rc.1` (Electron shell, `desktop` profile), Windows 10/11
15
15
  - Form factor: official DSH bundle (Host + Web Client), installed and removed through the official plugin manager
16
- - Status: 0.4.2 updates the DSH 0.2.2-rc.1 compatibility declaration. 0.4.1 fixes missed approval notifications. 0.4.0 adds a taskbar unread badge (scheme B: distinct root sessions); 0.3.0 native progress toast, automatic banner retraction, click-to-session, bar-only styling and a simple goal aggregation run were verified on a real device; goal edge cases remain to be re-tested; optional "rewrite the title when all tasks are done" remains available (default off)
16
+ - Status: 0.4.3 fixes duplicate settings navigation icons on DSH 0.2.2. 0.4.2 updates the DSH 0.2.2-rc.1 compatibility declaration. 0.4.1 fixes missed approval notifications. 0.4.0 adds a taskbar unread badge (scheme B: distinct root sessions); 0.3.0 native progress toast, automatic banner retraction, click-to-session, bar-only styling and a simple goal aggregation run were verified on a real device; goal edge cases remain to be re-tested; optional "rewrite the title when all tasks are done" remains available (default off)
17
17
 
18
18
  ![Windows native progress toast](docs/assets/native-toast.png)
19
19
 
20
+ ## 0.4.3 update
21
+
22
+ Fixes duplicate settings navigation icons on DSH 0.2.2 by registering the bell through the native `settings.section.icon` slot, so the shell replaces the default gear instead of rendering two glyphs; older DSH versions keep the DOM fallback. Notification logic is unchanged.
23
+
20
24
  ## 0.4.2 update
21
25
 
22
26
  Version 0.4.2 is a metadata and compatibility patch with no changes to notification core logic. It explicitly declares support for DSH Desktop 0.2.2-rc.1 by scoping `engines.dsh` to `0.2.2-rc.x` to prevent semver parsing issues, alongside README badge updates. All 94 unit tests, 26 smoke tests, and host integration probes passed. Forward compatibility is not guaranteed during upstream pre-releases.
@@ -76,7 +80,7 @@ Persistent tray/background services, taskbar progress bars, taskbar flashing ani
76
80
 
77
81
  > Install this plugin through the **official plugin manager** or the GitHub Release. Do not edit the profile's `package.json` or `cordis.patch.yml` by hand.
78
82
  >
79
- > npm package: `@game25011/dsh-notify-toast@0.4.2`; use `npm pack @game25011/dsh-notify-toast` to get the tarball, then install it through the plugin manager.
83
+ > npm package: `@game25011/dsh-notify-toast@0.4.3`; use `npm pack @game25011/dsh-notify-toast` to get the tarball, then install it through the plugin manager.
80
84
 
81
85
  > Manifest note: `dsh-plugin.json` declares only the Host facet (`facets.host`); the Web Client half is declared by `dsh.client` in `package.json` (other third-party plugins use the same structure), so no `facets.client` is declared. Official DSH 0.2.2-rc.1 plugin loading is driven by `dsh.bundle` / `dsh.client` in `package.json`.
82
86
 
@@ -90,7 +94,7 @@ Then install the resulting tarball through the plugin manager; the in-app manage
90
94
 
91
95
  ### Option A: In-app plugin manager (recommended)
92
96
 
93
- 1. Put the delivered `dsh-notify-toast-0.4.2.tgz` anywhere on the local machine (avoid spaces in the path).
97
+ 1. Put the delivered `dsh-notify-toast-0.4.3.tgz` anywhere on the local machine (avoid spaces in the path).
94
98
  2. Install it with the official plugin manager, either through the Agent or through the plugin management UI:
95
99
  - Agent tool: `plugin_manager` → `action: install_bundle`, `target: <absolute path to the tgz>`
96
100
  - CLI: only for self-managed profiles (web/headless). The official Desktop `desktop` profile is managed by the Electron application's plugin manager; use the UI or Agent method above.
@@ -111,7 +115,7 @@ Installing from a local directory creates a link, so DSH's HMR can pick up code
111
115
  This repository ships `market-index.json`. Add this custom index in the DSH plugin market/discovery page:
112
116
 
113
117
  ```text
114
- https://raw.githubusercontent.com/game25011/dsh-notify-toast/4a3c83e5634cf9dcac005ec2e9bbd4c4dd828596/market-index.json
118
+ https://raw.githubusercontent.com/game25011/dsh-notify-toast/e0a6d60a2d9eb67953ed9af8a77943ab88340885/market-index.json
115
119
  ```
116
120
 
117
121
  Then search for `dsh-notify-toast` and install the pinned Git version.
package/README.md CHANGED
@@ -11,13 +11,17 @@
11
11
 
12
12
  > dsh-notify-toast 是一款适用于 Windows 10/11 的非官方 DSH 插件(MIT 协议)。它提供聚焦不打扰的后台提醒,通过 Windows 原生通知提示提问、授权与根会话完成;任务栏未读角标按不同根会话计数,同一会话多次完成算一个,1–3 显示数字,超过 3 显示红点。主要代码由 AI 编程助手生成,人类维护者负责需求、调试、测试与发布。
13
13
 
14
- - 源码/本地包名:`dsh-notify-toast` · 版本:`0.4.2` · 许可:MIT · 仓库:https://github.com/game25011/dsh-notify-toast
15
- - npm 包:`@game25011/dsh-notify-toast@0.4.2`(scoped 分发;源码包名仍为 `dsh-notify-toast`)
14
+ - 源码/本地包名:`dsh-notify-toast` · 版本:`0.4.3` · 许可:MIT · 仓库:https://github.com/game25011/dsh-notify-toast
15
+ - npm 包:`@game25011/dsh-notify-toast@0.4.3`(scoped 分发;源码包名仍为 `dsh-notify-toast`)
16
16
  - 适用:DeepSeek Harness Desktop `0.2.2-rc.1`(Electron 壳,profile `desktop`),Windows 10/11
17
17
  - 形态:DSH 官方 bundle(Host + Web Client 两半),通过官方插件管理器安装/卸载
18
- - 状态:0.4.2 更新 DSH 0.2.2-rc.1 兼容声明;0.4.1 修复审批通知漏发;0.4.0 新增任务栏未读角标(方案 B:不同根会话计数);0.3.0 原生进度 toast、bar-only 样式、自动收回、点击回会话与 Goal 汇总已在本机简单实测;Goal 边界场景仍待补测;「全部完成后改写标题」为可选功能(默认关)
18
+ - 状态:0.4.3 修复 DSH 0.2.2 设置页图标重复;0.4.2 更新 DSH 0.2.2-rc.1 兼容声明;0.4.1 修复审批通知漏发;0.4.0 新增任务栏未读角标(方案 B:不同根会话计数);0.3.0 原生进度 toast、bar-only 样式、自动收回、点击回会话与 Goal 汇总已在本机简单实测;Goal 边界场景仍待补测;「全部完成后改写标题」为可选功能(默认关)
19
19
  - 截图:![Windows 原生进度通知](docs/assets/native-toast.png)
20
20
 
21
+ ## 0.4.3 更新
22
+
23
+ 修复 DSH 0.2.2 设置页导航图标重复:改用原生 `settings.section.icon` slot,让 shell 用同一个通知铃铛图标替换默认齿轮;旧版 DSH 仍保留原有 DOM fallback。没有改变通知核心逻辑。
24
+
21
25
  ## 0.4.2 更新
22
26
 
23
27
  v0.4.2 是元数据与兼容声明补丁,未变更通知核心逻辑。针对 DSH Desktop 0.2.2-rc.1,将 `engines.dsh` 显式覆盖至 `0.2.2-rc.x` 范围以避免 semver 误判,并同步更新 README 徽标。94 项单测、26 项 smoke 及 Host probe 均通过;上游处于预发布期,不作长效兼容承诺。
@@ -78,7 +82,7 @@ v0.4.2 是元数据与兼容声明补丁,未变更通知核心逻辑。针对
78
82
 
79
83
  > 本插件只通过 **官方插件管理器** 或 GitHub Release 安装;不要手改 profile 的 `package.json` 或 `cordis.patch.yml`。
80
84
  >
81
- > npm 包:`@game25011/dsh-notify-toast@0.4.2`;可用 `npm pack @game25011/dsh-notify-toast` 获取 tgz,再按插件管理器安装。
85
+ > npm 包:`@game25011/dsh-notify-toast@0.4.3`;可用 `npm pack @game25011/dsh-notify-toast` 获取 tgz,再按插件管理器安装。
82
86
 
83
87
  > 插件清单说明:`dsh-plugin.json` 只声明 Host facet(`facets.host`);Web Client 半由 `package.json` 的 `dsh.client` 声明(同类第三方插件也采用该结构),因此未声明 `facets.client`。DSH 0.2.2-rc.1 的官方插件加载以 `package.json` 的 `dsh.bundle` / `dsh.client` 为准。
84
88
 
@@ -92,7 +96,7 @@ npm pack @game25011/dsh-notify-toast --registry=https://registry.npmjs.org/
92
96
 
93
97
  ### 方式 A:应用内插件管理器(推荐)
94
98
 
95
- 1. 把交付的 `dsh-notify-toast-0.4.2.tgz` 放到本机任意目录(路径不要含空格)。
99
+ 1. 把交付的 `dsh-notify-toast-0.4.3.tgz` 放到本机任意目录(路径不要含空格)。
96
100
  2. 在 DSH 里让 Agent 用官方插件管理器安装,或使用插件管理界面:
97
101
  - Agent 工具:`plugin_manager` → `action: install_bundle`,`target: <tgz 绝对路径>`
98
102
  - 命令行:**仅适用于自管 profile(web/headless)**;官方 Desktop 的 desktop profile 由 Electron 应用的插件管理器管理,请用上面的界面或 Agent 方式。
@@ -113,7 +117,7 @@ plugin_manager → install_bundle → target: <插件目录绝对路径>
113
117
  本仓库自带 `market-index.json`。在 DSH 的插件市场/发现页添加自定义索引:
114
118
 
115
119
  ```text
116
- https://raw.githubusercontent.com/game25011/dsh-notify-toast/4a3c83e5634cf9dcac005ec2e9bbd4c4dd828596/market-index.json
120
+ https://raw.githubusercontent.com/game25011/dsh-notify-toast/e0a6d60a2d9eb67953ed9af8a77943ab88340885/market-index.json
117
121
  ```
118
122
 
119
123
  添加后搜索 `dsh-notify-toast` 即可看到本插件,并从市场安装固定版本的 Git 源。
package/docs/INTERFACE.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  ```
9
9
  PKG_ID = 'dsh-notify-toast' // package.json name / 客户端 ModuleLoader id / 行 id / settings ns
10
- VERSION = '0.4.2'
10
+ VERSION = '0.4.3'
11
11
  RPC_CHANNEL = '/dsh-notify-toast' // 官方 Connection RPC 频道(Host rpc.handle)
12
12
  LOCALE_NS = 'dsh-notify-toast' // 客户端 locale 命名空间
13
13
  ```
package/dsh-plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "dsh.notify-toast",
3
3
  "name": "轻量原生通知(Windows)",
4
- "version": "0.4.2",
4
+ "version": "0.4.3",
5
5
  "manifestVersion": "0.15",
6
6
  "facets": {
7
7
  "host": { "entry": "lib/index.js", "apiVersion": "v1alpha1" }
@@ -10,5 +10,5 @@
10
10
  "permissions": [],
11
11
  "contributes": {},
12
12
  "subscriptions": [],
13
- "notes": "单插件交付 Host + Web Client:Host 监听 approval/request、user-questions/request、根会话 session/event;原生进度模式下 Host 通过 PowerShell/C#/WinRT helper 创建带进度条的 Windows 原生通知,Web Notification 作为兼容回退;声音由本机 Web Audio 合成(另含内嵌的 uisfx CC0「弹一下」音频),点击回调经 Host 恢复/置前 DSH 窗口。Host 注册同源 webServer 前缀 RPC `/dsh-notify-toast`(config/save/poll/test/focus/health),复用官方 requestRejection 栅栏与一元 RPC 信封;poll 为长轮询,事件环形缓冲在内存、默认 200 条。插件配置经官方 settings 持久化;不访问外部网络、不调用模型、不采集;原生 helper 会写本机编译缓存;会加载 DSH 自带 koffi 原生绑定并调用 user32(仅用于点击回窗),失败降级 window.focus()。client bundle 只注册 settings.section;已删除 shell.overlay 应用内卡片死代码。设置导航行图标由客户端注入(DOM/CSS mask,无联网、无新权限)。capability 声明不构成沙箱。完成通知标题按场景自动生成(单步、2–4 步、5 步以上、提问、授权、全部完成、目标暂停/受阻),不再提供自定义完成标题。目标模式 active+armed 期间不逐轮发完成通知,按 goal/change 的 roundsStarted 增量在 complete/paused/blocked/round-limit/disarmed 后汇总一条;默认开启,可关闭;提问/授权仍即时。提示音新增可选「弹一下」:uisfx 0.4.0 的 CC0 音频内嵌,默认仍是叮咚。0.4.1 修复审批通知漏发(approval waterfall 观察者改为 prepend/global 并继续 next())。0.4.0 新增任务栏未读角标:Host 用一次性 PowerShell/C# helper 调用 ITaskbarList3::SetOverlayIcon,按不同根会话计数,1–3 显示深灰底白字蓝环数字、超过 3 显示红点,窗口聚焦后清除;不增加常驻后台进程。0.3.0 使用 Host 侧 PowerShell/C#/WinRT helper 创建带动态进度条的 Windows 原生通知,自动移除时间为近似值(3–30 秒):到期停止进度更新,短暂缓冲后 Hide() 收回横幅(ExpirationTime 约束通知中心保留);helper 启动时后台预热并在 %LOCALAPPDATA%/dsh-notify-toast/native-cache 编译缓存一个小 DLL,编译/启动失败时自动退回 Web Notification。点击回调经 Host 的 127.0.0.1 loopback server 发布 activate 事件,尽量定位到对应会话;回调失败时不保证 session 定位。原生横幅实际停留时间仍由 Windows 控制。0.4.2 更新 DSH 0.2.2-rc.1 兼容声明与 engines.dsh 范围,不改变通知核心逻辑。"
13
+ "notes": "单插件交付 Host + Web Client:Host 监听 approval/request、user-questions/request、根会话 session/event;原生进度模式下 Host 通过 PowerShell/C#/WinRT helper 创建带进度条的 Windows 原生通知,Web Notification 作为兼容回退;声音由本机 Web Audio 合成(另含内嵌的 uisfx CC0「弹一下」音频),点击回调经 Host 恢复/置前 DSH 窗口。Host 注册同源 webServer 前缀 RPC `/dsh-notify-toast`(config/save/poll/test/focus/health),复用官方 requestRejection 栅栏与一元 RPC 信封;poll 为长轮询,事件环形缓冲在内存、默认 200 条。插件配置经官方 settings 持久化;不访问外部网络、不调用模型、不采集;原生 helper 会写本机编译缓存;会加载 DSH 自带 koffi 原生绑定并调用 user32(仅用于点击回窗),失败降级 window.focus()。client bundle 只注册 settings.section;已删除 shell.overlay 应用内卡片死代码。设置导航行图标由客户端注入(DOM/CSS mask,无联网、无新权限)。capability 声明不构成沙箱。完成通知标题按场景自动生成(单步、2–4 步、5 步以上、提问、授权、全部完成、目标暂停/受阻),不再提供自定义完成标题。目标模式 active+armed 期间不逐轮发完成通知,按 goal/change 的 roundsStarted 增量在 complete/paused/blocked/round-limit/disarmed 后汇总一条;默认开启,可关闭;提问/授权仍即时。提示音新增可选「弹一下」:uisfx 0.4.0 的 CC0 音频内嵌,默认仍是叮咚。0.4.1 修复审批通知漏发(approval waterfall 观察者改为 prepend/global 并继续 next())。0.4.0 新增任务栏未读角标:Host 用一次性 PowerShell/C# helper 调用 ITaskbarList3::SetOverlayIcon,按不同根会话计数,1–3 显示深灰底白字蓝环数字、超过 3 显示红点,窗口聚焦后清除;不增加常驻后台进程。0.3.0 使用 Host 侧 PowerShell/C#/WinRT helper 创建带动态进度条的 Windows 原生通知,自动移除时间为近似值(3–30 秒):到期停止进度更新,短暂缓冲后 Hide() 收回横幅(ExpirationTime 约束通知中心保留);helper 启动时后台预热并在 %LOCALAPPDATA%/dsh-notify-toast/native-cache 编译缓存一个小 DLL,编译/启动失败时自动退回 Web Notification。点击回调经 Host 的 127.0.0.1 loopback server 发布 activate 事件,尽量定位到对应会话;回调失败时不保证 session 定位。原生横幅实际停留时间仍由 Windows 控制。0.4.2 更新 DSH 0.2.2-rc.1 兼容声明与 engines.dsh 范围,不改变通知核心逻辑。0.4.3 改用原生 settings.section.icon slot 修复设置页图标重复。"
14
14
  }
package/lib/client.js CHANGED
@@ -37,7 +37,7 @@
37
37
  /** Locale namespace / settings namespace / client module id. */
38
38
  const NS = 'dsh-notify-toast'
39
39
  const RPC_CHANNEL = '/dsh-notify-toast'
40
- const VERSION = '0.4.2'
40
+ const VERSION = '0.4.3'
41
41
 
42
42
  /** Multi-window leadership lease (localStorage, cross-tab visible). */
43
43
  const LEADER_STORAGE_KEY = 'dsh-notify-toast:leader'
@@ -1176,8 +1176,65 @@
1176
1176
  }
1177
1177
  }
1178
1178
 
1179
+ /** Native settings.section.icon component (DSH 0.2.2+). */
1180
+ function SettingsNavIcon(props) {
1181
+ const size = props && Number.isFinite(props.size) && props.size > 0 ? props.size : NAV_ICON_SIZE
1182
+ return h(
1183
+ 'svg',
1184
+ {
1185
+ width: size,
1186
+ height: size,
1187
+ viewBox: '0 0 16 16',
1188
+ fill: 'none',
1189
+ 'aria-hidden': 'true',
1190
+ style: { display: 'block' },
1191
+ },
1192
+ h('path', {
1193
+ d: 'M4.4 6.5C4.4 4.5 5.9 2.9 8 2.9s3.6 1.6 3.6 3.6v2.6l1.05 2.05c.18.35-.08.75-.47.75H3.82c-.39 0-.65-.4-.47-.75L4.4 9.1Z',
1194
+ stroke: 'currentColor',
1195
+ strokeWidth: 1.4,
1196
+ strokeLinejoin: 'round',
1197
+ strokeLinecap: 'round',
1198
+ }),
1199
+ h('path', {
1200
+ d: 'M6.55 13.3h2.9',
1201
+ stroke: 'currentColor',
1202
+ strokeWidth: 1.4,
1203
+ strokeLinecap: 'round',
1204
+ }),
1205
+ )
1206
+ }
1207
+
1208
+ /**
1209
+ * Register the navigation icon through the native settings slot.
1210
+ * DSH 0.2.2 added settings.section.icon; older versions fall back to
1211
+ * the DOM claimer below. The slot replaces the shell's default gear
1212
+ * instead of adding a second glyph beside it.
1213
+ */
1214
+ function registerSettingsNavIcon(ctx) {
1215
+ if (!ctx || !ctx.slots || typeof ctx.slots.inject !== 'function' || typeof ctx.slots.register !== 'function') return false
1216
+ try {
1217
+ ctx.slots.inject('settings.section.icon', () => {
1218
+ try {
1219
+ return ctx.slots.register(
1220
+ { name: 'settings.section.icon', id: PKG_ID },
1221
+ SettingsNavIcon,
1222
+ )
1223
+ } catch (error) {
1224
+ warn('cannot register the native settings nav icon', error)
1225
+ return () => {}
1226
+ }
1227
+ })
1228
+ return true
1229
+ } catch (error) {
1230
+ warn('cannot wait for the native settings nav icon slot', error)
1231
+ return false
1232
+ }
1233
+ }
1234
+
1179
1235
  /**
1180
- * Replace this plugin's fallback gear with the bell mark.
1236
+ * Older-DSH fallback: replace this plugin's default gear with the bell
1237
+ * mark by claiming its own nav row.
1181
1238
  *
1182
1239
  * @param ctx - client context, for effect ownership.
1183
1240
  * @param resolveLabel - current localized section label, re-read on
@@ -3406,9 +3463,9 @@
3406
3463
  }
3407
3464
  }
3408
3465
 
3409
- // The shell projects no icon field for a section (see the nav-icon
3410
- // block above); claim this plugin's row so it does not wear the gear.
3411
- installSettingsNavIcon(ctx, () => t('nav'))
3466
+ // DSH 0.2.2 projects a native settings.section.icon slot; use it
3467
+ // first. Only older shells fall back to claiming the rendered row.
3468
+ if (!registerSettingsNavIcon(ctx)) installSettingsNavIcon(ctx, () => t('nav'))
3412
3469
 
3413
3470
  // ---- 15. Start ----
3414
3471
  status.focused = isFocused()
package/lib/config.js CHANGED
@@ -11,7 +11,7 @@
11
11
  /** package.json name / client module id / loader row id / settings namespace. */
12
12
  export const PKG_ID = 'dsh-notify-toast'
13
13
  /** Plugin version reported by every RPC endpoint. */
14
- export const VERSION = '0.4.2'
14
+ export const VERSION = '0.4.3'
15
15
  /** Official Connection RPC channel (registered by the Host half). */
16
16
  export const RPC_CHANNEL = '/dsh-notify-toast'
17
17
  /** Settings namespace: the profile patch row id, which is also the package id. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@game25011/dsh-notify-toast",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "DSH 后台时的 Windows 原生通知与任务栏未读角标:提醒提问/授权/根会话完成,原生进度条与近似自动移除时间,按根会话显示 1–3 或红点,点击尽量回到对应会话;不访问外部网络、不调模型。Windows native toast notifications and a taskbar unread badge for DeepSeek Harness when the window is unfocused.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",