原生 DeepSeek Harness 计费插件——从会话日志聚合真实用量,生成带实时多厂商定价的费用仪表盘,支持订阅/余额对账与成本归因分析。
DSH 适配
原生运行时
作者声明
安全审计
未审计
最后核验
2026-09-05
许可证
MIT
01它能帮你完成什么?
See exactly how much every DeepSeek Harness model run costs, in one dashboard
A sidebar cost card plus a six-zone billing dashboard (overview / tokens / usage / trends / rates / settings) aggregating real usage from persisted session logs, priced against live multi-vendor rates
DeepSeek Harness users who want per-run, per-model cost visibility instead of a raw token count
Close the loop on subscriptions, balances, relay quotas and ledger reconciliation
Subscription-plan quotas, multi-provider balances, relay quotas, declared endpoints and official-vs-local ledger reconciliation across providers
Heavy multi-provider DSH users who need to track plan quotas, balances and cross-check their billing
Explain where the cost actually goes, beyond the total
Input cache-hit/miss buckets (incl. reasoning), official vs third-party buckets, per-workspace/session/relay drilldown, per-round cost-spike attribution, and a per-model performance panel (TTFT mean / P50 / P90, tokens/s)
Engineers optimizing DSH spend who want cost attribution and latency-per-model insights
02如何接入 DeepSeek Harness?
前置条件
- A running DeepSeek Harness host that auto-discovers the plugin via `dsh.client` / `cordis.patch.yml`.
- Host `sessionPersistence` enabled — without it the plugin falls back to a local stats file (`~/.dsh-usage-stats.json`) and only estimates usage.
安装步骤
- 01
Add the plugin to the host’s `cordis.patch.yml`: insert id `ui-usage-billing` with name `@kenz1117/dsh-ui-usage-billing`.
- 02
Or run `npm install @kenz1117/dsh-ui-usage-billing` in the host project, then start the host — a billing entry appears above Settings with no extra config.
$ npm install @kenz1117/dsh-ui-usage-billing
验证接入成功
作者未说明
03DSH 适配与能力边界
Native DSH plugin discovered via the host’s `dsh.client` / `cordis.patch.yml`; adds a billing dashboard surface and loopback-only HTTP APIs on top of the host’s `sessionPersistence` and credential seam.
Real-time usage aggregation
persisted session logs (via the host’s sessionPersistence)→cost metrics — this month / today / estimated / heatmap / trends — priced in CNY against live multi-vendor rates
writes a persistent usage ledger at `~/.dsh/.dsh-usage-ledger.json`Billing dashboard UI
aggregated stats JSON from the server→sidebar trigger card + six-zone full-screen dashboard (overview / tokens / usage / trends / rates / settings)
Subscription, balance & relay closed loop
official / subscription / relay balance APIs (via credential seam)→subscription quotas, multi-provider balances, relay quotas, declared endpoints, and official-vs-local ledger reconciliation
reads multi-provider balance / pricing APIs over the networkwrites the `~/.dsh` ledgerCost attribution & performance analytics
per-session / per-round cost and latency data→input cache-hit/miss buckets, official vs third-party buckets, per-round cost-spike attribution, and a per-model latency panel (TTFT mean / P50 / P90, tokens/s)
04适合谁?何时不该用?
适合
- DeepSeek Harness users who want per-run, per-model cost visibility instead of a raw token count
- Heavy multi-provider DSH users who need to track plan quotas, balances and cross-check their billing
- Engineers optimizing DSH spend who want cost attribution and latency-per-model insights
不适合
- Declared permission level is `high`: reads persisted session logs (files), calls multi-provider balance / pricing APIs (network), reads `apiKeyEnv` via the credential seam, and writes the `~/.dsh` ledger — but it does NOT execute shell commands.
- Update channel is `user-reviewed`: because the plugin has file / network / credential capabilities, DSH STORE requires local manual confirmation on every install; review the repo, pin a Commit, and lifecycle scripts before installing.
- Preview line (npm latest/alpha, 1.0.x) targets DSH 0.1.2 series; stable line (npm stable, 1.1.x) targets older hosts 0.1.0-rc.8 ~ 0.1.1-rc.2. Requires Node.js ^22.19.0 || >=24.0.0.
05兼容性、维护与安全提示
- Declared permission level is `high`: reads persisted session logs (files), calls multi-provider balance / pricing APIs (network), reads `apiKeyEnv` via the credential seam, and writes the `~/.dsh` ledger — but it does NOT execute shell commands.
- Update channel is `user-reviewed`: because the plugin has file / network / credential capabilities, DSH STORE requires local manual confirmation on every install; review the repo, pin a Commit, and lifecycle scripts before installing.
- Preview line (npm latest/alpha, 1.0.x) targets DSH 0.1.2 series; stable line (npm stable, 1.1.x) targets older hosts 0.1.0-rc.8 ~ 0.1.1-rc.2. Requires Node.js ^22.19.0 || >=24.0.0.
MIT · actively maintained (latest release v1.1.7, 2026-09-04)
06常见问题
如何把 dsh-ui-usage-billing 安装到 DeepSeek Harness?
在宿主的 `cordis.patch.yml` 中加入 insert id `ui-usage-billing`、name `@kenz1117/dsh-ui-usage-billing`,或运行 `npm install @kenz1117/dsh-ui-usage-billing`。启动宿主后,侧边栏设置上方即出现计费入口;无需额外配置,`sessionPersistence` 可用时自动聚合真实用量。
费用数据从哪来,会用假样本吗?
服务端从持久化会话日志实时聚合,按实时多厂商官方价估算;数据到达前显示全零空快照,绝不展示伪造样本。
它能追踪哪些厂商的余额与订阅?
它追踪订阅套餐额度、多厂商余额(DeepSeek、Kimi、阶跃星辰、硅基流动、xAI、智谱 GLM、腾讯云 TokenHub 等)、中转站额度、声明端点与官方/本地账本对账,形成可交叉验证的计费闭环。
插件需要高权限吗,怎么更新?
声明权限等级为 `high`(读取会话日志、访问余额/定价 API、经凭据 seam 读取 `apiKeyEnv`、写入 `~/.dsh` 账本),但不含命令执行/Shell;更新通道为 `user-reviewed`,DSH STORE 每次安装都需本机人工确认。
支持哪些 DeepSeek Harness 版本?
预览线(npm latest/alpha,1.0.x)适配 DSH 0.1.2 系;稳定线(npm stable,1.1.x)适配旧宿主 0.1.0-rc.8 ~ 0.1.1-rc.2,并要求 Node.js ^22.19.0 || >=24.0.0。
07相关的 DSH 工作流
dsh-better-sidebar
作者 omdsh-dev
开放的侧边栏底座,支持三方拓展注册新侧边栏页面。内置文件渲染编辑/终端/侧边对话/Git/子代理页面 | Open sidebar foundation, supports third-party extensions to register new sidebar pages. Built-in file rendering/editing, terminal, side chat, Git, and sub-agent pages.
dsh-tui
作者 ccch1mneyyy
DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rollback, context bar + TPS. npm one-click.
dsh-tianshu-tui
作者 huiliyi37
官方 DeepSeek Harness 的交互式终端 UI 插件:自研 ANSI 极简交互渲染、流式 Markdown/工具卡、16+ 主题、slash 命令与选择器、输入历史与本地偏好持久化、LSP 诊断、memory记忆,很丝滑的开发体验。
dsh-popout-sidebar
作者 e2mcc
将侧边栏弹出为独立浏览器标签页,可拖到另一块屏幕使用
08数据与来源
本包为独立 npm 包,发布后即可被其他 DeepSeek Harness 宿主安装。
启动宿主后,侧边栏设置上方即出现计费入口。无需额外配置;`sessionPersistence` 可用时自动聚合真实用量。
页面基于项目公开文档、仓库元数据和 DSH Plugins 的结构化解析生成;最后核验于 2026-09-05。发现错误?提交更正。
最佳 DeepSeek Harness 插件
从全目录挑出的 12 个值得优先安装的插件,覆盖各个分类。
