rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Golden-Pigeon/dsh-remote
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | Chinese
Remote development that behaves like a local session.
Add an SSH host once. The plugin provisions the remote DSH runtime itself, mirrors its workspaces and sessions into the local sidebar, and opens a remote session in the ordinary Conversation UI — the same transcript, composer, tool cards, stop control, and session list as a local session.
Local DSH Remote host
┌──────────────────────────────────────┐ ┌──────────────────────────────┐
│ normal sidebar + Conversation UI │ │ dsh web (installed by plugin)│
│ local mirror Session + Agent façade │ SSH │ dsh-remote-agent │
│ host registry / auto provisioning │◀────────▶│ workspace/session write │
│ direct key or local key proxy │ │ remote tools + model calls │
│ authenticated /api route │ tunnel │ │
└──────────────────────────────────────┘ └──────────────────────────────┘
This plugin is developed for the official DSH Desktop application. Supported DSH versions:
| Component | Version |
|---|---|
| DSH Desktop / official client | 0.2.2-rc.3 (tested) |
| Plugin | 0.8.22 |
| Remote DSH runtime | 0.2.2-rc.3 (tested; new installs follow the local DSH version) |
| Remote Node.js | 22.19+ |
| Remote OS | Linux or macOS |
Other DSH GUI plugins, community forks, modified clients, non-DSH GUIs, and other DSH versions have
not been tested. The package's dependency range is intentionally permissive for installation, but
it is not a compatibility or support guarantee. The desktop client and the remote runtime are tested
on 0.2.2-rc.3; new remote installs follow the local DSH runtime version by default and can be
pinned with remoteDshVersion.
| Capability | State |
|---|---|
One-click local plugin install (scripts/install-local.sh) |
Available |
| Plugin-owned remote provisioning over SSH | Available |
| Host registry, discovery, SSH tunnel, health, reconnect | Available |
| Remote workspaces appear as normal local workspaces | Available |
| Remote sessions appear in the normal sidebar | Available |
| Remote sessions open in the normal Conversation UI | Available |
| Localized UI follows the DSH language (zh / en) | Available |
| Prompts, stop, transcripts, tool cards, usage | Available |
| Direct remote key (default) or optional local key proxy | Available |
| Remote file tree and file previews | Available (agent-backed over the SSH tunnel) |
| Remote terminal per Session | Available (local Sessions keep local PTY; remote Sessions use the remote agent PTY over the SSH tunnel) |
| Agent tools for host/workspace/session operations | Available |
| Approval prompts bridged into the local UI | Available |
| Relay/NAT traversal, cloud sandbox, multi-tenant | Not yet |
Remote file and terminal operations require the agent-backed API. If the connected remote agent is older, file/terminal actions fail with a Reinstall instruction instead of opening extra SSH connections.
Open Plugins → Add plugin and enter:
dsh-remote-local-plugin
The package is published on npm; DSH installs the bundle from the registry. The package includes the remote agent asset and the terminal-controller fork, so there is nothing else to install. Restart DSH when the plugin page asks for it; Settings → Remote development then appears.
If npmjs.com still resolves an older latest tag for a newly published release, install the exact
current version instead:
dsh-remote-local-plugin@0.8.22
Keep this pinned version in sync with each release.
For development, clone the repository and run the installer:
cd /path/to/dsh-remote/dsh-remote
pnpm install
pnpm -r build
./scripts/install-local.sh
The script builds the workspace, creates a single plugin tarball containing the terminal-controller
fork, and installs that tarball into the desktop profile. For a DSH Web profile:
./scripts/install-local.sh --profile web
# restart that DSH Web process
Reopen DSH. Settings → Remote development appears.
my-host) and click Save and connect.dsh web, opens the
loopback tunnel, and copies the resolved model key into the remote environment. The card shows
Installing → Connected and Model credentials: Remote direct.The Settings page is now only host/workspace management. The conversation is not a popup.
Removing a mirrored workspace from the local sidebar pauses its local synchronization. The remote workspace, files, running sessions, and local cached history are retained. Catalog refreshes, reconnection, and plugin restarts do not add the row back.
To resume, use Add workspace, select the same remote device and directory, and add it again. The plugin restores the existing local history and catches up from the remote log (within the configured snapshot window). Creating a session from a removed workspace requires this explicit add first; discovering it in the remote catalog alone does not resume synchronization.
Test isolation is controlled by a test-only manifest in the test DSH home, not by the Settings UI or an agent tool:
$DSH_HOME/remote/test-visibility.json
{"hiddenPaths": ["/tmp/dsh-remote-tests"], "hiddenWorkspaceIds": ["remote-workspace-id"]}
hiddenPaths prevents local registration at creation. hiddenWorkspaceIds hides an existing visible
test workspace after the run; local mirror sessions are archived, not deleted, and are restored when
the entry is removed. See docs/testing.md.
Agent-facing testing instructions live in AGENTS.md. For UI/integration work use the isolated environment:
./scripts/test-sandbox.sh
See docs/testing.md for test workspace visibility.
The plugin does not embed a second chat UI and does not iframe the remote page. It:
Session seeded from the remote session's committed event log;followup/steer/cancel from the local Agent façade to the remote agent API;The remote DSH remains the execution owner. The local Session is a durable, live mirror, so the ordinary client code paths handle rendering, selection, streaming, and the transcript.
Default: direct key on the remote host. The plugin resolves DEEPSEEK_API_KEY from the local DSH
credential store and writes it into the remote dsh web environment, with
DEEPSEEK_BASE_URL=https://api.deepseek.com/anthropic. The remote agent calls DeepSeek directly.
Settings exposes global defaults for Use local credential proxy and Copy model API key to
remote hosts (on by default). Each host card can override either choice; the host setting wins over
the global default. Changes apply on the next connect or reinstall.
Optional: local proxy. Enable Use local credential proxy globally, or on one host, to keep the key local:
DEEPSEEK_BASE_URL=http://127.0.0.1:47821 and a placeholder key;-R 127.0.0.1:47821:127.0.0.1:<local-proxy-port>;credentialProxyUpstream.In direct mode, if no local key resolves, the plugin still provisions and connects; configure the remote DSH's own credentials. In proxy mode a missing local key fails the connect with a clear error; choose remote direct or configure the key. The host card shows Model path: Local proxy / Remote direct / Remote default.
| Tool | Purpose |
|---|---|
remote_hosts_list |
Hosts, phases, remote facts |
remote_host_add |
Add an SSH host and start provisioning |
remote_host_connect |
Connect/reconnect/refresh |
remote_host_provision |
Force reinstall/restart and reconnect |
remote_workspace_add |
Register a remote directory |
remote_workspaces_list |
List remote workspaces |
remote_session_create |
Create a remote session |
remote_sessions_list |
List remote sessions |
remote_session_prompt |
Send a prompt |
remote_session_snapshot |
Read a transcript page |
remote_session_cancel |
Cancel the active turn |
Local: official DSH Desktop or DSH Web with the same core version, plus ssh with key or ssh-agent auth. Only the official Desktop client is a verified GUI target.
Remote: Linux or macOS with an SSH server. Node.js 22.19+ is preferred and discovered through
PATH, nvm, Volta, fnm, Bun, asdf, mise, Nix, Homebrew, and the login shell. When no usable Node.js is
found, the installer downloads the official Node.js tarball into remoteInstallDir, verifies its
SHA-256 checksum, and uses it without root. This needs curl or wget, tar, and sha256sum or
shasum; Windows remotes are not supported.
If the remote host needs a proxy, set remoteInstallProxy to a URL that is reachable from the
remote host, for example http://127.0.0.1:17890 when a port forward serves the proxy there. The
installer exports HTTP_PROXY, HTTPS_PROXY, ALL_PROXY, and npm_config_* for the bootstrap.
When the option is empty, it uses the account's actual login shell (bash, zsh, fish, and other common shells) and its login/interactive startup files to read HTTPS_PROXY/HTTP_PROXY.
The same proxy is written into the remote systemd unit (or inherited by the nohup process), so
remote model requests use it as well, not just the installer.
127.0.0.1 only.accept-new); use yes with a prepared known_hosts for strict checks./api Fetch route. Tokens/credentials are stored
in 0600 files and never returned to the browser.- id: dsh-remote-local
config:
autoProvision: true
remoteDshHome: ~/.dsh
remoteInstallDir: ~/.local/share/dsh-remote
# remoteDshVersion: 0.2.2-rc.2 # pin a remote DSH version; omit to follow the local DSH version
remotePnpmVersion: 11.21.0
remoteNodeVersion: 22.19.0
# Remote-visible proxy for Node/npm/DSH downloads. Empty means inspect the remote login shell.
remoteInstallProxy: ''
remoteInstallNoProxy: 127.0.0.1,localhost
autoInstallNode: true
remoteStart: systemd # systemd | nohup | none
# Direct key mode (default): copy the resolved key to the remote service env.
credentialProxy: false
copyModelKey: true
remoteModelBaseUrl: https://api.deepseek.com/anthropic
# Optional proxy mode: keep the key local.
credentialProxyUpstream: https://api.deepseek.com/anthropic
credentialProxyRemotePort: 47821
modelCredentialRef: DEEPSEEK_API_KEY
# Mirror remote work into the ordinary local UI.
mirrorSessions: true
mirrorPollMs: 1500
mirrorMaxEvents: 2000
The remote agent config remains available for advanced deployments:
- id: dsh-remote-agent
config:
stateFile: ''
token: ''
loopbackOnly: true
defaultSnapshotEvents: 500
maxSnapshotEvents: 2000
heartbeatMs: 15000
mirrorMaxEvents is not mirrored; increase the limit or open it on the
remote host directly.| Symptom | Action |
|---|---|
Installing never finishes / Waiting for remote dsh web… |
Check ssh -o BatchMode=yes my-host true; the installer discovers nvm/Volta/fnm and automatically downloads Node.js when needed. If the host blocks nodejs.org or checksum tools, install Node.js 22.19+ manually or use remoteStart: nohup; then Reinstall |
does not accept POST |
Remote agent is old; click Reinstall |
| No remote workspace in sidebar | Use Workspaces +, or Settings → Remote development → Workspaces |
| Native session has no reply | Check Model credentials; configure remote credentials |
DeepSeek Messages request failed (404) |
Proxy upstream must be https://api.deepseek.com/anthropic; the fixed proxy joins/preserves the provider prefix. Reinstall the local plugin and reconnect |
| Approval appears locally but remote tool still fails | The local decision was sent; check the remote tool result |
| Local terminal opens local shell | Expected for local Sessions; remote Sessions use Remote · <dir> terminals |
| Remote terminal opens local zsh | The terminal-controller fork is not active; run ./scripts/install-local.sh again |
| Port changed after remote restart | Click Rediscover |
Remote logs: journalctl --user -u dsh-remote-agent -f or $DSH_HOME/remote-agent/web.log.
pnpm verify
The suite covers protocol/SSE/cursor/write contracts, installer rendering, proxy forwarding, and the client bundle. The native path was validated against a real Linux remote host: plugin provisioning, remote workspace/session creation, a remote prompt through the local key proxy, live event mirroring into the ordinary Conversation UI, a second follow-up, and a remote tool call/result.
| Package | Role |
|---|---|
@dsh-remote/protocol |
Wire types, surface metadata, cursor, SSE, typed client |
dsh-remote-local-plugin |
Provisioning, tunnel, proxy, native session mirror, tools, Settings |
dsh-remote-agent |
Remote host plugin for workspaces, sessions, prompts, SSE |
dsh-remote-terminal-controller |
Profile fork routing local vs mirrored terminals |
@dsh-remote/installer |
Bootstrap library/CLI used by the plugin |
@dsh-remote/testkit |
Fake host and wire contract tests |
MIT. See LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。