Skip to main content
POST
Error

Path Parameters

runToken
string
required

The run token. Write {runToken}; never write a real one down.

deviceId
string
required

Must be the device this run is bound to. Anything else is refused as not found.

Body

application/json

One action.

One action, discriminated by action. Coordinates are SCREENSHOT PIXELS of the frame you last fetched, and screen must echo that frame's size: a mismatch means every coordinate aims at the wrong thing, so it is refused rather than scaled.

Every variant also takes refuseIfOthersActed, this service's one addition to the dialect: the action is refused STALE_FRAME if another principal (a person driving the same device beside this run, for instance) acted after the frame it is bound to. On by default for a run, which always binds a frame; send false to be told through others instead. A worker that already re-observes on STALE_FRAME needs no new code.

action
string
required
Allowed value: "tap"
coordinate_space
string
required
Allowed value: "screenshot_pixels"
screen
object
required
x
integer
required
y
integer
required
refuseIfOthersActed
boolean

Refuse this gesture (409 stale_frame, reason others_acted) if another principal acted on the device after observedFrame was taken. Sending true needs observedFrame; without it the body is refused as invalid_argument. Left out, it defaults by who is acting: on for an API key, a copilot or a run that sends observedFrame, off for a person acting directly, and off whenever no observedFrame is sent. You are told through others either way.

Response

The action was applied.

The action was applied. others says what principals other than this run did on the device since the frame the action was bound to; the driver ignores this body, and a worker that reads it looks again before its next decision when actions is above zero.

ok
boolean
required
others
object
required

What everybody else did on this device since you last looked. On a gesture the anchor is the frame you bound it to, else your previous gesture that reached the device (a refused one never anchors), else the last sixty seconds. A person may drive the same device beside an agent's run; each is informed of the other through this and neither is stopped.