npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-usage-stats

v0.1.16

Published

Lightweight usage analytics for DeepSeek Harness — token trends, activity heatmaps, model breakdowns, and exports.

Readme

📊 dsh-usage-stats

English

DeepSeek Harness Token 使用情况,一目了然。

npm version npm downloads CI Node License

dsh-usage-stats 是面向 DeepSeek Harness Web UI 的轻量使用统计插件,用于集中展示 Token 总量、每日趋势、活跃日期及模型分布。

插件通过 Harness 提供的扩展接口集成,不修改 Web UI 或官方 npm 包。统计数据保存在本机。

dsh plugin --profile web add dsh-usage-stats

重启 Web Profile 后,侧边栏「设置」上方会出现 使用统计

更新或卸载:

dsh plugin --profile web update dsh-usage-stats
dsh plugin --profile web remove dsh-usage-stats

🎬 效果演示

使用效果演示

🖼️ 界面截图

浅色主题

深色主题

✨ 功能概览

| 模块 | 说明 | | --- | --- | | 📈 使用概览 | 展示 Token、会话、消息、活跃天数、连续使用天数及最常用模型的历史累计值 | | 📊 每日趋势 | 展示最近 7 天或 30 天的 Token 变化,悬停可查看指定日期的模型用量 | | 🔥 活跃热力图 | 以颜色深度表示一年内各日期的 Token 用量,悬停可查看 Token 数量及调用轮次 | | 🎯 范围筛选 | 支持按工作区、主任务或子任务限定统计范围 | | 📋 调用明细 | 查看单次调用的耗时、Token、缓存率、模型与思考程度,支持筛选与分页 | | 💾 数据导出 | 支持导出 CSV 或 JSON,用于归档或进一步分析 | | 🌐 中英文界面 | 自动跟随 Harness 的语言设置切换中文或英文 | | 🎨 主题适配 | 自动跟随 Harness 的浅色或深色主题 | | ⚡ 轻量运行 | 无第三方图表库、无后台轮询,减少额外的网络请求与运行开销 |

✅ 已修复

官方模块重复安装风险

0.1.16 将插件使用的 DeepSeek Harness 官方模块统一声明为对等依赖,避免 Profile 内出现插件私有副本及模块身份分裂。发布检查会阻止官方模块再次进入普通依赖。

子任务继承上下文重复计入

0.1.13 修复了 fork 子任务将父会话继承上下文重复计入自身用量的问题。子任务现在只统计自身产生的调用;升级后,旧版统计缓存会自动失效并按新口径重建。

⚙️ 配置

config:
  indexConcurrency: 2
  cacheWriteDelayMs: 1000
  apiPath: /usage-stats/v1

| 配置项 | 说明 | 默认值 | | --- | --- | --- | | indexConcurrency | 同时读取历史会话的数量(18) | 2 | | cacheWriteDelayMs | 更新本地统计前的等待时间(毫秒) | 1000 | | cachePath | 自定义统计缓存位置 | Harness 数据目录 | | apiPath | 统计接口路径 | /usage-stats/v1 |

🔒 隐私与安全

  • 统计索引保存在 DSH_HOME/usage-stats,内容包括会话标识、时间、工作目录、模型名称和 Token 数量。
  • 插件不保存提示词正文、回复正文、工具参数或 API 密钥。
  • 具体记录范围见 隐私说明

🧩 兼容性

目前已在 DeepSeek Harness 0.1.0-rc.6、Node.js 22.19+24+ 上测试,可用于官方 Web UI,以及加载该 Web UI 的桌面封装。

Harness 仍在持续更新。本文仅声明经过实际测试的运行环境;其他版本可能可以正常运行,但不在当前验证范围内。详细信息见 兼容性说明

🐛 遇到问题

如果出现插件入口缺失、统计结果不完整、界面显示异常或版本兼容问题,请 提交 Issue

提交时请尽量附上:

  • DeepSeek Harness 和 Node.js 版本;
  • 安装或更新插件时执行的命令;
  • 可复现问题的操作步骤;
  • 错误日志或界面截图。

完整的环境信息和复现步骤有助于定位问题。涉及安全问题时,请勿在公开 Issue 中提交 API 密钥、访问令牌或本机数据,报告方式见 安全策略

🙏 致谢

  • 感谢 @Grivn#1 中发现并分析子任务继承上下文重复统计问题。
  • 感谢 @yzke#2 中提出并实现中英文界面适配方案。
  • 感谢 @ogj130#3 中贡献调用明细功能的初始实现。
  • 感谢 @zhu637882-stack#4 中报告官方模块重复安装风险。

📜 许可证

MIT