+
    lHàjÜ  ã                   ó²   € R t ^ RIHtHt ^ RIHt ^ RIHtHt R R lt	RR R llt
R	R
RRRRRRRRRRR/RRRRR////t]P                  ! R
R]R RR7       R# )ar  Read the in-app terminal pane in the Hermes desktop GUI.

The buffer lives in the desktop renderer (xterm.js), so this round-trips through the
gateway's blocking-prompt bridge (as `clarify` does): tui_gateway emits
``terminal.read.request``, the renderer answers ``terminal.read.respond``. Lives in the
``desktop_ui`` toolset, enabled only for desktop-sourced sessions.
)ÚCallableÚOptional)Úpassthrough_json)ÚregistryÚ
tool_errorc                óR   € V ^8„  d   QhR\         \        ,          R\        R\        /# )é   ÚcallbackÚerrorsÚreturn)r   r   ÚtupleÚstr)Úformats   "Ú=/home/ubuntu/.hermes/hermes-agent/tools/read_terminal_tool.pyÚ__annotate__r      s&   € ÷ !ñ !œ¤Õ*ð !¼Eð !Äcñ !ó    c                óª  € V f   \        V^ ,          4      #  V UUUu/ uF!  w  r4qTf   K  V\        V\        V4      4      bK#  	  pppp T ! R/ TB pT'       g   \        T^,          4      # \        T4      # u upppi   \        \        3 d    \        T^,          4      u # i ; i  \
         d!   p\        T^,           T 24      u Rp?# Rp?ii ; i)zßShared body of the read_terminal / read_preview / read_window bridges. ``window`` is
``((key, value, floor), ...)`` (None omitted, else int-coerced and floored); ``errors`` =
(not_desktop, not_integers, fail_prefix, empty).N© )r   ÚmaxÚintÚ	TypeErrorÚ
ValueErrorÚ	Exceptionr   )	r	   Úwindowr
   ÚkeyÚvalÚfloorÚkwargsÚrawÚexcs	   &&&      r   Ú	read_paner       sÌ   € ð ÒÜ˜& �)Ó$Ð$ð%ÙCIÕ]Á6±°¸%Ô+�#”s˜5¤# c£(Ó+Ò+Á6ˆÒ]ð/ÙÑ ˜Ñ ˆ÷ Ü˜& �)Ó$Ð$Ü˜CÓ Ð ùô ^øÜ”zÐ"ô %Ü˜& �)Ó$Ò$ð%ûô ô /Ü˜V A�Y˜K¨ uÐ-Ó.Õ.ûð/úsE   ˜A> žA7«A7ÁA> Á
B' Á7A> Á>#B$Â#B$Â'CÂ2CÃCÃCNc                óŠ   € V ^8„  d   QhR\         \        ,          R\         \        ,          R\         \        ,          R\        /# )r   Ú
start_lineÚcountr	   r   )r   r   r   r   )r   s   "r   r   r   #   s=   € ÷ ñ Üœ•ðä”C�=ðô ”xÕ ðô 	ñ	r   c                ó,   € \        VRV ^ 3RV^33R4      # )zIReturn the in-app terminal's contents (+ line metadata) as a JSON string.Ústartr#   )z:read_terminal is only available in the Hermes desktop app.z&start_line and count must be integers.zFailed to read terminal: u¬   No in-app terminal answered: nothing is open, or the bridge timed out. If the terminal pane IS open, the desktop app may be older than this backend â€” update it and retry.)r    ©r"   r#   r	   s   &&&r   Úread_terminal_toolr'   #   s.   € ô �X ¨*°aÐ 8¸7ÀEÈ1Ð:MÐNð Qó ð r   ÚnameÚread_terminalÚdescriptionzÏRead the in-app terminal pane beside this chat. No args = visible screen + total_lines; page scrollback with start_line (0 = oldest) + count. JSON: {total_lines, start, end, viewport_rows, cursor_row, text}.Ú
parametersÚtypeÚobjectÚ
propertiesr"   Úintegerz?0-indexed first line (0 = oldest). Omit for the visible screen.r#   zALines to read from start_line. Defaults to the visible row count.Ú
desktop_uic                 óx   € \        V P                  R 4      V P                  R4      VP                  R4      R7      # )r"   r#   r	   r&   )r'   Úget)ÚargsÚkws   &,r   Ú<lambda>r5   O   s-   € Ô1Ø—8‘8˜LÓ)°·±¸'Ó1BÈRÏVÉVÐT^ÓM_õ r   u   ðŸ–¥ï¸�)r(   ÚtoolsetÚschemaÚhandlerÚemoji)NNN)Ú__doc__Útypingr   r   Útools.desktop_uir   Útools.registryr   r   r    r'   ÚREAD_TERMINAL_SCHEMAÚregisterr   r   r   Ú<module>r@      s˜   ðñ÷ &å -ß /õ!÷&ð" ˆOØð	ð
 Ø�ØØØ˜	ØÐ`ðð Ø˜	ØÐbðð	
ððÐ ð0 	× Ò Ø	ØØñð ÷r   