@gehennawu/dsh-service 0.32.0 → 0.33.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 -3
- package/README.md +19 -3
- package/client.js +772 -9
- package/index.js +220 -0
- 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/)
|
|
@@ -97,10 +97,12 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
97
97
|
| OpenCode Go | `{baseURL}/usage` |
|
|
98
98
|
| OpenRouter | Credits used % |
|
|
99
99
|
| Kimi / SiliconFlow | CNY balance |
|
|
100
|
+
| StepFun Balance | Official `GET /v1/accounts` (API key, com/ai dual domains) |
|
|
101
|
+
| StepFun Step Plan | Console BFF subscription quota (Oasis-Token console session; 5-hour/weekly windows vs Credit pool auto-detected) |
|
|
100
102
|
| Xiaomi MiMo Token Plan | Console-origin plan quota (web session cookie) |
|
|
101
103
|
| CLIProxyAPI deployment | Official remaining quota of each OAuth upstream account |
|
|
102
104
|
|
|
103
|
-
- Credentials go into the DSH credential store (`$DSH_HOME/.credentials.yaml`, hot-effective): an API key, the CPA management key, or the
|
|
105
|
+
- 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
106
|
- 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
107
|
- API keys are resolved only inside the host process; the browser receives normalized window data only; unadapted providers are never requested
|
|
106
108
|
|
|
@@ -141,7 +143,9 @@ Under **Plugins → Plugin configuration**, ten host-level switches: **Health di
|
|
|
141
143
|
### Mobile adaptation
|
|
142
144
|
|
|
143
145
|
- Off by default; active only below a 1024 px viewport (phones / narrow windows), desktops unaffected
|
|
144
|
-
- Sidebar becomes a drawer, details column
|
|
146
|
+
- 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
|
|
147
|
+
- 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
|
|
148
|
+
- 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
149
|
- Transparent large-JSON compression (≥4KB auto gzip/brotli per `Accept-Encoding`) speeds up long session histories
|
|
146
150
|
- Adds `viewport-fit=cover` with safe-area avoidance, disables double-tap zoom, keeps inputs ≥16px against iOS focus zoom
|
|
147
151
|
- `?dshsvc-mobile-debug=1` shows a floating diagnostics chip (debugging only)
|
|
@@ -298,6 +302,18 @@ Use the inline form on the card: an API key for regular adaptations, the managem
|
|
|
298
302
|
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
303
|
</details>
|
|
300
304
|
|
|
305
|
+
<details>
|
|
306
|
+
<summary><strong>StepFun Step Plan card shows "credential missing"?</strong></summary>
|
|
307
|
+
|
|
308
|
+
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.
|
|
309
|
+
</details>
|
|
310
|
+
|
|
311
|
+
<details>
|
|
312
|
+
<summary><strong>StepFun Step Plan card shows "console session expired"?</strong></summary>
|
|
313
|
+
|
|
314
|
+
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.
|
|
315
|
+
</details>
|
|
316
|
+
|
|
301
317
|
<details>
|
|
302
318
|
<summary><strong>What does restoring a backup do?</strong></summary>
|
|
303
319
|
|
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/)
|
|
@@ -97,10 +97,12 @@
|
|
|
97
97
|
| OpenCode Go | `{baseURL}/usage` |
|
|
98
98
|
| OpenRouter | credits 已用百分比 |
|
|
99
99
|
| Kimi / 硅基流动 | 人民币余额 |
|
|
100
|
+
| StepFun 余额 | 官方 `GET /v1/accounts`(API key,com/ai 双域) |
|
|
101
|
+
| StepFun Step Plan | 控制台 BFF 订阅额度(Oasis-Token 登录令牌;5 小时/周窗口与 Credit 月池自动识别) |
|
|
100
102
|
| 小米 MiMo Token Plan | 控制台同源套餐额度(网页登录态 Cookie) |
|
|
101
103
|
| CLIProxyAPI 部署 | 各 OAuth 上游账号官方剩余额度 |
|
|
102
104
|
|
|
103
|
-
- 凭据写入 DSH 凭据库(`$DSH_HOME/.credentials.yaml`,热生效):普通适配填 API key,CLIProxyAPI 填管理密钥,小米填控制台 Cookie
|
|
105
|
+
- 凭据写入 DSH 凭据库(`$DSH_HOME/.credentials.yaml`,热生效):普通适配填 API key,CLIProxyAPI 填管理密钥,小米填控制台 Cookie,StepFun Step Plan 填控制台令牌(Oasis-Token,`Oasis-Webid` 由令牌自动派生无需手填)
|
|
104
106
|
- 防风控:结果缓存 60 秒、失败指数退避(30 秒 ×2、封顶 15 分钟);自动查询可调为仅手动 / 1 / 2 / 5 / 10 分钟
|
|
105
107
|
- API key 只在宿主进程内解析,浏览器仅收到归一化窗口数据;未适配的供应商绝不发起请求
|
|
106
108
|
|
|
@@ -151,7 +153,9 @@
|
|
|
151
153
|
### 移动端适配
|
|
152
154
|
|
|
153
155
|
- 默认关闭;仅在视口 <1024px(手机竖屏 / 窄窗口)生效,桌面完全无感
|
|
154
|
-
-
|
|
156
|
+
- 侧栏变抽屉、详情列移动端隐藏(对齐官方窄屏语义)、模态变全屏面板、设置左列导航变顶部横滑
|
|
157
|
+
- 滑动沉浸:会话内下滑自动收起头部与输入框全屏阅读,上滑 / 回到底部 / 聚焦输入框即恢复,底部常驻小把手可随时点开合;流式贴底、锚点跳转等程序化滚动绝不误触发
|
|
158
|
+
- 「回到底部」浮钮右移贴边(不再空出大片右侧留白);其上方新增同款圆形上箭头(全平台生效,不含移动端),点击逐条跳转上一条用户回复、可连续向上回溯,目标在未加载历史时会自动点「加载更早」补齐,跳到最顶部后按钮自动隐藏、下滑即复现
|
|
155
159
|
- 大 JSON 响应透明压缩(≥4KB 按 `Accept-Encoding` 自动 gzip/brotli),长会话历史首屏提速
|
|
156
160
|
- 自动补 `viewport-fit=cover` 避让刘海、禁双击缩放、输入框 ≥16px 防 iOS 聚焦放大
|
|
157
161
|
- `?dshsvc-mobile-debug=1` 显示浮动诊断条(仅调试)
|
|
@@ -298,6 +302,18 @@ pm2 start "dsh web --host 127.0.0.1" --name dsh-web
|
|
|
298
302
|
网页登录态过期了。重新登录 platform.xiaomimimo.com,从任意 `/api/v1/tokenPlan/` 请求复制 `Cookie:` 头,点卡片「填写控制台 Cookie」重新粘贴。
|
|
299
303
|
</details>
|
|
300
304
|
|
|
305
|
+
<details>
|
|
306
|
+
<summary><strong>StepFun Step Plan 卡片显示「凭据未配置」?</strong></summary>
|
|
307
|
+
|
|
308
|
+
Step Plan 订阅没有 API-key 形态的查询接口,需要网页登录态令牌。登录 platform.stepfun.com,按 F12 打开开发者工具 → Application → Cookies → platform.stepfun.com,复制 `Oasis-Token` 的完整值(形如 `xxx...yyy`,两个小圆点分隔是令牌格式本身的一部分,不要拆分),点卡片「填写控制台令牌(Oasis-Token)」粘贴即可;`Oasis-Webid` 由宿主从令牌自动派生,无需手填。
|
|
309
|
+
</details>
|
|
310
|
+
|
|
311
|
+
<details>
|
|
312
|
+
<summary><strong>StepFun Step Plan 卡片显示「控制台登录态已失效」?</strong></summary>
|
|
313
|
+
|
|
314
|
+
令牌过期了(官方常见报错 `oasis-token is embezzled` 即令牌与 web_id 不匹配)。重新登录 platform.stepfun.com 后从 Cookies 复制新的 `Oasis-Token` 完整值再粘贴;从控制台复制时若自带 `Oasis-Token=` 或 `Cookie: ` 前缀会被自动剥离,不影响。
|
|
315
|
+
</details>
|
|
316
|
+
|
|
301
317
|
<details>
|
|
302
318
|
<summary><strong>恢复备份会怎样?</strong></summary>
|
|
303
319
|
|