DeepSeek Harness Plugin: dsh-dafeiyu-sleep

Introduction

DeepSeek Harness (DSH) follows an “everything is a plugin” architecture, where extensions are installed via the plugin marketplace or the directory page without modifying core code. For AstrBot developers, adding a settings page to a plugin is a common need—being able to view runtime status and directly modify configuration. While the DSH community already has quite a few UI plugins, a status panel for AstrBot’s “Dafeiyu Sleep” plugin remains relatively rare.

What’s introduced below is dsh-dafeiyu-sleep, which provides a DSH settings page for AstrBot’s “Dafeiyu Sleep” plugin: fatigue level, sleep state, wake/sleep times, and schedule parameters—all viewable and adjustable on a single page.

What Is It

  • Name: dsh-dafeiyu-sleep
  • Maintainer: happyxiancong
  • Category: Client
  • Stars: 0 (as of 2026-12-01)
  • Description: View and modify the fatigue level, sleep state, and schedule parameters of AstrBot’s Dafeiyu Sleep plugin from the DSH settings page

It doesn’t send messages on its own, nor does it occupy a port. It does exactly two things:

  • Reads the state file written by AstrBot’s sleep plugin and renders it as a panel;
  • Writes your panel changes into a control file, which the AstrBot plugin picks up and executes on the next cycle (within 30 seconds).

This panel is the companion interface for the AstrBot plugin astrbot_plugin_dafeiyu_sleep. Without that plugin installed, the panel will be empty.

Core Features

  • Status display
  • Fatigue level (0–100)
  • Progress bar with a “knocks out at” threshold scale
  • Current state: Awake / Asleep / Waiting for reply
  • Expected wake time for this nap, last wake time
  • Action buttons
  • Go to sleep: triggers the normal pre-sleep routine, sends a goodnight message
  • Wake up: sends a post-wake check-in
  • Keep sleeping
  • Cancel the “snooze” wait
  • Adjust fatigue level
  • Slider or numeric input, 0–100
  • Takes effect on AstrBot’s next cycle
  • Modify parameters
  • Hourly increase rate during daytime/nighttime
  • Consumption per private message / group message
  • Recovery rate
  • Mood threshold upper/lower bounds
  • Minimum sleep duration, maximum sleep duration
  • Shutdown detection window (minutes), etc.
  • Saving writes back to AstrBot’s plugin config file; changes persist across restarts

Installation & Activation

Prerequisites

  1. AstrBot is installed, along with the sleep plugin astrbot_plugin_dafeiyu_sleep (fatigue tracking + sleep-when-tired + pre-sleep/post-wake notifications).
  2. You know AstrBot’s installation root directory. A typical layout looks like this:
D:\dafeiyu\
├─ astrbot\data\plugin_data\astrbot_plugin_dafeiyu_sleep\state.json
├─ astrbot\data\config\astrbot_plugin_dafeiyu_sleep_config.json
└─ private\sleep-state.json

Installation

Search for dsh-dafeiyu-sleep in DSH’s Plugin Marketplace, or use Plugins → Add plugin and point it to this repository directory.

Once installed, open Settings → Dafeiyu Sleep.

First Use: Configure the AstrBot Directory

There’s an “AstrBot Directory” field at the top of the panel, defaulting to D:\dafeiyu. If AstrBot is installed elsewhere, change it to your root directory and click “Save Directory.”

Configuration is saved to ~/.dsh/dafeiyu-sleep/settings.json; the environment variable DAFEIYU_ROOT can also override it (highest priority).

If the directory is incorrect, the panel will display “Sleep plugin data not found” and will not write anything.

How It Interacts with AstrBot

The AstrBot plugin keeps a state in memory and writes it back to a file every 30 seconds; directly modifying state.json will get overwritten. So this plugin uses a control file instead:

<AstrBot root directory>\private\sleep-control.json

The panel writes this file → AstrBot’s sleep plugin checks it each cycle → reads it, executes the action, and deletes it → a log entry like “Panel set fatigue to 55.0” is left behind.

The benefit is that DSH and AstrBot don’t need to open ports to each other or access the other’s process memory. The tradeoff is up to a 30-second delay.

FAQ

  • Panel stuck on “Loading…” / can’t connect to the host interface
  • Restart DSH once after installing the plugin.
  • Shows “Sleep plugin data not found”
  • The AstrBot directory is wrong, or astrbot_plugin_dafeiyu_sleep hasn’t been installed. Check whether the files listed in “Prerequisites” exist.
  • Changes have no effect
  • Check AstrBot’s run.log and search for “panel.” If there’s no entry, the directory is likely misconfigured or the plugin isn’t running.

Use Cases & Notes

Suitable for developers who use AstrBot with the Dafeiyu Sleep plugin and want a centralized panel to view and adjust fatigue level, wake/sleep times, and schedule parameters.

This plugin runs with the current DSH process permissions. Review the source code and license (MIT) before installing.

Conclusion

dsh-dafeiyu-sleep brings AstrBot’s sleep plugin state and parameter management into the DSH settings page, reducing the need to repeatedly switch directories and edit JSON files. If you want to quickly check or adjust fatigue levels and schedule parameters, give it a try.

  • Plugin directory page: https://www.skillhub.cn/plugins/happyxiancong/dsh-dafeiyu-sleep
  • GitHub repository: https://github.com/happyxiancong/dsh-dafeiyu-sleep
羽毛球分组比赛记分
小程序二维码

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

Xiaoye