@gehennawu/dsh-service 1.4.11 → 1.5.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 +6 -5
- package/README.md +6 -5
- package/client.js +1 -1
- package/index.js +153 -26
- package/package.json +1 -1
- package/plugin-compat.js +4 -0
- package/quota-adapters.js +39 -5
package/README.en.md
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<em>DeepSeek Harness (DSH) Web 服务控制与运维插件。</em>
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
|
-
[](package.json)
|
|
13
13
|
[](LICENSE)
|
|
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)
|
|
@@ -117,7 +117,7 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
117
117
|
| --- | --- |
|
|
118
118
|
| DeepSeek Platform | Official balance + peak/off-peak ribbon and countdown |
|
|
119
119
|
| Zhipu GLM Coding Plan | Official endpoint: 5-hour rolling / weekly / monthly MCP windows + peak/off-peak ribbon and countdown (peak = Mon–Fri 14:00–18:00 UTC+8) |
|
|
120
|
-
| OpenCode Go | `{baseURL}/usage` |
|
|
120
|
+
| OpenCode Go | `{baseURL}/usage` (built-in channel without an explicit baseURL uses the registry default `https://opencode.ai/zen/go/v1`) |
|
|
121
121
|
| OpenRouter | Credits used % |
|
|
122
122
|
| Kimi / SiliconFlow | CNY balance |
|
|
123
123
|
| StepFun Balance | Official `GET /v1/accounts` (API key, com/ai dual domains) |
|
|
@@ -160,6 +160,7 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
160
160
|
- Custom mode optionally selects a **reasoning effort**: the dropdown appears only for the exact provider/model when its adapter declares selectable levels; leaving it empty means "use the target model default", materialized by the adapter
|
|
161
161
|
- Values come from adapter metadata (`reasoning.efforts[].id`); effort ids are opaque to the host. Models with no declared levels disable the dropdown and show a hint
|
|
162
162
|
- **inherit / follow / feature gate off** inject no provider, model, or reasoning effort at all; subagents that carry an explicit provider/model are unaffected
|
|
163
|
+
- **Mode switching keeps the config** — the saved custom model (including its reasoning effort) and the fallback list survive switching between the three modes; a mode only decides whether the route applies, so switching back to "Custom" needs no re-selection (provider/model missing from the runtime catalog fall back to the first catalog entry)
|
|
163
164
|
- **Fallback models (in order)** — both Follow and Custom modes accept an ordered fallback list: when the primary route is unavailable (channel unloaded, or quota state marks it unserviceable), the next model is tried in order; if none works, delegations fall back to native inheritance instead of failing. Fallback entries pass the same allow-list check as the primary route, with an optional reasoning effort per entry
|
|
164
165
|
- **Conversation-page visibility** — every turn that spawned subagents shows a small line under its last message listing the models those subagents actually ran on, e.g. `Subagent models: cpa/gpt-5.6-luna (xhigh) · opencode-go/deepseek-v4-flash (max)` — covering fallback hits, explicit routes, and inherited sources, so you can verify the custom route at a glance; a session-level aggregate line also sits under the composer (20s refresh, independent of turn data — when compaction folds the delegation tool calls the official counter and the per-turn line vanish together, and the aggregate line covers from the host dispatch records, visible in any view; switch it off independently from Maintenance → Subagent, keeping only the per-turn line); records live in host memory (survive page reloads, cleared on process restart). Works regardless of the official "assign subagent models" switch
|
|
165
166
|
- Config stored in `$DSH_HOME/dsh-service-subagent-route.json` (atomic writes, `0600`); one-click reset
|
|
@@ -180,7 +181,7 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
180
181
|
- Off by default; active only below a 1024 px viewport (phones / narrow windows), desktops unaffected
|
|
181
182
|
- 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
|
|
182
183
|
- 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
|
|
183
|
-
- Swipeable drawers: with both drawers closed, a horizontally dominant swipe rightward anywhere opens the sidebar drawer and a swipe leftward anywhere opens the right sidebar (
|
|
184
|
+
- Swipeable drawers: with both drawers closed, a horizontally dominant swipe rightward anywhere opens the sidebar drawer and a swipe leftward anywhere opens the official right sidebar (DSH 0.1.5+; stays inert when unavailable); once open, a swipe in the reverse direction anywhere closes them. Swipes starting at the screen edge additionally benefit from stolen-gesture completion for browser edge navigation, and horizontal scrolling inside editors never misfires
|
|
184
185
|
- 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
|
|
185
186
|
- Transparent large-JSON compression (≥4KB auto gzip/brotli per `Accept-Encoding`) speeds up long session histories
|
|
186
187
|
- Adds `viewport-fit=cover` with safe-area avoidance, disables double-tap zoom, keeps inputs ≥16px against iOS focus zoom
|
|
@@ -303,7 +304,7 @@ pm2 start "dsh web --host 127.0.0.1" --name dsh-web
|
|
|
303
304
|
|
|
304
305
|
Requirements: Node.js `>=22`, and a DSH Web installation capable of loading both Host and Client plugin halves. Update checks require access to `registry.npmjs.org`; network failures do not affect other features.
|
|
305
306
|
|
|
306
|
-
**DSH compatibility statement**: adapted to DSH `0.1.
|
|
307
|
+
**DSH compatibility statement**: adapted to DSH `0.1.5-rc.1` — session format V3 (`system/message` events in history, renamed PTC vocabulary; the detail view automatically archives system events), the handle-based sessionPersistence (usage refresh, title cache, and diagnostics counts all ride the new public surface `list`/`open`/`read`/`close`), the official right sidebar replacing the Detail column (the mobile right-edge gesture drives `ctx.layout.openRightbar/closeRightbar` directly), and the object-shaped official turn-process (subagent turn claiming supports both shapes). Older DSH releases (`>=0.1.1-rc.2`) remain supported: persistence and layout seams run in dual shapes detected from runtime capabilities, and adaptation items that target the 0.1.5 structure are naturally inert on older hosts (cosmetic only, no functional loss). Note: sessions written in the V3 format after upgrading cannot be read by older DSH releases — **backups do not restore across a version downgrade**. The version card shows a standing notice "Adapted for DSH 0.1.1-rc.2 ~ 0.1.5-rc.2", and turns red when running on unverified releases (`≥0.1.6-alpha.0`).
|
|
307
308
|
|
|
308
309
|
## 🔒 Security design
|
|
309
310
|
|
package/README.md
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
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
|
-
[](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)
|
|
@@ -119,7 +119,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
|
|
|
119
119
|
| --- | --- |
|
|
120
120
|
| DeepSeek 开放平台 | 官方余额 + 峰谷时段提示(忙/闲色带、换挡倒计时) |
|
|
121
121
|
| 智谱 GLM Coding Plan | 官方端点:5 小时滚动 / 每周 / MCP 月度三窗口 + 峰谷时段提示(忙/闲色带、换挡倒计时;高峰=周一至周五 14:00–18:00 UTC+8) |
|
|
122
|
-
| OpenCode Go | `{baseURL}/usage` |
|
|
122
|
+
| OpenCode Go | `{baseURL}/usage`(内置渠道未写 baseURL 时用注册表默认端点 `https://opencode.ai/zen/go/v1`) |
|
|
123
123
|
| OpenRouter | credits 已用百分比 |
|
|
124
124
|
| Kimi / 硅基流动 | 人民币余额 |
|
|
125
125
|
| StepFun 余额 | 官方 `GET /v1/accounts`(API key,com/ai 双域) |
|
|
@@ -162,6 +162,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
|
|
|
162
162
|
- 自定义模式可选**思考等级**:仅当所选的 **exact provider/model** 由适配器声明了可选等级时才显示下拉;留空表示「使用目标模型默认」,由适配器在请求时物化默认值
|
|
163
163
|
- 该字段来自适配器 metadata(`reasoning.efforts[].id`),等级 ID 对宿主不透明;无等级声明的模型禁用下拉并提示
|
|
164
164
|
- **inherit / follow / 功能开关关闭** 均不注入任何 provider、model 或思考等级;显式指定 provider/model 的子代理不受影响
|
|
165
|
+
- **模式切换保留配置**:已保存的自定义模型(含思考等级)与回退列表在三种模式间切换时不会被清除——模式只决定是否生效,切回「自定义」无需重新选择(供应商/模型已不在运行时清单时自动回落到清单首项)
|
|
165
166
|
- **回退模型(按顺序)**:跟随与自定义模式都可配置回退列表——第一路由不可用时(渠道已卸载、额度查询判定其不可服务)依次尝试后续模型;全部不可用则回落原生继承,不让派生失败。回退条目与主路由同一道白名单校验,思考等级逐条可选
|
|
166
167
|
- **对话页可见性**:每个派生了子代理的回合,最后一条消息下方会显示一行小字列出该回合子代理实际使用的模型,如 `子代理模型:cpa/gpt-5.6-luna (xhigh) · opencode-go/deepseek-v4-flash (max)`——含回退命中、显式路由与继承来源,可直接核对自定义路由是否生效;**同时输入框下方常驻一行本会话累计模型行**(20s 刷新,不依赖回合数据——会话发生 compaction 折叠工具调用后官方计数会消失、回合尾行随之缺席,累计行由宿主派发记录兜底,任何视图都能看到;可在 维护 → 子代理 页用独立开关关闭,仅保留回合尾行);记录存宿主内存(页面刷新不丢、进程重启即清),官方「指派子代理模型」开关关闭与否都不影响本功能
|
|
167
168
|
- 配置存 `$DSH_HOME/dsh-service-subagent-route.json`(原子写入、`0600`),可一键重置
|
|
@@ -194,7 +195,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
|
|
|
194
195
|
- 默认关闭;仅在视口 <1024px(手机竖屏 / 窄窗口)生效,桌面完全无感
|
|
195
196
|
- 侧栏变抽屉、详情列移动端隐藏(对齐官方窄屏语义)、模态变全屏面板、设置左列导航变顶部横滑
|
|
196
197
|
- 滑动沉浸:会话内下滑自动收起头部与输入框全屏阅读,上滑 / 回到底部 / 聚焦输入框即恢复,底部常驻小把手可随时点开合;流式贴底、锚点跳转等程序化滚动绝不误触发
|
|
197
|
-
-
|
|
198
|
+
- 滑动开合抽屉:双抽屉关闭时,横移主导的右滑任意位置打开侧栏抽屉、左滑任意位置打开官方右侧栏(DSH 0.1.5+,未就绪时该方向无效);开启后反向横滑任意位置关闭;从屏幕边缘起滑额外享有浏览器手势接管的补完加成,编辑器等真横滚区内的滑动不误触发
|
|
198
199
|
- 「回到底部」浮钮右移贴边(不再空出大片右侧留白);其上方新增同款圆形上箭头(全平台生效,不含移动端),点击逐条跳转上一条用户回复、可连续向上回溯,目标在未加载历史时会自动点「加载更早」补齐,跳到最顶部后按钮自动隐藏、下滑即复现
|
|
199
200
|
- 大 JSON 响应透明压缩(≥4KB 按 `Accept-Encoding` 自动 gzip/brotli),长会话历史首屏提速
|
|
200
201
|
- 自动补 `viewport-fit=cover` 避让刘海、禁双击缩放、输入框 ≥16px 防 iOS 聚焦放大
|
|
@@ -305,7 +306,7 @@ pm2 start "dsh web --host 127.0.0.1" --name dsh-web
|
|
|
305
306
|
|
|
306
307
|
运行要求:Node.js `>=22`,DSH Web 能加载 Host 与 Client 两半插件。更新检查需访问 `registry.npmjs.org`;网络失败不影响其他功能。
|
|
307
308
|
|
|
308
|
-
**DSH
|
|
309
|
+
**DSH 适配口径**:已适配 DSH `0.1.5-rc.1`——会话格式 V3(`system/message` 入史、旧 PTC 词汇更名,详情视图自动归档系统事件)、sessionPersistence handle 化(用量增量、标题缓存、诊断计数全部按新公共面 `list`/`open`/`read`/`close` 走)、官方右栏替代详情列(移动端右缘手势直接驱动 `ctx.layout.openRightbar/closeRightbar`)、官方 turn-process 对象化(子代理回合认领双形态兼容)。旧版 DSH(`>=0.1.1-rc.2`)保持兼容:新旧两套 persistence/布局 seam 按运行时能力探测双形态走,旧宿主上针对 0.1.5 结构的适配项天然不生效(纯展示,无功能损失)。注意:升级后以 V3 格式写入的会话日志无法被旧版 DSH 读取——**备份不可跨版本降级恢复**。版本卡常驻显示「适配 DSH 0.1.1-rc.2 ~ 0.1.5-rc.2」,越界运行版本(`≥0.1.6-alpha.0`)标红警示。
|
|
309
310
|
|
|
310
311
|
## 🔒 安全设计
|
|
311
312
|
|