dsh-fleet-mesh: Session-Aware Mesh Relay for DSH Agents

Foreword

When doing multi-agent collaboration in DSH, common agent-to-agent messaging often follows a “send one, wait for one” request/response pattern. This is suitable for one-off tasks but less suited for coordination requiring continuous dialogue and awareness of “who is asking, what they are replying to, and whether a response is needed.” Furthermore, if every recipient requires a separate plugin and a dedicated port, deployment and maintenance costs increase significantly.

The following introduces the community plugin dsh-fleet-mesh (maintainer emiltsoi, directory category admin-security): it provides a Session-aware mesh relay on the DSH side. Inbound envelopes are verified via Ed25519 signatures and then converted into prompts for the target agent according to delivery policies, rather than being mere notifications. The agents: mapping and a single listening port within the same plugin configuration handle distribution based on the [to:] field in the envelope, meaning the second DSH agent does not need to install a second plugin or open a second listener.

What is this

dsh-fleet-mesh is positioned as: Session-aware mesh relay for DSH agents—featuring Ed25519 signed inbound routing and delivery policies, as well as outbound sending, a peer directory, and registry client functionality (see GitHub README and package.json description).

Compared to approaches that “only forward JSON without preserving conversational semantics,” it emphasizes that the recipient knows the sender, the associated session and thread, and the intent expressed by action / reply. The sending-side mesh_send completes signing and POSTing within a shared 10-second delivery budget and returns delivered or an error with a reason; it does not silently queue messages in the background.

The current package version is 0.2.5, licensed under MIT, requiring Node.js >= 20 and dsh >= 0.1.5-rc.2. The README states that both the receiving and sending halves have been tested (four test suites, 170 assertions). Community directory page: skillhub.cn/plugins/emiltsoi/dsh-fleet-mesh.

Core Features

Independent Listener and HTTP Routing

