feat: POST /api/sandboxes/files - file upload endpoint

Merged
SW
7mo ago
+659-0

Summary

  • Adds POST /api/sandboxes/files endpoint for uploading files to GitHub repos from sandboxes
  • Includes createOrUpdateFileContent GitHub utility
  • Includes request validation and handler

Re-opened after reverting accidental merge of #357

Test plan

  • Verify file upload to GitHub repo works end-to-end
  • Verify validation rejects invalid requests
  • Verify auth checks are enforced

šŸ¤– Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Add sandbox file upload endpoint: upload multiple files in one request to a sandbox GitHub repo.
    • Support optional target path and custom commit message per upload.
    • Returns per-file success results (path/sha) and reports partial failures.
  • Bug Fixes / Validation

    • Improved request validation and clearer multipart/form-data error responses.