DeepSeek Harness plugin

dsh-token-stats-attackot

Token 用量统计面板:左下角悬浮球 + 浅色极简仪表盘(时间范围分段、6 卡核心指标、活跃热力图、按模型堆叠趋势、甜甜圈占比),host 聚合全部会话 usage

Jump to install

Source facts

Repository
Attackotw/dsh-token-stats
Latest update
Aug 16, 2026
Category
Memory
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/Attackotw/dsh-token-stats
Plugin: dsh-token-stats-attackot
Author: Attackotw

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer2 files
README.mdSource · read only

@dsh-external/dsh-token-stats DSH 的 Token 用量统计面板:左下角 📊 悬浮球 + 浅色极简数据仪表盘,host 侧聚合本机全部会话的模型 usage。

功能特性 时间范围分段:近 7 天 / 近 30 天 / 全部,全模块联动 6 卡核心指标:Token 用量、消息数、会话数、模型数、最常用模型(含占比)、日均用量 活跃热力图:GitHub 贡献墙风格,灰 → 浅蓝 → 深蓝冷色阶 按天 Token 趋势:按模型堆叠柱状图,hover 查看当日各模型分量 模型用量:甜甜圈环形图(中心总用量)+ 图例列表(圆点 / 名称 / 用量 / 百分比) 安装 DSH 插件通过 dsh plugin 命令安装进 profile(dsh web 对应 web profile)。

方式一:从 GitHub 安装(推荐,无需 npm / 无需登录) bash 复制 dsh plugin --profile web add github:Attackotw/dsh-token-stats#v0.1.0 装完重启 dsh web,左下角出现 📊 悬浮球即生效。

锁定版本用 tag(#v0.1.0);不写则拉 main 分支最新。

若你的网络无法直连 github.com 的 HTTPS,改用 SSH 形式(需先在 GitHub 添加 SSH key): dsh plugin --profile web add "git+ssh://git@github.com/Attackotw/dsh-token-stats.git#v0.1.0"

方式二:从 npm 安装(待发布) bash 复制 dsh plugin --profile web add @dsh-external/dsh-token-stats 更新与卸载 bash 复制

更新到最新 main

dsh plugin --profile web update @dsh-external/dsh-token-stats

换版本(如 0.1.1)

dsh plugin --profile web add github:Attackotw/dsh-token-stats#v0.1.1

卸载

dsh plugin --profile web remove @dsh-external/dsh-token-stats 改完重启 dsh web 生效。

数据来源 面板统计本机所有 DSH 会话的模型 usage(sessionQuery),包含输入 / 输出 / 缓存读 / 缓存写四类 token。数据由 host 侧实时聚合,经 GET /dsh-token-stats/api 输出 JSON 供面板消费。

开发构建 需要 Node.js ≥ 22 与 pnpm(构建依赖本地 node_modules 的 typescript / tsdown)。

bash 复制 npm install # 装 devDependencies npm run build # host: tsc 编译 src → lib npm run build:client # client: tsdown → lib/client.js 产物 lib/ 已随仓库提交,安装方无需构建。

技术细节 装配:包声明 dsh.bundle.patch(cordis.patch.yml),dsh plugin add 安装时由 CLI 自动识别并追加进 dsh.profile.bundles host 侧:inject: ['sessionQuery', 'webServer'],注册 /dsh-token-stats/api 路由 client 侧:dsh.client 声明 + shell.overlay slot,React 走 ModuleLoader external