原生 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 個值得優先安裝的外掛,涵蓋各個分類。
