@hyperdrive.bot/paseo-server 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1635,6 +1635,20 @@ export class Session {
1635
1635
  return this.handleFileUploadBeginRequest(msg);
1636
1636
  case "files.upload.complete.request":
1637
1637
  return this.handleFileUploadCompleteRequest(msg);
1638
+ case "files.upload.chunk": {
1639
+ // Text transport for chunk bytes (base64 in a JSON message) instead of a binary
1640
+ // FileChunk frame: binary WS frames are dropped by some proxies (the hyperdrive proxy
1641
+ // path), which stalls the client's windowed sender with zero acks. Decode and feed the
1642
+ // decoded bytes through the EXACT SAME queue as the binary path, so write ordering,
1643
+ // backpressure, the per-chunk ack, and the over-cap abort are all identical. The daemon
1644
+ // assigns its own chunkIndex in the ack (msg.payload.chunkIndex is informational only).
1645
+ this.handleFileUploadFrame({
1646
+ opcode: FileTransferOpcode.FileChunk,
1647
+ requestId: msg.payload.requestId,
1648
+ payload: Buffer.from(msg.payload.data, "base64"),
1649
+ });
1650
+ return undefined;
1651
+ }
1638
1652
  case "files.upload.error":
1639
1653
  // Client already knows about its own abort — clean up without echoing an error back.
1640
1654
  void this.abortFileUpload(msg.payload.requestId, null);