
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-better-stats
Advanced tools
Enhanced DSH composer stats strip: official CNY cost, coherent live agent-team settlement, live LLM/tool timers, provider balance
A richer stats strip for the DeepSeek Harness (DSH) Web UI, sitting right below the composer: official CNY pricing (peak/off-peak tiers, auto-synced from the official pricing page), per-model accounting, live timers, subagent-tree merging, direct account balance, budget alerts, and streaming cost estimation.
DeepSeek Official | Balance ¥8.67 | Turn ¥0.1676 · Session ¥29.49 | 20 turns · 345 steps | LLM 1h 12m · Tool 5m 6s | TTFT avg 3.88s · 111.72tok/s | Cache 103.98M · hit 98.64% | In 1.44M · Out 336.53K
api.deepseek.com/user/balance directly (the DEEPSEEK_API_KEY credential goes through the DSH credentials seam, never the browser), 15s cache; click the balance group to force a fresh query (after switching models/API the balance would otherwise only update on the next poll; the host has a 2s anti-flood cooldown). The hover popover shows the granted / topped-up split (degrades to the total when fields are missing), a days-left estimate (EWMA-smoothed from today's spend and the trailing daily history), and a recharge link from the warn tier down.DeepSeek Official 2026-08-18 14:16). Peak/off-peak tiers (peak = Monday–Friday, Beijing 09:00–12:00 / 14:00–18:00, ×2 price; weekends are off-peak) apply per event timestamp; the strip shows the current tier and the popover the next switch with a countdown that skips weekends.deepseek-v4-flash / deepseek-v4-pro / deepseek-v4-flash-vision-exp each use their official table). Unknown models are explicit: their tokens still total up but price at 0, the popover's Model group shows Unpriced, and the spend row notes the unpriced step count instead of silently pricing at a default./live route publishes one coherent tree cut keyed by session id and event revision. Exact usage, CNY and model rows from the root, direct children and nested children reach the selected parent panel immediately; active children also contribute their streaming output estimate, turn/step, TTFT and tok/s without waiting for the 10s /cost baseline or requiring a browser binding for the child. A usage chunk replaces the estimate in place. Turn remains the selected session's current turn; Session accounting, usage and output represent the whole agent-team tree, while LLM/tool durations include only the selected session so parallel children cannot multiply elapsed time. Only origin: subagent joins the tree, ordinary forks remain separate, every session excludes its own seedLength, and a child transcript temporarily spliced into its parent is not counted twice.outputTokens already includes reasoningTokens — reasoning is a display-only subset used for detail stats only, never billed twice, and the settled tok/s numerator is sum(outputTokens); invalid samples count as invalid steps instead of being clamped. The initial model is unknown (never flash): unknown tokens still total and show as Unpriced; a legal costCny: 0 is a real answer (absence is null/undefined); partial/stale snapshots mark the amount (stale/partial); model shares are priced-cost shares and token-share denominators include unknown. Prices come from a versioned ledger (effectiveAt); one immutable pricing snapshot serves the whole tree per request and caches are keyed by pricingVersion.config: { dailyBudgetCny: 20, monthlyBudgetCny: 100 } — the spend group turns amber past 80% and red with ⚠ over budget; the popover shows Today ¥x · daily budget ¥20 (85%) / Month ¥y · monthly budget ¥100 (30%) (Asia/Shanghai midnight/month rollover).config: { balanceWarnCny, balanceCriticalCny } adjusts the thresholds, 0 disables a tier.*-chunks estimator and adaptive factor; invisible children send only a text-free token-fragment summary from the host (factor 1.01), replaced by exact provider usage at hand-off. An abnormal dispose freezes the host tree's durations and clears provisional output, and a provisional edge expires after five seconds without a fresh /live cut, so an interrupted child cannot tick forever.0 turns · 0 steps, LLM - · Tool -, --, Cache 0 · hit 0.00%, In 0 · Out 0, Turn ¥0.0000 · Session ¥0.0000) and are replaced in place once data arrives.⋯ (measured from cached natural widths — no flicker, no feedback loop).cd ~/.dsh/profiles/web
pnpm add dsh-better-stats
then register the package as a bundle (add dsh-better-stats to the dsh.profile.bundles array in the profile package.json), restart dsh web and hard-refresh the browser. The bundled cordis.patch.yml mounts the plugin row automatically — no manual YAML editing.
Defaults: two-tier balance alerts (warn ¥20 / critical ¥5), no daily/monthly budget. To customize, set any of balanceWarnCny / balanceCriticalCny (0 disables a tier), dailyBudgetCny / monthlyBudgetCny (presence enables) in the plugin's config.
git clone https://github.com/null5069/dsh-better-stats.git
cd dsh-better-stats # no runtime dependencies — no npm install needed
symlink the directory into the profile (ln -s "$PWD" ~/.dsh/profiles/web/node_modules/dsh-better-stats), add "dsh-better-stats": "link:/absolute/path/dsh-better-stats" to the profile package.json dependencies, then follow the bundle-registration + restart steps above.
| Half | File | What it does |
|---|---|---|
| Host | lib/index.js | /balance; per-root 10s /cost baselines; /live coherent root/subagent trees with usage, price, models, timers, text-free stream summaries and revision vectors; /today; official pricing sync every 6h |
| Client | lib/client.js | conversation.composer.dock strip; turn fold + streaming estimate; 1s /live polling; budget/peak countdown popover; two-row truncation with ⋯; i18n (zh/en) |
| Tests | test/ | Zero-dependency accounting, client UI, agent-team live-tree and lifecycle regressions, including test/host-live-tree.test.mjs |
Every route response carries pricing: { source: "official"|"builtin"|"stale", fetchedAt, tables } and an optional budget, so the client never hard-codes price numbers.
MIT
FAQs
Enhanced DSH composer stats strip: official CNY cost, coherent live agent-team settlement, live LLM/tool timers, provider balance
The npm package dsh-better-stats receives a total of 168 weekly downloads. As such, dsh-better-stats popularity was classified as not popular.
We found that dsh-better-stats demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.