atlasmarkz/dsh-quota-meter ↗★ 1
@mark_future_ai/dsh-quota-meter
DeepSeek Harness usage pill: provider balance, subscription plan meters (OpenCode Go) and per-session cost in the composer dock row.
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add @mark_future_ai/dsh-quota-meterドキュメント
README 全文を読む ↗Configuration
Defaults are built in (DeepSeek balance + OpenCode Go plan, DeepSeek list
prices), so a bare install already works. To change anything, override the same
plugin id from your profile's cordis.patch.yml:
- id: usage-meter
config:
refreshMs: 30000
pricing: { currency: CNY, input: 2, output: 3, cacheRead: 0.2, cacheWrite: 2 }
sources:
- { id: deepseek, kind: deepseek-balance, label: DeepSeek, apiKeyEnv: DEEPSEEK_API_KEY }
- { id: opencode-go, kind: opencode-go, label: OpenCode Go, apiKeyEnv: OPENCODE_GO_API_KEY }
| Key | Default | Meaning |
|---|---|---|
refreshMs | 60000 | Client poll interval; the host caches per source and coalesces in-flight reads |
timeoutMs | 8000 | Per-request timeout |
pricing.currency | CNY | CNY renders ¥, USD renders $ |
pricing.input / output | 2 / 3 | Per million tokens |
pricing.cacheRead / cacheWrite | 0.2 / 2 | Per million tokens |
Prices follow the DeepSeek API list price by default; override them for the model you actually run — the cost pill is only as honest as that table.
Sources
Every source is { id, kind, label, link?, apiKeyEnv?, apiKey?, url? } plus
kind-specific fields. link may be a URL, or a dot path into the response body
(workspace.usageURL) when it comes from the endpoint itself.
deepseek-balance— DeepSeek wallet balance. Responds withbalances[].opencode-go—GET https://opencode.ai/zen/go/v1/usagewithAuthorization: Bearer; readsusage.rolling|weekly|monthly({ status, percent, resetsAt }). Default link is the OpenCode Go plan page.http-json— anything else:
- id: my-plan
kind: http-json
label: My Plan
url: https://example.com/api/usage
headers:
authorization: "$ENV:MY_PLAN_TOKEN" # keep secrets out of the patch file
meters:
rolling: { percent: quota.fiveHour.used_pct, limited: quota.fiveHour.blocked, resetsAt: quota.fiveHour.reset, label: 5h }
weekly: quota.week.used_pct
balances:
USD: credits.usd
link: account.billingUrl
A meter without an explicit limited path counts as limited at percent >= 100.