mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-30 13:20:54 +01:00
Threads the PAPA-827 onProgress sink through the SSH transport so workspace
upload, restore/sync-back, and git-history import/export emit throttled byte
progress lines in the same log stream.
- syncDirectoryToSsh: byte-counting Transform spliced between tar.stdout and
ssh.stdin; estimates the total by walking localDir (honoring exclude/
followSymlinks) and clamps reported percent <= 99% until the pipe closes,
then emits the terminal 100%.
- syncDirectoryFromSsh: counter on ssh.stdout; best-effort remote `du -sk`
probe for an estimate, else MB-received mode, with a terminal completion line.
- importGitWorkspaceToSsh: exact percentage from the known bundle size via
streamLocalFileToSsh ("Importing git history").
- exportGitWorkspaceFromSsh: bytes-received MB mode via streamSshToLocalFile
("Exporting git history").
- prepare/restoreWorkspaceForSshExecution and prepareRemoteManagedRuntime
forward onProgress (workspace + per-asset labels) and the restoreWorkspace
closure threads it through.
- ssh-fixture tests cover upload clamp/terminal, restore terminal line, and
exact git-import percentage.
Co-Authored-By: Paperclip <noreply@paperclip.ing>