ExDaytona.Api.ComputerUse (ex_daytona v0.1.0)

Copy Markdown View Source

API calls for all endpoints tagged ComputerUse.

Summary

Functions

Click mouse button Click the mouse button at the specified coordinates

Delete a recording Delete a recording file by ID

Download a recording Download a recording by providing its ID

Drag mouse Drag the mouse from start to end coordinates

Find accessibility nodes Search the AT-SPI tree for nodes matching a role/name/state filter and return a flat list.

Focus an accessibility node Move keyboard focus to the AT-SPI node identified by id (bus-name:object-path).

Get accessibility tree Fetch the AT-SPI accessibility tree for the focused application, a specific PID, or all registered applications.

Get computer use process status Get the status of all computer use processes

Get computer use status Get the current status of the computer use system

Get display information Get information about all available displays

Get mouse position Get the current mouse cursor position

Get process errors Get errors for a specific computer use process

Get process logs Get logs for a specific computer use process

Get specific process status Check if a specific computer use process is running

Get recording details Get details of a specific recording by ID

Get windows information Get information about all open windows

Invoke an action on an accessibility node Call an AT-SPI Action on the node. Leave action empty to invoke the node's primary (first) action.

List all recordings Get a list of all recordings (active and completed)

Move mouse cursor Move the mouse cursor to the specified coordinates

Press hotkey Press a hotkey combination (e.g., ctrl+c, cmd+v)

Press key Press a key with optional modifiers

Restart specific process Restart a specific computer use process

Scroll mouse wheel Scroll the mouse wheel at the specified coordinates

Set the value of an accessibility node Write the given value to the node via EditableText.SetTextContents or, for numeric controls, Value.CurrentValue.

Start computer use processes Start all computer use processes and return their status

Start a new recording Start a new screen recording session

Stop computer use processes Stop all computer use processes and return their status

Stop a recording Stop an active screen recording session

Take a compressed region screenshot Take a compressed screenshot of a specific region of the screen

Take a compressed screenshot Take a compressed screenshot of the entire screen

Take a region screenshot Take a screenshot of a specific region of the screen

Take a screenshot Take a screenshot of the entire screen

Type text Type text with optional delay between keystrokes

Functions

click(connection, mouse_click_request, opts \\ [])

Click mouse button Click the mouse button at the specified coordinates

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • mouse_click_request (MouseClickRequest): Mouse click request
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.MouseClickResponse.t} on success
  • {:error, Tesla.Env.t} on failure

delete_recording(connection, id, opts \\ [])

@spec delete_recording(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Delete a recording Delete a recording file by ID

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • id (String.t): Recording ID
  • opts (keyword): Optional parameters

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure

download_recording(connection, id, opts \\ [])

@spec download_recording(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, String.t()}
  | {:error, Tesla.Env.t()}

Download a recording Download a recording by providing its ID

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • id (String.t): Recording ID
  • opts (keyword): Optional parameters

Returns

  • {:ok, String.t} on success
  • {:error, Tesla.Env.t} on failure

drag(connection, mouse_drag_request, opts \\ [])

Drag mouse Drag the mouse from start to end coordinates

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • mouse_drag_request (MouseDragRequest): Mouse drag request
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.MouseDragResponse.t} on success
  • {:error, Tesla.Env.t} on failure

find_accessibility_nodes(connection, find_accessibility_nodes_request, opts \\ [])

Find accessibility nodes Search the AT-SPI tree for nodes matching a role/name/state filter and return a flat list.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • find_accessibility_nodes_request (FindAccessibilityNodesRequest): Find request
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.AccessibilityNodesResponse.t} on success
  • {:error, Tesla.Env.t} on failure

focus_accessibility_node(connection, accessibility_node_request, opts \\ [])

