CaoNing3212/dsh-plugin-deepseek-balance

Plugin插件 Native原生 ⭐ 2 Usage & Cost用量与计费

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配置。卸载也对应有两种方式,命令行移除或手动删除相关文件和配置。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • 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):

  1. 把整个 dsh-plugin-deepseek-balance 文件夹复制到 %USERPROFILE%\.dsh\profiles\node_modules\ 下
  2. 编辑 %USERPROFILE%\.dsh\profiles\web\package.json:
    • dependencies 加入 "dsh-plugin-deepseek-balance": "1.0.0"
    • dsh.profile.bundles 数组追加 "dsh-plugin-deepseek-balance"
  3. 重启 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)
← 上一个 Prev dsh-branch-inbox-guard 下一个 Next dsh-hermes-memory →