@gehennawu/dsh-service 0.33.1 → 0.40.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 +19 -11
- package/README.md +20 -10
- package/client.js +631 -354
- package/package.json +1 -1
package/README.en.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
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/)
|
|
@@ -48,12 +48,17 @@ A service-control and operations plugin for self-hosted DSH Web: safe restart, v
|
|
|
48
48
|
|
|
49
49
|
## 🚀 Features
|
|
50
50
|
|
|
51
|
-
The Settings "Service Control" panel has
|
|
51
|
+
The Settings "Service Control" panel has a six-page navigation: **Overview · Model stats · Quota lookup · Health · Maintenance · Configuration**; "Maintenance" aggregates five subpages — Sessions · Skills · Subagents · Backups · Restart — and "Configuration" aggregates Features · Task notifications. Restart, Quota lookup, and Sessions can each enable a **quick entry in the settings left navigation** (off by default; the Skills and Subagents sidebar entries were removed).
|
|
52
52
|
|
|
53
53
|
Under **Plugins → Plugin configuration**, ten host-level switches: **Health diagnostics, Model statistics, Quota lookup, Backup maintenance, Task notifications, Skill manager, Subagent model, Session manager, Mobile adaptation, `/healthz` liveness endpoint** (all on by default except Mobile adaptation). All are live settings: disabling hides the UI, stops polling/subscriptions, and makes the host reject that capability; Overview and Restart stay available.
|
|
54
54
|
|
|
55
55
|

|
|
56
56
|
|
|
57
|
+
### Overview (six sections)
|
|
58
|
+
|
|
59
|
+
- 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
|
+
- 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
|
+
|
|
57
62
|
### Version and updates
|
|
58
63
|
|
|
59
64
|
- Shows the current DSH and plugin versions, linking to GitHub Releases
|
|
@@ -67,7 +72,7 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
67
72
|
- Detects active agents, background jobs, and terminals before restart; lists them and requires explicit confirmation
|
|
68
73
|
- `/restart` also works in conversations; automatically refuses while work is running
|
|
69
74
|
- Probes the new process after restart and reloads the page; manual reload offered after 60 seconds
|
|
70
|
-
- Optional "Restart" entry in the settings left navigation (off by default), sharing the same confirmation flow
|
|
75
|
+
- Optional "Restart" entry in the settings left navigation (off by default), sharing the same confirmation flow as the "Maintenance → Restart" subpage
|
|
71
76
|
- A suspected manual terminal launch warns that nothing will bring the process back and gets a yellow caution in Health
|
|
72
77
|
|
|
73
78
|
### Health diagnostics
|
|
@@ -75,24 +80,24 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
75
80
|

|
|
76
81
|
|
|
77
82
|
- Uptime, memory, session count, active agents, and background jobs; a "Process and runtime" card shows platform, architecture, and Node version
|
|
78
|
-
- Full diagnostics: session storage, workspace registry, backup storage, tar availability, file permissions, runtime environment, and Node version
|
|
79
|
-
- File-permission deep scan and repair (two-step confirmation)
|
|
83
|
+
- Full diagnostics: session storage, workspace registry, backup storage, tar availability, file permissions, runtime environment, and Node version — rendered as a two-line check list (name + status dot / detail) with abnormal rows locally emphasized
|
|
84
|
+
- File-permission deep scan and repair (two-step confirmation) behind a collapsed "Permissions & repair" section
|
|
80
85
|
- Suspected manual launch → yellow "no restart assurance" caution; no backups is informational only and never lights the ⚠
|
|
81
86
|
|
|
82
87
|
### Model statistics
|
|
83
88
|
|
|
84
89
|

