Skip to content

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

Open
richard-devbot wants to merge 4 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 4 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 19, 2026 21:38
…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.
- test_control_center.py: update import from operator_use.agent.tools.builtin
  (deleted in main) to operator_use.tools.control_center; add side-effect import
  of operator_use.agent.tools to resolve circular import; update all patch paths.
- test_computer_plugin.py: remove BEFORE_LLM_CALL assertions — 9f5d002 removed
  _state_hook registration from BEFORE_LLM_CALL by design (state captured inside
  computer_task loop, not on every main-agent LLM call).
- test_browser_plugin.py: same BEFORE_LLM_CALL removal; register_hooks now only
  stores the hooks reference without registering any handler.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@richard-devbot richard-devbot force-pushed the richardson/phase2-linux-atapi branch from 7b0fa34 to b218dba Compare April 19, 2026 16:18
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