Skip to Content

Messages

Complete reference for all protocol messages.

Worker messages

TypeDescription
worker.helloInitial handshake from worker
worker.commandSend a browser command to the client
worker.yield_to_userHand control to the user with conditions
worker.completeMark session as successfully completed
worker.failMark session as failed with an error

Client messages

TypeDescription
client.helloInitial handshake from client
client.command_responseResult of executing a command
client.eventsBatch of telemetry events

Server messages (to client)

TypeDescription
server.helloHandshake response with session state
server.commandRelayed command for the client to execute
server.set_interactiveToggle webview visibility for the user
server.session_endSession has reached a terminal state
server.ackAcknowledge received client events
server.replayReplay buffered messages after reconnection

Server messages (to worker)

TypeDescription
server.helloHandshake response with session state
server.client_readyClient has connected to the session
server.client_disconnectedClient has disconnected
server.command_resultRelayed command result from the client
server.errorProtocol error
server.replayReplay 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