Skip to content

fix(remote-sync): scp-only remote sync — no rsync on remotes#260

Merged
hoangsonww merged 8 commits into
masterfrom
fix/remote-sync-scp-cross-platform
Jul 26, 2026
Merged

fix(remote-sync): scp-only remote sync — no rsync on remotes#260
hoangsonww merged 8 commits into
masterfrom
fix/remote-sync-scp-cross-platform

Conversation

@hoangsonww

Copy link
Copy Markdown
Owner

Summary

  • Drops rsync entirely for Remote Data Sources — remotes only need a running OpenSSH server (built-in SFTP/scp). No rsync, agents, or dashboard packages on the remote.
  • Uses recursive scp over SSH from the dashboard machine (Linux, macOS, or Windows with OpenSSH Client).
  • Windows dashboard: auto-resolves ssh.exe / scp.exe under C:\Windows\System32\OpenSSH\ when not on PATH.
  • Connection test: POSIX test -d probe plus PowerShell Test-Path for Windows remotes when remote_home is ~-rooted.
  • Cleaner errors: strips ANSI color codes from PowerShell stderr.

Why

rsync over SSH requires rsync installed on both ends. Windows dashboards and many remotes only ship OpenSSH — sync was failing with "rsync is not recognized" even when ssh user@host worked fine.

Test plan

  • npm run test:server (remote-sources suite)
  • Windows dashboard → Linux remote: ssh user@host works, then Test + Sync now in Settings → Remote Data Sources
  • macOS/Linux dashboard → same remote
  • Confirm Permission denied cases show a clean message when keys are missing (fix auth with ssh user@host + identity file in settings)

Made with Cursor

Remote Data Sources no longer call rsync, which required rsync on both the
dashboard host and every remote. Sync now uses recursive scp over OpenSSH
(zero extra packages on remotes), resolves ssh/scp on Windows System32, probes
Linux and Windows remotes during connection tests, and strips ANSI from errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings July 26, 2026 06:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested labels Jul 26, 2026
hoangsonww and others added 4 commits July 25, 2026 23:42
GUI and desktop launches often inherit the wrong SSH_AUTH_SOCK (or none),
so Secure Enclave keys in Secretive work in Terminal but not in CCAM. Resolve
the effective IdentityAgent via ssh -G, pass it to ssh/scp, and set HOME plus
the Secretive socket in the child environment.

Co-authored-by: Cursor <cursoragent@cursor.com>
PATH-first ssh/scp resolution, portable sh/PowerShell/cmd directory probes,
Windows C:/ remote_home support, Secretive/agent path expansion from ssh -G,
auth-first connection tests, scp -O fallback for legacy servers, and clearer
env wiring (HOME/USERPROFILE/SYSTEMROOT) for GUI-launched dashboards.

Co-authored-by: Cursor <cursoragent@cursor.com>
Only pass IdentityAgent when ssh -G names a concrete socket (Secretive,
1Password, custom). File-key and ssh-agent users rely on HOME, inherited
SSH_AUTH_SOCK, or launchctl discovery — installing Secretive no longer
overrides other auth methods.

Co-authored-by: Cursor <cursoragent@cursor.com>
Explicit -F ~/.ssh/config, Windows agent pipe, PATH-first ssh, probe ordering
by remote OS hint, quoted IdentityAgent paths, blank identity_file handling,
ENOENT install hints, and clearer missing-remote-dir errors.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hoangsonww
hoangsonww force-pushed the fix/remote-sync-scp-cross-platform branch 2 times, most recently from 6f58161 to d78b97c Compare July 26, 2026 21:51
hoangsonww and others added 3 commits July 26, 2026 14:56
Pull remote sessions every 15s (was 60s), sync immediately on add/re-enable,
and broadcast session_created/updated after each mirror so the dashboard
updates without manual Sync. Reconcile status from transcript timestamps,
fix WSL test messages and Settings copy, and add remote seed test commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align all documentation with scp-based remote sync, 15s polling, JSONL-based
live status reconciliation, and remote_data.updated WebSocket broadcasts.

Co-authored-by: Cursor <cursoragent@cursor.com>
CI tsc failed because remoteDataEvents tests used source: "remote" on
import.progress payloads; extend the WS type and tighten the helper cast.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hoangsonww
hoangsonww force-pushed the fix/remote-sync-scp-cross-platform branch from d78b97c to dde905b Compare July 26, 2026 21:57
@hoangsonww
hoangsonww merged commit f2ea1f2 into master Jul 26, 2026
16 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Projects

Development

Successfully merging this pull request may close these issues.

2 participants