dsh-plugin-balance-indicator

DSH PLUGIN通知与集成

仓库 jeremytenjo/dsh-plugin-balance-indicator

通知与集成 L4 · 沙盒安装通过 安全审查:低风险 可信度:银 可安装插件
安装这个插件

dsh-plugin-balance-indicator 是 jeremytenjo 维护的 通知与集成 类 DSH 可安装插件, 仓库为 jeremytenjo/dsh-plugin-balance-indicator,许可证 MIT。 下面按「装什么、怎么装、验没验过、跑起来要注意什么」逐项列出。

一句话选型结论

按资料字段整理

dsh-plugin-balance-indicator 是通知与集成类的 DSH 可安装插件,验证等级 L4 · 沙盒安装通过,安全审查为低风险,有可直接复制的安装命令。验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么;涉及密钥或系统权限的,建议先在隔离环境试装。

分类通知与集成 收录类型可安装插件 验证等级L4 · 沙盒安装通过 安全审查低风险
验证等级 L4 L4 · 沙盒安装通过
GitHub 星标 0 复刻 0 · 未关闭 issue 0
最近更新 2026-10-24 创建于 2026-10-24
README 9.7 KB 正文体量,越大说明说明书写得越细

安装

可安装插件
在 DSH 里执行,装完用 dsh plugin list 确认已挂上;标了 L4 / L5 的命令已在沙盒里真实跑通
dsh plugin --profile web add github:jeremytenjo/dsh-plugin-balance-indicator
  1. 1
    确认版本与运行环境

    仓库没有标注兼容版本与 Node.js 要求,先确认你的 DSH 版本能装,再继续。

  2. 2
    执行安装命令

    在 DSH 里执行上面的命令;多包仓库要注意区分具体子包名,别装错包。

  3. 3
    确认已挂载

    用 dsh plugin list 查看列表里是否出现这个插件,出现即挂载成功。

  4. 4
    试跑并检查权限

    加载后跑一个最小用例,确认它能正常工作;同时看它申请了哪些文件、命令或网络权限。

兼容 DSH 版本未标注版本不匹配时安装会报错
Node.js 要求未标注来自仓库 package.json 的 engines 字段
前置依赖无需要同时安装的同级依赖
npm 包名未发布到 npm可用 npm view 查看包信息

能做什么

通知与集成
字段来自项目仓库与公开索引,中文说明由本站标注

适用场景

通知

上游标签

balancedeepseekdeepseek-harnessdsh-plugin

验证等级与安全审查

L4 · 沙盒安装通过
自动化流程结论,不是人工审核
验证等级L4 · 沙盒安装通过安装命令在隔离沙盒内真实执行成功,无依赖错误
安全审查低风险静态分析结论,未标注不代表已通过审查
仓库健康度活跃按仓库活跃度与最近更新时间给出
可信度银综合仓库活跃度与验证结果

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 验证等级 L4:在沙盒里真实装过,依赖能装上,不是纸面声明。
  • 静态安全审查为低风险,没有发现明显可疑行为。
  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有声明 Node.js 版本要求,版本不匹配可能装不上。
  • 验证通过不等于安全:插件会读写文件、执行命令或联网,装前先到仓库确认它做了什么。

更适合

  • 需要在通知与集成场景里给 DSH 补能力的人。
  • 想装完就能用、不想自己排依赖的人。
  • 能接受在本地装依赖、愿意自己确认权限的人。

不太适合

  • 只使用 DSH 官方内置能力、不接受第三方插件的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
插件验证等级安全审查星标兼容版本安装命令
dsh-plugin-balance-indicator当前 L4 · 沙盒安装通过 低风险 0 未标注 有
treg L3 · 安装规范通过 低风险 4,976 未标注 无
dsh-purge 未做沙盒验证 未标注 3,412 未标注 有
dsh-im L5 · 运行验证通过 低风险 1,837 0.1.7-rc.2 等 10 个 有
dsh-dafeiyu L5 · 运行验证通过 低风险 425 0.1.7-rc.2 等 10 个 有
dsh-trading L3 · 安装规范通过 低风险 235 未标注 无

仓库档案

通知与集成
字段来自项目仓库与公开索引,中文说明由本站标注
作者 / 维护方jeremytenjo仓库 dsh-plugin-balance-indicator · 默认分支 main
分类通知与集成notify
收录类型可安装插件声明了 dsh.bundle、可用 dsh plugin add 安装的条目
开发语言未标注仓库主语言
许可证MIT商用或二次分发前请确认条款原文
星标 / 复刻 / issue0 / 0 / 0收录时的数值,非实时
创建 / 更新2026-10-24 · 2026-10-24最后推送 2026-10-24
本站收录2026-10-30首次进入本站目录的时间

README 全文

9.7 KB
作者原文,中文版优先;只做安全转义,不改内容

DeepSeek Balance for DeepSeek Harness

Shows how much DeepSeek Platform balance you have left, in the left sidebar footer just above the account row.

