Skip to content

feat: Linux AT-SPI cursorless automation with ydotool fallback [#29]#45

Open
richard-devbot wants to merge 2 commits intoCursorTouch:mainfrom
richard-devbot:richardson/phase2-linux-atapi
Open

feat: Linux AT-SPI cursorless automation with ydotool fallback [#29]#45
richard-devbot wants to merge 2 commits intoCursorTouch:mainfrom
richard-devbot:richardson/phase2-linux-atapi

Conversation

@richard-devbot
Copy link
Copy Markdown

Summary

Sub-component 1 of #29 (agent workspace isolation).

Adds LinuxATSPIAutomation for cursorless click/type on GNOME/GTK apps via the AT-SPI D-Bus accessibility API. Falls back to ydotool for Wayland input injection when AT-SPI element lookup fails.

  • AT-SPI primary path: traverse accessibility tree, invoke Action interface
  • ydotool fallback: shell-safe subprocess call for Wayland
  • Both dependencies optional — never crashes at import time
  • Optional dep group: pip install operator-use[linux-automation]

Related: #29

Richardson Gunde and others added 2 commits April 13, 2026 18:25
…ursorTouch#29]

Implements LinuxATSPIAutomation in operator_use/computer/linux/atapi.py:
- click(app_name, element_name): traverses AT-SPI tree, invokes Action interface;
  falls back to ydotool click when pyatspi unavailable or element not found
- type_text(app_name, element_name, text): sets text via EditableText/Value
  AT-SPI interfaces; falls back to ydotool type
- is_available(): returns True when pyatspi D-Bus session reachable or ydotool
  binary present; returns False on non-Linux platforms

All dependencies are optional — pyatspi import is wrapped in try/except,
module never hard-fails at import time. ydotool is a system tool documented
under the new [linux-automation] optional-dependency group in pyproject.toml.
27 tests added in tests/test_linux_atapi.py covering AT-SPI primary path,
ydotool fallback, is_available() variants, and cross-platform import guard.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant