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

mc-hud

v1.0.2

Published

Minecraft-style token consumption HUD for the DeepSeek Harness web GUI: hearts = decode tok/s, drumsticks = DeepSeek balance, per-mode icons (sword/map/command-block/grass).

Readme

mc-hud

Minecraft 风格的 DeepSeek Harness 消耗 HUD 插件:侧边栏底部显示 红心(解码速度 tok/s)+ 鸡腿(余额剩余),顶栏模式标签与模式选择器使用原版 Minecraft 图标。

📖 人类用户读本文件;维护/修复的 AI 请读 AI_GUIDE.md(架构、坑史、改法全在里面)。

⚠️ 声明:本插件为非官方粉丝项目,与 Mojang / Microsoft 无关。HUD 图标为 Minecraft 素材的非商业派生作品,版权归 Mojang / Microsoft 所有;原图不随仓库分发(仅开发需要),运行只依赖内嵌的小尺寸派生像素图。请勿商用。

功能

  • 红心 ×10:当前解码速度 tok/s(与输入框下方统计行同源),锚点分段映射 (0→10, 100→9, 130→7, 200→3),半心粒度
  • 鸡腿 ×10:DeepSeek 余额剩余,上限 ¥100、每 ¥10 一格(半格粒度)
  • 信息行:缓存命中率(红心标签右侧)、本会话累计消耗 ≈¥(鸡腿标签右侧,按 DeepSeek-V4-Flash 官方空闲价估算)
  • 模式图标:顶栏标签 + 英雄屏选择器使用原版像素图标——普通=铁剑、极简=地图、PTC=命令方块、创造=草方块
  • 明暗主题自适应:HUD 文字颜色、MC 描边、空槽图标与模式下拉菜单底色跟随 DSH 主题(body[data-ds-dark-theme])自动切换,浅色/深色下都可读
  • 余额每 60 秒刷新(失败 15 秒重试);UI 每 2 秒更新;侧边栏窄栏时自动隐藏;图标自适应侧边栏宽度

安装

方式 A:npm(最简单,推荐)

dsh plugin --profile web add mc-hud

或直接加到 Web profile 的依赖:

cd ~/.dsh/profiles/web
pnpm add mc-hud        # 或 npm install mc-hud

然后在 ~/.dsh/profiles/web/package.jsondsh.profile.bundles 里加 "mc-hud",重启 DSH 生效。 (npm 包名:mc-hudnpm 页面

方式 B:从 Git 仓库

dsh plugin --profile web add "github:qsjzqssh/mc-hud#v1.0.0"

重启 DSH 后生效。

方式 C:本地目录

dsh plugin --profile web add /path/to/mc-hud

或手动:把 mc-hud/ 放到 ~/.dsh/profiles/web/ 下,在 ~/.dsh/profiles/web/package.jsondependencies"mc-hud": "file:./mc-hud"dsh.profile.bundles"mc-hud",然后 cd ~/.dsh/profiles/web && corepack pnpm install,重启。

卸载

~/.dsh/profiles/web/package.json 移除 mc-hud 依赖与 bundle 项,删除 ~/.dsh/profiles/web/mc-hud/(及 node_modules/mc-hud),corepack pnpm install,重启。

技术说明

  • Host 半lib/index.js):ctx.remote(typert Remote)提供 getHud / getPresets / setDefaultPreset;余额经 credentials.resolve('DEEPSEEK_API_KEY') + shell.run(curl) 查询(key 只走 env);tok/s 与缓存命中读 sessionProjectionssessionStats / tokenUsage(与统计行同源);价格常量 PRICE_IN_MISS/HIT/OUT(V4-Flash 官方空闲价)。
  • Client 半lib/client.js):window.__ModuleLoader__.load wire 格式;插槽注册:sidebar.footer.action(HUD)、conversation.session.header.actions id agent-preset priority -1(替换官方标签)、conversation.hero.agentPreset priority -1(替换选择器)。全部注册带 try/catch,任一失败不影响启动。
  • 素材assets/ 内含原版 16×16 精灵图(红心/鸡腿/模式图标);客户端内嵌 base64,无需外部文件。

调参

价格常量在 lib/index.jsPRICE_IN_MISS=1.5PRICE_IN_HIT=0.05PRICE_OUT=4.5,高峰时段翻倍);红心锚点在 lib/client.jsheartsFromTokBALANCE_CAP 为鸡腿上限。

开发

npm run check        # 语法检查两个 lib 文件

改动后同步部署副本:cp lib/*.js ~/.dsh/profiles/web/mc-hud/lib/ && cp lib/*.js ~/.dsh/profiles/web/node_modules/mc-hud/lib/(file: 依赖是硬链接副本,必须同步),然后重启。

License

MIT(见 LICENSE)。贴图素材版权归其原作者/游戏资产所有者所有,仅用于个人用途;发布分发前请自行确认素材授权。


插件由 deepseek-v4-flash 在创造模式中制作并上传