y2zyyr/dsh-token-usage-sidebar
DeepSeek Harness 的持久化今日/昨日/总计令牌使用量侧边栏。
catalog 简介:Persistent Today / Yesterday / Total token usage sidebar for DeepSeek Harness.
安装
This is a community plugin, not an official DeepSeek plugin.
## Features
- Sidebar summary: Today, Yesterday, and lifetime Total.
- Native **Settings → Token Usage** page, placed after Agent Presets and before Plugin Market.
- Four overview cards: All time, Today, Yesterday, and Last 7 days.
- Detail range selector: Today, Yesterday, 7D, and All time.
- Per-range totals for Input, Output, Cache Read, Cache Write, Reasoning, and call count.
- Provider/model table, sorted by Total, plus a seven-local-day table that retains zero-value days.
- Persistent local accounting that survives DSH restarts.
- **Scalable durable ledger (v1.1).** The lifetime accounting store is backed by a
plugin-owned SQLite database (Node's built-in `node:sqlite`, WAL journal) instead
of a monolithic JSON root. A new invocation is one small row-level upsert, so write
latency stays effectively flat no matter how many historical records accumulate.
- **Automatic verified migration (v1.1).** Existing v1.0.1 totals are migrated into the
new ledger automatically, verified for exact equivalence (lifetime total, record
count, per-day and provider/model), and only then cut over. No totals are lost or
double-counted, and a backup of the v1 ledger is made before cutover.
- Shutdown-safe persistence: dirty usage is flushed before the store closes, so
a usage event followed by a quick DSH restart is not lost.
- Historical recovery from available authoritative session usage records, with
honest scan/coverage reporting (a partial or failed scan never claims complete
lifetime coverage).
- Replay-safe, deduplicated accounting: an invocation is counted once.
- Native placement in the DSH web sidebar.

## Installation
Recommended package: `@y2zyyr/dsh-token-usage-sidebar` (published on the npm registry).
### Recommended — DeepSeek Harness
Install the plugin into the DSH `web` profile, then restart DSH:
把 y2zyyr/dsh-token-usage-sidebar 加入你的 DSH 配置(web profile)即可启用。
README
展开完整 README 收起
README 内容为空。
tt-a1i/archify
zhu1090093659/dsh-web-ui
strukto-ai/mirage
liustack/modlens
omdsh-dev/DSH-better-sidebar
ccch1mneyyy/dsh-TUI
agentrq/agentrq
GanyuanRan/Aegis