rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:zhuzhubondbond/dsh-token-cost-report
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
Per-day, per-model token usage and spend for DeepSeek Harness:
Requires DSH ≥ 0.2.2-rc.1 (Web GUI; both the desktop app and dsh web work).
dsh-token-cost-report;.tgz bundle (for example D:\path\to\dsh-token-cost-report-0.2.1.tgz);git+https://github.com/zhuzhubondbond/dsh-token-cost-report.git.# pnpm is bundled with the desktop app
dsh plugin --profile desktop install dsh-token-cost-report
# local tarball: dsh plugin --profile desktop install D:\path\to\dsh-token-cost-report-0.2.1.tgz
# <profile dir>/cordis.patch.yml
- insert:
- id: token-usage
name: 'D:/path/to/dsh-token-cost-report/lib/index.js'
Note: a package may have only one active source. Do not mount it through a patch and also install the bundle — DSH refuses duplicate loader sources at startup.
Add this index URL in DSH: Plugins → experimental "custom plugin index" → Discover → add index source:
https://zhuzhubondbond.github.io/dsh-token-cost-report/index.json
The DSH kernel reports tokens but no monetary price, so this plugin estimates cost from a price table.
$DSH_HOME/token-usage-prices.json
(on Windows usually C:\Users\<you>\.dsh\token-usage-prices.json);pricesFile at any path from your own profile patch.Format (per 1,000,000 tokens; currency is given by currency):
{
"currency": "CNY",
"offPeakSchedule": {
"timeZone": "Asia/Shanghai",
"peakDays": [1, 2, 3, 4, 5],
"peakWindows": [["09:00", "12:00"], ["14:00", "18:00"]]
},
"providers": {
"volcengine": {
"models": {
"deepseek-v4-1-flash-261017": {
"input": 2.0, "output": 8.0, "cacheRead": 0.04,
"offPeak": { "input": 1.0, "output": 4.0, "cacheRead": 0.02 }
}
}
}
}
}
input = uncached input, output = output, cacheRead = cache hits, cacheWrite = cache writes;
omitted cacheRead / cacheWrite fall back to input;input or output set to null are skipped for pricing ("unpriced", never counted as 0);offPeak and when offPeakSchedule is configured;prices.json is a sample (Volcengine Ark prices as of 2026-11-09) — verify against your own account and copy it into the user file.Values take effect on the next refresh (the host re-reads the price file on every recompute, no restart needed).
ctx.sessionQuery (listSessions + readSession); no network, no model calls.assistant/message.data.usage; assistant/attempt (failed/retried attempts) is counted too. Later samples for the same (turn, step) replace earlier ones and llm/retry-started closes the slot — consistent with the kernel tokenUsage projection, so retries are not double-billed.request/header provider/model, bucketed by local calendar day in the browser timezone.parentSession points at the root. Built-in statistics do not merge them; this plugin merges them in the chip and in the per-conversation table so multi-agent conversations are not undercounted.prices.json; models without a configured price only count tokens.dsh.client.platform = "web").node bin/report.mjs # Markdown table
node bin/report.mjs --json # JSON
node bin/report.mjs --since 2026-11-01 # start date
node bin/report.mjs --until 2026-11-30 # end date
node bin/report.mjs --prices ./my.json # explicit price table
.tgz; the price file lives under $DSH_HOME and survives upgrades.token-usage row from the profile patch. Keep or delete the user price file as you like.See PUBLISHING.md for package layout, renaming constraints, packaging/publishing steps and local verification, and GITHUB_SETUP.md for the repository, dsh-plugin topic, release and market-index steps.
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。