The badge reads ¥12.34 / $12.34 from your signed-in DeepSeek account, refreshes every 60 seconds and when the window regains focus, and opens platform.deepseek.com/usage when clicked. The refresh button beside the amount forces an immediate read. Bonus credit, per-currency breakdown, and the last refresh time appear on hover.

Features

  • Remaining balance at a glance at the bottom of the left sidebar, beside the account and Plugins controls.
  • Bonus credit separate from paid balance, listed in the tooltip instead of being silently added.
  • Live enough: one TanStack Query cache entry refreshes on mount, every 60 seconds, and when the window regains focus or the network reconnects; the Host coalesces requests with a 20-second cache.
  • Manual refresh: the refresh button beside the amount bypasses the Host cache, spins while the read runs, and never opens the usage page by mistake.
  • Click through to usage: opens the Platform usage page from the account's own usageUrl.
  • Honest states: Sign in when no DeepSeek account is connected, Unavailable when the query fails (click to retry), and no fake zero balance.
  • English and Chinese UI, following the Harness language setting.
  • No secrets in the browser: the route returns wallet amounts and links only.

Requirements

  • DeepSeek Harness 0.2.1-rc.2 (the version this plugin was built against).
  • A DeepSeek account signed in through Harness Settings → Account. The balance comes from the Platform account session; an API-key-only setup has no balance to read.
  • Network access from the Harness Host to platform.deepseek.com.

Install

git clone https://github.com/jeremytenjo/dsh-plugin-balance-indicator.git
dsh plugin --profile desktop add ./dsh-plugin-balance-indicator

Restart the Host or reload the page, then start or open a session. The badge appears at the bottom of the left sidebar, above the account row. Replace desktop with the profile name shown by dsh --profile --dump-config.

Manual installation is also possible: add the package directory to the profile's dependencies as a link:, add it to dsh.profile.bundles, and run the profile's package install. Prefer the plugin command; it owns those files.

Usage

State Footer badge Badge click
Signed in, balance loaded ¥12.34 Opens the Platform usage page
Balance with bonus credit ¥12.34 (hover for bonus lines) Opens the Platform usage page
Not signed in Sign in —
Query failed Unavailable Retries
First load Balance… —

The refresh button sits directly beside the amount and works in every state. It asks the Host for a forced read (refresh=1, bypassing the 20-second cache), spins while that read runs, and changes its label from “Refresh balance” to “Refreshing balance…” for screen readers. If a poll is already in flight, a refresh click cancels it and restarts with the forced read, so the button never returns a stale cached amount.

Hovering the badge shows every wallet currency, bonus wallets with a positive balance, the last successful refresh time, and the click hint.

The badge uses the sidebar footer's own 42px action row, radius, and theme tokens, so it inherits light and dark themes without configuration. The sidebar footer is a single row shared with the shipped Plugins launcher: the balance and its refresh button take only their content width and sit first, and they stay hidden while the sidebar is collapsed to the 56px rail (the cached balance reappears immediately on expand).

How it works

client.js  ── GET /__dsh/deepseek-balance ──▶  index.js
│
├─ ctx.deepseekAccount.getState()
└─ ctx.deepseekAccount.getBalance(client)
│
▼
platform.deepseek.com

index.js is the Host half. It registers one exact loopback route and calls the Harness account service, which already owns the Platform credential and the /api/v0/users/get_user_summary query. The plugin never reads the credential store, never logs a token, and returns only:

{
"ok": true,
"status": "ready",
"wallets": [{ "currency": "CNY", "balance": "12.34" }],
"bonusWallets": [{ "currency": "CNY", "balance": "2.00" }],
"links": {
"usageUrl": "https://platform.deepseek.com/usage",
"topUpUrl": "https://platform.deepseek.com/top_up"
},
"fetchedAt": 1790000000000
}

The route accepts loopback requests only, rejects a foreign Origin and cross-site fetches, sends cache-control: no-store, and caps the wallet list and string lengths. Account query failures are not cached, so a retry or the next poll recovers; successful reads are cached for 20 seconds to coalesce multiple windows.

client.js is the browser half. It registers a lazy factory with the package name, adds a sidebar.footer.action entry with order -1 (before the shipped Plugins launcher), and registers its English and Chinese strings through the client locale service. The slot passes the sidebar's wide flag: the badge renders only while the sidebar is expanded, because the collapsed 56px rail already holds the Plugins launcher.

The badge's state lives in one TanStack Query entry keyed by language and timezone, with the route response as its data:

  • staleTime: 20s matches the Host cache, so a focus refetch only asks again once that cache could have moved.
  • refetchInterval: 60s polls while the window is visible; refetchOnWindowFocus and refetchOnReconnect cover the gaps.
  • A click on the failure state calls refetch() with the route's refresh=1 flag; the query's own retry loop is disabled so a failure is reported immediately instead of after backoff.
  • The refresh button sets the same force flag and calls refetch(). It is not disabled while fetching, so keyboard focus is never dropped; instead the icon spins, the accessible label changes, and the 60-second interval restarts after the read.
  • A response whose Host query failed (status: "failed") is cached as data, not as an error, so the failed state appears immediately and the 60-second poll recovers on its own. A network error after a successful load keeps the last known amount visible instead of replacing it.
  • The QueryClient is created per enabled plugin instance, provided to the badge's subtree, and cleared in the effect cleanup when the plugin is disabled. The cached entry survives collapsing the sidebar, so expanding again shows the last amount while any stale fetch runs.

