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 npm (prebuilt)
dsh plugin --profile web add dsh-shutdown-after-task
# 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 — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: 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 (draggable): toggles the "shutdown after task completes" mode. Off by default — never arms itself. Drag it anywhere; the position is remembered.
- Auto-dodge: when another plugin's corner popup (e.g. a price notice with a button) overlaps the button, the button steps aside automatically and returns once the popup is gone.
- 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. The banner is anchored to the button's current position. - 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
npm (recommended, published):
dsh plugin --profile web add dsh-shutdown-after-task
or from GitHub:
dsh plugin --profile web add github:virggle/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). Drag it anywhere.
- Run your tasks.
- All root sessions idle with no errors → countdown banner appears above the button.
- 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
loopx-project/loopx#dsh-loopx-plugin★ 6581
LoopX, a provider-neutral, local-first state kernel and control plane for long-horizon agents: keeps Goal, Todo, gate, evidence, quota, recovery, and handoff state above DeepSeek Harness, while the plugin bootstraps the CLI and skills, admits bounded same-session continuation, and adds a loopback GoalBar for the exact bound loop.
Q00/ouroboros#integrations/dsh-plugin★ 6361
Config-only bundle that mounts Ouroboros through the DSH MCP client, exposing 36 interview, Seed, execution, evaluation, and evolution workflow tools in DSH.
chuspeeism/dashi-taskboard#deepseek-harness★ 3485
Embeds the active installed Codex Taskboard runtime in the DeepSeek Harness sidebar, using its launcher runtime descriptor instead of a fixed port.
NanmiCoder/dsh-agent-teams★ 2927
AgentTeams multi-agent teams.
EthanYoQ/AI-Novel-Writer#dsh-ai-novel-writer★ 2621
Installs a dedicated AI novel-writing preset and workbench: revisioned local project assets, a compact side drawer, and native approval-gated single-file changes.
shanliuling/dsh-image-gen★ 1479
Native conversational image generation for DeepSeek Harness: ask the agent to create an image, and it handles generation and keeps the result directly in the conversation.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.