@gehennawu/dsh-service 0.32.0 → 0.33.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/README.en.md +31 -3
- package/README.md +31 -3
- package/client.js +773 -9
- package/index.js +220 -0
- package/package.json +1 -1
- package/screenshots/README.md +6 -0
- package/screenshots/backup-management.png +0 -0
- package/screenshots/backup-management_en.png +0 -0
- package/screenshots/health-diagnostics.png +0 -0
- package/screenshots/health-diagnostics_en.png +0 -0
- package/screenshots/mobile-adaptation.png +0 -0
- package/screenshots/mobile-adaptation_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/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/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
|
@@ -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/)
|
|
@@ -52,6 +52,8 @@ The Settings "Service Control" panel has ten tabs: **Overview · Notifications
|
|
|
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
|
+

|
|
56
|
+
|
|
55
57
|
### Version and updates
|
|
56
58
|
|
|
57
59
|
- Shows the current DSH and plugin versions, linking to GitHub Releases
|
|
@@ -60,6 +62,8 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
60
62
|
|
|
61
63
|
### Safe restart
|
|
62
64
|
|
|
65
|
+

|
|
66
|
+
|
|
63
67
|
- Detects active agents, background jobs, and terminals before restart; lists them and requires explicit confirmation
|
|
64
68
|
- `/restart` also works in conversations; automatically refuses while work is running
|
|
65
69
|
- Probes the new process after restart and reloads the page; manual reload offered after 60 seconds
|
|
@@ -68,6 +72,8 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
68
72
|
|
|
69
73
|
### Health diagnostics
|
|
70
74
|
|
|
75
|
+

|
|
76
|
+
|
|
71
77
|
- Uptime, memory, session count, active agents, and background jobs; a "Process and runtime" card shows platform, architecture, and Node version
|
|
72
78
|
- Full diagnostics: session storage, workspace registry, backup storage, tar availability, file permissions, runtime environment, and Node version
|
|
73
79
|
- File-permission deep scan and repair (two-step confirmation)
|
|
@@ -97,15 +103,19 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
97
103
|
| OpenCode Go | `{baseURL}/usage` |
|
|
98
104
|
| OpenRouter | Credits used % |
|
|
99
105
|
| Kimi / SiliconFlow | CNY balance |
|
|
106
|
+
| StepFun Balance | Official `GET /v1/accounts` (API key, com/ai dual domains) |
|
|
107
|
+
| StepFun Step Plan | Console BFF subscription quota (Oasis-Token console session; 5-hour/weekly windows vs Credit pool auto-detected) |
|
|
100
108
|
| Xiaomi MiMo Token Plan | Console-origin plan quota (web session cookie) |
|
|
101
109
|
| CLIProxyAPI deployment | Official remaining quota of each OAuth upstream account |
|
|
102
110
|
|
|
103
|
-
- Credentials go into the DSH credential store (`$DSH_HOME/.credentials.yaml`, hot-effective): an API key, the CPA management key, or the
|
|
111
|
+
- Credentials go into the DSH credential store (`$DSH_HOME/.credentials.yaml`, hot-effective): an API key, the CPA management key, the Xiaomi console cookie, or the StepFun Step Plan console token (Oasis-Token; the `Oasis-Webid` is derived from the token automatically — no manual entry)
|
|
104
112
|
- Anti-rate-limit pacing: 60 s result cache, exponential backoff (30 s doubling, capped at 15 min); auto-query can be set to manual-only / 1 / 2 / 5 / 10 minutes
|
|
105
113
|
- API keys are resolved only inside the host process; the browser receives normalized window data only; unadapted providers are never requested
|
|
106
114
|
|
|
107
115
|
### Backup management
|
|
108
116
|
|
|
117
|
+

|
|
118
|
+
|
|
109
119
|
- Creates `.tar.gz` archives of sessions, configuration, and plugin-profile manifests
|
|
110
120
|
- Export download / import upload / delete (two-step confirmation); unlimited, never auto-pruned
|
|
111
121
|
- Restore: extract and overwrite to the corresponding paths, then restarts automatically after confirmation
|
|
@@ -140,14 +150,20 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
140
150
|
|
|
141
151
|
### Mobile adaptation
|
|
142
152
|
|
|
153
|
+

