dshbase

插件目录 / Data / dsh-balance

dsh-balance

未验证 twotwopiggy

查看 GitHub ↗ ← 返回插件目录

11Stars
0Forks
0未关闭 issue
—语言
—最近推送
跨平台平台

功能简介

dsh余额插件. A DeepSeek Harness plugin for real-time token tracking and highly accurate session cost estimation, featuring dynamic peak/off-peak pricing support.

我们的评价

尚无短证据报告

这里还没有可核对的逐级实测记录。Star 数、目录 test 字段、web-only 标记,以及插件是否需要外部账号或服务,都不会在这里被写成通过或失败。目录徽章仍按 catalog 原样显示。

「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

你是插件作者? 想拿到「已验证」标签——提交你自己的验证证据(截图、日志或短视频),我们审核通过后即改为「已验证」。

提交验证证据 ↗

README

dsh-balance

A DeepSeek Harness (dsh) web profile plugin that puts a DeepSeek API balance button in the sidebar foot, right above the Settings entry.

  • One click → popover with total / granted / topped-up balance per currency, with refresh and close actions
  • Optional inline display: show the balance on the button itself without opening the popover
  • Optional auto refresh: re-query the balance in the background every N conversation turns
  • Full settings page (余额 / Balance) in the Settings panel: enable/disable the plugin, inline display, auto-refresh interval
  • Cosmetic touch: shrinks the built-in Cordis Plugin badge at the sidebar foot to a compact round icon so both buttons share the row cleanly
  • Clicking anywhere outside the popover closes it

The API key is never embedded: it resolves per request from the DSH credential seam (~/.dsh/.credentials.yaml → DEEPSEEK_API_KEY, or the ambient environment variable).

Install

# 1. install the package into your web profile (pnpm under the hood)
dsh plugin --profile web add github:HiNEM66/deepseek-harness-balance

# 2. register the bundle patch layer: edit ~/.dsh/profiles/web/package.json
#    and add "dsh-balance" to the "dsh.profile.bundles" array, e.g.
#    "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "dsh-balance"]

# 3. restart the web GUI
dsh web

Alternative to step 2: add the row by hand to ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: dsh-balance
      name: dsh-balance

Requires the DEEPSEEK_API_KEY credential (set it in ~/.dsh/.credentials.yaml
or through the dsh Models page). The plugin itself ships no key.

Settings

Settings persist in ~/.dsh/settings.yaml under the dsh-balance: section (live-applied; edits there are picked up within ~10 s):

Key Default Meaning
enabled true Show the sidebar button and run auto refresh. Disabling hides the button without deleting anything.
showInline false Show the balance in the button label (wide sidebar only; in the rail, hover the icon).
autoRefreshEvery 0 Refresh in the background every N closed agent turns; 0 disables.

Requirements

  • dsh 0.1.0-rc.x web profile with the standard client modules (sidebar, settings, slots)
  • Windows host for the balance route (it shells out to curl.exe); network access to https://api.deepseek.com

Development

No build step: lib/client.js is a hand-written, self-contained __ModuleLoader__ bundle (React comes from the shell's shared module registry), and lib/index.js is plain ESM.

npm run check   # node --check both files
npm test        # execute the client bundle against a fake ModuleLoader kernel

Layout:

lib/index.js        host half: /deepseek-balance, /state, /config routes +
                    settings namespace + agent turn counter
lib/client.js       client bundle: sidebar button + popover + settings page
cordis.patch.yml    bundle patch: inserts the dual-face row
dsh.plugin.json     plugin inventory metadata
tests/smoke.mjs     bundle contract smoke test

Upgrading

dsh plugin --profile web update dsh-balance   # refetches the latest commit
dsh web                                       # restart

Releasing (maintainers)

# 1. bump "version" in package.json and dsh.plugin.json, then:
npm run check && npm test

# 2. commit (Conventional Commits) and push
git add -A && git commit -m "feat: ..."
git push origin main

# 3. tag the release
git tag v<version> && git push origin v<version>

# 4. dogfood locally: refresh the git dep to the new commit and restart
cd ~/.dsh/profiles/web && pnpm update dsh-balance
dsh web

Known limitations

  • The badge-shrinking CSS targets the shipped Nqubda_* class names; a future dsh upgrade that renames them silently restores the stock badge (the balance button is unaffected).
  • The client syncs settings by polling /deepseek-balance/state every 10 s.

Uninstall

dsh plugin --profile web remove dsh-balance
# and drop "dsh-balance" from "dsh.profile.bundles" (or remove the row from cordis.patch.yml)

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-balance」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

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

Headless(CLI)profile:

dsh plugin --profile headless add github:twotwopiggy/dsh-balance

实测报告

尚无短证据报告

这里还没有可核对的逐级实测记录。Star 数、目录 test 字段、web-only 标记,以及插件是否需要外部账号或服务,都不会在这里被写成通过或失败。目录徽章仍按 catalog 原样显示。

使用场景

改变 dsh 的外观或交互方式——一套主题、皮肤或新面板,重塑工作区。

适合谁

在 web UI 里一待几小时、想让它按自己的习惯好看又好用的人。

二次开发建议

皮肤、面板和主题 token 是扩展点——写新皮肤、加面板,或与上游配色同步 token。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Data 里更多

浏览全部 26834 个插件 →