{"_id":"dsh-server-deck","_rev":"5-0be1405d360e45a5cbdf2c9ee173807f","name":"dsh-server-deck","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"dsh-server-deck","version":"0.1.0","keywords":["dsh","dsh-plugin","deepseek-harness","ssh","server-monitor","dashboard","terminal","better-sidebar"],"license":"MIT","_id":"dsh-server-deck@0.1.0","maintainers":[{"name":"meyaomiao","email":"xzb17688621221@outlook.com"}],"homepage":"https://github.com/meyaomiao/DSH-server-deck#readme","bugs":{"url":"https://github.com/meyaomiao/DSH-server-deck/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["@deepseek-ai/dsh-client-runtime"],"platform":"web"}},"dist":{"shasum":"5a49a044fc924268fed502f661ea2011e33dc186","tarball":"https://registry.npmjs.org/dsh-server-deck/-/dsh-server-deck-0.1.0.tgz","fileCount":7,"integrity":"sha512-T1+FiECdEHPQ96pgf43u3OyRlifOooPVEq9oeFtxl4V1oVANy9WvUu675WIHN9/V2mCKfknyHn0SKEUfuAgyRQ==","signatures":[{"sig":"MEUCIESTJAP6Q/5po0mNCIRIRbKsqMNQARroI32HOgd/tLkUAiEAqDdGjkwRZ8ZAHwmvc0BWCdn7LNQf7dy7sljtgOGeY78=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":555320},"main":"lib/index.js","type":"module","engines":{"node":">=20"},"exports":{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},"gitHead":"7381a2b563501a5bb119498d3e85a7214a20a2c6","scripts":{"test":"node --experimental-transform-types --test \"test/*.test.ts\"","build":"node scripts/build.mjs","typecheck":"tsc --noEmit"},"_npmUser":{"name":"meyaomiao","email":"xzb17688621221@outlook.com"},"repository":{"url":"git+https://github.com/meyaomiao/DSH-server-deck.git","type":"git"},"_npmVersion":"11.17.0","description":"DSH 能力插件:服务器卡片仪表盘——已连接服务器的卡片视图(状态/CPU/内存/磁盘/延迟)+ 点卡片进入 xterm 交互终端;better-sidebar 页签与独立右侧抽屉双形态挂载","directories":{},"_nodeVersion":"24.19.0","dependencies":{"ws":"^8.18.0","ssh2":"^1.16.0"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.2","@types/ws":"^8.5.13","typescript":"^5.6.0","@types/node":"^26.2.0","@types/ssh2":"^1.15.4","@types/react":"^18.3.31","@xterm/xterm":"^5.5.0","@types/react-dom":"^18","@xterm/addon-fit":"^0.10.0","@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-host-webserver":"0.1.0-rc.8"},"peerDependencies":{"@deepseek-ai/dsh-host-webserver":">=0.1.0-rc.8"},"_npmOperationalInternal":{"tmp":"tmp/dsh-server-deck_0.1.0_1787739691690_0.9898129448728841","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"dsh-server-deck","version":"0.1.1","keywords":["dsh","dsh-plugin","deepseek-harness","ssh","server-monitor","dashboard","terminal","better-sidebar"],"license":"MIT","_id":"dsh-server-deck@0.1.1","maintainers":[{"name":"meyaomiao","email":"xzb17688621221@outlook.com"}],"homepage":"https://github.com/meyaomiao/dsh-server-deck#readme","bugs":{"url":"https://github.com/meyaomiao/dsh-server-deck/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":[],"platform":"web"}},"dist":{"shasum":"d8393d638439684f09b6b254e2355dda20238ebe","tarball":"https://registry.npmjs.org/dsh-server-deck/-/dsh-server-deck-0.1.1.tgz","fileCount":7,"integrity":"sha512-mtUcBLiyVAAUvYTZctm8D5cQ6Gb+IJkdtNOu7E6GK6K7TsOl0ojbxii/0Borve4sahX1zr/HEeZa0zKa2lP+WA==","signatures":[{"sig":"MEQCIAZKD1HV1zfpoaHo0LcdxU1FfSdSsYXvXR5tgRAsPLqXAiB6dJHfbMrPTERvBGdADrRvaNaBR37qsOEN2FKjewB9kA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":555951},"main":"lib/index.js","type":"module","engines":{"node":">=20"},"exports":{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},"gitHead":"2674cb363a1b817d2871ce443aba25cdf096291b","scripts":{"test":"node --experimental-transform-types --test \"test/*.test.ts\"","build":"node scripts/build.mjs","typecheck":"tsc --noEmit"},"_npmUser":{"name":"meyaomiao","email":"xzb17688621221@outlook.com"},"repository":{"url":"git+https://github.com/meyaomiao/dsh-server-deck.git","type":"git"},"_npmVersion":"11.17.0","description":"DSH 能力插件:服务器卡片仪表盘——已连接服务器的卡片视图(状态/CPU/内存/磁盘/延迟)+ 点卡片进入 xterm 交互终端;better-sidebar 页签与独立右侧抽屉双形态挂载","directories":{},"_nodeVersion":"24.19.0","dependencies":{"ws":"^8.18.0","ssh2":"^1.16.0"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.2","@types/ws":"^8.5.13","typescript":"^5.6.0","@types/node":"^26.2.0","@types/ssh2":"^1.15.4","@types/react":"^18.3.31","@xterm/xterm":"^5.5.0","@types/react-dom":"^18","@xterm/addon-fit":"^0.10.0","@deepseek-ai/cordis":"^4.0.2","@deepseek-ai/dsh-host-webserver":"0.1.2-alpha.4"},"peerDependencies":{"@deepseek-ai/dsh-host-webserver":"0.1.1-rc.2 || >=0.1.2-alpha.2"},"_npmOperationalInternal":{"tmp":"tmp/dsh-server-deck_0.1.1_1788335854829_0.9694235429991789","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"dsh-server-deck","version":"0.2.2","keywords":["dsh","dsh-plugin","deepseek-harness","ssh","server-monitor","dashboard","terminal","better-sidebar","metrics","trend"],"license":"MIT","_id":"dsh-server-deck@0.2.2","maintainers":[{"name":"meyaomiao","email":"xzb17688621221@outlook.com"}],"homepage":"https://github.com/meyaomiao/dsh-server-deck#readme","bugs":{"url":"https://github.com/meyaomiao/dsh-server-deck/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":[],"platform":"web"}},"dist":{"shasum":"fd157cb3e0ae87000118b8c2b31db19db1403c5d","tarball":"https://registry.npmjs.org/dsh-server-deck/-/dsh-server-deck-0.2.2.tgz","fileCount":7,"integrity":"sha512-5+tL9aca8iEJacG3t+vQrnBH/kMdPlIX1YsyfPYHSySeNu2KnMtaNfIC1mZjRy7cI2K8WBgEWWWFyQ+ZkaMgBg==","signatures":[{"sig":"MEYCIQCvsXViO7xA/DbnSsnFN8AHTMPVYasAGxnDLPrWjEaNsQIhANGbwBRWxRfrajXLuF24iO4On8U/yKoAdJzMJ7Y6xoou","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":657078},"main":"lib/index.js","type":"module","engines":{"node":">=20"},"exports":{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},"gitHead":"8944ea708412d960f9743da02995ff1a0315f2e1","scripts":{"test":"TZ=Asia/Shanghai node --experimental-transform-types --test \"test/*.test.ts\"","build":"node scripts/build.mjs","typecheck":"tsc --noEmit"},"_npmUser":{"name":"meyaomiao","email":"xzb17688621221@outlook.com"},"repository":{"url":"git+https://github.com/meyaomiao/dsh-server-deck.git","type":"git"},"_npmVersion":"11.17.0","description":"DSH 能力插件:服务器卡片仪表盘——实时状态/CPU/内存/磁盘 + 趋势记录与可视化(1h/24h/7d/30d) + 点卡片进入 xterm 交互终端","directories":{},"_nodeVersion":"24.19.0","dependencies":{"ws":"^8.18.0","ssh2":"^1.16.0"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.2","@types/ws":"^8.5.13","typescript":"^5.6.0","@types/node":"^26.2.0","@types/ssh2":"^1.15.4","@types/react":"^18.3.31","@xterm/xterm":"^5.5.0","@types/react-dom":"^18","@xterm/addon-fit":"^0.10.0","@deepseek-ai/cordis":"^4.0.2","@deepseek-ai/dsh-host-webserver":"0.1.2-alpha.4"},"peerDependencies":{"@deepseek-ai/dsh-host-webserver":"0.1.1-rc.2 || >=0.1.2-alpha.2"},"_npmOperationalInternal":{"tmp":"tmp/dsh-server-deck_0.2.2_1788519860492_0.2680030638357822","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"dsh-server-deck","version":"0.2.3","keywords":["dsh","dsh-plugin","deepseek-harness","ssh","server-monitor","dashboard","terminal","better-sidebar","metrics","trend"],"license":"MIT","_id":"dsh-server-deck@0.2.3","maintainers":[{"name":"meyaomiao","email":"xzb17688621221@outlook.com"}],"homepage":"https://github.com/meyaomiao/dsh-server-deck#readme","bugs":{"url":"https://github.com/meyaomiao/dsh-server-deck/issues"},"dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":[],"platform":"web"}},"dist":{"shasum":"b6baf0e8bb509fef9a39c32a5f3aa663ae565174","tarball":"https://registry.npmjs.org/dsh-server-deck/-/dsh-server-deck-0.2.3.tgz","fileCount":7,"integrity":"sha512-zAqfIeV0k2O6pSt0fq7Ol8RVR1EqFSyON+w3nr+am4FQPyP8DDLBOJ7OA/IW2HA6BkTaqyya6wBJWN1ZCvLZRg==","signatures":[{"sig":"MEQCIHXI84cJ/X+36czxBPHIg43PhXcF++iUbv9yVT0Tvn4RAiBc3E7eGoAsgw9Ox7Ed5/JooPC7kInnWpk8hAS0dnIHRg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":667948},"main":"lib/index.js","type":"module","engines":{"node":">=20"},"exports":{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},"gitHead":"18bf2f767cffcedec36b41645f41da48f25e28c4","scripts":{"test":"TZ=Asia/Shanghai node --experimental-transform-types --test \"test/*.test.ts\"","build":"node scripts/build.mjs","typecheck":"tsc --noEmit"},"_npmUser":{"name":"meyaomiao","email":"xzb17688621221@outlook.com"},"repository":{"url":"git+https://github.com/meyaomiao/dsh-server-deck.git","type":"git"},"_npmVersion":"11.17.0","description":"DSH 能力插件:服务器卡片仪表盘——实时状态/CPU/内存/磁盘 + 趋势记录与可视化(1h/24h/7d/30d) + 点卡片进入 xterm 交互终端","directories":{},"_nodeVersion":"24.19.0","dependencies":{"ws":"^8.18.0","ssh2":"^1.16.0"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.2","@types/ws":"^8.5.13","typescript":"^5.6.0","@types/node":"^26.2.0","@types/ssh2":"^1.15.4","@types/react":"^18.3.31","@xterm/xterm":"^5.5.0","@types/react-dom":"^18","@xterm/addon-fit":"^0.10.0","@deepseek-ai/cordis":"^4.0.2","@deepseek-ai/dsh-host-webserver":"0.1.2-alpha.4"},"peerDependencies":{"@deepseek-ai/dsh-host-webserver":"0.1.1-rc.2 || >=0.1.2-alpha.2"},"_npmOperationalInternal":{"tmp":"tmp/dsh-server-deck_0.2.3_1788881768916_0.8057023538943344","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"_id":"dsh-server-deck@0.3.0","dsh":{"bundle":{"patch":"./cordis.patch.yml"},"client":{"inject":["slots"],"platform":"web"}},"bugs":{"url":"https://github.com/meyaomiao/dsh-server-deck/issues"},"dist":{"shasum":"b04fd45b265f03eebfadbada84907e6b89634065","tarball":"https://registry.npmjs.org/dsh-server-deck/-/dsh-server-deck-0.3.0.tgz","fileCount":7,"integrity":"sha512-akys7goqtCWZeMpXbH3VmOLAEOTe2mmCsL4j2orpM/vbfRB18h9MP7hD1qzhkXWli/UZOQhBSn5rlhhm3tjGgA==","signatures":[{"sig":"MEUCIQC/yI4Od+NDAol5dHbe1JDlnF/uZ4/NUnUx8QyDlrGYlwIgcb/L5a4ddYx9Brd4KPOMplXLBYaW33yx1kMX7n0Zv9A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDYAsGKVQ5NwAn1ws1ECLEmvk+tQ8I/9P4JHtdmTAqkXAIhAIJvHuwmSEAH6N2aG5EER+YD4PNE14yaFQ+8UMXJXKrR"}],"unpackedSize":671889},"main":"lib/index.js","name":"dsh-server-deck","type":"module","engines":{"node":">=20"},"exports":{".":"./lib/index.js","./client":"./lib/client.js","./package.json":"./package.json"},"gitHead":"4bc662369c51bc67dc99321d891137ab49296060","license":"MIT","scripts":{"test":"TZ=Asia/Shanghai node --experimental-transform-types --test \"test/*.test.ts\"","build":"node scripts/build.mjs","typecheck":"tsc --noEmit"},"version":"0.3.0","_npmUser":{"name":"meyaomiao","email":"xzb17688621221@outlook.com"},"homepage":"https://github.com/meyaomiao/dsh-server-deck#readme","keywords":["dsh","dsh-plugin","deepseek-harness","ssh","server-monitor","dashboard","terminal","better-sidebar","metrics","trend"],"repository":{"url":"git+https://github.com/meyaomiao/dsh-server-deck.git","type":"git"},"_npmVersion":"11.17.0","description":"DSH 能力插件:服务器卡片仪表盘——实时状态/CPU/内存/磁盘 + 趋势记录与可视化(1h/24h/7d/30d) + 点卡片进入 xterm 交互终端","directories":{},"maintainers":[{"name":"meyaomiao","email":"xzb17688621221@outlook.com"}],"_nodeVersion":"24.19.0","dependencies":{"ws":"^8.18.0","ssh2":"^1.16.0"},"_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.28.2","@types/ws":"^8.5.13","typescript":"^5.6.0","@types/node":"^26.2.0","@types/ssh2":"^1.15.4","@types/react":"^18.3.31","@xterm/xterm":"^5.5.0","@types/react-dom":"^18","@xterm/addon-fit":"^0.10.0","@deepseek-ai/cordis":"^4.0.2","@deepseek-ai/dsh-host-webserver":"0.1.2-alpha.4"},"peerDependencies":{"@deepseek-ai/dsh-host-webserver":"0.1.1-rc.2 || >=0.1.2-alpha.2 || ^0.1.5-rc.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-server-deck_0.3.0_1789102004570_0.415159838527154"}}},"time":{"created":"2026-08-26T10:21:31.504Z","modified":"2026-09-11T04:46:44.987Z","0.1.0":"2026-08-26T10:21:31.849Z","0.1.1":"2026-09-02T07:57:35.020Z","0.2.2":"2026-09-04T11:04:20.633Z","0.2.3":"2026-09-08T15:36:09.079Z","0.3.0":"2026-09-11T04:46:44.673Z"},"bugs":{"url":"https://github.com/meyaomiao/dsh-server-deck/issues"},"license":"MIT","homepage":"https://github.com/meyaomiao/dsh-server-deck#readme","keywords":["dsh","dsh-plugin","deepseek-harness","ssh","server-monitor","dashboard","terminal","better-sidebar","metrics","trend"],"repository":{"url":"git+https://github.com/meyaomiao/dsh-server-deck.git","type":"git"},"description":"DSH 能力插件:服务器卡片仪表盘——实时状态/CPU/内存/磁盘 + 趋势记录与可视化(1h/24h/7d/30d) + 点卡片进入 xterm 交互终端","maintainers":[{"name":"meyaomiao","email":"xzb17688621221@outlook.com"}],"readme":"# DSH Server Deck 🖧\n\n**DeepSeek Harness 的服务器卡片仪表盘** —— 已连接服务器的卡片视图(在线状态 / CPU / 内存 / 磁盘 / 延迟),点卡片进入 xterm.js 交互终端;独立趋势视图记录并可视化一段时间的 CPU / 内存 / 磁盘变化。\n\n[![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)\n[![dsh-plugin](https://img.shields.io/badge/dsh-plugin-4d6bfe)](https://github.com/topics/dsh-plugin)\n[![npm](https://img.shields.io/npm/v/dsh-server-deck)](https://www.npmjs.com/package/dsh-server-deck)\n[![license](https://img.shields.io/badge/license-MIT-green)](./LICENSE)\n\n## ⭐ 欢迎点星收藏\n\n如果 server-deck 帮到了你，欢迎到 [GitHub 仓库](https://github.com/meyaomiao/dsh-server-deck) 点个 Star ⭐，让更多 DSH 用户看到它。问题与建议请提 Issue。\n\n## 📋 兼容性\n\n| 插件版本 | 状态 | 对应 DSH |\n|---|---|---|\n| **0.3.x**（当前主线） | ✅ | **0.1.5-rc.1 / 0.1.5-rc.2**（及之后的 0.1.5 线；页签走官方原生右侧栏） |\n| 0.2.x | 🔧 维护态（仅修 bug） | DSH ≤ 0.1.2-rc.1（仍兼容 0.1.1-rc.2 / 0.1.2-alpha.4；better-sidebar 页签或独立抽屉） |\n\n### 本次升级功能变化\n\n- **页签宿主迁移**：DSH 0.1.5+ 优先注册官方原生右侧栏（`ctx.sidebarRightTabs`），better-sidebar 降为旧宿主回退，独立抽屉兜底不变。\n- **官方已有的交给官方**：不画赞踩、不画交付文件卡。服务器页签、PTY、指标卡新旧两线都在。\n- 0.3.x 在 DSH 0.1.2 + better-sidebar 上 **页签会退化成独立抽屉**；要旧页签请留在 0.2.x。\n\n<p align=\"center\">\n  <img src=\"docs/screenshots/dashboard.png\" width=\"420\" alt=\"服务器卡片仪表盘\">\n</p>\n\n## ✨ 功能一览\n\n### 卡片式服务器仪表盘\n每台服务器一张卡,**状态一目了然**:\n\n| 元素 | 说明 |\n|---|---|\n| 🟢🟡🔴⚪ 状态点 | 在线(带呼吸光晕)/ 离线 / 探测中 / 未知 |\n| 系统信息行 | OS 名称(Linux PRETTY_NAME / macOS 回退)、运行时长、核数、握手延迟 |\n| 三条用量条 | CPU · 内存 · 磁盘,<60% 绿 / ≥60% 黄 / ≥85% 红 |\n| 错误详情 | 离线时内联展示失败原因(悬停看全文) |\n\n自动刷新周期可选 **手动 / 10s / 15s / 30s / 60s**(读主机侧快照,不再现场 SSH);「刷新」按钮强制立即探测一轮。\n\n### 📈 趋势视图\n卡片与趋势两个独立视图互相切换(不是叠在卡片里)。每台主机 **CPU / 内存 / 磁盘各一张独立图**(不叠线):\n\n| 项 | 说明 |\n|---|---|\n| 窗口 | 1 小时(滚动,默认)/ 24 小时(滚动)/ 一周 / 一个月(本地自然日 0 点起,含今天)/ 自定义(≤31 天) |\n| 粒度 | 自动 / 10s / 30s / 1m / 5m / 15m / 1h;单次查询上限 1200 点,超限自动升档 |\n| 摘要 | 最新值 + 窗口均值;悬停竖线读该时刻数值,tooltip 含最高 / 最低 / 样本数 |\n| 采集 | 主机侧常驻,默认 10s(可选 30s / 1m / 5m),与面板是否打开无关;离线也记一条用于画断档 |\n| 落盘 | `~/.dsh/server-deck-metrics/{hostId}/`:raw 3h、1m 24h、15m 7d、1h 31d;删除主机级联清理 |\n| 历史回填 | 窗口早于本地记录时,尝试 `sar -u` / `sar -r`(sysstat)回填 CPU / 内存;磁盘容量无法回填 |\n\n打开「服务器」页签 → 点工具栏「📈 趋势」。窗口默认 1 小时滚动;「24 小时」也是滚动过去 24 小时,不是当天 0 点起。刚启用时图上可能只有右侧一小段,等几个采集周期就会铺开。\n\n<p align=\"center\">\n  <img src=\"docs/screenshots/trend.png\" width=\"420\" alt=\"趋势视图:每机三张独立 CPU / 内存 / 磁盘图\">\n</p>\n\n### ⌨ 点卡片进交互终端\nxterm.js 全功能终端:5000 行回滚、256 色、窗口尺寸实时同步、光标闪烁。Node 半区做 WebSocket ↔ ssh2 shell 双向桥。\n\n<p align=\"center\">\n  <img src=\"docs/screenshots/terminal.png\" width=\"420\" alt=\"交互终端\">\n</p>\n\n### ⤓ 一键导入 `~/.ssh/config`\n解析标准 ssh config(Host / HostName / User / Port / IdentityFile / ProxyJump),自动:\n- 跳过通配条目(`Host *`)与已存在主机;\n- **跳过 Git 托管平台密钥别名**(如 `Host github.com-xxx` / `User git`——它们不是可管理的服务器);\n- 多别名行(`Host 1.2.3.4 prod-gw`)优先取语义化别名做展示名。\n\n### ＋ 手动添加主机\n密码 / 私钥文件(+口令)/ SSH Agent 三种认证;连接测试按钮即时反馈延迟。\n\n<p align=\"center\">\n  <img src=\"docs/screenshots/add-host.png\" width=\"420\" alt=\"添加服务器表单\">\n</p>\n\n## 🔀 双形态挂载\n\n| 环境 | 形态 |\n|---|---|\n| 安装了 [dsh-better-sidebar](https://github.com/omdsh-dev/DSH-better-sidebar) | 注册为侧边栏「🖥 服务器」页签(order 45),原生 tab chrome、设置页开关、visible 门控轮询 |\n| 未安装 | 自绘右侧可展开/收起面板:右缘竖条开关 + 拖缘调宽,宽度持久化 |\n\n装载顺序无关:client 入口不声明强制依赖,由内层动态子插件等待服务就绪后注册页签并自动收起独立面板。\n\n## 📦 安装\n\n```bash\n# 方式〇:npm 安装(推荐)\ndsh plugin --profile web add dsh-server-deck\n\n# 方式一:从 GitHub 直接装(dsh CLI,免 npm)\ndsh plugin --profile web add github:meyaomiao/dsh-server-deck\n\n# 方式二:克隆后本地挂载\ngit clone https://github.com/meyaomiao/dsh-server-deck.git\ncd dsh-server-deck && pnpm install && pnpm build\ndsh plugin --profile web add .\n```\n\n安装后**重启 `dsh web`**(host 半新增了路由与常驻采集器),浏览器 Ctrl+F5 强刷。侧边栏「+」菜单出现「服务器」页签即成功。\n\n## 🔐 安全模型\n\n- 所有 API 与 PTY 升级路由**仅回环放行**(127.0.0.1/::1),防 DNS rebinding 与局域网直连;\n- 密码 / 私钥口令单独存放 `~/.dsh/server-deck.secrets.json`(0600),台账文件不含秘密,**API 响应永不回传**;\n- 删除主机仅移出台账并断开连接池,不会在远端执行任何操作;\n- 指标采集通过一段只读 POSIX sh 探针（固定交给 `/bin/sh`，不经过登录壳）。Linux 读 `/proc`，兼容 Ubuntu / Debian / RHEL / Alpine / Arch（含 fish、zsh 登录壳）；macOS 走 Darwin 回退。解析失败的字段显示「—」。\n\n## 🏗️ 架构\n\n```\n┌─ Client(lib/client.js)──────────────────┐   ┌─ Host(lib/index.js)─────────────────────┐\n│ 官方原生栏/better-sidebar 页签 ⇄ 独立抽屉 │◄──│ /server-deck/api/*  REST(仅回环)         │\n│ React 卡片网格 / 趋势图 / 表单 / xterm.js │WS▶│ /server-deck/ws/pty ws↔ssh2 PTY 桥      │\n└─────────────────────────────────────────┘   │ ssh2 连接池 · 台账 ~/.dsh/*.json         │\n                                              │ MetricRecorder 常驻采集(默认 10s)        │\n                                              └─────────────────────────────────────────┘\n```\n\n## 🛠️ 开发\n\n```bash\npnpm install\npnpm build       # esbuild:server bundle + client bundle(ModuleLoader 包装)\npnpm typecheck   # tsc --noEmit\npnpm test        # ssh config / 探针解析 / 台账校验 / 窗口粒度 / sar 回填 / 时序落盘\n```\n\n改仓库前先读 [CONTRIBUTING.md](./CONTRIBUTING.md)（Issue → 分支 → Draft PR）。思考原则见 [AI-ISSUE-WORKFLOW.md](./AI-ISSUE-WORKFLOW.md)。\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}