|
|
154
|
+
|
|
143
155
|
- Off by default; active only below a 1024 px viewport (phones / narrow windows), desktops unaffected
|
|
144
|
-
- Sidebar becomes a drawer, details column
|
|
156
|
+
- Sidebar becomes a drawer, details column is hidden on mobile (matching the official narrow-screen behavior), modals become full-screen panels, settings left nav a horizontal top strip
|
|
157
|
+
- Scroll immersion: inside a conversation, swiping down auto-hides the header and composer for full-screen reading; swipe up, reaching the bottom, or focusing the composer brings them back, with a resident bottom handle as a manual toggle. Programmatic scrolling (streaming pinning, anchor jumps) never triggers it
|
|
158
|
+
- The "Back to bottom" button is shifted flush right on mobile (no more large empty strip); a matching circular up-arrow now sits above it on all platforms, jumping to the previous user message on each click for step-by-step back navigation. Targets outside the loaded history auto-trigger the official "load earlier" action; the button hides once you reach the very top and reappears when you scroll back down
|
|
145
159
|
- Transparent large-JSON compression (≥4KB auto gzip/brotli per `Accept-Encoding`) speeds up long session histories
|
|
146
160
|
- Adds `viewport-fit=cover` with safe-area avoidance, disables double-tap zoom, keeps inputs ≥16px against iOS focus zoom
|
|
147
161
|
- `?dshsvc-mobile-debug=1` shows a floating diagnostics chip (debugging only)
|
|
148
162
|
|
|
149
163
|
### Session manager
|
|
150
164
|
|
|
165
|
+

|
|
166
|
+
|
|
151
167
|
- **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)
|
|
152
168
|
- **Export**: one-click download of the official full ZIP (including subagents and attachments) via the official export path — the host never assembles a package itself
|
|
153
169
|
- **Archive**: archived sessions disappear from the official sidebar (official behavior); the panel marks “archiving is one-way”, and the official UI cannot unarchive
|
|
@@ -298,6 +314,18 @@ Use the inline form on the card: an API key for regular adaptations, the managem
|
|
|
298
314
|
The web session expired. Log back in at platform.xiaomimimo.com, copy the `Cookie:` header from any `/api/v1/tokenPlan/` request, and paste it again via "Set console cookie".
|
|
299
315
|
</details>
|
|
300
316
|
|
|
317
|
+
<details>
|
|
318
|
+
<summary><strong>StepFun Step Plan card shows "credential missing"?</strong></summary>
|
|
319
|
+
|
|
320
|
+
Step Plan has no API-key query endpoint — it needs a web session token. Log in at platform.stepfun.com, press F12 → Application → Cookies → platform.stepfun.com, copy the full `Oasis-Token` value (shaped like `xxx...yyy`; the two-dot separator is part of the token format, do not split it), then paste it via "Set console token (Oasis-Token, browser session)". The `Oasis-Webid` is derived from the token automatically.
|
|
321
|
+
</details>
|
|
322
|
+
|
|
323
|
+
<details>
|
|
324
|
+
<summary><strong>StepFun Step Plan card shows "console session expired"?</strong></summary>
|
|
325
|
+
|
|
326
|
+
The token expired (the official `oasis-token is embezzled` error means the token and web_id no longer match). Log back in at platform.stepfun.com, copy the full new `Oasis-Token` from Cookies and paste it again; if the copied value carries an `Oasis-Token=` or `Cookie: ` prefix it is stripped automatically.
|
|
327
|
+
</details>
|
|
328
|
+
|
|
301
329
|
<details>
|
|
302
330
|
<summary><strong>What does restoring a backup do?</strong></summary>
|
|
303
331
|
|
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/)
|
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
|
|
53
53
|
「插件 → 插件配置」提供十个宿主级开关:**健康诊断、模型统计、额度查询、备份维护、任务通知、技能管理、子代理模型、会话管理、移动端适配、`/healthz` 探活**(除移动端适配外默认开启)。全部热生效:关闭即隐藏界面、停止轮询并让宿主拒绝对应能力;概览与重启固定保留。
|
|
54
54
|
|
|
55
|
+

|
|
56
|
+
|
|
55
57
|
### 版本与更新
|
|
56
58
|
|
|
57
59
|
- 显示当前 DSH 与插件版本,链接 GitHub Releases
|
|
@@ -60,6 +62,8 @@
|
|
|
60
62
|
|
|
61
63
|
### 安全重启
|
|
62
64
|
|
|
65
|
+

