DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Client Ui Usage Hud — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
C

dsh-client-ui-usage-hud

Client Ui Usage Hud

DeepSeek Harness 侧边栏 HUD:账户余额、赠送余额、累计支出和令牌使用量,采用 Abyssal Maid Atelier 皮肤风格。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:bjpd6/dsh-client-ui-usage-hud#1e2d50077619c277e770b79ef81aba669410048c
README兼容性版本

兼容性与来源证明

Client Ui Usage Hud 以 dsh-client-ui-usage-hud 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/10/4

版本

0.1.0stable
2026/10/4

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/10/4
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编程套餐配额,并实时记录令牌使用情况;侧边栏 Settings 行上方显示紧凑的价格概览卡片Client Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilities为自定义 pi-ai 提供商声明每个模型的能力(图像输入和推理力度),可直接在 Models 设置卡片中编辑;写入官方 llm-pi-ai 设置命名空间,不更改 DSH 源代码。Codex Subscriptiondsh-codex-subscription通过 OAuth 在 DeepSeek Harness 中使用 ChatGPT 和 Codex 订阅,支持配额管理、安全重置、网页搜索、图像和快速模式

README

dsh-client-ui-usage-hud

A sidebar HUD for DeepSeek Harness (DSH) that shows your account balance, gifted balance, cumulative spend and token usage — always visible in the left sidebar foot.

Styled after the Abyssal Maid Atelier skin (@smalltailqwq/dsh-client-ui-skin-maid-atelier, 深海女仆工坊): navy, gold and porcelain, Georgia serif, lace-edged glass panel. It reads that skin's own published CSS variables and falls back to the same values when the skin is not active, so it looks right either way.

                            ┌──────────────────────────────────────┐
   footer trigger  →  🐋 ¥16.8287            │ 深海账户 · Token 用量        刷新 │
                       14,096万 tok          │ 账户余额              ¥16.8287 │
                                             │ 赠送余额               ¥0.0000 │
                                             │ Token 总用量    14,096万 17 会话 │
                                             │ 最近一次用量        39.3万 tok T4 │
                                             │   未命中 173 · 命中 354,688 · 输出 285 │
                                             │ 累计消费               ¥9.3329 │
                                             │ 金额来自 DeepSeek 平台账户接口   │
                                             │                  查看官方用量 → │
                                             └──────────────────────────────────────┘

Collapsed, the trigger shrinks to a 34px round whale button.

What it shows, and where each number comes from

RowValueSource
Account balancenormal_wallets per currencyplatform GET /api/v0/users/get_user_summary
Gifted balancebonus_wallets per currencysame
Cumulative spendtotal_costs per currencysame
Total tokenssum of all four token buckets + session countsession projection cache, tokenUsage.totals
Last requestuncached input / cache read / outputsame, tokenUsage.last

Every money figure is read from the platform. Nothing is estimated, and no price table is applied.

Why this plugin has to talk to the platform itself

DSH's account service does request GET /api/v0/users/get_user_summary, but its parser projects only two of the fields:

balance: {
  path: '/api/v0/users/get_user_summary',
  parse: (value) => {
    const parsed = summary.safeParse(value);
    return {
      status: 'ready',
      value: parsed.data.normal_wallets,
      bonusWallets: parsed.data.bonus_wallets,   // total_costs is dropped right here
    };
  },
},

The platform's own docs say the same thing: "Host projects only ... normal_wallets / bonus_wallets currency/balance strings; response tokens and other fields are discarded." That is why the shipped UI never shows cumulative spend — the data is there, DSH throws it away.

So this plugin's host half obtains a platform credential and reads the same endpoint for itself, parsing total_costs. Real response:

{"code":0,"data":{"biz_code":0,"biz_data":{
  "normal_wallets":[{"currency":"CNY","balance":"16.8287497600000000"}],
  "bonus_wallets":[{"currency":"CNY","balance":"0"}],
  "total_costs":[{"currency":"CNY","amount":"9.3328969200000000"}]}}}

Amounts are decimal strings and are kept verbatim until formatting, so precision is never lost to binary floating point.

The credential API that actually works here

This is the one sharp edge worth knowing if you write something similar.

deepseekAccount.resolveToken(url) looks like the supported way to get a request credential, and DSH's docs describe it as "the only sanctioned way a host consumer obtains a request credential". But its implementation is:

async resolveToken(url) {
  const destination = new URL(url);
  if (destination.origin !== this.inferenceOrigin || /* ... */) return void 0;
  // ...
}

inferenceOrigin is https://api.deepseek.com — the inference origin. The account endpoints live on https://platform.deepseek.com. Passing the platform origin therefore returns undefined with no error, which reads exactly like "signed out".

The correct accessor for the platform origin is getPlatformSession(), which returns { origin, token, userId, requestHeaders } and "exports the stored grant only when its issuer matches platformOrigin". It also hands back the provider-owned client headers the platform expects. This plugin uses that.

Data flow

