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

@lovstudio/dsh-account-balance

v0.1.0

Published

DeepSeek Harness global account-balance card: live session/job status plus GLM / KIMI quota windows and OpenRouter / DeepSeek balances, pinned to the shell overlay bottom-right

Readme

@lovstudio/dsh-account-balance

English | 中文

DeepSeek Harness Web 界面右下角常驻的任务状态卡片。它挂在根 shell.overlay 座位,跨整个进程展示:

  • 状态点 + 「空闲 / N 会话 · M 任务」(空闲,或活跃会话数与运行中的后台任务数),每 3 秒轮询;
  • GLM / KIMI 两行 5px 配额横道——5 小时窗口与本周配额——按 <50% 绿 / ≥50% 橙 / ≥80% 红着色,悬停显示已用、剩余与重置倒计时;
  • OpenRouter(美元)与 DeepSeek(人民币)剩余余额,每 60 秒经 Host 侧 55 秒缓存轮询。

Host 半边暴露两个 Typert Remote:accountBalance.statusaccountBalance.quotasstatus 是纯内存快照(ctx.agents.list() + ctx.jobs.list()),绝不扫描会话日志,因此 3 秒轮询在 Host 侧亚毫秒级返回,不会卡住用户消息。quotas 将四个 provider 请求并行发出并缓存 55 秒;所有外部数值在 wire 边界归一化,行对象严格按 mode 定形,Remote JSON 永不携带 undefined 字段。provider 密钥每次操作经 ctx.credentials 解析(ZAI_CODING_CN_API_KEYKIMI_CODING_API_KEYOPENROUTER_API_KEYDEEPSEEK_API_KEY),绝不离开 Host。

服务 API

accountBalance.status(): Promise<RemoteResult<AccountBalanceStatusSnapshot>>

进程实时状态:{ sessions, tasks }——去重后的活跃会话 id 数与当前处于 running 的后台任务数。

accountBalance.quotas(): Promise<RemoteResult<AccountBalanceQuotaSnapshot>>

四 provider 快照:{ at, rows: { glm, kimi, or, ds } }。窗口行(glmkimi)携带 mode: 'windows'windows.w5windows.week;余额行(ords)携带 mode: 'balance'balancedetail。每行都带 statusok | no-key | no-data | error

配置

无。四个 provider 密钥按引用从 credential 服务读取;缺少密钥时该行显示「—」并在悬停提示原因。

扩展点

无——卡片是叶子界面。其它消费者可直接复用这两个 Remote 做自己的状态/配额展示。

模型体验

模型看到的内容

无。卡片是纯浏览器 UI,两个 Remote 调用都在模型回合之外执行,结果从不进入 prompt。

Token 影响

零——本插件不发起任何模型调用。

KV Cache 影响

无——不贡献任何 prompt 前缀。

已知限制与暂缓事项

  • jobs.list() 可见性——Host status 处理器不带 caller 列出任务,其它会话拥有的任务可能不计入 tasks;无主与可见任务会计入。
  • 配额格式漂移——GLM 与 KIMI 的 wire 格式做防御性提取;API 形态变化会表现为 no-data 行而非崩溃。
  • 刷新/重启——安装后本插件是 composition 行,两者皆可存活;安装前与工作区内其它插件包行为一致。