System, diagnostics and shared types

cua.env.v1 SystemService, the image self-test report, and the types every spacesd service shares: ErrorInfo, principals and geometry.

The handshake (GetCapabilities), session init, health, shutdown, viewer tickets and joining a relay (AttachRelay); the report of the image self-test (SystemService.Diagnose / DiagnoseOnce); and the shared types: errors (google.rpc.Status carrying ErrorInfo), principals and geometry.

Source: libs/cua/proto/cua/env/v1/system.proto, libs/cua/proto/cua/env/v1/diagnose.proto, libs/cua/proto/cua/env/v1/common.proto.

SystemService#

cua.env.v1.SystemService

Discovery, bootstrap and lifecycle of the spacesd itself.

GetCapabilities is the probe the SDK uses to decide whether a sandbox has cua-spacesd at all (sb.spacesd()), and which features it may rely on.

SystemService.GetCapabilities#

/cua.env.v1.SystemService/GetCapabilities, unary: GetCapabilitiesRequest to GetCapabilitiesResponse.

Returns version, platform and the feature list. Cheap; safe to poll.

SystemService.Init#

/cua.env.v1.SystemService/Init, unary: InitRequest to InitResponse.

Configures the driver after boot or claim. Idempotent: repeating the same request is a no-op, and later calls overwrite earlier values.

SystemService.Health#

/cua.env.v1.SystemService/Health, unary: HealthRequest to HealthResponse.

Liveness and per-component health. The same information in reduced form is served unauthenticated as plain HTTP GET /health (204 when healthy).

SystemService.Metrics#

/cua.env.v1.SystemService/Metrics, unary: MetricsRequest to MetricsResponse.

A point-in-time sample of guest resource usage.

SystemService.Shutdown#

/cua.env.v1.SystemService/Shutdown, unary: ShutdownRequest to ShutdownResponse.

Stops or restarts the driver, or powers off or reboots the guest.

SystemService.Diagnose#

/cua.env.v1.SystemService/Diagnose, server stream: DiagnoseRequest to DiagnoseResponse.

Runs the image self-test (the checks of cua-spacesd doctor) and streams each check as it finishes, then the report. Requires the token even in bootstrap modes: the report names paths, versions and units.

SystemService.DiagnoseOnce#

/cua.env.v1.SystemService/DiagnoseOnce, unary: DiagnoseOnceRequest to DiagnoseOnceResponse.

Diagnose as one unary call returning only the final report, for clients that cannot read server streams.

SystemService.CreateViewerTicket#

/cua.env.v1.SystemService/CreateViewerTicket, unary: CreateViewerTicketRequest to CreateViewerTicketResponse.

Mints a viewer ticket: a scoped, expiring credential for the web viewer served at /viewer on this port. It authorizes only the calls a viewer makes (streaming, and clipboard and files when granted) and is safe in a URL fragment. Viewer tickets cannot mint viewer tickets.

SystemService.AttachRelay#

/cua.env.v1.SystemService/AttachRelay, unary: AttachRelayRequest to AttachRelayResponse.

Makes this running driver reachable through a cua-relay as a machine of the owner's account, without restarting it (what cua-spacesd join does at start). Callers then authenticate with relay-signed assertions: the owner, accounts the relay shares the machine with, and view-only accounts that may only watch. Only the root-token holder may call it (never a relay caller or a viewer ticket). Feature relay_attach.

SystemService.DetachRelay#

/cua.env.v1.SystemService/DetachRelay, unary: DetachRelayRequest to DetachRelayResponse.

Leaves the relay attached with AttachRelay and stops accepting relay assertions. Root-token holder only.

Types in cua/env/v1/system.proto#

GetCapabilitiesRequest#

Request for SystemService.GetCapabilities.

No fields.

GetCapabilitiesResponse#

Response for SystemService.GetCapabilities.