|
|
85
90
|
|
|
86
|
-
- 7-day stacked bar chart of input / output / cache tokens; filter by project, hover for exact values
|
|
91
|
+
- 7-day stacked bar chart of input / output / cache tokens; filter by project, hover for exact values; legend and refresh live in a unified region header; an accessible text summary accompanies the chart
|
|
87
92
|
- Per-model horizontal bars with a "Today / Last 7 days / All time" toggle
|
|
88
|
-
- Last-24-hour model/tool errors (collapsed by default)
|
|
93
|
+
- Last-24-hour model/tool errors (collapsed by default, rendered only when present)
|
|
89
94
|
- Steps whose provider reports no token usage are excluded
|
|
90
95
|
|
|
91
96
|
### Quota lookup
|
|
92
97
|
|
|
93
98
|

|
|
94
99
|
|
|
95
|
-
- Provider cards
|
|
100
|
+
- Provider cards keep the existing window presentation (label + percent / independent bar / reset countdown); **advanced configuration** (credentials, kind switching, manual reset entries) is collapsed per card by default
|
|
96
101
|
- A **quota ring** in the conversation composer follows the current session's model provider and shows the tightest budget window (<80% green, ≥80% amber); clicking opens a detail panel that becomes a centered overlay on narrow screens
|
|
97
102
|
- Built-in adaptations:
|
|
98
103
|
|
|
@@ -116,6 +121,8 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
116
121
|
|
|
117
122
|

|
|
118
123
|
|
|
124
|
+
- 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
|
+
|
|
119
126
|
- Creates `.tar.gz` archives of sessions, configuration, and plugin-profile manifests
|
|
120
127
|
- Export download / import upload / delete (two-step confirmation); unlimited, never auto-pruned
|
|
121
128
|
- Restore: extract and overwrite to the corresponding paths, then restarts automatically after confirmation
|
|
@@ -144,7 +151,8 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
144
151
|
|
|
145
152
|

