NOirBRight/dsh-usage-monitor 预览 preview

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 主程序会发出一次警告后继续尝试加载,只有确认兼容问题才会阻止加载。支持响应式布局,窄屏设备上会自动调整为单列卡片布局。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • 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 →

← 上一个 Prev gzhflow 下一个 Next dsh-image-gen →