|
|
66
|
+
|
|
63
67
|
- 重启前检测活跃 Agent、后台任务与终端,展示清单并要求显式确认
|
|
64
68
|
- 对话输入 `/restart` 也可触发;检测到运行中工作时自动拒绝
|
|
65
69
|
- 重启后自动探测新进程并刷新页面,60 秒未恢复提供手动刷新
|
|
@@ -68,6 +72,8 @@
|
|
|
68
72
|
|
|
69
73
|
### 健康诊断
|
|
70
74
|
|
|
75
|
+

|
|
76
|
+
|
|
71
77
|
- 运行时间、内存、会话数、活跃 Agent 与后台任务;「进程与运行环境」卡显示平台、架构与 Node 版本
|
|
72
78
|
- 完整诊断:会话存储、工作区注册表、备份目录、tar 可用性、文件权限、运行环境与 Node 版本
|
|
73
79
|
- 文件权限深检与修复(两段式确认)
|
|
@@ -97,15 +103,19 @@
|
|
|
97
103
|
| OpenCode Go | `{baseURL}/usage` |
|
|
98
104
|
| OpenRouter | credits 已用百分比 |
|
|
99
105
|
| Kimi / 硅基流动 | 人民币余额 |
|
|
106
|
+
| StepFun 余额 | 官方 `GET /v1/accounts`(API key,com/ai 双域) |
|
|
107
|
+
| StepFun Step Plan | 控制台 BFF 订阅额度(Oasis-Token 登录令牌;5 小时/周窗口与 Credit 月池自动识别) |
|
|
100
108
|
| 小米 MiMo Token Plan | 控制台同源套餐额度(网页登录态 Cookie) |
|
|
101
109
|
| CLIProxyAPI 部署 | 各 OAuth 上游账号官方剩余额度 |
|
|
102
110
|
|
|
103
|
-
- 凭据写入 DSH 凭据库(`$DSH_HOME/.credentials.yaml`,热生效):普通适配填 API key,CLIProxyAPI 填管理密钥,小米填控制台 Cookie
|
|
111
|
+
- 凭据写入 DSH 凭据库(`$DSH_HOME/.credentials.yaml`,热生效):普通适配填 API key,CLIProxyAPI 填管理密钥,小米填控制台 Cookie,StepFun Step Plan 填控制台令牌(Oasis-Token,`Oasis-Webid` 由令牌自动派生无需手填)
|
|
104
112
|
- 防风控:结果缓存 60 秒、失败指数退避(30 秒 ×2、封顶 15 分钟);自动查询可调为仅手动 / 1 / 2 / 5 / 10 分钟
|
|
105
113
|
- API key 只在宿主进程内解析,浏览器仅收到归一化窗口数据;未适配的供应商绝不发起请求
|
|
106
114
|
|
|
107
115
|
### 备份管理
|
|
108
116
|
|
|
117
|
+

|
|
118
|
+
|
|
109
119
|
- 创建会话、配置与插件 profile 清单的 `.tar.gz` 归档
|
|
110
120
|
- 导出下载 / 导入上传 / 删除(两段式确认);不限份数、不自动清理
|
|
111
121
|
- 恢复:解压覆盖对应路径,确认后自动重启
|
|
@@ -140,6 +150,8 @@
|
|
|
140
150
|
|
|
141
151
|
### 会话管理
|
|
142
152
|
|
|
153
|
+

