rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:weiiiiis/dsh-cost-plugins
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
Two client plugins for DeepSeek Harness that put the money where you can actually see it: your account balance in the sidebar, and what each answer really cost.
Agentic sessions burn tokens quietly. A long coding turn can cost a hundred times a short chat turn, and nothing in the UI tells you which is which — until the balance is gone. These two plugins fix that.
| Plugin | What it does |
|---|---|
dsh-balance-badge |
Always-visible DeepSeek account balance (topped-up + granted) at the foot of the sidebar; click to refresh |
dsh-turn-cost |
Per-answer cost: footer amount with cost tiers, cache-hit warnings, per-step breakdown, session/today totals, a daily budget, a "so expensive" danmaku barrage, and a spend-history panel |
They are independent — install either one.
dsh-turn-cost adds an amount to each answer's footer, right next to Harness's own turn-usage pill:
… answer …
Cost ¥1.02 [ turn usage 51.9K tok ] 14:32
Hover for the full breakdown: the four token buckets, input vs output money, the actual model and price tier, where this turn sits against the session median, the cache hit rate, and cost by step, dearest first (Step 2 ¥0.0520 · read).
Below the composer, on its own line and one step smaller than Harness's stats row:
This session ¥3.40 (6 turns) · Today ¥3.40 · Last 7 days ¥12.40 · cache hit 99.7%
· context 243.0k · next turn est. ¥0.14~1.02 · about 35 turns left
Cross ¥1 in a single turn and a full-screen danmaku barrage flies across the window — more expensive turns get more of it, a new personal record gets its own copy, and a 30-second cooldown keeps it from becoming wallpaper.
The sidebar also gains a bar-chart icon that opens a spend-history page: by day and by session, with CSV export.
deepseek-flash rates).aria-label.0.2.0-rc.2)The plugins install into a DSH profile as link: dependencies, so clone somewhere you won't move it afterwards:
git clone https://github.com/weiiiiis/dsh-cost-plugins.git "$env:USERPROFILE\dsh-cost-plugins"
Then add them one at a time (<repo> is the absolute path you just cloned into):
dsh plugin --profile desktop add "<repo>\packages\dsh-turn-cost"
dsh plugin --profile desktop add "<repo>\packages\dsh-balance-badge"
Let Harness recompose afterwards: restart the app, or toggle each plugin once on the in-app Plugins page. A running app usually picks the change up on its own within seconds.
Remove:
dsh plugin --profile desktop remove dsh-turn-cost
dsh plugin --profile desktop remove dsh-balance-badge
The
desktopprofile is owned exclusively by the desktop application, so you must use thedshlauncher that the desktop install provides — an npm-installed CLI refuses to touch that profile. And because the install is a symlink, do not move the repo directory once installed.
packages/
dsh-balance-badge/ sidebar balance badge
package.json declares dsh.bundle (a patch layer) and dsh.client (a browser half)
cordis.patch.yml inserts one row into the Host Loader
lib/index.js host half: empty apply, it only exists so the browser module system finds the package
lib/client.js browser half: the actual UI (hand-written, not a build artifact)
tests/ unit tests against a stub React
dsh-turn-cost/ per-answer cost
(same shape, plus a pricing-model test suite)
docs/ reference notes on the DSH plugin and slot systems
No dependencies to install — run them with plain Node (18+):
node packages/dsh-turn-cost/tests/pricing.test.mjs
node packages/dsh-turn-cost/tests/client.test.mjs
node packages/dsh-balance-badge/tests/client.test.mjs
The three files cover price arithmetic, the full dsh-turn-cost client (126 checks) and the dsh-balance-badge rendering (19 checks). CI runs the same three on every push.
A DSH plugin is an ordinary npm package that:
dsh.bundle.patch and a browser half with dsh.client.platform: "web";apply(ctx) / inject from the browser half.The UI hangs off slots that Harness already declares. These plugins use:
| Slot | Used for |
|---|---|
sidebar.footer.action |
the balance badge |
conversation.chat.assistant-actions |
the per-answer cost pill |
conversation.composer.dock |
the summary line under the composer |
shell.overlay |
the full-screen danmaku layer |
main + sidebar.panellist |
the spend-history page and its sidebar icon |
Everything is derived from data the client already has — no extra network requests except the balance read. Cost is folded from the usage the model reports in the turn's session events; the balance comes from Harness's own ctx.remote.account.getBalance().
PRICING constant at the top of each plugin's lib/client.js — edit it when they change.0.2.0-rc.2.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。