§
    Pòmjá  ã                  ó6   — d Z ddlmZ ddlmZmZmZmZmZmZ dS )uw  Computer use toolset â€” universal (any-model) macOS desktop control.

Architecture
------------
This toolset drives macOS apps through cua-driver's background computer-use
primitive (SkyLight private SPIs for focus-without-raise + pid-scoped event
posting). Unlike #4562's pyautogui backend, it does NOT steal the user's
cursor, keyboard focus, or Space â€” the agent and the user can co-work on the
same machine.

Unlike #4562's Anthropic-native `computer_20251124` tool, the schema here is
a plain OpenAI function-calling schema that every tool-capable model can
drive. Vision models get SOM (set-of-mark) captures â€” a screenshot with
numbered overlays on every interactable element plus the AX tree â€” so they
click by element index instead of pixel coordinates. Non-vision models can
drive via the AX tree alone.

Wiring
------
* `tool.py`       â€” registers the `computer_use` tool via tools.registry.
* `backend.py`    â€” abstract `ComputerUseBackend`; swappable implementation.
* `cua_backend.py`â€” default backend; speaks MCP over stdio to `cua-driver`.
* `schema.py`     â€” shared schema + docstring for the generic `computer_use`
                    tool. Model-agnostic.
* `capture.py`    â€” screenshot post-processing (PNG coercion, sizing, SOM
                    overlay if the backend did not).

The outer integration points (multimodal tool-result plumbing, screenshot
eviction in the Anthropic adapter, image-aware token estimation, the
COMPUTER_USE_GUIDANCE prompt block, approval hook, and the skill) live
alongside this package. See agent/anthropic_adapter.py and
agent/prompt_builder.py for the salvaged hunks from PR #4562.
é    )Úannotations)Úhandle_computer_useÚrelease_computer_use_sessionÚset_approval_callbackÚcheck_computer_use_requirementsÚget_computer_use_schemar   N)	Ú__doc__Ú
__future__r   Útools.computer_use.toolr   r   r   r   r   © ó    úA/home/thesage/.hermes/hermes-agent/tools/computer_use/__init__.pyú<module>r      s~   ðð ð  ðD #Ð "Ð "Ð "Ð "Ð "ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð r   