|
|
154
|
+
|
|
143
155
|
- **查看**:统一列表展示会话(运行中 / 冷会话 / 已归档),行内标状态徽章、工作区、事件数、文件体积;**默认停在「仅归档」视图**,全部 / 仅归档 / 已删除三个筛选各自**首次**按需向宿主拉取对应子集并缓存(模块级缓存:切换筛选零请求、**关掉面板再打开秒显缓存 + 后台静默刷新一次保鲜**,页面刷新才清零),「刷新」按钮可强制重拉当前视图;文件体积不随列表下发、行内按需懒加载(模块级 + 宿主进程内存双层缓存:刷新浏览器 / 重开面板直接复用,删除时失效);**进详情记住列表滚动位置,返回列表原地不动**(沿用官方面板滚动容器,详情期间切筛选 / 改搜索则放弃恢复);详情按事件卡片分页浏览(宿主单槽位快照缓存:翻页/重进详情零重复读取,live 会话 30 秒内保鲜),**正文按官方 Markdown 富文本渲染**(复用平台官方渲染器 `MarkdownText`,与聊天界面观感一致:代码块/列表/表格/数学公式、默认拒原始 HTML 与危险链接;老版本 DSH 未提供该渲染器时自动回落纯文本),连续系统事件默认折叠为计数块、点击展开明细
|
|
144
156
|
- **导出**:一键下载官方完整 ZIP(含子代理与附件),复用官方导出链路,宿主不自己拼包
|
|
145
157
|
- **归档**:归档后从官方侧栏隐藏(官方行为);面板内明确标注「归档为单项操作」,官方不支持恢复
|
|
@@ -150,8 +162,12 @@
|
|
|
150
162
|
|
|
151
163
|
### 移动端适配
|
|
152
164
|
|
|
165
|
+

|
|
166
|
+
|
|
153
167
|
- 默认关闭;仅在视口 <1024px(手机竖屏 / 窄窗口)生效,桌面完全无感
|
|
154
|
-
-
|
|
168
|
+
- 侧栏变抽屉、详情列移动端隐藏(对齐官方窄屏语义)、模态变全屏面板、设置左列导航变顶部横滑
|
|
169
|
+
- 滑动沉浸:会话内下滑自动收起头部与输入框全屏阅读,上滑 / 回到底部 / 聚焦输入框即恢复,底部常驻小把手可随时点开合;流式贴底、锚点跳转等程序化滚动绝不误触发
|
|
170
|
+
- 「回到底部」浮钮右移贴边(不再空出大片右侧留白);其上方新增同款圆形上箭头(全平台生效,不含移动端),点击逐条跳转上一条用户回复、可连续向上回溯,目标在未加载历史时会自动点「加载更早」补齐,跳到最顶部后按钮自动隐藏、下滑即复现
|
|
155
171
|
- 大 JSON 响应透明压缩(≥4KB 按 `Accept-Encoding` 自动 gzip/brotli),长会话历史首屏提速
|
|
156
172
|
- 自动补 `viewport-fit=cover` 避让刘海、禁双击缩放、输入框 ≥16px 防 iOS 聚焦放大
|
|
157
173
|
- `?dshsvc-mobile-debug=1` 显示浮动诊断条(仅调试)
|
|
@@ -298,6 +314,18 @@ pm2 start "dsh web --host 127.0.0.1" --name dsh-web
|
|
|
298
314
|
网页登录态过期了。重新登录 platform.xiaomimimo.com,从任意 `/api/v1/tokenPlan/` 请求复制 `Cookie:` 头,点卡片「填写控制台 Cookie」重新粘贴。
|
|
299
315
|
</details>
|
|
300
316
|
|
|
317
|
+
<details>
|
|
318
|
+
<summary><strong>StepFun Step Plan 卡片显示「凭据未配置」?</strong></summary>
|
|
319
|
+
|
|
320
|
+
Step Plan 订阅没有 API-key 形态的查询接口,需要网页登录态令牌。登录 platform.stepfun.com,按 F12 打开开发者工具 → Application → Cookies → platform.stepfun.com,复制 `Oasis-Token` 的完整值(形如 `xxx...yyy`,两个小圆点分隔是令牌格式本身的一部分,不要拆分),点卡片「填写控制台令牌(Oasis-Token)」粘贴即可;`Oasis-Webid` 由宿主从令牌自动派生,无需手填。
|
|
321
|
+
</details>
|
|
322
|
+
|
|
323
|
+
<details>
|
|
324
|
+
<summary><strong>StepFun Step Plan 卡片显示「控制台登录态已失效」?</strong></summary>
|
|
325
|
+
|
|
326
|
+
令牌过期了(官方常见报错 `oasis-token is embezzled` 即令牌与 web_id 不匹配)。重新登录 platform.stepfun.com 后从 Cookies 复制新的 `Oasis-Token` 完整值再粘贴;从控制台复制时若自带 `Oasis-Token=` 或 `Cookie: ` 前缀会被自动剥离,不影响。
|
|
327
|
+
</details>
|
|
328
|
+
|
|
301
329
|
<details>
|
|
302
330
|
<summary><strong>恢复备份会怎样?</strong></summary>
|
|
303
331
|
|