x2802490130-prog/dsh-balance-float
DeepSeek Harness(DSH)Web 插件:在网页右上角显示一个悬浮窗,实时显示 DeepSeek 模型账户余额,支持手动刷新与一键优雅退出(Y/N 快捷键确认)。
catalog descriptioncatalog 简介 / catalog description:DSH 悬浮余额/一键退出插件
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness (DSH). It adds a floating window to the top-right corner of the DSH web interface that displays your current DeepSeek API account balance in real time. The plugin automatically refreshes the balance every 60 seconds, and also supports manual refresh with a single click of the refresh button on the window. There are three different methods to install the plugin: installing via npm, installing directly from GitHub, and adding a local link for development testing. After installation, you just need to restart DSH or hard refresh the page to see the floating window.
The plugin comes with a graceful exit feature that lets you shut down DSH with one click. When you click the exit button on the floating window, a confirmation prompt will pop up, and you need to press Y on your keyboard to confirm the exit. If you press N or Esc, the exit action will be canceled. Once you confirm exit, the plugin will close both the local DSH service and the DSH web page at the same time, which avoids leaving unnecessary background processes running after you finish using DSH.
To work properly, the plugin reads your DeepSeek API Key in a specific order: first from the environment variable, then from the DSH credentials configuration file. The API Key is only used to query your account balance, and will never be exposed in any web response from DSH. The plugin is open source under the MIT license, and it is written in pure JavaScript with no build steps required after installation. For development and testing, you can add the optional jsdom dependency to run regression tests that work even offline.
这是一款专为 DeepSeek Harness(DSH)开发的原生网页插件,会在DSH网页界面右上角添加一个悬浮窗,实时展示DeepSeek模型账户的余额信息,支持每60秒自动刷新余额,也可点击按钮手动刷新,还提供一键优雅退出功能,退出时需要通过键盘快捷键确认。插件支持三种安装方式,分别是npm官方安装、GitHub直装和本地开发链接安装。
安装完成后重启DSH或硬刷新网页,即可在右上角看到悬浮窗。点击悬浮窗主体可展开查看余额明细,包括总余额、赠送余额、充值余额和上次更新时间;点击刷新按钮可立即更新余额;点击退出按钮会弹出确认框,按Y确认退出,按N或Esc可取消退出,确认退出后会同时关闭本地DSH服务和网页。
插件会按环境变量、DSH配置文件的顺序读取DeepSeek API Key,API Key仅用于余额查询,不会出现在网页响应中。本插件采用MIT许可开源,纯JavaScript开发无构建步骤,直装即可使用,不需要额外构建依赖。开发测试时可添加可选依赖jsdom运行回归测试,离线也可执行。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-balance-float(x2802490130-prog/dsh-balance-float)
仓库:https://github.com/x2802490130-prog/dsh-balance-float
本站详情页:https://www.yhbd.top/plugins/x2802490130-prog-dsh-balance-float/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 5 · 最近提交 2026-08-25 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add dsh-balance-float
把 x2802490130-prog/dsh-balance-float 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-balance-float
DeepSeek Harness(DSH)Web 插件:在网页右上角显示一个悬浮窗,实时显示 DeepSeek 模型账户余额,支持手动刷新与一键优雅退出(Y/N 快捷键确认)。
环境要求
- 已安装 DeepSeek Harness CLI:
npm install -g @deepseek-ai/dsh - 已配置 DeepSeek API Key(用于余额查询;未配置时悬浮窗显示「获取失败」红点,不影响其他功能,Key 配置方式见下文)
功能
- 实时余额:悬浮窗每 60 秒自动刷新,展示总余额 / 赠送 / 充值明细
- 手动刷新:点击 ↻ 按钮立即刷新
- 一键退出:点击 ⏻ 弹出确认框,按键盘 Y 确认退出(关闭本地服务与网页),N / Esc 取消
- 退出即关闭:退出后本地 DSH 服务与 http://127.0.0.1:3080 网页一并关闭
安装
方式一:npm(推荐)
dsh plugin --profile web add dsh-balance-float
方式二:GitHub 直装
dsh plugin --profile web add github:x2802490130-prog/dsh-balance-float
本插件为纯 JavaScript 发布(无构建步骤),git 直装即可使用,无需 pnpm 构建许可(见官方 publish.md)。
方式三:本地链接(开发 / 尝鲜)
dsh plugin --profile web add link:/path/to/dsh-balance-float
安装后重启 dsh(或硬刷新网页 Ctrl+F5),右上角即出现悬浮窗。
使用
| 操作 | 效果 |
|---|---|
| 点击悬浮窗主体 | 展开余额明细(总 / 赠送 / 充值 / 更新时间) |
| 点击 ↻ | 立即刷新余额 |
| 点击 ⏻ | 弹出退出确认框 |
| 键盘 Y | 确认退出(本地服务与网页一并关闭) |
| 键盘 N / Esc | 取消退出 |
| 再点 ⏻ | 关闭确认框 |
配置
插件读取 DeepSeek API Key,查找顺序:
- 环境变量
DEEPSEEK_API_KEY $DSH_HOME/.credentials.yaml%USERPROFILE%/.dsh/.credentials.yaml(Windows)$HOME/.dsh/.credentials.yaml
credentials 文件格式:
DEEPSEEK_API_KEY: sk-xxxx
API Key 仅用于服务端请求,永远不会出现在网页响应中。
HTTP 接口
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/dsh-balance |
余额查询(60 秒缓存) |
| POST | /api/dsh-exit |
优雅退出:SIGINT 关闭 dsh,6 秒兜底强杀 |
两个接口都只挂在本地 dsh 服务上,不对外暴露。
开发与测试
npm i -D jsdom # 可选:测试依赖
node test.mjs # 回归测试(宿主路由 + jsdom 客户端交互,离线可跑)
目录结构
lib/index.js 宿主(HTTP 路由:余额 / 退出)
client/client.js 客户端(悬浮窗 UI 与交互)
cordis.patch.yml bundle 补丁
test.mjs 回归测试
windows/ 可选:Windows 隐藏窗口启动 / 停止脚本 + 默认图标(覆盖 icon/dsh.ico 即可替换)
MeteorNOX/DeepSeek-Balance-Whale-Widget
edison7009/EchoBird
Han-1413141/dsh-cost-meter
wssfk12138/dsh-damage-pulse
zh667/TokenLedger
edonadei/caliper
Ychris12138/dsh-usage-stats
Aisland-SJL/dsh-usage