rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:xiaobaijunya/dsh-cost-meter
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Estimated CNY API cost for a DeepSeek Harness conversation, with per-model and peak/off-peak pricing and a separate subagent breakdown.
A display-only DSH plugin that turns the harness's token counters into estimated money:
51M tok · ¥2.20 for the whole session. Opening it shows the token buckets, the current billing period, the session cost, and per-model costs with their off-peak/peak rates.· ¥0.0274 appended, and the shipped per-turn usage dialog gains turn cost, session total and billing period rows.Amounts are estimates from the official price list and the timestamps of recorded model calls — they are not a bill. The plugin makes no model calls and writes no session data.
ctx.slots, ctx.sessionProjections, ctx.webServer, dsh.client module table).DSH Desktop / Web with the plugin market installed — once this repository is listed in the awesome-dsh-plugin market, search for dsh-cost-meter there.
Plain dsh web (CLI):
dsh plugin --profile <profile> add github:xiaobaijunya/dsh-cost-meter
Release tarball (no build step):
dsh plugin --profile <profile> add https://github.com/xiaobaijunya/dsh-cost-meter/releases/download/v0.2.0/dsh-cost-meter-0.2.0.tgz
Manual profile patch (any deployment): append one insert row to the profile's cordis.patch.yml pointing at this repository's lib/index.js; DSH's HMR applies it in a few seconds. See tools/INSTALL.md for the exact block, verification and rollback.
The official DSH Desktop app manages its reserved
desktopprofile itself — install through the app's Plugins page rather than the CLI.
Source: https://api-docs.deepseek.com/zh-cn/quick_start/pricing (2026-11 pricing).
| model | cache hit off-peak/peak | cache miss off-peak/peak | output off-peak/peak |
|---|---|---|---|
deepseek-flash (and deepseek-v4-flash, deepseek-v4-flash-vision-exp) |
0.02 / 0.04 | 1 / 2 | 4 / 8 |
deepseek-v4-pro |
0.15 / 0.30 | 4.5 / 9 | 13.5 / 27 |
CNY per million tokens. Unknown model names fall back to Flash pricing and are marked "estimated with Flash pricing". Cache-write tokens are priced as cache-miss input.
Billing windows are Beijing time: peak is Monday–Friday 09:00–12:00 and 14:00–18:00, excluding Chinese statutory holidays; all other time (weekends, holidays, nights) is off-peak. Weekend off-peak started 2026-08-23; the plugin keeps that cut-over for historical logs. The 2026 statutory holiday list is built in; 2027 dates need to be added to lib/pricing.js once the State Council publishes them.
Subagents (Agent Team members, delegated tasks) run in their own DSH Session. The plugin's host half reads the session logs under $DSH_HOME/sessions on demand, follows each log's parentSession header link to find descendants of the viewed session, folds each log with the same cost fold used for the main session, and serves the result through a localhost route (/dsh-cost-meter/subagents). The client refreshes it while the usage dialog is open (every 4 s). Logs are cached by mtime + size; nothing is written to the session directory.
node tests/host/run-all.mjs # pricing / projection / status / apply / subagents / optional real-log replay
node tests/client/harness.mjs # materializes client/client.js with a mock module loader and fake DOM
Layout: lib/ is the host plugin (projection, pricing, status probe, subagent aggregation); client/client.js is the hand-written browser bundle; tests/ holds the two test suites above.
$DSH_HOME/.dsh-cost-meter-status.json) and exposes two localhost routes used by its own UI.$DSH_HOME/sessions; archived or pruned sessions are not listed.MIT — see LICENSE.
一个只做展示的 DSH 插件:把 DeepSeek Harness 里的 token 统计换算成按官方价目与峰谷时段估算的人民币费用。
51M tok · ¥2.20;点开是「用量与费用」弹窗(token 分桶、当前计费时段、会话费用、按模型费用与谷/峰单价)。· ¥0.0274,原生「本轮用量」弹窗末尾追加本轮费用 / 会话累计 / 计费时段三行。金额是按官方价目表与已记录调用时间估算的,不是账单;插件不发起模型请求,也不写会话数据。
已装插件市场的 DSH 桌面端 / Web:本仓库被 awesome-dsh-plugin 收录后,在市场里搜索 dsh-cost-meter 一键安装。
普通 dsh web(CLI):
dsh plugin --profile <profile> add github:xiaobaijunya/dsh-cost-meter
Release tarball(无需构建):
dsh plugin --profile <profile> add https://github.com/xiaobaijunya/dsh-cost-meter/releases/download/v0.2.0/dsh-cost-meter-0.2.0.tgz
手动 profile patch(任意部署):在 profile 的 cordis.patch.yml 追加一个 insert 条目指向本仓库 lib/index.js,DSH 的 HMR 会在数秒内热加载。完整步骤、验收与回滚见 tools/INSTALL.md。
官方 DSH 桌面端自己管理保留的
desktopprofile,请在应用内 Plugins 页安装,不要用 CLI 改桌面 profile。
来源:https://api-docs.deepseek.com/zh-cn/quick_start/pricing(2026-11 现行价)。
| 模型 | 缓存命中(谷/峰) | 未缓存输入(谷/峰) | 输出(谷/峰) |
|---|---|---|---|
deepseek-flash(含 deepseek-v4-flash、deepseek-v4-flash-vision-exp) |
0.02 / 0.04 | 1 / 2 | 4 / 8 |
deepseek-v4-pro |
0.15 / 0.30 | 4.5 / 9 | 13.5 / 27 |
单位:元 / 百万 token。未知模型名回落到 Flash 价目并标注「按 Flash 价估算」;缓存写入 token 按未命中输入价计。
峰谷按北京时间:工作日(不含中国法定节假日)9:00–12:00、14:00–18:00 为高峰,其余时段为谷价。2026-08-23 起周末全天谷价(插件对历史日志保留该分界);内置 2026 年法定节假日表,2027 年安排公布后需补到 lib/pricing.js。
子智能体(Agent Team 成员 / 委派任务)跑在各自独立的 Session 里。插件的 Host 侧在弹窗需要时扫描 $DSH_HOME/sessions 下的会话日志,按每个日志 header 的 parentSession 关系找出当前会话的全部后代,用与主会话相同的费用 fold 计算每个子会话的金额,通过本机路由 /dsh-cost-meter/subagents 提供给前端;弹窗打开期间每 4 秒刷新一次。日志按 mtime + size 缓存,不写会话目录。
node tests/host/run-all.mjs # 价目 / 投影 / 状态 / 注册 / 子智能体 / 可选的真实日志回放
node tests/client/harness.mjs # 用 mock 模块表与假 DOM 物化 client/client.js
$DSH_HOME/.dsh-cost-meter-status.json),并注册两条供自身 UI 使用的 localhost 路由。$DSH_HOME/sessions 时出现,归档/清理掉的会话不会列出。MIT,见 LICENSE。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。