+
    lHàj  ã                   óæ   € R t ^ RIt^ RIHtHt ^ RIHtHt R#tRRRRRR	RR	/t	R$R
 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. //t]P                  ! RR]R  R!R"7       R# )%aÖ  Persistent element annotations in the Hermes desktop GUI's in-app browser.

Unlike ``drive_preview``'s self-retiring marks, an annotation outlines an element
(or, with ``hold``, the whole visible field) until removed. Annotations bind to
elements, not coordinates: they ride scrolls and vanish with their element, so
navigation clears them. Same ``preview.act`` bridge as ``drive_preview`` (the
renderer resolves refs and owns the overlay). ``desktop_ui`` toolset only.
N)ÚCallableÚOptional)ÚregistryÚ
tool_errorÚaddÚholdÚremoveÚclearÚpinÚunpinc                ó¸   € V ^8„  d   QhR\         R\        \         ,          R\        \         ,          R\        \         ,          R\        \        ,          R\         /# )é   ÚactionÚrefÚselectorÚlabelÚcallbackÚreturn)Ústrr   r   )Úformats   "Ú@/home/ubuntu/.hermes/hermes-agent/tools/annotate_preview_tool.pyÚ__annotate__r      sW   € ÷ Bñ BÜðBÜ&¤s�mðBÜ>FÄs½mðBä”C�=ðBä+3´HÕ+=ðBô 	ñBó    c                ó  € Vf   \        R4      # T ;'       g    RP                  4       P                  4       pV\        9  d#   \        RRP	                  \        4       R24      # VR9   d   V'       g   V'       g   \        V R24      # VR9  pR\
        V,          3R	V'       d   TMR3R
V'       d   TMR3RV33pV UU	u/ uF  w  r‰V	f   K  W‰bK  	  p
pp	 V! V
4      pT'       g   \        R4      #  \        P                  ! \        P                  ! T4      RR7      # u up	pi   \         d   p\        RT 24      u Rp?# Rp?ii ; i  \        \        3 d'    \        P                  ! R\        T4      /RR7      u # i ; i)z8Put one annotation up, take one down, or clear them all.Nz=annotate_preview is only available in the Hermes desktop app.r   zaction must be one of: z, Ú.zY needs a ref from drive_preview action='elements' (e.g. 'btn-sign-in') or a CSS selector.r   r   r   Útextz'Failed to annotate 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.F)Úensure_ascii)r   r   )r	   r   )r   ÚstripÚlowerÚACTIONSÚjoinÚWIREÚ	ExceptionÚjsonÚdumpsÚloadsÚ	TypeErrorÚ
ValueErrorr   )r   r   r   r   r   ÚverbÚtargetedÚfieldsÚnameÚvalÚpayloadÚrawÚexcs   &&&&&        r   Úannotate_preview_toolr0      s†  € ð
 ÒÜÐYÓZÐZØ�OˆO�e×"Ñ"Ó$×*Ñ*Ó,€DØ”7ÔÜÐ3°D·I±I¼gÓ4FÐ3GÀqÐIÓJÐJØÐ Ô ¯#·Ü˜T˜FÐ"{Ð|Ó}Ð}àÐ,Ñ,€HØœ˜d�Ð$ u·X©cÀ4Ð&HÈ:×ckÑW_ÐquÐJvÐyð  BGð  yHð  I€FÙ*0ÔD©&™Y˜T°CŒyˆtŠy©&€GÑDðKÙ�wÓˆ÷ Üð_ó`ð 	`ðBÜ�zŠzœ$Ÿ*š* S›/¸Ô>Ð>ùó Eøô ô KÜÐCÀCÀ5ÐIÓJÕJûðKûô ”zÐ"ô BÜ�zŠz˜6¤3 s£8Ð,¸5ÔAÒAðBús<   ÃD ÃD ÃD& Ã4+E Ä&E	Ä1EÄ>E	ÅE	Å4FÆFr+   Úannotate_previewÚdescriptionuñ  Highlight elements on the preview-pane page, lastingly (drive_preview's own marks fade; annotations stay until removed) â€” point at findings, flag what you're about to change, keep your place. Use the refs from drive_preview action='elements'. add: outline one element (optional short label â€” a word or two, drawn on the page). hold: freeze the whole visible field, every element outlined and named. remove/clear: take one/all down. Marks follow their element on scroll; navigation clears them.Ú
parametersÚtypeÚobjectÚ
propertiesr   ÚstringÚenumzDefaults to 'add'.r   z Ref from drive_preview elements.r   z"CSS selector fallback. Prefer ref.r   z"Optional caption, e.g. 'cheapest'.ÚrequiredÚ
desktop_uic           	      óº   € \        V P                  R R4      V P                  R4      V P                  R4      V P                  R4      VP                  R4      R7      # )r   r   r   r   r   r   )r   r   r   r   r   )r0   Úget)ÚargsÚkws   &,r   Ú<lambda>r?   ^   sG   € Ô4Ø�x‰x˜ %Ó(Ø�H‰H�U‹OØ—‘˜*Ó%Ø�h‰h�wÓØ—‘˜
Ó#õ r   u   ðŸ”–)r+   ÚtoolsetÚschemaÚhandlerÚemoji)r   r   r   r	   )r   NNNN)Ú__doc__r#   Útypingr   r   Útools.registryr   r   r   r!   r0   ÚlistÚANNOTATE_PREVIEW_SCHEMAÚregister© r   r   Ú<module>rK      sî   ðñó ß %ç /à
,€ð 	ˆu�f˜f h°¸À'ÐJ€÷Bð@ ÐØð	*ð Ø�ØØØ˜Ø™˜W›ØÐ3ðð
 Ø˜ØÐAðð Ø˜ØÐCðð Ø˜ØÐCðð
ð& 	�Bð+ð#Ð ðL 	× Ò Ø	ØØ"ñð ÷r   