Headroom control panel for DSH: proxy mode/health, peak/off-peak CNY savings, per-agent charts, and one-click switching or updates.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:nkf798480042-ai/dsh-best-headroom
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
DeepSeek Harness(DSH)的 Headroom 控制面板:只读状态、DS 价格/节省、汇率、最近请求、代理启动与模式切换。
前置条件
- Windows 10/11 x64,DSH 已安装并可启动。
- headroom 由用户自己安装(插件不代装):
headroom 正常通过 uv 安装,因此 uv 通常已存在;插件不下载 uv。uv tool install "headroom-ai[proxy]" - 不需要
headroom-proxybundle;市场版由面板按钮管理代理。
安装
把 dsh-best-headroom 加入 DSH profile 的 dependencies 和 bundles,或通过 DSH 市场安装。
本地开发可 link:
"dependencies": {
"dsh-best-headroom": "link:D:/dsh/projects/dsh-best-headroom"
}
使用
- 启动 DSH,打开“Headroom”侧栏面板。
- 没有配置地址时,点 开启代理:
- 拉起
127.0.0.1:8787 - 等待
/healthready - 写入
baseURL/inferenceOrigin - 备份
cordis.patch.yml.bak-dsh-best-headroom-*
- 拉起
- DSH 会热加载新地址,通常立即生效;若连接异常再重启 DSH。
- 已经直连/自定义时插件不改;用户点“切回代理”才切换。
- 代理不可达时点“启动代理”;不会杀未知端口进程。
- 没装 headroom 时,面板顶部显示 未检测到 Headroom 和安装命令,不会误报“检查失败/需要梯子”。
- 代理冷启动约 10–35 秒;按钮会等到
/healthready 再继续,最长等 45 秒。
数据口径
- 主节省数据来自
~/.headroom/savings_events.jsonl。 - DS 模型按插件内置
deepseek-flash价目表:off-peak0.003/0.15/0.60USD/1M,北京峰值 09-12、14-18 为 2×;其他模型沿用账本成本。 - 汇率读
~/.headroom/panel-fx.json,失败回退 7.2。 - 因此金额与 headroom dashboard 的 cache-aware 金额有意不同。
开发
node --check index.js
node --check client.js
npm test
测试覆盖 DS 峰谷价、账本聚合、profile 写入/备份、自动/手动边界、更新前停守护的顺序、客户端按钮层级与“未安装 headroom”提示。
干净机器闭环(真起一个代理,默认随机空闲端口,不动 8787;同一时间只允许一个实例)可手动跑:node tests/e2e-clean-machine.mjs [port]。
隐私
插件不打包、不读取、不上传用户账本、凭据或 ccr_store.db;只读本地路径用于展示。
Links
More in this category
bowenliang123/dsh-context★ 5656
DSH context insight panel: Context dashboard + /context command + Context browser — one-stop context lifecycle management with categorized composition, content details, evolution trends, compaction/injection events, and stats.
Han-1413141/dsh-cost-meter★ 781
Per-session and daily API cost, budget with usage %, official balance, history dashboard, and one-click official price sync with peak/off-peak pricing.
wssfk12138/dsh-damage-pulse★ 291
Tracks DeepSeek token usage, per-call and session costs, and account balance with cache-aware charge animations in the DSH Web UI.
zh667/TokenLedger★ 207
Sidebar usage panel that attributes tokens to the relay site that served each request, read from your existing provider config: today/month/all-time totals, per-site and per-model breakdowns, a year activity heatmap, and New API / Sub2API / DeepSeek balances.
Ychris12138/dsh-usage-stats★ 194
Multi-provider usage dashboard with provider/model token breakdowns, calendar drill-downs, account balances, and OpenCode Go / Z.ai subscription quota tracking.
PolinniZhong/dsh-personal-center★ 114
Personal center for DeepSeek Harness: cross-session usage statistics with per-provider and per-model breakdown (auto-discovers configured models), per-model cost estimation, global custom instructions, a data-driven desktop pet with bitmap & vector skins, and a conversation status overview, all local and offline.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.