dsh-damage-pulse README

The project's README from github.com/wssfk12138/dsh-damage-pulse. As one markdown file: README.md.

English | 简体中文

dsh-damage-pulse

dsh-damage-pulse 实时用量、鲸鱼娘、提醒规则、微信通知与安全更新功能总览

LINUX DO 社区认可 Fastai 模型赞助商 微信 · 赞助本项目

为 DeepSeek Harness 提供用量、费用与余额监控:查看单次调用、会话累计和历史统计,让鲸鱼娘陪你观察每次 Token 消耗。

安装 · 功能介绍 · 常见问题 · 高级配置与接口 · 更新记录

感谢模型赞助商 Fastai 支持开发。赞助说明

安装

本仓库版本 4.3.8 修复插件市场对宿主工具包依赖的兼容性拦截。 文件锁与数据路径工具改为使用兼容宿主提供的共享包,安装时不再要求额外的 0.1.7-alpha.2 副本。4.3.7 已声明的宿主范围继续保留;具体版本见 package.json,变更与验证范围见 4.3.8 版本说明。

桌面版「插件」页可添加 dsh-damage-pulse。也可以从 npm 安装,或从 GitHub Releases 下载对应版本的完整 .tgz。

dsh plugin --profile desktop add dsh-damage-pulse

将 desktop 换成实际使用的 profile 名。安装后完整退出桌面程序(含托盘)再启动,在悬浮卡右键的「卸载与更新」核对版本。

旧版宿主兼容说明

保留 0.1.0-rc.5、0.1.1-rc.2、Desktop 2.0.4(0.1.2-alpha.1)、0.1.5-alpha.2 等旧版兼容段,精确范围见 package.json。各版本的桌面验收范围见对应版本说明。

标准包自带会话金额:使用 conversation.session.header.actions,并按宿主能力挂接 sidebar.workspaces.sessionRow.trailing 或新版 sidebar.session.row.trailing。旧客户端使用严格 fail-closed 的兼容桥,只有唯一匹配原生会话行时才显示,检测到已有金额或正式席位即停用,避免重复。

旧宿主沿用自身 lock 与依赖,不混装不同预发行版本。更多恢复与源码部署说明见参考文档。

功能介绍

本轮 rc.5 桌面截图使用合成示例数据;Plan 额度与部分 Token 概览使用接口替身展示,不代表真实供应商查询结果。

余额悬浮卡与鲸鱼娘

显示余额、本次输入/输出/缓存 Token、首字与总耗时,以及峰谷状态。余额每 60 秒校准;查询不可用时不显示金额,本地统计继续工作。支持拖动、键盘移动和位置记忆,右键进入各功能面板。

鲸鱼娘会待机、眨眼,并对扣费、缓存未命中、余额耗尽和充值恢复作出反应;可以单独隐藏。动画默认按卡片宽度的 80% 显示,已有自定义比例保留。

带余额的悬浮卡与鲸鱼娘

查看无余额状态、右键菜单、工作区与角色细节

无余额时仍显示 Token 与耗时

悬浮卡右键功能菜单

桌面工作区中的悬浮卡

鲸鱼娘待机原画

鲸鱼娘扣费反馈原画

用量明细、历史统计与 Plan 额度

对话流显示单次用量,输入区显示会话累计;独立明细窗口支持拖动、缩放、时间/模型/项目/对话筛选、列选择及费用构成查询。统计概览提供今日、近 7 天、近 30 天与全部历史的消费、请求、Token 和缓存指标。

「Plan 额度」显示订阅的 5 小时/每周窗口、剩余额度和下次刷新时间;只有确认存在套餐时才出现,仅有 API key 不会显示空页签。

用量明细与筛选

查看统计概览、列设置、费用构成与 Plan 额度

历史用量八项统计指标

按供应商筛选统计

列设置菜单

单次费用构成与合计

费用浮层为便于阅读已展开完整内容,日常界面内可滚动查看。

Plan 额度与刷新时间

计费规则与供应商余额

按 provider + model 判断计费资格,未知模型不套用 Flash 价格;输入、缓存与输出分项计费,推理 Token 不重复叠加。历史保存在本地持久账本,重启后恢复,事件重放不会重复扣费。

可编辑固定价、峰谷价、阶梯与倍率,也可为第三方供应商配置余额查询脚本,显示金额、自定义文字或额度窗口。DeepSeek 默认高峰为北京时间工作日 09:00–12:00、14:00–18:00;周末(含调休上班)与法定节假日全天按谷价。内置价格按生效时间分段,具体价格以官方说明及已加载规则为准。

