deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
Cross-session token usage statistics for DeepSeek Harness: a Settings panel with a monthly stacked cost chart broken down by provider and model (USD), month navigation, provider/model filters, and a per-model legend.
Built as a standalone bundle (the harness's installable plugin format) — no changes to the core repository needed.
</> month navigation, provider and model filters, gridlines with fixed two-decimal USD ticks, and a color-coded legend.deepseek / deepseek-v4-flash row), everything else falls back to the default table. Prices are fixed constants in this version; adjust DEFAULT_PRICES / DEFAULT_PRICE_TABLES in src/client/usage-aggregate.ts and rebuild if you need different rates.The bundle has two halves:
src/host/) — registers two session projection units, modelUsage (per provider/model session totals) and modelDailyUsage (per provider/model/UTC-day cells), following the @deepseek-ai/dsh-token-meter pattern. Registration is idempotent against deployments that already ship the same units (the registry shares same-stateVersion keys), so it is safe on both release builds and source checkouts that already carry them.src/client/) — a settings.section contribution (Token 用量) that reads the session.list projection column (zero log loads) and renders the panel. Day cells are shifted from UTC to your local days for display.Prerequisite: a DeepSeek Harness installation (the dsh CLI or a source checkout).
dsh plugin --profile <name> add dsh-token-stats
dsh --profile <name> web
git clone https://github.com/qiushui0901/dsh-token-stats.git
cd dsh-token-stats
npm install && npm run build
dsh plugin --profile <name> add ./dsh-token-stats
dsh --profile <name> web
pnpm dsh web --patch /path/to/dsh-token-stats/cordis.patch.yml
(with dsh-token-stats linked into the checkout's node_modules, or installed into the profile the checkout boots.)
Open http://127.0.0.1:3080 → Settings → Token 用量.
npm install
npm run build
Produces lib/host.js (self-contained Node entry) and lib/client.js (browser closure-factory bundle registered via window.__ModuleLoader__.load).
modelUsage/modelDailyUsage projections existed stay unattributed until their projection cache rows rewrite; their usage is priced at the default table.MIT — see LICENSE. Built on the DeepSeek Harness plugin system (MIT), which this project gratefully builds upon.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。