NOirBRight/dsh-usage-monitor
DeepSeek Harness 的会话日志使用仪表板
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness, designed to add a usage monitoring dashboard to the DSH settings interface. It pulls token usage data reported by AI providers from DSH session logs, then renders responsive stacked charts and summary cards to visualize usage across different time ranges and grouping options. To install the latest release, run the command dsh plugin --profile web add --force https://github.com/NOirBRight/dsh-usage-monitor/releases/latest/download/dsh-usage-monitor-0.2.14.tgz via the DSH CLI, then restart the DSH web service. No build step is required for release installation, since the published package already includes pre-compiled Host and Client files.
After installation and restart, you can access the dashboard by opening the new Usage entry added under DSH Settings. The dashboard shows total tokens, number of requests, output tokens, and cache hit rate, and lets you filter data by week, month, or a custom date range. You can also switch grouping between provider, model, or workspace to see detailed usage breakdowns. It also displays responsive summary cards that update to match your current grouping selection. It is especially useful for DSH users who want to track long-term API usage and manage their AI service costs effectively.
This plugin is released under the open source MIT license. It does not fetch subscription quota information from providers, nor does it read extra unneeded community cache files. It only supports Cordis versions between 4.0.2 and 5.0.0, and will warn once when loaded on an untested newer DSH host before continuing to attempt loading. It only blocks loading when a confirmed compatibility issue is found, and will not block unknown new releases preemptively. The UI is fully responsive, and it automatically adjusts to a single-column layout on narrow screen devices.
这是一个专为 DeepSeek Harness 开发的原生插件,核心功能是提供令牌用量与请求统计的可视化仪表盘。它会自动从 DeepSeek Harness 的会话日志中提取各 AI 提供商返回的令牌用量数据,在设置页面生成堆叠图表和统计卡片,支持多维度聚合查看用量情况。用户可通过 DSH CLI 直接从 GitHub 发布包安装,无需本地编译源码。
安装完成后,用户重启 DSH Web 服务,即可在设置菜单中找到「用量」入口打开仪表盘。支持查看令牌总数、请求数、输出令牌、缓存命中率等指标,可按日/周/月或自定义时间范围筛选,还能切换按提供商、模型或工作空间分组统计。适合需要长期追踪 API 调用用量、控制使用成本的 DSH 用户使用。
本插件遵循 MIT 许可开源,不获取订阅配额信息,也不会读取多余的社区缓存文件。仅兼容 Cordis 4.0.2 到 5.0.0 版本,对未验证的新版本 DSH 主程序会发出一次警告后继续尝试加载,只有确认兼容问题才会阻止加载。支持响应式布局,窄屏设备上会自动调整为单列卡片布局。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-usage-monitor(NOirBRight/dsh-usage-monitor)
仓库:https://github.com/NOirBRight/dsh-usage-monitor
本站详情页:https://www.yhbd.top/plugins/noirbright-dsh-usage-monitor/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 3 · 最近提交 2026-09-26 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add --force https://github.com/NOirBRight/dsh-usage-monitor/releases/latest/download/dsh-usage-monitor-0.2.20.tgz
把 NOirBRight/dsh-usage-monitor 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-usage-monitor
English | 中文
Usage dashboard for DeepSeek Harness. It folds provider-reported token usage out of session logs and charts it in Settings.
Compatibility
Host DSH peers and development dependencies use the open lower-bound range >=0.1.7-alpha.2. The lockfile resolves DSH 0.1.7-rc.2 packages and Cordis 4.0.4. Optional peers let the plugin remain loadable outside the supported set.
package.json#dsh.compatibility.dshReleases records DSH 0.1.7-alpha.2, 0.1.7-rc.1, and 0.1.7-rc.2 as compatible evidence, not an allowlist. Unknown newer Hosts warn once and keep the normal mount path. Only a reproduced failure is blocklisted.
What it shows
- Tokens, requests, output tokens, and cache-hit rate
- Stacked chart with Metric (token / request), By (provider / model / workspace), Group (day / week)
- Week, month, and custom ranges
- A responsive overview with a full-width token summary, compact secondary metrics, a stacked chart, and token-share cards that follow the current By grouping
- On narrow screens, the cards collapse to one column and the chart legend scrolls horizontally
Escape closes an open Metric, By, or Group menu and restores focus to its trigger. With no menu open, Escape remains available to the Settings dialog.
Subscription quotas are not fetched.
Installation
Host development dependencies resolve to the rc.2 package set; see Compatibility. Install from GitHub:
dsh plugin --profile web add --force https://github.com/NOirBRight/dsh-usage-monitor/releases/latest/download/dsh-usage-monitor-0.2.20.tgz
dsh web
The repository tracks release-ready lib artifacts, so GitHub installation needs no build-script allowlist. A source checkout can use a link installation after running pnpm run build.
Then open Settings → Usage.
Data
Reads live and persisted logs through the public ctx.sessionQuery.readSession API; sessionPersistence.list supplies cache revisions only. The usage RPC uses the authenticated /api/plugin-rpc/usage-monitor Fetch route. It does not inspect private persistence methods or session file paths. Unreadable sessions are omitted; only folded usage aggregates are returned.
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
Han-1413141/dsh-cost-meter
wssfk12138/dsh-damage-pulse
songoao25/dsh-bottom-info-bar
Phant0Meow/dsh-meow-cachebilling
Rianico/dsh-better-edit
Ghost011118/dsh-balance-meter
ai-shushu/dsh-quota-meter
TwotwoPiggy/dsh-balance