@idoall/dsh-notify 0.3.0 → 0.3.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/CHANGELOG.md +12 -0
- package/README.md +5 -4
- package/README.zh.md +5 -4
- package/dist/client.js +14 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to this project are documented here. The format follows [Kee
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.3.1] - 2026-09-20
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **Sound now matches visible delivery.** Automatic audio plays only when a notification is admitted to an enabled visual Toast queue. A poll batch produces one cue rather than one cue per record, and a rejected card remains eligible for a later delivery attempt.
|
|
12
|
+
- **Open interaction recovery.** After the Toast overlay remounts, still-open approvals, questions, and plan reviews are restored silently. Settled history stays suppressed, preventing completed messages from replaying.
|
|
13
|
+
- **Approval-colour consistency.** Plan-review notifications now use the same amber approval colour as execution approvals. Ordinary questions remain blue.
|
|
14
|
+
|
|
15
|
+
### Verified
|
|
16
|
+
|
|
17
|
+
- A live pending-interaction acceptance confirmed the native pending marker, Toast, sound, Toast navigation, and automatic left-sidebar reveal together; clearing the interaction cleared its pending delivery state.
|
|
18
|
+
|
|
7
19
|
## [0.3.0] - 2026-09-20
|
|
8
20
|
|
|
9
21
|
### Added
|
package/README.md
CHANGED
|
@@ -33,10 +33,10 @@ When a session really stops, fails, asks a question, or needs approval, a card a
|
|
|
33
33
|
- **Enhanced or soft toast styling.** The default **Enhanced** style gives each notification a clear status colour and a short four-second attention bar; the bar is attention only, not a dismissal timer. **Soft** is a lower-key alternative. A card remains until you close it, open its session, or complete an in-card answer.
|
|
34
34
|
- **A collapsible page-local stack.** With **Collapse multiple notifications** enabled (the default), the second card and onward form a pile: the newest card is fully readable on top, while earlier cards remain complete underneath and expose equal `18px` lower edges. Pointer entry or keyboard focus expands the pile. The page keeps up to 50 live cards; pending actions are prioritised before ordinary cards, then newer cards come first.
|
|
35
35
|
- **Direct, traceable navigation.** Clicking a card opens its session and the exact originating turn. After the host selects that session, the selected row is smoothly revealed in the left session tree, even when it lives in a different off-screen workspace. A card stays put with an explanation if navigation cannot succeed.
|
|
36
|
-
- **Answer in the toast.** A pending question or approval renders the same compatible options as the composer. In-card and composer answers share the same host interaction.
|
|
37
|
-
- **Sound and background attention.** Built-in WebAudio cues and validated custom uploads play
|
|
36
|
+
- **Answer in the toast.** A pending question or approval renders the same compatible options as the composer. Execution approvals and plan reviews share DSH's amber decision colour; ordinary questions remain blue. In-card and composer answers share the same host interaction.
|
|
37
|
+
- **Sound and background attention.** Built-in WebAudio cues and validated custom uploads play only after a card is admitted to an enabled visual Toast queue, including while the page is hidden. One polling batch produces one cue. A background tab with unseen notifications receives a temporary bell prefix and favicon attention marker.
|
|
38
38
|
- **Task-noise control.** Subtask, background-job, and workflow completion notifications are off by default.
|
|
39
|
-
- **No history by design.** Notification records are held only in the open page's in-memory queue.
|
|
39
|
+
- **No history by design.** Notification records are held only in the open page's in-memory queue. Settled history is never replayed after a refresh or overlay remount; an interaction that is still open when the host can report it is restored silently.
|
|
40
40
|
|
|
41
41
|
## Quick start
|
|
42
42
|
|
|
@@ -92,10 +92,11 @@ Custom sounds are stored in `<dataDir>/sounds/` in the profile data directory, n
|
|
|
92
92
|
|
|
93
93
|
## Compatibility
|
|
94
94
|
|
|
95
|
-
Current release target: plugin **`0.3.
|
|
95
|
+
Current release target: plugin **`0.3.1`** verified against DeepSeek Harness **`0.1.6-alpha.1`**.
|
|
96
96
|
|
|
97
97
|
| Plugin | Verified DeepSeek Harness |
|
|
98
98
|
| --- | --- |
|
|
99
|
+
| `0.3.1` | `0.1.6-alpha.1` |
|
|
99
100
|
| `0.3.0` | `0.1.6-alpha.1` |
|
|
100
101
|
| `0.2.2` | `0.1.6-alpha.1` |
|
|
101
102
|
| `0.2.1` | `0.1.6-alpha.1` |
|
package/README.zh.md
CHANGED
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
- **增强版或柔和版通知样式**:默认的**增强版**使用清晰状态色与四秒短暂提醒条;提醒条只用于吸引注意,不负责关闭通知。**柔和版**提供更克制的视觉效果。卡片会保留到你关闭、打开对应会话或完成卡片内回答为止。
|
|
34
34
|
- **可折叠的页内通知栈**:开启默认的**多条通知折叠显示**后,从第 2 条起会折叠:最新卡片完整可读,早期卡片仍保留完整内容并在下方等距露出 `18px` 边缘。鼠标移入或键盘焦点进入时会展开。本页最多保存 50 条活跃卡片;待处理通知优先,其余按最新优先。
|
|
35
35
|
- **可追溯的会话跳转**:点通知会打开对应会话并定位到来源轮次。宿主选中会话后,左侧会话树会自动平滑滚动并展示已选行,即使它位于另一个屏幕外工作区。跳转失败时卡片会留在原地说明原因。
|
|
36
|
-
-
|
|
37
|
-
-
|
|
36
|
+
- **在卡片内回答**:待回复问题或审批会显示可兼容的输入框选项;执行审批与计划待审沿用 DSH 的橙色决策语义,普通需要回复保持蓝色;卡片内回答与输入框操作同一份宿主交互。
|
|
37
|
+
- **提示音与后台提醒**:通知成功进入已启用的可视 Toast 队列后,才会播放内置 WebAudio 或经过校验的自定义提示音;页面在后台时也适用。同一轮轮询的一批通知只播放一次。后台标签有未查看通知时,标题和 favicon 会短暂提示。
|
|
38
38
|
- **任务噪声控制**:子任务、后台任务和工作流完成通知默认关闭。
|
|
39
|
-
-
|
|
39
|
+
- **无历史设计**:通知仅保存在当前页面内存中;刷新或 Toast 浮层重新挂载后,不会回放已结算历史;若宿主仍能报告未处理交互,则会静默恢复。
|
|
40
40
|
|
|
41
41
|
## 快速开始
|
|
42
42
|
|
|
@@ -92,10 +92,11 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
92
92
|
|
|
93
93
|
## 兼容性
|
|
94
94
|
|
|
95
|
-
当前发布目标:插件 **`0.3.
|
|
95
|
+
当前发布目标:插件 **`0.3.1`** 已在 DeepSeek Harness **`0.1.6-alpha.1`** 上验证。
|
|
96
96
|
|
|
97
97
|
| 插件 | 已验证的 DeepSeek Harness |
|
|
98
98
|
| --- | --- |
|
|
99
|
+
| `0.3.1` | `0.1.6-alpha.1` |
|
|
99
100
|
| `0.3.0` | `0.1.6-alpha.1` |
|
|
100
101
|
| `0.2.2` | `0.1.6-alpha.1` |
|
|
101
102
|
| `0.2.1` | `0.1.6-alpha.1` |
|
package/dist/client.js
CHANGED
|
@@ -498,7 +498,7 @@ window.__ModuleLoader__.load({
|
|
|
498
498
|
function toastOrder(records = []) {
|
|
499
499
|
return [...records.filter((record) => record?.phase === "open"), ...records.filter((record) => record?.phase !== "open")];
|
|
500
500
|
}
|
|
501
|
-
var TOAST_TONE_BY_KIND = Object.freeze({ approval: "warning", question: "info", "plan-review": "
|
|
501
|
+
var TOAST_TONE_BY_KIND = Object.freeze({ approval: "warning", question: "info", "plan-review": "warning", completed: "success", failed: "error", "job-end": "neutral", "workflow-end": "neutral", test: "neutral" });
|
|
502
502
|
function toastTone(kind) {
|
|
503
503
|
return TOAST_TONE_BY_KIND[kind] ?? "neutral";
|
|
504
504
|
}
|
|
@@ -833,15 +833,18 @@ window.__ModuleLoader__.load({
|
|
|
833
833
|
}
|
|
834
834
|
};
|
|
835
835
|
}, [anyCard]);
|
|
836
|
-
const showToast = (record) => {
|
|
837
|
-
if (!record?.eventId) return;
|
|
838
|
-
if (globalThis.document?.hidden) unseen.current.add(record.eventId);
|
|
839
|
-
toasted.current.add(record.eventId);
|
|
836
|
+
const showToast = (record, { playSound = true } = {}) => {
|
|
837
|
+
if (!record?.eventId) return false;
|
|
840
838
|
const incoming = [{ record, status: "idle", error: null, lastLabel: null, leaving: false, attention: true }, ...cardsRef.current.filter((card) => card.record.eventId !== record.eventId)];
|
|
841
839
|
const next = queueCards(incoming);
|
|
840
|
+
const admitted = next.some((card) => card.record.eventId === record.eventId);
|
|
842
841
|
for (const card of incoming) if (!next.includes(card)) forget(card.record.eventId);
|
|
843
842
|
commit(next);
|
|
844
|
-
|
|
843
|
+
if (!admitted) return false;
|
|
844
|
+
toasted.current.add(record.eventId);
|
|
845
|
+
if (globalThis.document?.hidden) unseen.current.add(record.eventId);
|
|
846
|
+
if (playSound && toastConfig.toastEnabled && toastConfig.toastPosition !== "off") void soundPlayer.play();
|
|
847
|
+
return true;
|
|
845
848
|
};
|
|
846
849
|
import_react.default.useEffect(() => {
|
|
847
850
|
const local = (event) => {
|
|
@@ -897,6 +900,8 @@ window.__ModuleLoader__.load({
|
|
|
897
900
|
for (const id of seen) if (!ids.has(id)) seen.delete(id);
|
|
898
901
|
if (!primed.current) {
|
|
899
902
|
primed.current = true;
|
|
903
|
+
const waiting = toastOrder(state.records).filter((record) => record?.phase === "open");
|
|
904
|
+
for (const record of waiting.reverse()) showToast(record, { playSound: false });
|
|
900
905
|
for (const id of ids) seen.add(id);
|
|
901
906
|
return;
|
|
902
907
|
}
|
|
@@ -908,7 +913,9 @@ window.__ModuleLoader__.load({
|
|
|
908
913
|
if (wasWaiting && live.phase !== "open") dismiss(card.record.eventId);
|
|
909
914
|
}
|
|
910
915
|
const fresh = toastOrder(state.records).filter((record) => !seen.has(record.eventId));
|
|
911
|
-
|
|
916
|
+
let admitted = false;
|
|
917
|
+
for (const record of fresh.reverse()) admitted = showToast(record, { playSound: false }) || admitted;
|
|
918
|
+
if (admitted && toastConfig.toastEnabled && toastConfig.toastPosition !== "off") void soundPlayer.play();
|
|
912
919
|
}, [state.records, state.primed]);
|
|
913
920
|
import_react.default.useEffect(() => {
|
|
914
921
|
const sync = () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idoall/dsh-notify",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DSH web plugin: in-page task notifications for DeepSeek Harness — enhanced or soft status toasts, a collapsible top-right stack, answer buttons, background-tab attention, and a WebAudio cue that also plays while the page is hidden. Live delivery only: no history, no service worker, no web push, no OS notification matrix.",
|
|
6
6
|
"main": "./dist/index.js",
|