CaoNing3212/dsh-plugin-deepseek-balance
DeepSeek 余额显示
Project Overview项目介绍
This is a plugin built exclusively for DeepSeek Harness (DSH) that adds DeepSeek API account balance display to the DSH web interface. It places the current balance of the user’s DeepSeek official account directly in front of the default session statistics line that appears below the input text box. The balance is clickable, and clicking the balance line triggers an immediate refresh of the balance data from DeepSeek’s official API. It only appears when the user is connected to DeepSeek’s official endpoint at https://api.deepseek.com and has a valid API key configured in DSH.
This plugin is designed for DSH users who use DeepSeek’s official API and want to keep track of their remaining account balance without leaving the DSH interface. After installation, the balance automatically updates each time you open a new conversation, and you can click the balance line any time you want to check the latest up-to-date amount. If you are using a proxy or third-party gateway for DeepSeek API, or have not configured an API key, or the query fails for any reason, the plugin automatically hides itself so it does not clutter your interface.
To install the plugin, you can use either the official DSH plugin command line tool if you have pnpm set up, or follow the manual installation steps for systems without pnpm. After installation, you will need to restart the dsh web server and refresh your browser page for the plugin to take effect. The plugin requires DSH web version 0.1.0-rc.6 or newer, as it relies on the existing conversation.composer.dock interface slot to inject the balance display. Your API key is pulled securely from DSH’s existing credential service, so no extra configuration is needed beyond what you already have for DeepSeek API access.
这是一款专为 DeepSeek Harness(DSH)开发的原生插件,功能是在DSH网页界面的输入框下方,将会话统计行的前面显示DeepSeek官方API账户的当前余额,格式如「余额:¥69.94」,点击余额即可手动刷新余额数据。插件仅在用户使用DeepSeek官方接口(https://api.deepseek.com)且已配置API密钥时显示,其他情况会自动隐藏。
插件分为后端主机部分和前端客户端部分,后端负责调用DeepSeek官方的余额查询接口,通过DSH平台凭据服务读取用户在设置页面配置的API密钥,完全自包含不依赖任何平台补丁。前端负责在界面合适位置注册余额显示条目,排在默认会话统计行之前。用户可通过两种方式安装,一种是使用带pnpm的dsh插件命令,另一种是手动操作。
本插件要求DSH web版本不低于0.1.0-rc.6,理论上其他版本只要存在conversation.composer.dock插槽也可使用。用户必须提前配置好DeepSeek官方API密钥,可在DSH设置的模型页面填写,也可通过环境变量DEEPSEEK_API_KEY配置。卸载也对应有两种方式,命令行移除或手动删除相关文件和配置。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-plugin-deepseek-balance(CaoNing3212/dsh-plugin-deepseek-balance)
仓库:https://github.com/CaoNing3212/dsh-plugin-deepseek-balance
本站详情页:https://www.yhbd.top/plugins/caoning3212-dsh-plugin-deepseek-balance/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证未声明 · ⭐ 2 · 最近提交 2026-09-14 · 主语言 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 更稳。
- No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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 github:CaoNing3212/dsh-plugin-deepseek-balance
把 CaoNing3212/dsh-plugin-deepseek-balance 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-plugin-deepseek-balance
在 Web 界面输入框下方的会话统计行(**「2 轮 · 110 步 | LLM …」**那行)前面显示 DeepSeek 官方账户余额的小插件,例如:余额:¥69.94。点击可刷新。
只在使用 DeepSeek 官方接口(https://api.deepseek.com)且已配置 API key 时显示;代理/网关、未配 key、查询失败时自动隐藏。
- 主机半(
lib/index.js):挂载GET /dsh-balance,通过平台凭据服务读取DEEPSEEK_API_KEY(设置 → 模型 页面写入的那个),调用官方/user/balance。完全自包含,不依赖任何平台补丁。 - 客户端半(
lib/client.js):向conversation.composer.dock插槽注册order: -1的条目,排在自带的stats(order 0)前面。
安装(任意电脑)
方式 A —— 用 dsh 插件命令(需要 pnpm):
dsh plugin --profile web add <本插件文件夹的绝对路径>
# 重启 dsh web,浏览器刷新页面
方式 B —— 手动(无需 pnpm):
- 把整个
dsh-plugin-deepseek-balance文件夹复制到%USERPROFILE%\.dsh\profiles\node_modules\下 - 编辑
%USERPROFILE%\.dsh\profiles\web\package.json:dependencies加入"dsh-plugin-deepseek-balance": "1.0.0"dsh.profile.bundles数组追加"dsh-plugin-deepseek-balance"
- 重启
dsh web,浏览器刷新页面
卸载
方式 A:dsh plugin --profile web remove dsh-plugin-deepseek-balance
方式 B:手动删除上面登记的依赖、bundles 条目和 node_modules 里的文件夹,然后重启。
要求
- DSH web 0.1.0-rc.6(其他版本理论兼容,插槽名
conversation.composer.dock需存在) - 已配置 DeepSeek 官方 API key(设置 → 模型,或环境变量
DEEPSEEK_API_KEY)
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