Preface¶
When running batch migrations, model generation, or overnight tasks in DeepSeek Harness (DSH), a common requirement is to “shut down the computer upon completion” without having to constantly monitor the interface. There are existing community plugins like virggle/dsh-shutdown-after-task: they initiate a countdown shutdown after the task ends, which can be cancelled during the countdown. However, if you are using the DSH Desktop version (Electron), the button from the original plugin often does not appear in the bottom right corner at all—refreshing the page or completely restarting the client does not help. This is because the original version only utilizes the webServer.tapIndex injection path for server-rendered pages, while the desktop host follows a separate set of structured injection lines. This article introduces the fork dsh-snowflake-shutdown by maintainer eeFrank123: while retaining the original trigger and countdown logic, it supplements desktop injection and condenses the control bar into a circular snowflake button. It is categorized as a Client-side plugin, with the current package version 0.3.1 (MIT). The plugin runs with the permissions of the current DSH process; it is recommended to review the repository source code and license before installation.
What is this¶
dsh-snowflake-shutdown is a Windows-side plugin for DSH (the README states it has zero dependencies): simply click the snowflake button in the bottom right corner of the window to “arm” it—when all root sessions in the current batch finish and meet the success conditions, it pops up a countdown and calls shutdown.exe; the shutdown can be cancelled during the countdown. By default, it will not turn on automatically; manual clicking of the button is required.
This repository explicitly states it is a desktop fix and interface simplification fork of dsh-shutdown-after-task; functional behavior (trigger determination, success determination, countdown, cancellation) is consistent with the original, and it fixes issues such as the button being unavailable on desktop and jitter during avoidance. It can be installed simultaneously with the original version (route prefixes, log file names, and class names are all differentiated, so they will not clash on the same HTTP route).
What it solves compared to the original¶
The following points are derived from the “Why this branch exists” and changelog sections of the README to help determine whether to install this fork.
- Visible on Desktop: In addition to retaining
tapIndex(Browser /dsh web), it additionally registers thewebserver/index-injectline, pushingscript-srcpointing to/api/dsh-snowflake-shutdown/ui.js. - Smaller Control: Changed the ~150×34 text bar to a 32×32 circular snowflake button; the notification panel shrinks according to content, is fixed to the bottom right of the window, and moves above the button if it overlaps.
- Jitter Avoidance Fix (0.3.1): Uses the button’s position before offset to determine overlap; full-window modals/masks no longer mistakenly trigger avoidance.
Core Functions and Behavior¶
Interface and Operation¶
- Click the snowflake button in the bottom right corner → turns yellow to indicate armed; click again to disarm.
- The button is draggable; the position is saved in the browser’s
localStorage. - When all root sessions return to idle from running, and there are no errors in the batch (when
onlyOnSuccess: true) → “Task Completed / Auto shutdown in N seconds” appears in the bottom right corner. - Click “Cancel Shutdown” during the countdown → executes
shutdown /aand exits armed mode; if a new message is sent during the countdown → only cancels the current shutdown, armed mode is maintained.
Triggering and System Commands¶
| Item | Description |
|---|---|
| Trigger Timing | All root sessions idle after being armed |
| Success Criteria | No agent/error in this batch (only when onlyOnSuccess: true) |
| Countdown | Config item countdownSec, banner displays remaining seconds |
| System Command | shutdown /s /t <countdownSec + marginSec> when countdown starts |
| Status Query | GET http://127.0.0.1:<port>/api/dsh-snowflake-shutdown/state |
Runtime log: $DSH_HOME/dsh-snowflake-shutdown.log (Windows default C:\Users\<you>\.dsh\dsh-snowflake-shutdown.log).
Installation and Enablement¶
The DSH ecosystem follows the principle “everything is a plugin”; plugins can also be browsed from the community directory page, which is not officially affiliated with DeepSeek / High-Flyer. Installation commands follow the repository README.
Install from GitHub (Desktop profile):
dsh plugin --profile desktop add github:eeFrank123/dsh-snowflake-shutdown
If using the Web profile, replace --profile desktop with --profile web.
Install from local directory (modify the example path according to your machine):
dsh plugin --profile desktop add file:E:\path\to\dsh-snowflake-shutdown
After installation, you must completely exit DeepSeek Harness (including the system tray icon → right-click → Exit), then reopen it. The README explains: UI scripts and injection lines are collected at host startup; simply refreshing the page (F5) or closing the window to the tray does not count as a restart.
If dsh plugin ... add reports lockfile entries failed verification or within the minimumReleaseAge cutoff, the README suggests waiting 24 hours to install, or temporarily:
dsh plugin --profile desktop add dsh-snowflake-shutdown --config.minimumReleaseAge=0
If installation from GitHub hangs, you can configure a proxy for git as per the README and try again.
Uninstall:
dsh plugin --profile desktop remove dsh-snowflake-shutdown
Configuration¶
In the corresponding profile’s cordis.patch.yml (or Settings → Plugin Configuration):
- id: dsh-snowflake-shutdown
config:
countdownSec: 60 # Countdown seconds (10–600, default 60)
marginSec: 5 # Extra margin for system shutdown /t (0–60, default 5)
onlyOnSuccess: true # Shutdown only on success (false = shut down upon completion, including errors)
Applicable Scenarios and Limitations¶
Suitable for: Running long tasks with DSH Desktop on Windows, hoping to shut down automatically after tasks end, and requiring a cancellable countdown; if the original shutdown plugin lacks a button on the Desktop version, this fork can be used instead.
Important Notes:
- Windows Only: On other platforms, the plugin remains idle and writes to the log.
- The armed state is kept in memory; the button needs to be clicked again after a DSH restart.
- It will trigger even if root sessions are idle but there are still queued messages in the inbox (the determination is “all root sessions idle”).
- After adding or modifying plugins, a complete client restart is required to see UI changes.
If you want to switch back to the original version, the README provides steps to first remove this plugin and then add dsh-shutdown-after-task.
Links¶
- Community Directory Page: dsh-snowflake-shutdown
- Source Code and Full Description: github.com/eeFrank123/dsh-snowflake-shutdown