@laraveladmin/dsh-stay-awake 0.2.5 → 0.2.7

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,23 @@
1
1
  # 变更记录 · Changelog
2
2
 
3
+ ## 0.2.7 — 2026-12-03
4
+
5
+ ### 新功能
6
+
7
+ - 随包发布插件市场索引 `market/index.json`(format 1,已用 DSH 自带 `dsh-plugin-market-index` 校验器验证),
8
+ 用户把它作为索引源添加到 Discover 后即可搜索与安装:
9
+ `https://cdn.jsdelivr.net/npm/@laraveladmin/dsh-stay-awake/market/index.json`
10
+ - `package.json` 声明 `engines.dsh: >=0.2.0`,市场可据此显示兼容性并阻止过旧版本安装。
11
+ - 新增 `scripts/build-index.mjs` 由 manifest 生成索引,`test/market-index.test.js` 防止索引与包版本漂移。
12
+ - README 中英文补充 Discover 安装步骤(含 npmmirror 备用索引地址)。
13
+
14
+ ## 0.2.6 — 2026-12-03
15
+
16
+ ### 文档
17
+
18
+ - README 界面示意图按当前实际界面更新:状态栏触发 pill 带状态圆点、弹层为内容自适应高度的宿主同款浮层,
19
+ 「后端」行展示本地化名称(悬停提示保留 `caffeinate` 原始标识),底部版本号同步为 v0.2.6。
20
+
3
21
  ## 0.2.5 — 2026-12-03
4
22
 
5
23
  ### 优化
package/README.en.md CHANGED
@@ -7,7 +7,7 @@
7
7
  `@laraveladmin/dsh-stay-awake` · macOS / Windows / Linux
8
8
 
9
9
  <p>
10
- <img alt="version" src="https://img.shields.io/badge/version-0.2.5-blue">
10
+ <img alt="version" src="https://img.shields.io/badge/version-0.2.7-blue">
11
11
  <img alt="platform" src="https://img.shields.io/badge/platform-macOS%20%7C%20Windows%20%7C%20Linux-4c6ef5">
12
12
  <img alt="license" src="https://img.shields.io/badge/license-MIT-green">
13
13
  </p>
@@ -63,7 +63,7 @@ A short alert when a task finishes, played on the machine that runs the DSH host
63
63
 
64
64
  **Requirements**: DSH 0.2.x (Desktop or `dsh web`). The plugin has no third-party runtime dependencies and needs no Node toolchain.
65
65
 
66
- Published on npm: [`@laraveladmin/dsh-stay-awake@0.2.5`](https://www.npmjs.com/package/@laraveladmin/dsh-stay-awake)
66
+ Published on npm: [`@laraveladmin/dsh-stay-awake@0.2.7`](https://www.npmjs.com/package/@laraveladmin/dsh-stay-awake)
67
67
 
68
68
  ### Option 1 — install from npm (recommended)
69
69
 
@@ -75,7 +75,23 @@ plugin_manager action: install_bundle target: @laraveladmin/dsh-stay-awake
75
75
 
76
76
  Then **reload the session page** (`Cmd + R` on macOS, `Ctrl + R` on Windows); the `☾ Stay awake · …` indicator appears in the composer status bar.
77
77
 
78
- ### Option 2 — install from the DSH UI (local source directory)
78
+ ### Option 2 — install from Discover (self-hosted index)
79
+
80
+ DSH ships no index source. Add the index file this npm package publishes and the plugin shows up in **Discover**:
81
+
82
+ 1. Open **Plugins** → **More** → **Experimental plugins** and switch on **Custom plugin indexes**.
83
+ 2. Open **Discover** → **Add index source** and paste:
84
+
85
+ ```text
86
+ https://cdn.jsdelivr.net/npm/@laraveladmin/dsh-stay-awake/market/index.json
87
+ ```
88
+
89
+ 3. Search for "Stay awake" or `dsh-stay-awake` and install a version.
90
+
91
+ > The index is a plugin-market format 1 document validated with DSH's own validator. If jsDelivr is slow on your network, pin the version through the npmmirror mirror:
92
+ > `https://registry.npmmirror.com/@laraveladmin/dsh-stay-awake/0.2.7/files/market/index.json`
93
+
94
+ ### Option 3 — install from the DSH UI (local source directory)
79
95
 
80
96
  Use this when you want to modify the code or prefer not to use npm:
81
97
 
@@ -89,7 +105,7 @@ Use this when you want to modify the code or prefer not to use npm:
89
105
  3. Choose **Add plugin** and pick the cloned directory (the one containing `package.json`).
90
106
  4. After installation, **reload the session page** (`Cmd + R` on macOS, `Ctrl + R` on Windows).
91
107
 
92
- ### Option 3 — ask the agent to install it
108
+ ### Option 4 — ask the agent to install it
93
109
 
94
110
  Send this to the agent in DSH:
95
111
 
@@ -194,6 +210,8 @@ systemd-inhibit --list
194
210
 
195
211
  **Verification scope**: macOS is the author's real-hardware acceptance platform; see the [verification record](https://gitee.com/laravel-admin/dsh-stay-awake/blob/main/docs/VERIFICATION.md) (Chinese) for per-case evidence. Windows and Linux ship with implementations and unit tests, but their power effect must be confirmed on the corresponding machine. A release note will never present "implemented" as "verified".
196
212
 
213
+ **Compatibility**: `package.json` declares `engines.dsh: >=0.2.0`, which the plugin market uses for its compatibility badge; older DSH versions are refused.
214
+
197
215
  **Local writes**: exactly one state file, `~/.dsh/plugin-data/dsh-stay-awake/state.json` (the two panel preferences). It does not modify system power plans, request privileges, use the network, or read session content.
198
216
 
199
217
  ## Internationalization
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  `@laraveladmin/dsh-stay-awake` · macOS / Windows / Linux
8
8
 
9
9
  <p>
10
- <img alt="version" src="https://img.shields.io/badge/version-0.2.5-blue">
10
+ <img alt="version" src="https://img.shields.io/badge/version-0.2.7-blue">
11
11
  <img alt="platform" src="https://img.shields.io/badge/platform-macOS%20%7C%20Windows%20%7C%20Linux-4c6ef5">
12
12
  <img alt="license" src="https://img.shields.io/badge/license-MIT-green">
13
13
  </p>
@@ -64,7 +64,7 @@ DSH 跑长任务时你离开电脑,系统按空闲策略休眠:进程被挂
64
64
 
65
65
  **前置条件**:DSH 0.2.x(Desktop 或 `dsh web`)。插件零第三方运行时依赖,不需要 Node 工具链。
66
66
 
67
- 已发布到 npm:[`@laraveladmin/dsh-stay-awake@0.2.5`](https://www.npmjs.com/package/@laraveladmin/dsh-stay-awake)
67
+ 已发布到 npm:[`@laraveladmin/dsh-stay-awake@0.2.7`](https://www.npmjs.com/package/@laraveladmin/dsh-stay-awake)
68
68
 
69
69
  ### 方式一:从 npm 安装(推荐)
70
70
 
@@ -76,7 +76,23 @@ plugin_manager action: install_bundle target: @laraveladmin/dsh-stay-awake
76
76
 
77
77
  然后**刷新会话页面**(macOS `Cmd + R`,Windows `Ctrl + R`),输入框下方状态栏出现 `☾ 守夜 · …` 即安装成功。
78
78
 
79
- ### 方式二:DSH 界面安装(从本地源码目录)
79
+ ### 方式二:从 Discover 安装(自建索引源)
80
+
81
+ DSH 默认不带任何索引源。添加本项目随 npm 包发布的索引文件后,就能在 **Discover** 里搜索并安装:
82
+
83
+ 1. 打开 **插件(Plugins)** → **更多** → **实验性插件**,打开「自定义插件索引」。
84
+ 2. 切到 **Discover** → **添加索引源**,粘贴:
85
+
86
+ ```text
87
+ https://cdn.jsdelivr.net/npm/@laraveladmin/dsh-stay-awake/market/index.json
88
+ ```
89
+
90
+ 3. 搜索「守夜」或 `dsh-stay-awake`,选择版本安装。
91
+
92
+ > 索引是插件市场的 format 1 文档,已用 DSH 自带校验器验证。国内网络若访问 jsDelivr 不稳,可把版本号写死用备用地址:
93
+ > `https://registry.npmmirror.com/@laraveladmin/dsh-stay-awake/0.2.7/files/market/index.json`
94
+
95
+ ### 方式三:DSH 界面安装(从本地源码目录)
80
96
 
81
97
  想自己改代码、或暂时不用 npm 时:
82
98
 
@@ -90,7 +106,7 @@ plugin_manager action: install_bundle target: @laraveladmin/dsh-stay-awake
90
106
  3. 点 **添加插件(Add plugin)**,选择克隆下来的目录(必须是含 `package.json` 的那一层)。
91
107
  4. 安装完成后**刷新会话页面**(macOS `Cmd + R`,Windows `Ctrl + R`)。
92
108
 
93
- ### 方式三:让 AI 帮你装
109
+ ### 方式四:让 AI 帮你装
94
110
 
95
111
  把这句话发给 DSH 里的 AI:
96
112
 
@@ -197,6 +213,8 @@ systemd-inhibit --list
197
213
 
198
214
  **验证范围**:macOS 为作者真机验收平台(逐条证据见 [验证记录](https://gitee.com/laravel-admin/dsh-stay-awake/blob/main/docs/VERIFICATION.md));Windows / Linux 提供实现与单元测试,电源效果需在对应真机用上面的命令确认。发布说明不会用「已实现」代替「已验证」。
199
215
 
216
+ **兼容性声明**:`package.json` 声明 `engines.dsh: >=0.2.0`,插件市场据此显示兼容性;低于该版本的 DSH 会被拒绝安装。
217
+
200
218
  **本地写入**:只写一个状态文件 `~/.dsh/plugin-data/dsh-stay-awake/state.json`(弹层里的两个偏好),不碰系统电源计划、不申请提权、不联网、不读取会话内容。
201
219
 
202
220
  ## 多语言
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 420 424" width="420" height="424" role="img" aria-label="设置弹层示意">
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 460 470" width="460" height="470" role="img" aria-label="设置弹层示意">
2
2
  <defs>
3
3
  <filter id="sh" x="-20%" y="-20%" width="140%" height="140%">
4
4
  <feDropShadow dx="0" dy="8" stdDeviation="14" flood-color="#0b1220" flood-opacity="0.16"/>
@@ -14,49 +14,49 @@
14
14
  .rule{stroke:#e5e7eb;stroke-width:1}
15
15
  </style>
16
16
 
17
- <rect width="420" height="424" fill="#eef0f3"/>
17
+ <rect width="460" height="470" fill="#eef0f3"/>
18
18
 
19
19
  <!-- composer dock with the trigger pill, to show the anchor relationship -->
20
- <rect x="30" y="30" width="360" height="30" rx="8" fill="#ffffff" stroke="#e4e6eb"/>
21
- <g transform="translate(196,36)">
20
+ <rect x="30" y="30" width="400" height="30" rx="8" fill="#ffffff" stroke="#e4e6eb"/>
21
+ <g transform="translate(214,36)">
22
22
  <path d="M9 1.5a6 6 0 1 0 3.7 9A4.9 4.9 0 0 1 9 1.5z" fill="#22c55e" transform="scale(1.1)"/>
23
23
  <text class="t" x="16" y="15" font-size="12" fill="#9aa0a8">守夜 · 保持中</text>
24
+ <circle cx="103" cy="10" r="2.5" fill="#22c55e"/>
24
25
  </g>
25
26
 
26
27
  <!-- popover panel: anchored above the pill, host dialog styling -->
27
28
  <g filter="url(#sh)">
28
- <rect x="30" y="76" width="360" height="318" rx="12" fill="#ffffff"/>
29
+ <rect x="30" y="76" width="400" height="376" rx="12" fill="#ffffff"/>
29
30
  </g>
30
31
  <g class="t">
31
32
  <!-- title row -->
32
33
  <path d="M46 90a7 7 0 1 0 4.4 10.5A5.8 5.8 0 0 1 46 90z" fill="#22c55e"/>
33
34
  <text class="t title" x="62" y="101">守夜</text>
34
- <text class="t" x="300" y="101" text-anchor="end" font-size="13" fill="#111827">保持中</text>
35
- <text class="t" x="352" y="102" text-anchor="middle" font-size="15" fill="#9aa0a8">×</text>
35
+ <text class="t" x="414" y="101" text-anchor="end" font-size="13" fill="#111827">保持中</text>
36
36
 
37
- <line class="rule" x1="46" y1="114" x2="374" y2="114"/>
37
+ <line class="rule" x1="46" y1="114" x2="414" y2="114"/>
38
38
 
39
- <!-- details grid -->
40
- <text class="key" x="46" y="138">活跃源</text><text class="val" x="374" y="138" text-anchor="end">会话 1 · 维护 0 · 后台任务 0</text>
41
- <text class="key" x="46" y="162">范围</text><text class="val" x="374" y="162" text-anchor="end">仅系统</text>
42
- <text class="key" x="46" y="186">后端</text><text class="val" x="374" y="186" text-anchor="end">caffeinate</text>
43
- <text class="key" x="46" y="210">已持续</text><text class="val" x="374" y="210" text-anchor="end">00:12:31</text>
39
+ <!-- details grid: localized backend name is shown, raw id lives in the tooltip -->
40
+ <text class="key" x="46" y="138">活跃源</text><text class="val" x="414" y="138" text-anchor="end">会话 1 · 维护 0 · 后台任务 0</text>
41
+ <text class="key" x="46" y="162">范围</text><text class="val" x="414" y="162" text-anchor="end">仅系统</text>
42
+ <text class="key" x="46" y="186">后端</text><text class="val" x="414" y="186" text-anchor="end">macOS 系统唤醒(caffeinate)</text>
43
+ <text class="key" x="46" y="210">已持续</text><text class="val" x="414" y="210" text-anchor="end">00:12:31</text>
44
44
 
45
45
  <!-- switches -->
46
46
  <text class="label" x="46" y="258">总开关</text>
47
- <rect x="340" y="247" width="34" height="18" rx="9" fill="#22c55e"/>
48
- <circle cx="365" cy="256" r="6" fill="#ffffff"/>
47
+ <rect x="380" y="247" width="34" height="18" rx="9" fill="#22c55e"/>
48
+ <circle cx="405" cy="256" r="6" fill="#ffffff"/>
49
49
 
50
50
  <text class="label" x="46" y="286">允许屏幕休眠</text>
51
51
  <text class="sub" x="46" y="301">只防系统休眠,屏幕按系统设置熄灭</text>
52
- <rect x="340" y="275" width="34" height="18" rx="9" fill="#22c55e"/>
53
- <circle cx="365" cy="284" r="6" fill="#ffffff"/>
52
+ <rect x="380" y="275" width="34" height="18" rx="9" fill="#22c55e"/>
53
+ <circle cx="405" cy="284" r="6" fill="#ffffff"/>
54
54
 
55
55
  <text class="label" x="46" y="330">完成提示音</text>
56
- <rect x="266" y="317" width="56" height="22" rx="6" fill="#f3f4f6"/>
57
- <text class="t" x="294" y="332" text-anchor="middle" font-size="12" fill="#374151">试听</text>
58
- <rect x="340" y="319" width="34" height="18" rx="9" fill="#22c55e"/>
59
- <circle cx="365" cy="328" r="6" fill="#ffffff"/>
56
+ <rect x="306" y="317" width="56" height="22" rx="6" fill="#f3f4f6"/>
57
+ <text class="t" x="334" y="332" text-anchor="middle" font-size="12" fill="#374151">试听</text>
58
+ <rect x="380" y="319" width="34" height="18" rx="9" fill="#22c55e"/>
59
+ <circle cx="405" cy="328" r="6" fill="#ffffff"/>
60
60
 
61
61
  <!-- hold -->
62
62
  <text class="sub" x="46" y="368">临时保持</text>
@@ -65,9 +65,9 @@
65
65
  <rect x="116" y="376" width="58" height="22" rx="6" fill="#f3f4f6"/>
66
66
  <text class="t" x="145" y="391" text-anchor="middle" font-size="12" fill="#374151">2 小时</text>
67
67
 
68
- <line class="rule" x1="46" y1="410" x2="374" y2="410"/>
69
- <text class="sub" x="46" y="428">防抖、音效等高级参数在 cordis.patch.yml 中配置</text>
70
- <path d="M332 419 l-3 3.2 3 3.2 M338 419 l3 3.2 -3 3.2" fill="none" stroke="#9aa0a8" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
71
- <text class="sub" x="352" y="428">v0.2.2</text>
68
+ <line class="rule" x1="46" y1="410" x2="414" y2="410"/>
69
+ <text class="sub" x="46" y="430">防抖、音效等高级参数在 cordis.patch.yml 中配置</text>
70
+ <path d="M372 420 l-3 3.2 3 3.2 M378 420 l3 3.2 -3 3.2" fill="none" stroke="#9aa0a8" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
71
+ <text class="sub" x="392" y="430">v0.2.6</text>
72
72
  </g>
73
73
  </svg>
@@ -0,0 +1,66 @@
1
+ {
2
+ "format": 1,
3
+ "title": {
4
+ "en": "Stay Awake",
5
+ "zh": "守夜"
6
+ },
7
+ "description": {
8
+ "en": "Keeps the host awake only while unattended DSH work is still running, and rings when a task finishes.",
9
+ "zh": "只在无人值守仍有工作在进行时保持系统不休眠,任务结束时给出提示音。"
10
+ },
11
+ "metadata": {
12
+ "categories": {
13
+ "desktop": {
14
+ "title": {
15
+ "en": "Desktop",
16
+ "zh": "桌面"
17
+ }
18
+ }
19
+ },
20
+ "labels": {},
21
+ "sortKeys": {}
22
+ },
23
+ "plugins": [
24
+ {
25
+ "name": "@laraveladmin/dsh-stay-awake",
26
+ "title": {
27
+ "en": "Stay Awake",
28
+ "zh": "守夜"
29
+ },
30
+ "description": {
31
+ "en": "Keeps the host awake only while unattended DSH work is still running — agent turns, background jobs and manual compaction — then releases automatically. Rings once when a task finishes.",
32
+ "zh": "只在会话执行、后台任务或手动压缩等「无人值守仍在继续」的工作存在时保持系统不休眠,工作结束自动释放;任务结束时响一声提示音。"
33
+ },
34
+ "icon": "https://cdn.jsdelivr.net/npm/@laraveladmin/dsh-stay-awake/icon.svg",
35
+ "author": "laraveladmin",
36
+ "homepage": "https://gitee.com/laravel-admin/dsh-stay-awake",
37
+ "repository": {
38
+ "url": "https://gitee.com/laravel-admin/dsh-stay-awake"
39
+ },
40
+ "metadata": {
41
+ "category": "desktop",
42
+ "keywords": [
43
+ "dsh-plugin",
44
+ "deepseek-harness",
45
+ "keep-awake",
46
+ "prevent-sleep",
47
+ "caffeinate"
48
+ ],
49
+ "labels": [],
50
+ "sortKeys": {}
51
+ },
52
+ "versions": [
53
+ {
54
+ "version": "0.2.7",
55
+ "publishTimestamp": 1796273398,
56
+ "source": {
57
+ "type": "npm"
58
+ },
59
+ "engines": {
60
+ "dsh": ">=0.2.0"
61
+ }
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laraveladmin/dsh-stay-awake",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "DeepSeek Harness plugin that keeps the machine awake only while unattended work runs.",
5
5
  "keywords": [
6
6
  "dsh-plugin",
@@ -32,6 +32,7 @@
32
32
  "lib",
33
33
  "cordis.patch.yml",
34
34
  "locale/*.json",
35
+ "market",
35
36
  "docs",
36
37
  "icon.svg",
37
38
  "README.md",
@@ -41,7 +42,8 @@
41
42
  ],
42
43
  "scripts": {
43
44
  "test": "node --test test/*.test.js",
44
- "test:integration": "node --test test/integration/*.test.js"
45
+ "test:integration": "node --test test/integration/*.test.js",
46
+ "index": "node scripts/build-index.mjs"
45
47
  },
46
48
  "dsh": {
47
49
  "bundle": {
@@ -58,5 +60,8 @@
58
60
  "publishConfig": {
59
61
  "access": "public",
60
62
  "registry": "https://registry.npmjs.org/"
63
+ },
64
+ "engines": {
65
+ "dsh": ">=0.2.0"
61
66
  }
62
67
  }