TwinsEarth/dsh-windows2macos

dsh-windows2macos

一条指令同时下发给所有在线的 Windows 与 macOS 机器,可跨网络跨区域:零依赖中继只通过出站连接与各机通信(Tailscale 内网、公网 VPS + TLS、或隧道),各机在各自的项目副本上执行,结果连同 commit、工作区指纹与命令哈希一并回传,因此"环境不一致"会被判为 unverifiable,而不会被误当成结果分歧。下发指令需要独立于设备令牌的 operator token。

Uncategorizeddeepseekdeepseek-harnessmulti-machine

DSH: Windows2MacOS

One DeepSeek account. One instruction. Every machine you own runs the same project.

English | 中文

Install

Five routes in. They all end with 16 tools registered in your agent. Pick one.

1. DSH plugin (recommended — zero configuration)

# 1. install the package into your DSH profile
dsh plugin add @twinsearth/w2m-dsh-plugin

# 2. name it in the profile's bundle list — a package that is not bundled never loads
#    ~/.dsh/profiles/<profile>/dsh.profile.yml
plugins:
  - '@twinsearth/w2m-dsh-plugin'

# 3. restart DSH; joining happens at mount time, so a hot reload is not enough

Since 1.1.15 the agent starts by itself (autoStartAgent defaults to true): a freshly installed machine derives its account identity, joins the account's fleet, and shows up in w2m_devices with no pairing step. To turn that off, patch the existing w2m row — do not add a second one:

# cordis.patch.yml
- id: w2m
  config:
    autoStartAgent: false

2. npm (MCP server, any client)

npm install -g @twinsearth/w2m-dsh-plugin
w2m-mcp --help

Point any MCP client at w2m-mcp. Zero runtime dependencies; the package ships the relay, the agent and the tools.

3. Claude Code

/plugin marketplace add TwinsEarth/dsh-windows2macos
/plugin install w2m@twinsearth

The manifests live in .claude-plugin/ and are version-locked to the release.

4. Codex and other MCP-capable CLIs

# copy this block into your own codex/mcp-servers.toml
[mcp_servers.w2m]
command = "npx"
args = ["-y", "@twinsearth/w2m-dsh-plugin@1.1.19", "w2m-mcp"]

5. Verified release tarball (offline)

From the v1.1.19 release page download both files — twinsearth-w2m-dsh-plugin-1.1.19.tgz and SHA256SUMS — then:

curl -LO https://github.com/TwinsEarth/dsh-windows2macos/releases/download/v1.1.19/twinsearth-w2m-dsh-plugin-1.1.19.tgz
sha256sum -c SHA256SUMS          # verify before installing, always
npm install -g ./twinsearth-w2m-dsh-plugin-1.1.19.tgz

Every release carries SHA256SUMS for exactly this reason. If a release is missing it, do not install that release.

6. Beta (prerelease — never on npm)

A beta is a GitHub prerelease, not an npm version. Nothing about it is resolved by npm install, and latest never points at one. It exists for a developer who has been granted beta-access and accepts that it can break.

# 1. find the newest prerelease (a beta is marked "Pre-release" on the releases page)
#    https://github.com/TwinsEarth/dsh-windows2macos/releases  -> latest entry labelled Pre-release
# 2. download BOTH files attached to it: twinsearth-w2m-dsh-plugin-<version>.tgz and SHA256SUMS
sha256sum -c SHA256SUMS          # verify before installing, always
npm install -g ./twinsearth-w2m-dsh-plugin-<version>.tgz
  • Access: the beta workflow waits on the protected beta-access environment, so a reviewer must approve each run

before the artifact exists at all.

  • Risk acknowledgment: install it only if you have read SECURITY.md and accept that a beta may fail

where a stable release does not.

  • Going back: npm install -g @twinsearth/w2m-dsh-plugin@latest returns you to the stable channel.
  • Why not npm: there is no npm publish line in the beta workflow. A channel cannot leak into the default install if

the publication cannot happen at all.

Quick start

w2m_status                       # am I paired? which fleet?
w2m_devices                      # what is in the fleet?
w2m_run mode="replicate" command_argv=["git","rev-parse","HEAD"]
w2m_wait task_id="..."

replicate runs on every online machine; the verdict is consistent only when every machine returned the same result and the same commit anchor. split gives each machine a slice, pipeline chains stages, broadcast names one executor and reports observers, compose merges results.

What it is

An installable plugin that turns a set of machines into one fleet, keyed by your account, not by a hand-maintained host list.

Piece · Responsibility Relay · a small HTTP server: task routing, leases, SSE, blob storage. Run it anywhere your machines can reach. Agent · runs on each machine: pairs once, executes allow-listed commands, heartbeats. Plugin · the tools your agent calls. Admission (1.1.14+) · a new machine asks to join; an online member approves, 10 s auto-approves, and a machine admitted in the last 24 h can be removed immediately.

Tools

w2m_status · w2m_devices · w2m_run · w2m_wait · w2m_history · w2m_stats · w2m_report · w2m_memory · w2m_approvals · w2m_cancel · w2m_council · w2m_chat · w2m_update w2m_tasks · w2m_reduce

  • w2m_intent — map a structured intent (run-tests, node-version, git-status, git-head, fleet-facts, shard-probe) onto an allow-listed command; unknown intents are refused by name, never guessed.

