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

@liuliuhuhushui/dsh-quota-float

v0.1.0

Published

Floating usage & balance widget for DeepSeek Harness — follows each conversation's selected model (Kimi / DeepSeek / Volc Ark / DashScope)

Readme

dsh-quota-float

DeepSeek Harness(DSH)的用量/余额悬浮窗插件 —— 一张可以全页拖动的卡片,显示当前对话所选模型对应供应商的额度或余额。

截图

| Kimi —— 用量进度条 | DeepSeek —— 消费与余额 | | --- | --- | | Kimi 用量视图 | DeepSeek 余额视图 |

卡片跟随当前对话选择的模型 —— 切换对话,视图随之切换。

功能

  • 🐳 跟随对话:通过 Harness 自己的模型目录读取当前对话选择的模型,并解析出与模型调用完全相同的凭据(设置 → Models → apiKeyEnv → 凭据库)。本包不保存任何密钥。
  • 🔀 按供应商切换视图
    • Kimi —— 5h 窗口 + 每周限额进度条,带重置倒计时
    • DeepSeek —— 当天消费 + 余额(能识别充值,消费数字不会被充值抹掉)
    • 火山引擎 Ark —— 5h + 每周额度(控制台 Cookie + CSRF,先查 DSH 凭据库再查启动环境)
    • 阿里云 BSS —— 本月账单 + 账户余额(AccessKey 对,HMAC-SHA1 签名 OpenAPI,先查 DSH 凭据库再查启动环境)
  • 🎨 原生外观:基于 DSH 主题令牌(亮/暗自动适配)+ DeepSeek 品牌蓝点缀
  • 🖱️ 全页拖动:位置跨对话共享;标题栏可收起;手动刷新按钮
  • 🛡️ 稳定:3 次重试 + 5 分钟文件缓存(~/.dsh/quota-float/)+ 失败回退旧数据不白屏

安装

# 一条命令 —— 自动从 npm 安装并注册 bundle:
dsh plugin add @liuliuhuhushui/dsh-quota-float
cd ~/.dsh/profiles/web        # Windows: %USERPROFILE%\.dsh\profiles\web
pnpm add @liuliuhuhushui/dsh-quota-float

然后把包名加入 profile 的 package.json 的 bundle 列表:

{
  "dsh": {
    "profile": {
      "bundles": [
        "@deepseek-ai/dsh-base",
        "@deepseek-ai/dsh-web-app",
        "@liuliuhuhushui/dsh-quota-float"
      ]
    }
  }
}

重启 DSH,卡片出现在窗口右下角。

原理

浏览器卡片(shell.overlay 插槽)
  └─ GET /quota-float/quota?provider=<路由>&model=<模型>
       └─ Host 插件(index.js)
            ├─ settings.get('llm-pi-ai' | 'llm-deepseek') → apiKeyEnv 引用
            ├─ credentials.resolve(ref) → 与模型调用同一把 key
            └─ 供应商用量 API(fetch ×3 重试)→ 5 分钟文件缓存

Host 端在 Harness Web 服务器上注册了一个精确路由(webServer.register); Client 端是手写的 window.__ModuleLoader__ 格式 bundle —— 零依赖、无构建步骤

环境要求

  • DeepSeek Harness web profile(Node ≥ 22.13)
  • 在 DSH 设置 → Models 里配置好 API key(插件直接复用)
  • 仅火山 Ark:~/.dsh/.credentials.yaml 里加 ARK_COOKIE + ARK_CSRF_TOKEN(或放在启动环境)
  • 仅阿里云:~/.dsh/.credentials.yaml 里加 ALIBABA_CLOUD_ACCESS_KEY_ID + ALIBABA_CLOUD_ACCESS_KEY_SECRET(或放在启动环境)

许可证

MIT