DeepSeek Harness plugin

dsh-quota-panel

Provider quota and balance widget for the dsh web surface with a collapsed glanceable capsule.

Jump to install

Source facts

Repository
brittanistrehlowll-oss/dsh-quota-panel
Latest update
Aug 14, 2026
Category
Usage & Billing
GitHub stars
4
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/brittanistrehlowll-oss/dsh-quota-panel
Plugin: dsh-quota-panel
Author: brittanistrehlowll-oss

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.mdSource · read only
README language

dsh-quota-panel

English | 中文

Provider quota / balance status widget for the dsh web surface (DeepSeek Harness).

A zero-dependency host plugin: for every configured provider it registers one server-side proxy route /api/quota/<id> — the API key is resolved through the credentials seam and never reaches the browser — then injects a small Harness-native status widget (bottom-right) with two sizes:

  • Collapsed (default) — a minimal glanceable capsule: one independent

"status dot + value" pair per account (e.g. ● ¥58.36 · ● 45%), no text labels — only the affected account's dot changes color. Click to expand.

  • Expanded — the full card: "模型额度" header with refresh/collapse

buttons, then one structured row per provider (status dot, name, primary value, secondary line, progress bar for usage-style providers). The collapse button shrinks it back.

Both sizes auto-refresh (paused while the page is hidden; the refresh button spins while a manual refresh runs and re-entrant clicks are ignored).

In the capsule, usage percentages are battery-colored (green when healthy, amber when tight, red when critical), matching their independent dot; balance values are tinted only when their own state warns or errors.

The widget is styled with the Harness design tokens (--dsw-alias-*, --dsw-static-*, --dsw-shadow-*, --dsw-font-*) and falls back to sensible values when tokens are absent, so it follows the product theme (light/dark) instead of carrying its own palette.

Screenshots

Collapsed capsule (light / dark):

![Capsule (light)](docs/capsule-light.png) ![Capsule (dark)](docs/capsule-dark.png)

Expanded card (light / dark):

![Panel (light)](docs/panel-light.png) ![Panel (dark)](docs/panel-dark.png)

Full page, collapsed capsule (light / dark):

![Full page, capsule (light)](docs/screenshot-light.png) ![Full page, capsule (dark)](docs/screenshot-dark.png)

Install

dsh plugin --profile web add "github:brittanistrehlowll-oss/dsh-quota-panel"
# restart `dsh web` (bundle layers apply at boot)

The package declares dsh.bundle.patch, so dsh plugin add activates it as a profile layer automatically.

Configuration

Each provider is one entry under providers. Two renderers ship:

| format | endpoint shape | row | |---|---|---| | deepseek-balance | { "balance_infos": [{ "currency", "total_balance", "granted_balance", "topped_up_balance" }] } | ¥58.36 + 余额充足/正常/紧张/建议充值 | | opencode-usage | { "usage": { "rolling"\|"weekly"\|"monthly": { "percent", "resetsAt" } } } | 五 10% · 周 45% · 月 22% + progress bar + 当前最高占用 |

Override the shipped defaults in your profile's cordis.patch.yml:

- id: quota-panel
  config:
    refreshMs: 30000
    providers:
      - id: deepseek
        label: DeepSeek
        credential: DEEPSEEK_API_KEY
        endpoint: https://api.deepseek.com/user/balance
        format: deepseek-balance
        balanceTiers: { critical: 10, warn: 20, healthy: 50 }
      - id: opencode-go
        label: OpenCode Go
        credential: OPENCODE_GO_API_KEY
        endpoint: https://opencode.ai/zen/go/v1/usage
        format: opencode-usage
        windowLabels: { rolling: 五, weekly: 周, monthly: 月 }
        warnPercent: 70
        errorPercent: 90

Fields:

fieldmeaningdefault
idroute id (/api/quota/<id>), ^[a-z0-9-]+$required
labelprovider name on the cardrequired
credentialcredential reference ($DSH_HOME/.credentials.yaml or env)required
endpointquota JSON endpoint, GET with Authorization: Bearer <key>required
formatrow rendererdeepseek-balance
balanceTiers(deepseek-balance) {critical, warn, healthy} levels{10, 20, 50}
lowBalancelegacy alias for balanceTiers.warn
windowLabels(opencode-usage) {rolling, weekly, monthly}{滚, 周, 月}
warnPercent / errorPercent(opencode-usage) thresholds70 / 90
refreshMsauto-refresh interval60000

DeepSeek balance levels

With the default balanceTiers {critical: 10, warn: 20, healthy: 50}:

balancestatesecondary line
<= 10error (red dot + value)建议充值
10 < x <= 20warn (amber)余额紧张
20 < x <= 50ok余额正常
> 50ok余额充足

OpenCode usage states

high = max(rolling, weekly, monthly):

usagestate
< warnPercentok (green dot, DeepSeek-blue progress)
>= warnPercentwarn (amber dot + progress)
>= errorPercenterror (red dot + progress)

Changelog

  • v0.3.0 — Two sizes: collapsed capsule (independent per-account dot +

battery-colored value) expands into the full card.

  • v0.2.0 — Harness-native card: design tokens, balance tiers, progress bar.
  • v0.1.0 — Initial floating panel: server-side quota proxies + page badge.

Security

  • API keys are resolved server-side via ctx.credentials and only used in the

server-to-provider request; the browser only talks to /api/quota/<id>.

  • The injected card builds DOM with createElement/textContent only; API

response values never pass through innerHTML. Technical errors (401, timeout, credential missing) go into title hover text, not the card body.

Local development

# Regenerate demo pages docs/demo.html + docs/demo-dark.html
node scripts/gen-demo.mjs
# Headless screenshots via Chrome DevTools Protocol
node scripts/shoot.mjs both
# Verify the rendered DOM of a demo page
node scripts/verify.mjs [dark]
# Syntax + content checks for the injected page script
node scripts/test-page-script.mjs

License

MIT