SessionService.StreamEvents
Server-streaming RPC that pushes real-time events for a session. The stream stays open until the session terminates or the client disconnects.
Proto Definition
service SessionService {
rpc StreamEvents(StreamEventsRequest) returns (stream SessionEvent);
}
message StreamEventsRequest {
string session_id = 1;
repeated EventType event_types = 2;
}
message SessionEvent {
EventType type = 1;
google.protobuf.Timestamp timestamp = 2;
oneof payload {
NavigationEvent navigation = 3;
StatusChangeEvent status_change = 4;
ErrorEvent error = 5;
}
}
enum EventType {
NAVIGATION = 0;
STATUS_CHANGE = 1;
ERROR = 2;
}
Request
{
"session_id": "ses_k8m2n4p6",
"event_types": ["NAVIGATION", "ERROR"]
}
Response Stream
{
"type": "NAVIGATION",
"timestamp": "2026-06-23T15:01:00Z",
"navigation": {
"url": "https://example.com",
"status_code": 200,
"load_time_ms": 842
}
}
{
"type": "ERROR",
"timestamp": "2026-06-23T15:02:30Z",
"error": {
"code": "TIMEOUT",
"message": "Navigation timed out after 30000ms"
}
}