@gehennawu/dsh-service 1.9.3 → 1.9.5

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 CHANGED
@@ -9,7 +9,7 @@
9
9
  <em>DeepSeek Harness (DSH) Web 服务控制与运维插件。</em>
10
10
  </p>
11
11
 
12
- [![Version](https://img.shields.io/badge/version-1.9.3-3b82f6.svg?style=flat-square)](package.json)
12
+ [![Version](https://img.shields.io/badge/version-1.9.5-3b82f6.svg?style=flat-square)](package.json)
13
13
  [![License: MIT](https://img.shields.io/badge/License-MIT-10b981.svg?style=flat-square)](LICENSE)
14
14
  [![DSH Compatibility](https://img.shields.io/badge/DSH-%E2%89%A50.1.1--rc.2%20%C2%B7%20compatible%20with%200.1.6--alpha.2-6366f1.svg?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
15
15
  [![Cordis](https://img.shields.io/badge/Cordis-v4.x-f59e0b.svg?style=flat-square)](https://cordis.moe/)
@@ -75,6 +75,7 @@ Under **Plugins → Plugin configuration**, twelve host-level switches: **Health
75
75
  - Shows the current DSH and plugin versions, linking to GitHub Releases
76
76
  - Automatically checks npm **stable + preview** (latest / next dist-tags); when a new version exists, an inline expandable compares them, each with npmjs and npmmirror links
77
77
  - One-click upgrade with automatic restart; when no process manager is detected, it confirms the consequences first, keeps running, and shows manual-restart instructions
78
+ - Inline "What's new": the host fetches the release body from the GitHub Releases API and the client renders it in place (plain Markdown — no iframe, no navigation), with the publish date and a pre-release tag; a missing Release or a failed read each get their own message; clicking anywhere outside the version card or pressing Escape closes it
78
79
  - Between the upgrade landing and the process restart (common in a manual-launch environment) the version row reads "Installed X — restart to take effect" and the upgrade button is withdrawn; reopening the panel or refreshing the page keeps that state until the process is restarted
79
80
 
80
81
  ### Safe restart
@@ -112,7 +113,7 @@ Under **Plugins → Plugin configuration**, twelve host-level switches: **Health
112
113
  - When a **project folder no longer exists**, that project disappears from the project filter, yet its usage still counts toward the "All projects" totals, day buckets, and model breakdown
113
114
  - Last-48-hour model/tool errors (collapsed by default, rendered only when present)
114
115
  - Steps whose provider reports no token usage are excluded
115
- - A session that cannot be read, migrated, or parsed no longer blocks other sessions. An all-projects warning shows successful/skipped counts and expandable session IDs, error categories, and safe summaries. Previously indexed data is retained and marked stale; first-time failures contribute nothing and are retried on the next refresh. Only global errors, such as an unavailable service, failed session listing, or failed index write, fail the entire refresh
116
+ - A session that cannot be read, migrated, or parsed no longer blocks other sessions. An all-projects warning shows successful/skipped counts and expandable session IDs, error categories, and safe summaries. Previously indexed data is retained and marked stale; first-time failures contribute nothing and are retried on the next refresh. Only global errors, such as an unavailable service, failed session listing, or failed index write, fail the entire refresh. The warning can be dismissed (remembered locally), and silencing it mutes only that same failure set: a newly skipped session or a changed error category brings it back, so dismissing once never hides a new problem for good
116
117
 
117
118
  ### Quota lookup
118
119
 
@@ -195,7 +196,7 @@ Under **Plugins → Plugin configuration**, twelve host-level switches: **Health
195
196
  - Off by default; active only below a 1024 px viewport (phones / narrow windows), desktops unaffected
196
197
  - 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
197
198
  - 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
198
- - 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)
199
+ - The stats line under the composer ("turns/steps · tok/s | tok · cache hit") **stays on one line, centred and straight** on phones: this row's own horizontal padding is tightened (official 32 px → 2 px) along with its gaps to free up width, and the official `justify-content` centres both chips — zero truncation from ~420 px up, proportionally less text cut than the official fixed truncation below that, with no wrapping and no horizontal scrolling; this also works on older DSH (on 0.1.5-rc.2 the row spans the full width, where the earlier sub-item `flex-grow` pushed both chips as a group to the left — they no longer grow) (desktops unaffected)
199
200
  - 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
200
201
  - 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
201
202
  - 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
@@ -227,6 +228,7 @@ Under **Plugins → Plugin configuration**, twelve host-level switches: **Health
227
228
  - **Unrecognised names fall back to the quota manual adaptation**: when a channel matches neither the built-in table nor any prefix rule, but you have **manually adapted** it in the quota page to some kind (`cpa` → CLIProxyAPI, or any relay → OpenRouter / Zhipu / Command Code / StepFun…), its brand mark is shown; changing the adapted kind swaps the icon immediately, and un-adapting falls back to the official default icon. Two premises: only **manual** adaptation counts (a kind merely auto-inferred from the baseURL does not), and **the channel name always wins** when it matches (`openrouter-f` keeps showing OpenRouter even if you adapt it to something else)
228
229
  - **The CLIProxyAPI icon appears on demand**: the hand-drawn "concave diamond + mirrored swirl" mark shows on the model button **only after you have manually adapted some provider as CLIProxyAPI in the quota page** (regardless of the provider's name — `cpa` or a custom one alike); it is one instance of the fallback rule above, and un-adapting immediately falls back to the official default icon
229
230
  - **Quota cards carry the icons too**: adapted provider cards show the same brand mark before the channel name (14px; colour tiers keep their brand colour, mono tiers follow the theme text colour). The same "fall back to the manual adaptation" rule applies here — the card list is exactly where you adapt, so the mark appears/swaps immediately
231
+ - **The model picker's group headings carry them too**: open the model button → the "Model" list, and each **provider/channel group heading gets the same mark in front of it** (13px, matching the 12px heading scale). Same resolution and fallback rules: unrecognised groups keep the official heading untouched, with no icon added
230
232
  - **Legible in both light and dark themes**: a brand colour is kept only when its contrast is adequate against **both** a light and a dark background; otherwise the icon automatically switches to a monochrome variant that follows the theme's text colour — so you never get a black logo on a dark background, or a nearly invisible one in light mode
231
233
  - **Zero runtime network requests**: icons are inlined into the client bundle at build time, so it works offline, needs no CSP exceptions, and never leaks your provider names to a third party
232
234
  - The icon is sized to match the **quota ring** beside the composer (each mark's viewBox is tightened to its real drawn extent and squared at build time, so every brand reads at the same visual size instead of some filling the box and others shrinking)
@@ -351,7 +353,7 @@ pm2 start "dsh web --host 127.0.0.1" --name dsh-web
351
353
 
352
354
  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.
353
355
 
354
- **DSH compatibility statement**: adapted to DSH `0.1.6-alpha.2` — 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), the object-shaped official turn-process (subagent turn claiming supports both shapes), dual-hash compatibility for mobile bottom-row triggers, subagent turn-tail list-slot adaptive compatibility, `plugins.bundle.config` slot injection for the new Plugins page, and session-detail open fallback through `uiWorkspace`. 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 newer structures 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.6-alpha.2", and turns red when running on unverified releases (`≥0.1.6-alpha.3`).
356
+ **DSH compatibility statement**: adapted to DSH `0.1.6-alpha.2` — 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), the object-shaped official turn-process (subagent turn claiming supports both shapes), dual-hash compatibility for mobile bottom-row triggers, subagent turn-tail list-slot adaptive compatibility, `plugins.bundle.config` slot injection for the new Plugins page, and session-detail open fallback through `uiWorkspace`. 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 newer structures 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 plugin marketplace judges compatibility from the `engines.dsh` range in `package.json`, which is the single declaration of the supported range.
355
357
 
356
358
  ## 🔒 Security design
357
359
 
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  <em>A service-control &amp; operations plugin for DeepSeek Harness (DSH) Web.</em>
10
10
  </p>
11
11
 
12
- [![Version](https://img.shields.io/badge/version-1.9.3-3b82f6.svg?style=flat-square)](package.json)
12
+ [![Version](https://img.shields.io/badge/version-1.9.5-3b82f6.svg?style=flat-square)](package.json)
13
13
  [![License: MIT](https://img.shields.io/badge/License-MIT-10b981.svg?style=flat-square)](LICENSE)
14
14
  [![DSH Compatibility](https://img.shields.io/badge/DSH-%E2%89%A50.1.1--rc.2%20%C2%B7%20%E5%B7%B2%E9%80%82%E9%85%8D%200.1.6--alpha.2-6366f1.svg?style=flat-square)](https://github.com/deepseek-ai/deepseek-harness)
15
15
  [![Cordis](https://img.shields.io/badge/Cordis-v4.x-f59e0b.svg?style=flat-square)](https://cordis.moe/)
@@ -75,6 +75,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
75
75
  - 显示当前 DSH 与插件版本,链接 GitHub Releases
76
76
  - 自动检查 npm **正式版 + 预览版**(latest / next 双 tag);有新版本时行内展开对比,版本号附 npmjs 与 npmmirror 双链接
77
77
  - 一键升级,完成后自动重启;未检测到进程管理器时先确认后果,保持运行并提示手动重启
78
+ - 「本次更新内容」行内展开:正文由宿主从 GitHub Releases API 取回后就地渲染(纯 Markdown,不嵌 iframe、不跳转),带发布日期与预发布标记;未建 Release 或读取失败各有明确提示;点版本卡以外的任意位置或按 Esc 即关闭
78
79
  - 升级落地但进程尚未重启期间(手动启动环境尤为常见),版本行改示「已安装 X,重启后生效」并收起升级按钮,重开面板或刷新页面状态依旧;重启进程后恢复常态
79
80
 
80
81
  ### 安全重启
@@ -112,7 +113,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
112
113
  - **项目文件夹已删除**时,该项目不再出现在项目筛选入口里,但它贡献的用量仍计入「全部」总量、日期桶与模型明细
113
114
  - 最近 48 小时模型 / 工具报错统计(默认折叠、仅非空渲染)
114
115
  - 提供方未上报 token 用量的步骤不纳入统计
115
- - 单个会话无法读取、迁移或解析时继续统计其他会话,显示全项目成功/跳过数量与可展开的会话 ID、错误类别及安全摘要;失败会话有旧缓存时保留并标明过期,首次失败不计入,下次刷新重试。只有服务不可用、列表读取或索引写入失败等全局错误才让整次刷新失败
116
+ - 单个会话无法读取、迁移或解析时继续统计其他会话,显示全项目成功/跳过数量与可展开的会话 ID、错误类别及安全摘要;失败会话有旧缓存时保留并标明过期,首次失败不计入,下次刷新重试。只有服务不可用、列表读取或索引写入失败等全局错误才让整次刷新失败。该提示可关闭(关闭后记入本地存储),且**只静音同一批失败**——出现新的跳过会话或错误类别变化时会再次提示,不会一次关闭就永久盖住新问题
116
117
 
117
118
  ### 额度查询
118
119
 
@@ -210,7 +211,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
210
211
  - 默认关闭;仅在视口 <1024px(手机竖屏 / 窄窗口)生效,桌面完全无感
211
212
  - 侧栏变抽屉、详情列移动端隐藏(对齐官方窄屏语义)、模态变全屏面板、设置左列导航变顶部横滑
212
213
  - 模型选择按钮在手机上收成图标(≤480px,与官方窄容器同形态;481px 以上仍显示模型名与推理等级)——插件移动端把中列拉宽,官方 `@container (width<=360px)` 那条收起规则在 428~440px 机型上永远不会触发,故显式对齐官方窄容器形态
213
- - 统计条(输入框下方「轮/步/tok/s | tok/缓存命中」)在手机上**保持一行并把宽度用满**:收紧这一行自身的左右内边距(官方 32px→2px)与列间距,两枚统计按需分宽、共占满整行——≥~420px 视口零截断,更窄视口按比例各让一点(远少于官方的固定截断),不换行、不横向滚动(桌面不受影响)
214
+ - 统计条(输入框下方「轮/步/tok/s | tok/缓存命中」)在手机上**保持一行、居中且不歪**:收紧这一行自身的左右内边距(官方 32px→2px)与列间距换出可用宽度,两枚统计交给官方 `justify-content` 居中排开——≥~420px 视口零截断,更窄视口按比例各让一点(远少于官方的固定截断),不换行、不横向滚动;同时兼容老版本 DSH(0.1.5-rc.2 上这条行是整行宽,早期实现的子项 `flex-grow` 会把两枚统计整组推到左边,现已改为不生长)(桌面不受影响)
214
215
  - 会话顶栏手机端重排(≤560px):标题行只留**标题 + 模式芯片**(芯片右靠贴住「…」钮,标题基本完整可见),「N 个子代理」与「N 个后台任务运行中」两枚计数芯片泊到「对话/轨迹」标签行右缘成一对(标签间距 36→20,点芯片本体仍开各自菜单);官方 crumbs 放不下时的**拦腰硬裁**彻底消除,561px 以上与桌面保持官方原布局
215
216
  - Agent Team 弹窗手机端不越屏(<1024px):官方 Agent Team 面板自带左锚(`left:0`),挂在头部右侧动作槽上会整体右移出屏(实测 320~1023px 越出 112~352px)。移动端把会话头部设为定位上下文、面板改**右锚 16px** 并按 `100vw − 32px` 封顶,两缘各留 16px;桌面 ≥1024px 官方几何逐字不变
216
217
  - 滑动沉浸:会话内下滑自动收起头部与输入框全屏阅读(收起时让出输入框占位,正文真正铺满整屏;回显时若仍停在会话末尾会自动对齐到底),上滑 / 点「回到底部」浮钮 / 聚焦输入框即恢复(无额外悬浮钮);已经停在会话末尾时往回一点即回显(不再等满阈值),点回底后停留位置会补一次贴底对齐;流式贴底、锚点跳转等程序化滚动绝不误触发
@@ -229,6 +230,7 @@ DSH Web 服务控制与运维插件:安全重启、版本管理与一键升级
229
230
  - **识别不到时按余额查询的手动适配兜底**:某个渠道名既不在内置表、也不符合前缀规则时,如果你在余额查询里把它**手动适配**成了某个类型(如 `cpa` → CLIProxyAPI,或任意中转 → OpenRouter / 智谱 / Command Code / StepFun 等),就显示该类型的厂家图标;适配类型一改图标立即跟着换,撤销适配立即回落官方默认图标。两个前提:只有**手动**适配算数(仅由 baseURL 自动推断出来的类型不算),且**名字能识别时以名字为准**(叫 `openrouter-f` 的渠道即使另外适配成别的类型,也仍显示 OpenRouter 标)
230
231
  - **CLIProxyAPI 图标按需出现**:手绘的「内凹菱形 + 镜像漩涡」品牌标**只在你在余额查询里把某个渠道手动适配成 CLIProxyAPI 后**才显示在模型按钮上(渠道名不限,叫 `cpa` 还是自定义名都一样);它就是上面那条兜底规则的一个实例,撤销适配立即回落官方默认图标
231
232
  - **余额查询的渠道卡片同样带图标**:已适配卡片的渠道名前显示同一套厂家小图标(14px;彩色档原样上品牌色、单色档跟随主题文字色)。上面那条「按手动适配兜底」的规则在这里同样生效——卡片区正是你做适配的地方,改完适配立即出现/换标
233
+ - **模型选择弹窗的分组标题同样带图标**:点开模型按钮 → 「模型」二级列表后,每个**厂家/渠道商分组名前面**也显示同一枚图标(13px,与 12px 的分组标题同量级)。同一套解析与兜底规则,未识别的渠道分组保持官方标题原样、不加图标
232
234
  - **浅色 / 深色都清晰**:品牌色对浅底与深底**两侧**对比度都达标才保留原色,否则自动改用跟随主题文字色的单色版——不会出现深色模式下「黑图标糊在黑底上」或浅色模式下近乎隐形
233
235
  - **零运行期网络请求**:图标在构建期内联进客户端产物,离线可用、不影响 CSP,也不向第三方暴露你的渠道名称
234
236
  - 图标尺寸与输入框旁的**额度圆环**一致(生成期把每个图标的 viewBox 收紧到真实绘制范围并正方形化,所以各品牌「看起来一样大」,不会有的满格有的缩成一团)
@@ -353,7 +355,7 @@ pm2 start "dsh web --host 127.0.0.1" --name dsh-web
353
355
 
354
356
  运行要求:Node.js `>=22`,DSH Web 能加载 Host 与 Client 两半插件。更新检查需访问 `registry.npmjs.org`;网络失败不影响其他功能。
355
357
 
356
- **DSH 适配口径**:已适配 DSH `0.1.6-alpha.2`——会话格式 V3(`system/message` 入史、旧 PTC 词汇更名,详情视图自动归档系统事件)、sessionPersistence handle 化(用量增量、标题缓存、诊断计数全部按新公共面 `list`/`open`/`read`/`close` 走)、官方右栏替代详情列(移动端右缘手势直接驱动 `ctx.layout.openRightbar/closeRightbar`)、官方 turn-process 对象化(子代理回合认领双形态兼容)、移动端底行触发钮双哈希兼容、子代理回合尾模型行 list 槽位自适应兼容、新插件管理页 `plugins.bundle.config` 槽位注入、会话详情打开接入 `uiWorkspace` 降级链路。旧版 DSH(`>=0.1.1-rc.2`)保持兼容:新旧两套 persistence/布局 seam 按运行时能力探测双形态走,旧宿主上针对新结构的适配项天然不生效(纯展示,无功能损失)。注意:升级后以 V3 格式写入的会话日志无法被旧版 DSH 读取——**备份不可跨版本降级恢复**。版本卡常驻显示「适配 DSH 0.1.1-rc.2 ~ 0.1.6-alpha.2」,越界运行版本(`≥0.1.6-alpha.3`)标红警示。
358
+ **DSH 适配口径**:已适配 DSH `0.1.6-alpha.2`——会话格式 V3(`system/message` 入史、旧 PTC 词汇更名,详情视图自动归档系统事件)、sessionPersistence handle 化(用量增量、标题缓存、诊断计数全部按新公共面 `list`/`open`/`read`/`close` 走)、官方右栏替代详情列(移动端右缘手势直接驱动 `ctx.layout.openRightbar/closeRightbar`)、官方 turn-process 对象化(子代理回合认领双形态兼容)、移动端底行触发钮双哈希兼容、子代理回合尾模型行 list 槽位自适应兼容、新插件管理页 `plugins.bundle.config` 槽位注入、会话详情打开接入 `uiWorkspace` 降级链路。旧版 DSH(`>=0.1.1-rc.2`)保持兼容:新旧两套 persistence/布局 seam 按运行时能力探测双形态走,旧宿主上针对新结构的适配项天然不生效(纯展示,无功能损失)。注意:升级后以 V3 格式写入的会话日志无法被旧版 DSH 读取——**备份不可跨版本降级恢复**。插件市场按 `package.json` 的 `engines.dsh` 区间判定兼容性(该字段是唯一的支持口径声明)。
357
359
 
358
360
  ## 🔒 安全设计
359
361