lengmoXXL/dsh-remote-ssh-worktree

dsh-remote-ssh-worktree

A DeepSeek Harness (DSH) plugin that runs the harness's file, shell, and terminal tools inside a git worktree on a remote machine over SSH. The remote agent installs itself: it ships as a static Rust binary from GitHub Releases, listens on a random loopback port, and updates when the plugin does.

未分類cordisdeepseek-harnessdsh

dsh-remote-ssh-worktree

A DSH plugin that runs the harness's file, shell, and terminal tools inside a git worktree on a remote machine.

English | 中文

A session in a remote worktree, running tools on that machine

MachinesConnectedA worktree
The machine listA connected machine and its repositoryA created worktree

What it does

  • Reaches a machine over SSH — user@host or a ~/.ssh/config alias. Nothing to install there by hand.
  • Cuts worktree/<name> from any git repository on the machine and registers the checkout as a DSH workspace; one row opens, closes, or removes each worktree.
  • Read, write, edit, bash, grep, and terminal tools then run on that machine, unchanged. The model never sees that the files are remote.
  • Removing one takes the checkout and leaves the branch, so an unmerged commit is never lost silently.

How it works

  • The plugin replaces the harness's fs, subprocess, and shell seams with routing versions: a path under a remote anchor goes to that machine's agent, every other path stays local.
  • The agent is one statically linked Rust binary. It binds a kernel-assigned loopback port and publishes it in a state file, so a machine is configured by its SSH destination and a token alone — there is no port to agree on.
  • The plugin installs and updates it: on connect it reads uname, downloads the matching build from this repository's GitHub Releases, verifies it against SHA256SUMS, uploads it over the same SSH connection, starts it detached, then forwards to the port it published.
  • Agent traffic reaches your machine through ssh -L, so a connection has exactly the trust of your own SSH access.

Install

git clone https://github.com/lengmoXXL/dsh-remote-ssh-worktree
cd dsh-remote-ssh-worktree && npm install && npm run build
dsh plugin --profile web add "$PWD"
dsh --profile web

License

MIT