computer::act
Drive the desktop. By coordinates (pixels of the latest screenshot): click, right_click, double_click, move, drag, scroll, type, press, hotkey. By ref from computer::observe or computer::find (native sessions): invoke, set_value (with text), toggle, select — no mouse or keyboard involved, and the effect is not verified, so confirm with computer::find. A coordinate action invalidates refs.
- actionstringrequired
By coordinate: `click`, `right_click`, `double_click`, `move`, `drag`, `scroll`, `type`, `press`, or `hotkey`. By `ref`: `invoke`, `set_value` (with `text`), `toggle`, or `select`.
- buttonstring
Mouse button for `drag` (`left`, `right`, `middle`). Default `left`.
- keysstring[]
Keys for `press`/`hotkey`: a single key (`["enter"]`) or a chord (`["ctrl", "c"]`).
- refstring
Element ref from `computer::observe` (include_a11y) or `computer::find`, for invoke/set_value/toggle/select. Refs die when a newer observe/find replaces them or a coordinate action runs.
- scroll_xinteger· int64
Horizontal scroll amount for `action=scroll`. Default 0.
- scroll_yinteger· int64
Vertical scroll amount for `action=scroll`; positive scrolls down. Default 3.
- session_idstringrequired
- textstring
Text to type (`type`) or the value to set (`set_value`).
- to_xinteger· int64
Drag end x (with `to_y`), for `action=drag`.
- to_yinteger· int64
Drag end y.
- xinteger· int64
Target x (pixels). Required for click/right_click/double_click/move and the drag start; the scroll anchor defaults to screen center.
- yinteger· int64
Target y (pixels).
- detailstringrequired
What was done, for the transcript.
- okbooleanrequired