dsh-notify-me 1.5.2 → 1.5.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
@@ -2,6 +2,19 @@
2
2
 
3
3
  All notable changes to **dsh-notify-me** are documented here.
4
4
 
5
+ ## [1.5.3] — 2026-10-04
6
+
7
+ ### 新增
8
+ - **设置页底部常显插件版本号**(`dsh-notify-me v…`,中英跟随界面语言):报障、核对是否装上新版本时直接照抄这一行,不必再开控制台查 `window.__dshNotifyMe.version`(该字段保留)。
9
+
10
+ ### 变更
11
+ - 版本号 1.5.2 → 1.5.3;`window.__dshNotifyMe.version` 同步。
12
+ - README(中英):「桌面端怎么抬窗的 / How the Desktop window gets raised」补真实壳复测结论与触发时机口径——深链必须在带用户手势的处理器里发(通知 `onclick` 自带手势,产品路径通);无手势的脚本化注入会被 Chromium 静默丢弃、外部协议不回流,复现时看似「通道被拦死」。致谢名单新增 [@EliteOtaku](https://github.com/EliteOtaku)(issue #9 的逐层排查与三轮真实壳复测)。
13
+
14
+ ### 核实
15
+ - issue #9 真实壳三轮复测(DSH Desktop 0.2.0-rc.2 / Windows 11):点通知 = 抬窗 + 切会话一步到位,同会话、跨会话、窗口在后台均稳定 ✅,1.5.2 的抬窗修复确认生效。
16
+ - 修正 1.5.2 发布当天「CDP 注入 iframe 导航 0 新进程 ⇒ 沙箱 renderer 拦截外部协议」的判断:从发行包 `lib/main.js` 逐处核对,壳对主窗口既没有 `will-frame-navigate` 拦截、页面无 CSP,非 media 权限(含 `openExternal`)一律放行;真实差异在**用户手势上下文**,与渲染进程的 OS 沙箱无关(OS 沙箱 ≠ iframe 的 `sandbox` 属性,GHSA-p2rr-rvmm-c5fp 只影响后者)。
17
+
5
18
  ## [1.5.2] — 2026-10-04
6
19
 
7
20
  ### 新增
package/README.en.md CHANGED
@@ -60,7 +60,8 @@ Open **Settings → Notify me** (refresh the page once after installing):
60
60
  - **Click a toast to open that conversation** (default on): clicking brings DSH to the front and switches to the conversation the alert came from. With several DSH tabs open, one click raises exactly one window (a visible one first) and switches only that one — the others stay put; when off, clicking a toast does nothing. On the Desktop (DSH Desktop) the click likewise raises the window and switches conversations: page-side `window.focus()` cannot raise a native Electron window, so since 1.5.2 the plugin rides the app's own `dsh://open` deep link instead (a window hidden to the tray comes back too);
61
61
  - **Decide approvals from the toast** (default on): approval notifications carry Approve / Reject buttons, and one click settles the request exactly like the Allow once / Reject buttons on the approval card. Clicking the toast body still takes you back to the conversation. **Buttons are unavailable on the Desktop** (`dsh-app://` pages cannot register a Service Worker): approval toasts fall back to their buttonless form there, and the settings page says so;
62
62
  - **Notification language** — follow the interface / 简体中文 / English: controls the language of the alert text and the `🔔 …` title marker;
63
- - **Test buttons** — send one "needs you", "reply finished" or "approval buttons" test alert with the current settings (**not** limited by the "while the page is open" toggles; the "needs you" test's title marker clears itself after ~6s).
63
+ - **Test buttons** — send one "needs you", "reply finished" or "approval buttons" test alert with the current settings (**not** limited by the "while the page is open" toggles; the "needs you" test's title marker clears itself after ~6s);
64
+ - **Version info** — the settings page always shows the installed plugin version at its foot (`dsh-notify-me v…`); quote that line in bug reports or to check which build you are on.
64
65
 
65
66
  > Notification permission is required: click once on the page → **Allow** (or address-bar lock → Site settings → Notifications → Allow → reload). On macOS, also allow the browser under System Settings → Notifications.
66
67
 
@@ -152,6 +153,8 @@ Every button toast is booked against its interaction key, so it can only decide
152
153
 
153
154
  DSH Desktop is a thin Electron shell and its page lives under `dsh-app://app`: DOM `window.focus()` only touches the browsing-context window, never the native one, and the shell's `will-navigate` / window-open handlers block every ordinary way for the page to fire a `dsh://` URL — so through 1.5.1 a toast click switched the conversation in the background but never brought the window forward. Since 1.5.2 a body click navigates a hidden iframe to `dsh://open`: subframe navigations pass the shell's `will-navigate` interception, the URL reaches the OS protocol registration, and the app's single-instance owner runs its own `focusPrimaryWindow()` (restore + show + focus) — the same path the login completion page uses to bring the client forward. A window hidden to the tray, buried under others, or minimized all come back. Browsers are unaffected and still use `window.focus()` / the worker's `client.focus()`.
154
155
 
156
+ Verified on the real shell (DSH Desktop 0.2.0-rc.2, three rounds of retesting in issue #9): a toast click raises the window and switches the conversation in one step, stable across sessions and with the window in the background. Timing of the fire is what makes the chain work: the deep link must be launched from a **user-gesture handler** — the notification's `onclick` carries one, which is why the product path works — while gesture-less scripted injection (an iframe appended from a CDP evaluate, say) is silently dropped by Chromium and the external protocol never launches, which looks exactly like the channel being blocked.
157
+
155
158
  ## Known limitations
156
159
 
157
160
  - The page must be open for alerts to fire (background tab / minimized is fine; closing the tab stops it — that's inherent to a browser-layer plugin).
@@ -179,10 +182,11 @@ npm pack --dry-run # preview the published tarball
179
182
 
180
183
  ## Credits & how contributions land
181
184
 
182
- Contributors (by handle; the linked PR is their change):
185
+ Contributors (by handle; the link points at the PR / issue they worked on):
183
186
 
184
187
  - [@AgMahone](https://github.com/AgMahone) — [#7](https://github.com/chromoany/dsh-notify-me/pull/7): the 0.1.6+ / 0.2.0 host-generation support, plus the double-chime and cordis-lookup reports and retesting;
185
- - [@d0ublecl1ck](https://github.com/d0ublecl1ck) — [#8](https://github.com/chromoany/dsh-notify-me/pull/8): muting subagent sessions (`ignoreSubagent`) with its tests and docs; the 1.4.0 refinement — mute only background subagents, alert as usual for the one you have open — is his suggestion from the #8 discussion, landed by the maintainer.
188
+ - [@d0ublecl1ck](https://github.com/d0ublecl1ck) — [#8](https://github.com/chromoany/dsh-notify-me/pull/8): muting subagent sessions (`ignoreSubagent`) with its tests and docs; the 1.4.0 refinement — mute only background subagents, alert as usual for the one you have open — is his suggestion from the #8 discussion, landed by the maintainer;
189
+ - [@EliteOtaku](https://github.com/EliteOtaku) — [#9](https://github.com/chromoany/dsh-notify-me/issues/9): the layer-by-layer investigation and three rounds of real-shell retesting of the desktop raise path (1.5.2) — confirming that a toast click raises the window and switches conversations reliably, and pinning down the reproduction difference ("gesture-less scripted injection is silently dropped by Chromium"), which corrected the initial "the sandbox blocks it" reading.
186
190
 
187
191
  Attribution policy: external PRs are landed as maintainer commits — the original commit is not reused and no Co-authored-by trailer is added, so GitHub's contributors graph lists the maintainer only and contributors are credited above.
188
192
 
package/README.md CHANGED
@@ -60,7 +60,8 @@ dsh-notify-me 把「监督」和「守在屏幕前」解耦:只在真的出现
60
60
  - **点击通知回到对应对话**(默认开):点通知把 DSH 带到前台并切到提醒所属的对话;多个 DSH 标签页同时开着时,一次点击只调起一个窗口(优先当前可见的那个)并只切它的对话,其余标签页不动;关掉后点通知不做任何事。桌面端(DSH Desktop)同样会把窗口带到前台并切对话:页面侧的 `window.focus()` 在 Electron 里抬不动原生窗口,1.5.2 起改走应用自己的 `dsh://open` 深链调窗(窗口隐藏在托盘里也能被抬回来);
61
61
  - **审批通知上直接裁决**(默认开):权限审批的通知上带「同意 / 拒绝」按钮,点一下就按审批卡片的「允许一次 / 拒绝」直接裁决,不用切回页面;点通知正文仍是原来的「切回对应对话」。**桌面端暂不支持按钮**(`dsh-app://` 页面无法注册 Service Worker),审批通知自动退回无按钮样式,设置页会明示这一限制;
62
62
  - **通知语言**:跟随界面 / 简体中文 / English——决定通知文字与 `🔔 …` 标题标记使用的语言;
63
- - **测试按钮**:用当前设置立即发一条「需要你」「回复完成」或「审批按钮」测试提醒(**不受**上面「页面打开时也提醒」开关限制;「需要你」测试的标题标记约 6 秒后自动消失)。
63
+ - **测试按钮**:用当前设置立即发一条「需要你」「回复完成」或「审批按钮」测试提醒(**不受**上面「页面打开时也提醒」开关限制;「需要你」测试的标题标记约 6 秒后自动消失);
64
+ - **版本信息**:设置页底部常显当前插件版本号(`dsh-notify-me v…`)——报障、核对是否装上新版本时直接照抄这一行。
64
65
 
65
66
  > 需要浏览器通知权限:页面上点一下 → 允许;或地址栏锁 → 站点设置 → 通知 → 允许 → 刷新。macOS 还要在 系统设置 → 通知 里允许该浏览器。
66
67
 
@@ -148,6 +149,8 @@ window.__dshNotifyMe.decide("approval:3", "allowed-once") // 程序化裁决:
148
149
 
149
150
  DSH Desktop 是一层 Electron 壳,页面跑在 `dsh-app://app` 下:DOM 的 `window.focus()` 只动浏览器窗口对象、碰不到原生窗口,壳的 `will-navigate` / `window-open` 又把页面里发 `dsh://` 的常规出口全堵上了——所以 1.5.1 及以前点通知只在后台切好对话,窗口不上前台。1.5.2 起点通知正文时页面发一条隐藏 iframe 导航到 `dsh://open`:子框架导航不经过壳的 `will-navigate` 拦截,URL 交给系统协议注册,应用的单实例锁收到第二次启动后走 `focusPrimaryWindow()`(restore + show + focus)——与登录完成页把客户端置前是同一条路。窗口隐藏在托盘、被别的窗口压住、最小化,都能被抬回来。浏览器端不受影响,仍走 `window.focus()` / worker `client.focus()`。
150
151
 
152
+ 真实壳已实测(DSH Desktop 0.2.0-rc.2,issue #9 三轮复测):点通知 = 抬窗 + 切会话一步到位,跨会话、窗口在后台时同样稳定。触发时机是这条链路的关键:深链必须在**带用户手势的处理器**里发——通知的 `onclick` 自带手势,所以产品路径通;而无手势的脚本化注入(如 CDP evaluate 手工塞 iframe)会被 Chromium 静默丢弃、外部协议根本不回流,复现时看起来就像「通道被拦死」。
153
+
151
154
  ## 已知限制
152
155
 
153
156
  - 页面必须开着才会提醒(后台标签/最小化可以;关标签页即失效——浏览器层方案固有限制)。
@@ -175,10 +178,11 @@ npm pack --dry-run # 预览发布包
175
178
 
176
179
  ## 致谢与贡献须知
177
180
 
178
- 贡献者(按 handle 列出,对应 PR 就是他们提的改动):
181
+ 贡献者(按 handle 列出,链接指向他们参与的 PR / issue):
179
182
 
180
183
  - [@AgMahone](https://github.com/AgMahone) — [#7](https://github.com/chromoany/dsh-notify-me/pull/7):0.1.6+ / 0.2.0 宿主代际支持,以及通知双响、cordis 查找路径的报障与复测;
181
- - [@d0ublecl1ck](https://github.com/d0ublecl1ck) — [#8](https://github.com/chromoany/dsh-notify-me/pull/8):子代理会话静音(`ignoreSubagent`)与配套测试、文档;1.4.0 里「只静音后台子代理、当前打开的照常提醒」的口径同样出自他在 #8 讨论里的建议,落地由维护者完成。
184
+ - [@d0ublecl1ck](https://github.com/d0ublecl1ck) — [#8](https://github.com/chromoany/dsh-notify-me/pull/8):子代理会话静音(`ignoreSubagent`)与配套测试、文档;1.4.0 里「只静音后台子代理、当前打开的照常提醒」的口径同样出自他在 #8 讨论里的建议,落地由维护者完成;
185
+ - [@EliteOtaku](https://github.com/EliteOtaku) — [#9](https://github.com/chromoany/dsh-notify-me/issues/9):桌面端抬窗链路(1.5.2)的逐层排查与真实壳三轮复测——确认点通知抬窗 + 切会话稳定生效,并定位出「无用户手势的脚本化注入被 Chromium 静默丢弃」这一复现差异,纠正了最初「沙箱拦死」的判断。
182
186
 
183
187
  署名口径:本仓库收编外部 PR 时以维护者提交落地——不沿用原 commit、不挂 Co-authored-by,GitHub 的 contributors 图只显示维护者,贡献者以上面的致谢署名。
184
188
 
package/lib/client.js CHANGED
@@ -389,6 +389,15 @@
389
389
  // the protocol registration, and the single-instance owner restores,
390
390
  // shows and focuses the window — the same path the login completion page
391
391
  // uses to bring DSH forward.
392
+ //
393
+ // Verified on the real shell (DSH Desktop 0.2.0-rc.2, issue #9): a click
394
+ // on the notification raises the window and switches the conversation in
395
+ // one step, reproducibly. The fire must sit in a user-gesture context —
396
+ // the page-side Notification onclick carries one, and Chromium drops
397
+ // external-protocol navigations launched without it. That is also why
398
+ // gesture-less injections (CDP evaluate, scripted iframe appends) silently
399
+ // produce no protocol launch at all, which read like the channel being
400
+ // blocked when the gesture was the only difference.
392
401
  function raiseWindow() {
393
402
  try { window.focus(); } catch (e) {}
394
403
  if (!isDesktopShell()) return;
@@ -1479,7 +1488,7 @@
1479
1488
  });
1480
1489
  } catch (e) {}
1481
1490
  // keep in sync with package.json "version" on every release
1482
- api.version = "1.5.2";
1491
+ api.version = "1.5.3";
1483
1492
  api.setConfig = function (patch) { return setConfigLocal(patch); };
1484
1493
  api.resetConfig = function () {
1485
1494
  try { localStorage.removeItem(LS_CONFIG); } catch (e) {}
@@ -1597,7 +1606,8 @@
1597
1606
  resetDone: "已恢复默认设置。",
1598
1607
  sent: "已发送测试提醒 · 通知语言:",
1599
1608
  permHint: "通知权限尚未授予:先在页面上点击一次并允许通知,系统通知才能弹出(提示音不受影响)。",
1600
- offHint: "已关闭提醒:先打开「启用提醒」再测试。"
1609
+ offHint: "已关闭提醒:先打开「启用提醒」再测试。",
1610
+ versionLine: "插件版本:dsh-notify-me v"
1601
1611
  };
1602
1612
  var UI_en = {
1603
1613
  nav: "Notify me",
@@ -1650,7 +1660,8 @@
1650
1660
  resetDone: "Defaults restored.",
1651
1661
  sent: "Test alert sent · notification language: ",
1652
1662
  permHint: "Notification permission is not granted yet — click once on the page and allow notifications so toasts can appear (sound is unaffected).",
1653
- offHint: "Reminders are off: enable them first, then test."
1663
+ offHint: "Reminders are off: enable them first, then test.",
1664
+ versionLine: "Plugin version: dsh-notify-me v"
1654
1665
  };
1655
1666
  // Small element helper to keep the hand-written page readable.
1656
1667
  function h(tag, props) {
@@ -1853,7 +1864,10 @@
1853
1864
  !permOK ? h("div", { className: "dnm-row" }, [
1854
1865
  h("div", { className: "dnm-rowText" }, [h("div", { className: "dnm-rowHint" }, t("permHint"))])
1855
1866
  ]) : null
1856
- ])
1867
+ ]),
1868
+ // Always-visible version line at the page foot: bug reports need it,
1869
+ // and "which build am I on" should not require the console.
1870
+ h("p", { className: "dnm-hint" }, t("versionLine") + api.version)
1857
1871
  ]);
1858
1872
  }
1859
1873
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-notify-me",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "description": "DSH 桌面消息提醒插件:模型需要你操作(审批/方案确认/提问的可操作提醒)或回复在后台完成时,系统通知+提示音+标签页标题提醒你;权限审批的通知上可直接点「同意/拒绝」完成裁决;可在设置页开关并切换通知语言。Desktop notification & message alerts for DeepSeek Harness web — toasts, sounds and a tab-title marker when the agent needs your input (approval / plan review / question) or a reply finishes in the background, Approve/Reject buttons on approval toasts to decide right from the notification; toggleable from Settings with zh/en notification language.",
5
5
  "license": "MIT",
6
6
  "type": "module",