Ë
    ãß²j5
  ã                   ó    — d Z ddlmZmZ ddlmZ ddlmZ ddee   defd„Z	d	d
di dœdœZ
 ej                  d	de
d„ d¬«       ddlZddiZd„ Zy)a3  Read which OS window sits directly underneath the Hermes desktop window.

The window list lives with the OS, so this round-trips through the gateway's
blocking-prompt bridge like `read_terminal`: ``window.read.request`` -> the renderer's
main process (native window enumeration) -> ``window.read.respond``.
é    )ÚCallableÚOptional©Ú	read_pane)ÚregistryNÚcallbackÚreturnc                 ó   — t        | dd«      S )z@Return the window underneath the Hermes window as a JSON string.© )z>read_window_below is only available in the Hermes desktop app.Ú z!Failed to read the window below: z€Could not determine the window underneath (the desktop app did not answer, or window enumeration is unavailable on this system).r   ©r   s    ú;/home/ubuntu/.hermes/hermes-agent/tools/read_window_tool.pyÚread_window_below_toolr      s   € ä�X˜rð $ó ð ó    Úread_window_belowu|  Identify the app window directly behind the Hermes desktop window (what the user is working in). JSON: {window: {app, title, bounds, id}, frontmost, platform}. title may be empty when the OS withholds it (noted in `note`); where windows cannot be enumerated at all, {error, platform} says what would fix it â€” relay that instead of retrying. Metadata only; never captures pixels.Úobject)ÚtypeÚ
properties)ÚnameÚdescriptionÚ
parametersÚ
desktop_uic                 ó8   — t        |j                  d«      ¬«      S )Nr   r   )r   Úget)ÚargsÚkws     r   ú<lambda>r   .   s   € Ô5¸r¿v¹vÀjÓ?QÔR€ r   u   ðŸªŸ)r   ÚtoolsetÚschemaÚhandlerÚemojiÚ
tool_error)ztools.registryr"   c                 óÌ   — t         j                  | «      }|€t        dt        ›d| ›�«      ‚dd l}ddlm}  |t        | g|¢­Ž  t        |j                  |d   «      |d   «      S )Nzmodule z has no attribute r   )Ú	warn_onceé   )	Ú_PLUGIN_COMPAT_LAZYr   ÚAttributeErrorÚ__name__Ú	importlibÚhermes_cli.plugin_compatr$   ÚgetattrÚimport_module)r   Útargetr)   r$   s       r   Ú__getattr__r.   ?   se   € Ü ×$Ñ$ TÓ*€FØ€~Ü˜w¤x lÐ2DÀTÀHÐMÓNÐNÛÝ2ÙŒh˜Ð&˜vÓ&Ü�9×*Ñ*¨6°!©9Ó5°v¸a±yÓAÐAr   )N)Ú__doc__Útypingr   r   Útools.read_terminal_toolr   Útools.registryr   Ústrr   ÚREAD_WINDOW_BELOW_SCHEMAÚregisterÚjsonr&   r.   r   r   r   ú<module>r7      s‡   ðñ÷ &å .Ý #ñ X¨hÑ%7ð À3ó ð  ð	:ð ¨ññÐ ð  €× Ñ Ø	ØØ#ÙRØ
õó ð Ð2ðÐ ó
Br   