DeepSeek Harness plugin

dsh-caffeinate-watchdog

Agent 运行期间自动防止 macOS 休眠/锁屏;含设置页面(总开关、-i/-d/pmset 可选)、合盖运行(sudoers 免密)、状态指示器。

Jump to install

Source facts

Repository
80825322-ai/dsh-caffeinate-watchdog
Latest update
Aug 19, 2026
Category
Workflow & Automation
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-21

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/80825322-ai/dsh-caffeinate-watchdog
Plugin: dsh-caffeinate-watchdog
Author: 80825322-ai

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-caffeinate-watchdog

Agent 运行期间自动防止 macOS 休眠/锁屏;所有 agent 空闲时自动释放。

功能

功能说明命令
防空闲睡眠阻止系统进入空闲睡眠,核心功能caffeinate -i
防显示器睡眠阻止显示器睡眠/自动锁屏caffeinate -d
合盖不睡眠笔记本合盖时也保持运行(需 sudo 权限)sudo pmset -a disablesleep 1

以上功能均可在设置页面独立开关。

设置入口(通用设置)

安装后在 DSH Web GUI 的 设置 → 通用设置 中:

  • 「运行时防止系统休眠」一行(主入口):标题 + 总开关

- 副标题:运行任务时让电脑保持唤醒状态

  • 「精细化设置」(默认折叠):需要精细设置时展开

- 防空闲睡眠(-i) - 防显示器睡眠(-d) - 合盖不睡眠(pmset,需 sudo) - 状态徽章:caffeinate 进程 / 合盖模式 / 活跃 Agent / sudo 免密

> 设计说明:防休眠看门狗一般只设置一次,因此放在通用设置一行 + 可展开的精细化选项, > 不占用独立设置页。

合盖功能配置

合盖功能需要 sudo 免密权限。开启合盖选项后,如果未配置 sudoers,页面会显示一键配置按钮:

1. 点击「配置 sudo 免密」 2. 系统弹出密码框,输入你的登录密码 3. 插件自动写入 /etc/sudoers.d/dsh-caffeinate 规则(仅允许当前用户免密执行 pmset) 4. 配置完成后合盖功能自动生效

手动配置(替代方案):

echo "$USER ALL=(root) NOPASSWD: /usr/bin/pmset" | sudo tee /etc/sudoers.d/dsh-caffeinate
sudo chmod 0440 /etc/sudoers.d/dsh-caffeinate

工作原理

时机动作
任一 agent 开始处理消息按设置启动 caffeinate / pmset
所有 agent 处理完毕自动终止 caffeinate,释放电源断言
caffeinate 意外退出检测到后自动重启(如果仍有 agent 在运行)
每 60 秒安全检查:与实际 agent 列表对账,修正状态漂移

安装

# 方式一:dsh plugin add(推荐)
dsh plugin --profile web add /path/to/dsh-caffeinate-watchdog

# 方式二:手动安装
cd ~/.dsh/profiles/web
pnpm add /path/to/dsh-caffeinate-watchdog
# 然后在 package.json 的 dsh.profile.bundles 数组中加入 "dsh-caffeinate-watchdog"

安装后重启 DSH web 即可自动加载(会话不会丢失,见 FAQ)。

验证

# 当有 agent 运行时,查看 caffeinate 进程
pgrep -la caffeinate

# 查看电源断言
pmset -g assertions | grep caffeinate

# 查看合盖模式状态
pmset -g | grep disablesleep

常见问题(FAQ)

详见 [docs/FAQ.md](docs/FAQ.md),含「重启后会话会不会丢」「设置会不会被重置」「如何卸载」等。

注意事项

1. 仅 macOScaffeinate / pmset 是 macOS 内置命令 2. 合盖限制:仅 caffeinate 无法突破合盖,必须配合 pmset disablesleep 3. sudoers 安全:免密规则仅限 /usr/bin/pmset 命令,不影响其他 sudo 操作 4. 设置持久化:开关值经宿主 settings 服务保存到 ~/.dsh/settings.yaml(跟随 DSH_HOME,与其他插件配置同文件),重启后自动恢复,无需重新设置

License

MIT