Shut down Windows automatically after DeepSeek Harness tasks complete — a floating arm button plus a cancellable countdown banner (shutdown /a), zero runtime dependencies.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:virggle/dsh-shutdown-after-task
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Shut down Windows automatically after DeepSeek Harness tasks complete. Zero-dependency plugin for the DeepSeek Harness web profile.
Run long tasks (batch migrations, model generation, overnight jobs)? Click the "任务完成后关机 / Shutdown after task" button in the bottom-right corner and the computer shuts down once the tasks finish — with a cancellable countdown.
Features
- Floating text button (bottom-right): toggles the "shutdown after task completes" mode. Off by default — never arms itself.
- Cancellable countdown: when the task completes, a 60 s banner shows the
remaining seconds with a Cancel shutdown button (
POST /cancel→shutdown /a) — no reliance on the OS notification that cannot be cancelled. - New-task interrupt: starting a new task during the countdown aborts the shutdown automatically while keeping the mode armed.
- Cancel exits the mode: clicking "Cancel shutdown" aborts this shutdown AND disarms the mode, so the next task will not trigger another one.
- Success-only: a batch with
agent/erroris skipped (banner notice), mode stays armed. - Multi-session aware: "task complete" = all root sessions idle (subagents fold into their root).
Install
dsh plugin --profile web add github:<owner>/dsh-shutdown-after-task
Restart DSH, then refresh the page (Ctrl+R) if the button does not appear.
Usage
- Click "任务完成后关机" — the button turns yellow (armed).
- Run your tasks.
- All root sessions idle with no errors → countdown banner appears.
- Click "取消关机 / Cancel shutdown" to abort this shutdown and exit the mode; or let the countdown run out — the computer shuts down.
Config
Edit the profile's cordis.patch.yml:
- id: dsh-shutdown-after-task
config:
countdownSec: 60 # countdown seconds (10–600, default 60)
marginSec: 5 # extra seconds on the OS `shutdown /t` (0–60, default 5)
onlyOnSuccess: true # shutdown only on a clean batch (false = shut down either way)
Behavior
| Item | Detail |
|---|---|
| Trigger | after arming, all root sessions go idle |
| Success check | no agent/error in the batch (when onlyOnSuccess: true) |
| Countdown | countdownSec s, live banner, cancel button |
| OS command | shutdown /s /t <countdownSec + marginSec> at countdown start |
| Cancel | GUI button (exits mode) / new task during countdown (keeps mode) |
| State | GET http://127.0.0.1:<port>/api/dsh-shutdown-after-task/state |
Log
$DSH_HOME/dsh-shutdown-after-task.log — mount, arm, trigger, and cancel events.
How it works
- Plain config-layer cordis plugin:
webServer.tapIndexinjects the UI script into every index response; host HTTP routes back the state and actions. No client bundle, no build step. - Listens to
agent/status/agent/error(see@deepseek-ai/dsh-agentruntime-types). - Routes and injection are disposed on unload.
Limitations
- Windows only (
shutdown.exe); inert with a log line on other platforms. - Mode state is in-memory: DSH restart resets it to off.
- A root session that is idle but has queued inbox work still counts as idle.
- The button appears after a page refresh (script injected per index response).
Uninstall
dsh plugin --profile web remove dsh-shutdown-after-task
Credits
- Event wiring modeled after yang040709/dsh-win-toast-notify (MIT)
- Plugin structure modeled after keyiadiannao/dsh-power-button (MIT)
License
MIT
Links
More in this category
Q00/ouroboros#integrations/dsh-plugin★ 5516
Config-only bundle that mounts Ouroboros through the DSH MCP client, exposing 36 interview, Seed, execution, evaluation, and evolution workflow tools in DSH.
NanmiCoder/dsh-agent-teams★ 504
AgentTeams multi-agent teams.
EthanYoQ/AI-Novel-Writer#dsh-ai-novel-writer★ 380
Installs a dedicated AI novel-writing preset and workbench: revisioned local project assets, a compact side drawer, and native approval-gated single-file changes.
icetomoyo/dsh_workflow★ 77
UltraCode-style multi-agent orchestration: a generatable, savable, governable, observable, resumable workflow layer.
titanwings/dsh-automation★ 52
Scheduled coding runs in fresh agent sessions with auditable history.
btspoony/mstar-harness★ 49
Skill-driven harness/loop engineering workflow agent plugin.