xchannel1987/dsh-power-xc0

dsh-power-xc

Self-contained power control for DSH: sidebar power button with an upward 重启/关机 menu plus a Windows-shutdown-style overlay. Own restart & shutdown engine (no dependency on other plugins), MIT licensed.

AI 分析

核心用途是为 DSH 提供便捷的系统电源管理。适合需要直接在 Web 界面或通过斜杠命令/模型工具快速重启或关闭 DSH 服务的用户。

パッケージ
dsh-power-xc
バージョン
0.1.0
ライセンス
MIT
最終更新
2026/08/29

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xchannel1987/dsh-power-xc

ドキュメント

README 全文を読む ↗

使用 DSH CLI

dsh plugin --profile web add dsh-power-xc

或使用 npm

npm install dsh-power-xc


安装后重启 DSH,侧边栏底部将出现电源按钮。

## 🎮 使用方式

### 方式一:Web UI
1. 点击侧边栏底部的电源按钮
2. 选择「重启」或「关机」
3. 确认操作

### 方式二:斜杠命令
- 输入 `/restart` 重启 DSH
- 输入 `/shutdown` 关闭 DSH

### 方式三:模型工具
在对话中请求模型重启 DSH,模型会调用 `restart_harness` 工具。

## ⚙️ 工作原理

用户点击重启 ↓ 显示过渡动画 ↓ 启动独立 helper 进程 ↓ 等待旧进程退出 ↓ 释放端口 ↓ 以原命令行重新拉起 ↓ 页面自动重连


## 🔒 安全设计

- **分离进程**:helper 独立于主进程运行
- **超时保护**:30 秒超时机制
- **状态监控**:健康检查端点
- **优雅退出**:会话刷新不会阻塞重启

## 📄 许可证

[MIT](https://github.com/xchannel1987/dsh-power-xc/blob/58fccf791ff0e6228fd462e49018443cd394ec42/LICENSE)

## 🔗 链接

- [GitHub](https://github.com/xchannel1987/dsh-power-xc)
- [npm](https://www.npmjs.com/package/dsh-power-xc)
- [问题反馈](https://github.com/xchannel1987/dsh-power-xc/issues)

## 🎮 使用方式

### 方式一:Web UI
1. 点击侧边栏底部的电源按钮
2. 选择「重启」或「关机」
3. 确认操作

### 方式二:斜杠命令
- 输入 `/restart` 重启 DSH
- 输入 `/shutdown` 关闭 DSH

### 方式三:模型工具
在对话中请求模型重启 DSH,模型会调用 `restart_harness` 工具。