|
|
146
153
|
|
|
147
|
-
- Browser notification when a session finishes its turn or
|
|
154
|
+
- Browser notification when a root session finishes its turn or any session needs approval / plan review / an answer; subagent completion is silent; clicking focuses the page
|
|
155
|
+
- Subagent approval / plan-review / question requests still notify
|
|
148
156
|
- Four independent toggles: master, task completion, approvals & questions, composer-bell visibility
|
|
149
157
|
- The composer bell toggles the master switch quickly; all toggles persist across reloads
|
|
150
158
|
|
|
@@ -169,7 +177,7 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
169
177
|
- **Archive**: archived sessions disappear from the official sidebar (official behavior); the panel marks “archiving is one-way”, and the official UI cannot unarchive
|
|
170
178
|
- **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
|
|
171
179
|
- **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
|
|
172
|
-
- Entry: “Sessions”
|
|
180
|
+
- Entry: the “Sessions” subpage under “Maintenance” (on by default); the optional settings-sidebar entry is off by default
|
|
173
181
|
- Delete records live at `$DSH_HOME/dsh-service-sessions-deleted.json` (atomic write, `0600`, title/time only — no content, not recoverable)
|
|
174
182
|
|
|
175
183
|
### External liveness probe
|
|
@@ -184,7 +192,7 @@ The plugin is a Cordis two-half structure: the **Host half (`index.js`)** owns a
|
|
|
184
192
|
```mermaid
|
|
185
193
|
flowchart TB
|
|
186
194
|
subgraph Client["🌐 Client browser half (client.js)"]
|
|
187
|
-
UI["Settings : Service Control panel (
|
|
195
|
+
UI["Settings : Service Control panel (six-page navigation + quick entries)<br/>quota ring · notification bell · mobile adaptation"]
|
|
188
196
|
end
|
|
189
197
|
|
|
190
198
|
subgraph Host["⚙️ Host half (index.js)"]
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<em>A service-control & operations plugin for self-hosted 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/)
|
|
@@ -48,12 +48,17 @@
|
|
|
48
48
|
|
|
49
49
|
## 🚀 功能
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
设置页「服务控制」面板六页导航:**概览 · 模型统计 · 额度查询 · 健康诊断 · 维护 · 配置**;其中「维护」聚合 会话管理 · 技能 · 子代理 · 备份维护 · 重启 五个子页,「配置」聚合 功能开关 · 任务通知 两个子页。重启、额度查询、会话管理可另行开启**设置页左列快捷入口**(默认关闭;技能与子代理的左列入口已撤销)。
|
|
52
52
|
|
|
53
53
|
「插件 → 插件配置」提供十个宿主级开关:**健康诊断、模型统计、额度查询、备份维护、任务通知、技能管理、子代理模型、会话管理、移动端适配、`/healthz` 探活**(除移动端适配外默认开启)。全部热生效:关闭即隐藏界面、停止轮询并让宿主拒绝对应能力;概览与重启固定保留。
|
|
54
54
|
|
|
55
55
|

|
|
56
56
|
|
|
57
|
+
### 概览(六段式)
|
|
58
|
+
|
|
59
|
+
- 状态摘要(error → warning → info → normal 聚合,带状态点)→ 可行动项(仅在存在时)→ 版本与运行环境 → 指标格 → 固定核心操作(健康检查 / 额度查询 / 创建备份,随功能开关门控)→ 近期报错(仅非空时渲染,默认折叠)
|
|
60
|
+
- 状态聚合规则:健康/诊断/备份/统计/额度/重启任一失败即 error;权限异常、非咨询性诊断警告、额度窗口使用率 ≥80% 为 warning;可更新、手动启动环境、尚无备份为 info
|
|
61
|
+
|
|
57
62
|
### 版本与更新
|
|
58
63
|
|
|
59
64
|
- 显示当前 DSH 与插件版本,链接 GitHub Releases
|
|
@@ -67,7 +72,7 @@
|
|
|
67
72
|
- 重启前检测活跃 Agent、后台任务与终端,展示清单并要求显式确认
|
|
68
73
|
- 对话输入 `/restart` 也可触发;检测到运行中工作时自动拒绝
|
|
69
74
|
- 重启后自动探测新进程并刷新页面,60 秒未恢复提供手动刷新
|
|
70
|
-
-
|
|
75
|
+
- 可开启「设置页左列显示入口」(默认关闭),与「维护 → 重启」子页共用同一确认流程
|
|
71
76
|
- 疑似终端手动启动时提示「退出后不会自动拉起」,健康诊断以黄色警示标注
|
|
72
77
|
|
|
73
78
|
### 健康诊断
|
|
@@ -75,21 +80,23 @@
|
|
|
75
80
|

|
|
76
81
|
|
|
77
82
|
- 运行时间、内存、会话数、活跃 Agent 与后台任务;「进程与运行环境」卡显示平台、架构与 Node 版本
|
|
78
|
-
- 完整诊断:会话存储、工作区注册表、备份目录、tar 可用性、文件权限、运行环境与 Node
|
|
79
|
-
-
|
|
83
|
+
- 完整诊断:会话存储、工作区注册表、备份目录、tar 可用性、文件权限、运行环境与 Node 版本——**两行检查清单**(检查名+状态点 / 详情),异常行局部淡染强调、正常行低对比
|
|
84
|
+
- 文件权限深检与修复(两段式确认)收敛在**默认折叠**的「权限与修复」区(有异常时按钮显示计数)
|
|
80
85
|
- 疑似手动启动 → 黄色警示「重启无保障」;无备份属信息级提示,不点亮 ⚠
|
|
81
86
|
|
|
82
87
|
### 模型统计
|
|
83
88
|
|
|
84
89
|

|
|
85
90
|
|
|
86
|
-
- 近 7 天输入 / 输出 / 缓存 token
|
|
91
|
+
- 近 7 天输入 / 输出 / 缓存 token 堆叠柱图,按项目筛选、悬停显示精确值;**图例与刷新统一收进统计区头部行**,图表带可访问的文本摘要
|
|
87
92
|
- 模型明细横条,列表头部「今日 / 近 7 天 / 累计」切换
|
|
88
|
-
- 最近 24 小时模型 /
|
|
93
|
+
- 最近 24 小时模型 / 工具报错统计(默认折叠、仅非空渲染)
|
|
89
94
|
- 提供方未上报 token 用量的步骤不纳入统计
|
|
90
95
|
|
|
91
96
|
### 额度查询
|
|
92
97
|
|
|
98
|
+
- 供应商卡片保留既有窗口展示(标签+百分比 / 独立进度条 / 重置倒计时);**高级配置**(凭据填写、类型切换、手动重置录入)默认折叠,按卡展开
|
|
99
|
+
|
|
93
100
|

|
|
94
101
|
|
|
95
102
|
- 卡片分区展示各供应商:窗口百分比、独立进度条、重置时间;支持强制刷新、官网用量页链接与卡片排序
|
|
@@ -116,6 +123,8 @@
|
|
|
116
123
|
|
|
117
124
|

|
|
118
125
|
|
|
126
|
+
- 备份记录列表为两行轻行(文件名主行 + 体积 · 时间次行,分隔线布局;会话管理列表同款)
|
|
127
|
+
|
|
119
128
|
- 创建会话、配置与插件 profile 清单的 `.tar.gz` 归档
|
|
120
129
|
- 导出下载 / 导入上传 / 删除(两段式确认);不限份数、不自动清理
|
|
121
130
|
- 恢复:解压覆盖对应路径,确认后自动重启
|
|
@@ -144,7 +153,8 @@
|
|
|
144
153
|
|
|
145
154
|

|
|
146
155
|
|
|
147
|
-
-
|
|
156
|
+
- 主会话完成一轮任务、或会话需要授权 / 审阅计划 / 回答问题时发送浏览器通知;子代理完成任务不发送完成通知;点击通知聚焦页面
|
|
157
|
+
- 子代理触发授权 / 审阅计划 / 回答问题时仍发送浏览器通知
|
|
148
158
|
- 四档独立开关:总开关、任务完成、授权与提问、输入框铃铛显隐
|
|
149
159
|
- 对话栏铃铛一键开关总通知;所有开关刷新后保持
|
|
150
160
|
|
|
@@ -157,7 +167,7 @@
|
|
|
157
167
|
- **归档**:归档后从官方侧栏隐藏(官方行为);面板内明确标注「归档为单项操作」,官方不支持恢复
|
|
158
168
|
- **内容搜索**:对话全文语义搜索(大小写不敏感、空白灵活),跨会话命中列表(匹配文本高亮;多命中显示 seq 位置芯片、可一键直达)→ **命中窗口视图**:打开即以命中 seq 为中心展示上下文窗口(命中前后各 15 条事件;命中行标「命中」徽章高亮、**自动滚动定位并闪烁 2 秒**),支持**上一个 / 下一个命中**翻跳与导航条 seq 芯片直达(参考 dsh-session-kb 的 Locate 交互);窗口可继续加载后续事件;可限定仅搜归档区
|
|
159
169
|
- **删除**:仅已归档会话可删除,且执行前再次拒绝运行中的会话;两段式确认先展示会话 id / 标题 / 工作区 / 文件体积,删除记录先原子落盘、再移除日志目录;已删除记录在「已删除」筛选下可见(只读)
|
|
160
|
-
-
|
|
170
|
+
- 入口:「维护」页子标签「会话管理」(默认开),设置页左列入口可选(默认关)
|
|
161
171
|
- 删除记录存 `$DSH_HOME/dsh-service-sessions-deleted.json`(原子写入、`0600`,仅标题/时间,不含内容、不可恢复)
|
|
162
172
|
|
|
163
173
|
### 移动端适配
|
|
@@ -184,7 +194,7 @@
|
|
|
184
194
|
```mermaid
|
|
185
195
|
flowchart TB
|
|
186
196
|
subgraph Client["🌐 Client 浏览器端 (client.js)"]
|
|
187
|
-
UI["
|
|
197
|
+
UI["设置页「服务控制」面板(六页导航 + 快捷入口)<br/>额度圆环 · 通知铃铛 · 移动端适配"]
|
|
188
198
|
end
|
|
189
199
|
|
|
190
200
|
subgraph Host["⚙️ Host 服务端 (index.js)"]
|