mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-26 18:31:34 +01:00
The host held two copies of every forwarded body on the HTTP/2 bridge
path: readBridgeForwardResponseBody decoded the response to a UTF-8
string, then the caller encoded it back to bytes for the sandbox
stream. This change carries the body as one Buffer end to end.
- readBridgeForwardResponseBody now returns Promise<Buffer>.
- forwardBridgeRequest accepts a string or Uint8Array request body and
returns a Buffer response body. Every error path returns a Buffer.
- The HTTP/2 forward handler passes and returns raw bytes with no
toString("utf8") call.
- The file bridge call site converts the body to a string, so the file
bridge response file format stays unchanged.
- postedIssueCommentLogMarker now accepts a Buffer or a string. It
decodes at most 4,096 bytes, and it logs a comment id only when the
parsed value is a canonical lowercase UUID.
Co-authored-by: Paperclip <noreply@paperclip.ing>