Skip to content

js: Add guest file transfer helpers - #52

Open
07rjain wants to merge 1 commit into
pithings:mainfrom
07rjain:sdk-guest-file-transfers
Open

07rjain wants to merge 1 commit into
pithings:mainfrom
07rjain:sdk-guest-file-transfers

Conversation

@07rjain

@07rjain 07rjain commented Nov 28, 2026

Copy link
Copy Markdown

Summary

  • Add readGuestFile() and writeGuestFile() to the Node and web SDK exports for binary transfers over the existing kwtty channel.
  • Respect guest permissions. Stage writes beside the destination, verify the byte count, and publish atomically. On cancellation, signal the guest before closing its input so it can remove the partial file.
  • Document transfers to writable paths on /data and to normal guest paths backed by the persistent overlay.

Verification

  • SDK and web typechecks and the SDK package build passed.
  • 34 guest-file and kwtty unit tests and 48 focused packaged SDK tests passed with the November 27 release kernel and distro assets. The guest checks cover inline and both worker transports, cancellation, disk-full errors, concurrent replacement, permissions, and persistent data after reboot.
  • A Debian guest smoke test passed for binary and empty files, permissions, and the read buffer cap.

Closes #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Uploading/downloading files from the guest operating system's /data partition

1 participant