返回目錄

dsh-ui-usage-billing

編輯精選維護狀態: 活躍

kenz1117/dsh-ui-usage-billing

用量計費看板:側邊欄成本指標、基於會話日誌的真實用量聚合與多提供商價格目錄。

前往 GitHub專案首頁
$ npm install @kenz1117/dsh-ui-usage-billing

33

星數

5

Fork

TypeScript

語言

MIT

授權條款

2026-08-16

建立於

2026-09-04

最近推送

原生 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.

安裝步驟

  1. 01

    Add the plugin to the host’s `cordis.patch.yml`: insert id `ui-usage-billing` with name `@kenz1117/dsh-ui-usage-billing`.

  2. 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 整合程度與能力邊界

DSH 整合原生執行環境

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 serversidebar 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` ledger
  • Cost attribution & performance analytics

    per-session / per-round cost and latency datainput 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.
2026-08-162026-09-04v1.1.7

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。

08資料與來源

  • 作者聲明github.comf47e6ca4ba2a…

    本包为独立 npm 包,发布后即可被其他 DeepSeek Harness 宿主安装。

  • 作者聲明github.comf47e6ca4ba2a…

    启动宿主后,侧边栏设置上方即出现计费入口。无需额外配置;`sessionPersistence` 可用时自动聚合真实用量。

此頁面根據專案公開文件、儲存庫中繼資料與 DSH Plugins 的結構化解析所產生;最後核實於 2026-09-05。發現錯誤?提交更正。

🏆

最佳 DeepSeek Harness 外掛

從全目錄挑出的 12 個值得優先安裝的外掛,涵蓋各個分類。

DSH Plugins 是獨立的 DeepSeek Harness 外掛市集,與 DeepSeek 官方無關,也不代表官方背書。第三方外掛未經安全稽核,安裝前請審查原始碼。

每週取得最新的 DeepSeek Harness 外掛,絕不濫發。