Docs menu

TermSurf messages

Protobuf payload reference: 49 top-level messages from live termsurf.proto. Transport (Unix domain sockets) is documented under Wire, not here.

About this reference

Every frame on the wire is a TermSurfMessage envelope. This page lists each top-level message type, who sends it, fields, and short implementer notes. For socket paths and framing see Wire. Concepts live on the protocol overview.

Source of truth: rust/proto/termsurf.proto. Completeness is checked against a live proto scan in webapp tests.

Envelope

TermSurfMessage

Wire envelope: every frame is exactly one typed variant in the msg oneof (protobuf on the local socket).

any → any · Every TermSurf IPC frame.

FieldTypeTagMeaning
create_tabCreateTab1oneof msg — CreateTab variant.
create_devtools_tabCreateDevtoolsTab2oneof msg — CreateDevtoolsTab variant.
resizeResize3oneof msg — Resize variant.
close_tabCloseTab4oneof msg — CloseTab variant.
navigateNavigate5oneof msg — Navigate variant.
mouse_eventMouseEvent6oneof msg — MouseEvent variant.
mouse_moveMouseMove7oneof msg — MouseMove variant.
scroll_eventScrollEvent8oneof msg — ScrollEvent variant.
key_eventKeyEvent9oneof msg — KeyEvent variant.
focus_changedFocusChanged10oneof msg — FocusChanged variant.
set_color_schemeSetColorScheme11oneof msg — SetColorScheme variant.
server_registerServerRegister12oneof msg — ServerRegister variant.
tab_readyTabReady13oneof msg — TabReady variant.
ca_contextCaContext14oneof msg — CaContext variant.
url_changedUrlChanged15oneof msg — UrlChanged variant.
loading_stateLoadingState16oneof msg — LoadingState variant.
title_changedTitleChanged17oneof msg — TitleChanged variant.
cursor_changedCursorChanged18oneof msg — CursorChanged variant.
set_overlaySetOverlay19oneof msg — SetOverlay variant.
set_devtools_overlaySetDevtoolsOverlay20oneof msg — SetDevtoolsOverlay variant.
open_splitOpenSplit21oneof msg — OpenSplit variant.
mode_changedModeChanged22oneof msg — ModeChanged variant.
hello_requestHelloRequest23oneof msg — HelloRequest variant.
hello_replyHelloReply24oneof msg — HelloReply variant.
query_last_requestQueryLastRequest25oneof msg — QueryLastRequest variant.
query_last_replyQueryLastReply26oneof msg — QueryLastReply variant.
query_devtools_requestQueryDevtoolsRequest27oneof msg — QueryDevtoolsRequest variant.
query_devtools_replyQueryDevtoolsReply28oneof msg — QueryDevtoolsReply variant.
query_tabs_requestQueryTabsRequest29oneof msg — QueryTabsRequest variant.
query_tabs_replyQueryTabsReply30oneof msg — QueryTabsReply variant.
browser_readyBrowserReady31oneof msg — BrowserReady variant.
target_url_changedTargetUrlChanged32oneof msg — TargetUrlChanged variant.
set_gui_activeSetGuiActive33oneof msg — SetGuiActive variant.
javascript_dialog_requestJavaScriptDialogRequest34oneof msg — JavaScriptDialogRequest variant.
javascript_dialog_replyJavaScriptDialogReply35oneof msg — JavaScriptDialogReply variant.
console_messageConsoleMessage36oneof msg — ConsoleMessage variant.
http_auth_requestHttpAuthRequest37oneof msg — HttpAuthRequest variant.
http_auth_replyHttpAuthReply38oneof msg — HttpAuthReply variant.
renderer_crashedRendererCrashed39oneof msg — RendererCrashed variant.
render_surfaceRenderSurface43oneof msg — RenderSurface variant.
navigation_actionNavigationAction45oneof msg — NavigationAction variant.
navigation_stateNavigationState46oneof msg — NavigationState variant.
set_presentation_visibleSetPresentationVisible47oneof msg — SetPresentationVisible variant.
file_chooser_requestFileChooserRequest48oneof msg — FileChooserRequest variant.
file_chooser_replyFileChooserReply49oneof msg — FileChooserReply variant.
external_file_dropExternalFileDrop50oneof msg — ExternalFileDrop variant.
download_progressDownloadProgress51oneof msg — DownloadProgress variant.

Session and hello

ModeChanged

Browse vs control mode for a pane (browsing flag and optional pane id).

host ↔ client

