Foreword¶
When running agents in DSH (DeepSeek Harness), interactions often stop at a simple “user prompts, model responds” loop. If you want the assistant to speak up at appropriate moments on its own—rather than relying on a fixed cron job to push the same scripted copy—you need to perform timed checks, evaluate quiet conditions, deliver messages to the session, or trigger fallback notifications within the host process, while avoiding verbatim repetition of sentences from a pool.
The dsh-selfwake plugin, released by community maintainer S3K926, addresses exactly this need. It periodically checks “five gates” before speaking up. If all gates pass, it prioritizes delivering the message to the current active session; if delivery fails, it sends a system notification and writes a log. The plugin is open-sourced on GitHub (MIT) and categorized as a workflow on SkillHub.
What is this¶
dsh-selfwake is a DSH plugin whose core capability is proactive speaking when the time is right. Maintained by S3K926, the current version in package.json is 0.1.1, requiring Node.js ≥ 22 and DSH ≥ 0.1.7-rc.2.
By default, starting from 2026-09-30, it uses generation mode (generateText: true): instead of sending sentences directly from the wake-up pool, it injects a segment of “state + constraints” into the session, allowing the model to generate a sentence or two on the spot. If set to generateText: false, it reverts to the old behavior of picking a raw sentence from the pool and sending it.
Five Gates and Weighted Intervals¶
The plugin checks periodically based on tickSeconds (default 60). Speaking is triggered only if all five gates below pass; if any gate fails, the reason is logged, and nothing else happens.
| Gate | Config Key | Default | Criteria |
|---|---|---|---|
| Interval | intervalMinutes ± jitterMinutes, weightable by unanswered count |
20 ± 8 | Time since last wake ≥ the interval rolled for this cycle (reproducible random) |
| Quietness | minIdleMinutes |
20 | User has been quiet for the set minutes (based on the timestamp of the last real user/message event, not the session file mtime) |
| Unanswered Limit | maxUnanswered |
3 | Consecutive unanswered count is below the limit (Default changed from 7 to 3 on 2026-10-21) |
| Quiet Hours | quietStartHour / quietEndHour |
0 / 7 | Current time is not within quiet hours |
| Daily Max | dailyMax |
12 | Wake count for the day has not reached the limit (0 means unlimited) |
The longer the silence, the slower the speaking rhythm. The weighting formula is:
Weighted Interval = intervalMinutes × (1 + Consecutive Unanswered Count × backoffPerUnanswered) (Capped at 6x)
backoffPerUnanswered defaults to 0.5; setting it to 0 reverts to a fixed interval.
Generation Mode and “One Turn”¶
In generation mode, the injected text includes the current time, the interval since the last wake, user silence status, and whether the previous proactive topic was picked up. It also includes five hard constraints (e.g., no fabricating unseen events, no mentioning self-waking or the plugin, no rapid-fire follow-ups). In this mode, the wake-up pool file (poolFile) serves primarily as an angle reference; a random entry is picked and included in the injected text, rather than being copied and sent verbatim.
Since 2026-09-30, a single wake-up can be split into one turn: 2 to 4 independent short injections, each generating one sentence, with a random gap of 3 to 15 seconds between segments; the cooldown time is doubled after the turn ends. The implementation uses itemized injection, avoiding the need to read back the full assistant text from the session to slice it (the README documents a test issue where reading back is incomplete).
The delivery order is: prioritize direct delivery to the current active session; if the window is closed or delivery fails, use notifyScript to send a system notification when notify: true, and always write a log line.
Wake-up Pool and Frontend¶
poolFile points to a plain text file with one entry per line, where # indicates a comment; a built-in default pool is used if the file is missing or fails to read. When picking entries, it tries to avoid the content picked in the previous cycle.
The plugin includes client.js (dsh.client.platform: web) to identify the display method for self-wake injections based on text prefixes; the README reminds users to keep the host-side prefix consistent with MARKERS if modified.
Installation and Activation¶
Place the plugin directory into your DSH plugin source directory and run (replace the path with your local actual location):
dsh plugin --profile web add /path/to/dsh-selfwake
Restart DSH to reload after modifying configuration.
Configuration Essentials¶
In addition to the keys related to the five gates above, common items include:
| Key | Default | Description |
|---|---|---|
enabled |
true |
Master switch |
generateText |
true |
Generation mode switch |
replyWindowMinutes |
10 |
How long after a wake-up counts as “picked up” if the user makes a sound |
notify |
true |
Whether to notify when session delivery fails |
notifyScript |
'' |
Path to notification script; see README for calling conventions (Example is PowerShell; equivalent scripts needed for other platforms) |
stateDir |
$DSH_HOME/selfwake or ~/.dsh/selfwake |
State and logs |
sessionsRoot |
e.g., $DSH_HOME/sessions |
Look for recently active sessions |
device |
【PC】 |
Device label in logs and notifications |
Home directory resolution order is $DSH_HOME → ~/.dsh, facilitating portable or multi-instance deployments.
Self-test and Limitations¶
You can run locally:
node index.js --selftest
Limitations listed honestly in the README include: the computer must be on and the DSH process running; delivery to the session is impossible when the active window is closed (notification only); the plugin runs with current DSH process privileges, so review the source code and MIT license before installation.
The design references community implementations like proactive-nudge, ProjectKaren, revive-companion, and yuralume’s review article (the README clarifies design inspiration only, not code copying).
Links¶
- SkillHub Directory Page: https://www.skillhub.cn/plugins/S3K926/dsh-selfwake
- GitHub Repository: https://github.com/S3K926/dsh-selfwake
The DSH ecosystem emphasizes “Everything is a plugin”; SkillHub is a community directory site with no official affiliation with DeepSeek / High-Flyer. If you need the assistant to speak proactively within appropriate silence windows in the Harness, and want content generated by the model on the spot rather than repeating fixed copy, you can install dsh-selfwake according to the steps above and tune parameters based on the five gates and generateText.