client.js ──GET /api/dsh/usage-hud──► lib/index.js
                                        ├─ deepseekAccount.getPlatformSession()
                                        │    └─ GET platform.deepseek.com
                                        │         /api/v0/users/get_user_summary
                                        │         → balance / gifted / cumulative spend
                                        └─ <dshHome>/storages/session_projcache/sessions/*.json
                                             record.rows.tokenUsage.val
                                             → total tokens / last request

Token totals come from the persisted projection cache, not from live sessions, so cold and archived sessions count too. The route also wraps the same response envelope the account service does (code / data.biz_code / data.biz_data) and honours the same 401 and 40003 invalidation paths, calling rejectToken when the grant is dead.

Nothing secret is exposed to the browser: the token lives only inside the host half, and the route rejects cross-site callers.

Requirements

  • DSH with the deepseek-account platform plugin enabled and an official account signed in. In API-key mode there is no platform grant, and the money rows say so instead of inventing a zero.
  • No third-party runtime dependencies. No build step — lib/*.js is hand-written, directly executable JavaScript.
  • Works in light and dark themes.

Install

A DSH bundle is a package whose package.json declares dsh.bundle.patch; DSH composes its patch layer into the profile. Install it into a profile directory.

Option A — plugin manager (uses pnpm and git)

dsh plugin --profile desktop add <this-repo-url>

DSH enables a newly installed bundle by default. Restart DSH once.

Option B — manual (no pnpm, no git required)

  1. Copy this directory into the profile's node_modules:

    <dshHome>/profiles/<profile>/node_modules/dsh-client-ui-usage-hud/
    
  2. Append the package name to the profile's package.json:

    {
      "dsh": {
        "profile": {
          "bundles": [
            "@deepseek-ai/dsh-base",
            "@deepseek-ai/dsh-web-app",
            "dsh-client-ui-usage-hud"
          ]
        }
      }
    }
    
  3. Restart DSH. The loader applies this bundle's cordis.patch.yml, which inserts the row ui-usage-hud, and serves lib/client.js to the browser.

  4. Refresh the page.

Making the host half hot-reload

By default DSH watch roots are empty, so editing lib/index.js needs a restart. To iterate without one, add this plugin's directory to the hmr row in the profile's cordis.patch.yml:

- id: hmr
  name: "@deepseek-ai/dsh-hmr"
  config:
    root:
      - "<dshHome>/profiles/<profile>/node_modules/dsh-client-ui-usage-hud"

lib/client.js is polled by dsh-client-hmr already: a page refresh picks up changes.

Layout

package.json          # dsh.bundle.patch + dsh.client (platform: web)
cordis.patch.yml      # insert: ui-usage-hud
lib/index.js          # host half: the GET /api/dsh/usage-hud route
lib/client.js         # browser half: the sidebar widget
tests/client-test.mjs # renders the widget with a minimal React hooks shim
tests/host-e2e.mjs    # drives the real route handler and calls the platform

The browser half is a browser artifact in DSH's lazy-CJS shape — it registers itself with window.__ModuleLoader__.load({ id, factory }) and exports apply and inject. It uses only the shared platform runtime (require("react")), mutates nothing outside its own [data-usage-hud] scope, and removes its stylesheet on disposal.

Verifying

There is no build step, so the tests run the shipped files directly:

# renders the trigger and popover, asserting all five rows and the formatting
# (no credentials needed: it feeds a fixed payload through a fetch stub)
node tests/client-test.mjs lib/client.js

# drives the real route handler with a stub account service and calls the platform
node tests/host-e2e.mjs ./lib/index.js

tests/client-test.mjs loads the bundle exactly the way DSH does, provides a minimal React hooks shim, opens the popover and prints its rendered text. It needs no account.

tests/host-e2e.mjs stubs resolveToken (returning nothing, like the real one does for the platform origin) and getPlatformSession, then reports the amounts it parsed back from the platform. It needs a real platform grant, taken from the first of:

  1. DSH_PLATFORM_TOKEN — the token itself;
  2. DSH_CREDENTIALS — path to a DSH .credentials.yaml;
  3. ~/.dsh/.credentials.yaml — the default DSH location.

The token is read in-process, never printed, and never written anywhere.

# read the grant from your DSH profile
node tests/host-e2e.mjs ./lib/index.js

# or hand it over explicitly, touching no file
DSH_PLATFORM_TOKEN=... node tests/host-e2e.mjs ./lib/index.js

Notes and limitations

  • Money rows reflect the official DeepSeek account only. On third-party provider routes they are unavailable, and the popover offers the platform usage link instead.
  • The widget refreshes every 20 seconds and whenever the page becomes visible again, so the account endpoint is polled periodically.
  • total_costs is whatever the platform reports; this plugin does not scope it by period. Compare against the platform's usage page for a per-day breakdown.
  • Amounts are formatted with up to 4 decimals, or 2 above 1000, and sub-cent values show as <0.01.

License

MIT — see LICENSE.

Not affiliated with DeepSeek. "DeepSeek Harness" and the Abyssal Maid Atelier skin belong to their respective authors.