LBurny/dsh-plugin--packages-dsh-doctor ↗★ 0

dsh-doctor

DSH运行状态诊断与日志查看工具 适合需要监控DSH进程指标、系统版本及实时查看运行日志的开发者。

套件
dsh-doctor
相容性
待驗證
Harness 依賴範圍
^0.2.0-rc.1
版本
0.1.0
授權
MIT
最近更新
2026年10月10日

同名套件的其他儲存庫

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:LBurny/dsh-plugin#7922dc00723785a651a741a9d255357f56b87f56&path:packages/dsh-doctor

dsh-doctor

Harness diagnostics from inside dsh: version, port, pid, uptime, memory, profile, and a log tail.

Ported from DSHDesktop's diagnostics page. Two log sources, best effort in this order:

  1. The desktop shell's unified events.log (/../events.log), present when this dsh runs under DSHDesktop — that file already holds both the shell's lines and the child dsh's stdout.
  2. This plugin's own ring buffer, which always exists.

A bare ~/.dsh setup therefore still gets a useful panel.

Placement

With dsh-features (功能管理) installed, this panel appears on that hub's single page and no longer docks its own corner button; without the hub — a bare dsh, or a profile where it is not installed — the floating panel is built exactly as before. The coupling is two DOM-level conventions (window.__dshFeatures, #dsh-launchers), described in the repository's AGENTS.md.

Install

dsh plugin --profile web add github:LBurny/dsh-plugin#path:/packages/dsh-doctor
# pin a commit:
dsh plugin --profile web add github:LBurny/dsh-plugin#&path:/packages/dsh-doctor

--profile web = DSHDesktop's shell, --profile desktop = the official desktop app; the panel needs no flag.

Restart dsh afterwards — plugins have no HMR.

What it does

  • Status: dsh and node versions, state, port, pid, uptime, resident memory, profile name, DSH home, patch document path, session count, platform.
  • Log tail: the last 500 lines of the shell log (read through a 512 KB byte window, with the partial first line dropped) or of the plugin's own ring.
  • /doctor prints a compact version of the same thing, ten log lines included.

Routes

MethodPathPurpose
GET/dsh-doctor/panel.js /dsh-doctor/panel.cssbrowser half
GET/dsh-doctor/api/diagnosticsthe status document
GET/dsh-doctor/api/logs{ source, path, lines }

Data

Nothing. This plugin writes no files and edits no configuration; it only reads.

Caveats

  • It cannot restart dsh: the plugin runs inside the process being restarted. Use the desktop shell's tray menu, or your own process manager.
  • It reports only its own plugin's actions in the ring. Other dsh-plugin packages keep their own logs; the shared events.log is the place to see everything at once.

Test

cd "$DSH_HOME/profiles/plugins/dsh-doctor"
node test/doctor.test.mjs

License

MIT.