CUPComputer Use Protocol
Core Concepts

Roles, States & Actions

The three pillars of the CUP vocabulary — 59 roles, 16 states, 15 element actions + 2 session actions.

Roles

CUP defines 59 ARIA-derived roles that map cleanly to every platform's native accessibility API. Each role has a 2-4 character short code used in compact format.

States

CUP defines 16 state flags. Only active/truthy states are listed — absence means the default state.

StateCodeMeaning
busybsyElement is loading or processing
checkedchkCheckbox or radio is checked
collapsedcolExpandable element is collapsed
disableddisElement is not interactive
editableedtContent can be edited
expandedexpExpandable element is open
focusedfocElement has keyboard focus
hiddenhidElement is not visible
mixedmixIndeterminate checkbox state
modalmodDialog is modal
multiselectablemselMultiple items can be selected
offscreenoffElement is outside the viewport
pressedprsButton is pressed/active
readonlyroValue cannot be changed
requiredreqField is required
selectedselItem is selected

Actions

CUP defines 15 element-level actions that map to native platform APIs.

ActionCodeParametersDescription
clickclkClick or invoke the element
doubleclickdblDouble-click the element
rightclickrclkOpen context menu
longpresslpLong-press (touch)
toggletogToggle checkbox or switch
typetypvalue: stringType text into a field
setvaluesvvalue: stringSet element value directly
scrollscrdirection: up|down|left|rightScroll a container
selectselSelect an item
expandexpExpand a collapsed element
collapsecolCollapse an expanded element
incrementincIncrement slider/spinner
decrementdecDecrement slider/spinner
focusfocMove keyboard focus
dismissdsmDismiss dialog/popup

Additionally, two session-level actions are available:

ActionParametersDescription
presskeys: stringSend keyboard shortcut (e.g. ctrl+s)
waitms: numberDelay between batch actions (50-5000ms)

On this page