All plugins

DSH / BUNDLE / BUNDLES

dsh-peak-balance

v0.6.1VviLliAm-qwq / dsh-peak-balance45ce1a557f

InstallableBundlesBundles & other modulesCommunity · Topic auto-analysis

Overview

dsh-peak-balance

Peak/off-peak billing clock with a provider-neutral account readout (DeepSeek balance, subscription plan windows, relay credits), per-turn spend measured from the provider's own counter, and a /hist token-history scene split per provider for dsh-tui

README / EN

Package documentation

Registry summary

Peak/off-peak billing clock with a provider-neutral account readout (DeepSeek balance, subscription plan windows, relay credits), per-turn spend measured from the provider's own counter, and a /hist token-history scene split per provider for dsh-tui

dsh.pub verifies the pinned bundle contract, runtime facts, and distribution semantics. The complete README remains in the source repository.

Read the full README on GitHub

LIMITATIONS

Known limitations

- **The prompt border itself cannot be recolored by a plugin.** dsh-tui 0.10 draws the input frame in its own `EffortInputBorder` component and exposes no seam for it, so the warning frame is a status contribution rendered directly above the prompt — the closest a plugin can get without patching the host. - Cost figures are estimates from provider-reported tokens; the platform bill is authoritative. - The rate card is embedded in the package. A price change on DeepSeek's side requires a plugin update; a model the card does not list needs `/hist price set`. - The account section depends on the provider's own API: **a provider with no public quota interface shows no figure at all** (OpenAI, Gemini, Anthropic prepaid balance, the GLM/Kimi coding plans, Claude subscriptions), rather than a guessed one. A spec stanza can cover your own deployment or an interface this build does not ship. - **Before a restored conversation's first request, the account figure comes from the host's `/model` route, not from that conversation.** dsh-tui emits no session event while it replays a restored session's history, so nothing has named that conversation's own provider yet; if the conversation is pinned to a different provider than the `/model` choice, its first request corrects the line. - **A fresh environment that has not sent a request yet falls back to the `deepseek-official` route**: with no `~/.dsh-tui/model.json` preference and no session event yet, that is the only route the host can report. So if you intend to use another provider and have not configured a DeepSeek key, the account section reads as "no key configured" until your first request names the real provider. Nothing breaks — the line corrects itself after that request. - **Only the DeepSeek official and Command Code adapters were verified against a real account** (see the table above). The other named adapters are implemented from each provider's own documentation and tested with fixture payloads drawn from it; they have not been checked against a live account. - **Undocumented endpoints are opt-in** (`allowUnofficialQuota`), because they can change without notice: a provider whose spec stanza (or the spec document) sets `"allowUnofficial": true` is only queried while that global switch is on too. Command Code's `/alpha/*` routes are exempt: they are the ones the provider's own CLI drives. - **No Command Code price card is embedded.** Its model catalog carries no prices and its pricing page is generated client-side, so an estimate would have been invented; subscription models show tokens only until you set rates with `/hist price set commandcode:<model> …`, while the per-turn figure stays the provider's own measured number. - **Every `/hist` money figure is CNY.** A cost comes from a rate card — the built-in table or your `/th price` custom rates — and both are denominated in CNY per million tokens, so the totals block, the per-provider subtotals and the model table all print `¥`. `credits` describes an account's own meter on the status line; it is never a cost column. - **The history cache is at version 2**, so the first `/hist` after upgrading rebuilds it from the session logs (a few seconds on this machine; the scan checkpoints as it goes). - **`/quota`'s provider list** merges the LLM seam's directory, the generated catalog snapshot and the spec file; a route declared in the composition but not currently routable may not appear. - **The balance is shown in the currency the endpoint reports.** The payload carries `currency` (`CNY`, `USD`, …), and the line uses the matching symbol (`¥`, `$`); an unknown currency falls back to its ISO code (`12.34 CHF`) instead of passing a dollar figure off as yuan. - Rich status contributions share a six-row budget with other plugins; this one requests three rows, and only while the warning frame is visible. - The line follows the conversation the host reports