Field#TypeDescription
version1stringcua-spacesd release version (semver), for example "0.3.1".
protocol_version2uint32Major contract version. Always 1 for package cua.env.v1.
protocol_revision3uint32Additive revision within the major version. Incremented whenever an RPC, field or enum value is added, so clients can reason about optional surface without probing.
os4OperatingSystemGuest operating system.
runtime5RuntimeHow the guest is hosted.
runtime_detail6stringFree-form runtime detail (for example "runsc 20260901" or "kubevirt 1.4 / qemu 9.1").
arch7ArchitectureGuest CPU architecture.
display_server8DisplayServerThe graphical session type, or DISPLAY_SERVER_NONE when headless.
displays9repeated DisplayDisplays attached to the guest desktop. Empty when headless.
features10repeated FeatureEvery feature the driver knows about, supported or not. Unsupported features carry a limitation. See Feature for canonical names.
hostname11stringGuest hostname.
initialized12boolTrue once Init has succeeded at least once since the driver started.
boot_time13google.protobuf.TimestampWhen the guest booted.
side_channels14SideChannelsWhere the media and tunnel sockets are served.
limits15LimitsServer-enforced size limits clients must respect.
machine_seal_public_key16bytesThis guest's long-term X25519 public key for sealed delivery (S1): Keyvault site-login and teleport bundle payloads sealed to it cross a relay as ciphertext. Generated on first start, 0600. Empty from a guest image that predates this (older images): callers must refuse to deliver such secrets over a relay: path unless the user explicitly opts in per delivery. 32 bytes when present.
bulk17BulkLaneThe bulk lane, when the guest has one: a second disk the host shares with it, through which same-machine file transfers skip the network. Unset when the guest has no such disk.

BulkLane#

A disk shared between a guest and the machine hosting it, carrying file content for ReadFileRequest.bulk_slot and UploadChunkRequest.bulk_slot. The host-side client finds the disk's file, reads the identity from its first bytes (the guest writes them) and uses the lane only when it equals id: a client that cannot open that file, or finds another identity, transfers over the network as before.

Field#TypeDescription
id1bytesIdentity the guest wrote at the start of the disk. 16 bytes.
slots2uint32Number of slots.
slot_bytes3uint64Size of each slot in bytes.
data_offset4uint64Offset of slot 0 in the disk. Slot i starts at data_offset + i * slot_bytes.

OperatingSystem#

Guest operating system description.

Field#TypeDescription
family1OsFamilyOS family.
name2stringDistribution or product name, for example "Ubuntu" or "macOS".
version3stringVersion string, for example "24.04" or "15.4".
kernel4stringKernel release, for example "6.8.0-45-generic" or "Darwin 24.4.0".
pretty_name5stringThe full product string, for example "Ubuntu 24.04.3 LTS", "macOS 26.5.2 (25F84)" or "Windows Server 2022 Datacenter 10.0.20348". Empty from older drivers: use name and version.

Feature#

One capability and whether this guest supports it.

Canonical names (lowercase, dot-separated, stable forever): "a11y", "background_input", "desktop_stream", "window_stream", "h264_hw", "h264_sw", "quic_media", "pty", "fs_watch", "clipboard.text", "clipboard.files", "presence", "windows", "launch_app", "driver", "tunnel.forward", "hotspot", "teleport.<provider>" (for example "teleport.firefox"), "audio.desktop" (desktop audio capture), "audio.per_app" (per-application audio capture; when unsupported, per-app requests fall back to desktop audio and limitation says so), "audio.uplink" (client audio into a guest virtual source), "audio.opus", "presence.cursor_shape" (server-computed cursor shapes; attributes "hit_test", "system" and "probe" name the backends, "probe" is "off" when PresenceSettings.cursor_probe is disabled), and "experimental.<name>" for experimental fields.

Field#TypeDescription
name1stringCanonical feature name.
supported2boolTrue if the feature works on this guest.
limitation3stringWhen unsupported or degraded: why, in one sentence a user can act on (for example "AT-SPI bus not running; start the session with dbus-run-session"). Empty when fully supported.
attributes4map of string to stringFeature-specific details (for example {"encoder": "vaapi"} for "h264_hw", {"isolation": "runc"} for a container runtime).

SideChannels#

Where the non-gRPC sockets live, relative to the gRPC endpoint.

Field#TypeDescription
media_ws_path1stringHTTP path of the media WebSocket, normally "/media".
media_quic_port2uint32UDP port of the direct QUIC media listener, 0 when disabled. Normally the gRPC port plus one (3212).
tunnel_ws_path3stringHTTP path of the TCP-over-WebSocket tunnel, normally "/tunnel".
files_http_path4stringHTTP path of the signed-URL file route, normally "/files".
mcp_http_path5stringHTTP path of the streamable-HTTP MCP endpoint exposing the cua-driver tool registry, normally "/mcp". Empty when disabled.

Limits#

Server-enforced limits.

Field#TypeDescription
max_chunk_bytes1uint32Largest bytes payload accepted in one chunk message (upload chunks, stdin chunks, receive-files chunks). Normally 4 MiB.
max_message_bytes2uint32Largest encoded gRPC message accepted or sent. Normally 8 MiB.
preferred_chunk_bytes3uint32Recommended chunk size for bulk transfer. Normally 1 MiB.
default_scrollback_bytes4uint64Default per-process scrollback ring size in bytes.

