2huy4n/roleplaytimer: Proactively Wake Roleplay Agents After Silence

In the DeepSeek Harness (DSH) plugin ecosystem, the standard way to extend agent behavior is by writing plugins. When doing roleplay, if the user stays silent for a long time the agent may fall into silence, causing conversation gaps. The 2huy4n/roleplaytimer plugin solves this problem: when it detects that the user hasn’t replied for a long time, it automatically posts a follow-up message to hand the turn back to the agent.

Plugin Overview

Maintained by developer 2huy4n and licensed under MIT, the plugin’s core value lies in simulating user behavior: when the user’s silence reaches the configured duration, the plugin injects a message with the role user into the session. The content is rendered from an editable “wake prompt”. Upon receiving the message, the agent continues speaking in-character according to its character card, instead of passively waiting for user input.

Key Features

  • Deliver follow-up messages: After detecting silence, the plugin sends a message via DSH’s agent.followup() API.
  • Continue in character: When woken, the agent continues the conversation according to the character-card logic.
  • Does not interrupt the current turn: Delivery only happens when the agent is idle, via agent.runMaintenance(); it will not interrupt an ongoing conversation.
  • Fuzzy-random wake-ups: Supports a jitter range. For example, with a 180-minute interval and 30-minute jitter, the actual wake time is randomized between 150–210 minutes.
  • Muted by default for new sessions: The plugin does not automatically write to new sessions; wake-ups are disabled by default and must be enabled manually in the control panel.

Installation and Activation

Install the plugin using the official plugin management command.

dsh plugin --profile <profile> add "git+https://github.com/2huy4n/roleplaytimer#v0.2.0"

After installation, restart the DSH application. In Settings, locate the roleplaytimer control panel: check “Enable proactive wake-ups”, then click “Unmute” on the session(s) you want to wake.

Configuration and Usage

The plugin provides the following key configuration options:

  • intervalMinutes: How many minutes of user silence trigger a wake-up; default 150 minutes.
  • jitterMinutes: Jitter range (± minutes); set to 0 for precise timing.
  • dailyMaxWakes: Maximum wake-ups per day; 0 means unlimited.
  • quietStart / quietEnd: Quiet hours; e.g., set to 23:30–08:00 to disable wake-ups during that period.
  • wakePrompt: Wake prompt; supports placeholders such as {minutes} and {count}.
  • defaultMuted: Whether new sessions are muted by default; default is true.

A typical setup is: set intervalMinutes to 180 and jitterMinutes to 30. This means that after the user’s last message, the system will wait a random time between 150 and 210 minutes and then deliver the wake-up message.

Notes and Limitations

Before using, be aware of several hard constraints:

  • A live root agent is required: Messages can only be delivered while the DSH application is running and the session is open; no backfill occurs while the app is closed.
  • Delivery only when idle: The plugin will not interrupt while the user is conversing; if runMaintenance is busy, it will back off and retry.
  • Timer start point: The countdown starts from the last real user message; the plugin’s own wake message does not count as user activity.
  • Muted by default for new sessions: The first time the plugin sees a session, it will not wake it by default; you must click “Unmute” for that session in the panel.

Final Thoughts

By simulating user messages in the background, this plugin addresses the agent “freezing” when there’s no interaction for long periods. It’s particularly suitable for scenarios that require maintaining character activity over extended time. For more details and the source code, see the GitHub repository.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye