linkingoscar/dsh-billing-glass 预览 preview

linkingoscar/dsh-billing-glass

DeepSeek Harness Web GUI 的液态玻璃计费覆盖层:提供商余额、会话费用、每日支出和令牌桶。以 DeepSeek 为首,且可扩展。

Project Overview项目介绍

dsh-billing-glass is a billing overlay plugin for the DeepSeek Harness Web GUI. It pins a liquid-glass capsule in the bottom-right corner showing the provider balance; click to expand a full billing card with session cost, daily/monthly/all-time spend, token-bucket breakdown, and a provider list. It polls every 10 seconds (DeepSeek cache TTL 10s, other providers 60s, official daily spend 5 min), refreshes on focus and tab visibility, and force-refreshes via a manual button. Costs use the official price policy, unknown models fail closed without zero-charging, and an append-only JSONL ledger auto-compacts. The settings page requires Harness v0.1.0-rc.7+, and the Daily spend row needs DEEPSEEK_PLATFORM_TOKEN configured.

dsh-billing-glass 是 DeepSeek Harness Web GUI 的计费浮窗插件,在右下角常驻液态玻璃胶囊显示账户余额,点击展开计费卡:会话费用、当日/本月/累计支出、token 明细、多服务商列表。客户端每 10 秒轮询余额,DeepSeek 缓存 TTL 10 秒,官方日消费缓存 5 分钟;窗口聚焦、切签、展开卡均立即刷新,手动按钮强制刷新当前服务商。计费基于官方价格策略(含 2026-08-17 峰谷档),未知模型失败闭合不会零计费,账本以 JSONL 追加写入并自动压缩与迁移。仅在 Harness v0.1.0-rc.7+ 设置中可见该页,Daily spend 行需要配置 DEEPSEEK_PLATFORM_TOKEN。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:linkingoscar/dsh-billing-glass

把 linkingoscar/dsh-billing-glass 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-billing-glass — Liquid-Glass Billing Overlay

license version harness GitHub

English | 中文

社区第三方插件,与 DeepSeek 官方无隶属关系 · Unofficial community plugin, not affiliated with or endorsed by DeepSeek.

Expanded billing card / 展开态计费卡 Capsule / 胶囊态

A billing overlay plugin for the DeepSeek Harness Web GUI: a liquid-glass capsule pinned to the bottom-right corner showing the provider balance; click to expand a full billing card (session cost, daily spend, token-bucket breakdown, provider list). DeepSeek-first, with an extension point for more API providers.

Features

Tested with Harness 0.2.0-rc.2 (developer prerelease, commit 639ed015397290b3745d163aafe02ffee4aa3f84). API-key usage retains its existing pricing. Harness's deepseek-account quota is separate and is reported as an unrecognized provider; it is never estimated using API-key prices, even on a shared hostname.

  • Always-on glass capsule: status dot + provider name + balance at a glance; click to expand. The expanded card's header is draggable (position stored in localStorage; it can be dragged anywhere on the page with no bottom dead zone). The card disables horizontal overflow — no horizontal scrollbar needed to reach content.
  • Fresh data: the client polls every 10s; the DeepSeek balance cache TTL is 10s (other providers 60s); official daily spend is cached for 5 minutes; window focus, tab visibility change and card expansion refresh immediately, and the manual refresh button force-refreshes the current provider balance via POST.
  • Liquid-glass material: backdrop-filter frost + translucent theme colors + specular highlight border + refraction sheen layer + soft float shadow; follows the --dsw-* light/dark theme automatically.
  • Per-message cost badge: each assistant message's action bar shows a small cost chip (hover for the input/cache/output token split and model). On Harness 0.1.6, the billing card follows the main conversation while message chips refresh independently in every open pane, including historical sessions.
  • Settings card: a "Billing capsule" page in the settings panel (Harness v0.1.0-rc.7+; hidden automatically on older hosts): toggle the glass capsule / per-message cost chips, and reset the card position in one click. Changes apply instantly and stay in the local browser only.
  • Model series tag: the capsule and card show a short alias for the current model — DeepSeek Pro/Flash/Flash-Vision, Moonshot K2.5/K3, GPT 5.6-Sol/5.6-Terra/5.6-Luna, Claude Opus-4, Gemini 2.5-Pro, Qwen 3.7-Max, GLM 5.2; long tags ellipsize instead of stretching the card.
  • Spend ledger & stats: an append-only JSONL ledger (storages/billing-glass-ledger.jsonl, idempotent, debounced appends, periodic compaction; the legacy billing-glass-ledger.json is migrated automatically; bad lines and partial tails are detected at startup, repaired and surfaced as a degraded warning). The expanded card shows today / this month / all-time totals, bucketed by the browser's IANA timezone so a UTC server does not shift the day boundary. costUsd is the only aggregation base; display uses costNative + nativeCurrency — the ambiguous single cost field is gone.
  • Session cost: every assistant/message is priced against the official price policy, including the September 10, 2026 04:00 UTC V4.1 Flash price change. deepseek-flash and the two legacy Flash names use the new peak/valley prices from that instant; earlier calls retain their historical policy. Pro prices remain unchanged. Live and replay share one canonical attribution pipeline (header > source) and are merged with messageId dedupe; full persistent-log replay (including pre-install history) + live fallback. Harness v0.1.3+ uses read-only SessionHandles and revision caching, including the {eventState, events} result in v0.1.5; older hosts retain raw-log replay. Backends exposing neither read handles nor per-session raw artifacts degrade to live-only. Historical requests also restore the session's provider and model badge after a host restart; new live requests take precedence. Hover ⓘ for the tokens × unit price = subtotal formula.
  • Historical price snapshots: the first price applied to each message is persisted with its bucket subtotals and catalog source. Replaying an old session reuses that snapshot, so a later catalog upgrade cannot silently rewrite historical spend.
  • Unknown models fail closed: a model missing from the catalog (catalog lag, alias rename, brand-new model) is never silently priced at zero — the message is marked unpriced, the card and spend stats expose unpricedCalls: N, and the ledger stores priced: false.
  • Daily spend (official only): the row appears only when DEEPSEEK_PLATFORM_TOKEN is configured. Without it the row is hidden — a balance-delta estimate would be confused by top-ups/refunds, so it is no longer a display source.
  • Pricing sync check (button): the card's "plan" row has a ↻ verify pricing button that pulls the official pricing source of only the currently displayed provider and compares it against the built-in policy chain → ✅ synced / ⚠ drift found (details listed, page snapshot saved to storages/billing-glass-pricing-snapshot.html for the assistant to analyze) / unparseable (page changed; guided back to chat). 60s debounce.
  • Multi-provider auto-switching: the card follows the provider in current use — the session's latest request/header provider > the harness-configured active provider (Settings → Models, agent-default-model) > the registry's first entry (DeepSeek-first). Click any provider in the bottom list to inspect it manually, click again to restore auto-follow; the configured active provider carries an "active" badge, providers without a configured key a "not configured" marker.
  • Plan / fee system: each provider declares its plan (token pay-as-you-go / subscription); the "plan" row shows the billing mode + the current price tier (standard / peak / valley). Catalog models whose token prices are all zero are shown as subscription/quota plans and remain unpriced, never as "free" metered usage.
  • Daily spend (official, optional): without DEEPSEEK_PLATFORM_TOKEN the row is hidden. With it, the card shows the exact official consumed value:

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-chat-image-lightbox 下一个 Next dsh-llm-finish-reason-tolerance →