DeepSeek Harness Goodnight Plugin

Introduction

In DeepSeek Harness (DSH), after a task completes, agents or background jobs may still be running. Developers often want the system to automatically go to sleep or shut down when they step away from the machine, but simply closing the window risks interrupting in-progress work. The Goodnight plugin addresses this by triggering a cancellable countdown once all tasks have finished, and then executing shutdown or hibernation — letting the machine truly “go to sleep” only when it is genuinely idle.

What It Is

Goodnight is a DSH workflow plugin developed by maintainer tzzs, available in its GitHub repository. It monitors the status of agents, sub-agents, and background tasks within the DSH Host. Once all work is complete, it waits for 60 seconds in a fullscreen countdown window. Users can cancel at any time during the countdown; if a new task starts, the countdown is immediately reset.

Core Features

  • Wait conditions: The Host is considered busy when any of the following is true:
  • Agent status is running
  • Agent inbox.nextTurn or inbox.nextStep is non-empty
  • Any task is in running or stopping state
  • A sub-agent or workflow sub-node is an active agent

  • Quiet period: All of the above conditions must remain clear for at least 20 seconds before the countdown begins. Any new work resets the timer.

  • Countdown: Enters a 60-second countdown. The screen displays the countdown in fullscreen with a progress bar at the top, a number and circular progress indicator in the center, status and warnings at the bottom, and the remaining time in the top-right corner. Press Esc or click the high-contrast “Cancel” button to abort.

  • New task detection: During the countdown, any new task immediately cancels the countdown and returns the system to the waiting state.

  • Execution timing: The shutdown or hibernation command is executed only when the countdown truly reaches zero. Once the command is submitted, any subsequent cancel or mode-switch request returns a 409 status, indicating the action cannot be revoked.

  • Safety mechanism: Power operations rely solely on the countdown as a “revocation window” rather than on Windows’ native shutdown /a, preventing an irreversible shutdown with no chance to abort.

  • Multi-monitor support: The countdown is displayed in fullscreen or within a window. When multiple monitors are detected, users can switch the “Timer Position” or click the “Show on Other Screen” button to open a lightweight mirror window (best-effort only).

  • Background styles: Three presets are available (default solid color, frosted glass, Gaussian blur), switchable on the page, with a default configurable via backgroundStyle in cordis.patch.yml.

  • Mode selection:

  • shutdown (default): executes shutdown /s /t 0 /f
  • hibernate: executes shutdown /h /f

  • Window title sync: The page title displays the remaining seconds for easy cross-screen identification.

Installation & Activation

It is recommended to review the source code and license before installing. Installation commands should follow the official documentation; as specific commands are not provided in the current materials, please refer to the official instructions.

Typical Usage

  1. In the DSH Host left sidebar, find the “Goodnight” entry below “Plugins” and “Automation tasks.”
  2. On the Goodnight page, select the mode (shutdown/hibernate) and background style.
  3. Manually trigger the “Goodnight” button to start the countdown.
  4. If a new task appears during the countdown, it is automatically cancelled.
  5. Before the countdown ends, click “Cancel” or press Esc to abort the operation.

Use Cases & Notes

  • Ideal for scenarios requiring automatic shutdown or hibernation after work completes, especially when dealing with long-running tasks or numerous background jobs.
  • The plugin runs with the current DSH process permissions. Review the source code and license before installing.

Conclusion

Through status checks and a fullscreen countdown, Goodnight provides a reliable work-completion and power-management solution for DSH Host. It triggers only when the system is truly idle and offers a clear cancellation mechanism to avoid unexpected interruptions.

  • Directory page: https://www.skillhub.cn/plugins/tzzs/dsh-goodnight
  • GitHub: https://github.com/tzzs/dsh-goodnight
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye