DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

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

@deepforce/dsh-balance

Balance

DeepSeek 账户余额:/balance 命令,以及 Web GUI 中 composer-dock 的余额读数

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

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

兼容性与来源证明

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

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

版本

0.2.0stable
2026/10/8

相关插件

正在加载相关插件…

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

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Client Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilities为自定义 pi-ai 提供商声明每个模型的能力(图像输入和推理力度),可直接在 Models 设置卡片中编辑;写入官方 llm-pi-ai 设置命名空间,不更改 DSH 源代码。Cost Meterdsh-cost-meterDeepSeek Harness 会话费用统计插件:本会话成本、当日费用、历史记录与官方价格同步,支持多厂商多模型价格计费(内置 170+ 模型 ID 价格目录与自动匹配)、主流 Coding Plan 订阅额度查询与显示(13 家,含 OpenDesign 工作区查询、含小米 MiMo Token Plan 控制台 Cookie 查询、SCNet Token Plan 本地 Credits 计量与火山方舟 Volcano Ark Coding Plan AK/SK 签名查询)、自定义 Provider Codex Subscriptiondsh-codex-subscription通过 OAuth 在 DeepSeek Harness 中使用 ChatGPT 和 Codex 订阅,支持配额管理、安全重置、网页搜索、图像和快速模式

README

dsh-balance

English | 中文

A DeepSeek Harness plugin that adds a /balance slash command and a composer-dock balance readout to the web GUI, querying the DeepSeek account balance live.

It calls DeepSeek's official Get User Balance endpoint and returns the total, topped-up, and granted balance per currency. The API key is resolved through the credential seam (ctx.credentials) or the environment on every call — it is never written into configuration, into the returned text, or into the browser.

Features

  • /balance — human slash command that prints the full balance breakdown in the session.
  • Web GUI readout — the conversation stats area (below the cache-hit figure) shows a compact Balance: ¥… line with hover details (topped-up / granted), a Top up link to the DeepSeek platform top-up page, a manual refresh button, and an estimated Session ≈ ¥… spend figure (hover shows the token buckets × unit prices). The readout copy is bilingual and follows the active dsh language (Chinese / English). The browser fetches the host's /dsh-balance route; the API key never leaves the host.
  • Daily-spend chart — hovering Last {days}d ≈ ¥… floats a comic speech bubble upward from the summary: a titled SVG bar chart of the last usageDays days' estimated spend, with a Y axis of ¥ ticks, an X-axis date per bar, and per-bar hover details (date, amount, request count, tokens). Moving away closes it. Data comes from the host's /dsh-usage route, which folds assistant/message usage across persisted sessions, pricing each request at the tier in effect at its own time.

Session-cost estimate

The Session ≈ ¥… figure prices the session's cumulative token usage — the same tokenUsage projection the cache-hit stat reads — at DeepSeek's published per-million-token rates (peak/off-peak, selected by the current Beijing time). It is an estimate, not a billing record: the model used is the configured estimateModel (not per-request model selection), and cache-write tokens are unpriced. Prices can be adjusted through the offpeakPrices / peakMultiplier / peakWindows config fields.

Compatibility

Tested against DeepSeek Harness 0.2.0-rc.2 (web profile, Windows 11) and earlier 0.1.0-rc.x builds — the /balance command and the composer-dock readout were verified live on 2026-08-14 against 0.1.0-rc.6, and the 0.2.x port against 0.2.0-rc.2. Version 0.2.0 requires dsh 0.2.x: dsh retired @deepseek-ai/dsh-client-runtime and removed sessionPersistence.inspect(), both of which 0.1.0 used. The npm @deepseek-ai/dsh-* packages are pre-release (no compatibility promise); if a newer dsh version changes the conversation.composer.dock slot or the webServer service, re-run the check below and file an issue.

Install

Option A: dsh plugin (recommended)

After pushing to GitHub:

dsh plugin --profile web add github:deepforce/dsh-balance

Replace github:deepforce/dsh-balance with your actual git URL. The bundle installs both halves: the host plugin (slash command + /dsh-balance route) and, because the package declares dsh.client, the browser-side composer-dock plugin. Restart dsh web after installing so the client plugin table picks the new entry up.

Option B: --patch overlay

# balance.cordis.yml
- insert:
    - id: balance
      name: '@deepforce/dsh-balance'
dsh web --patch "$PWD/balance.cordis.yml"

Configuration

FieldDefaultMeaning
apiKeyEnvDEEPSEEK_API_KEYCredential reference (environment-variable name), resolved per call
baseURLhttps://api.deepseek.comAPI endpoint base
timeoutMs10000Per-request timeout in milliseconds
estimateModeldeepseek-v4-flashModel whose prices the session-cost estimate uses
offpeakPrices{input: 1.5, cacheHit: 0.05, output: 4.5}Off-peak CNY per-million-token prices (uncached input / cache hit / output)
peakMultiplier2Peak-hour multiplier over the off-peak prices
peakWindows[[9,12],[14,18]]Beijing-time peak windows as [startHour, endHour) pairs
topUpUrlhttps://platform.deepseek.com/top_upDeepSeek platform top-up page the readout links to
usageDays7Default historical window (in days) for the daily-spend chart

Usage

  • Type /balance in the session composer:

    Balance (CNY): 110.00
      Topped up: 100.00
      Granted:   10.00
    
  • In the web GUI, the stats area under the composer shows Balance: ¥110.00 ⟳; hover reveals the topped-up / granted split, and the ⟳ button refreshes.

Security

  • apiKeyEnv is a credential reference: resolved through the dsh credential service first, then the environment. The key is never hard-coded or printed.
  • The browser readout only ever sees the public balance figures via the host's /dsh-balance route; the key stays on the host.
  • Only GET https://api.deepseek.com/user/balance is called; no other data leaves the process.

Building locally

pnpm install        # uses pnpm-workspace.yaml overrides for upstream npm gaps
pnpm run build      # tsc (node half + types) then tsdown (lib/client.js browser bundle)
pnpm run typecheck

The upstream @deepseek-ai npm release (0.0.1-rc.1) declares a few dependencies that do not exist on npm; pnpm-workspace.yaml aliases them to the real packages so this repo can install and build. The dsh runtime resolves those dependencies from its own tree, so the overrides do not affect the installed plugin.

License

MIT