Foreword¶
For long-session agents, during the time they are “asleep,” they are typically blank: they produce no messages and do not change any state. If you want it to have a more continuous sense of personality, a common approach is to manually write a few mood records for the sleep period, or simply skip this time and do nothing. The plugin introduced below, yanyan-shub/dsh-dream (maintainer: yanyan-shub, category: Fun Outfits, stars: 0), takes a different approach—instead of writing a story, it just adjusts a layer of background tone.
It is aimed at DSH plugin developers and solves the problem of: how to automatically generate quiet, restrained dream fragments during the agent’s sleep period and inject them in a non-intrusive way upon waking, rather than generating a full narrative that crowds the context.
What is this¶
One-sentence positioning: dsh-dream is a plugin that periodically “dreams” during the agent’s sleep period, producing imagery and feeling fragments to influence the expression tone after waking, without constituting a story or actively reporting.
The maintainer is yanyan-shub, see the end of the article for the repository address. The README classifies it into a relatively niche category: Dreams. The official description is: “When asleep, it stirs up the events of the day and leaves behind one or two indistinct fragments.”
Core Features¶
Only capabilities verified in the README are written here.
-
Sleep period trigger. Between
sleepStartandsleepEnd, a dream is generated everyeveryMinminutes, with a maximum ofmaxPerNightdreams per night. -
Material source limited to daily events. Candidate materials include things she did that day—reading the
dsh-fishdaystate—as well as an optional heartbeat file (recording who sought her). No dream is generated when no event source is available; the README explicitly states this is an intentional design. -
Fragments are filtered by intensity. Each dream generates 1–2 fragments (imagery + feeling), and only those with high intensity enter the prompt.
-
Injection method upon waking. The injected content consists of the background tone, fragments (half a sentence, not expanded), and a “Dreams are not stories” rule. No content is injected during sleep; the agent cannot “see” its own dreams.
Three accompanying tools are provided for viewing and clearing:
| Tool | Function |
|---|---|
dream_last |
Recent fragments |
dream_recall |
Recall dreams of a specific day |
dream_clear |
Clear fragments and background tone |
Data is stored by default in ~/.dsh/dream/state.json. Optional path configurations include dataDir, sourceDir, and heartbeatFile. The README clearly states that there are no hardcoded absolute paths in the code; everything relies on configuration or the user directory.
Installation and Activation¶
The installation command given in the README is as follows; you need to replace <this directory> with the plugin directory:
plugin_manager install_bundle <this directory>
To enable it, write it into the DSH configuration. The complete example configuration from the README is as follows; just copy the field names and values, and the commented-out lines are optional path configurations:
- insert:
- id: dsh-dream
name: dsh-dream
config:
sleepStart: '23:00'
sleepEnd: '08:30'
everyMin: 90
maxPerNight: 3
keep: 30
# dataDir: 'X:/somewhere/dream' # Optional, default ~/.dsh/dream
# sourceDir: 'X:/somewhere/fishday' # Optional, default ~/.dsh/fishday (reads its state.json)
# heartbeatFile: 'X:/path/last-heard.json' # Optional, who sought her
sourceDir points to the state directory of dsh-fishday and will read the state.json inside it. If you do not have dsh-fishday yet, this source of material will be empty.
Typical Usage¶
Follow the flow in the README:
-
First, confirm the event source. The plugin can only dream if there is a
dsh-fishdaystate or ifheartbeatFileis configured; no dreams are produced when neither exists. -
Set
sleepStart/sleepEndto the sleep period you wish to cover. The monitoring duration is controlled byeveryMin, and the session limit per night is controlled bymaxPerNight; 3 is the example value in the README. -
keepcontrols the number of days to retain; the example value is 30. -
When needed, use
dream_recallto look up dreams from a specific day, and usedream_clearto clear fragments and background tone when resetting the state is necessary. Usedream_lastwhen you want to generate a startup status prompt.
Suitable Scenarios and Notes¶
Suitable for character scenarios that require maintaining personality continuity during long idle periods, as well as plugin developers who want to verify the practice of “low-information injection state”. It deliberately does not generate a complete story, so it is unsuitable for scenarios that require narrative output during the sleep period.
Two reminders. First, the plugin runs with the permissions of the current dsh process. Paths like sourceDir and heartbeatFile are located in the user directory or configuration. Please check the source code before installation to confirm that the behavior matches your expectations. The license is MIT. Second, the current star count is 0. It is a niche plugin with low-frequency maintenance. Before configuring, confirm that dependencies such as dsh-fishday are in place, and then decide whether to enable it.
Conclusion¶
The value of dsh-dream lies in compressing “what to do during sleep” into a layer of background tone and a few fragments, rather than a narrative. Suitable for developers who want to add a quiet internal state to the agent without wanting the context to be crowded by dream content.
Directory Page: https://www.skillhub.cn/plugins/yanyan-shub/dsh-dream
GitHub: https://github.com/yanyan-shub/dsh-dream