DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

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

dsh-balance-plugin

Balance Plugin

侧边栏底部的 DeepSeek 钱包余额读数:卡片图标 + 金额,按状态着色,在回合结束时和点击时刷新,余额变化时显示浮动差值动画

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

npx -y @deepseek-ai/dsh plugin --profile web add dsh-balance-plugin@0.2.1
README兼容性版本
用量统计界面-顶部用量统计界面底部三方插件管理界面

兼容性与来源证明

Balance Plugin 以 dsh-balance-plugin 发布,当前版本为 0.2.1。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/9/20

版本

0.2.1stable
2026/9/13
1.3.0stable
2026/8/22
1.2.0stable
2026/8/21
查看其余 2 个版本收起版本
0.2.0stable
2026/8/15
0.1.0stable
2026/8/14

相关插件

正在加载相关插件…

最新版
0.2.1
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
33.8 kB
文件数
10
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 1
周下载
369
安全扫描
✓ v0.2.1 扫描通过
最近提交
2026/9/13
查看源码 ↗项目主页 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Usage@linxin666/dsh-usagedsh Web GUI 的使用统计插件:检测各提供商余额和编码计划配额,并提供实时令牌使用记录,以及当前提供商的专属宠物气泡Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。

README

dsh-balance-plugin

DeepSeek wallet balance at the sidebar foot — a DeepSeek Harness plugin.

DeepSeek-only: this plugin targets the DeepSeek platform exclusively — the official DeepSeek balance endpoint and DEEPSEEK_API_KEY. No other platforms or providers are supported.

English | 中文

Shows your DeepSeek account balance as a card icon + amount in the sidebar footer (beside Settings), tinted by how much is left. Refreshes when a conversation turn ends, on click, and on mount — no polling. When the amount changes, a signed delta (+¥3.14 / -¥1.97) floats up and fades next to it — every spend (or top-up) is visible at a glance.

screenshot placeholder: sidebar foot showing 💳 ¥12.34 in green

Features

  • Status-tinted amount: only the amount carries the color, the icon stays neutral —
    • ≥ lowBalanceThreshold (default 2): green
    • above zero: amber
    • zero or below: red
  • Refresh on turn end: the host pushes an SSE refresh event when any conversation turn ends — wallet spend settles with the turn.
  • Click to refresh; in-flight refreshes are deduped (a click or turn-end tick during a pending query is a no-op).
  • Float delta: on a visible amount change, a signed delta floats up and fades out — green when the balance rises, red when it falls. Zero or sub-cent changes are silent, the first load never floats, and the animation is suppressed under prefers-reduced-motion.
  • Silent failure: unconfigured credentials or a failed fetch render nothing — the readout is advisory and never surfaces an error.
  • Original currencies: balances are displayed as the provider reports them; no conversion, no summing.

Install

Requires DeepSeek Harness 0.1.5-rc.1 or later and a DeepSeek account credential. The plugin resolves DEEPSEEK_API_KEY through the optional harness credential service (~/.dsh/.credentials.yaml) or the environment.

From npm (recommended)

dsh plugin --profile <name> add dsh-balance-plugin

From the GitHub Release (no npm account needed)

Download dsh-balance-plugin-<version>.tgz from the releases page, then:

dsh plugin --profile <name> add ./dsh-balance-plugin-<version>.tgz

Note: the plugin lives in the plugins/ subdirectory of the dsh-plugins monorepo, so dsh plugin add github:... cannot target it — use the tarball (or npm).

Update an existing install

For npm installs, update the package in the same profile, confirm that its bundle layer remains active, then restart the Web server:

dsh plugin --profile <name> update dsh-balance-plugin
dsh --profile <name> --dump-config  # expect a "# == dsh-balance-plugin" layer
# restart dsh web, then hard-refresh the browser

dsh plugin forwards pnpm commands and reconciles the installed package's dsh.bundle declaration after a successful update. For a Release tarball, run dsh plugin --profile <name> add ./dsh-balance-plugin-<version>.tgz with the newer archive, then perform the same verification and restart.

Configuration

The plugin ships with sensible defaults; override via the bundle's plugin row:

# profile's cordis.patch.yml (or your home-level one)
- id: balance
  name: dsh-balance-plugin
  config:
    apiKeyEnv: DEEPSEEK_API_KEY      # credential reference, then the environment
    baseURL: https://api.deepseek.com # provider base URL
    timeoutMs: 12000                 # per-request timeout; abort maps to balance-timeout
    lowBalanceThreshold: 2           # amount at or above which the tint reads healthy

How it works

HalfWhat it does
Host (Node)Registers authenticated GET /dsh-balance (the wallet readout as JSON) and GET /dsh-balance/events (an SSE stream). Each route passes the Harness browser-auth and Origin fence before reading a credential. It listens on session/event and emits refresh per turn/end, resolving credentials per request through the optional service before falling back to the environment.
Client (browser)Registers the sidebar.footer.action slot entry (the shell's reserved seat beside Settings; on the collapsed rail it stacks above the settings icon). Fetches the readout on mount, on refresh SSE events, and on click, with an in-flight guard. The card icon is self-contained (no dependency on the shell's icon library).

Position and interaction follow the shell's own design: the sidebar.footer.action hole is the official extension point for "optional actions beside Settings".

Frequently asked questions

The balance looks stale right after a conversation ends. Provider settlement lags the turn by tens of seconds. The turn-end refresh may briefly show the pre-settlement amount; clicking later shows the settled value. This matches the official DeepSeek client behavior — the readout is advisory.

Nothing renders. No credential resolves (unconfigured) or the fetch failed — by design. Check dsh --profile <name> --dump-config for the plugin row, and that DEEPSEEK_API_KEY resolves through the credential seam or the environment.

How do I remove it?

dsh plugin --profile <name> remove dsh-balance-plugin

This removes the dependency and the bundle layer together.

Development

src/
  balance-core.ts   # pure query logic (credential resolution, HTTP, normalization)
  index.ts          # host plugin: routes + SSE + turn-end listener
  client.tsx        # browser plugin: the sidebar-foot action
scripts/build.mjs   # esbuild: host ESM + browser __ModuleLoader__ bundle
tests/              # node:test unit tests for balance-core
pnpm install
pnpm run build    # emits lib/index.js + lib/client.js
pnpm test         # balance-core, float, and host-route unit tests

Local install check (official verification points):

dsh plugin --profile demo add ./
dsh --profile demo --dump-config   # expect a "# == dsh-balance-plugin" layer

Release checklist

Before publishing a new version:

  1. pnpm run build and pnpm test pass.
  2. Local install and dsh plugin --profile demo update dsh-balance-plugin both keep the --dump-config layer; the web profile renders the readout with a real credential.
  3. Version bumped (npm version patch/minor/major); git tag matches.
  4. pnpm pack — inspect the tarball: it must contain lib/, cordis.patch.yml, README.md (and nothing else heavy).
  5. npm publish — publishes prebuilt code, so users install with zero friction.
  6. Push the tag; keep the GitHub release notes in sync with the npm version.

License

MIT