executeStream() method returns an AsyncIterable<StreamEvent> that yields stdout, stderr, exit, and error events in real time as code executes.
Basic Usage
StreamEvent Type
| Type | Description |
|---|---|
stdout | A chunk of standard output text |
stderr | A chunk of standard error text |
exit | The exit code as a string (e.g. "0") |
error | An error message (container failure, timeout, etc.) |
exit event is always the last event in a successful execution.
Streaming via HTTP (SSE)
The HTTP server exposes streaming via Server-Sent Events atPOST /execute/stream:
RemoteIsol8 Streaming
RemoteIsol8 automatically handles SSE parsing, so executeStream() works the same way:
Timeout Behavior
When a timeout occurs during streaming:- A
stderrevent is emitted with"EXECUTION TIMED OUT" - The process is killed inside the container
- An
exitevent is emitted with code"1" - The stream ends