@cowwo/dsh-lookout 0.0.0-stage → 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 cowwo
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,54 @@
1
- # Temporary Holding Version
1
+ # dsh-lookout(瞭望哨)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 一个 DSH(DeepSeek Harness)插件。它把原来三个独立插件合并成一份:
4
+
5
+ - **dsh-icon-custom**:换浏览器标签页图标 / 系统应用图标角标
6
+ - **dsh-notify-p**:会话有动静时发邮件通知
7
+ - **dsh-session-info**:显示当前会话 ID
8
+
9
+ 一句话:**瞭望哨:盯着你的每个会话——谁跑完了、谁出错了、谁卡住了、谁在等你审批,用浏览器图标角标、红点/黄点和邮件通知你;顺带显示当前会话 ID。**
10
+
11
+ ## 三块功能
12
+
13
+ ### 1. 换图标与角标
14
+
15
+ 在设置页上传 SVG / PNG / ICO 作为标签页图标,立即生效并持久保存;自动适配安卓 / iOS / 平板的 PWA 图标。未读会话显示**红点**、正在进行的会话显示**黄点**,工作区数字、会话行、左上角、标签页图标都会显示;点数字可打开清单,点条目可定位到侧栏对应会话。还可以把未读数投到系统应用图标角标上(Windows 任务栏 / macOS Dock,需要授予通知权限)。
16
+
17
+ ### 2. 邮件通知
18
+
19
+ 会话**跑完 / 出错 / 卡住 / 等你审批**时发一封邮件。正文写清是哪个会话,并附一条可点击直达该会话的链接。SMTP 配置、收件人等都在设置页填写。短时间内的多次事件会按队列合并发送,避免轰炸邮箱。
20
+
21
+ ### 3. 显示当前会话 ID
22
+
23
+ 在会话头部右侧显示当前会话的完整 ID;复制时会净化剪贴板内容,避免选区夹带多余换行。
24
+
25
+ ## 怎么用
26
+
27
+ 打开 DSH 设置页(Web GUI 的设置 / Settings),找到 **瞭望哨(Lookout)** 这一项,里面有:
28
+
29
+ - 图标上传与 PWA / 角标开关
30
+ - 未读规则、进行中规则的阈值
31
+ - 邮件通知:SMTP 主机、端口、账号、密码、收件人,以及「发一封测试邮件」按钮
32
+ - 会话 ID 显示开关
33
+
34
+ ## 数据存在哪
35
+
36
+ | 内容 | 位置 |
37
+ | --- | --- |
38
+ | 图标、未读规则 | `$DSH_HOME/custom-favicon/` |
39
+ | 邮件账本(投递记录) | `$DSH_HOME/dsh-notify-p/state.json` |
40
+ | 邮件配置 | `$DSH_HOME/settings.yaml` 的 `dsh-notify-p` 段 |
41
+
42
+ (`$DSH_HOME` 未设置时回退到 `~/.dsh`。)
43
+
44
+ ## 开发提示
45
+
46
+ 包内 `lib/icon/**`、`lib/notify/**`、`lib/session/**` 是三份原插件代码的**逐字节副本**,用于保证合并前后行为一致。
47
+
48
+ **要改功能逻辑,请改这三个目录**;根部的 `lib/index.js` 只是把三者组装起来的胶水层。`test/fixtures/*.client.js` 同样是原插件浏览器半边的逐字节副本,只供测试做包含断言,不要改。
49
+
50
+ ## 测试
51
+
52
+ ```bash
53
+ node --test "test/*.test.mjs"
54
+ ```