DeepSeek Harness plugin

dsh-deepseek-balance-matsmq

Live DeepSeek account balance widget for the dsh web GUI: always-visible sidebar/header badges plus a full Web Settings tab, auto-refreshed every 30s

Jump to install

Source facts

Repository
MatsMQ/dsh-deepseek-balance
Latest update
Aug 15, 2026
Category
UI Enhancements
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/MatsMQ/dsh-deepseek-balance
Plugin: dsh-deepseek-balance-matsmq
Author: MatsMQ

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-deepseek-balance · DeepSeek 账户余额实时显示

DSH Web GUI 的余额小部件,两处显示,每 30 秒自动刷新(也可手动刷新):

  • 会话标题栏右侧:主界面 banner 位置的余额徽章(余额 ¥1.36
  • 设置 → 插件 → 账户余额:完整详情页(总余额 / 赠送余额 / 充值余额 / 可用状态)

两处共享同一份轮询数据,任意一处挂载即开始刷新,切换页面后数据同步更新。

API Key 全程留在 host 进程内:插件通过 DSH 的凭据通道(ctx.credentials)解析 DEEPSEEK_API_KEY,在 host 侧请求官方余额接口(GET https://api.deepseek.com/user/balance),浏览器只拿到余额结果,永远接触不到 Key。

安装

# 从 GitHub 安装(发布后)
dsh plugin --profile web add https://github.com/MatsMQ/dsh-deepseek-balance

# 或本地路径安装
dsh plugin --profile web add <本包路径>

依赖:host 侧需要 webServercredentials 服务(web profile 自带),浏览器侧需要 react(shell 自带)。

使用

1. 确保凭据已配置($DSH_HOME/.credentials.yaml 或环境变量):DEEPSEEK_API_KEY: sk-...,与模型设置中使用的 Key 一致。 2. 重启 DSH Web 服务(插件在启动时装载)。 3. 进入会话后可在标题栏右侧看到余额徽章,悬停显示完整明细与更新时间;完整页在 设置 → 插件 → 账户余额

配置(cordis.patch.yml 的 entry config)

字段默认值说明
credentialRefDEEPSEEK_API_KEY使用的凭据引用名
upstreamUrlhttps://api.deepseek.com/user/balance余额查询端点
timeoutMs10000上游请求超时(毫秒)

路由

  • GET /dsh-balance(exact)— 余额 JSON,Cache-Control: no-store
  • 浏览器请求做同源围栏(校验 Sec-Fetch-Site),防止 DNS-rebinding 类跨站读取;无该头部的本地工具(curl、node)不受影响。
  • 返回码:no-credential / unauthorized / upstream / network,以及成功时的 { ok: true, data, fetchedAt }

安全边界

  • Key 不出 host 进程;路由只返回余额数据。
  • 默认 Web 部署只监听 127.0.0.1;若把 webServer 绑到 0.0.0.0,该路由也会暴露到局域网(余额信息,非密钥)。
  • 本插件不修改任何配置或凭据文件。