Environment a dispatched command receives (1.1.15+)

Values come from the offer, never from argv, so one machine cannot reshape a fleet-wide split.

Variable · Meaning W2M_INDEX / W2M_INDEX_TOTAL · this machine's slice number and how many slices exist W2M_STAGE_INDEX · the pipeline stage; deliberately separate from W2M_INDEX W2M_TASK_ID / W2M_MODE · the task and its mode W2M_MACHINE_ID / W2M_MACHINE_NAME · this machine

So command_argv=["node","-e","process.exit(Number(process.env.W2M_INDEX)+1)"] over four machines exits 1/2/3/4. Single-machine behaviour is tested; the four-machine run is listed as not verified below.

Fleet model

Identity is the account, not a list of hosts. A machine derives an Ed25519 identity from its account material; the relay registers the matching public key when the account's first machine pairs; every later machine proves the same account with a one-time signed challenge.

If the old pairing path fails for a named reason only — invalid pairing code, unreachable relay, timeout — the machine falls back to asking for admission. Any other failure needs a human and does not change mechanisms. A rejection is final; the machine does not re-ask.

The relay is authoritative for every time window and every quorum, because client clocks disagree (measured: tens of seconds between machines in one fleet):

  • 10 s without a decision auto-approves, but only while at least one member is online — an empty fleet

cannot consent, and that refusal is named (NO_ONLINE_MEMBER);

  • within 24 h of admission, any online member may remove the machine immediately;
  • after 24 h a single machine may only open a vote, whose quorum set is frozen at open time so a voter

going offline mid-vote cannot move the bar;

  • the quorum is 3+ old members need ≥ 50 % (rounded up); a two-member fleet needs one vote;
  • a machine offline for more than 72 hours leaves the list — it is never deleted, its records stay, and it

returns by reporting again.

Security posture

  • The command allow-list is argv-prefix based and rejects argv-reparsing flags (--import, appended -e) with

COMMAND_REPARSE_ARGUMENT. It is a boundary, not a sandbox.

  • Dispatching tasks requires an operator token. A device token cannot dispatch.
  • Admission approval requires at least one member online.
  • The account signing key is derived from the fleet key, never from the account code — the account code is

written to logs, and deriving a key from a readable value would hand out the account identity.

  • Every release is checksummed.

Verified and not verified

A green badge that hides this is worse than no badge.

Verified: 2458 tests in 102 files (2444 pass, 14 skip), 15 pre-flight checks, CI green on Windows, macOS and Linux, npm + GitHub release + checksums consistent, end-to-end fleet runs on a real Linux/Mac/Windows triple.

Not verified / known gaps:

Gap · State Approval popup control · the relay enforces the rules and w2m_approvals · w2m_cancel lists and settles requests, but the 10 s countdown is relay data shown in a list, not a dedicated popup Four-machine W2M_INDEX run · single-machine behaviour tested; the fleet-wide 1/2/3/4 run has not been executed Fleet chat / broadcast channel · message store + quota implemented and tested; encryption, sharding, endpoints and the panel are not built P2P on some macOS hosts · P2P_PUNCH_FAILED: Unknown cipher observed; the task falls back to the relay path

Troubleshooting

Symptom · Cause · Fix installed, but w2m_devices answers 401 · the agent never started, so no device token · check autoStartAgent is not false; restart DSH (not a hot reload) machine missing from the fleet · the plugin is not in dsh.profile.bundles · add it — a package that is not bundled never loads COMMAND_NOT_ALLOWED · command not in the allow-list · extend the allow-list; argv is matched by prefix verdict always partial · a stale lease from a machine that is down · fixed in 1.1.2: a dispatch leases only online, non-silent machines P2P_PUNCH_FAILED · NAT, or a host crypto gap · it downgrades to the relay path; results are unaffected

Release channels

Three channels, and only one of them is what \ pm install\ gives you.

Channel · Where it comes from · Who should use it stable · npm \latest\ — a version the developer declared stable · everyone; this is the default install beta · a GitHub prerelease (tarball + \SHA256SUMS), never on npm · developers granted \eta-access\ who accept that it can fail latest build · the newest of the two, whatever its channel · a developer who wants the newest code and knows the above

A bump is a beta by default. npm receives a version only when the developer says, in so many words, that this one is a stable release: a beta is published as a prerelease (so neither GitHub nor npm ever resolves it as \latest), it is downloadable only after the \eta-access\ environment approves the run, and installing it requires reading SECURITY.md and accepting the risk.

There is no \ pm publish\ line in the beta workflow. That is deliberate — a channel cannot leak to the default install if the publication cannot happen at all.

Links

  • CHANGELOG — every version, including what it deliberately did not ship
  • PLATFORMS — Claude Code, Codex and MCP wiring details
  • Releases — per-release evidence and checksums
  • Issues

MIT.

中文说明

一个 DeepSeek 账号。一句话。你自己的每一台机器跑同一个项目。

以下内容与上方英文逐节对应,不是摘要。

安装

五种方式,最终都会在你的 agent 里注册 16 tools registered。任选其一。

1. DSH 插件(推荐,零配置)