huanyuLv/dsh-balance-tide
DeepSeek Harness (DSH) Web Plugin: Balance + Peak and Valley Pricing Tide Alerts
dsh-balance-tide is a DeepSeek Harness Web plugin showing account balance plus a peak/off-peak pricing tide indicator: a live readout row under the composer (e.g. '[off-peak] peak in 2h 15m | Balance ¥28.78 | ~¥0.42 this session | ?'), a pricing badge and countdown ticking every second in Beijing time, live balance from the official /user/balance endpoint, and per-session cost estimated at current-period prices. Hovering shows the full price tables for the current and next period (deepseek-v4-flash / deepseek-v4-pro, peak = 2× off-peak), peak windows (09:00–12:00 and 14:00–18:00), and usage advice; the ? icon opens the official pricing page. Zero configuration and i18n (中文/English).
Install
dsh plugin --profile web add https://github.com/huanyuLv/dsh-balance-tideGit URL install per README (npm package dsh-balance-tide NOT published as of 2026-08-24 — registry check returned not found, so the Git URL is the documented install path): dsh plugin --profile web add https://github.com/huanyuLv/dsh-balance-tide (or a local directory: dsh plugin --profile web add file:/path/to/dsh-balance-tide). Restart dsh web to take effect. Requires pnpm (npm i -g pnpm). Zero-config: reuses DEEPSEEK_API_KEY from DSH credentials — no key in the repo, ever.
Compatibility
DeepSeek Harness (DSH) Web plugin. Live readout row under the composer: pricing badge (standard before 2026-08-17 / peak / off-peak judged live in Beijing time), countdown to the next pricing switch, balance from the official /user/balance endpoint (granted/topped-up split), session cost estimated at current-period prices from sessionProjections. Hover details show full price tables, the peak/off-peak gap (peak = off-peak × 2), peak windows, and usage advice. Config in $DSH_HOME/profiles/web/cordis.patch.yml: refreshIntervalMs, clientPollIntervalMs, currency, allowedHosts, tideCutoff, peakWindows, tidePrices. Security: baseUrl must be https; balance route readers checked (localhost/IP/allowedHosts; same-origin Origin required); only a small set of error codes goes to the browser.
Details
- Repo: huanyuLv/dsh-balance-tide
- Category: Coding & Development
- Stars: 6
- Version: Git URL install https://github.com/huanyuLv/dsh-balance-tide (README-documented; version badge 0.4.0). npm package not published as of 2026-08-24
- Last push: 2026-08-22
- First seen: 2026-08-14
Recent updates
The current bilingual README (English primary) documents: the tide readout, features, the peak/off-peak schedule with the 2026-08 pricing table, install (Git URL/local; npm package absent), configuration with overrides, security model (credentials, balance endpoint, error reporting), and known limitations (costs are estimates at current-period prices).
FAQ
- Does it need its own API key?
- No — it reuses DEEPSEEK_API_KEY from DSH credentials. The apiKey config option is an escape hatch only and lands in a config file in plaintext, so the README advises avoiding it.
- Is the balance route safe?
- The /query-tide route serves your account balance, so readers are checked: the Host must be localhost, an IP literal, or a domain in allowedHosts (blocks DNS rebinding), and any request carrying an Origin must be same-origin; rejected reads get a 403.
- Are costs exact?
- No — costs are estimates computed at current-period prices (reusing sessionProjections with same-turn/step samples replacing rather than double-counting); the official invoice is the authoritative figure.
Alternatives
Ghost011118/dsh-balance-meter · jelly-000/dsh-balance-monitor · stevenx65/dsh-balance-plugin