E2B data-plane client: "envd", the daemon inside every sandbox, reachable
at https://49983-{sandboxId}.{domain}.
envd speaks the Connect protocol with the JSON codec — no gRPC and no HTTP/2 required:
- unary calls are plain
application/jsonPOSTs to/process.Process/<Method>; - server-streaming calls use
application/connect+json, where both directions carry 5-byte envelopes — one flag byte, a 4-byte big-endian length, then a JSON message. Flag0x02marks the EndStreamResponse (trailers / error).
Protobuf bytes fields ride base64 in the JSON codec — stdin payloads out,
stdout/stderr data in. Files use envd's plain HTTP API (POST /files
multipart, parents auto-created; GET /files to read).
Summary
Functions
Send stdin EOF to the process selected by tag.
Pull every complete envelope out of buffer, returning
{frames, rest} where each frame is {:message, map} (flag 0) or
{:end_stream, map} (flag 2 — trailers/error).
Encode one message as a Connect envelope (flag 0).
List the processes envd is running.
Write stdin bytes to the process selected by tag.
The Process/Start request for a shell command, tagged so a later
Connect/SendInput can address the process by name.
Content type for streaming Connect calls. application/connect+json on
the wire; overridable because test plugs run Plug.Parsers, which
chokes on the binary envelope behind any +json type.
Functions
Send stdin EOF to the process selected by tag.
Pull every complete envelope out of buffer, returning
{frames, rest} where each frame is {:message, map} (flag 0) or
{:end_stream, map} (flag 2 — trailers/error).
Encode one message as a Connect envelope (flag 0).
List the processes envd is running.
Write stdin bytes to the process selected by tag.
The Process/Start request for a shell command, tagged so a later
Connect/SendInput can address the process by name.
Content type for streaming Connect calls. application/connect+json on
the wire; overridable because test plugs run Plug.Parsers, which
chokes on the binary envelope behind any +json type.