Introduction

The plugin direction for DSH is “Everything is a Plugin.” In agent development, long task debugging, or multi-project parallelism, single-machine compute power or local environments might not be sufficient. scriptsnet/dsh-fleet is a DSH plugin designed to aggregate idle compute power from friends, local networks, and cloud ECS instances into a single team. One machine dispatches tasks to other online machines, while workers execute them automatically and flow back the results.

This plugin is maintained by scriptsnet and is licensed under MIT.

What is This

scriptsnet/dsh-fleet solves the problem of multi-machine collaborative invocation: each machine generates its own machine identity and joins one or more teams; team members can check each other’s online status; on the master side, fleet_dispatch can send tasks to specified members; on the worker side, tasks are executed, and sessions are mounted to the workspace for easy tracing.

It supports Windows, Linux, and macOS, and the runtime only depends on Node.js built-in modules. After the plugin starts, it registers 12 model tools and provides a “Compute Fleet” panel in the sidebar.

Core Capabilities

Machine Identity and Machine Card

After installation, each machine generates a machineId and a permanent SK.

The Machine Card is a single copyable string used to add this machine to a team, reducing manual configuration.

Multi-Teams

Each machine can belong to multiple teams simultaneously. Member rosters are independent between different teams.

Trust Handshake

The plugin uses challenge-response + HMAC-SHA256 for trust handshake to prove possession of the SK. The SK is never sent over the network in plain text.

Heartbeat Monitoring

Members report heartbeats via long connections and report resource information such as RTT and memory. It automatically reconnects after disconnection, and online status can be viewed in real-time.

Task Dispatch

fleet_dispatch is used to send tasks to online members. Workers automatically execute tasks and flow back the results.

A temporary taskToken is used during task execution, and signatures are verified via HMAC to prevent forgery. Workers have the final veto power.

Session Retention

After a worker executes a task, the task session is automatically mounted to the workspace for easy viewing and tracing locally.

Installation and Activation

If harness is already installed on this machine, you can install the DSH plugin using the command:

dsh plugin --profile web add https://github.com/scriptsnet/dsh-fleet

After installation, it takes effect after restarting harness.

After the plugin starts, it listens on the default port:

47900

It also registers /fleet/api/* routes for use by the sidebar panel. This route is only accessible via loopback.

The plugin also registers 12 model tools for operations such as cards, teams, members, connectivity tests, and task dispatch.

If the target machine does not have harness, the project provides Windows / Linux offline installers for offline installation of harness and the plugin.

Environment Variables

The following environment variables affect the plugin’s runtime directory and task session handling:

DSH_FLEET_HOME:默认 $DSH_HOME/fleet 或 ~/.dsh/fleet
DSH_FLEET_DISPOSE_AFTER_TASK:默认 0

DSH_FLEET_HOME is used for the identity and roster directories. When simulating multiple machines locally, you can specify this separately for each machine.

DSH_FLEET_DISPOSE_AFTER_TASK defaults to 0, keeping task sessions for viewing in the GUI.

Typical Usage

First, complete the installation and restart harness.

  1. View the local machine card:
查看我的机器名片 → fleet_card
  1. Add this machine to a specified team:
把这张名片加入 XX 团队 → fleet_add
  1. Check team and member online status:
有哪些团队?成员在线吗? → fleet_teams
  1. Dispatch tasks to specified teams or members:
用 fleet_dispatch 把任务发给「XX舰队」的成员

When dispatching, you can specify provider/model and keyHint:

keyHint: inherit / self

After the task is complete, the worker will flow the result back to the caller side, and the worker-side task session will also be mounted to the workspace.

Applicable Scenarios and Notes

Suitable for the following scenarios:

  • Already using harness and want to form a DSH compute team with multiple Windows, Linux, macOS machines.
  • Have idle PCs from friends, LAN servers, or cloud ECS instances and want to reuse their compute power.
  • Need to dispatch tasks across machines, check online status, and retain worker sessions.

Points to note:

  • The plugin runs with the permissions of the current dsh process. Before installation, you should check the source code, dependencies, and MIT license to ensure they meet your usage requirements.
  • The SK is a machine identity credential; do not leak it to untrusted people or environments.
  • /fleet/api/* is only accessible via loopback; do not expose it to the public internet.
  • Task execution relies on temporary taskToken and worker veto power, but this does not change local permission boundaries.
  • Current roadmap items to be implemented include: task log streaming and result return, UDP hole punching, invite codes, and publishing to npm (via dsh-plugin topic) to enable standard dsh plugin add installation. It cannot be confirmed from current verified sources whether the npm package has been published.

Resources

GitHub Repository:

https://github.com/scriptsnet/dsh-fleet