DeepSeek Harness Plugin

XiaoLuoMin/dsh-resource-monitor

Stars ★ 0 Category UI Enhancements Added 2026-11-02

Windows resource monitor for the DeepSeek Harness (dsh) sidebar: samples CPU, memory and clock speed once a minute, keeps a 30-day history and draws separate 24h / 7d charts for CPU and memory (with 85% / 90% alert lines) plus a frequency chart that marks load-time throttling. Reports sustained CPU >= 85% (10 min), memory >= 90% (10 min) and frequency <= 70% of maximum clock under load (5 min).

Install

# from a prebuilt release tarball

dsh plugin --profile web add "https://github.com/XiaoLuoMin/dsh-resource-monitor/releases/latest/download/dsh-resource-monitor.tgz"

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:XiaoLuoMin/dsh-resource-monitor

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.

A DeepSeek Harness (dsh) sidebar plugin that samples your Windows machine once a minute, keeps a 30-day history, and tells you when sustained CPU load, memory pressure, or frequency throttling actually happened — instead of showing a live gauge you have to stare at.

DSH 侧栏插件:每分钟采集一次本机资源,保留 30 天历史,直接用「连续多久超阈值」判定长期高占用、内存吃紧与降频,而不是只给一个需要一直盯着看的实时仪表盘。

What it does / 功能

  • Sidebar tab 资源监控; a matching entry button also sits in the session title bar. / 侧栏 tab「资源监控」,会话标题栏也有入口按钮。
  • Panel order: KPI row, conclusion box, CPU chart (85% alert line), memory chart (90% alert line), frequency chart (70% throttle line), incident list. / 面板顺序:KPI、结论框、CPU 曲线(85% 告警线)、内存曲线(90% 告警线)、频率曲线(70% 降频线)、异常列表。
  • KPI row: current CPU, current memory (used / total GB), current frequency. / KPI:当前 CPU、当前内存(已用/总量 GB)、当前频率。
  • Summary: range average/peak, minutes spent at ≥85% CPU, minutes at ≥90% memory, throttled minutes. / 结论:区间平均/峰值、超阈值累计分钟、降频分钟。
  • Incident list (last 7 days): CPU sustained load, memory near capacity, frequency held down under load. / 异常列表(近 7 天):CPU 长时间高占用、内存接近上限、负载下降频。
  • 24h / 7d toggle, auto-refresh every 30 s. / 24 小时 / 7 天切换,30 秒自动刷新。

Detection rules / 判定规则

Item / 项目 Rule / 规则
Sample interval / 采样间隔 60 s
Retention / 历史保留 30 days (samples.jsonl, append-only)
CPU alert ≥ 85% for ≥ 10 consecutive minutes
Memory alert ≥ 90% for ≥ 10 consecutive minutes
Throttle alert CPU ≥ 50% while frequency ≤ 70% of maximum, for ≥ 5 consecutive minutes

Data sources / 数据来源

  • CPU / memory: Node os.cpus() time deltas, os.totalmem() / os.freemem().
  • Frequency: Windows performance counter \Processor Information(_Total)\% of Maximum Frequency.
  • Disk: \PhysicalDisk(_Total)\Disk Read Bytes/sec, Disk Write Bytes/sec (still sampled into the history, not charted). / 磁盘读写仍写入历史,但不再绘图。
  • Network: Get-NetAdapterStatistics cumulative bytes, converted to a rate between two samples (history only, not charted). / 网络同样只入库不绘图。
  • Disk and network figures come from one powershell.exe child process per sample (~2–4 s, async, never blocks the UI).

No temperature readings / 不采集温度

Reading CPU core temperature on Windows (MSR / SMBus) needs a kernel driver. This plugin does not ship or load one; it deliberately infers throttling from the frequency / maximum-frequency ratio, which reflects the throttling event itself and needs no driver or elevation.

Windows 上读取 CPU 核心温度需要内核驱动。本插件不附带、也不加载任何驱动,改用「当前频率 / 最高频率」判定降频 —— 这个信号直接反映降频事实,且不需要驱动或提权。

Install / 安装

dsh plugin --profile desktop add github:XiaoLuoMin/dsh-resource-monitor

Then restart the DSH app so both the host and the client half load. / 装完重启 DSH 应用(host 与 client 两半都要重新加载)。

Uninstall / 卸载:

dsh plugin --profile desktop remove dsh-resource-monitor

Data location / 数据位置

%USERPROFILE%\.dsh\data\resource-monitor\samples.jsonl

One JSON object per line, one line per minute. Delete the file to reset the history. / 每行一个 JSON 样本,每分钟一行;删除该文件即清空历史。

Layout / 结构

lib/index.js        host: sampling loop, 30-day history, POST /api/resource-monitor.snapshot
client/client.js    client: sidebar tab, entry button, separate CPU / memory / frequency canvas charts, summary and incident list
cordis.patch.yml    bundle insert declaration

License

MIT — see LICENSE.

Changelog / 版本记录

  • 1.1.2 — 结论框移到 CPU 曲线之上;面板顺序:KPI → 结论 → CPU → 内存 → 频率 → 事件。
  • 1.1.1 — CPU 与内存拆成两张独立曲线(各带 85% / 90% 告警线),移除磁盘与网络曲线。
  • 1.1.0 — 插件更名为 dsh-resource-monitor(原 dsh-resource-alerts)。
  • 1.0.2 — 修复结论行的重复百分号;频率卡片增加 CPU 叠加线与 70% 降频基准线。
  • 1.0.1 — 修复 exports 缺少根入口导致 DSH 无法导入。

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.