可视化计费规则

查看余额脚本与高级设置

供应商余额查询脚本

脚本返回格式、历史计价和动画比例配置见高级参考。

提醒与微信通知

可设置每日预算、峰谷切换和连续缓存命中异常提醒,通过鲸鱼娘气泡或 ClawBot 微信发送。预算提醒不会阻止或取消请求。业务通知默认关闭,测试消息可独立发送;设置面板提供扫码登录、连接状态、刷新、重连与断开操作。

提醒规则、通知渠道与微信连接

查看提醒规则与微信示例

预算、峰谷与缓存异常提醒

微信通知示例

模块管理与更新

桌宠、数据概览、通知、计费规则和微信渠道五个模块可独立卸载,状态在重启与升级后保留。默认保留配置和历史;取消保留选项会清除对应模块的数据。整体卸载会停止用量采集。

「卸载与更新」可检查 GitHub Release,并在校验版本、下载来源与 SHA-256 后安装。正常升级保留设置、账本和已卸载模块状态。

五个功能模块与安全更新

常见问题

接口、ClawBot 配置、旧版恢复及源码开发见高级参考。历史修复见 Releases。

社区与支持

欢迎在 LINUX DO 交流。感谢社区贡献者,包括 @gurio-wine(PR #17,桌面卡片位置与鲸鱼娘开关修复)。MIT 许可证。

模型赞助商

Fastai 支持本项目开发,提供多家模型服务。链接含邀请标记,符合条件的充值会为作者提供返利和 Token,用于持续维护。GPT 分组不能保证不降智,建议优先考虑其他分组。 插件安装和全部功能均不依赖中转服务或充值。

Fastai 账户使用记录

Fastai 调用记录

微信赞赏,支持项目开发

微信赞赏码

dsh-damage-pulse (wssfk12138/dsh-damage-pulse)

Searching Database…

What is this?dsh-damage-pulse is a monitoring plugin for DSH (DeepSeek Harness) that tracks DeepSeek API token usage, cost, and account balance, showing per-call billing, session totals and a global balance card, with a whale-girl mascot animating each charge event.
Is this a standalone app or a plugin for something else?It is a plugin that ships as a standard DSH Host + Client bundle and runs inside a DSH-compatible host (such as DSH Desktop), rather than being a separate application.
How do I install and activate it?Install the standard Host + Client package, which is compatible with DSH Desktop 2.0.4 and several older rc hosts; no manual source copying, tsconfig edits, --patch flags, or Client bundle rebuilds are needed, just restart the target Web profile after installing.
Do I need a DeepSeek API key to use it?Yes, you configure DEEPSEEKAPIKEY through DSH's own credentials file (~/.dsh/.credentials.yaml); if it's missing, the balance card just shows a guided empty state while token metering keeps working normally.
Does mixing old and new DSH host packages cause problems?Yes, pinning an rc.5/rc.6/rc.7 host package together with the current rc.8 upstream package in a freshly built npm dependency tree fails to resolve because of upstream peer-version drift; this doesn't mean the plugin is actually incompatible with those hosts.
Does this plugin depend on any third-party relay or billing service to work?No, installation, operation and every feature of the plugin work directly against your own DeepSeek account without needing any token relay or top-up channel; the sponsor mentioned in the README is unrelated to the plugin's core functionality.
What is the whale girl mascot?She sits on the balance card, idling and blinking while you wait, then reacts with different charge animations for normal billing, cache misses, continuous spending, balance exhaustion and top-up recovery.
How does peak/off-peak pricing work?Weekday 09:00-12:00 and 14:00-18:00 Beijing time count as peak pricing with higher rates, all other times and all weekend hours are off-peak; the status badge refreshes every 30 seconds, shown red for peak and green for off-peak.
Can I override the default pricing table?Yes, the built-in price table can be overridden via the priceTable field in the dsh-token-monitor settings namespace, letting you set custom prices and peak-hour windows; the plugin host needs restarting after a change.
What HTTP endpoints does the plugin expose?It exposes REST endpoints for account balance, usage history, usage summaries, charge/notification event streams, settings, WeChat login/status and update checks, e.g. GET /api/token-monitor/balance and GET /api/token-monitor/usage-summary.
Creator
wssfk12138
Size
70.2 MB
Stars
290
Age
3mo
Commits · 90 Days