FieldTypeTagMeaning
browsingbool1browsing (bool).
pane_idstring2pane_id (string).

BrowserReady

Host reports that a browser connection is ready for a pane (tab id, optional engine socket).

host → client

FieldTypeTagMeaning
pane_idstring1pane_id (string).
tab_idint642tab_id (int64).
browser_socketstring3browser_socket (string).
browserstring4browser (string).

HelloRequest

Client greets the host and identifies the pane it is binding to.

client → host

Related: HelloReply

FieldTypeTagMeaning
pane_idstring1pane_id (string).

HelloReply

Host answers hello with homepage URL and available browser family names.

host → client

Related: HelloRequest

FieldTypeTagMeaning
homepagestring1homepage (string).
browsersrepeated string2browsers (repeated string).

Overlay and splits (client → host)

SetOverlay

Place or update a browser overlay on a pane (grid geometry, URL, profile, engine family).

client → host

FieldTypeTagMeaning
pane_idstring1pane_id (string).
coluint642Grid column of the overlay.
rowuint643Grid row of the overlay.
widthuint644Grid width in cells.
heightuint645Grid height in cells.
urlstring6url (string).
profilestring7Browser profile name.
browsingbool8Whether the pane should enter browsing mode.
browserstring9Engine family hint (e.g. chromium).

SetDevtoolsOverlay

Place a DevTools overlay inspecting a tab on a pane.

client → host

FieldTypeTagMeaning
pane_idstring1pane_id (string).
coluint642col (uint64).
rowuint643row (uint64).
widthuint644width (uint64).
heightuint645height (uint64).
profilestring6profile (string).
browsingbool7browsing (bool).
inspected_tab_idint648inspected_tab_id (int64).
browserstring9browser (string).

OpenSplit

Request a host split from a pane (direction and optional command).

client → host

FieldTypeTagMeaning
pane_idstring1pane_id (string).
directionstring2horizontal or vertical.
commandstring3Optional command for the new region.

Tab lifecycle (host → engine)

CreateTab

Create a browser tab for a pane with pixel size and dark preference.

host → engine

FieldTypeTagMeaning
urlstring1Initial URL for the tab.
pane_idstring2Host pane this tab is bound to.
pixel_widthuint643Backing pixel width.
pixel_heightuint644Backing pixel height.
darkbool5Prefer dark color scheme when true.

CreateDevtoolsTab

Create a DevTools tab inspecting another tab.

host → engine

FieldTypeTagMeaning
pane_idstring1pane_id (string).
inspected_tab_idint642inspected_tab_id (int64).
pixel_widthuint643pixel_width (uint64).
pixel_heightuint644pixel_height (uint64).
darkbool5dark (bool).

Resize

Resize a tab and supply screen DIP geometry for the engine.

host → engine

FieldTypeTagMeaning
tab_idint641tab_id (int64).
pixel_widthuint642pixel_width (uint64).
pixel_heightuint643pixel_height (uint64).
screen_xdouble4screen_x (double).
screen_ydouble5screen_y (double).
screen_widthdouble6screen_width (double).
screen_heightdouble7screen_height (double).
screen_scaledouble8screen_scale (double).

CloseTab

Close a native tab by tab id.

host → engine

FieldTypeTagMeaning
tab_idint641tab_id (int64).

Navigation

Input

MouseEvent

Mouse button down/up for a tab (button, position, click count, modifiers).

host → engine

FieldTypeTagMeaning
tab_idint641tab_id (int64).
typestring2type (string).
buttonstring3button (string).
xdouble4x (double).
ydouble5y (double).
click_countint646click_count (int64).
modifiersuint647modifiers (uint64).

MouseMove

Mouse move for a tab.

host → engine

FieldTypeTagMeaning
tab_idint641tab_id (int64).
xdouble2x (double).
ydouble3y (double).
modifiersuint644modifiers (uint64).

ScrollEvent

Scroll/wheel for a tab including phase and momentum fields.

host → engine

FieldTypeTagMeaning
tab_idint641tab_id (int64).
xdouble2x (double).
ydouble3y (double).
delta_xdouble4delta_x (double).
delta_ydouble5delta_y (double).
phaseuint646phase (uint64).
momentum_phaseuint647momentum_phase (uint64).
precisebool8precise (bool).
modifiersuint649modifiers (uint64).

KeyEvent

Key down/up/repeat with Windows key code, UTF-8 text, and modifiers.

host → engine

