rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:bzhao0110/dsh-usage-dashboard
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
DeepSeek Harness 的 Token 用量统计插件 —— 在 设置 → Token 统计 中提供 zcode 风格的用量面板:
⚠️ 本插件没有发布到 npm。 npm 公共 registry 上的
dsh-usage-dashboard与dsh-token-stats都是他人发布的同名包, 与本项目无关。请不要用 npm 包名安装(那样会装到别人的包),只从本 GitHub 仓库安装。
唯一分发渠道是本仓库:https://github.com/bzhao0110/dsh-usage-dashboard。
桌面版(desktop profile)目前没有插件页一键安装入口,需要手动改 profile:
编辑 ~/.dsh/profiles/desktop/package.json:
{
"dsh": {
"profile": {
"bundles": [
// ...原有内置 bundle...
"dsh-usage-dashboard" // ← 加这一行
]
}
},
"dependencies": {
// 三选一:
"dsh-usage-dashboard": "github:bzhao0110/dsh-usage-dashboard", // 从 GitHub 装(推荐)
"dsh-usage-dashboard": "link:/path/to/dsh-usage-dashboard", // 本地源码,改完即生效(开发用)
"dsh-usage-dashboard": "file:/path/to/dsh-usage-dashboard" // 本地打包快照
}
}
安装依赖:
cd ~/.dsh/profiles/desktop && npx pnpm@11.9.0 install
重启 DeepSeek Harness 应用,打开 设置 → Token 统计。
# 用 git 地址安装(不要用 npm 包名)
dsh plugin --profile web add https://github.com/bzhao0110/dsh-usage-dashboard.git
部分 dsh 版本也接受
github:bzhao0110/dsh-usage-dashboard简写;两种都是 pnpm 认的 git 规格。git 安装装的是源码,个别 profile 需要在pnpm-workspace.yaml里授权构建脚本。
dsh plugin --profile web add /path/to/dsh-usage-dashboard
桌面版同上面的 profile 手动方式,把依赖写成 link:/path/to/dsh-usage-dashboard,
改完源码重启应用即可生效。
投影按需折叠:只有被打开过的会话才有数据。要一次性回填全部历史,运行:
node tools/backfill.mjs --dry # 预览
node tools/backfill.mjs # 写入 projcache(自动跳过活跃会话)
回填后重启 Harness,设置面板立即显示全部历史统计。
tokenStats 会话投影(ctx.sessionProjections.register),
折叠 request/header / step/start / assistant usage / step/end /
compaction/summary 事件,按 天 × 模型 累计 token。Harness 会在会话
首次被触碰时回放持久化日志,因此历史会话同样被统计。settings.section 槽位注入设置页,聚合全部会话的
projectionValues.tokenStats 渲染面板。ChartTip 浮窗组件:固定定位 + 视口边缘翻转,鼠标悬浮即显示明细。各版本的变更见 CHANGELOG.md。
npm run check # 语法检查(node --check)
npm test # 投影 fold 单元测试(node:test,无外部依赖)
peer 依赖接受 DSH 0.1.0-rc.6 起的 0.1 线与 0.2 线全部版本(含 rc)。
0.3.0 及以后未经测试。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。