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

@floatingdeaming/minimax-usage

v1.0.3

Published

DSH bundle plugin: provides ctx.minimaxUsage service, registers minimax.getUsage / minimax.hasApiKey JSON-RPC handlers, and ships a browser client that renders the 「用量」 section in Settings (one `dsh plugin add` installs everything).

Readme

@floatingdeaming/minimax-usage

DSH (DeepSeek Harness) trusted plugin that exposes the user's MiniMax Token Plan usage data via the minimaxUsage service.

What it does

Runs in the DSH main Node process and provides:

ctx.minimaxUsage.getUsage({ force?: boolean })  // Promise<{ ok, models, ... }>
ctx.minimaxUsage.hasApiKey()                    // boolean

Backed by https://www.minimaxi.com/v1/token_plan/remains. Features:

  • 60s in-memory cache + 10s rate limit
  • 2-attempt retry on transient errors (timeout / 5xx / 429)
  • API key resolved from MINIMAX_API_KEY env var or ~/.dsh/.credentials.yaml
  • Normalized response shape with plan-level remainingPercent* fields

Installation

This is a DSH trusted plugin, not a regular npm dependency. DSH loads it via pnpm workspace + cordis composition patch. See the parent repo dsh-minimax-usage for the install.ps1 / install.sh scripts that wire it into DSH.

If you want to publish to your own npm registry:

# from this directory
npm login
npm publish --access public

Then in the DSH profile's package.json:

{
  "dependencies": {
    "@floatingdeaming/minimax-usage": "^1.0.0"
  }
}

…and run pnpm install in the profile root.

API key

Set MINIMAX_API_KEY to a Token Plan / Subscription key (not the metered-billing key). Sources checked in order:

  1. process.env.MINIMAX_API_KEY
  2. ~/.dsh/.credentials.yamlMINIMAX_API_KEY: '<value>'

Changes take effect after restarting DSH.

Response shape

{
  ok: true,
  statusCode: 0,
  summary: '查询成功',
  models: [
    {
      modelName: 'general',
      total5h: 0,
      remaining5h: 0,
      used5h: 0,
      usedPercent5h: 17,
      remainingPercent5h: 83,    // ← from current_interval_remaining_percent
      status5h: 1,
      windowStart: '2026-08-15T12:00:00.000Z',
      windowEnd:   '2026-08-15T16:00:00.000Z',
      resetIn5hMs: 9758306,
      resetIn5hLabel: '2:42:39',
      // same shape for totalWeek/remainingWeek/usedWeek/usedPercentWeek/remainingPercentWeek
    },
    // ...
  ],
  fetchedAt: '2026-08-15T13:17:21.569Z',
  cached: false
}

On error:

{
  ok: false,
  statusCode: 1004,           // or 401, 503, null
  summary: '请检查 MINIMAX_API_KEY(需要 MiniMax Token Plan/Subscription Key,不是按量计费 API Key)',
  models: [],
  errorCode: 'auth_error',    // missing_key | auth_error | rate_limited | http_error | network_error | timeout | api_error
  fetchedAt: '2026-08-15T13:17:21.569Z'
}

Why a trusted plugin?

DSH sandboxes dynamic plugin code — they cannot make network calls or read env vars directly. To bridge to MiniMax's API we need a plugin that runs in the DSH main process, which DSH calls "trusted". The dynamic client-side plugin (cordis_define

  • cordis_run in a session) calls ctx.minimaxUsage.getUsage() via Host RPC.

License

MIT