DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

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

dsh-token-usage-counter

Token Usage Counter

DeepSeek Harness 的独立令牌使用统计。

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

npx -y @deepseek-ai/dsh plugin --profile web add dsh-token-usage-counter@0.4.3
README兼容性版本

兼容性与来源证明

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

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

版本

0.4.3stable
2026/9/15
0.4.2stable
2026/9/15
0.4.1stable
2026/9/9
查看其余 8 个版本收起版本
0.4.0stable
2026/9/2
0.3.1stable
2026/8/25
0.3.0stable
2026/8/25
0.2.2stable
2026/8/25
0.2.1stable
2026/8/21
0.2.0stable
2026/8/19
0.1.1stable
2026/8/16
0.1.0stable
2026/8/16

相关插件

正在加载相关插件…

最新版
0.4.3
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
295.8 kB
文件数
12
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 1
周下载
196
安全扫描
✓ v0.4.3 扫描通过
最近提交
2026/9/15
查看源码 ↗项目主页 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

README

Token Usage Counter for DeepSeek Harness

Persistent provider-reported token usage statistics for DeepSeek Harness. The plugin keeps uncached input, cache read, cache write, and output usage in separate buckets, and exposes cumulative, daily, per-session, and per-model views.

Features

CapabilityDescription
Accurate bucketsKeeps the four provider-reported usage buckets separate.
Persistent totalsStores data in the plugin-owned dsh-token-usage-counter settings namespace.
Multiple viewsProvides global, session, and provider/model summaries.
Daily activityTracks local-day token totals and call counts.
Built-in settings pageShips its own Web settings view and heatmap.
Safe commitsCounts usage only after a successful completion anchor.
Interactive commandRegisters /tokens when the commands service is mounted.

Install

Install the published DSH Bundle into the web profile:

dsh plugin --profile web add -w dsh-token-usage-counter
dsh web

The Bundle is additive: it mounts only the plugin-owned token-usage-counter entry and leaves the built-in usage accumulator and page enabled.

Version 0.4.0 moves persistence from the shared usage-stats namespace to the plugin-owned dsh-token-usage-counter namespace. Existing 0.3.x totals are not silently migrated because the shared namespace belongs to the built-in plugin; the new counter starts with an independent snapshot after the upgrade.

Local development

From this checkout:

dsh web --patch ./cordis.yml

The local overlay mounts src/index.ts without replacing built-in components. For a manual composition, add only the plugin-owned entry:

- insert:
    - id: token-usage-counter
      name: './src/index.ts'

Compatibility

  • Node.js: 22.13.0 or newer.
  • DSH: 0.1.2-alpha.3–0.1.2-alpha.5, 0.1.5-alpha.2, and 0.1.6-alpha.1 have profile or UI checks; intervening releases are explicitly unknown.
  • Profile: web.
  • Exact per-release results and disposable-profile evidence are recorded in docs/VERIFICATION.md.

Store listing migration details: docs/STORE-REMEDIATION.md.

Build

npm install --ignore-scripts --legacy-peer-deps --no-package-lock
npm run build
npm run verify

The generated host and client bundles are committed under lib.

Counting rules

The plugin listens to the durable session event stream:

  • assistant/message.usage is counted once.
  • compaction/summary.usage is counted as one provider call.
  • A usage-only assistant/chunk is held until its matching assistant/message.
  • When a chunk and final message describe the same turn and step, the final value replaces the early sample.
  • Failed requests, retries, and fork seed history are not counted twice.

API

The plugin provides ctx.tokenUsageCounter:

ctx.tokenUsageCounter.getSummary()
ctx.tokenUsageCounter.getSession(sessionId)
ctx.tokenUsageCounter.getModel(provider, model)
ctx.tokenUsageCounter.formatSummary()

Links

  • npm: https://www.npmjs.com/package/dsh-token-usage-counter
  • GitHub: https://github.com/Mu-scorpio/token-usage-counter
  • DSH Bundle documentation: https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md

License

MIT

相关插件

继续浏览 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 模型。