电脑从 Modern Standby 唤醒后按宽限时间持续保持可连,给远程客户端留出重连时间;面板另带「电脑睡眠」与「重启」两个按钮。睡眠走关闭显示器的方式进入 S0ix(按任意键即可唤醒),不会落入 S4 休眠;重启通过 Electron 重载 DSH,或经独立助手进程确认旧进程已退出后再启动。它的 HTTP 路由没有 DSH 的访问检查,浏览器里打开的网页可以调用它们。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:rzcdz/dsh-wake-guard
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
A DeepSeek Harness (DSH) plugin bundle for Windows laptops on Modern Standby: after the machine wakes from sleep, it keeps the system awake for a grace period so a remote client has time to reconnect.
The bundle adds a sidebar entry with a switch, a status panel, Sleep and Restart buttons, and three small PowerShell helpers. Nothing runs until you turn the switch on.
Sleep
The panel has a two-click Sleep button. It puts the machine into Modern Standby (S0ix) — the state any key press wakes — and explicitly not S4 hibernation, which only the power button can leave.
It works by turning the display off (SC_MONITORPOWER): the power manager reads
that as loss of user presence and drops into S0ix a few seconds later.
SetSuspendState is deliberately avoided. This machine has no S1/S2/S3
(powercfg /a), so that call can resolve to S4. The Event Log tells the two
apart — event 506 with Reason: SC_MONITORPOWER is S0ix, while event 42 with
Reason: Application API is hibernation. Measured here: 506 on sleep, then 507
Reason: Input Keyboard on wake, and no event 42 at all.
The virtual sleep key (VK_SLEEP) is off by default for the same reason: on a
machine without S3 the power manager may resolve it to S4. -IncludeSleepKey
opts in, but confirm that key really enters S0ix on your hardware first.
Restart
The panel has a two-click restart button: the first click arms it, the second restarts. A restart ends every running session, so save first; the page reloads itself once the Host answers again.
It prefers Electron's own app.relaunch() — the same path DSH's updater uses —
and falls back to a detached PowerShell helper that stops every DSH process,
waits until they are really gone, then starts the executable again. That wait
matters: Electron's single-instance lock makes a new process hand off to the
running one and exit, so starting too early would leave nothing running.
The problem
Notebooks on Modern Standby (S0 low-power idle) go straight back to standby when nothing happens after a wake. A remote session has only a few seconds to reconnect before the network stack drops again.
The helper keeps the Host awake by sending VK_F15 keystrokes in a loop — almost
no physical keyboard has that key, so it does not disturb any application while
Windows still sees an active user.
Install
From the DSH UI — open Plugins → Add plugin, then enter:
https://github.com/rzcdz/dsh-wake-guard
Accepted spec forms include rzcdz/dsh-wake-guard,
github:rzcdz/dsh-wake-guard and a full https://github.com/... URL.
From an agent session — ask DSH to run plugin_manager with
action: install_bundle and that URL as target.
From a local clone — point Add plugin at the clone's absolute path.
Installing does not start the helper; the sidebar switch does.
Requirements: Windows (dsh.bundle.platforms is ["win32"], so DSH refuses the
bundle on other Hosts) and PowerShell 5.1 or later.
Usage
- Click the icon at the bottom of the left sidebar to open the panel.
- Turn the switch on.
- The machine goes to sleep once, 10 seconds later.
- Wake it (power button, or a smart plug cutting and restoring power). The helper holds the Host awake for about 10 minutes.
- Turn the switch off to stop holding it; the normal sleep schedule resumes.
A green dot on the sidebar icon means the helper is running.
Behaviour worth knowing
- Sleep once after starting. Starting the helper also requests one Modern
Standby transition after
suspendDelaySec, so you can flip the switch and walk away without closing the lid. - Modern Standby, not hibernation. The helper calls the power API with
hibernate = false.rundll32 powrprof.dll,SetSuspendState 0,1,0would take the S4 path when hibernation is enabled (writehiberfil.sys, cut power, firmware logo on the next press). - The screen lights up periodically while the helper runs. That is the cost of staying awake; leave it on only as long as you need.
- Stopping DSH stops the helper. Unloading the bundle kills the child process and clears the pending timer.
Configuration
cordis.patch.yml in the installed bundle:
config:
graceMinutes: 10 # minutes to hold the Host awake after each wake
suspendDelaySec: 10 # delay before the single sleep request after starting
Disable and re-enable the plugin after changing them.
Logs
%LOCALAPPDATA%\dsh-wake-guard.log; the panel shows the last 14 lines.
Limits
- Windows only.
- The helper lives and dies with DSH.
- Periodic screen wake-ups cost battery; toggle it on demand.
- A few seconds pass between turning the switch off and the process exiting.
- Setting is per Host, not per Session.
中文说明
适用于 Modern Standby(S0 低电量待机)笔记本:从待机被唤醒后,如果没有活动,
系统会在几秒内重新进入待机,远程客户端来不及重连。本插件在侧边栏提供开关,
唤醒后持续模拟按键(VK_F15,几乎没有实体键盘有这个键),让 Windows 认为用户
在场,从而保持唤醒约 10 分钟。
安装:插件 → 添加插件,填入 https://github.com/rzcdz/dsh-wake-guard。
打开开关后机器会先睡眠一次(10 秒后),之后从睡眠唤醒才会保持可用。
仅 Windows 生效;屏幕会周期性亮起,建议按需开关。
License
MIT
链接
同类插件
zhu1090093659/dsh-web#packages/dsh-remote-web-ui★ 10645
手机/PC 远程操控 dsh web 工作区:扫码配对、令牌门控通道、SSE 实时同步,提供移动端与完整桌面 GUI 两种远程形态。
zhu1090093659/dsh-web#packages/dsh-ssh★ 10645
SSH 远程运维面板:Web 终端、SFTP 传输、本地端口转发与一条命令并发集群执行,Agent 与面板共用同一份主机配置。
liguobao/ds-harness-remote★ 3780
通过端到端加密通道远程访问 DeepSeek Harness 及兼容的编码工作区,支持自适应 Relay/WebRTC 传输、设备授权、工作区文件、只读预览、终端和可选的 Codex Remote。
saya-ch/dsh-mobile★ 1006
通过 Android App 或手机浏览器访问 DeepSeek Harness,支持安全局域网连接、远程访问、持久设备配对和可自定义移动界面。
uumit-ai/dsh-uumit-remote★ 531
用 UUMit 账号在手机或其他电脑上打开这台电脑的 dsh web,不用自建服务器、不装其他程序:插件内置通道客户端连接 UUMit 托管的通道,侧栏里的面板负责配对和选择谁能用(仅自己、通过邀请链接或手机号授权的人、所有人),可随时撤销。需 dsh web 且 DSH >=0.2.1-rc.2。
ZSeven-W/dsh-ios★ 485
在对话里直接操作 iOS 模拟器或 USB 连接的 iPhone:22 个 Agent 工具用于启动、构建、按无障碍标识或 OCR 文本驱动 UI、列表行操作与 SwiftUI 预览热重载,并附带可点击拖拽的流式侧边栏面板。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。