DeepSeek Harness plugin

dsh-whale-purse

DeepSeek Harness (DSH) 鲸鱼娘桌宠插件:可拖拽的透明鲸鱼娘悬浮在网页上,显示 DeepSeek 账户余额、官方「今日已消费」、当前会话 token 用量/预估花费与近 7 天历史趋势。

Jump to install

Source facts

Repository
liuherong808-dev/dsh-whale-purse
Latest update
Aug 16, 2026
Category
Just for Fun
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/liuherong808-dev/dsh-whale-purse
Plugin: dsh-whale-purse
Author: liuherong808-dev

Check the source files

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

File explorer3 files
README.mdSource · read only

whale-purse 🐋

一只住在 DeepSeek Harness(DSH) 网页里的鲸鱼娘桌宠,帮你盯着 DeepSeek 账户的 余额官方「今日已消费」当前会话用量/花费近 7 天历史趋势

![License: MIT](LICENSE) ![topic: dsh-plugin](https://github.com/topics/dsh-plugin)

![preview](assets/preview.png)

特性

  • 🐋 鲸鱼娘桌宠:透明立绘悬浮在页面上,随波轻微摇摆,脚底带投影;点击 squash 弹跳回应
  • 🖱️ 可拖拽:拖动换位(localStorage 记忆,刷新/重开保持),点击打开用量面板
  • 🔔 任务完成提醒:后台会话跑完时鲸鱼娘弹跳 + 头顶冒泡「任务完成啦」,点气泡直达完成会话
  • 🏃 状态动作:有任务运行时鲸鱼娘忙碌抖动 + 「忙…」标签
  • 💰 余额监视:DeepSeek 官方 Get User Balance 接口,30s 轮询 + 并发去重
  • 📆 官方今日已消费:调用 platform.deepseek.com 用量接口,显示与官方 usage 页面一致的「今日已消费」(需平台 token)
  • 🧮 会话用量:读 sessionProjectionstokenUsage 投影,按官方价格折算花费(输入/缓存读/缓存写/输出分桶);已落盘消息按各自发生时的峰谷档计价,进行中增量按当前档计价
  • 📊 历史趋势(双 Tab 面板):「当前」Tab 看余额 + 今日已消费 + 实时花费;「历史」Tab 看近 7 天花费柱状图 + 本会话每条提问的花费明细
  • 峰谷定价:北京 9:00-12:00 / 14:00-18:00 高峰价自动切换;官方定价页每 6h 自动抓取
  • 🌗 主题适配:面板颜色与柱状图深浅随 DSH 浅色/深色主题切换(--dsw-alias-* token)
  • 🖥️ 多屏适配:外接大屏/笔记本切换时自动把桌宠夹回视口内

数据来源

数据来源需要的凭证
余额(总/赠送/充值)官方 GET https://api.deepseek.com/user/balanceDEEPSEEK_API_KEY
今日已消费(官方)platform.deepseek.com/api/v0/usage/costDEEPSEEK_PLATFORM_TOKEN
会话用量/花费本机 sessionProjections + 官方价格无(本地记账)
近 7 天花费本机会话日志回放 + 官方价格

> 「今日已消费」需要平台会话 token:登录 https://platform.deepseek.com 后,在 DevTools Console 执行 JSON.parse(localStorage.getItem('userToken')).value,把得到的值写入凭证 DEEPSEEK_PLATFORM_TOKEN~/.dsh/.credentials.yaml 或启动环境)。未配置时该项显示「需配置平台 token」,其余功能不受影响。

安装

需要 Node.jspnpm,并已安装 dshnpm i -g @deepseek-ai/dsh)。

方式一:一条命令(推荐)

dsh plugin --profile web add github:liuherong808-dev/dsh-whale-purse

该包声明了 dsh.bundledsh plugin 会自动把它加进 profile 的 bundle 层。然后重启 dsh web 并刷新页面。

方式二:手动安装

1. 把本仓库软链/复制进 web profile 依赖:

``sh ln -s "$(pwd)" ~/.dsh/profiles/web/node_modules/whale-purse ``

2. 在 ~/.dsh/profiles/web/cordis.patch.yml 里加一条 insert:

``yaml - insert: - id: whale-purse name: 'whale-purse' config: model: pro refreshIntervalSeconds: 30 ``

3. 重启 dsh web 并刷新浏览器。

配置

字段默认说明
modelpro计价模型:pro / flash
refreshIntervalSeconds30余额轮询间隔(秒)
apiKeyEnvDEEPSEEK_API_KEYAPI key 的凭据引用名
baseUrlhttps://api.deepseek.com余额接口 base URL
pricingRefreshHours6官方定价页抓取间隔(小时)
enabledtrue是否启用余额查询

余额接口需要能解析到 DEEPSEEK_API_KEY(凭据缝 → 启动环境 → process.env 逐层回退)。

项目结构

whale-purse/
├── lib/
│   ├── index.js        # host 端:余额 + 今日消费 + 会话用量 + HTTP 路由
│   └── client.js       # 浏览器端:鲸鱼娘桌宠 + 双 Tab 面板(立绘 base64 内联)
├── assets/             # 鲸鱼娘立绘源图与预览
├── cordis.patch.yml    # dsh.bundle 补丁层
├── package.json
└── LICENSE

致谢与衍生说明

本项目是 Suiwan/whale-purse(MIT,© 2026 Zijian Li)的衍生版本,在此基础上新增了官方「今日已消费」(平台用量接口)能力。

鲸鱼娘立绘素材来自 1190fasheqi/dafeiyu-pet(「鲸鱼娘·大肥鱼」)。

License

[MIT](LICENSE)