@spec focus_accessibility_node(
  Tesla.Env.client(),
  ExDaytona.Model.AccessibilityNodeRequest.t(),
  keyword()
) ::
  {:ok, map()}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Focus an accessibility node Move keyboard focus to the AT-SPI node identified by id (bus-name:object-path).

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • accessibility_node_request (AccessibilityNodeRequest): Node focus request
  • opts (keyword): Optional parameters

Returns

  • {:ok, map()} on success
  • {:error, Tesla.Env.t} on failure

get_accessibility_tree(connection, opts \\ [])

@spec get_accessibility_tree(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, ExDaytona.Model.AccessibilityTreeResponse.t()}
  | {:error, Tesla.Env.t()}

Get accessibility tree Fetch the AT-SPI accessibility tree for the focused application, a specific PID, or all registered applications.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :scope (String.t): Scope: focused | pid | all (default: focused)

    • :pid (integer()): Process ID when scope=pid
    • :maxDepth (integer()): Max tree depth (-1 unbounded, 0 root only; default -1)

Returns

  • {:ok, ExDaytona.Model.AccessibilityTreeResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_computer_use_status(connection, opts \\ [])

@spec get_computer_use_status(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ComputerUseStatusResponse.t()} | {:error, Tesla.Env.t()}

Get computer use process status Get the status of all computer use processes

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.ComputerUseStatusResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_computer_use_system_status(connection, opts \\ [])

@spec get_computer_use_system_status(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, ExDaytona.Model.ComputerUseStatusResponse.t()}
  | {:error, Tesla.Env.t()}

Get computer use status Get the current status of the computer use system

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.ComputerUseStatusResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_display_info(connection, opts \\ [])

@spec get_display_info(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, ExDaytona.Model.DisplayInfoResponse.t()}
  | {:error, Tesla.Env.t()}

Get display information Get information about all available displays

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.DisplayInfoResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_mouse_position(connection, opts \\ [])

@spec get_mouse_position(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, ExDaytona.Model.MousePositionResponse.t()}
  | {:error, Tesla.Env.t()}

Get mouse position Get the current mouse cursor position

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.MousePositionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_process_errors(connection, process_name, opts \\ [])

@spec get_process_errors(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.ProcessErrorsResponse.t()} | {:error, Tesla.Env.t()}

Get process errors Get errors for a specific computer use process

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • process_name (String.t): Process name to get errors for
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.ProcessErrorsResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_process_logs(connection, process_name, opts \\ [])

@spec get_process_logs(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.ProcessLogsResponse.t()} | {:error, Tesla.Env.t()}

Get process logs Get logs for a specific computer use process

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • process_name (String.t): Process name to get logs for
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.ProcessLogsResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_process_status(connection, process_name, opts \\ [])

@spec get_process_status(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.ProcessStatusResponse.t()} | {:error, Tesla.Env.t()}

Get specific process status Check if a specific computer use process is running

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • process_name (String.t): Process name to check
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.ProcessStatusResponse.t} on success
  • {:error, Tesla.Env.t} on failure

get_recording(connection, id, opts \\ [])

@spec get_recording(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.Recording.t()}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Get recording details Get details of a specific recording by ID

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • id (String.t): Recording ID
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.Recording.t} on success
  • {:error, Tesla.Env.t} on failure

get_windows(connection, opts \\ [])

@spec get_windows(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, ExDaytona.Model.WindowsResponse.t()}
  | {:error, Tesla.Env.t()}

Get windows information Get information about all open windows

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.WindowsResponse.t} on success
  • {:error, Tesla.Env.t} on failure

invoke_accessibility_node(connection, accessibility_invoke_request, opts \\ [])

@spec invoke_accessibility_node(
  Tesla.Env.client(),
  ExDaytona.Model.AccessibilityInvokeRequest.t(),
  keyword()
) ::
  {:ok, map()}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Invoke an action on an accessibility node Call an AT-SPI Action on the node. Leave action empty to invoke the node's primary (first) action.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • accessibility_invoke_request (AccessibilityInvokeRequest): Invoke request
  • opts (keyword): Optional parameters

