dsh-proactive: Automatic Wake-up and Reporting After the Agent Turn Ends

Preface

The Agent model in DSH is essentially a request–response process. Once a turn ends, the Agent enters a dormant state, with no built-in timer or process-listening mechanism. When long-running tasks (such as downloading large files, compiling, or waiting for a service to start) need to be executed, the Agent does not automatically wake up after the task completes to report back; the user must proactively ask.

dsh-proactive is a DSH plugin that solves this problem. After an Agent turn ends, it acts as a “night watchman,” injecting messages and waking up the Agent when conditions are met so that it can proactively report task completion.

Positioning

This is a workflow plugin maintained by developer mili1360. Its core value is to automatically wake up the Agent after its turn ends and report completion status for long-running tasks.

Core Features

  • Automatic wake-up: After an Agent turn ends, wake up the Agent by injecting a message.
  • Multiple triggers: Supports various monitoring methods, including file stability, process exit, port opening, and timers.
  • Message injection: Uses agent.steer() to inject instructions, with a mechanism similar to dsh-subagent reporting back to the parent agent.
  • Message retry: Supports the repeatSeconds configuration for continuous monitoring of files that keep changing (such as logs).
  • Unobtrusive notifications: By default, not rendered as a user bubble (source.kind=plugin); the user only sees the Agent’s reply.

Installation and Enabling

Installing this plugin only requires one command:

dsh plugin add --profile web github:mili1360/dsh-proactive

After installation is complete, you must restart the DSH process for the plugin to take effect.

Typical Usage

  • Scenario example:
    User: “fetch that 20 GB thing and tell me when it’s done”
    Agent (starts downloading -> turn ends -> dormant)
    … hours later …
    Plugin (detects that file size stops changing -> injects message -> wakes up Agent)
    Agent: “Done — 20.3 GB, and I verified the checksum against the published one.”

  • Configuration steps:

    1. Add a watch.example.json file to the configuration.
    2. Add the configuration item to the dsh.profile.bundles array.
    3. The plugin starts a timer and checks the trigger condition at the set interval.

Use Cases and Precautions

  • Dependencies and compatibility:
    This plugin depends on the @deepseek-ai/dsh-llm package. Currently, it only supports DSH 0.1.0-rc.7 (custom build version).

  • Message rendering:
    Messages from the plugin are not rendered in the UI by default (source.kind=plugin), making the experience more natural when the Agent proactively reports back. If you need it rendered as a user bubble, explicitly set sourceKind: 'user'.

  • Session selection:
    If no sessionId is specified, the plugin wakes up the most recently active session. If the specified session does not exist, that entry is skipped and remains on standby.

Summary

For scenarios that require handling long-running background tasks, this plugin fills the state-synchronization gap during the Agent’s dormant period. You can view more details in the Community Directory, or view the source code and documentation on GitHub.

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

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

Xiaoye