Messages
Complete reference for all protocol messages.
Worker messages
| Type | Description |
|---|---|
worker.hello | Initial handshake from worker |
worker.command | Send a browser command to the client |
worker.yield_to_user | Hand control to the user with conditions |
worker.complete | Mark session as successfully completed |
worker.fail | Mark session as failed with an error |
Client messages
| Type | Description |
|---|---|
client.hello | Initial handshake from client |
client.command_response | Result of executing a command |
client.events | Batch of telemetry events |
Server messages (to client)
| Type | Description |
|---|---|
server.hello | Handshake response with session state |
server.command | Relayed command for the client to execute |
server.set_interactive | Toggle webview visibility for the user |
server.session_end | Session has reached a terminal state |
server.ack | Acknowledge received client events |
server.replay | Replay buffered messages after reconnection |
Server messages (to worker)
| Type | Description |
|---|---|
server.hello | Handshake response with session state |
server.client_ready | Client has connected to the session |
server.client_disconnected | Client has disconnected |
server.command_result | Relayed command result from the client |
server.error | Protocol error |
server.replay | Replay buffered messages after reconnection |
Message format
All messages are JSON objects with a type field:
{
"type": "worker.command",
"command": {
"action": "navigate",
"url": "https://example.com"
}
}Next steps
Last updated on