@gehennawu/dsh-service 0.40.0 → 1.0.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/README.en.md +24 -12
- package/README.md +24 -12
- package/backup-integrity.js +577 -0
- package/client.js +1 -7249
- package/index.js +911 -1453
- package/package.json +11 -3
- package/quota-adapters.js +970 -0
- package/screenshots/README.md +3 -1
- package/screenshots/backup-management.png +0 -0
- package/screenshots/backup-management_en.png +0 -0
- package/screenshots/configuration.png +0 -0
- package/screenshots/configuration_en.png +0 -0
- package/screenshots/health-diagnostics.png +0 -0
- package/screenshots/health-diagnostics_en.png +0 -0
- package/screenshots/maintenance.png +0 -0
- package/screenshots/maintenance_en.png +0 -0
- package/screenshots/mobile-adaptation.png +0 -0
- package/screenshots/mobile-adaptation_en.png +0 -0
- package/screenshots/model-usage.png +0 -0
- package/screenshots/model-usage_en.png +0 -0
- package/screenshots/overview.png +0 -0
- package/screenshots/overview_en.png +0 -0
- package/screenshots/plugin-config.png +0 -0
- package/screenshots/plugin-config_en.png +0 -0
- package/screenshots/quota-lookup.png +0 -0
- package/screenshots/quota-lookup_en.png +0 -0
- package/screenshots/restart.png +0 -0
- package/screenshots/restart_en.png +0 -0
- package/screenshots/session-manager.png +0 -0
- package/screenshots/session-manager_en.png +0 -0
- package/screenshots/skill-manager.png +0 -0
- package/screenshots/skill-manager_en.png +0 -0
- package/screenshots/subagent-model.png +0 -0
- package/screenshots/subagent-model_en.png +0 -0
- package/screenshots/task-notifications.png +0 -0
- package/screenshots/task-notifications_en.png +0 -0
package/README.en.md
CHANGED
|
@@ -5,16 +5,17 @@
|
|
|
5
5
|
# 🛠️ dsh-service
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<strong>A service-control & operations plugin for
|
|
9
|
-
<em
|
|
8
|
+
<strong>A service-control & operations plugin for DeepSeek Harness (DSH) Web.</strong><br>
|
|
9
|
+
<em>DeepSeek Harness (DSH) Web 服务控制与运维插件。</em>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
|
-
[](package.json)
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
15
15
|
[](https://cordis.moe/)
|
|
16
16
|
[](https://github.com/gehennawu/dsh-service)
|
|
17
17
|
[](https://github.com/gehennawu/dsh-service/issues)
|
|
18
|
+
[](https://awesome-dsh-plugin.com)
|
|
18
19
|
|
|
19
20
|
<p align="center">
|
|
20
21
|
<a href="#-features">Features</a> •
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
|
|
33
34
|
</div>
|
|
34
35
|
|
|
35
|
-
A service-control and operations plugin for
|
|
36
|
+
A service-control and operations plugin for DSH Web: safe restart, version management and one-click upgrade, health diagnostics, model-usage statistics, quota lookup, backup management, task notifications, skills management, session management, and Linux file-permission maintenance.
|
|
36
37
|
|
|
37
38
|

|
|
38
39
|
|
|
@@ -59,6 +60,15 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
59
60
|
- Status summary (error → warning → info → normal aggregation with a status dot) → actionable items (only when present) → version and runtime → metrics grid → fixed core actions (health check / quota lookup / create backup, gated by feature switches) → recent errors (rendered only when non-empty, collapsed by default)
|
|
60
61
|
- Aggregation rules: any health/diagnostics/backup/statistics/quota/restart failure is error; permission issues, non-advisory diagnostic warnings, and quota windows at ≥80% usage are warning; available updates, manual-start runtime, and no backups yet are info
|
|
61
62
|
|
|
63
|
+
### Maintenance and Configuration pages
|
|
64
|
+
|
|
65
|
+

|
|
66
|
+
|
|
67
|
+

|
|
68
|
+
|
|
69
|
+
- Maintenance groups Sessions, Skills, Subagents, Backups, and Restart; it remembers the most recent subpage and falls back to an available item when a feature is disabled
|
|
70
|
+
- Configuration groups feature switches and task notifications; switches are grouped and apply live, while the Notifications entry stays visible but disabled when that feature is off
|
|
71
|
+
|
|
62
72
|
### Version and updates
|
|
63
73
|
|
|
64
74
|
- Shows the current DSH and plugin versions, linking to GitHub Releases
|
|
@@ -123,9 +133,11 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
123
133
|
|
|
124
134
|
- Backup records use light two-line rows (name on the first line, size · time on the second, separator layout; same style as the session list)
|
|
125
135
|
|
|
126
|
-
- Creates `.tar.gz` archives of sessions, configuration, and plugin-profile manifests
|
|
127
|
-
- Export download / import upload / delete (two-step confirmation); unlimited, never auto-pruned
|
|
128
|
-
-
|
|
136
|
+
- Creates `.tar.gz` archives of sessions, configuration, and plugin-profile manifests; sessions are snapshotted through the persistence layer's stable-read seam (active-agent writes no longer fail creation), and creation shows one continuous phase progress bar (copy / pack / verify / publish, step counter 1/4–4/4, real percentage during copy)
|
|
137
|
+
- Export download / import upload / delete (two-step confirmation); unlimited, never auto-pruned; imported archives must pass the same integrity inspection used by restore
|
|
138
|
+
- **Integrity inspection** validates gzip/tar structure, paths, and entry types. Only `sessions`, the three allowlisted config files, and `profiles/<name>/package.json` are accepted; traversal, links, special files, unknown content, corrupt archives, and invalid profile manifests are rejected
|
|
139
|
+
- **Restore preflight** produces a single-use five-minute plan showing the full sessions replacement, config replacements/removals, and profile-manifest updates. Final commit rechecks the archive SHA-256 and current-target fingerprint; any drift rejects the restore
|
|
140
|
+
- Restore uses a transaction journal and rollback directory: sessions are replaced in full, config is made exact to the snapshot, and profiles update package.json only while keeping node_modules, credentials, and attachments. Managed runtimes restart automatically; manual launches receive hand-restart instructions
|
|
129
141
|
|
|
130
142
|
### Skills management
|
|
131
143
|
|
|
@@ -134,7 +146,7 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
134
146
|
- Lists local skills in three sections — **auto-loaded / manual-only / fully disabled**; same-name shadowing marks both copies, bundled directories are read-only
|
|
135
147
|
- Two switches edit the SKILL.md frontmatter directly (`disable-model-invocation` / `user-invocable`); changes go live within ~200 ms
|
|
136
148
|
- Entries with legacy camelCase keys are dropped by the official parser: ⚠ warning + one-click canonical fix
|
|
137
|
-
- ✨ Fill with AI: pick a model to draft a description (follows the UI language), saved to a plugin sidecar index — **SKILL.md is never modified**; one-click batch fill runs in the host background and can be cancelled
|
|
149
|
+
- ✨ Fill with AI: pick a model to draft a description (follows the UI language), saved to a plugin sidecar index — **SKILL.md is never modified**; one-click batch fill runs in the host background and can be cancelled. Already-annotated skills are listed separately in the plan and are only overwritten after a "Confirm forced refill" second confirmation (annotating no longer blocks future batch fills forever); completion-log timestamps use your local timezone
|
|
138
150
|
|
|
139
151
|
### Subagent model
|
|
140
152
|
|
|
@@ -172,9 +184,9 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
172
184
|
|
|
173
185
|

|
|
174
186
|
|
|
175
|
-
- **View**: one unified list for sessions (running / cold / archived) with status badges, workspace, event count, and size; **starts on the “Archived” view by default**, and each of the All / Archived / Deleted filters fetches its own subset from the host **once,** then keeps it in a **module-level cache** — switching filters sends no requests, and **closing and reopening the panel renders the cache instantly while quietly refreshing the current view once in the background** (only a page reload clears the cache), with a “Refresh” button for a forced refetch of the current view; sizes are never shipped with the list — each row fetches its size lazily (double-cached in the module and in host memory: reopened panels and refreshed pages reuse it, cleared on delete); the detail page walks events as paged cards (single-slot host snapshot cache: paging and reopening the same session never re-reads the log, live sessions stay fresh within 30 seconds), with **event bodies rendered as official Markdown** (reusing the platform renderer `MarkdownText`, same look as the chat UI: code blocks, lists, tables, math — raw HTML and unsafe links are rejected by default; older DSH shells without the renderer automatically fall back to plain text), and consecutive system events collapse into a countable block by default — click to expand the details; **entering a detail remembers the list scroll position and returning to the list drops you back exactly where you were** (reusing the official panel's scroll container; changing the filter or search while in the detail discards the restore)
|
|
176
|
-
- **Export**: one-click download
|
|
177
|
-
- **Archive**: archived sessions disappear from the official sidebar (official behavior)
|
|
187
|
+
- **View**: one unified list for sessions (running / cold / archived) with status badges, workspace, event count, and size; **starts on the “Archived” view by default**, and each of the All / Archived / Deleted filters fetches its own subset from the host **once,** then keeps it in a **module-level cache** — switching filters sends no requests, and **closing and reopening the panel renders the cache instantly while quietly refreshing the current view once in the background** (only a page reload clears the cache), with a “Refresh” button for a forced refetch of the current view; normal lists also provide a “Select multiple” button; in that mode, clicking anywhere on a session row selects or clears it without requiring a precise checkbox click, while one-click select-all / clear-all remains available for the current filtered result, and selected rows use a slim brand-colored edge without replacing their background; the toolbar shows eligible counts and runs batch export / archive / delete actions (changing filters, searching, or opening details exits selection mode automatically); sizes are never shipped with the list — each row fetches its size lazily (double-cached in the module and in host memory: reopened panels and refreshed pages reuse it, cleared on delete); the detail page walks events as paged cards (single-slot host snapshot cache: paging and reopening the same session never re-reads the log, live sessions stay fresh within 30 seconds), with **event bodies rendered as official Markdown** (reusing the platform renderer `MarkdownText`, same look as the chat UI: code blocks, lists, tables, math — raw HTML and unsafe links are rejected by default; older DSH shells without the renderer automatically fall back to plain text), and consecutive system events collapse into a countable block by default — click to expand the details; **entering a detail remembers the list scroll position and returning to the list drops you back exactly where you were** (reusing the official panel's scroll container; changing the filter or search while in the detail discards the restore)
|
|
188
|
+
- **Export**: one-click or batch download through the official export path (one full ZIP per session, including subagents and attachments) — the host never assembles a package itself
|
|
189
|
+
- **Archive**: archive one or many non-running sessions; archived sessions disappear from the official sidebar (official behavior), and the official UI cannot unarchive
|
|
178
190
|
- **Content search**: full-text semantic search over conversations (case-insensitive, whitespace-flexible) with cross-session hits (matched text is highlighted; multiple matches show seq chips for one-click jumps) → **hit-window view**: opening a result centers a context window on the matched seq (15 events on each side; the matched event gets a HIT badge, is highlighted, **auto-scrolled into view and flashes for 2 seconds**), with **previous / next match** navigation and navigator seq chips for direct jumps (mirroring dsh-session-kb's Locate interaction); the window can keep loading later events; optionally restricted to the archived zone
|
|
179
191
|
- **Delete**: Only archived sessions can be deleted, and a session that becomes live is rejected again immediately before execution; the two-phase confirmation shows its id / title / workspace / size, persists the deletion record atomically first, and only then removes the log directory; deleted records stay visible (read-only) under the Deleted filter
|
|
180
192
|
- Entry: the “Sessions” subpage under “Maintenance” (on by default); the optional settings-sidebar entry is off by default
|
|
@@ -337,7 +349,7 @@ The token expired (the official `oasis-token is embezzled` error means the token
|
|
|
337
349
|
<details>
|
|
338
350
|
<summary><strong>What does restoring a backup do?</strong></summary>
|
|
339
351
|
|
|
340
|
-
|
|
352
|
+
The host first runs an integrity inspection and presents a restore-preflight plan for final confirmation. Immediately before commit it rechecks the backup SHA-256, current-target fingerprint, and running work; any change aborts without a partial overwrite or restart. A successful commit replaces sessions in full, makes the allowlisted config files exact to the snapshot, and updates only each profile's package.json (node_modules, credentials, and attachments stay untouched). Docker/systemd/pm2-style managed runtimes restart automatically; likely terminal-launched instances show manual-restart instructions. Deleting a backup also requires two-step confirmation.
|
|
341
353
|
</details>
|
|
342
354
|
|
|
343
355
|
<details>
|
package/README.md
CHANGED
|
@@ -5,16 +5,17 @@
|
|
|
5
5
|
# 🛠️ dsh-service
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<strong
|
|
9
|
-
<em>A service-control & operations plugin for
|
|
8
|
+
<strong>DeepSeek Harness (DSH) Web 服务控制与运维插件</strong><br>
|
|
9
|
+
<em>A service-control & operations plugin for DeepSeek Harness (DSH) Web.</em>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
|
-
[](package.json)
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
15
15
|
[](https://cordis.moe/)
|
|
16
16
|
[](https://github.com/gehennawu/dsh-service)
|
|
17
17
|
[](https://github.com/gehennawu/dsh-service/issues)
|
|
18
|
+
[](https://awesome-dsh-plugin.com)
|
|
18
19
|
|
|
19
20
|
<p align="center">
|
|
20
21
|
<a href="#-功能">功能</a> •
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
|
|
33
34
|
</div>
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级、健康诊断、模型用量统计、额度查询、备份管理、任务通知、技能管理、会话管理与 Linux 文件权限维护。
|
|
36
37
|
|
|
37
38
|

|
|
38
39
|
|
|
@@ -59,6 +60,15 @@
|
|
|
59
60
|
- 状态摘要(error → warning → info → normal 聚合,带状态点)→ 可行动项(仅在存在时)→ 版本与运行环境 → 指标格 → 固定核心操作(健康检查 / 额度查询 / 创建备份,随功能开关门控)→ 近期报错(仅非空时渲染,默认折叠)
|
|
60
61
|
- 状态聚合规则:健康/诊断/备份/统计/额度/重启任一失败即 error;权限异常、非咨询性诊断警告、额度窗口使用率 ≥80% 为 warning;可更新、手动启动环境、尚无备份为 info
|
|
61
62
|
|
|
63
|
+
### 维护与配置聚合页
|
|
64
|
+
|
|
65
|
+

|
|
66
|
+
|
|
67
|
+

|
|
68
|
+
|
|
69
|
+
- 「维护」集中会话管理、技能、子代理、备份维护与重启;记住最近使用的子页,关闭对应功能后自动回退到仍可用的项目
|
|
70
|
+
- 「配置」集中功能开关与任务通知;开关按功能组展示并热生效,任务通知关闭时保留入口但显示置灰状态
|
|
71
|
+
|
|
62
72
|
### 版本与更新
|
|
63
73
|
|
|
64
74
|
- 显示当前 DSH 与插件版本,链接 GitHub Releases
|
|
@@ -125,9 +135,11 @@
|
|
|
125
135
|
|
|
126
136
|
- 备份记录列表为两行轻行(文件名主行 + 体积 · 时间次行,分隔线布局;会话管理列表同款)
|
|
127
137
|
|
|
128
|
-
- 创建会话、配置与插件 profile 清单的 `.tar.gz`
|
|
129
|
-
- 导出下载 / 导入上传 /
|
|
130
|
-
-
|
|
138
|
+
- 创建会话、配置与插件 profile 清单的 `.tar.gz` 归档;会话经持久化层稳定快照(活跃 agent 写入不再导致失败),创建过程以单条连续进度条分阶段显示(复制/打包/校验/发布,带步骤号 1/4–4/4,复制阶段为真实百分比)
|
|
139
|
+
- 导出下载 / 导入上传 / 删除(两段式确认);不限份数、不自动清理;导入归档必须先通过与恢复相同的完整性检查
|
|
140
|
+
- **完整性检查**:恢复前校验 gzip/tar、路径与条目类型,只接受 `sessions`、三份允许配置和 `profiles/<name>/package.json`;拒绝越界路径、链接、特殊文件、未知内容、损坏归档与非法 profile 清单
|
|
141
|
+
- **恢复预检**:先生成 5 分钟有效的一次性计划,展示会话整体替换、配置覆盖/移除和 profile manifest 覆盖清单;最终确认前再次校验归档 SHA-256 与当前目标指纹,发生漂移则拒绝执行
|
|
142
|
+
- 恢复提交使用事务日志和回滚目录:会话整体替换,配置按快照精确替换,profile 只更新 package.json 并保留 node_modules/凭据/附件;成功后托管环境自动重启,手动启动环境提示用户手动重启
|
|
131
143
|
|
|
132
144
|
### 技能管理
|
|
133
145
|
|
|
@@ -136,7 +148,7 @@
|
|
|
136
148
|
- 按 **自动加载 / 仅手动调用 / 完全停用** 三区展示本地技能;同名遮蔽与被遮蔽副本均有标注,内置目录只读
|
|
137
149
|
- 双开关直接改写 SKILL.md frontmatter(`disable-model-invocation` / `user-invocable`),约 200ms 热生效
|
|
138
150
|
- 带 camelCase 旧版键的条目会被官方解析器剔除:⚠ 提示 + 一键修复
|
|
139
|
-
- ✨ AI 补全说明:选模型生成描述草稿(跟随界面语言),确认后存入插件侧车索引——**绝不改写 SKILL.md
|
|
151
|
+
- ✨ AI 补全说明:选模型生成描述草稿(跟随界面语言),确认后存入插件侧车索引——**绝不改写 SKILL.md**;支持一键批量补全(宿主后台运行、可取消)。已注释技能会在计划中单列,经「确认强制补全」二次确认后才会被覆盖(不再是一旦注释就永远无法再次补全);补全日志时间按本机时区显示
|
|
140
152
|
|
|
141
153
|
### 子代理模型
|
|
142
154
|
|
|
@@ -162,9 +174,9 @@
|
|
|
162
174
|
|
|
163
175
|

|
|
164
176
|
|
|
165
|
-
- **查看**:统一列表展示会话(运行中 / 冷会话 / 已归档),行内标状态徽章、工作区、事件数、文件体积;**默认停在「仅归档」视图**,全部 / 仅归档 / 已删除三个筛选各自**首次**按需向宿主拉取对应子集并缓存(模块级缓存:切换筛选零请求、**关掉面板再打开秒显缓存 +
|
|
166
|
-
-
|
|
167
|
-
-
|
|
177
|
+
- **查看**:统一列表展示会话(运行中 / 冷会话 / 已归档),行内标状态徽章、工作区、事件数、文件体积;**默认停在「仅归档」视图**,全部 / 仅归档 / 已删除三个筛选各自**首次**按需向宿主拉取对应子集并缓存(模块级缓存:切换筛选零请求、**关掉面板再打开秒显缓存 + 后台静默刷新一次保鲜**,页面刷新才清零),「刷新」按钮可强制重拉当前视图;普通列表提供「批量选择」按钮,进入后可直接点击整条会话(无需精确点复选框)进行选择 / 取消选择,也可一键全选 / 取消全选当前筛选结果,选中行以左侧品牌色标记而不改变背景;工具栏按资格显示可执行数量并支持批量导出 / 归档 / 删除(切换筛选、搜索或进入详情会自动退出批量态);文件体积不随列表下发、行内按需懒加载(模块级 + 宿主进程内存双层缓存:刷新浏览器 / 重开面板直接复用,删除时失效);**进详情记住列表滚动位置,返回列表原地不动**(沿用官方面板滚动容器,详情期间切筛选 / 改搜索则放弃恢复);详情按事件卡片分页浏览(宿主单槽位快照缓存:翻页/重进详情零重复读取,live 会话 30 秒内保鲜),**正文按官方 Markdown 富文本渲染**(复用平台官方渲染器 `MarkdownText`,与聊天界面观感一致:代码块/列表/表格/数学公式、默认拒原始 HTML 与危险链接;老版本 DSH 未提供该渲染器时自动回落纯文本),连续系统事件默认折叠为计数块、点击展开明细
|
|
178
|
+
- **导出**:一键或批量下载官方完整 ZIP(每个会话一个 ZIP,含子代理与附件),复用官方导出链路,宿主不自己拼包
|
|
179
|
+
- **归档**:单项或批量归档非运行中会话;归档后从官方侧栏隐藏(官方行为),官方不支持恢复
|
|
168
180
|
- **内容搜索**:对话全文语义搜索(大小写不敏感、空白灵活),跨会话命中列表(匹配文本高亮;多命中显示 seq 位置芯片、可一键直达)→ **命中窗口视图**:打开即以命中 seq 为中心展示上下文窗口(命中前后各 15 条事件;命中行标「命中」徽章高亮、**自动滚动定位并闪烁 2 秒**),支持**上一个 / 下一个命中**翻跳与导航条 seq 芯片直达(参考 dsh-session-kb 的 Locate 交互);窗口可继续加载后续事件;可限定仅搜归档区
|
|
169
181
|
- **删除**:仅已归档会话可删除,且执行前再次拒绝运行中的会话;两段式确认先展示会话 id / 标题 / 工作区 / 文件体积,删除记录先原子落盘、再移除日志目录;已删除记录在「已删除」筛选下可见(只读)
|
|
170
182
|
- 入口:「维护」页子标签「会话管理」(默认开),设置页左列入口可选(默认关)
|
|
@@ -339,7 +351,7 @@ Step Plan 订阅没有 API-key 形态的查询接口,需要网页登录态令
|
|
|
339
351
|
<details>
|
|
340
352
|
<summary><strong>恢复备份会怎样?</strong></summary>
|
|
341
353
|
|
|
342
|
-
|
|
354
|
+
先做完整性检查并展示恢复预检计划,再由用户最终确认。提交前宿主会复检备份 SHA-256、当前目标指纹与运行中工作;任何变化都会中止,不会部分覆盖或重启。提交成功后会话目录整体替换,允许的配置文件按快照精确替换,profile 只覆盖 package.json(node_modules、凭据、附件不动)。受 Docker/systemd/pm2 等托管时自动重启;疑似终端手动启动时显示手动重启指引。删除备份同样需要两段式确认。
|
|
343
355
|
</details>
|
|
344
356
|
|
|
345
357
|
<details>
|