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-minimax-usage

v0.1.8

Published

Show MiniMax Token Plan subscription usage in the DSH Web UI

Readme

dsh-minimax-usage

在 DeepSeek Harness (DSH) Web UI 中显示 MiniMax Token Plan 订阅用量。

插件读取官方 Token Plan 用量接口 GET /v1/token_plan/remains,在对话框模型选择器旁显示紧凑的 5h / 7d 用量条。 密钥复用 DSH 设置 → 模型 里已配置的订阅 Key,浏览器拿不到明文。

dsh-minimax-usage 模型选择器旁的用量条

安装

推荐:从 npm 安装

npx @deepseek-ai/dsh plugin --profile web add dsh-minimax-usage

⚠️ 别用 npx dsh plugin——npm 上 dsh 这个名字早在 2016 年就被一个不相关的 JS shell 包占了([email protected],作者 infusion),它没暴露 CLI bin,会报 could not determine executable to run。DSH 的 CLI 在 scoped 包 @deepseek-ai/dsh 下,必须用完整名。

web 换成你的 profile 名。装完 重启 DSH。

备选:从 GitHub 装

锁定版本:

npx @deepseek-ai/dsh plugin --profile web add github:pan17/dsh-minimax-usage#v0.1.2

或默认分支最新:

npx @deepseek-ai/dsh plugin --profile web add github:pan17/dsh-minimax-usage

构建脚本授权

如果 pnpm 提示不允许跑构建脚本(ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED),在该 profile 的 pnpm-workspace.yaml 加上再重跑同一条命令:

allowBuilds:
  dsh-minimax-usage: true

然后:

  1. 打开 Web UI(默认 http://127.0.0.1:3080)
  2. 设置 → 模型 填写 Token Plan 订阅 Key(不是普通按量付费 API Key)
  3. 在对话框中选择 MiniMax Token Plan 模型后,模型选择器左侧会出现用量条;悬停看详情,点击用量条刷新

功能

  • 内联用量条:显示在对话框模型选择器左侧,按截图样式显示 5h / 7d 两条剩余进度
  • 按 provider 显示:只有当前选择 minimax-cn 或 minimax Token Plan provider 时显示;其他 provider 即使模型名含 MiniMax 也隐藏
  • 悬停详情:鼠标悬停或键盘聚焦可查看国内站 / 国际站、套餐名、窗口进度和重置倒计时
  • 点击刷新:点一下用量条强制刷新,不改变模型选择或发送操作
  • 密钥来源:MINIMAX_API_KEY(国际)与 MINIMAX_CN_API_KEY(国内),优先 ctx.credentials,其次进程环境变量
  • 自动刷新:只有实际运行中的 Agent 使用 minimax / minimax-cn Token Plan provider 时,才会每 30 秒强制拉取官方用量;切换到其他 provider 或 Agent 回到空闲后停止这条循环。整轮 Agent 回到空闲且这轮用过 MiniMax 后,再等 15 秒执行一次空闲刷新;之后心跳从 2 分钟起每次翻倍,上限 24 小时,再用 MiniMax 并空闲后心跳重置回 2 分钟。每轮快照还会按 5 小时窗口的重置时刻 + 30 秒再触发一次"重置后刷新",第一时间拉取翻页后的额度。用量条每 15 秒只读 Host 缓存。点击立即强制刷新。

接口

| 区域 | 凭据 | 用量 URL | |---|---|---| | 国际 | MINIMAX_API_KEY | www.minimax.io,失败则回退 api.minimax.io | | 国内 | MINIMAX_CN_API_KEY | api.minimaxi.com,失败则回退 www.minimaxi.com |

只查询已配置的区域。两把 Key 都有时,悬停详情中会并排展示两张账号卡。

注意

  • 订阅 Key 与普通开放平台 API Key 不能混用。用量接口拒绝普通 Key 时,页面会提示改用订阅 Key。
  • 插件原样展示官方剩余额度,不本地「修正」扣费;remains_time 的语义以 MiniMax 控制台为准。
  • *_quota = 0 的模型会标成「未包含」,而不是 0%。

发布

参见 PUBLISH.md:tag push 触发 GitHub Actions,自动 pack → GitHub Release → 等 CI 绿 → publish 到 npm。

开发

npm install
npm test
npm run build

本地未推送时也可以按路径装:

npx @deepseek-ai/dsh plugin --profile web add /path/to/dsh-minimax-usage