@gehennawu/dsh-service 1.9.0 → 1.9.2
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 +107 -3
- package/package.json +1 -1
- package/plugin-compat.js +91 -0
- package/quota-routes.js +9 -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/)
|
|
@@ -112,14 +112,14 @@ Under **Plugins → Plugin configuration**, twelve host-level switches: **Health
|
|
|
112
112
|
|
|
113
113
|

|
|
114
114
|
|
|
115
|
-
- Provider cards keep the existing window presentation (label + percent / independent bar / reset countdown); **
|
|
116
|
-
- Card **order and visibility**: "Reorder & visibility" on the quota page expands a management list where cards can be dragged or nudged with ↑/↓, and a toggle hides cards you rarely need (hiding only affects display, not querying
|
|
115
|
+
- Provider cards keep the existing window presentation (label + percent / independent bar / reset countdown); **configuration** (credentials, kind switching, manual reset entries) is collapsed per card by default
|
|
116
|
+
- Card **order and visibility**: "Reorder & visibility" on the quota page expands a management list where cards can be dragged or nudged with ↑/↓, and a toggle hides cards you rarely need (hiding only affects display, not querying); the config shares one backend with the Settings Nav tabs, stored in the `quotaCards` section of the unified server-side config `$DSH_HOME/dsh-service-config.json` (cross-device sync with a local-cache fallback, sections never affect each other)
|
|
117
117
|
- 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
|
|
118
118
|
- Built-in adaptations:
|
|
119
119
|
|
|
120
120
|
| Provider | Data source |
|
|
121
121
|
| --- | --- |
|
|
122
|
-
| DeepSeek Platform | Official balance + peak/off-peak ribbon and countdown |
|
|
122
|
+
| DeepSeek Platform | Official balance + peak/off-peak ribbon and countdown (peak = Mon–Fri 09:00–12:00 and 14:00–18:00 UTC+8, **excluding Chinese public holidays**; weekends and public holidays are off-peak all day) |
|
|
123
123
|
| 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) |
|
|
124
124
|
| OpenCode Go | `{baseURL}/usage` (built-in channel without an explicit baseURL uses the registry default `https://opencode.ai/zen/go/v1`) |
|
|
125
125
|
| OpenRouter | Credits used % |
|
|
@@ -131,7 +131,7 @@ Under **Plugins → Plugin configuration**, twelve host-level switches: **Health
|
|
|
131
131
|
| CLIProxyAPI deployment | Official remaining quota of each OAuth upstream account |
|
|
132
132
|
|
|
133
133
|
- 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); the Command Code quota plane reuses the inference key, so no extra credential is needed
|
|
134
|
-
- Anti-rate-limit pacing: 60 s result cache, exponential backoff (30 s doubling, capped at 15 min);
|
|
134
|
+
- Anti-rate-limit pacing: 60 s result cache, exponential backoff (30 s doubling, capped at 15 min); querying is fully manual — a snapshot is fetched when you open the quota page, expand the ring, or hit refresh, and the client never arms a periodic poll (upstream throttling still lives entirely in the host)
|
|
135
135
|
- CLIProxyAPI: when an account's live query fails, its last cached snapshot windows are shown with a "cached" badge; snapshot windows whose reset time has already passed (the window they described has ended) are dropped, avoiding the illusion of quota stuck on yesterday
|
|
136
136
|
- Failures state their real reason: cards and the ring show "error copy (HTTP status · failing endpoint · failing account · upstream message) · next automatic retry" — a wrong key, an unpaid balance, rate limiting, and a moved endpoint each read differently instead of one generic notice; an upstream 401/403 is classified as "credential rejected by upstream" and the card keeps its credential form available, and business error codes inside an HTTP 200 envelope are classified the same way (auth failure → credential rejected, expired plan → no active subscription, vendor-side failure → upstream service error) instead of being reported as "unexpected response format"
|
|
137
137
|
- API keys are resolved only inside the host process; the browser receives normalized window data only; unadapted providers are never requested
|
|
@@ -191,6 +191,7 @@ Under **Plugins → Plugin configuration**, twelve host-level switches: **Health
|
|
|
191
191
|
- The model picker collapses to an icon on phones (≤480 px, mirroring the official narrow-container form; from 481 px up it still shows the model name and reasoning effort) — the plugin's mobile layout widens the composer column, so the official `@container (width<=360px)` collapse rule never fires on 428~440 px devices; this aligns with the official narrow-container form explicitly
|
|
192
192
|
- The stats line under the composer ("turns/steps · tok/s | tok · cache hit") **stays on one line and uses the full width** on phones: this row's own horizontal padding is tightened (official 32 px → 2 px) along with its gaps, and both chips share the whole row — zero truncation from ~420 px up, proportionally less text cut than the official fixed truncation below that, with no wrapping and no horizontal scrolling (desktops unaffected)
|
|
193
193
|
- The session header is re-flowed on phones (≤560 px): the title row keeps only the **title + preset chip** (the chip hugs the "…" button on the right, the title stays nearly fully visible), while the "N subagents" and "N background jobs running" counter chips park as a pair on the right of the Conversation/Trajectory tab row (tab gap 36→20, tapping a chip still opens its menu); the official crumbs **hard-clip** is eliminated, and layouts ≥561 px keep the official flow
|
|
194
|
+
- The Agent Team panel stays on screen on phones (<1024 px): the official panel is left-anchored (`left:0`), so sitting in the header's right-hand action slot pushes it off the right edge (measured 112–352 px past the viewport at 320–1023 px). On mobile the session header becomes the positioning context and the panel is re-anchored to the **right with a 16 px inset** and capped at `100vw − 32px`, leaving 16 px on each side; desktop ≥1024 px keeps the official geometry byte-for-byte
|
|
194
195
|
- Scroll immersion: inside a conversation, swiping down auto-hides the header and composer for full-screen reading (the composer also yields its layout space so the transcript really fills the screen; on reveal, if you are still at the end of the conversation it re-aligns to the bottom). Swipe up, tapping the official "Back to bottom" button, or focusing the composer brings them back (no extra floating button); already sitting at the end of the conversation, a single small backward nudge reveals it right away (no full threshold needed), and after a back-to-bottom tap the resting position gets one extra bottom snap. Programmatic scrolling (streaming pinning, anchor jumps) never triggers it
|
|
195
196
|
- 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
|
|
196
197
|
- 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
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
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
14
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
15
15
|
[](https://cordis.moe/)
|
|
@@ -110,18 +110,18 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
|
|
|
110
110
|
|
|
111
111
|
### 额度查询
|
|
112
112
|
|
|
113
|
-
- 供应商卡片保留既有窗口展示(标签+百分比 / 独立进度条 /
|
|
113
|
+
- 供应商卡片保留既有窗口展示(标签+百分比 / 独立进度条 / 重置倒计时);**配置**(凭据填写、类型切换、手动重置录入)默认折叠,按卡展开
|
|
114
114
|
|
|
115
115
|

|
|
116
116
|
|
|
117
117
|
- 卡片分区展示各供应商:窗口百分比、独立进度条、重置时间;支持强制刷新与官网用量页链接
|
|
118
|
-
- 卡片**排序与显隐**:额度页「调整排序与显隐」展开管理列表,可拖拽或点 ↑↓
|
|
118
|
+
- 卡片**排序与显隐**:额度页「调整排序与显隐」展开管理列表,可拖拽或点 ↑↓ 调整卡片顺序,开关可隐藏不常用卡片(隐藏只影响展示,不影响查询);配置与设置栏标签同源,写入服务端统一配置文件 `$DSH_HOME/dsh-service-config.json` 的 `quotaCards` 区块(多设备同步、本地缓存兜底,区块间互不影响)
|
|
119
119
|
- 对话输入框**额度圆环**:跟随当前会话模型所属供应商,显示最紧预算窗口用量(<80% 绿、≥80% 黄);点击弹出详情面板,窄屏自动切换为居中浮层
|
|
120
120
|
- 内置适配:
|
|
121
121
|
|
|
122
122
|
| 供应商 | 数据来源 |
|
|
123
123
|
| --- | --- |
|
|
124
|
-
| DeepSeek 开放平台 | 官方余额 +
|
|
124
|
+
| DeepSeek 开放平台 | 官方余额 + 峰谷时段提示(忙/闲色带、换挡倒计时;高峰=周一至周五 09:00–12:00、14:00–18:00 UTC+8,**不含中国法定节假日**,周末与法定节假日全天空闲) |
|
|
125
125
|
| 智谱 GLM Coding Plan | 官方端点:5 小时滚动 / 每周 / MCP 月度三窗口 + 峰谷时段提示(忙/闲色带、换挡倒计时;高峰=周一至周五 14:00–18:00 UTC+8) |
|
|
126
126
|
| OpenCode Go | `{baseURL}/usage`(内置渠道未写 baseURL 时用注册表默认端点 `https://opencode.ai/zen/go/v1`) |
|
|
127
127
|
| OpenRouter | credits 已用百分比 |
|
|
@@ -133,7 +133,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
|
|
|
133
133
|
| CLIProxyAPI 部署 | 各 OAuth 上游账号官方剩余额度 |
|
|
134
134
|
|
|
135
135
|
- 凭据写入 DSH 凭据库(`$DSH_HOME/.credentials.yaml`,热生效):普通适配填 API key,CLIProxyAPI 填管理密钥,小米填控制台 Cookie,StepFun Step Plan 填控制台令牌(Oasis-Token,`Oasis-Webid` 由令牌自动派生无需手填);Command Code 额度面与推理面同一把 key,无需另配
|
|
136
|
-
- 防风控:结果缓存 60 秒、失败指数退避(30 秒 ×2、封顶 15
|
|
136
|
+
- 防风控:结果缓存 60 秒、失败指数退避(30 秒 ×2、封顶 15 分钟);查询为纯手动——打开额度页/展开圆环/点刷新才拉取,客户端不排任何周期轮询(上游节流仍全部在宿主侧)
|
|
137
137
|
- CLIProxyAPI 某账号实时查询失败时,回退显示其上次缓存的快照窗口并标注「缓存」徽标;重置时间已过的快照窗口(快照描述的窗口已结束)直接丢弃,避免「额度停在昨天」的错觉
|
|
138
138
|
- 失败原因如实呈现:卡片与圆环显示「错误文案(HTTP 状态 · 失败端点 · 失败账号 · 上游原话)· 下次自动重试时刻」——错 key、欠费、限流、路径变更各有各的上游原话与状态码,不再只有一个笼统提示;上游 401/403 判为「凭据被上游拒绝」,卡片同时保留凭据填写入口;HTTP 200 业务信封里的错误码同样定族——鉴权失败判凭据被拒(保留填写入口)、套餐到期判无生效订阅、上游自身故障判「上游服务故障」,不再一律报「响应格式异常」
|
|
139
139
|
- API key 只在宿主进程内解析,浏览器仅收到归一化窗口数据;未适配的供应商绝不发起请求
|
|
@@ -206,6 +206,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
|
|
|
206
206
|
- 模型选择按钮在手机上收成图标(≤480px,与官方窄容器同形态;481px 以上仍显示模型名与推理等级)——插件移动端把中列拉宽,官方 `@container (width<=360px)` 那条收起规则在 428~440px 机型上永远不会触发,故显式对齐官方窄容器形态
|
|
207
207
|
- 统计条(输入框下方「轮/步/tok/s | tok/缓存命中」)在手机上**保持一行并把宽度用满**:收紧这一行自身的左右内边距(官方 32px→2px)与列间距,两枚统计按需分宽、共占满整行——≥~420px 视口零截断,更窄视口按比例各让一点(远少于官方的固定截断),不换行、不横向滚动(桌面不受影响)
|
|
208
208
|
- 会话顶栏手机端重排(≤560px):标题行只留**标题 + 模式芯片**(芯片右靠贴住「…」钮,标题基本完整可见),「N 个子代理」与「N 个后台任务运行中」两枚计数芯片泊到「对话/轨迹」标签行右缘成一对(标签间距 36→20,点芯片本体仍开各自菜单);官方 crumbs 放不下时的**拦腰硬裁**彻底消除,561px 以上与桌面保持官方原布局
|
|
209
|
+
- Agent Team 弹窗手机端不越屏(<1024px):官方 Agent Team 面板自带左锚(`left:0`),挂在头部右侧动作槽上会整体右移出屏(实测 320~1023px 越出 112~352px)。移动端把会话头部设为定位上下文、面板改**右锚 16px** 并按 `100vw − 32px` 封顶,两缘各留 16px;桌面 ≥1024px 官方几何逐字不变
|
|
209
210
|
- 滑动沉浸:会话内下滑自动收起头部与输入框全屏阅读(收起时让出输入框占位,正文真正铺满整屏;回显时若仍停在会话末尾会自动对齐到底),上滑 / 点「回到底部」浮钮 / 聚焦输入框即恢复(无额外悬浮钮);已经停在会话末尾时往回一点即回显(不再等满阈值),点回底后停留位置会补一次贴底对齐;流式贴底、锚点跳转等程序化滚动绝不误触发
|
|
210
211
|
- 滑动开合抽屉:双抽屉关闭时,横移主导的右滑任意位置打开侧栏抽屉、左滑任意位置打开官方右侧栏(DSH 0.1.5+,未就绪时该方向无效);开启后反向横滑任意位置关闭;从屏幕边缘起滑额外享有浏览器手势接管的补完加成,编辑器等真横滚区内的滑动不误触发
|
|
211
212
|
- 「回到底部」浮钮右移贴边(不再空出大片右侧留白);其上方新增同款圆形上箭头(全平台生效,不含移动端),点击逐条跳转上一条用户回复、可连续向上回溯,目标在未加载历史时会自动点「加载更早」补齐,跳到最顶部后按钮自动隐藏、下滑即复现
|