woshi-Tom/dsh-status-plugin ↗★ 1
dsh-status-plugin
A dsh status plugin with host-plane and browser halves: harness runtime health (process, listener, API-key presence, memory, uptime, plugin inventory) as JSON plus server-pushed SSE alerts, surfaced as a header badge with an expanded panel in the Web UI
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:woshi-Tom/dsh-status-plugin说明文档
阅读完整 README ↗dsh-status-plugin
中文 | English
DeepSeek Harness(dsh)的状态插件,一个包内含两个平面:
-
Host 平面 — 以 JSON 形式暴露运行中 harness 的运行时健康状态:进程、监听器、API Key 是否存在、内存、运行时长,以及实时的插件清单。
-
Client 平面 — Web UI(会话右上角)的头部徽标:显示运行时长,点击展开详情面板;当 host 上报过载或内存压力告警时弹出提示。
-
包名:
dsh-status-plugin -
运行时:host + 浏览器 bundle(ESM),使用
tsc+ esbuild 构建到lib/。 -
语言:TypeScript(ESM)。
安装
dsh plugin --profile web add dsh-status-plugin
CLI 会自动协调 dsh.profile.bundles:因为 manifest 声明了 dsh.bundle.patch,该包会加入 profile 的 bundle 层栈。重启 profile 以加载:
dsh-manage.sh restart # 或:dsh web
Client manifest(package.json → dsh.client)声明了浏览器入口;profile 的 client-modules 扫描器会自动拾取并注入 dsh-status-plugin/client.js 到 Web 应用——无需任何 bundle 或 overlay 配置。
用法
插件在 profile 的 web 服务器上注册两个精确路由:
GET /api/status # 按需获取 JSON 快照
GET /api/status/events # Server-Sent Events 流
GET /api/status
响应示例:
{
"ok": true,
"timestamp": "2026-08-14T03:50:00.000Z",
"host": {
"hostname": "host",
"platform": "linux",
"arch": "x64",
"nodeVersion": "v22.23.2",
"pid": 23185,
"cwd": "/root/.dsh",
"uptimeSeconds": 3600,
"loadAvg": [0.1, 0.1, 0.1],
"memory": { "rss": 123456, "heapTotal": 654321, "heapUsed": 432100, "external": 12345 },
"lanAddresses": ["192.168.5.227"]
},
"webServer": {
"host": "0.0.0.0",
"port": 3080,
"url": "http://localhost:3080"
},
"apiKey": {
"configured": true,
"source": "env"
},
"plugins": {
"entries": [
{ "entryId": "llm", "moduleName": "@deepseek-ai/dsh-llm", "enabled": true, "fiberPhase": "active" }
]
}
}