dsh-peer-bus: Cross-Session Message Bus for DeepSeek Harness

In DeepSeek Harness (DSH), sessions typically run in isolated contexts. If you need an agent to trigger another agent to execute a task, traditional natural language prompts are often insufficient. The dsh-peer-bus plugin provides a cross-session message bus that allows independent sessions to address and wake each other up.

Plugin Overview

  • Name: dsh-peer-bus
  • Maintainer: ybh1291747665
  • Category: Workflow
  • License: MIT
  • Core Value: Establishes a cross-session communication mechanism within the DSH ecosystem, supporting inter-session wake-ups, inquiries, and replies.

Installation and Activation

Installing the plugin requires using DSH’s plugin management command.

dsh plugin --profile web add dsh-peer-bus

After installation, DSH must be restarted to take effect. If pnpm indicates missing dependencies during installation, you can ignore it; the DSH runtime environment will provide these dependencies.

Typical Usage

To use cross-session communication, you need to obtain the session identifiers, establish permissions, and then trigger calls via natural language instructions.

  1. Get Session ID
    Run the following command in every session that needs to participate in communication, and copy the returned ID:
    /bus id
  1. Establish Permissions
    Permissions are denied by default. You need to explicitly authorize them. Authorization must be performed in the receiving session.

    Assuming Session A wants to send a message to Session B, you need to run the following in Session B:

    /bus allow <A's id>
  1. Initiate Calls
    In Session A, issue instructions directly to the model using natural language. The model will automatically select the appropriate tools (such as bus_ask or bus_send).

    • Synchronous Inquiry: Ask B to answer a question and return the result in the current turn.

      Ask <B's id> what the release version is.

    • One-way Send: Just wake B up without waiting for a reply.

      Send <B's id> a message saying ….

    You do not need to enter tool names in the prompt; the model will select them automatically based on the context.

Core Functions

The plugin provides the following tools for the model:

  • bus_send: Sends a message; the target session will be woken up to run a turn.
  • bus_ask: Asks the target a question; the answer is returned in the current turn.
  • bus_reply: Explicitly answers a question.
  • bus_wait: Receives and processes an incoming message instead of letting it trigger a turn immediately.
  • bus_roster: Lists other sessions that the current session can access.
  • bus_status: Queries the status of previously sent messages.
  • /bus: Used to grant or revoke permissions (this command is user-only; the model cannot execute it).

Notes

  • Permission Control: Without any authorization, the model cannot send messages to other sessions. Access must be granted via /bus allow or configuration files.
  • Security Risks: Incoming messages are processed as user messages, and the model may treat them as instructions. Therefore, an open message bus may constitute a path for prompt injection. It is recommended to revoke permissions promptly when not needed.
  • Cross-Process Communication: By default, cross-process communication is disabled. If you need sessions in different DSH processes to communicate with each other, you need to set crossProcess: true in the configuration of both processes.
  • Cost and Performance: Every message wakes up the target session to execute a full turn, meaning each call consumes a round of context and computing resources.
羽毛球分组比赛记分
小程序二维码

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

Xiaoye