FieldTypeTagMeaning
tab_idint641tab_id (int64).
typestring2type (string).
windows_key_codeint643windows_key_code (int64).
utf8string4utf8 (string).
modifiersuint645modifiers (uint64).

Presentation and state

SetPresentationVisible

Whether compositor output for the tab is actually hosted/visible (not focus).

host → engine

FieldTypeTagMeaning
tab_idint641tab_id (int64).
visiblebool2visible (bool).

FocusChanged

Whether a tab is focused for input.

host → engine

FieldTypeTagMeaning
tab_idint641tab_id (int64).
focusedbool2focused (bool).

SetColorScheme

Dark/light preference for a pane or tab.

client → host → engine

FieldTypeTagMeaning
tab_idint641tab_id (int64).
pane_idstring2pane_id (string).
darkbool3dark (bool).

SetGuiActive

Whether the GUI considers the tab (or all tabs) active, with a reason string.

host → engine

FieldTypeTagMeaning
tab_idint641tab_id (int64).
activebool2active (bool).
reasonstring3reason (string).

Engine events and surfaces

ServerRegister

Engine process registers profile and browser family identity.

engine → host

FieldTypeTagMeaning
profilestring1profile (string).
browserstring2browser (string).

TabReady

Tab is ready; binds pane_id to tab_id.

engine → host

FieldTypeTagMeaning
pane_idstring1pane_id (string).
tab_idint642tab_id (int64).

CaContext

macOS CALayer context id and pixel size for compositing.

engine → host

FieldTypeTagMeaning
tab_idint641tab_id (int64).
ca_context_iduint642ca_context_id (uint64).
pixel_widthuint643pixel_width (uint64).
pixel_heightuint644pixel_height (uint64).

RenderSurface

Generic render surface metadata (size, format, generation, attachment).

engine → host

FieldTypeTagMeaning
tab_idint641tab_id (int64).
pixel_widthuint642pixel_width (uint64).
pixel_heightuint643pixel_height (uint64).
bytes_per_rowuint644bytes_per_row (uint64).
pixel_formatuint325pixel_format (uint32).
generationuint646generation (uint64).
attachment_iduint647attachment_id (uint64).

UrlChanged

Document URL changed for a tab.

engine → host → client

FieldTypeTagMeaning
tab_idint641tab_id (int64).
urlstring2url (string).

LoadingState

Load lifecycle: loading/progress/done/error plus optional progress and refresh correlation id.

engine → host → client

FieldTypeTagMeaning
tab_idint641tab_id (int64).
statestring2loading | progress | done | error.
progressuint6430–100 when known.
navigation_request_iduint644Nonzero only for correlated refresh.

DownloadProgress

Download lifecycle for pane surface progress (active/done/error/cancelled; total 0 = unknown).

engine → host → client

FieldTypeTagMeaning
tab_idint641tab_id (int64).
statestring2active | done | error | cancelled.
received_bytesuint643received_bytes (uint64).
total_bytesuint6440 means unknown size (indeterminate UI).

TitleChanged

Document title changed.

engine → host → client

FieldTypeTagMeaning
tab_idint641tab_id (int64).
titlestring2title (string).

CursorChanged

CSS/OS cursor type for the tab surface.

engine → host

FieldTypeTagMeaning
tab_idint641tab_id (int64).
cursor_typeint642cursor_type (int64).

TargetUrlChanged

Hovered link target URL (empty when hover ends).

engine → host

FieldTypeTagMeaning
tab_idint641tab_id (int64).
urlstring2url (string).

Queries

QueryLastRequest

Query last tab association for a pane/profile.

client → host

Related: QueryLastReply

FieldTypeTagMeaning
pane_idstring1pane_id (string).
profilestring2profile (string).

QueryLastReply

Answer for QueryLastRequest (tab id, profile, or error).

host → client

Related: QueryLastRequest

FieldTypeTagMeaning
pane_idstring1pane_id (string).
tab_idint642tab_id (int64).
profilestring3profile (string).
errorstring4error (string).

QueryDevtoolsRequest

Ask host/engine for DevTools tab info for an inspected tab.

client → host

Related: QueryDevtoolsReply

FieldTypeTagMeaning
pane_idstring1pane_id (string).
inspected_tab_idint642inspected_tab_id (int64).
profilestring3profile (string).
browserstring4browser (string).

QueryDevtoolsReply

DevTools query result (tab id, browser, profile, or error).

host → client

Related: QueryDevtoolsRequest

