lovedheart/dsh-plugin-token-usage
lovedheart★ 1JavaScript最后同步: 2026-08-20
DSH plugin for cross-session token usage statistics (/usage command + Web GUI Token 用量 panel)
README 摘要
dsh-plugin-token-usage QwenPaw-style cross-session token usage statistics for DSH. The plugin aggregates the provider-reported token usage of every model call across all persisted sessions (including subagent sessions) into (date, provider, model) buckets and serves them through a single /usage command. - Zero runtime dependencies — only the Cordis ctx API and Node 22's built-in node:zlib (zstd) are used. - Durable source of truth — it reads the session logs under /.dsh/sessions , so it works on history that predates the plugin and needs no separate bookkeeping at write time. - No double counting — a committed assistant/message.usage wins; a step that never produced a message (failure) falls back to its last streaming usage chunk, flushed at turn/end . A persisted per-file watermark ( {hiSeq, framesIngested} ) makes the incremental scan idempotent across restarts and crash-recovery re-encodes. Command Example output: Token units: 1.2M for = 1,000,000 (million), 1.5B for = 1,000,000,000 (billion), plain integer below (one decimal, trailing .0 dropped). Config key default description defaultDays 30 lookback window for a bare /usage . backfillIntervalSec 30 seconds between incremental…
在 GitHub 查看完整 README →分类
DeepSeek Harness: Everything is a Plugin.
★ 182,325
amruthpillai/reactive-resumeA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
★ 41,477
anywhere-labs/deepseek-harness-desktop为 DeepSeek Harness (DSH) 插件生态打造的现代化桌面端解决方案。万物皆「插件」,桌面本身也是「插件」。
★ 17,784