⚡ dsh-fleet

August 22, 2026 · View on GitHub

Pool every idle machine — friends' PCs, LAN servers, cloud ECS — into your own distributed AI compute fleet.

One machine can dispatch to any machine in the fleet. One person, many Harnesses, parallel projects.

🧠 Every idle machine's compute is your distributed AI pool.

💻 Cross-platform — any machine that can run DSH can join the fleet
Windows · Linux · macOS · Cloud ECS · Raspberry Pi — no OS limit, any machine joins


🌏 简体中文 README: README.md · 中文版本请见 README.md


✨ Features

FeatureNotes
🪪 Machine IdentityAuto-generates machineId + permanent SK on install, zero-config
🃏 Machine CardOne-line copyable string (ID/name/IP:port/CPU/mem/NAT/SK), one-click join
🧑‍🤝‍🧑 Multi-TeamOne machine can belong to many teams, each with an isolated roster
🔐 Trusted Handshakechallenge-response + HMAC-SHA256 proves SK possession; SK never crosses the wire
💓 HeartbeatLong-lived connection + RTT/memory reporting, auto-reconnect
🚀 Task Dispatchfleet_dispatch sends a task to any online member; results flow back
📦 Sessions RetainedWorker session auto-mounts to workspace; GUI-visible and traceable
💻 Cross-platformWindows / Linux / macOS as master or worker
🧰 Zero DepsNode built-ins only, no runtime dependencies
🖥️ One-click InstallerOffline harness + plugin setup for Windows / Linux

🏗️ Four-Layer Model

LayerContentsImpl
IdentitymachineId + permanent SK, listens on a portidentity.js, listener.js
TrustManual add via card or IP+SK, removable both wayscard.js, roster.js
AuthorizationTemp taskToken (HMAC-verified), worker holds vetoprotocol.js
Control PlaneSession/workspace directives, heartbeat reportingpeer.js

Trust basis: knowing someone's permanent SK = authorized to call them. SK never travels in plaintext; the handshake proves possession via challenge-response.

📦 Install

# Local path install
dsh plugin --profile web add "E:\DeepSeekHarness\dsh-fleet"

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

# From npm (recommended)
dsh plugin --profile web add dsh-fleet

Restart harness after install. On plugin start:

  1. Auto-generates machine identity (data\fleet\identity.json, portable)
  2. Listens on port 47900 (worker role)
  3. Registers 12 model tools (below)
  4. Registers /fleet/api/* routes (loopback-only)
  5. Sidebar "Compute Fleet" panel appears

One-click installer (no harness on target)

FileOSUsage
install.ps1Windowspowershell -ExecutionPolicy Bypass -File install.ps1 -HarnessZip "D:\DeepSeek-Harness-便携版.zip"
install.batWindowsDouble-click, or same args
dsh-fleet-agent-installer.exeWindowsDouble-click (ps2exe)
install.shLinux / macOSbash install.sh [<plugin-dir>] (systemd autostart)

🛠️ Tools (12)

ToolPurpose
fleet_cardShow local machine card
fleet_teamsList teams: members, online, compute, mem, RTT
fleet_team_createCreate a team
fleet_team_deleteDelete a team
fleet_addJoin via card or IP+SK, auto-handshake
fleet_removeRemove a member
fleet_testConnectivity test + handshake
fleet_membershipsList my memberships (worker view)
fleet_leaveLeave a team
fleet_refuse / fleet_resumeRefuse / resume calls (DND)
fleet_dispatchDispatch a task to a member

🚀 Quick Start

Join a team

"show my machine card"          → fleet_card
"add this card to team XX"       → fleet_add
"which teams? who's online?"     → fleet_teams

Or use the sidebar panel.

Dispatch a task

Use fleet_dispatch to send the task to a member of "XX fleet":
- prompt: "use bash to run echo hello and output the result"
- provider / model: deepseek-official / deepseek-v4-flash
- keyHint: inherit (use master's key) or self (use worker's own key)

Returns: member / task ID / workspace / session ID / answer / logs. Worker session auto-mounts to workspace, full transcript in GUI.

Plugin config (cordis.patch.yml)

- id: dsh-fleet
  name: dsh-fleet
  config:
    port: 47900        # listen port
    # home: <path>     # identity/roster dir, default $DSH_HOME/fleet
    # listen: true     # false = master-only, no listen

Env vars

VarDefaultNotes
DSH_FLEET_HOME$DSH_HOME/fleet or ~/.dsh/fleetIdentity & roster dir; set per-machine for local multi-machine sim
DSH_FLEET_DISPOSE_AFTER_TASK01 = dispose session after task (recovers on refresh); default keeps it GUI-visible

🔌 Protocol

JSON-lines over TCP. Handshake:

server → challenge { nonce, machineId, name }     server self-identifies + challenge
client → auth     { machineId, name, proof }      proof = HMAC(serverSK, nonce)
server → welcome | error(AUTH_FAILED)             local verify, SK never leaves
then periodic ping / pong (pong carries mem stats)

Task dispatch: submit_task { taskId, token, prompt, provider, model } → worker verifies → new workspace → agent session → execute → task_result back. token = HMAC(workerSK, taskId), anti-forgery.

🗺️ Roadmap

Implemented

  • Identity / card / multi-team / connectivity / heartbeat
  • Secure handshake (challenge-response), bad SK rejected
  • DSH plugin: 12 tools + fleet Service + /fleet/api/* routes
  • One-click installer (ps1 / bat / exe / sh)
  • Task dispatch / execute / result back, worker sessions mounted
  • keyHint dual mode (inherit / self), fail/timeout paths
  • Per-task provider / model / preset / workspace
  • Public IP / NAT detection (STUN with fallback tiers)

Planned

  • Streaming task logs / artifact return
  • UDP hole-punching; invite codes
  • npm publish, standard dsh plugin add install

📄 License

MIT


☕ About This Project

dsh-fleet began as a spark: "pool every idle machine's compute."
Then... actually burned ~200M tokens building it.

If you build AI agents / full-stack, let's talk — collab, contract, or just chat.
📮 3292957@qq.com  ·  GitHub: @scriptsnet

💡 Built for fun, not for profit. If it helps, a ⭐ is the best support.


Support the token burn ☕

WeChatAlipay
WeChat PayAlipay