FieldTypeTagMeaning
tab_idint641tab_id (int64).
errorstring2error (string).
browserstring3browser (string).
profilestring4profile (string).

QueryTabsRequest

List tabs for a pane/profile.

client → host

Related: QueryTabsReply, TabInfo

FieldTypeTagMeaning
pane_idstring1pane_id (string).
profilestring2profile (string).

TabInfo

One tab row: id, optional inspected tab, pane, and URL.

embedded in QueryTabsReply

Related: QueryTabsReply

FieldTypeTagMeaning
idint641id (int64).
inspected_tab_idint642inspected_tab_id (int64).
pane_idstring3pane_id (string).
urlstring4url (string).

QueryTabsReply

Tab list plus aggregate counts (panes, chromium tabs, etc.).

host → client

Related: QueryTabsRequest, TabInfo

FieldTypeTagMeaning
gui_panesint641gui_panes (int64).
chromium_tabsint642chromium_tabs (int64).
chromium_browserint643chromium_browser (int64).
chromium_devtoolsint644chromium_devtools (int64).
tabsrepeated TabInfo5tabs (repeated TabInfo).
errorstring6error (string).

Dialogs, chooser, drop, console, auth

JavaScriptDialogRequest

JS alert/confirm/prompt/beforeunload request parked for product UI.

engine → host → client

Related: JavaScriptDialogReply

FieldTypeTagMeaning
tab_idint641tab_id (int64).
request_iduint642request_id (uint64).
dialog_typestring3alert | confirm | prompt | beforeunload.
origin_urlstring4origin_url (string).
messagestring5message (string).
default_prompt_textstring6default_prompt_text (string).

JavaScriptDialogReply

Answer a JS dialog (accepted + optional prompt text).

client → host → engine

Related: JavaScriptDialogRequest

FieldTypeTagMeaning
tab_idint641tab_id (int64).
request_iduint642request_id (uint64).
acceptedbool3accepted (bool).
prompt_textstring4prompt_text (string).

FileChooserRequest

Engine parks file select; host owns the native open panel.

engine → host

Related: FileChooserReply

FieldTypeTagMeaning
tab_idint641tab_id (int64).
request_iduint642request_id (uint64).
modestring3open | open_multiple.
acceptrepeated string4Optional MIME/extensions from the page.
origin_urlstring5origin_url (string).

FileChooserReply

File chooser result: cancel or absolute paths.

host → engine

Related: FileChooserRequest

FieldTypeTagMeaning
tab_idint641tab_id (int64).
request_iduint642request_id (uint64).
acceptedbool3accepted (bool).
pathsrepeated string4paths (repeated string).

ExternalFileDrop

Finder/OS file drag phases onto the overlay (enter/over/leave/drop).

host → engine

FieldTypeTagMeaning
tab_idint641tab_id (int64).
pathsrepeated string2Absolute file paths from the OS drop.
xdouble3x (double).
ydouble4y (double).
phasestring5enter | over | leave | drop (empty treated as drop).

ConsoleMessage

Console line from the page (level, message, line, source).

engine → host → client

FieldTypeTagMeaning
tab_idint641tab_id (int64).
levelstring2level (string).
messagestring3message (string).
line_noint324line_no (int32).
source_idstring5source_id (string).

HttpAuthRequest

HTTP auth challenge details for product UI.

engine → host → client

Related: HttpAuthReply

FieldTypeTagMeaning
tab_idint641tab_id (int64).
request_iduint642request_id (uint64).
urlstring3url (string).
auth_schemestring4auth_scheme (string).
challengerstring5challenger (string).
realmstring6realm (string).
is_proxybool7is_proxy (bool).
first_auth_attemptbool8first_auth_attempt (bool).
is_primary_main_frame_navigationbool9is_primary_main_frame_navigation (bool).
is_navigationbool10is_navigation (bool).

HttpAuthReply

Credentials or cancel for HTTP auth.

client → host → engine

Related: HttpAuthRequest

FieldTypeTagMeaning
tab_idint641tab_id (int64).
request_iduint642request_id (uint64).
acceptedbool3accepted (bool).
usernamestring4username (string).
passwordstring5password (string).

Crashes and recovery

RendererCrashed

Renderer process crash/termination with optional reload affordance.

engine → host → client

FieldTypeTagMeaning
tab_idint641tab_id (int64).
termination_statusstring2termination_status (string).
termination_status_codeint323termination_status_code (int32).
urlstring4url (string).
can_reloadbool5can_reload (bool).