Returns

  • {:ok, map()} on success
  • {:error, Tesla.Env.t} on failure

list_recordings(connection, opts \\ [])

@spec list_recordings(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, ExDaytona.Model.ListRecordingsResponse.t()}
  | {:error, Tesla.Env.t()}

List all recordings Get a list of all recordings (active and completed)

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.ListRecordingsResponse.t} on success
  • {:error, Tesla.Env.t} on failure

move_mouse(connection, mouse_move_request, opts \\ [])

Move mouse cursor Move the mouse cursor to the specified coordinates

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • mouse_move_request (MouseMoveRequest): Mouse move request
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.MousePositionResponse.t} on success
  • {:error, Tesla.Env.t} on failure

press_hotkey(connection, keyboard_hotkey_request, opts \\ [])

@spec press_hotkey(
  Tesla.Env.client(),
  ExDaytona.Model.KeyboardHotkeyRequest.t(),
  keyword()
) ::
  {:ok, map()}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Press hotkey Press a hotkey combination (e.g., ctrl+c, cmd+v)

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • keyboard_hotkey_request (KeyboardHotkeyRequest): Hotkey press request
  • opts (keyword): Optional parameters

Returns

  • {:ok, map()} on success
  • {:error, Tesla.Env.t} on failure

press_key(connection, keyboard_press_request, opts \\ [])

@spec press_key(
  Tesla.Env.client(),
  ExDaytona.Model.KeyboardPressRequest.t(),
  keyword()
) ::
  {:ok, map()}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Press key Press a key with optional modifiers

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • keyboard_press_request (KeyboardPressRequest): Key press request
  • opts (keyword): Optional parameters

Returns

  • {:ok, map()} on success
  • {:error, Tesla.Env.t} on failure

restart_process(connection, process_name, opts \\ [])

@spec restart_process(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, ExDaytona.Model.ProcessRestartResponse.t()} | {:error, Tesla.Env.t()}

Restart specific process Restart a specific computer use process

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • process_name (String.t): Process name to restart
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.ProcessRestartResponse.t} on success
  • {:error, Tesla.Env.t} on failure

scroll(connection, mouse_scroll_request, opts \\ [])

Scroll mouse wheel Scroll the mouse wheel at the specified coordinates

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • mouse_scroll_request (MouseScrollRequest): Mouse scroll request
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.ScrollResponse.t} on success
  • {:error, Tesla.Env.t} on failure

set_accessibility_node_value(connection, accessibility_set_value_request, opts \\ [])

@spec set_accessibility_node_value(
  Tesla.Env.client(),
  ExDaytona.Model.AccessibilitySetValueRequest.t(),
  keyword()
) ::
  {:ok, map()}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Set the value of an accessibility node Write the given value to the node via EditableText.SetTextContents or, for numeric controls, Value.CurrentValue.

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • accessibility_set_value_request (AccessibilitySetValueRequest): Set value request
  • opts (keyword): Optional parameters

Returns

  • {:ok, map()} on success
  • {:error, Tesla.Env.t} on failure

start_computer_use(connection, opts \\ [])

@spec start_computer_use(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ComputerUseStartResponse.t()} | {:error, Tesla.Env.t()}

Start computer use processes Start all computer use processes and return their status

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.ComputerUseStartResponse.t} on success
  • {:error, Tesla.Env.t} on failure

start_recording(connection, opts \\ [])

@spec start_recording(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.Recording.t()}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Start a new recording Start a new screen recording session

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :body (StartRecordingRequest): Recording options

Returns

  • {:ok, ExDaytona.Model.Recording.t} on success
  • {:error, Tesla.Env.t} on failure

stop_computer_use(connection, opts \\ [])

@spec stop_computer_use(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ComputerUseStopResponse.t()} | {:error, Tesla.Env.t()}

Stop computer use processes Stop all computer use processes and return their status

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.ComputerUseStopResponse.t} on success
  • {:error, Tesla.Env.t} on failure

