dsh-screen-control
Manifest validControls the Mac screen state while DSH tasks run, without ever suspending processes: keep-awake keeps the display on; display-off lets it go dark while the system and all processes keep running. Hold
Screen state control / 屏幕状态控制
A DeepSeek Harness plugin that controls the Mac's screen state while tasks are running, without ever suspending a process.
一个在任务运行期间控制 Mac 屏幕状态的 DeepSeek Harness 插件,绝不挂起任何进程。
What it does / 功能
While any agent, subagent, or background job is working, the plugin holds a macOS wake lock (caffeinate) so a long turn is not cut off by idle sleep. Two modes:
keep-awake(default) — keeps the display on (-d -i -s -m -w <hostPid>).display-off— lets the display go dark while the system and every process keep running (-i -s -m -w <hostPid>, no-d). Optionally blanks the screen immediately viapmset displaysleepnow(no sudo).
When the last task finishes, the lock is held through a configurable grace period (default 60s) and then released. macOS then follows its own power settings and may sleep naturally. The plugin never actively sleeps, suspends, or shuts down the machine.
任务运行时持有 caffeinate 唤醒锁,防止长回合被空闲睡眠打断。两种模式:
keep-awake(默认)——屏幕常亮。display-off——允许屏幕熄灭,但系统与所有进程继续运行(不含-d),可选立即黑屏。
最后一个任务结束后,按可配置宽限期(默认 60 秒)释放唤醒锁,系统按自身设置自然睡眠。插件绝不主动睡眠、挂起或关机。
Safety / 安全设计
- Least privilege — only the built-in
/usr/bin/caffeinate(and optionalpmset displaysleepnow) is spawned. No sudo, no daemon, no preference files touched. - Process binding — every lock uses
-w <hostPid>; if the host exits, the OS releases the assertion automatically. No orphan lock. - Argument whitelist — flags are fixed constants selected by booleans, pid is coerced to a number,
spawn()takes an argv array with no shell. Command injection is impossible. - Fail-safe — any error resolves to a released state; a bug can never leave the machine pinned awake.
- Platform gate — macOS only; on other platforms the plugin stays inactive.
- Idle detection — uses
agent/status,subagent/start/end, background jobs, and awhenIdle()/seq convergence re-check, becauseAgent.statusmisreportsidleduring maintenance and compaction.
Usage / 用法
Via the /screen command:
/screen status # current state
/screen awake # keep-awake mode + hold now
/screen dark # display-off mode + hold now
/screen hold # acquire lock now
/screen release # release lock now
/screen auto on|off # enable/disable automatic task-based control
Or ask the agent to use the screen_control tool (actions: status, mode, hold, release, auto).
Configuration / 配置
Set in the plugin row's config (Plugins page or cordis.patch.yml):
| key | default | meaning |
|---|---|---|
mode | keep-awake | keep-awake or display-off |
auto | true | hold the lock while tasks run |
graceSeconds | 60 | seconds to hold after the last task |
displayOffNow | false | also blank the screen immediately in display-off mode |
auditLog | true | log switches and lock acquire/release |
Requirements / 要求
- macOS (Darwin). Uses the built-in
caffeinateand, optionally,pmset. - DeepSeek Harness
>=0.2.0-rc.1 <0.3.0-0.
Install / 安装
dsh plugin add https://github.com/jyz48prsbr-netizen/dsh-screen-control
License
MIT
Comments
Loading…
From the same category
DeepSeek Harness plugin for Reactive Resume: bridges your resumes and job applications into a Harness session over MCP.
★ 41.7k
↓ 58/wk
MIT
Aug 24, 2026
dsh plugin --profile web add dsh-plugin-reactive-resumeby dsh-market
The plugin market inside DeepSeek Harness — browse, search, one-click install · DSH 可视化插件市场
★ 13.3k
↓ 275.8k/wk
MIT
TypeScript
Nov 23, 2026
dsh plugin --profile web add dshmarketby kingcharleslzy-ai
Community-maintained dsh-purge fork with host-policy patches, prompt and rule settings, diagnostics, separate update-check and install controls, and local backup/rollback.
★ 12k
MIT
JavaScript
Nov 18, 2026
dsh plugin --profile web add dsh-purge-communityby Tencent
Let AI agents use your real, logged-in browser without interrupting your work. CLI + extension for browser automation across any shell-capable AI agent.
★ 10.7k
↓ 17.5k/wk
MIT
TypeScript
Nov 23, 2026
dsh plugin --profile terminal add @wxg-prc-cpg/browser-skill-dsh-pluginby superdesigndev
OpenRouter for agent tools. Join community here: https://discord.gg/6mQYYfFMAn
★ 8.8k
NOASSERTION
Python
Nov 24, 2026
dsh plugin --profile web add treg-dshby yjh051108
dsh-routing-suite — injector + router-standard kit: install the runtime injector first, then the task-aware reasoning-mode router preset (measured P1-P23).
★ 7k
MIT
JavaScript
Sep 18, 2026
dsh plugin --profile web add @dsh-external/dsh-super-injector