sumomok/dsh-plugins--packages-balance0

@sumomok/dsh-balance

DeepSeek account balance and spend for the DeepSeek Harness web GUI: a sidebar-footer chip showing the remaining balance, plus per-session, today, month, and all-time spend priced from a deployment-owned price table

包名
@sumomok/dsh-balance
版本
0.1.0
许可证
MIT
最近更新
2026年8月23日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:sumomok/dsh-plugins#dd98467f6bd6a76a043c82375fc94e7bc6ca5b4c&path:packages/balance

Configuration

Every key is validated at load and changeable from cordis.yml. The bundle patch ships the full default block; a profile patch targeting the balance id replaces that whole block, so restate every key you want to keep.

KeyDefaultMeaning
refreshMs60000How long a successful balance read is served. Minimum 5000.
retryMs15000How long a failed read suppresses further attempts. Minimum 1000.
timeoutMs8000Wall-clock budget for one balance request. Minimum 1000.
currency[CNY, USD]Currency codes in descending preference. One list serves two decisions: which balance row to show when the account holds several, and which price list to spend against before the account's own currency is known.
lowBalance10Warning tint below this total.
criticalBalance1Critical tint below this total. Must not exceed lowBalance.
ledgerDays400Days of ledger rows kept; older rows are dropped and the file rewritten at startup.
timezone''IANA zone the day and month spend boundaries are taken in. Empty means the zone the host process runs in.
root''Directory the ledger is written into. Empty means $DSH_HOME/dsh-balance.
surfaces.footertruePut up the sidebar-footer chip.
surfaces.sessionSpendtruePut up the per-session spend line.
pricesDeepSeek's published CNY and USD ratesThe price lists, one per currency. See below.

The provider connection is not configured here: the endpoint and the API-key reference are read from the llm-deepseek settings section, exactly as that provider resolves them (baseURL, then $DEEPSEEK_BASE_URL, then https://api.deepseek.com; apiKeyEnv, defaulting to DEEPSEEK_API_KEY). Point the provider somewhere else and this plugin follows.