stop_recording(connection, stop_recording_request, opts \\ [])

Stop a recording Stop an active screen recording session

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • stop_recording_request (StopRecordingRequest): Recording ID to stop
  • opts (keyword): Optional parameters

Returns

  • {:ok, ExDaytona.Model.Recording.t} on success
  • {:error, Tesla.Env.t} on failure

take_compressed_region_screenshot(connection, x, y, width, height, opts \\ [])

@spec take_compressed_region_screenshot(
  Tesla.Env.client(),
  integer(),
  integer(),
  integer(),
  integer(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, ExDaytona.Model.ScreenshotResponse.t()}
  | {:error, Tesla.Env.t()}

Take a compressed region screenshot Take a compressed screenshot of a specific region of the screen

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • x (integer()): X coordinate of the region
  • y (integer()): Y coordinate of the region
  • width (integer()): Width of the region
  • height (integer()): Height of the region
  • opts (keyword): Optional parameters
    • :showCursor (boolean()): Whether to show cursor in screenshot
    • :format (String.t): Image format (png or jpeg)
    • :quality (integer()): JPEG quality (1-100)
    • :scale (number()): Scale factor (0.1-1.0)

Returns

  • {:ok, ExDaytona.Model.ScreenshotResponse.t} on success
  • {:error, Tesla.Env.t} on failure

take_compressed_screenshot(connection, opts \\ [])

@spec take_compressed_screenshot(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, ExDaytona.Model.ScreenshotResponse.t()}
  | {:error, Tesla.Env.t()}

Take a compressed screenshot Take a compressed screenshot of the entire screen

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :showCursor (boolean()): Whether to show cursor in screenshot
    • :format (String.t): Image format (png or jpeg)
    • :quality (integer()): JPEG quality (1-100)
    • :scale (number()): Scale factor (0.1-1.0)

Returns

  • {:ok, ExDaytona.Model.ScreenshotResponse.t} on success
  • {:error, Tesla.Env.t} on failure

take_region_screenshot(connection, x, y, width, height, opts \\ [])

@spec take_region_screenshot(
  Tesla.Env.client(),
  integer(),
  integer(),
  integer(),
  integer(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, ExDaytona.Model.ScreenshotResponse.t()}
  | {:error, Tesla.Env.t()}

Take a region screenshot Take a screenshot of a specific region of the screen

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • x (integer()): X coordinate of the region
  • y (integer()): Y coordinate of the region
  • width (integer()): Width of the region
  • height (integer()): Height of the region
  • opts (keyword): Optional parameters
    • :showCursor (boolean()): Whether to show cursor in screenshot

Returns

  • {:ok, ExDaytona.Model.ScreenshotResponse.t} on success
  • {:error, Tesla.Env.t} on failure

take_screenshot(connection, opts \\ [])

@spec take_screenshot(
  Tesla.Env.client(),
  keyword()
) ::
  {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:ok, ExDaytona.Model.ScreenshotResponse.t()}
  | {:error, Tesla.Env.t()}

Take a screenshot Take a screenshot of the entire screen

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :showCursor (boolean()): Whether to show cursor in screenshot

Returns

  • {:ok, ExDaytona.Model.ScreenshotResponse.t} on success
  • {:error, Tesla.Env.t} on failure

type_text(connection, keyboard_type_request, opts \\ [])

@spec type_text(
  Tesla.Env.client(),
  ExDaytona.Model.KeyboardTypeRequest.t(),
  keyword()
) ::
  {:ok, map()}
  | {:ok, ExDaytona.Model.ErrorResponse.t()}
  | {:error, Tesla.Env.t()}

Type text Type text with optional delay between keystrokes

Parameters

  • connection (ExDaytona.Connection): Connection to server
  • keyboard_type_request (KeyboardTypeRequest): Text typing request
  • opts (keyword): Optional parameters

Returns

  • {:ok, map()} on success
  • {:error, Tesla.Env.t} on failure