DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Usage Panel — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-usage-panel

Usage Panel

DeepSeek Harness 消耗统计插件:设置页「消耗统计」展示 Token 用量 KPI、半年活跃贡献热力图、按模型堆叠柱状图与模型环形图(Host 投影聚合 + 只读重算会话日志,永不写回)

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:AlfredChaos/dsh-usage-panel#e9ec3b68c79314a88a998e92500c35bb7d2a672a
README兼容性版本

兼容性与来源证明

Usage Panel 以 dsh-usage-panel 发布,当前版本为 0.2.3。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
github
Registry 更新时间
2026/9/20

版本

0.2.3stable
2026/9/15
0.2.0stable
2026/8/18
0.1.0stable
2026/8/15

相关插件

正在加载相关插件…

最新版
0.2.3
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
web
许可证
MIT
发布源
github
GitHub
★ 6
周下载
146
最近提交
2026/9/15
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Usage@linxin666/dsh-usagedsh Web GUI 的使用统计插件:检测各提供商余额和编码计划配额,并提供实时令牌使用记录,以及当前提供商的专属宠物气泡Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。

README

dsh-usage-panel

Token usage statistics for DeepSeek Harness, shown as a page under Settings → Usage in the web GUI. The plugin aggregates persisted session logs (incrementally, via the session-projection mechanism) and never writes anything back.

简体中文 ·

dsh-usage-panel v0.2 demo: loading, KPI count-up, heatmap entrance wipe, hover tooltips and range switching

What it shows

  • Cumulative totals (all time) — billed input / output tokens, main-session count (delegationDepth === 0, matching the visible session list exactly: zero-usage sessions count, archived ones do not; with the grand total of session records and the main/subagent usage split beneath it), and the most-used model with its share.
  • Cache hit rate — cache read ÷ (uncached input + cache read + cache write), with the read/write magnitudes.
  • Activity heatmap — the last six months in a GitHub-contribution layout (weeks as columns, weekdays as rows). Days are colored by quartile over non-zero usage.
  • Daily stacked bars — per-model token usage, switchable between the last 7, 14, or 30 days.
  • Top sessions — the 10 most token-hungry sessions with their folded titles, each tagged main or subagent by delegation depth.
  • Providers — per-provider token totals as horizontal bars (shown when more than one provider route is in use).
  • Model donut — all-time share per model, with the top 5 listed beside it; each row carries a per-model cache hit rate column, color-coded to its segment.
  • Export — full JSON, daily CSV and per-model CSV (formula-injection guarded, RFC 4180, UTF-8 BOM).

Hovering a bar, heatmap cell, or donut segment shows the exact breakdown:

Bar tooltipOverview (KPI + heatmap)Sessions & providers
Bar hover tooltipKPI cards and heatmap overviewSession ranking and provider breakdown

Install

The plugin ships as a bundle: dsh plugin add appends it to the profile's bundle list, and the patch row activates the host half.

# from npm (recommended)
dsh plugin --profile web add dsh-usage-panel

# or from GitHub
dsh plugin --profile web add github:AlfredChaos/dsh-usage-panel

# or from a local checkout
dsh plugin --profile web add ./dsh-usage-panel

Restart dsh --profile web and open Settings → Usage. The npm package ships prebuilt JavaScript under lib/ with no install scripts; GitHub installs need no pnpm build allowance either, because the same files are committed to the repository. To remove it:

dsh plugin --profile web remove dsh-usage-panel

Where the numbers come from

The host half aggregates persisted session logs:

  • Primary path (incremental): a session projection (registered through ctx.sessionProjections, stateVersion-checked) folds every committed event into four disjoint buckets — uncached input, output, cache read, cache write — plus per-model, per-provider and per-day (UTC) maps. Checkpoints are durable, so restarts and keep-warm passes cost almost no replay.
  • Fallback path (full rescan): when the projection services are unavailable, the same reducer replays every session log through the read-only sessionQuery service.

Accounting rules: request/header and request/context events record the model (context base, header override); the step's assistant/message usage replaces streamed provisional usage (a retried same-step message never double-counts); llm/retry events are counted as retries, not tokens; compaction/summary usage is attributed to its own model and reported separately; reasoning tokens are already inside output and are never added again.

Fork dedup: events inside the durable seed prefix (inheritedEventCount) are never counted, so forked sessions do not double-bill their parents' usage. session/end-seed markers only delimit resume/fork accounting epochs — resumed sessions keep every window of their own usage.

Timezone declaration: day buckets and exports use UTC calendar days (YYYY-MM-DD); the heatmap subtitle declares the scope ("last 6 months · UTC").

Because nothing is written back, statistics survive restarts and cover sessions from before the plugin was installed.

Loading behavior

The first scan starts as soon as the plugin loads, so the page usually renders straight from cache. A payload is considered fresh for 10 minutes; older ones are returned immediately with a stale flag (the page shows "updating in background") while a rescan refreshes the cache. A keep-warm timer rescans every 10 minutes, and the refresh button always forces a synchronous scan. The browser additionally keeps the last successful payload in localStorage (versioned and structure-validated), so a page refresh renders instantly; a failed refresh keeps the cached numbers and says so instead of faking freshness.

Units

zh interface: 亿 (10⁸) and 万 (10⁴); en interface: K / M / B.

Implementation

Source is TypeScript (strict) in src/, built with esbuild; the lib/ outputs are committed so installs need no build step.

FileRole
src/host/index.ts → lib/index.jsHost half (Cordis plugin): projection registration, aggregation, cached RPC with warm-up, fail-soft fallback
src/host/projection.tsPure per-session projection reducer (four buckets, fork dedup, retry/compaction semantics, UTC days)
src/host/aggregate.tsCross-session merge → overview payload
src/client/* → lib/client.jsClient half (./client export, __ModuleLoader__ bundle): settings-page UI in TSX, --dsw-* tokens, zh/en i18n
src/shared/contract.tsHost↔client wire contract (single source of truth)
cordis.patch.ymlBundle patch: inserts the usage-stats row into the profile composition

The host serves an overview endpoint as an exact-path route on the shared /api transport (ctx.connection.fetch.register('/api/usage-stats/overview', …) — the connection plugin's route applies the Host/Origin fence and browser auth); the browser calls it via rpc.call('/api', 'usage-stats/overview', …). The overview carries coverage (session-record totals and the main/subagent usage split, shown beneath the sessions KPI), topSessions, providers, plus the v0.1.0-shaped days / totals / byModel / allTime. Developed against DeepSeek Harness 0.1.5-rc.1. Tests run on the Node built-in test runner (npm test); CI runs typecheck + build + test + the pack gate.

License

MIT