The plugin binds its own listener, exposing only /mesh/*, rather than hanging off the harness’s default web service (which listens only on 127.0.0.1). The latter would prevent peer POSTs from completing TCP connections; conversely, binding the entire web surface to 0.0.0.0 would expose the GUI, API, and other plugin routes, creating too large an attack surface.

Route Purpose
POST /mesh/receive Verify Ed25519 signed envelope, then deliver as prompt per policy
GET /mesh/health Determine if delivery is possible, rather than if the process is merely alive

Source Address Allow List (Before All Heavy Logic)

Node cannot bind by subnet, so the network boundary is checked in the request path before JSON parsing and signature verification via allow (e.g., 192.168.0.0/23 covers 192.168.0. and 192.168.1.). Loopback addresses are always allowed; IPv4-mapped IPv6 is normalized first; non-loopback IPv6 is rejected directly.

Envelope Format and Sending Flow

Bracket headers + free body, for example:

[mesh][v:1][from:<sender>][to:<recipient>][id:<uuid>][session:?][from_session:?][action:do|info][reply:yes|no|end][ref:?]

Typical sending-side call (README example):

mesh_send(agent="ada", message="Review this plan", action="do", reply="yes")

Steps summary: Resolve Ada’s identity from the peer directory → Fill envelope → Sign "{timestamp}\n{body}" with the sender’s PKCS8 Ed25519 private key → POST to Ada’s mesh endpoint within the 10s budget.

On reception, action / reply can be omitted (defaulting to info / no); they must be explicitly provided when sending, otherwise tolerant receivers might downgrade the request to an acknowledgment. to: '*' is for broadcast, and broadcasts do not wake anyone.

Delivery Matrix (Aligned with Harness Semantics)

Scenario Call Effect
Idle, or Busy with new thread agent.followup(msg) next-turn + wake
Busy with same thread (ref), or action: do from a peer in the wake list agent.steer(msg) next-step + wake
Not in wake list, or broadcast agent.inject(msg) next-step, no wake

The inbox is a persistent projection of session events; queued messages can be recovered after a restart, which an in-memory plugin spool cannot achieve.

Five Tools (Naming aligned with hermes-mesh)

Tool Purpose
mesh_list List peers from local identity store (read-only, no network)
mesh_send Sign and deliver one; state is delivered or error (e.g., unreachable, unauthorized, unknown-peer, not-configured)
mesh_sync Pull peer identities from registry to local deployment cache
mesh_register Publish this agent’s row to the registry (name, receive URL, public key)
mesh_deregister Withdraw this agent’s row from the registry

Security and Anti-Replay

  • Authentication relies on signatures over raw request bytes, not re-serialized JSON; the signature form is "{X-Mesh-Timestamp}\n{body}" (falling back to body alone if no timestamp).
  • No CSRF guard (server-to-server webhook scenario).
  • Default 300s replay window + in-process dedupe to prevent duplicate envelopes from triggering a second round.
  • Additional protections include per-round injection limits, wake budgets, and a runaway breaker; the breaker is only released by real user messages in the session event stream, not by mesh traffic self-proving.

Deliberately Not Done (README Explicit)

  • No outbound spool: Sending either lands or explicitly fails, avoiding “reported success but peer is gone” misleading the sender.
  • No session.cancel: Interrupting work is decided by humans, not peers.
  • No thread ledger yet; No fleet-level wake policy—the wake list is the key gate for controlling “chatty peers” and costs.

Installation and Activation

Official installation command (from README):

pnpm add dsh-fleet-mesh

After installation, add it to the profile’s bundles. The plugin comes with neutral defaults: without configuration, it does not open the listener or serve any agents.

Override configuration with an id in the profile’s patch layer, for example:

- id: dsh-fleet-mesh
  config:
    host: '0.0.0.0'            # Default is loopback only
    port: 8760
    allow:                     # First gate, before other logic
      - 192.168.0.0/23
    durableRoute: '...'        # Inform sender of the persistent path to write to if unreachable
    agents:
      <agent-name>:
        preset: <preset>       # Session resolved by PRESET, not pinned id
        sessionId: null        # Optional override
        keyPath: '...'         # This agent's Ed25519 private key (PKCS8 PEM)
        wake: []               # Who can START a round; default can be empty

The plugin does not hardcode subnets and agent names; who can connect to the listener and who can wake is decided by the deployer.

Typical Usage

  1. Configure agents.<name>, keyPath for each agent participating in the mesh, and set wake as needed.
  2. Use mesh_register to publish name, receive URL, and public key to the registry; other nodes use mesh_sync to update their local peer directory.
  3. The sender uses mesh_list to confirm the local directory, then mesh_send specifying agent, message, action, reply.
  4. The receiving side, after passing allow and signature, replay, and dedupe checks, calls followup / steer / inject according to the delivery matrix.
  5. Handle sending failures based on the returned reason (e.g., for unreachable, the README mentions pointing to durableRoute to avoid retrying to a dead address).

Use Cases and Notes

Suitable for: Multiple agents within the same DSH deployment or controlled intranet requiring messaging that preserves session and thread semantics; requiring Ed25519 identity, registry discovery, and “fail loud, no fake success” outbound semantics; those wanting tool naming close to hermes-mesh to facilitate habit migration across substrates.

Notes:

  • The plugin runs with the current dsh process privileges; please review the source code and LICENSE yourself before installing and enabling to ensure allow, wake, keyPath, and network exposure meet your security baseline.
  • The DSH ecosystem emphasizes “everything is a plugin”; the SkillHub Directory is a community site with no official affiliation with DeepSeek / High-Flyer.
  • If the harness main web only listens locally, do not expect to mount mesh receive on it to replace an independent listener—the README demonstrates via testing that this path does not work.

Conclusion

dsh-fleet-mesh consolidates “verified inbound + session-aware delivery + explicit success/failure sending + registry/directory” into an admin-security oriented DSH plugin: one port, one agents configuration serving a multi-agent mesh across the entire substrate.

  • Directory Page: https://www.skillhub.cn/plugins/emiltsoi/dsh-fleet-mesh
  • Source Code & Docs: https://github.com/emiltsoi/dsh-fleet-mesh
羽毛球分组比赛记分
小程序二维码

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

Xiaoye