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.

패키지
@mark_future_ai/dsh-quota-meter
호환성
미검증
Cordis peer 범위
^4
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 11. 10.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add @mark_future_ai/dsh-quota-meter

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 }
KeyDefaultMeaning
refreshMs60000Client poll interval; the host caches per source and coalesces in-flight reads
timeoutMs8000Per-request timeout
pricing.currencyCNYCNY renders ¥, USD renders $
pricing.input / output2 / 3Per million tokens
pricing.cacheRead / cacheWrite0.2 / 2Per 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 with balances[].
  • opencode-go — GET https://opencode.ai/zen/go/v1/usage with Authorization: Bearer ; reads usage.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.