InitRequest#

Request for SystemService.Init.

Field#TypeDescription
token1stringAccess token to install. If the driver has no token yet (first claim), the call must arrive over an already-authenticated channel such as a gateway or loopback. If a token is configured, the call must be authenticated with it, and a different value here rotates it. Empty leaves the token unchanged.
env2map of string to stringEnvironment variables added to every process started afterwards. Keys present here replace earlier values; an empty value unsets the key.
default_user3stringDefault OS user for processes and file operations. Empty keeps the current default (the driver's own user).
default_workdir4stringDefault working directory for processes. Empty keeps the user's home.
ca_bundle5bytesPEM-encoded CA certificates appended to the guest trust store.
now6google.protobuf.TimestampCaller's wall clock. When set and the guest clock is off by more than one second, the driver steps the guest clock (VMs resumed from snapshot drift).
labels7map of string to stringOpaque labels recorded for diagnostics (for example sandbox name, claim id).
audio_uplink8AudioUplinkAccessWho may open an audio uplink (StreamService.OpenMedia with audio.uplink.enabled). Unset leaves the current setting; the initial setting is disabled.
presence9PresenceSettingsPresence settings of this Space. Unset leaves the current settings.
new_machine10boolThis guest just became a new machine: a Space claimed from a warm pool, or restored or forked from a memory snapshot that other Spaces share. The driver regenerates its per-machine secrets (the machine-seal keypair, the media QUIC certificate, the ticket key used without a token), resets the sealed-delivery replay guard, rewrites /etc/machine-id (and a separate dbus copy) where it may, mixes entropy into the guest's random pool (crediting it and forcing a reseed where it has the privilege), steps the clock to now, and revokes forwards, the hotspot, the volume mount and media sessions opened before, so no two Spaces share keys or random state. Senders that pinned the old machine-seal key for this Space must re-pin: send it only when the guest is a different Space than the one the snapshot was taken of (never to resume a Space from its own checkpoint). Drivers before protocol revision 10 ignore it (InitResponse.new_machine stays false).
entropy11bytesRandom bytes from the caller's CSPRNG, mixed into the guest's entropy pool and into every secret new_machine regenerates (a restored guest's pool is its snapshot's). At least 32 bytes; at most 4096.

PresenceSettings#

Per-Space presence settings.

Field#TypeDescription
cursor_probe1optional boolWhether the server may read the real cursor shape at a participant's position by briefly moving the guest pointer there while it is idle (no injected input or agent action recently) and restoring it exactly. Gives app-specific shapes the accessibility hit-test cannot infer; hover states may flash under the probe. Unset leaves the current setting; the initial setting is enabled.

AudioUplinkAccess#

Per-principal permission for audio uplink.

Field#TypeDescription
mode1AudioUplinkModeAccess mode.
principal_ids2repeated stringWith AUDIO_UPLINK_MODE_ALLOWLIST: Principal.id values allowed to open an uplink.

InitResponse#

Response for SystemService.Init.

Field#TypeDescription
token_changed1boolTrue if this call installed or rotated the token.
clock_adjusted2boolTrue if the guest clock was stepped.
new_machine3boolTrue if InitRequest.new_machine was applied: this guest's per-machine secrets were regenerated (see InitRequest.new_machine).

HealthRequest#

Request for SystemService.Health.

No fields.

HealthResponse#

Response for SystemService.Health.

Field#TypeDescription
status1HealthStatusOverall status, the worst of all components.
components2repeated ComponentHealthPer-subsystem status (for example "capture", "a11y", "encoder", "filesystem").
uptime3google.protobuf.DurationTime since the driver process started.

ComponentHealth#

Health of one subsystem.

Field#TypeDescription
name1stringSubsystem name.
status2HealthStatusIts status.
detail3stringWhy it is not serving, when applicable.

MetricsRequest#

Request for SystemService.Metrics.

Field#TypeDescription
disk_path1stringPath whose filesystem is reported in disk_*. Empty means the default working directory's filesystem.

MetricsResponse#

Response for SystemService.Metrics.

Field#TypeDescription
sampled_at1google.protobuf.TimestampWhen the sample was taken.
cpu_count2uint32Logical CPUs visible to the guest.
cpu_percent3doubleCPU utilisation across all CPUs, 0 to 100.
load_average_1m4double1-minute load average (0 on Windows).
memory_total_bytes5uint64Total guest memory in bytes.
memory_used_bytes6uint64Used guest memory in bytes (excluding reclaimable cache).
disk_total_bytes7uint64Total bytes of the filesystem named by disk_path; 0 when it has no size of its own (gVisor's root overlay reports "unlimited"), never a sentinel such as 2^63.
disk_used_bytes8uint64Used bytes of that filesystem.
managed_process_count9uint32Processes currently managed by ProcessService.
media_session_count10uint32Open media sessions.
network_rx_bytes11uint64Bytes received on all guest network interfaces since boot.
network_tx_bytes12uint64Bytes sent on all guest network interfaces since boot.
memory_limited13boolmemory_total_bytes is the guest's own limit: a virtual machine's memory or a container's cgroup memory limit. False when it is only the host's memory (a container without a limit, bare metal).
disk_limited14booldisk_total_bytes is the guest's own disk: a virtual machine's disk or a filesystem with a quota. False when it is the host's (a container's overlay, bare metal).

ShutdownRequest#

Request for SystemService.Shutdown.

Field#TypeDescription
mode1ShutdownModeWhat to stop.
grace_period2google.protobuf.DurationHow long to wait for in-flight RPCs and managed processes before forcing. Unset means 5 seconds.
reason3stringReason recorded in the driver log.

ShutdownResponse#

Response for SystemService.Shutdown. Sent before the shutdown begins.

No fields.

CreateViewerTicketRequest#

Request for SystemService.CreateViewerTicket.

Field#TypeDescription
ttl1google.protobuf.DurationLifetime. Unset means 1 hour; the maximum is 24 hours. Rotating the root token revokes every viewer ticket.
policy2SessionPolicyHighest session policy the viewer may open media with. Unset means SESSION_POLICY_VIEW_ONLY: a viewer that can look and cannot touch. Input is asked for by name.
clipboard3boolAllow ComputerService.GetClipboard and SetClipboard.
files_root4stringGuest directory the viewer may read and write through FilesystemService (drag-and-drop uploads and folder sharing). Empty means no file access. ~ is the desktop user's home.
audio_uplink5boolAllow a microphone uplink track (still subject to InitRequest.audio_uplink).
principal6PrincipalWho is viewing, shown to other participants. The id is prefixed with viewer: by the server.

CreateViewerTicketResponse#

Response for SystemService.CreateViewerTicket.

Field#TypeDescription
ticket1stringThe ticket. The viewer sends it as x-cua-env-authorization: Bearer <ticket> (or authorization).
expires_at2google.protobuf.TimestampWhen it expires.
viewer_path3stringPath of the viewer page with the ticket in the fragment, relative to this port: /viewer/#ticket=<ticket>. Fragments never reach servers or proxies.
files_root4stringfiles_root resolved to an absolute guest path (empty without file access).

AttachRelayRequest#

Request for SystemService.AttachRelay.

Field#TypeDescription
relay_url1stringRelay base URL (wss://relay.cua.ai, ws://relay:8080, https://...).
machine_token2stringThe machine token the relay issued when the owner registered this machine (POST /v1/machines). Kept in memory only.
machine_id3stringThe machine id the owner registered ([a-z0-9-]{8,64}).
relay_jwks_json4stringThe relay's signing keys (JWKS JSON) from the registration, pinned: the join handshake must present one of them.
owner5stringThe owning account id.
owner_email6stringThe owner's email (informational).

AttachRelayResponse#

Response for SystemService.AttachRelay.

Field#TypeDescription
machine_id1stringThe machine id this driver joined as.

DetachRelayRequest#

Request for SystemService.DetachRelay.

No fields.

DetachRelayResponse#

Response for SystemService.DetachRelay.

Field#TypeDescription
detached1boolFalse when no relay was attached.

OsFamily#

Operating system family.

Value#Description
OS_FAMILY_UNSPECIFIED0Not reported.
OS_FAMILY_LINUX1Linux.
OS_FAMILY_MACOS2macOS.
OS_FAMILY_WINDOWS3Windows.

Runtime#

How the guest is hosted.

Value#Description
RUNTIME_UNSPECIFIED0Not reported.
RUNTIME_UNKNOWN1Could not be determined.
RUNTIME_KUBEVIRT2A KubeVirt virtual machine.
RUNTIME_GVISOR3A gVisor (runsc) sandboxed container.
RUNTIME_LUME4A Lume (Apple Virtualization.framework) virtual machine.
RUNTIME_QEMU5A QEMU virtual machine outside KubeVirt.
RUNTIME_CONTAINER6A plain container (runc or equivalent).
RUNTIME_BARE7Bare metal or an unmanaged host (for example a laptop joined through the relay).
RUNTIME_HYPERV8A Hyper-V virtual machine.

Architecture#

CPU architecture.

Value#Description
ARCHITECTURE_UNSPECIFIED0Not reported.
ARCHITECTURE_X86_641x86-64 / amd64.
ARCHITECTURE_ARM642AArch64 / arm64.

DisplayServer#

Graphical session type.

Value#Description
DISPLAY_SERVER_UNSPECIFIED0Not reported.
DISPLAY_SERVER_NONE1No graphical session.
DISPLAY_SERVER_X112X11 (including Xvfb).
DISPLAY_SERVER_WAYLAND3Wayland.
DISPLAY_SERVER_QUARTZ4macOS Quartz / WindowServer.
DISPLAY_SERVER_WIN325Windows desktop window manager.

AudioUplinkMode#

Audio uplink access mode.

Value#Description
AUDIO_UPLINK_MODE_UNSPECIFIED0Not set. Keeps the current mode.
AUDIO_UPLINK_MODE_DISABLED1No uplinks. The initial mode.
AUDIO_UPLINK_MODE_ALLOWLIST2Only principals in principal_ids.
AUDIO_UPLINK_MODE_ANY3Any authenticated caller.

HealthStatus#

Health status.

Value#Description
HEALTH_STATUS_UNSPECIFIED0Not reported.
HEALTH_STATUS_SERVING1Fully operational.
HEALTH_STATUS_DEGRADED2Operational with reduced function (see component details).
HEALTH_STATUS_NOT_SERVING3Not operational.

ShutdownMode#

What SystemService.Shutdown stops.

Value#Description
SHUTDOWN_MODE_UNSPECIFIED0Not set. Rejected with INVALID_ARGUMENT, to avoid accidental power-off.
SHUTDOWN_MODE_DRIVER_EXIT1Exit the driver. The service manager may restart it.
SHUTDOWN_MODE_DRIVER_RESTART2Restart the driver in place (re-exec).
SHUTDOWN_MODE_GUEST_POWEROFF3Power off the guest.
SHUTDOWN_MODE_GUEST_REBOOT4Reboot the guest.

Types in cua/env/v1/diagnose.proto#

DiagnoseOptions#

Options shared by Diagnose and DiagnoseOnce.

Field#TypeDescription
strict1boolTreat warnings (and skips not allowed by the manifest) as failures.
only2repeated stringRun only checks whose id equals, or starts with <entry>., one of these (for example "stream" or "auth.token_file"). Empty runs all.
skip3repeated stringSkip checks matched the same way as only.
effects4DiagnoseEffectsWhich checks may change guest state. Unspecified means NONE.
expect_manifest5bytesA manifest (JSON, same schema as /etc/cua-image/manifest.json) to check against instead of the one baked into the image. Empty uses the image's own.
timeout6google.protobuf.DurationOverall budget. Unset means 120 seconds. Checks still running when it expires fail with a timeout.
host_time7google.protobuf.TimestampThe caller's wall clock, for the clock-skew check. Unset skips the comparison.

DiagnoseRequest#

Request for SystemService.Diagnose.

Field#TypeDescription
options1DiagnoseOptionsWhat to run.

DiagnoseResponse#

One event of SystemService.Diagnose: started, then check, for each check, and a final report.

Field#TypeDescription
started1DiagnoseCheckStarted (oneof event)A check began.
check2DiagnoseCheck (oneof event)A check finished.
report3DiagnoseReport (oneof event)The run finished. Always the last message.

DiagnoseCheckStarted#

A check began.

Field#TypeDescription
id1stringCheck id, for example "stream.encode.openh264".
group2stringCheck group, the id's first segment.

DiagnoseOnceRequest#

Request for SystemService.DiagnoseOnce.

Field#TypeDescription
options1DiagnoseOptionsWhat to run.

DiagnoseOnceResponse#

Response for SystemService.DiagnoseOnce.

Field#TypeDescription
report1DiagnoseReportThe final report.

DiagnoseCheck#

The result of one check.

Field#TypeDescription
id1stringStable id, <group>.<name>[.<detail>].
group2stringGroup, the id's first segment (for example "auth").
status3CheckStatusOutcome after severity is applied.
severity4CheckSeveritySeverity from the manifest.
claimed_by5repeated stringManifest claims that make this check matter, for example "feature:desktop_stream" or "auth_mode:local".
message6stringWhat happened, in one line.
remediation7stringWhat to do about a warning or failure. Empty on pass.
duration_ms8uint32Wall time of the check in milliseconds.
facts9map of string to stringMeasured values (for example {"backend": "openh264", "psnr_db": "41.2"}).
artifacts10repeated DiagnoseArtifactEvidence files.

DiagnoseArtifact#

Evidence produced by a check.

Field#TypeDescription
name1stringFile name, unique within the report (for example "screenshot.display0.png").
media_type2stringMedia type, for example "image/png".
data3bytesContents, when small enough to inline (at most 1 MiB). Empty otherwise.
path4stringWhere the full file was written in the guest. Empty when not written.

DiagnoseReport#

The whole report.

Field#TypeDescription
schema_version1uint32Report schema version. Always 1 for this message.
spacesd2DiagnoseSpacesdThe daemon that ran the checks. Unset when a shim produced the report for an image without cua-spacesd.
image3DiagnoseImageThe image under test.
environment4DiagnoseEnvironmentWhere the guest runs.
summary5DiagnoseSummaryTotals.
checks6repeated DiagnoseCheckEvery check, in run order.
fidelity7DiagnoseFidelityFacts that make a task behave differently between variants of one image. Compared key by key by the eval-parity lane.
producer8stringWhat produced the report: "cua-spacesd", or "cua-doctor-shim/<target>".
started_at9google.protobuf.TimestampWhen the run started.

DiagnoseSpacesd#

The daemon that ran the checks.

Field#TypeDescription
version1stringcua-spacesd version.
protocol_revision2uint32cua.env.v1 protocol revision it serves.
git_sha3stringSource revision of the build, when known.
cua_driver_version4stringVersion of the linked cua-driver core.

DiagnoseImage#

The image under test.

Field#TypeDescription
name1stringImage name from the manifest, for example "linux".
ref2stringReference the image was built as, when the manifest records it.
variant3string"rootfs" (container) or "containerdisk" (VM).
os4string"linux", "windows" or "macos".
manifest_sha2565stringSHA-256 of the manifest the checks ran against. Empty without one.
manifest_source6stringWhere the manifest came from: a guest path, "request", or empty when there is none.

DiagnoseEnvironment#

Where the guest runs.

Field#TypeDescription
runtime1stringRuntime: "container", "gvisor", "qemu", "kubevirt", "lume", "hyperv", "bare" or "unknown".
runtime_detail2stringFree-form runtime detail, for example "runsc".
arch3string"x86_64" or "arm64".
init4stringInit system: "systemd", "supervisord", "launchd", "scm" or "unknown".
display_server5string"x11", "wayland", "quartz", "win32" or "none".
os6stringOS name and version, for example "Ubuntu 24.04".

DiagnoseSummary#

Totals of a report.

Field#TypeDescription
status1CheckStatusWorst outcome: fail if any check failed, warn if any warned (fail under strict), else pass.
pass2uint32Passed checks.
warn3uint32Warnings.
fail4uint32Failures.
skip5uint32Skipped checks.
duration_ms6uint32Wall time of the whole run in milliseconds.
strict7boolTrue when the run used strict.

DiagnoseFidelity#

Facts that change how a task behaves. Every key is always present; an unknown value is the empty string.

Field#TypeDescription
display1stringPrimary display, "<width>x<height>@<scale>".
fonts_sha2562stringSHA-256 over the sorted list of installed font files.
tz3stringTime zone name.
locale4stringLocale, for example "C.UTF-8".
clock_skew_ms5int64Guest clock minus the caller's clock, in milliseconds. 0 when the caller sent no host_time.
encoder6stringVideo encoder the stream would use, for example "openh264".
a11y_backend7stringAccessibility backend, for example "atspi".
audio_backend8stringAudio backend, for example "pipewire".
cpu_model9stringCPU model string.
cpu_count10uint32Logical CPUs.
memory_mib11uint64Total memory in MiB.
gpu12stringGPU description, or "none".
kernel13stringKernel release.
runtime14stringRuntime, as in DiagnoseEnvironment.runtime.
init15stringInit system, as in DiagnoseEnvironment.init.
packages_sha25616stringSHA-256 over the installed package list (name and version).
app_versions17map of string to stringVersions of the apps the manifest lists (for example {"firefox": "130.0"}).
tool_versions18map of string to stringVersions of the tools the manifest lists (dev tiers, for example {"node": "v22.20.0"}).
simulator_runtimes19repeated stringAvailable simulator runtimes, sorted (for example "iOS 26.0"). Empty unless the manifest claims some.

DiagnoseEffects#

Which checks may act on the guest.

Value#Description
DIAGNOSE_EFFECTS_UNSPECIFIED0Not set. Same as DIAGNOSE_EFFECTS_NONE.
DIAGNOSE_EFFECTS_NONE1Read-only checks. Input, window and fixture checks are skipped.
DIAGNOSE_EFFECTS_VIRTUAL_ONLY2Effectful checks run, but only against fixture windows the doctor itself launched on the guest's virtual display. Refused on bare hosts.

CheckStatus#

Outcome of one check.

Value#Description
CHECK_STATUS_UNSPECIFIED0Not reported.
CHECK_STATUS_PASS1Works as claimed.
CHECK_STATUS_WARN2Works with a caveat, or something unclaimed is off.
CHECK_STATUS_FAIL3Broken.
CHECK_STATUS_SKIP4Not run; message says why.

CheckSeverity#

How much a check matters for this image, derived from the manifest.

Value#Description
CHECK_SEVERITY_UNSPECIFIED0Not reported.
CHECK_SEVERITY_REQUIRED1The image claims it: a failure fails the report.
CHECK_SEVERITY_RECOMMENDED2Optional in the manifest: a failure is reported as a warning.
CHECK_SEVERITY_INFO3Not claimed: a failure is reported as a warning.

Types in cua/env/v1/common.proto#

Point#

A point in a two-dimensional coordinate space. Which space is always stated by the enclosing message (see CoordinateSpace).

Field#TypeDescription
x1doubleHorizontal coordinate, growing to the right.
y2doubleVertical coordinate, growing downward.

Rect#

An axis-aligned rectangle in a coordinate space stated by the enclosing message.

Field#TypeDescription
x1doubleLeft edge.
y2doubleTop edge.
width3doubleWidth. Never negative.
height4doubleHeight. Never negative.

PixelSize#

A size in device (physical) pixels.

Field#TypeDescription
width1uint32Width in pixels.
height2uint32Height in pixels.

WindowRef#

Opaque, server-issued reference to a window.

Native window identifiers (CGWindowID, HWND, X11 Window, portal tokens) are never exposed. id stays stable for the life of the native window. epoch changes whenever the server recycles an id or the window's identity is no longer trustworthy (for example, the owning process restarted). A request with a stale epoch fails with FAILED_PRECONDITION and ERROR_REASON_STALE_HANDLE.

Field#TypeDescription
id1stringOpaque window identifier. Compare only for equality.
epoch2uint64Identity generation of id.

Display#

A display (monitor) attached to the guest desktop.

Field#TypeDescription
id1stringOpaque, stable display identifier. The alias "primary" is accepted wherever a display id is expected.
name2stringHuman-readable name, for example "Built-in Retina Display" or "XVFB-0".
primary3boolTrue for the primary display.
bounds4RectDisplay bounds in global logical points (COORDINATE_SPACE_SCREEN).
native_size5PixelSizeSize of the display's framebuffer in physical pixels.
scale_factor6doublePhysical pixels per logical point (for example 2.0 on Retina, 1.0 on most Linux framebuffers).
refresh_rate_hz7uint32Nominal refresh rate in hertz, 0 when unknown (for example Xvfb).
rotation_degrees8uint32Clockwise rotation in degrees: 0, 90, 180 or 270.

DeliveryReport#

What the server actually did for an input or action request.

Field#TypeDescription
delivery1DeliveryThe delivery mode that was used. Never DELIVERY_AUTO or unspecified.
focus_changed2boolTrue if the focused window or frontmost app changed as a result.
pointer_moved3boolTrue if the user-visible pointer moved as a result.
detail4stringFree-form, human-readable note (for example which platform path was used). Not for programmatic use.

Principal#

Who is making a call. Sent as serialized bytes in the x-cua-principal-bin metadata entry.

Field#TypeDescription
id1stringStable identifier chosen by the client (for example a user id or an agent run id).
display_name2stringName shown to other participants.
color3stringPreferred cursor color as #RRGGBB. The server may substitute a different color to keep participants distinguishable.
kind4PrincipalKindWhether the principal is a human or an automated agent.

ErrorInfo#

Machine-readable error detail, packed as google.protobuf.Any inside the google.rpc.Status in the grpc-status-details-bin trailer.

Field#TypeDescription
reason1ErrorReasonThe specific reason. More precise than the gRPC status code.
message2stringHuman-readable description. Not for programmatic use.
feature3stringCapability feature name involved, when reason is ERROR_REASON_FEATURE_UNSUPPORTED (for example "a11y").
metadata4map of string to stringStructured context. Well-known keys: "expected_sequence", "expected_offset", "path", "pid", "tag", "retry_after_ms".

KeepAlive#

Periodic empty message sent on long-lived server streams so proxies (gateways, load balancers) do not time out an idle stream. Clients ignore it apart from resetting their own liveness timers.

No fields.

CoordinateSpace#

The coordinate space a Point or Rect is expressed in.

Value#Description
COORDINATE_SPACE_UNSPECIFIED0Not set. Servers treat it as COORDINATE_SPACE_SCREEN.
COORDINATE_SPACE_SCREEN1Global desktop space in logical points, origin at the top-left of the primary display. This is the space Display.bounds uses.
COORDINATE_SPACE_WINDOW2Logical points relative to the top-left corner of the target window's frame. Requires a target window on the request.
COORDINATE_SPACE_SCREENSHOT3Pixels of a screenshot previously returned by ComputerService.Screenshot, identified by screenshot_id on the request. The server performs the one conversion to native coordinates and fails with ERROR_REASON_STALE_GEOMETRY if the display or window geometry changed since the screenshot was taken.
COORDINATE_SPACE_NORMALIZED4Normalized coordinates in [0, 1] relative to the target window, or the target display when no window is given.

Delivery#

How synthetic input or an action is delivered to the guest.

Value#Description
DELIVERY_UNSPECIFIED0Not set. Servers treat it as DELIVERY_AUTO.
DELIVERY_AUTO1Prefer background delivery and fall back to foreground delivery when the platform or target cannot receive background input.
DELIVERY_BACKGROUND2Deliver without moving the user-visible pointer, changing the focused window or activating the target app. Fails with ERROR_REASON_WOULD_REQUIRE_ACTIVATION rather than falling back.
DELIVERY_FOREGROUND3Activate the target (if any) and deliver through the global input stream, moving the real pointer and focus.

PrincipalKind#

Kind of principal behind a call.

Value#Description
PRINCIPAL_KIND_UNSPECIFIED0Not set. Servers treat it as PRINCIPAL_KIND_HUMAN.
PRINCIPAL_KIND_HUMAN1A person driving a client UI.
PRINCIPAL_KIND_AGENT2An automated agent.

ErrorReason#

Machine-readable error reasons shared by every service.

Value#Description
ERROR_REASON_UNSPECIFIED0Not set.
ERROR_REASON_UNAUTHENTICATED1Missing or wrong bearer token, or an expired ticket.
ERROR_REASON_FEATURE_UNSUPPORTED2The operation needs a feature the guest does not support. See ErrorInfo.feature and SystemService.GetCapabilities.
ERROR_REASON_PERMISSION_DENIED3The guest OS denied permission (for example macOS TCC, UAC, AT-SPI disabled).
ERROR_REASON_STALE_HANDLE4A WindowRef epoch no longer matches.
ERROR_REASON_STALE_GEOMETRY5Geometry changed since the referenced screenshot or media frame.
ERROR_REASON_STALE_SNAPSHOT6An accessibility element's snapshot is no longer current.
ERROR_REASON_WOULD_REQUIRE_ACTIVATION7DELIVERY_BACKGROUND was requested but only foreground delivery could reach the target.
ERROR_REASON_TARGET_UNAVAILABLE8The target window, app, display or element is gone.
ERROR_REASON_DELIVERY_FAILED9The platform accepted the request but native delivery failed.
ERROR_REASON_PROCESS_NOT_FOUND10No process matches the given pid or tag.
ERROR_REASON_PATH_NOT_FOUND11The path does not exist.
ERROR_REASON_PATH_EXISTS12The path already exists and overwrite was not requested.
ERROR_REASON_NOT_A_DIRECTORY13A directory was required.
ERROR_REASON_IS_A_DIRECTORY14A regular file was required.
ERROR_REASON_DISK_FULL15The guest disk is full (HTTP 507 on the /files route).
ERROR_REASON_CHECKSUM_MISMATCH16Received content does not match the declared SHA-256.
ERROR_REASON_SESSION_NOT_FOUND17Unknown or expired upload, transfer, watcher, media session or forward.
ERROR_REASON_OFFSET_MISMATCH18A chunk arrived at the wrong offset. metadata["expected_offset"] holds the offset the server expects next.
ERROR_REASON_SEQUENCE_GAP19A sequenced input chunk skipped ahead. metadata["expected_sequence"] holds the sequence the server expects next.
ERROR_REASON_RATE_LIMITED20Too many requests. metadata["retry_after_ms"] may hint a delay.
ERROR_REASON_LIMIT_EXCEEDED21A request limit was exceeded (chunk size, message size, tree depth).
ERROR_REASON_NOT_INITIALIZED22SystemService.Init has not configured a required default yet.
ERROR_REASON_INTERNAL23An internal server error. Report a bug.
ERROR_REASON_STALE_EPOCH24The request carries a fencing epoch lower than the Space's current epoch (ProcessService.AdvanceEpoch): a newer client has taken over, for example after the Space was restored from a checkpoint. metadata["current_epoch"] holds the current epoch.