deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
English | 中文
DeepSeek account balance in the DSH Web composer stats line: an ambient readout, always visible above the input box, that shows the account balance and the per-session spend:
余额 ¥128.50 · 本次会话用量 ¥3.25
The balance comes from the official DeepSeek GET /user/balance endpoint, fetched by the host half (which sidesteps browser CORS). The per-session spend uses the balance-difference method: the first balance read for a session is recorded as its starting balance, and spend is the drop from it, clamped to zero.
GET /api/balance (loopback-only), resolves the API key through DSH's ctx.credentials service, fetches and caches the DeepSeek balance for the configured interval, and registers the api-balance settings namespace.conversation.composer.dock (the built-in stats line above the input box) and a settings card in the Web UI plugin group.Install the family aggregate package @linxin666/dsh-web-ui-all (all plugins and skins in one) or this plugin alone:
# Recommended: install directly from npm
dsh plugin --profile web add @9Epuuuu/dsh-api-balance
# Or from the repository (development loop)
git clone https://github.com/9Epuuuu/dsh-api-balance.git
cd dsh-api-balance
pnpm install && pnpm build
dsh plugin --profile web add link:$(pwd)
Restart dsh web, set the API key credential reference in the plugin settings, and the balance line appears above the input box.
| Key | Type | Default | Meaning |
|---|---|---|---|
apiKeyEnv |
string |
'' |
DSH credential reference to resolve the DeepSeek API key from, e.g. DEEPSEEK_API_KEY |
refreshIntervalSec |
number |
60 |
Minimum seconds between balance fetches (also the browser poll cadence) |
enabled |
boolean |
true |
Master switch for the plugin (browser half + host route) |
The account balance is global; the per-session spend is derived per sessionId:
localStorage, keyed by session id) as that session's starting balance.max(0, starting balance - current balance).A function/namespace plugin: inject / Config / apply, no default export. The DeepSeek adapter (./deepseek-balance) is a pure fetch-and-normalize helper.
Nothing. The plugin injects no prompt sections, registers no tools, and emits no session events of its own.
Zero per request.
No system-prompt contribution, so no cache-stability effect.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。