dsh-mac-awake
Manifest validPrevents macOS idle sleep while DSH Desktop is active, with configurable disabled periods.
DSH Mac 防空闲睡眠
仅支持 macOS。 声明兼容 DSH >=0.2.2-rc.1 <0.3.0;目前只在 DSH Desktop 0.2.2-rc.1 上验证。请勿在 Windows 或 Linux 上安装。
功能
DSH Desktop 正常运行时,插件使用 macOS 自带的 caffeinate -i 防止空闲系统睡眠,不会阻止锁屏或显示器熄灭。最小化或切换到其他应用不影响它。插件卸载、DSH 后端结束、桌面进程退出或被判定为后台专用应用时,插件释放断言。
插件不阻止手动睡眠、合盖睡眠或关机。它要求 DSH Desktop 应用进程是后端的直接父进程,并可被 macOS 识别为常规桌面应用;检测失败时为了避免误阻止睡眠会释放断言,因此不支持独立运行的 dsh web 或其他无桌面父进程的部署。状态约每 10 秒检查一次。macOS 后台运行的具体呈现可能随系统与 DSH 版本变化;如果后台进程仍被系统报告为常规桌面应用,无法仅凭此判定退出,需结合实际环境验证。
设置无需防睡眠的时间段
默认没有禁用时段。可以为 DSH Desktop profile 的 cordis.patch.yml 添加下面的覆盖项,自行调整或增减列表项:
- id: mac-stay-awake-local
config:
disabledPeriods:
- start: "12:00"
end: "14:00"
- start: "22:00"
end: "06:00"
- 使用电脑当前本地时区和 24 小时制
HH:MM;时段每天重复,包含起始时刻,不包含结束时刻。 - 跨午夜时段直接将结束时间写在开始时间之前,如
22:00至06:00;开始与结束相同表示全天禁用。 - 多个时段重叠时任一命中即可;留空列表
[]则全天可防睡眠。配置格式错误时插件会释放断言,并在日志提示错误。 - 当前版本通过 profile 配置文件修改,不提供图形化时间段编辑器。保存后重新加载插件或重启 DSH Desktop,新的时间段才会被读取。边界处最多约 10 秒加一次状态检查耗时后生效。
验证
在 macOS 安装 Bun 后运行 bun test schedule.test.js controller.test.js 和 bun run test.mjs。后者会短暂创建并释放真实的系统电源断言。
Comments
Loading…
Similar plugins
Keeps the DSH host awake during active tasks using native power assertions and releases them when tasks finish.
★ 0
dsh plugin --profile web add @zi7tian/dsh-keep-awakeby Bole1001
Keep your device awake while DeepSeek Harness is running. Prevents system sleep on macOS, Windows, and Linux for remote access.
★ 0
TypeScript
Aug 19, 2026
dsh plugin --profile web add dsh-power-awakeby veritaswiki
Runs macOS caffeinate bound to the DSH host process with -w and exposes /keepawake to report and switch sleep-prevention modes.
★ 0
MIT
JavaScript
Nov 11, 2026
dsh plugin --profile web add dsh-caffeinateKeeps the Mac awake for as long as the DSH host is running, whether or not an agent is working: starts ClamAwake's virtual display (mirroring the main screen) plus caffeinate -d, stops both when DSH e
★ 0
MIT
JavaScript
dsh plugin --profile web add dsh-clamawakeby bearice
Holds the OS wake lock while any agent, subagent, or background job runs, releases it after a configurable grace period, and provides a bilingual web settings page with live status, manual hold, and d
★ 0
↓ 105/wk
MIT
JavaScript
Aug 27, 2026
dsh plugin --profile web add dsh-keep-awakeby Asheep233
Instant wake for running DSH sessions — a host-plane bridge using the official sessionController.prompt() API (HTTP + file queue). Why headless can't.
★ 0
MIT
JavaScript
Oct 21, 2026
dsh plugin --profile web add dsh-session-wake