src/client.js is the editable source. scripts/build-client.mjs bundles it with esbuild into client.js, keeping React external so the page's shared module table supplies it and TanStack Query bundled in, since the table does not provide it. Do not edit client.js directly.

Configuration

None. The Platform origin belongs to the Harness account provider; this plugin follows it rather than hard-coding an API host. The usage fallback is https://platform.deepseek.com/usage and is used only if the account supplies no link.

Development

pnpm install
pnpm run build
node --check index.js
node --check client.js

pnpm install brings the build toolchain. esbuild is build-only; TanStack Query is compiled into client.js rather than loaded as a separate page module. pnpm run build bundles src/client.js into the module-loader artifact client.js. Editing the Host half or src/client.js and reloading the plugin (Settings → Plugins → disable/enable) or restarting the Host is enough after a build. The locale metadata in locale/*.json supplies the Plugin Manager title, description, and icon.

Files:

  • index.js — Host route, cache, account calls, origin checks.
  • src/client.js — sidebar footer badge source: query definition, formatting, refresh control, tooltip, locale dictionaries.
  • scripts/build-client.mjs — esbuild bundle wrapped in the __ModuleLoader__ factory.
  • client.js — generated browser bundle; do not edit.
  • cordis.patch.yml — inserts the deepseek-balance-indicator row.
  • locale/en.json, locale/zh.json — Plugin Manager metadata.
  • icon.svg — original wallet icon.

Security and privacy

The balance is read through the existing Harness account session. This plugin adds no credential storage, no cookies, no analytics, and no third-party requests; the browser talks only to its own loopback Harness origin. Amounts and currency codes leave the Host, but account identity, profile, token, and masked contact details do not.

Limitations

  • The account session is required; API-key-only sessions show Sign in.
  • Only the Platform wallet summary is shown. Per-model spend and request history live on the usage page.
  • With multiple currencies, the badge shows the currency matching the UI language (CNY for Chinese, USD otherwise) and lists the rest in the tooltip.
  • Background polling is intentionally slow to be gentle on the Platform API; use the refresh button (or the usage page) for an exact current read.
  • The badge lives in the sidebar footer and is hidden while the sidebar is collapsed to the rail; it needs an expanded sidebar, not an active session.
  • The footer is one row shared with the Plugins launcher, so the launcher's right-aligned run count can be clipped by the badge's width in a narrow sidebar.

License

MIT © 2026 Jeremy Tenjo

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
dsh-plugin-balance-indicator 怎么安装?

在 DSH 里执行 `dsh plugin --profile web add github:jeremytenjo/dsh-plugin-balance-indicator` 即可。

dsh-plugin-balance-indicator 的验证等级是什么意思?

L4 · 沙盒安装通过。安装命令在隔离沙盒内真实执行成功,无依赖错误

dsh-plugin-balance-indicator 安全吗?

低风险。

dsh-plugin-balance-indicator 装之前要先确认什么?

先看它会读写哪些文件、执行哪些命令、连接哪些网络地址;验证等级只说明装得上、跑得起来,不等于安全。涉及密钥或系统权限的,建议先在隔离环境试装。

dsh-plugin-balance-indicator 用的是什么许可证?

上游标注为 MIT。商用或二次分发前请到仓库确认许可证原文。

这条记录的数据可靠吗?

本站按仓库名去重后合并整理,字段以作者仓库与 npm 元数据为准;安装命令、仓库地址与 README 保持原文,带 L4 / L5 标记的安装命令已在隔离沙盒里真实跑通。

通知与集成
按星标排序,可作替代方案

treg

treg

Treg 是面向 Agent 工具的 OpenRouter,聚合 60 个提供商的 2896 个端点,按调用计费,统一令牌访问,无需注册各供

L3 · 安装规范通过 4,976 星

dsh-purge

dsh-purge

dsh-purge Community · DeepSeek Harness 社区维护版:宿主兼容、状态诊断、提示词管理、更新与本机备份回滚

未标注验证等级 3,412 星

dsh-im

dsh-im

将IM机器人接入DeepSeek Harness,支持飞书、微信、钉钉等九种渠道,通过扫码或凭据配置,统一管理多机器人连接。

L5 · 运行验证通过 1,837 星

dsh-dafeiyu

dsh-dafeiyu

DSH 大肥鱼是一款由 DeepSeek Harness 真实工作状态驱动的桌面伴侣插件,以始终置顶的透明窗口实时展示 Agent 的思考、

L5 · 运行验证通过 425 星

dsh-trading

dsh-trading

L3 · 安装规范通过 235 星

jeremytenjo 的其它插件

6 个

插件的元信息来自作者仓库;分类、验证等级与安全结论的中文说明为中文整理,最近核验 —。