DeepSeek Harness Plugin

virggle/dsh-shutdown-after-task

Stars ★ 1 Category Workflow & Automation Added 2026-08-18

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 /cancelshutdown /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/error is 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

  1. Click "任务完成后关机" — the button turns yellow (armed).
  2. Run your tasks.
  3. All root sessions idle with no errors → countdown banner appears.
  4. 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.tapIndex injects 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-agent runtime-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

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →