+
    lHàj  ã            !       óD  € R t ^ RIHtHt ^ RIHt ^ RIHtHt R.t	R/t
R0tR1R R lltRR	R
RRRRRRRRR]! ]	4      R
R/RRRR
R/RRRR
R/RRRR
R/RRRR
R/RRRR
R/RRRR
R/R RR!R
R"/R#RRR]! ]
4      R
R$/R%RR!R
R&/R'RRR
R(//R)R.//t]P                  ! R	R*]R+ R,R-7       R# )2a3  Interact with the in-app browser / preview pane in the Hermes desktop GUI (click, type, scroll).

Elements are addressed by legible refs from ``action="elements"`` (``btn-sign-in``); a ref survives
re-renders and only a navigation retires it, so the renderer answers with a *delta* instead of
re-sending the inventory. Round-trips through the gateway's blocking-prompt bridge
(``preview.act.request`` / ``preview.act.respond``); this module is schema + a thin dispatcher over
the platform-injected callback. ``desktop_ui`` toolset: desktop-sourced sessions only.
)ÚCallableÚOptional)Úpassthrough_json)ÚregistryÚ
tool_errorÚtypeNc                ó¦  € V ^8„  d   QhR\         R\        \         ,          R\        \         ,          R\        \         ,          R\        \         ,          R\        \        ,          R\        \        ,          R\        \         ,          R	\        \        ,          R
\        \        ,          R\        \        ,          R\        \        ,          R\         /# )é   ÚactionÚrefÚselectorÚtextÚkeyÚsubmitÚamountÚtoÚlimitÚfullÚallow_shortcutÚcallbackÚreturn)Ústrr   ÚboolÚintr   )Úformats   "Ú=/home/ubuntu/.hermes/hermes-agent/tools/drive_preview_tool.pyÚ__annotate__r      s±   € ÷ %!ñ %!Üð%!Ü#¤C�=ð%!Ü;CÄC½=ð%!ÜW_Ô`cÕWdð%!ä	”#�ð%!ä'/´¥~ð%!äFNÌsÅmð%!ô 	”�ð%!ô &.¬c¥]ð%!ô BJÌ$Åð%!ô œT•Nð	%!ô
 ”xÕ ð%!ô
 -0ñ%!ó    c                ó€  € Vf   \        R4      # T ;'       g    RP                  4       P                  4       pV\        9  d#   \        RRP	                  \        4       R24      # V\
        9   d   V'       g   V'       g   \        V R24      # VR8X  d   Vf   \        R	4      # VR
8X  d   V'       g   \        R4      # Ve.   V\        9  d#   \        RRP	                  \        4       R24      #  RV3RV3RV3RV3RV3RV3RV	3RV3RV
3RVf   RM
\        V4      3RVf   RM
\        V4      33p T! T UUu/ uF  w  rïTf   K  YïbK  	  upp4      pT'       g   \        R4      # \        T4      #   \        \        3 d    \        R4      u # i ; iu uppi   \         d   p\        RT 24      u Rp?# Rp?ii ; i)zHDispatch one interaction to the desktop renderer and return its outcome.Nz:drive_preview is only available in the Hermes desktop app.Ú zaction must be one of: z, Ú.zK needs a ref from action='elements' (e.g. 'btn-sign-in') or a CSS selector.r   ztype needs the text to enter.Úpressz,press needs a key, e.g. 'Enter' or 'Escape'.zto must be one of: r
   r   r   r   r   r   r   r   r   r   Úmaxz amount and max must be integers.z%Failed to act on the in-app browser: uÖ   No GUI window answered with a page: no preview tab is open. Open a page with open_preview first. If the pane IS open, the desktop app may be older than this backend â€” its bridge-unavailable error names that case.)r   ÚstripÚlowerÚACTIONSÚjoinÚNEEDS_TARGETÚ	SCROLL_TOr   Ú	TypeErrorÚ
ValueErrorÚ	Exceptionr   )r
   r   r   r   r   r   r   r   r   r   r   r   ÚverbÚfieldsÚnameÚvalÚrawÚexcs   &&&&&&&&&&&&      r   Údrive_preview_toolr2      sÞ  € ð ÒÜÐVÓWÐWØ�LˆL�b×ÑÓ!×'Ñ'Ó)€DØ”7ÔÜÐ3°D·I±I¼gÓ4FÐ3GÀqÐIÓJÐJØŒ|Ô§S¯HÜ˜T˜FÐ"mÐnÓoÐoØˆv„~˜$š,ÜÐ9Ó:Ð:Øˆw„ŸsÜÐHÓIÐIØ	‚~˜"¤IÔ-ÜÐ/°·	±	¼)Ó0DÐ/EÀQÐGÓHÐHð>à�tÐ˜u c˜l¨Z¸Ð,BÀVÈTÀNÐUZÐ\_ÐT`Ø�vÐ ¨ °°r°
Ð=MÈ~Ð<^Ø˜vš~‘t´3°v³;Ð?À%ÐQVÒQ^ÉÔdgÐhmÓdnÐAoð
ˆðIÙ±6ÔM±6¡i d¸Sœ	˜š	±6ÒMÓNˆ÷ Üð_ó`ð 	`ô ˜CÓ Ð øô ”zÐ"ô >ÜÐ<Ó=Ò=ð>üó NøÜô IÜÐAÀ#ÀÐGÓHÕHûðIúsI   Ã0AE2 Ä2F Ä9F
ÅF
ÅF Å2FÆFÆF ÆF=Æ%F8Æ2F=Æ8F=r.   Údrive_previewÚdescriptionu½  Use the web page open in the desktop preview pane (the one `desktop_preview` opens): log in, fill forms, click through flows. ALWAYS start with action='elements' â€” it inventories clickable/typable things as refs ('btn-sign-in') with role/label/value; act by ref, not guessed selectors. Refs survive re-renders and only die on navigation (you'll be told they're stale â€” call elements again). After the first full inventory, actions answer with a DELTA: 'added' in full, 'changed' as ref + moved fields, 'removed'/'rebound' as ref lists ('rebound' needs nothing from you â€” the ref already follows the rebuilt element). Anything unmentioned is unchanged; do not re-read to check. Input is real (pointer travels, hover menus open). Actions: elements, click, hover (park the pointer â€” opens dropdowns before clicking in), type (submit=true also presses Enter), scroll, press, strobe (visual flourish only â€” one call runs a multi-second burst; never loop it), back/forward/reload. Moves draw live and fade; annotate_preview leaves a lasting mark. A printable press on body/html is refused unless allow_shortcut is true. Page text only: desktop_preview action=read. Separate automated browser: browser_* tools.Ú
parametersÚobjectÚ
propertiesr
   ÚstringÚenumzStart with 'elements'.r   z*Element ref from an earlier elements call.r   z"CSS selector fallback. Prefer ref.r   ztype: the text.r   Úbooleanz*type: press Enter + submit the form after.r   z1press: key name ('Enter', 'Escape', 'ArrowDown').r   z:press: allow a printable key on body/html. Off by default.r   Úintegerz4scroll: pixels (negative = up; default ~one screen).r   z#scroll: jump to top/bottom instead.r"   zelements: cap the inventory.r   z9elements: full re-read instead of a delta. Rarely needed.ÚrequiredÚ
desktop_uic                 óÈ   € \        RR V P                  R R4      RV P                  R4      RVP                  R4      /R Uu/ uF  q"V P                  V4      bK  	  upB # u upi )r
   r   r   r"   r   © )	r   r   r   r   r   r   r   r   r   )r2   Úget)ÚargsÚkwÚks   &, r   Ú<lambda>rD   “   sv   € Ô1ñ  Ø�x‰x˜ "Ó%ð Ø-1¯X©X°e«_ð ØGIÇvÁvÈjÓGYð ñ$bó cñ $b˜aˆd�h‰h�q‹kŠ>ñ $bñ cò ùòcs   Á Au   ðŸ–±ï¸�)r.   ÚtoolsetÚschemaÚhandlerÚemoji)
ÚelementsÚclickÚhoverr   Úscrollr!   ÚstrobeÚbackÚforwardÚreload)ÚtopÚbottom)rJ   rK   r   r!   )r   NNNNNNNNNNN)Ú__doc__Útypingr   r   Útools.desktop_uir   Útools.registryr   r   r%   r(   r'   r2   ÚlistÚACT_PREVIEW_SCHEMAÚregisterr?   r   r   Ú<module>rZ      s~  ðñ÷ &å -ß /à
j€Ø€	ð 3€÷%!ðR ˆOð
 ð	$ð( Ø�ØØØ˜Ø™˜W›ØÐ7ðð
 Ø˜ØÐKðð Ø˜ØÐCðð �V˜X }Ð6GÐHØØ˜	ØÐKðð Ø˜ØÐRðð Ø˜	ØÐ[ðð Ø˜	ØÐUðð Ø˜Ø™˜Y›ØÐDðð
 Ø˜	ØÐ=ðð Ø˜	ØÐZððQ,
ðZ 	�X�Jð_0ð7LÐ ð^ 	× Ò Ø	ØØñð
 ÷	r   