rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:divineeagleblackhand/dsh-cost-receipt
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
A DeepSeek Harness (dsh) plugin that adds one line under every reply telling you what that exchange cost, plus the account balance. Hover for a pie chart of the cost breakdown, drawn by cost share.
This exchange ¥0.165824 Account balance ¥6.2164 Bonus balance ¥1.5366
account balance counts top-up funds only, bonus balance gets its own line, and only their sum is the wallet total. The second line disappears when there is no bonus. Balances appear only on the newest turn of a conversation, because showing historical balances would be meaningless.unpriced model xxx, mixed models (a + b), usage without a model. Applying another model's unit price would be off by several times and invisible.HH:MM:SS is when the balance last changed — a still timestamp means the number has not moved. Hovering also shows the last query time, so comparing the two tells you whether the reading is stale or the balance genuinely did not change.From npm (recommended: shorter name, and you can pin a version):
dsh plugin --profile desktop add dsh-cost-receipt
Or straight from the GitHub repository:
dsh plugin --profile desktop add https://github.com/divineeagleblackhand/dsh-cost-receipt
You can also paste either address into "Add plugin" on the dsh plugin page (on desktop the profile is named desktop).
Refresh the page after installing. If the badge does not appear, fully quit and restart the desktop app.
If GitHub is hard to reach, use the npm command, or clone the repository and install from its absolute path.
client.js / index.js contain no fetch, XMLHttpRequest or WebSocket calls — you can check line by line.account/getBalance (the same path as your account settings page), which means one account query every 30 seconds, dropping to every 3 minutes while the page is hidden. That is its only outward-facing action, and it goes through dsh's own account feature; the account token never leaves the host.
tools/fetch-holidays.mjsin the repository is a maintenance script that refreshes the built-in holiday table. It needs the network (a third-party holiday API by default, or the URL of the State Council notice for cross-checking), is run manually once a year by the maintainer, and is not shipped in the npm package (thefileswhitelist only carries what the plugin needs at runtime).
| Item | Basis |
|---|---|
| One exchange | one user message → the final reply |
| Calculation | cached input / uncached input / cache write / output are priced separately. Cache write is billed as uncached input (there is no separate cache-write price) |
| Unit prices | per million tokens, per currency and per model: CNY and USD each have their own official list, priced independently — nothing is converted |
| Time window | peak = Beijing time Monday–Friday 09:00–12:00 and 14:00–18:00, excluding statutory holidays; everything else is off-peak. Evaluation is independent of your system time zone |
| Holidays | the State Council's 2026 schedule is built in (19 days). Years outside the table fall back to "no correction" — it does not give a wrong answer, it just stops correcting |
| Currency | CNY and USD accounts. The wallet's currency picks the price list and amounts are shown in that currency; a mixed or any other currency shows no amounts at all, just a notice that only CNY and USD are supported |
| Search and fetch | outside the table above. web_search retrieves on the server side (a separate model request), and those tokens never reach this session's usage; the Search/Fetch APIs also bill per request (¥0.005 / $0.00075 each from 2026-11-01). Text returned by web_fetch is included |
Known margins:
web_search consumes tokens in another model request, which the host does not report and the plugin cannot see; the per-request Search/Fetch fee is likewise out of reach. The amount on the panel is therefore a lower bound — it under-reports, never over-reports. Text returned by web_fetch is counted normally.npm test
The test script slices the real pricing code out of client.js and runs it rather than copying it — so "what is tested" and "what runs" cannot drift apart. Coverage: peak/off-peak boundaries, holidays, the three-way breakdown reconciliation, ring and badge reading the same numbers, session totals, panel structure, amount formatting tiers, currency detection, the search-fee exclusion notice, and zh/en dictionary parity.
PRICES at the top of client.jsnode tools/fetch-holidays.mjs <year> (optionally pass the State Council notice URL for cross-checking)MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。