DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Balance — DeepSeek Harness 插件(DSH Plugin)
← Plugins

@lemcae/dsh-balance

Balance

DeepSeek Open Platform 余额和会话消耗读取(主机 + Web 客户端)

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

npx -y @deepseek-ai/dsh plugin --profile web add @lemcae/dsh-balance@0.1.7
README兼容性版本

兼容性与来源证明

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

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

版本

0.1.7stable
2026/8/16
0.1.6stable
2026/8/16
0.1.5stable
2026/8/15
查看其余 4 个版本
收起版本
0.1.4stable
2026/8/15
0.1.3stable
2026/8/14
0.1.2stable
2026/8/14
0.1.0stable
2026/8/14

相关插件

正在加载相关插件…

最新版
0.1.7
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
641 kB
文件数
29
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 5
周下载
139
安全扫描
✓ v0.1.7 扫描通过
最近提交
2026/8/16
查看源码 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

README

dsh-balance

English | 中文

A Host + Web Client composition plugin for deepseek-harness (dsh): queries the DeepSeek Open Platform account balance and estimates the current session's spend. Installable via dsh plugin add.

1786767329895

1786767316204

1786899004009

Features

  • Balance: queries the official GET https://api.deepseek.com/user/balance using the harness's own DEEPSEEK_API_KEY credential (the key travels only over a bounded node subprocess's stdin — never in command lines, logs, or UI).
  • Session spend estimate: folds the provider-reported token usage from the session log (uncached input / cache-hit input / output) and prices each step with the official peak/off-peak table (peak 9:00–12:00 and 14:00–18:00 Beijing time). Estimate only — the official bill is authoritative.
  • Top-bar chip (session header): 余额 ¥x | 会话 ≈¥y, click to refresh; hover (500 ms) shows a detail tooltip below the button, horizontally centered and viewport-clamped.
  • Settings page (设置 → DeepSeek 余额): balance rows, an auto-refresh on/off switch, refresh-interval selector (15 s … 5 min or custom), UI-language selector (auto follows the host UI / 中文 / English), and an editable price table (off-peak / peak per model). Changes persist in the settings document across restarts.
  • Model tool: deepseek_balance returns balance + the calling session's estimated spend.
  • Pause-aware refresh: after 2 refresh cycles without a new user or assistant message the auto-refresh pauses (5-minute detection cadence); it resumes when a new conversation appears. Auto-refresh can also be switched off manually (Settings switch or /dsh-balance auto-refresh off); while off, no queries are issued.
  • Self-contained: no host-repository changes are required to deploy (communication rides the built-in commands Remote namespace).

Installation

Standard (bundle install, recommended):

dsh plugin --profile web add @lemcae/dsh-balance

The installer adds the package to the web profile's dependencies and bundle list; after restarting dsh web, the loader applies the in-package cordis.patch.yml automatically. Verify:

  • Open any session → the 余额 ¥x | 会话 ≈¥y chip appears in the header with a hover detail tooltip;
  • 设置 → DeepSeek 余额 shows the full card (balance, interval, language, price table);
  • Ask the model to call the deepseek_balance tool.

Manual install (same mechanism, bypassing the installer): edit $DSH_HOME/profiles/web/package.json — add "@lemcae/dsh-balance": "<latest version>" (as on npm) to dependencies and "@lemcae/dsh-balance" to the dsh.profile.bundles array — then run pnpm install in that directory and restart.

Peer dependencies are the official @deepseek-ai/* packages (^0.1.0-rc.5 line, covering rc.5 and rc.6; @deepseek-ai/cordis ^4.0.1) plus react, provided by the host.

Usage

  • Chip: shows 余额 ¥x | 会话 ≈¥y; click to refresh; hover for details (breakdown, model, 更新于, refresh cadence / pause note).
  • Settings: 设置 → DeepSeek 余额 — balance rows, 自动刷新间隔 (15 s … 5 min or custom), 自动刷新开关, 界面语言 (auto / 中文 / English), price-table editor (保存 persists), peak-hours hint.
  • Command (also usable from the command palette): /dsh-balance [refresh | interval <毫秒> | prices <JSON> | language <auto|zh-CN|en> | auto-refresh <on|off>].
  • Tool: deepseek_balance (no arguments).

Configuration

Settings namespace dsh-balance:

FieldDefaultMeaning
autoRefreshtrueEnable/disable the auto-refresh timer (/dsh-balance auto-refresh on|off)
refreshIntervalMs30000Active auto-refresh interval (5 000–600 000 ms)
languageautoPlugin UI language:auto (follow host UI), zh-CN, or en
pricessee source{ models: { deepseek-v4-flash, deepseek-v4-pro, default } }, each model { offPeak, peak } rates in CNY per 1M tokens

Prices are picked by Beijing hour: peak for 9:00–12:00 and 14:00–18:00, offPeak otherwise.

Known Limitations and Deferred Work

  • Estimate vs. bill: the spend is computed from the local session log and may differ from the official bill (provider-side caching policy, unlogged requests, model renames, price changes). Edit the price table in Settings to keep it current.
  • Unknown models are priced with the default entry (v4-flash rates).
  • Subagents have their own session ids and are not included.
  • Compaction: a compacted session resets event seqs; the incremental fold may keep pre-compaction totals (acceptable for an estimate).
  • Session-log noise: every auto-refresh runs a slash command, appending command/run + command/done events; pause-downshifting reduces this.
  • Pause recovery latency: while paused, the client probes once per PAUSED_REFRESH_MS (5 min); a new conversation resumes the active cadence at the next probe, so recovery can lag by up to that interval.
  • Balance is cached 10 s; the tool and chip may share one API call per cycle.

Model Experience

Request context and condition

What the model sees

The tool schema deepseek_balance (zero parameters) plus its description, which states it queries the official balance endpoint with the harness credential and returns the session spend estimate.

Token effect

Zero direct tokens; the tool result is data-dependent (payload with balance, consumption, prices, idle state).

KV Cache effect

Prefix-stable: tool name, description, and schema are constant; the result varies per call, which does not invalidate prefix reuse.

相关插件

继续浏览 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 模型。