+
    lHàjÞë  ã                   ó^  a € R4 t60 t R t^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
Ht ^ RIHtHtHt ^ RIHt ^ RIHt ^ RIHtHtHt R5tRRRRR	R/R
 R llt]P6                  ! 4       t]! 4       t] ^ k RtR R lt R R lt!R R lt"R R lt#Rt$]PJ                  ! R4      t&R R lt'R R lt(]PJ                  ! R4      t)R R lt*R R lt+]PJ                  ! R 4      t,R! R" lt-R# R$ lt.R% R& lt/]PJ                  ! R'4      t0R(R)R*R+/t1R6R, R- llt2R. R/ lt3R0 R1 lt4 ! R2 R34      t5R# )7z“Content/file search tier for ``tools.file_operations``.

``ShellFileOperations`` inherits ``SearchMixin``; module-level helpers are pure
(no I/O).
N)ÚPath)ÚAnyÚListÚOptional)ÚSEARCH_PRUNE_DIR_NAMES)Ú	interrupt)ÚExecuteResultÚSearchMatchÚSearchResultÚcwdÚhomeÚplatformc                ó¬   € V ^8„  d   QhR\         R\        \         ,          R\        \         ,          R\        \         ,          R\        \         ,          /# )é   Úpathr   r   r   Úreturn)Ústrr   Úlist)Úformats   "ÚA/home/ubuntu/.hermes/hermes-agent/tools/file_operations_search.pyÚ__annotate__r      sF   € ÷ ñ Ü
ðÜ¤•}ðÜ3;¼Cµ=ðÜS[Ô\_ÕS`ðä	Œ#…Yñó    c          
     ó  € T;'       g    \         P                  R8w  d   . # \        V 4      P                  4       pVP	                  4       '       g0   \        T;'       g    \
        P                  ! 4       4      V,          p\        \
        P                  P                  \        V4      4      4      p\        \
        P                  P                  \        \        T;'       g    \        P                  ! 4       4      P                  4       4      4      4      p. p\         FN  p WW,          P                  V4      pTP                  '       g   K/  TP                  TP!                  4       4       KP  	  V#   \         d     Kb  i ; i)zýProtected home dirs (relative to ``path``) below a broad macOS search root.

Only an ANCESTOR search (``$HOME``, ``/Users``) gets exclusions, so recursive
tools never trigger unattended TCC prompts; a search rooted inside a
protected dir stays allowed.
Údarwin)Úsysr   r   Ú
expanduserÚis_absoluteÚosÚgetcwdr   Únormpathr   r   Ú_MACOS_TCC_PROTECTED_HOME_DIRSÚrelative_toÚ
ValueErrorÚpartsÚappendÚas_posix)	r   r   r   r   ÚrootÚ	home_pathÚ
exclusionsÚdirnameÚrelatives	   &$$$     r   Ú"_macos_protected_search_exclusionsr+      s  € ð 	× Ð ”C—L‘L XÔ-Øˆ	Ü�‹:× Ñ Ó"€DØ×Ñ×ÒÜ�C×&Ð&œ2Ÿ9š9›;Ó'¨$Õ.ˆÜ”—‘× Ñ ¤ T£Ó+Ó,€DÜ”R—W‘W×%Ñ%¤c¬$¨t×/BÐ/B´t·y²y³{Ó*C×*NÑ*NÓ*PÓ&QÓRÓS€IØ€Jß1ˆð	Ø!Õ+×8Ñ8¸Ó>ˆHð �>�>Š>Ø×Ñ˜h×/Ñ/Ó1Ö2ñ 2ð Ðøô	 ô 	Úð	ús   Ä"E2Å2FÆ Fçš™™™™™©?c                óH   € V ^8„  d   QhR\         R\        R\        R\        /# )r   Úenvr&   Úfallback_cwdr   )r   r   )r   s   "r   r   r   =   s)   € ÷ $ñ $¬#ð $´Sð $Ìð $ÔPSñ $r   c                ó`  € ^ RI HpHpHp \	        V RR4      ;'       g    Tp\        W4      '       d¶   V'       d   V! V4      pV! V4      p\        P                  P                  V4      '       g    \        P                  P                  Wa4      p\        P                  P                  \        P                  P                  \        P                  P                  V4      4      4      # \        P                  ! V4      '       g   \        P                  ! Wa4      p\        P                  ! V4      # )zFNormalize a filename-walk root without resolving remote paths locally.©ÚLocalEnvironmentÚ_IS_WINDOWSÚ_msys_to_windows_pathr   N)Útools.environments.localr2   r3   r4   ÚgetattrÚ
isinstancer   r   ÚisabsÚjoinÚnormcaseÚabspathr   Ú	posixpath)r.   r&   r/   r2   r3   r4   r   s   &&&    r   Ú _normalized_filename_search_rootr=   =   sÄ   € ç]Ñ]ä
�#�u˜dÓ
#×
3Ð
3 |€CÜ�#×(Ò(ßÙ(¨Ó.ˆDÙ'¨Ó,ˆCÜ�w‰w�}‰}˜T×"Ò"Ü—7‘7—<‘< Ó*ˆDÜ�w‰w×Ñ¤§¡§¡´·±×0@Ñ0@ÀÓ0FÓ GÓHÐHÜ�?Š?˜4× Ò Ü�~Š~˜cÓ(ˆÜ×Ò˜dÓ#Ð#r   c                ó¤   € V ^8„  d   QhR\         R\        \        ,          R\        R\        \        \        \        \        3,          R3,          /# )r   r.   Úrootsr/   r   .)r   r   r   Útuple)r   s   "r   r   r   N   sH   € ÷ ñ ¤Cð ´´Sµ	ð Ìð ÔQVÔW\Ô]`ÔbeÔgjÐ]jÕWkÐmpÐWpÕQqñ r   c                ó¬   € \        V 4      p\        \        V Uu0 uF&  pVP                  VP                  \        WV4      3kK(  	  up4      4      # u upi )z:Unique backend/root admission keys in deterministic order.)Útyper@   ÚsortedÚ
__module__Ú__qualname__r=   )r.   r?   r/   Úenv_typer&   s   &&&  r   Ú_filename_search_root_keysrG   N   s\   € ä�C‹y€HÜ”áóáˆDð 
×	Ñ	˜h×3Ñ3Ô5UÐVYÐamÓ5nÓoÙñó ó ð ùò s   š,Ac                óv   € V ^8„  d   QhR\         \         \        \        \        3,          R3,          R\        /# )r   Úkeys.r   )r@   r   Úbool)r   s   "r   r   r   V   s3   € ÷ iñ i¬¬u´S¼#¼s°]Õ/CÀSÐ/HÕ)Ið iÌdñ ir   c                ó   a € \         ;_uu_ 4        \        ;QJ d    R S  4       F  '       g   K   RM	  RM! R S  4       4      '       dh   \        P                  ! 4       '       d    RRR4       R# \         P	                  \
        4       \        P                  ! 4       '       g   K–   RRR4       R# \        P                  ! 4       '       d    RRR4       R# \        P                  ! V 3R l4      uuRRR4       #   + '       g   i     R# ; i)zCAtomically claim every key, polling for thread-scoped interruption.c              3   ó2   "  € T F  q\         9   x € K  	  R # 5i©N)Ú_ACTIVE_FILENAME_SEARCH_ROOTS)Ú.0Úkeys   & r   Ú	<genexpr>Ú1_acquire_filename_search_roots.<locals>.<genexpr>Y   s   é € ÐGÁ$¸3Ô6Ö6Ã$ùs   ‚TFNc                  ó.   <€ \         P                  S 4      # rM   )rN   Úupdate©rI   s   €r   Ú<lambda>Ú0_acquire_filename_search_roots.<locals>.<lambda>a   s   ø€ Ô=Z×=aÑ=aÐbfÔ=gr   )Ú_FILENAME_SEARCH_ADMISSIONÚanyÚtool_interruptÚis_interruptedÚwaitÚ_FILENAME_SEARCH_WAIT_SECONDSÚrun_if_not_interruptedrU   s   fr   Ú_acquire_filename_search_rootsr_   V   s«   ø€ ç	#Ö	#ß‹cÑGÁ$ÓG�c�cŠcÑGÁ$ÓG×GÒGÜ×,Ò,×.Ò.Ø÷ 
$Ñ	#ô '×+Ñ+Ô,IÔJÜ×,Ò,×.Ô.Ø÷ 
$Ñ	#ô ×(Ò(×*Ò*Ø÷ 
$Ñ	#ô ×4Ò4Ô5gÓh÷ 
$×	#×	#Ó	#ús?   �C<œC<°C<ÁC<Á&C<Á11C<Â'C<Â2C<ÃC<ÃC<Ã<D	c                ón   € V ^8„  d   QhR\         \         \        \        \        3,          R3,          RR/# )r   rI   .r   N)r@   r   )r   s   "r   r   r   d   s/   € ÷ 0ñ 0¬¬u´S¼#¼s°]Õ/CÀSÐ/HÕ)Ið 0Èdñ 0r   c                ó®   € \         ;_uu_ 4        \        P                  V 4       \         P                  4        RRR4       R#   + '       g   i     R# ; i)zARelease a completed walk and leave no idle per-root state behind.N)rX   rN   Údifference_updateÚ
notify_allrU   s   &r   Ú_release_filename_search_rootsrd   d   s1   € ç	#Ö	#Ü%×7Ñ7¸Ô=Ü"×-Ñ-Ô/÷ 
$×	#×	#Ò	#ús   �*AÁA	ziFile search was interrupted while waiting for another filename search on the same root. Retry when ready.z'\n?\[Command timed out after \d+s\]\s*$c                óh   € V ^8„  d   QhR\         R\        \        \        \        ,          3,          /# )r   Úresultr   )r   r@   r   r   )r   s   "r   r   r   r   s(   € ÷ ñ ¤]ð ´u¼SÄ(Ì3Å-Ð=OÕ7Pñ r   c                ó„   € V P                   ^|8X  d#   \        P                  RV P                  4      R3# V P                  R3# )zIReturn stdout cleaned for parsing and a limit reason for search timeouts.Ú Úsearch_timeoutN)Ú	exit_codeÚ_SEARCH_TIMEOUT_MARKER_REÚsubÚstdout)rf   s   &r   Ú_search_stdout_and_limitrn   r   s<   € à×Ñ˜3ÔÜ(×,Ñ,¨R°·±Ó?ÐAQÐQÐQØ�=‰=˜$ÐÐr   c                ó:   € V ^8„  d   QhR\         \        ,          /# ©r   r   )r   r   )r   s   "r   r   r   y   s   € ÷ 	_ñ 	_”Xœc•]ñ 	_r   c                 óú   € ^ RI p  V P                  R4      pTe   TP
                  MRpTe2   TP                  4       '       d   \        T4      P                  RR4      # R#   \        \        \        3 d     R# i ; i)zKHermes's pinned ripgrep, forward-slashed for the shell transports, or None.NÚripgrepÚ\Ú/)	ÚpmÚinstalled_packageÚOSErrorÚRuntimeErrorr"   ÚbinaryÚis_filer   Úreplace)ru   Ú	installedry   s      r   Ú_bundled_rgr}   y   sw   € ãðØ×(Ñ(¨Ó3ˆ	ð "+Ò!6ˆY×Ò¸D€FØ-3Ò-?ÀFÇNÁN×DTÒDTŒ3ˆv‹;×Ñ˜t SÓ)Ð^ÐZ^Ð^øô ”\¤:Ð.ô Úðús   †A  Á A:Á9A:z0^([A-Za-z]:)?[^\s:][^\n]*?[:\-]\d|^[^\s:][^\s]*$c                óR   € V ^8„  d   QhR\         R\        \         \         3,          /# )r   Úoutputr   )r   r@   )r   s   "r   r   r   ‹   s"   € ÷ 6ñ 6¤Cð 6¬E´#´s°(­Oñ 6r   c                óª  € . p. pV P                  R4       F™  pVP                  4       '       g   K  VP                  4       P                  R4      '       d   VP	                  V4       KS  VR8X  g   \
        P                  V4      '       d   VP	                  V4       Kˆ  VP	                  V4       K›  	  RP                  V4      RP                  V4      3# )u8  Separate rg/grep diagnostic lines from real match output â†’ ``(diagnostics, payload)``.
``_exec`` merges stderr into stdout; classifying by SHAPE lets the exit-2 guard
tell a pure failure (no payload) from a partial one (one unreadable file, others
matched) and guarantees error text is never parsed as a match.Ú
ú--)úrg: zgrep: )ÚsplitÚstripÚlstripÚ
startswithr$   Ú_SEARCH_OUTPUT_REÚmatchr9   )r   ÚdiagnosticsÚpayloadÚlines   &   r   Ú_split_tool_diagnosticsr�   ‹   s¦   € ð
  €KØ€GØ—‘˜TÖ"ˆØ�z‰z�|Š|Ùà�;‰;‹=×#Ñ#Ð$6×7Ò7Ø×Ñ˜tÖ$Ø�TŒ\Ô.×4Ñ4°T×:Ò:Ø�N‰N˜4Ö à×Ñ˜tÖ$ñ #ð �9‰9�[Ó! 4§9¡9¨WÓ#5Ð5Ð5r   c                ój   € V ^8„  d   QhR\         R\        \         \        \         3,          R,          /# )r   rŒ   r   N)r   r@   Úint)r   s   "r   r   r   Ÿ   s.   € ÷ Iñ I¤Sð I¬U´3¼¼S°=Õ-AÀDÕ-Hñ Ir   c                ó  € V '       d   V R8X  d   R# Rp\         P                  ! RV 4       F  pTpK  	  Ve   VP                  4       ^ 8X  d   R# V RVP                  4        \        VP	                  ^4      4      WP                  4       R 3# )uÒ   Parse a ``path-line-content`` context line using the RIGHTMOST numeric
separator (filenames may contain ``-<digits>-`` segments):
``dir/file-12-name.py-8-context`` â†’ (``dir/file-12-name.py``, 8, ``context``).r‚   Nz-(\d+)-)ÚreÚfinditerÚstartr�   ÚgroupÚend)rŒ   r‰   Ú	candidates   &  r   Ú_parse_search_context_liner—   Ÿ   sv   € ÷ �4˜4”<ÙØ€EÜ—[’[ ¨TÖ2ˆ	ØŠñ 3à‚}˜Ÿ™›¨Ô*ÙØ��—‘“Ð¤ U§[¡[°£^Ó!4°d¿9¹9»;¸<Ð6HÐHÐHr   z(?<!\\)(?:\\\\)*\\nc                ó0   € V ^8„  d   QhR\         R\        /# )r   Úpatternr   ©r   rJ   )r   s   "r   r   r   °   s   € ÷ Mñ M¬ð M´ñ Mr   c                óX   € RV 9   ;'       g    \        \        P                  V 4      4      # )z±True when a content regex wants to match a newline: a literal newline or a
``\n`` escape with an ODD number of backslashes (``\\n`` is a literal
backslash+n and must not count).r�   )rJ   Ú_REGEX_NEWLINE_ESCAPE_REÚsearch)r™   s   &r   Ú_pattern_has_regex_newlinerž   °   s'   € ð �7‰?×LÐLœdÔ#;×#BÑ#BÀ7Ó#KÓLÐLr   c                óF   € V ^8„  d   QhR\         \        ,          R\        /# )r   Úerrorr   )r   r   rJ   )r   s   "r   r   r   ·   s"   € ÷ `ñ `¬8´C­=ð `¼Tñ `r   c                óL   € \        V 4      ;'       d    RV 9   ;'       d    RV 9   # )z@Return True for rg's hard error when multiline mode is required.zliteral "\n" is not allowedú--multiline)rJ   ©r    s   &r   Ú_is_line_oriented_newline_errorr¤   ·   s(   € ä�‹;×_Ð_Ð;¸uÑD×_Ð_ÈÐZ_ÑI_Ð_r   c                ó<   € V ^8„  d   QhR\         R\        R\         /# )r   rf   r™   r   )r
   r   )r   s   "r   r   r   ¼   s"   € ÷ ñ ´lð ÌSð ÔUañ r   c                óÈ   € V P                   ^ 8w  g   \        V4      '       g   V # V P                  '       d   \        V P                  4      '       g   V # RV n        RV n        V # )zHAttach a newline-regex warning only when search found no usable results.Na  0 results found. Note: search_files content search is line-oriented and does not run ripgrep with -U/--multiline, so `\n` in the regex does not match line breaks. Use context=N to inspect neighboring lines, or escape as `\\n` when searching for a literal backslash+n.)Útotal_countrž   r    r¤   Úwarning)rf   r™   s   &&r   Ú)_maybe_warn_line_oriented_newline_patternr©   ¼   sX   € à×Ñ˜QÔÔ&@À×&IÒ&IØˆØ‡|‡|€|Ô;¸F¿L¹L×IÒIØˆØ€F„Lð	Pð „Nð
 €Mr   z^([A-Za-z]:)?(.*?):(\d+):(.*)$Ú
files_onlyz-lÚcountz-cc                óv   € V ^8„  d   QhR\         R\        R\        R\        R\        \         ,          R\        /# )r   Úoutput_modeÚlimitÚoffsetÚcontextr¨   r   )r   r�   r   r
   )r   s   "r   r   r   Ó   s=   € ÷ /ñ /¬cð /¼#ð /Äsð /Ü"%ð/Ü08¼µð/ÜIUñ/r   c                óz  € \        V 4      w  rg\        V4      w  r‰V P                  ^8X  dc   V	P                  4       '       gM   VP                  4       ;'       g%    V P                  P                  4       ;'       g    Rp
\        RV
 2^ R7      # V	P                  4       P                  R4       Uu. uF  q»'       g   K  VNK  	  ppVR8X  d*   \        WÃW2,            \        V4      \        V4      WuR7      # VR8X  dg   / pV F/  pRV9   g   K  VP                  R^4      w  pp \        V4      Wß&   K1  	  \        V\        VP                  4       4      \        V4      VR	7      # . pV Fü  pVR
8X  d   K  \        P                  V4      pV'       d}   TP!                  \#        VP%                  ^4      ;'       g    RVP%                  ^4      ,           \        VP%                  ^4      4      VP%                  ^4      R,          R7      4       K¥  V^ 8”  g   K®  \'        V4      pV'       g   KÃ  VP!                  \#        V^ ,          V^,          V^,          R,          R7      4       Kþ  	  \        V4      p\        VW3V,            TVW2,           8„  ;'       g    \        V4      WuR7      # u upi   \         d     EK¹  i ; i)u9  Parse rg/grep ``| head`` output into a SearchResult (shared by both engines).
Exit codes: 0=matches, 1=none, 2=error â€” but both tools return 2 on PARTIAL
errors (one unreadable file), so an error is surfaced only when exit==2 AND no
usable payload remains. ``warning`` is attached to files_only/content results.zSearch errorzSearch failed: ©r    r§   r�   rª   )Úfilesr§   Ú	truncatedÚlimit_reasonr¨   r«   Ú:)Úcountsr§   r´   rµ   r‚   rh   :Niô  N)r   Úline_numberÚcontent)Úmatchesr§   r´   rµ   r¨   )rn   r�   rj   r…   rm   r
   r„   ÚlenrJ   Úrsplitr�   r"   ÚsumÚvaluesÚ_MATCH_LINE_REr‰   r$   r	   r”   r—   )rf   r­   r®   r¯   r°   r¨   rm   rµ   rŠ   r‹   Ú	error_msgÚlnÚlinesr·   rŒ   r   Únrº   ÚmÚparsedÚtotals   &&&&&&               r   Ú_parse_search_outputrÇ   Ó   sb  € ô 4°FÓ;Ñ€FÜ2°6Ó:Ñ€KØ×Ñ˜1Ô W§]¡]§_¢_Ø×%Ñ%Ó'×RÐR¨6¯=©=×+>Ñ+>Ó+@×RÐRÀNˆ	Ü O°I°;Ð"?ÈQÔOÐOØ!Ÿ-™-›/×/Ñ/°Ô5Ó<Ñ5�B»�RˆRÑ5€EÐ<Ø�lÔ"ÜØ˜v�~Ð.¼CÀ»JÜ˜<Ó(°|ôVð 	Vð �gÔØˆÛˆDØ�dŽ{ØŸ+™+ c¨1Ó-‘��aðÜ#& q£6�F“Lñ	 ô Ø¤s¨6¯=©=«?Ó';Ü˜<Ó(°|ôEð 	Eð €GÛˆØ�4Œ<ÙÜ× Ñ  Ó&ˆßØ�N‰Nœ;Ø—g‘g˜a“j×&Ð& B¨!¯'©'°!«*Õ4Ä#ÀaÇgÁgÈaÃjÃ/Ð[\×[bÑ[bÐcdÓ[eÐfjÕ[kôô ñ à�QŽ;Ü/°Ó5ˆFß‰vØ—‘œ{°°qµ	ÀvÈaÅyÐZ`ÐabÕZcÐdhÕZiÔjÖkñ ô �‹L€EÜØ˜¨�~Ð.¸EØ˜&�.Ñ(×>Ð>¬D°Ó,>È\ôð ùòC =øô "ô Ûðús   Â/	J%Â=J%Ä"J*Ê*J:Ê9J:c                óF   € V ^8„  d   QhR\         \        ,          R\        /# ©r   r?   r   )r   r   rJ   )r   s   "r   r   r     s"   € ÷ Wñ WœœS�	ð W¤dñ Wr   c                ó    € \         P                  R8H  ;'       d5    \        ;QJ d    R V  4       F  '       d   K   R# 	  R# ! R V  4       4      # )zFDarwin-only: every root is POSIX-shaped (no drive letter / backslash).r   c              3   ót   "  € T F.  p\         P                  ! R V4      '       * ;'       d    RV9  x € K0  	  R# 5i)ú^[A-Za-z]:[\\/]rs   N)r‘   r‰   ©rO   r&   s   & r   rQ   Ú_posix_roots.<locals>.<genexpr>  s4   é € ð ,WÙPUÈŒB�HŠHÐ'¨Ó.Ô.×CÐC°4¸tÑ3CÔCÓPUùs   ‚'8ª8FT)r   r   Úall)r?   s   &r   Ú_posix_rootsrÐ     s\   € ä�<‰<˜8Ñ#÷ Wð W¯«ñ ,WÙPUó,W¯¬ð Wªð W¨ñ ,WÙPUó,Wó )Wð Wr   c                ó\   € V ^8„  d   QhR\         \        ,          R\         \        ,          /# rÉ   ©r   r   )r   s   "r   r   r     s&   € ÷ Dñ D¬$¬s­)ð D¼¼S½	ñ Dr   c                ó\   € V  Uu. uF  p\         P                  ! RRV4      NK  	  up# u upi )u  Escape each search root for find's ``-path`` test, which matches its PATTERN
(glob) against the path find echoes â€” the operand verbatim. The operand reaches
the shell already single-quoted; ``-path`` must compare literally, so ``*?[]``
in a root's own name need escaping (a directory literally named ``a[1]`` must
be excluded by identity, not treated as a character class). Backslashes are
left alone: find does not read them as escapes inside a bracket-free pattern,
and doubling them would break matching on backslash-shaped roots.z
([*?\[\]])z\\\1)r‘   rl   )r?   r&   s   & r   Ú_find_literal_path_expressionsrÔ     s*   € ñ >CÓC¹U°TŒB�FŠF�= '¨4Ö0¹UÑCÐCùÒCs   …!)c                   óÐ  a € ] tR tRt o RtV 3R lR lt]P                  ! R4      tV 3R lR lt	RLV 3R	 lR
 llt
RRRRRR/V 3R lR lltV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR lt]V 3R lR l4       t]V 3R lR l4       tV 3R lR ltV 3R  lR! ltV 3R" lR# ltV 3R$ lR% ltRMV 3R& lR' lltV 3R( lR) ltRMV 3R* lR+ lltV 3R, lR- ltRNtV 3R. lR/ ltV 3R0 lR1 ltV 3R2 lR3 ltV 3R4 lR5 ltV 3R6 lR7 lt V 3R8 lR9 lt!RMV 3R: lR; llt"ROV 3R= lR> llt#V 3R? lR@ lt$RPV 3RA lRB llt%RQV 3RC lRD llt&RQV 3RE lRF llt'V 3RG lRH lt(V 3RI lRJ lt)RKt*V t+R<# )RÚSearchMixini  a  File-name and content search via rg with find/grep fallbacks. Requires
``_exec``, ``_has_command``, ``_expand_path``, ``_escape_shell_arg``,
``_escape_native_tool_arg``, ``env``, ``cwd``, ``_command_cache``,
``_rg_resolution_cache`` and ``_rg_modified_capability`` from the host class.c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# )r   Úcmdr   ©r   r   )r   Ú__classdict__s   "€r   r   ÚSearchMixin.__annotate__  s   ø€ ÷ )ñ )¡Cð )©H±S­Mñ )r   c           	     óx  € VR8w  d   V P                  V4      '       d   V# R# V P                  P                  V4      pV'       d   V# ^ RIHpHp \        V P                  V4      '       d   \        4       MRpV'       d   WPP                  V&   V# V P                  R4      pVP                  ^ 8X  di   VP                  P                  4       '       dI   VP                  P                  4       P                  4       ^ ,          pVR8X  d   RpWpP                  V&   V# V'       Ed˜   \        V P                  V4      '       Ed{   \        P                  P                  R4      ;'       g    \!        \"        P$                  ! 4       4      p\        P                  P                  R4      p	\        P                  P                  R4      ;'       g!    \        P&                  P)                  VR	4      p
\        P&                  P)                  VR
RR4      \        P&                  P)                  V
RR4      .pV	'       d3   VP+                  \        P&                  P)                  V	RRRR4      4       V FL  p\        P&                  P-                  V4      '       g   K*  VP/                  RR4      pWpP                  V&   Vu # 	  R# )a  Resolve an executable in the command host's namespace. Ordinary commands
keep the bool hit/miss cache; rg alone caches successful resolved paths and
re-probes misses so a mid-session install becomes visible (with off-PATH
Windows candidates: cargo, scoop, winget).ÚrgN)r2   r3   zcommand -v rg 2>/dev/nullÚyesÚUSERPROFILEÚLOCALAPPDATAÚSCOOPÚscoopz.cargoÚbinzrg.exeÚshimsÚ	MicrosoftÚWinGetÚLinksrs   rt   )Ú_has_commandÚ_rg_resolution_cacheÚgetr5   r2   r3   r7   r.   r}   Ú_execrj   rm   r…   Ú
splitlinesr   Úenvironr   r   r   r   r9   r$   Úisfiler{   )ÚselfrØ   Úcachedr2   r3   Úbundledrf   ÚresolvedÚuser_profileÚlocal_app_datarâ   Ú
candidatesr–   s   &&           r   Ú_resolve_commandÚSearchMixin._resolve_command  s   € ð
 �$Œ;Ø×+Ñ+¨C×0Ò0�3Ð:°dÐ:Ø×*Ñ*×.Ñ.¨sÓ3ˆßØˆMßJô $.¨d¯h©hÐ8H×#IÒ#I”+”-ÈtˆßØ-4×%Ñ% cÑ*ØˆNØ—‘Ð7Ó8ˆØ×Ñ˜qÔ  V§]¡]×%8Ñ%8×%:Ò%:Ø—}‘}×*Ñ*Ó,×7Ñ7Ó9¸!Õ<ˆHØ˜5Ô Ø�Ø-5×%Ñ% cÑ*ØˆOçˆ;œ: d§h¡hÐ0@×AÓAÜŸ:™:Ÿ>™>¨-Ó8×LÐL¼CÄÇ	Â	ÃÓ<LˆLÜŸZ™ZŸ^™^¨NÓ;ˆNÜ—J‘J—N‘N 7Ó+×RÐR¬r¯w©w¯|©|¸LÈ'Ó/RˆEä—‘—‘˜\¨8°U¸HÓEÜ—‘—‘˜U G¨XÓ6ðˆJ÷ Ø×!Ñ!¤"§'¡'§,¡,¨~¸{ÈHÐV]Ð_gÓ"hÔiÛ'�	Ü—7‘7—>‘> )×,Ô,Ø(×0Ñ0°°sÓ;�HØ5=×-Ñ-¨cÑ2Ø#’Oñ	 (ñ
 r   a  (?m)^ripgrep\s+((?:0|[1-9]\d*))\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-(?:(?:0|[1-9]\d*)|(?:[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*))(?:\.(?:(?:0|[1-9]\d*)|(?:[0-9A-Za-z-]*[A-Za-z-][0-9A-Za-z-]*)))*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\s+\(rev [^)]+\))?\s*$c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# ©r   Ú
executabler   rÙ   )r   rÚ   s   "€r   r   rÛ   R  s   ø€ ÷ ñ ¹ð ÁÉÅñ r   c                óŠ  € WP                   9   d   V P                   V,          # V P                  V P                  V4       R2^
R7      pV P                  P	                  VP
                  ;'       g    R4      pVP                  ^ 8X  d+   V'       d#   \        VP                  ^4      4      ^8¼  d   RpMRpW@P                   V&   V# )zHCached actionable error unless rg can sort exactly (full SemVer, >= 14).z
 --version©Útimeoutrh   NzeExact modification-time order requires ripgrep 14 or newer; upgrade ripgrep or use order='discovery'.)	Ú_rg_modified_capabilityrë   Ú_quote_executableÚ_RG_VERSION_REr�   rm   rj   r�   r”   )rï   rú   rf   r‰   r    s   &&   r   Ú_modified_rg_capability_errorÚ)SearchMixin._modified_rg_capability_errorR  s«   € à×5Ñ5Ô5Ø×/Ñ/°
Õ;Ð;Ø—‘˜t×5Ñ5°jÓAÐBÀ*ÐMÐWY�ÓZˆØ×#Ñ#×*Ñ*¨6¯=©=×+>Ð+>¸BÓ?ˆØ×Ñ˜qÔ §U¬s°5·;±;¸q³>Ó/BÀbÔ/HØ‰EðAˆEà38×$Ñ$ ZÑ0Øˆr   Fc          
      óH   <€ V ^8„  d   QhRS[ S[,          RS[RS[RS[RS[/# )r   ÚargvÚfetch_limitrý   Úmerge_stderrr   ©r   r   r�   rJ   r   )r   rÚ   s   "€r   r   rÛ   b  s=   ø€ ÷ =bñ =b¡4©¥9ð =b¹3ð =bÉð =bÙ%)ð=bÙ6Cñ=br   c           
     óŽ  aaaa€ ^ RI HpHp \        V P                  RR4      ;'       g    V P
                  p\        P                  ! RP                  V4      4      p \        P                  ! Y‡V! V P                  P                  4      \        P                  \        P                  V'       d   \        P                  M\        P                  RR7      o. o\         P"                  ! 4       oR	 TTTT3R
 llp
\         P$                  ! T
RR7      pTP'                  4        \(        P*                  ! 4       T,           pRp TP                  R4       TP-                  4       '       d   SP/                  4       '       d   M=\0        P2                  ! 4       '       d   ^‚pM\(        P*                  ! 4       T8”  g   Ky  ^|p SP5                  4       f	   T! S4       SP7                  4        TP                  4        SP8                  P;                  4        RP                  S4      P=                  RRR7      pT^|8X  d   \        TRT R2,           ^|R7      # T^‚8X  d   \        TR,           ^‚R7      # \        TSP/                  4       '       d   ^ R7      # SP>                  R7      #   \         d   p	\        RT	 2^R7      u Rp	?	# Rp	?	ii ; i)u±  Run ``argv`` (shell-quoted rg words) natively and stop reading after
``fetch_limit`` lines â€” the ``| head -n`` of the shell pipeline without the
two bash spawns. ``shlex.split`` undoes the escaping the builders apply for
the shell path, so both transports see identical arguments. Exit code and
stdout follow the shell contract (rg 0/1/2; 124 on timeout with partial
output; 130 on interrupt), so ``_parse_search_output`` is shared. Once the
bound is reached rg is killed like ``head`` closing the pipe would.
``merge_stderr`` mirrors the shell path's stderr handling: merged for content
search (diagnostics feed the error message), discarded (``2>/dev/null``) for
file lists and probes.)Ú_kill_process_group_posixÚ_make_run_envr   NÚ T)r   r.   Ústdinrm   ÚstderrÚstart_new_sessionrƒ   )rm   rj   c                ó   € V ^8„  d   QhRR/# )r   r   N© )r   s   "r   r   Ú0SearchMixin._run_rg_native.<locals>.__annotate__~  s   € ÷ 	ñ 	˜ñ 	r   c                  ó–   <€ SP                    F7  p SP                  V 4       \        S4      S8¼  g   K&  SP                  4         R # 	  R # rM   )rm   r$   r»   Úset)ÚrawÚboundedr  rÂ   Úprocs    €€€€r   Ú_drainÚ*SearchMixin._run_rg_native.<locals>._drain~  s5   ø€ Ø—{”{�Ø—‘˜SÔ!Ü�u“: Ö,Ø—K‘K”MÚó	 #r   )ÚtargetÚdaemonr,   r   zutf-8r{   )Úerrorsz
[Command timed out after zs]z
[Command interrupted]) r5   r	  r
  r6   r.   r   Úshlexr„   r9   Ú
subprocessÚPopenÚDEVNULLÚPIPEÚSTDOUTrw   r   Ú	threadingÚEventÚThreadr“   ÚtimeÚ	monotonicÚis_aliveÚis_setrZ   r[   Úpollr\   rm   ÚcloseÚdecodeÚ
returncode)rï   r  r  rý   r  r	  r
  r   ÚargsÚexcr  ÚdrainerÚdeadlinerj   rm   r  rÂ   r  s   &&f&&          @@@r   Ú_run_rg_nativeÚSearchMixin._run_rg_nativeb  s  û€ ÷ 	VÜ�d—h‘h  tÓ,×8Ð8°·±ˆÜ�{Š{˜3Ÿ8™8 D›>Ó*ˆð	CÜ×#Ò#Ø¡=°·±·±Ó#>Äj×FXÑFXÜ!—‘ÇL¬z×/@Ò/@ÔV`×VhÑVhØ"&ô(ˆDð  ˆÜ—/’/Ó#ˆ÷	ó 	ô ×"Ò"¨&¸Ô>ˆØ�‰ŒÜ—>’>Ó# gÕ-ˆØ#'ˆ	ØØ�L‰L˜ÔØ×#Ñ#×%Ò%¨¯©×)9Ò)9ØÜ×,Ò,×.Ò.Ø�	ØÜ�~Š~Ó (Ö*Ø�	ØØ�9‰9‹;ÒÙ% dÔ+Ø�	‰	ŒØ�‰ŒØ�‰×ÑÔØ—‘˜%“×'Ñ'¨¸	Ð'ÓBˆØ˜ÔÜ ¨Ð3NÈwÈiÐWYÐ1ZÕ(ZÐfiÔjÐjØ˜ÔÜ ¨Ð1JÕ(JÐVYÔZÐZô  F¸7¿>¹>×;KÒ;K°aÔaÐaÐQU×Q`ÑQ`ÔaÐaøôS ô 	CÜ ¨$¨s¨e¨ÀÔBÕBûð	Cús   ÁA8J ÊKÊ*J?Ê9KÊ?Kr  Ú	native_okTÚshell_prefixrh   c                óT   <€ V ^8„  d   QhRS[ S[,          RS[RS[RS[RS[RS[RS[/# )r   Úwordsr  rý   r  r3  r4  r   r  )r   rÚ   s   "€r   r   rÛ   ¡  sO   ø€ ÷ 
oñ 
o¡T©#¥Yð 
o¹Sð 
oÉ3ð 
oÙ&*ð
oÙ?Cð
oá&)ð
oá3@ñ
or   c               óÒ   € V'       d*   V P                  4       '       d   V P                  WW4R7      # V'       d   RMRpV P                  V RP                  V4       V RV 2VR7      # )aA  Run an rg command (shell-quoted words) and keep the first ``fetch_limit``
       lines: natively on a local POSIX host, else through the backend shell as
       ``<prefix><words> | head -n N``. ``native_ok=False`` keeps a form the native
lane cannot express (the multi-root ``cd`` prefix); ``shell_prefix`` is shell-only.)r  rh   ú 2>/dev/nullr  z | head -n rü   )Ú_native_read_enabledr1  rë   r9   )rï   r6  r  rý   r  r3  r4  r  s   &&&&$$$ r   Ú_run_rg_boundedÚSearchMixin._run_rg_bounded¡  sd   € ÷ ˜×2Ñ2×4Ò4Ø×&Ñ& u¸7Ð&Ó^Ð^ß#‘¨ˆØ�z‰z˜\˜N¨3¯8©8°E«?Ð*;¸F¸8À;È{ÈmÐ\ÐfmˆzÓnÐnr   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# rù   ©r   )r   rÚ   s   "€r   r   rÛ   ­  s   ø€ ÷ >ñ >©Cð >±Cñ >r   c                óæ   € \         P                  ! RV4      '       d   V# ^ RIHp \	        V P
                  V4      '       d   V P                  V4      # RVP                  RR4      ,           R,           # )z>Quote an executable without leaking controller path semantics.z[A-Za-z0-9_.-]+)r2   Ú'z'"'"')r‘   Ú	fullmatchr5   r2   r7   r.   Ú_escape_native_tool_argr{   )rï   rú   r2   s   && r   rÿ   ÚSearchMixin._quote_executable­  s]   € ä�<Š<Ð*¨J×7Ò7ØÐÝ=ä�d—h‘hÐ 0×1Ò1Ø×/Ñ/°
Ó;Ð;Ø�Z×'Ñ'¨¨YÓ7Õ7¸#Õ=Ð=r   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# ©r   r   r   ©r   r   )r   rÚ   s   "€r   r   rÛ   ¹  s#   ø€ ÷ 
hñ 
h©Sð 
h±T¹#µYñ 
hr   c                óø   € \        V RR4      pVe   \        VRR4      RJ d   . # ^ RIHp \        V P                  RR4      ;'       g    V P                  p\        WVP                  \        P                  R7      # )	a  Protected descendants to prune for this search root, if any. Gated on
``env.is_local``: ``sys.platform``/``_HOME`` describe the CONTROLLER, but the
search runs on ``env``'s host. Envs without the flag default to local
semantics; pruning is a warning-carrying skip, never data loss.r.   NÚis_localTF©Úfile_operationsr   )r   r   r   )	r6   ÚtoolsrI  r.   r   r+   Ú_HOMEr   r   )rï   r   r.   Ú_for   s   &&   r   Ú_macos_search_exclusionsÚ$SearchMixin._macos_search_exclusions¹  sg   € ô
 �d˜E 4Ó(ˆØŠ?œw s¨J¸Ó=ÀÓFØˆIÝ0Ü�d—h‘h  tÓ,×8Ð8°·±ˆÜ1°$ÀcÇiÁiÔZ]×ZfÑZfÔgÐgr   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# rD  rE  )r   rÚ   s   "€r   r   rÛ   Å  s#   ø€ ÷ lñ l©3ð l±4¹µ9ñ lr   c           	     óÂ   € V P                  V4       Uu. uF?  p\        P                  P                  \        P                  P	                  W4      4      NKA  	  up# u upi )z=Absolute-ish protected paths for find's ``-path ... -prune``.)rM  r   r   r   r9   )rï   r   Úitems   && r   Ú_protected_prune_pathsÚ"SearchMixin._protected_prune_pathsÅ  sD   € àGK×GdÑGdÐeiÔGjÓkÑGj¸t”—‘× Ñ ¤§¡§¡¨dÓ!9Ö:ÑGjÑkÐkùÒks   ”AAc                ó`   <€ V ^8„  d   QhRS[ S[,          RS[ S[S[S[S[3,          ,          /# rÉ   )r   r   r@   )r   rÚ   s   "€r   r   rÛ   É  s3   ø€ ÷ ñ ¹¹S½	ð ÁdÉ5ÑQTÑVYÑ[^ÐQ^ÕK_ÕF`ñ r   c                ó  aa€ \        V P                  RR4      ;'       g    V P                  o\        V4      oR VV3R llpV Uu. uF
  q2! V4      NK  	  pp\	        V4      p\	        4       p. p\        W4       Fû  w  r8V P                  V4       Fá  p	S'       d-   \        P                  ! \        P                  ! W‰4      4      ;r«Mx\        P                  P                  \        P                  P                  W94      4      p
\        P                  P                  \        P                  P                  V
4      4      pWµ9   g   W¶9   d   K½  VP                  V4       VP                  W9V
34       Kã  	  Ký  	  V# u upi )ztUnique ``(root, relative, absolute)`` exclusions across ``roots``, never
pruning a root the caller chose explicitly.r   Nc                ó0   € V ^8„  d   QhR\         R\         /# )r   r&   r   r=  )r   s   "r   r   ÚDSearchMixin._effective_macos_search_exclusions.<locals>.__annotate__Ï  s   € ÷ 	Mñ 	MœSð 	M¤Sñ 	Mr   c                 ó`  <€ S'       dN   \         P                  ! \         P                  ! V 4      '       d   V 4      # \         P                  ! SV 4      4      # \        P
                  P                  \        P
                  P                  \        P
                  P                  V 4      4      4      # rM   )r<   r   r8   r9   r   r   r:   r;   )r&   r   Úuse_posix_pathss   &€€r   Ú
normalizedÚBSearchMixin._effective_macos_search_exclusions.<locals>.normalizedÏ  sk   ø€ ßÜ ×)Ò)´)·/²/À$×2GÒ2G¨$ÓgÐgÌYÏ^Ê^Ð\_ÐaeÓMfÓgÐgÜ—7‘7×#Ñ#¤B§G¡G§O¡O´B·G±G×4DÑ4DÀTÓ4JÓ$KÓLÐLr   )r6   r.   r   rÐ   r  ÚziprM  r<   r   r9   r   r   r:   r;   Úaddr$   )rï   r?   rZ  r&   Únormalized_rootsÚexplicit_rootsÚseenÚ	effectiveÚnormalized_rootr*   ÚabsoluterP   r   rY  s   &&          @@r   Ú"_effective_macos_search_exclusionsÚ.SearchMixin._effective_macos_search_exclusionsÉ  s1  ù€ ô �d—h‘h  tÓ,×8Ð8°·±ˆÜ& uÓ-ˆ÷	Mñ 	Mñ
 :?Ó?¹°˜J tÖ,¹ÐÐ?ÜÐ-Ó.ˆÜ‹uˆØˆ	Ü%(¨Ö%AÑ!ˆDØ ×9Ñ9¸$Ö?�ß"Ü%.×%7Ò%7¼	¿ºÀÓ8aÓ%bÐb�H˜sä!Ÿw™w×/Ñ/´·±·±¸TÓ0LÓM�HÜŸ'™'×*Ñ*¬2¯7©7¯?©?¸8Ó+DÓE�CØÔ(¨C¬KÙØ—‘˜”Ø× Ñ  $°(Ð!;Ö<ó @ñ &Bð Ðùò @s   ÁE<c                ó6   <€ V ^8„  d   QhRS[ S[,          RS[/# ©r   Úpathsr   rÒ   )r   rÚ   s   "€r   r   rÛ   æ  s   ø€ ÷ ?ñ ?©t±C­yð ?¹Sñ ?r   c                ó>   € R P                  R V  4       4      pRV R2# )ú, c              3   ó`   "  € T F$  p\         P                  P                  V4      x € K&  	  R # 5irM   )r   r   Úbasename)rO   rQ  s   & r   rQ   Ú>SearchMixin._macos_protected_search_warning.<locals>.<genexpr>ç  s"   é € ÐE¹u°tœBŸG™G×,Ñ,¨T×2Ð2»uùs   ‚,.z[Skipped macOS protected folders during broad search to avoid an unattended privacy prompt: z@. Search a protected folder directly when access is intentional.©r9   )rh  Úskippeds   & r   Ú_macos_protected_search_warningÚ+SearchMixin._macos_protected_search_warningå  s/   € à—)‘)ÑE¹uÓEÓEˆð1Ø18°	ð :>ð>ð 	?r   c                ó6   <€ V ^8„  d   QhRS[ S[,          RS[/# )r   Úq_rootsr   rÒ   )r   rÚ   s   "€r   r   rÛ   í  s#   ø€ ÷ @ñ @¡D©¥Ið @±#ñ @r   c                ó>   € RP                  R V  4       4      pRV R2# )u®   find clause pruning hidden dirs while keeping an explicitly selected dot-named root
(dir or single file) â€” find echoes each start point as given, so ``! -path`` matches it.rh   c              3   ó,   "  € T F
  pR V 2x € K  	  R# 5i©z	 ! -path Nr  rÍ   s   & r   rQ   Ú1SearchMixin._hidden_prune_expr.<locals>.<genexpr>ð  s   é € ÐD¹G°D˜y¨¨Õ/»Gùs   ‚z\( -type d -name '.*'ú
 \) -prunern  )rs  Ú
exemptionss   & r   Ú_hidden_prune_exprÚSearchMixin._hidden_prune_exprì  s'   € ð —W‘WÑD¹GÓDÓDˆ
Ø'¨
 |°;Ð?Ð?r   c                ó6   <€ V ^8„  d   QhRS[ S[,          RS[/# )r   Úprotected_pathsr   rÒ   )r   rÚ   s   "€r   r   rÛ   ó  s   ø€ ÷ )ñ )©4±­9ð )¹ñ )r   c                óF   a € RP                  V 3R lV 4       4      pRV R2# )zGfind ``\( -path A -o -path B \) -prune`` clause for the protected dirs.z -o c              3   óL   <"  € T F  pR SP                  V4       2x € K  	  R# 5i)z-path N©Ú_escape_shell_arg)rO   rQ  rï   s   & €r   rQ   Ú*SearchMixin._prune_expr.<locals>.<genexpr>õ  s&   øé € Ð`ÑP_È˜f T×%;Ñ%;¸DÓ%AÐ$BÕCÓP_ùó   ƒ!$z\( rx  rn  )rï   r}  Útermss   f& r   Ú_prune_exprÚSearchMixin._prune_expró  s'   ø€ à—‘Ô`ÑP_Ó`Ó`ˆØ�e�W˜KÐ(Ð(r   c                ó&   <€ V ^8„  d   QhRS[ RS[/# rD  rš   )r   rÚ   s   "€r   r   rÛ   ø  s   ø€ ÷ tñ t©3ð t±4ñ tr   c                ó<  € \        V P                  T;'       g    RV P                  4      p\        ;QJ d;    R VP	                  RR4      P                  R4       4       F  '       g   K   R# 	  R# ! R VP	                  RR4      P                  R4       4       4      # )zNTrue when the search root or any ancestor is dot-named (``~/.hermes/skills``).Ú.c              3   ó\   "  € T F"  qP                  R 4      ;'       d    VR9  x € K$  	  R# 5i)r‰  N)r‰  ú..©r‡   ©rO   Úparts   & r   rQ   Ú5SearchMixin._root_under_hidden_dir.<locals>.<genexpr>û  s)   é € ÐsÑPrÈ—?‘? 3Ó'×CÐC¨D¸Ñ,CÔCÓPrùs   ‚,ž,rs   rt   TF)r=   r.   r   rY   r{   r„   )rï   r   r&   s   && r   Ú_root_under_hidden_dirÚ"SearchMixin._root_under_hidden_dirø  s   € ä/°·±¸$¿+¸+À#ÀtÇxÁxÓPˆß‹sÑsÐPT×P\ÑP\Ð]aÐcfÓPg×PmÑPmÐnqÔPrÓs�sŒsÐsŠsÐsˆsÑsÐPT×P\ÑP\Ð]aÐcfÓPg×PmÑPmÐnqÔPrÓsÓsÐsr   c                ó6   <€ V ^8„  d   QhRS[ RS[S[ ,          /# rD  rE  )r   rÚ   s   "€r   r   rÛ   ý  s   ø€ ÷ ñ ©ð ±±Sµ	ñ r   c           	     ó†   € . pV P                  V4       F)  pVP                  RV P                  RV R24      .4       K+  	  V# )zE``--glob '!<dir>/**'`` pairs excluding protected dirs from an rg run.ú--globÚ!ú/**)rM  Úextendr�  )rï   r   ÚoutrQ  s   &&  r   Ú_rg_exclusion_globsÚSearchMixin._rg_exclusion_globsý  sE   € àˆØ×1Ñ1°$Ö7ˆDØ�J‰J˜ $×"8Ñ"8¸1¸T¸FÀ#¸Ó"GÐHÖIñ 8àˆ
r   c                ó&   <€ V ^8„  d   QhRS[ RS[/# rD  )r   r   )r   rÚ   s   "€r   r   rÛ     s   ø€ ÷ fñ f¡sð f©}ñ fr   c                óÆ  € V P                  4       '       d©   \        P                  P                  V4      '       d   TMH\        P                  P	                  \        V P                  RR4      ;'       g    V P                  V4      p\        \        P                  P                  V4      '       d   RR7      # RR7      # V P                  RV P                  V4       R24      # )z|Existence probe; stdout contains "exists" or "not_found" (or the probe's
``cwd_error`` when the exec wrapper itself failed).r   NÚexistsÚ	not_found)rm   ztest -e z! && echo exists || echo not_found)r9  r   r   r8   r9   r6   r.   r   r   r�  rë   r�  )rï   r   Úfulls   && r   Ú_path_exists_probeÚSearchMixin._path_exists_probe  s¤   € ð ×$Ñ$×&Ò&ÜŸ7™7Ÿ=™=¨×.Ò.‘4´B·G±G·L±LÄÈÏÉÐSXÐZ^ÓA_×AkÐAkÐcg×ckÑckÐmqÓ4rˆDÜ ´B·G±G·N±NÀ4×4HÒ4H¨ÔZÐZÈkÔZÐZØ�z‰z˜H T×%;Ñ%;¸DÓ%AÐ$BÐBcÐdÓeÐer   c                óf   <€ V ^8„  d   QhRS[ RS[ RS[ RS[S[ ,          RS[RS[RS[ RS[R	S[ R
S[/
# ©r   r™   r   r  Ú	file_globr®   r¯   r­   r°   Úorderr   ©r   r   r�   r
   )r   rÚ   s   "€r   r   rÛ     sj   ø€ ÷ cñ c©ð c±3ð cÁð cÙ$,©S¥MðcÙ:=ðcÙGJðcá&)ðcá47ðcá@CðcáVbñcr   c
           	     ó^   € VR 8X  d   V P                  WWVV	4      # V P                  WWEWgV4      # )r³   )Ú_search_filesÚ_search_content)
rï   r™   r   r  r¤  r®   r¯   r­   r°   r¥  s
   &&&&&&&&&&r   Ú_dispatch_searchÚSearchMixin._dispatch_search  s9   € ð �WÔØ×%Ñ% g°UÀEÓJÐJØ×#Ñ# G°9ÀVÐZaÓbÐbr   c                ó&   <€ V ^8„  d   QhRS[ RS[/# rD  )r   r
   )r   rÚ   s   "€r   r   rÛ     s   ø€ ÷ Hñ H©3ð H±<ñ Hr   c                ó  € \         P                  P                  V4      ;'       g    Rp\         P                  P                  V4      pRV 2.pV P	                  RV P                  V4       R24      pRVP                  9   Ed\   V'       EdS   V P	                  RV P                  V4       R24      pVP                  ^ 8X  Ed   VP                  P                  4       '       dý   VP                  4       pVP                  P                  4       P                  R4       Uu. uFƒ  pV'       g   K  WxP                  4       9   gD   VP                  4       V9   g/   VP                  4       P                  VR	,          4      '       g   Kd  \         P                  P                  W(4      NK…  	  p	pV	'       d/   VP                  R
RP                  V	R,          4      ,           4       \        RP                  V4      ^ R7      # u upi )zFError result for a missing search root, with nearby-entry suggestions.r‰  zPath not found: ztest -d z && echo yes || echo norÞ   zls -1 z 2>/dev/null | head -20r�   ºNé   NzSimilar paths: rj  ºNé   Nz. r²   )r   r   r)   rl  rë   r�  rm   rj   r…   Úlowerr„   r‡   r9   r$   r
   )
rï   r   ÚparentÚbasename_queryÚ
hint_partsÚparent_checkÚ	ls_resultÚlqÚerõ   s
   &&        r   Ú_path_not_found_resultÚ"SearchMixin._path_not_found_result  s�  € ä—‘—‘ Ó&×-Ð-¨#ˆÜŸ™×)Ñ)¨$Ó/ˆØ(¨¨Ð/Ð0ˆ
Ø—z‘z H¨T×-CÑ-CÀFÓ-KÐ,LÐLcÐ"dÓeˆØ�L×'Ñ'Õ'¯N¨NØŸ
™
 V¨D×,BÑ,BÀ6Ó,JÐ+KÐKbÐ#cÓdˆIØ×"Ñ" aÕ'¨I×,<Ñ,<×,BÑ,B×,DÒ,DØ#×)Ñ)Ó+�à5>×5EÑ5E×5KÑ5KÓ5M×5SÑ5SÐTXÔ5YócÙ5Y°Üô ,Ø §G¡G£Iœo°·±³¸b´ÀAÇGÁGÃI×DXÑDXÐY[Ð\^ÕY_×D`ô ,”B—G‘G—L‘L Ö+Ñ5Yð ð c÷ Ø×%Ñ%Ð&7¸$¿)¹)ÀJÈrÅNÓ:SÕ&SÔTÜ $§)¡)¨JÓ"7ÀQÔGÐGùòcs   Ä
G<Ä.AG<Æ#G<c                óv   <€ V ^8„  d   QhRS[ RS[ RS[ RS[S[ ,          RS[RS[RS[ RS[R	S[ R
S[S[,          /
# r£  r¦  )r   rÚ   s   "€r   r   rÛ   $  sh   ø€ ÷ 0ñ 0©cð 0¹ð 0Ácð 0Ù*2±3­-ð0Ù@Cð0ÙMPð0á,/ð0á:=ð0ñ '*ð0ñ =EÁ\Õ<Rñ0r   c
           
     ó  € RV9   dG   VP                  R4       U
u. uF*  qªP                  4       '       g   K  V
P                  4       NK,  	  pp
MVP                  4       p\        V4      ^8  d   R# . . rÜV FG  pV P                  V4      pRV P	                  V4      P
                  9   d   TMTP                  V4       KI  	  V'       g   R# VR8X  d   V P                  WWVV	4      pEM\        4       pV Få  pV P                  VVWEWgV4      pVP                  '       d   Vu # VP                  P                  VP                  4       VP                  P                  VP                  4       VP                  P                  VP                  4       V;P                   VP                   ,          un        VP"                  ;'       g    VP"                  Vn        Kç  	  VP                  RV Vn        VP                  RV Vn        R\        V4       R\        V4       R2pV'       dT   VRR	P%                  VR
,          4      ,           ,          p\        V4      ^8”  d   VR\        V4      ^,
           R2,          pV.pVP                  '       gQ   V P'                  V4       UUUu. uF	  w  pppVNK  	  ppppV'       d!   VP                  V P)                  V4      4       RP%                  V4      Vn        V# u up
i u upppi )a  Recover a not-found ``path`` that is really several paths in one string.
Commas explicitly delimit paths (internal spaces preserved); without commas
split on whitespace. Search every existing part, merge, and note skipped
parts. None when it doesn't look like a multi-path string.Ú,Nr�  r³   zpath contained z entries; searched z that existz; skipped missing: rj  r®  ú (+ú more)r  )r„   r…   r»   Ú_expand_pathr   rm   r$   r¨  r
   r©  r    rº   r—  r³   r·   rT   r§   r´   r9   rd  rp  r¨   )rï   r™   r   r  r¤  r®   r¯   r­   r°   r¥  rŽ  r#   ÚexistingÚmissingÚpÚexpandedÚmergedr&   rl   ÚnoteÚwarning_partsÚ_rÚ_relrc  r}  s   &&&&&&&&&&               r   Ú_try_multi_path_searchÚ"SearchMixin._try_multi_path_search$  sn  € ð �$Œ;Ø.2¯j©j¸¬oÓN©o dÇÁÇ”\�T—Z‘Z–\©oˆEÐNˆEà—J‘J“LˆEÜˆu‹:˜Œ>ÙØ �'ÛˆAØ×(Ñ(¨Ó+ˆHØ! T×%<Ñ%<¸XÓ%F×%MÑ%MÔM‰XÐSZ×bÑbÐckÖlñ ÷ ÙØ�WÔð ×'Ñ'¨¸5È%ÓPŠFä!“^ˆFÛ �Ø×*Ñ*¨7°D¸)ÈFÐahÓi�Ø—9—9�9Ø’JØ—‘×%Ñ% c§k¡kÔ2Ø—‘×#Ñ# C§I¡IÔ.Ø—‘×$Ñ$ S§Z¡ZÔ0Ø×"Ò" c§o¡oÕ5Õ"Ø#)×#3Ñ#3×#DÐ#D°s·}±}�Ö ñ !ð $Ÿ^™^¨F¨UÐ3ˆFŒNØ!Ÿ<™<¨¨Ð/ˆFŒLØ ¤ U£ Ð,?ÄÀHÃ¸ÈkÐZˆßØÐ)¨D¯I©I°g¸bµkÓ,BÕBÕBˆDÜ�7‹|˜aÔØ˜#œc '›l¨QÕ.Ð/¨vÐ6Õ6�Ø˜ˆØ�|�|ˆ|ØBF×BiÑBiÐjrÔBsÕtÑBsÑ,>¨B°°h›xÑBsˆOÒtßØ×$Ñ$ T×%IÑ%IÈ/Ó%ZÔ[ØŸ™ -Ó0ˆŒØˆùòO OùôF us   ›K6·K6Ê#K;c                ó    <€ V ^8„  d   QhRS[ /# rp   r=  )r   rÚ   s   "€r   r   rÛ   V  s   ø€ ÷ 	ñ 	©ñ 	r   c                ó¶   € . p\        \        4       F4  pR F+  pVP                  RV P                  RV V R24      34       K-  	  K6  	  RP	                  V4      # )uþ   rg globs pruning known heavyweight recursive subtrees. Both forms are
needed: globs are relative to each rg root, so ``**/name/**`` alone misses an
explicitly selected ``name/`` root. Names come from the shared scan policy â€”
no second search-only list.r”  r•  r–  r  )rh   ú**/)rC   r   r—  r�  r9   )rï   Úglobsr)   Úprefixs   &   r   Ú_search_prune_glob_argsÚ#SearchMixin._search_prune_glob_argsV  s]   € ð
 ˆÜÔ4Ö5ˆGÛ%�Ø—‘˜h¨×(>Ñ(>ÀÀ6À(È7È)ÐSVÐ?WÓ(XÐYÖZó &ñ 6ð �x‰x˜‹Ðr   c          	      óR   <€ V ^8„  d   QhRS[ RS[ RS[S[ ,          RS[S[ ,          /# )r   r™   r   r¤  r   rÙ   )r   rÚ   s   "€r   r   rÛ   n  s4   ø€ ÷  ñ  ©ð  ±Cð  ÁHÉSÅMð  ÑV^Ñ_bÕVcñ  r   c           
     óÞ  € V P                  R4      pV'       g   R# V P                  V4      p\        \        P                  ! RV4      4      pV'       d   RV P                  V4       2MRpV P                   EFq  w  r‰VR8X  d   V'       g   K  VP                  R4      '       d   V RV P                  4        2p
MTp
WXR	V
V P                  VR
R7      V P                  V4      .pV P                  V^2^R7      p^ . ríVP                  ;'       g    RP                  4       P                  4        FS  pVP                  R4      w  pppVP                  4       '       g   K0  V\!        V4      ,          pVP#                  V4       KU  	  V^ 8”  g   EK  \%        V4      ^,
          pRP'                  VR,          4      V^ 8”  d   RV R2MR,           pV	P)                  V\%        V4      VR7      u # 	  R# )zÖSteering hint for a 0-match content search, or None: a bare zero gives the
model nothing to act on, so run cheap count-only rg probes (case-insensitive,
hidden/ignored, fixed-string) and report the first that hits.rÝ   Nz[.\[\](){}?*+^$\\|]z --glob rh   ú-Fz--hiddenr  z--count-matchesF©Útranslate_pathrü   r¶   rj  r°  r¿  rÀ  )rÆ   rÃ   rh  )rö   rÿ   rJ   r‘   r�   r�  Ú_ZERO_MATCH_PROBESr‡   rÒ  rA  r:  rm   r…   rì   Ú
rpartitionÚisdigitr�   r$   r»   r9   r   )rï   r™   r   r¤  Úrg_executablerÝ   Úhas_metaÚ	glob_exprÚflagsÚtemplateÚglob_expr_probeÚprobe_wordsÚproberÆ   Úper_filerŒ   rÄ  Ú_seprÃ   Úextrarh  s   &&&&                 r   Ú_zero_match_probeÚSearchMixin._zero_match_proben  s½  € ð ×-Ñ-¨dÓ3ˆßÙØ×#Ñ# MÓ2ˆÜœŸ	š	Ð"8¸'ÓBÓCˆßFO�h˜t×5Ñ5°iÓ@ÐAÑBÐUWˆ	Ø#×6Õ6‰OˆEØ˜Œ}§XÙð ×Ñ 
×+Ò+Ø%. K¨q°×1MÑ1MÓ1OÐ0PÐ"Q‘à"+�ØÐ&7¸Ø×1Ñ1°'È%Ð1ÓPÐRV×RnÑRnÐosÓRtðvˆKà×(Ñ(¨°bÀ"Ð(ÓEˆEØ �8ØŸ™×+Ð+¨×2Ñ2Ó4×?Ñ?ÖA�Ø!Ÿ_™_¨SÓ1‘
��4˜Ø—9‘9—;”;ØœS ›V•O�EØ—O‘O AÖ&ñ	 Bð
 �q�yÜ˜H›¨Õ)�ØŸ	™	 (¨2¥,Ó/È%ÐRSÌ)°S¸¸¸vÑ3FÐY[Õ\�Ø—‘¨U´c¸(³mÈ5�ÓQÒQñ+  7ñ, r   c                ó&   <€ V ^8„  d   QhRS[ RS[/# rD  rš   )r   rÚ   s   "€r   r   rÛ   �  s   ø€ ÷ .ñ .±ð .¹ñ .r   c                ód  a a
a€ ^ RI HpHo
Ho \	        S P
                  V4      '       g   R# R V
VV 3R llp^ RIHp V! V4      pV! VP                  4      p\        P                  P                  V4      ^ ,          pV'       d   V\        P                  ,           M,\        P                  P                  \        P                  4      pV\        P                  P                  V4      8X  d   R#  \        P                  P                  WV.4      p	YV8H  ;'       g    Y•8H  #   \          d     R# i ; i)z�Whether a no-rg LOCAL root (filesystem root, $HOME or an ancestor of it) is
unsafe for recursive find. Controller paths never classify remotes.r1   Fc                ó0   € V ^8„  d   QhR\         R\         /# )r   Úvaluer   r=  )r   s   "r   r   Ú=SearchMixin._is_broad_local_search_root.<locals>.__annotate__˜  s   € ÷ 		=ñ 		=œcð 		=¤cñ 		=r   c                 ó˜  <€ S'       d   S! V 4      P                  R R4      p \        P                  P                  V 4      '       gJ   \        P                  P	                  \        SP                  RR4      ;'       g    SP                  V 4      p \        P                  P                  \        P                  P                  V 4      4      # )rs   rt   r   N)
r{   r   r   r8   r9   r6   r.   r   r:   Úrealpath)rì  r3   r4   rï   s   &€€€r   rZ  Ú;SearchMixin._is_broad_local_search_root.<locals>.normalized˜  s„   ø€ ßÙ-¨eÓ4×<Ñ<¸TÀ3ÓG�Ü—7‘7—=‘= ×'Ò'ÜŸ™Ÿ™¤W¨T¯X©X°u¸dÓ%C×%OÐ%OÀtÇxÁxÐQVÓW�ô
 —7‘7×#Ñ#¤B§G¡G×$4Ñ$4°UÓ$;Ó<Ð<r   rH  T)r5   r2   r3   r4   r7   r.   rJ  rI  rK  r   r   Ú
splitdriveÚsepr;   r:   Ú
commonpathr"   )rï   r   r2   rZ  rL  r&   r   ÚdriveÚanchorÚcommonr3   r4   s   f&        @@r   Ú_is_broad_local_search_rootÚ'SearchMixin._is_broad_local_search_root�  sà   ú€ ÷ 	bÑaä˜$Ÿ(™(Ð$4×5Ò5Ù÷		=ò 		=õ 	1Ù˜$ÓˆÙ˜#Ÿ)™)Ó$ˆÜ—‘×"Ñ" 4Ó(¨Õ+ˆß#(�œŸ™–¬b¯g©g¯o©o¼b¿f¹fÓ.EˆØ”2—7‘7×#Ñ# FÓ+Ô+Ùð	Ü—W‘W×'Ñ'¨¨Ó5ˆFð ‰|×-Ð-˜v™~Ð-øô ô 	Úð	ús   Ã0 D  Ä D/Ä.D/c                óL   <€ V ^8„  d   QhRS[ S[,          RS[RS[ S[,          /# ©r   rh  r&   r   )r   r   r   )r   rÚ   s   "€r   r   rÛ   °  s*   ø€ ÷ ñ ±±Sµ	ð Áð É$ÉsÍ)ñ r   c                óˆ  € VP                  4       p. pV Fƒ  p \        V4      P                  4       P                  V4      P                  p\
        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   Kr  VP                  V4       K…  	  V#   \         d    \        T4      P                  p Lui ; i)zFDrop hidden descendants while allowing an explicit hidden search root.c              3   ó\   "  € T F"  qR9  ;'       d    VP                  R 4      x € K$  	  R# 5i)r‰  N>   r‰  r‹  rŒ  r�  s   & r   rQ   Ú9SearchMixin._filter_hidden_descendants.<locals>.<genexpr>¹  s)   é € ÐZÑPYÈ˜{Ñ*×CÐC¨t¯©¸sÓ/CÔCÓPYùs   ‚*,TF)Úresolver   r!   r#   r"   rY   r$   )rï   rh  r&   rb  ÚfilteredÚ	item_pathÚ	rel_partss   &&&    r   Ú_filter_hidden_descendantsÚ&SearchMixin._filter_hidden_descendants°  sŸ   € àŸ,™,›.ˆØˆÛˆIð2Ü  ›O×3Ñ3Ó5×AÑAÀ/ÓR×XÑX�	÷ ‹sÑZÑPYÓZ�s�sŠsÑZÑPYÓZ×ZÒZÙØ�O‰O˜IÖ&ñ ð ˆøô ô 2Ü  ›O×1Ñ1’	ð2ús   ™2BÂ CÃ Cc                óL   <€ V ^8„  d   QhRS[ S[,          RS[RS[ S[,          /# rú  rÒ   )r   rÚ   s   "€r   r   rÛ   ¾  s/   ø€ ÷ Nñ N©d±3­ið N¹sð NÁtÉCÅyñ Nr   c                ó^  € V'       g   V# V P                  V4      pV P                  RV R2^
R7      pVP                  ^ 8w  d   V# V P                  RV R2^
RP                  V4      R7      p\	        VP
                  P                  4       4      pV Uu. uF  qwV9  g   K  VNK  	  up# u upi )z?Drop paths ignored by git when *root* is inside a git worktree.zgit -C z0 rev-parse --is-inside-work-tree >/dev/null 2>&1rü   z check-ignore --stdinr�   ©rý   Ú
stdin_data)r�  rë   rj   r9   r  rm   rì   )rï   rh  r&   Úescaped_rootrã  rf   Úignoredr   s   &&&     r   Ú_filter_gitignored_pathsÚ$SearchMixin._filter_gitignored_paths¾  s·   € çØˆLà×-Ñ-¨dÓ3ˆØ—
‘
Ø�l�^Ð#SÐTØð ó 
ˆð �?‰?˜aÔØˆLà—‘Ø�l�^Ð#8Ð9ØØ—y‘y Ó'ð ó 
ˆô
 �f—m‘m×.Ñ.Ó0Ó1ˆÙ+0ÓM©5˜iÀWÑ4L—	�	©5ÑMÐMùÒMs   ÂB*Â!B*c                óF   <€ V ^8„  d   QhRS[ S[,          RS[ S[,          /# rg  rÒ   )r   rÚ   s   "€r   r   rÛ   Ó  s#   ø€ ÷ 
ñ 
©$©s­)ð 
¹¹S½	ñ 
r   c                ó  € \        V4      ^8  d   V# RpV P                  V^<RP                  V4      R7      p. pVP                  P	                  4       R\        V4        F  p VP                  \        V4      4       K   	  VP                  R.\        V4      \        V4      ,
          ,          4       \        \        WA4      R RR7       UUu. uF  w  rgVNK	  	  upp#   \         d    TP                  R4        KŸ  i ; iu uppi )	z?Sort paths newest-first using metadata from the active backend.z¢while IFS= read -r item || [ -n "$item" ]; do mtime="$(stat -c%Y "$item" 2>/dev/null || stat -f%m "$item" 2>/dev/null || true)"; printf '%s\n' "${mtime:-0}"; doner�   r  Ng        c                 ó   € V ^ ,          # )é    r  )Úpairs   &r   rV   Ú2SearchMixin._sort_paths_by_mtime.<locals>.<lambda>í  s   € °T¸!¶Wr   T)rP   Úreverse)r»   rë   r9   rm   rì   r$   Úfloatr"   r—  rC   r\  )rï   rh  Úscriptrf   ÚmtimesrŒ   Ú_rQ  s   &&      r   Ú_sort_paths_by_mtimeÚ SearchMixin._sort_paths_by_mtimeÓ  sô   € äˆu‹:˜Œ>ØˆLðð 	ð —‘˜F¨B¸4¿9¹9ÀUÓ;K�ÓLˆàˆØ—M‘M×,Ñ,Ó.¨{´°E³
Ó;ˆDð#Ø—‘œe D›kÖ*ñ <ð 	�‰�s�eœs 5›z¬C°«KÕ7Õ8Ô9ô "Ü�FÓ"Ñ(<Àdõô
ñ‘�ó ñò
ð 	
øô ô #Ø—‘˜c×"ð#üó

s   Á$C ÃDÃ D Ã?D c                óh   <€ V ^8„  d   QhRS[ RS[ RS[RS[S[S[ ,          S[S[ ,          3,          /# )r   r™   r   r  r   )r   r�   r@   r   r   )r   rÚ   s   "€r   r   rÛ   ñ  sE   ø€ ÷ 3Kñ 3KÙð3KÙ"%ð3KÙ47ð3Ká	‰t‘C�y™(¡3�-Ð'Õ	(ñ3Kr   c                ó¸  € V^ 8:  g   V P                  R4      '       g   . R3# V P                  V4      pV P                  V4      pV.pV P                  V4      pRV RV RV R2pV P                  V^R7      p	\	        V	4      w  r«V
P                  4       '       g5   V'       g-   RV RV RV R2pV P                  V^R7      p	\	        V	4      w  r«. pV
P                  4       P                  R	4       F‡  pV'       g   K  VP                  R
^4      p\        V4      ^8X  dH   V^ ,          P                  RR4      P                  4       '       d   VP                  V^,          4       Kv  VP                  V4       K‰  	  V'       dD   V P                  V4      '       d   V P                  V\        V4      4      pV P                  WÒ4      pV P                  V4      RV V3# )uo  Return matching descendant directories using find, if available.

``rg --files`` and ``find -type f`` both enumerate files only, so
directories â€” especially empty ones â€” are invisible (#54347). rg stays
authoritative for which *files* survive ignore processing; this adds
the matching directory entries so the tool honours its documented
ls-replacement contract.
ÚfindNúfind -H z -mindepth 1 z -o -type d ! -name '.*' -name z* -printf '%T@ %p\n' 2>/dev/null | sort -rnrü   r8  r�   r  r‰  rh   )rè   r�  rz  rë   rn   r…   r„   r»   r{   rÛ  r$   r�  r  r   r
  r  )rï   r™   r   r  Úescaped_pathÚescaped_patternrs  Úhidden_prunerØ   rf   rm   rµ   Ú
cmd_simpleÚdirsrŒ   r#   s   &&&&            r   Ú_search_directories_with_findÚ)SearchMixin._search_directories_with_findñ  sÒ  € ð ˜!Ô 4×#4Ñ#4°V×#<Ò#<Ø�t�8ˆOà×-Ñ-¨dÓ3ˆØ×0Ñ0°Ó9ˆØ�.ˆØ×.Ñ.¨wÓ7ˆà�|�n M°,°ð @"Ø"1Ð!2ð 3%ð&ð 	ð
 —‘˜C¨�Ó,ˆÜ7¸Ó?Ñˆà�|‰|�~Š~§lð ˜<˜.¨°l°^ð D&Ø&5Ð%6°lðDð ð —Z‘Z 
°B�ZÓ7ˆFÜ#;¸FÓ#CÑ ˆFàˆØ—L‘L“N×(Ñ(¨Ö.ˆDßÙØ—J‘J˜s AÓ&ˆEÜ�5‹z˜QŒ 5¨¥8×#3Ñ#3°C¸Ó#<×#DÑ#D×#FÒ#FØ—‘˜E !�HÖ%à—‘˜DÖ!ñ /÷ ð ×*Ñ*¨4×0Ò0Ø×6Ñ6°t¼TÀ$»ZÓH�Ø×0Ñ0°Ó<ˆDØ×(Ñ(¨Ó.¨|°Ð<¸lÐJÐJr   c                ó^   <€ V ^8„  d   QhRS[ RS[ S[S[ ,          ,          RS[RS[RS[ RS[/# )r   r™   r   r®   r¯   r¥  r   )r   r   r�   r
   )r   rÚ   s   "€r   r   rÛ   &  sR   ø€ ÷ nhñ nh¡Sð nh±±d¹3µiµð nhÉð nhÑUXð nhÙ ðnhÙ3?ñnhr   c           
     ó
  a € VP                  R4      '       g
   RV9  d   TMVP                  R4      R ,          p\        V\        4      '       d   V.MTpV'       g   \	        RR7      # S P                  R4      '       d«   S P                  R4      ;'       g    RpVR8X  d&   S P                  V4      p	V	'       d   \	        V	R7      # \        S P                  VS P                  4      p
\        V
4      '       g   \	        \        R7      #  S P                  WbW4VVR7      \        V
4       # \        ;QJ d    V 3R lV 4       F  '       g   K   R	M	  R
M! V 3R lV 4       4      '       d   \	        RR7      # S P                  R4      '       g   \	        RR7      # V Uu. uF   q»P                  R4      '       d   RV 2MTNK"  	  ppV Uu. uF  pS P!                  V4      NK  	  ppRS P#                  V4       R2pS P%                  V4       UUUu. uF	  w  pppVNK  	  ppppV'       d   RS P'                  V4       R2MRpWC,           ^,           pRP)                  V 3R l\+        V4       4       4      pRRP)                  V4       V V RV RS P!                  V4       2pVR8X  d   RV,           RV 2,           pMRV,           RV 2,           p\        S P                  VS P                  4      p
\        V
4      '       g   \	        \        R7      #  S P-                  V^<R7      p\        V
4       \/        V4      w  pp. pVP1                  4        F‘  pVR8X  dm   VP                  R^4      p\3        V4      ^8w  g/   V^ ,          P5                  RR^4      P7                  4       '       g   K\  VP9                  V^,          4       Kv  V'       g   K€  VP9                  V4       K“  	  VP:                  ^�8H  ;'       d    \3        V4      V8¬  pVP:                  R!9  d(   V'       g    VR8X  d   \	        RR7      # \	        RR7      # ^ RIHpH p H!p! V '       d4   \        S P                  V4      '       d   V U"u. uF  p"V!! V"4      NK  	  pp"\	        VWDV,            \3        V4      \3        V4      WC,           8„  ;'       g    \E        V4      VR7      #   \        T
4       i ; iu upi u upi u upppi   \        T
4       i ; iu up"i )"zËSearch for files by name (glob-like) across one or more roots: rg --files,
else a bounded find. ``order``: "discovery" (fast, bounded) or "modified"
(exact global newest-first; needs rg 14+ or GNU find).rÏ  rt   z8File search requires at least one search root in 'path'.r£   rÝ   Úmodified©rÜ  c              3   óF   <"  € T F  pSP                  V4      x € K  	  R # 5irM   )r÷  ©rO   r&   rï   s   & €r   rQ   Ú,SearchMixin._search_files.<locals>.<genexpr>E  s   øé € ÐHÁ%¸$ˆt×/Ñ/°×5Ð5Ã%ùó   ƒ!TFz›Broad local file search without ripgrep is disabled because find cannot keep this traversal safely bounded. Install ripgrep or search a narrower directory.r  zƒFile search requires 'rg' (ripgrep) or 'find'. Install ripgrep for best results: https://github.com/BurntSushi/ripgrep#installationÚ-ú./r  z -orh   c              3   óL   <"  € T F  pR SP                  V4       2x € K  	  R# 5irv  r€  r)  s   & €r   rQ   r*  f  s+   øé € ð "
áB�ð ˜×.Ñ.¨tÓ4Ð5Õ6ÛBùrƒ  r  z \( -type f -o \( -type dz \) \) ! -name '.*' -name úset -o pipefail; z5 -printf '%T@ %p\n' 2>/dev/null | sort -rn | head -n z -print 2>/dev/null | head -n rü   r‰  zsExact modification-time order requires GNU find with -printf support; install ripgrep 14+ or use order='discovery'.z8File search failed while running bounded find traversal.r1   ©r³   r§   r´   rµ   éÿÿÿÿ>   r  é|   )#r‡   r„   r7   r   r
   rè   rö   r  rG   r.   r   r_   Ú_ADMISSION_INTERRUPTED_ERRORÚ_search_files_rgrd   rY   r�  rz  rd  r…  r9   rÔ   rë   rn   rì   r»   r{   rÛ  r$   rj   r5   r2   r3   r4   rJ   )#rï   r™   r   r®   r¯   r¥  Úsearch_patternr?   rÜ  Úcapability_errorrI   r&   Ú
find_rootsrs  r  rÉ  rÊ  rc  r}  Úprotected_pruner  Úroot_exemptionsÚbaserØ   rf   rm   rµ   Ú	raw_filesrŒ   r#   Úbounded_sigpiper2   r3   r4   Ú	file_paths#   f&&&&&                             r   r¨  ÚSearchMixin._search_files&  s¡  ø€ ð
 *1×);Ñ);¸E×)BÒ)BÀsÐRYÔGY™Ø—‘˜sÓ# BÕ'ð 	ä$ T¬3×/Ò/�‘°TˆßÜÐ&`ÔaÐað
 ×Ñ˜T×"Ò"Ø ×1Ñ1°$Ó7×?Ð?¸4ˆMØ˜
Ô"Ø#'×#EÑ#EÀmÓ#TÐ ß#Ü'Ð.>Ô?Ð?Ü-¨d¯h©h¸¸t¿x¹xÓHˆDÜ1°$×7Ò7Ü#Ô*FÔGÐGð5Ø×,Ñ,¨^À5ÐRWØ;Hð -ó Jô /¨tÕ4÷ ‹3ÔHÁ%ÓH�3�3Š3ÔHÁ%ÓH×HÒHÜð:ô<ð <ð × Ñ  ×(Ò(ÜðKôLð Lñ QVÓVÑPUÈ§_¡_°S×%9Ò%9˜˜4˜&‘k¸tÒCÑPUˆ
ÐVÙ<FÓG¹J°D�4×)Ñ)¨$Ö/¹JˆÐGØ˜4×2Ñ2°7Ó;Ð<¸CÐ@ˆØ>B×>eÑ>eÐfkÔ>lÕmÑ>lÑ(:¨¨D°(›8Ñ>lˆÒmßHW˜A˜d×.Ñ.¨Ó?Ð@ÀÑDÐ]_ˆØ•n qÕ(ˆð Ÿ'™'ô "
ä6°zÔBó"
ó 
ˆð ˜3Ÿ8™8 GÓ,Ð-¨oÐ->¸|¸nð M-Ø-<Ð,=ð >&Ø&*×&<Ñ&<¸^Ó&LÐ%MðOˆð �JÔØ%¨Õ,Ð1gÐhsÐgtÐ/uÕu‰Cà%¨Õ,Ð1OÐP[È}Ð/]Õ]ˆCä)¨$¯(©(°E¸4¿8¹8ÓDˆÜ-¨d×3Ò3ÜÔ&BÔCÐCð	1Ø—Z‘Z ¨R�ZÓ0ˆFä*¨4Ô0Ü7¸Ó?Ñˆ�ð
  "ˆ	Ø×%Ñ%Ö'ˆDØ˜
Ô"ØŸ
™
 3¨Ó*�Ü�u“: ”?¨%°­(×*:Ñ*:¸3ÀÀAÓ*F×*NÑ*N×*PÒ*PÙØ× Ñ   q¥Ö*ß‘Ø× Ñ  Ö&ñ (ð !×*Ñ*¨cÑ1×SÐS´c¸)³nÈÑ6SˆØ×Ñ 8Ô+·OØ˜
Ô"Ü#ðUôWð Wô  Ð&`ÔaÐaçaÑaßœ: d§h¡hÐ0@×AÒAÙKTÓUÉ9¸iÑ.¨yÖ9É9ˆIÐUÜØ˜F¨E¥>Ð2ÄÀIÃÜ˜)“n v¥~Ñ5×KÐK¼¸lÓ9KÐZfôhð 	høôc /¨tÕ4üò$ WùÚGùämøôD +¨4Õ0üò2 Vs0   Ä
S Æ&SÇ	S"ÈS'ÌS. Ñ4S>ÓSÓ.S;Nc                ót   <€ V ^8„  d   QhRS[ RS[ S[S[ ,          ,          RS[RS[RS[ RS[S[ ,          RS[/# )r   r™   r   r®   r¯   r¥  rÜ  r   )r   r   r�   r   r
   )r   rÚ   s   "€r   r   rÛ   –  s`   ø€ ÷ Lhñ Lh©ð Lh±3¹¹c½µ?ð LhÉ3ð LhÑX[ð LhÙ #ðLhÙBJÉ3Å-ðLhÙ[gñLhr   c                óÀ	  a € RV9  d   VP                  R4      '       g   RV 2MTp\        V\        4      '       d   V.MTpW4,           ^,           p	S P                  V4      p
RpTp\	        V4      ^8”  Ed   V
'       Ed   \        V4      '       Ed   \        S P                  RR4      ;'       g    S P                  pV Uu. uFK  p\        P                  ! \        P                  ! V4      '       d   TM\        P                  ! WÞ4      4      NKM  	  pp\        P                  ! V4      pV Uu. uF  p\        P                  ! Wë4      NK  	  ppV
 UUUu. uF4  w  pppRS P                  R\        P                  ! VV4       R24       2NK6  	  ppppM/V
 UUUu. uF  w  pppRS P                  RV R24       2NK!  	  ppppRP                  \         P#                  V4      4      pV'       d   RV 2MR	pT;'       g    S P%                  R
4      pV'       g   \'        RR7      # VR8X  d&   S P)                  V4      pV'       d   \'        VR7      # S P+                  V4      pVR8X  d   RMR	pRP                  V 3R lV 4       4      pV'       d   RS P                  V4       R2MR	pV RV RS P                  V4       V RV 2pS P-                  V.V	^<V'       * RV 2R7      p\/        V4      w  pp VP1                  4        U!u. uF  p!V!'       g   K  V!NK  	  p"p!V'       dY   V" U!u. uFL  p!\        P                  ! V!4      '       d   T!M*\        P                  ! \        P                  ! VV!4      4      NKN  	  p"p!VP2                  ^�8H  ;'       d    \	        V"4      V	8¬  p#VP2                  R9  d(   V#'       g    VR8X  d   \'        RR7      # \'        RR7      # V R8w  d•   \        V\        4      '       d   S P5                  R4      '       dh   S P7                  WrV	4      w  p$p%V$'       dK   \9        V"4      p&S P;                  T"V$ U'u. uF  p'V'V&9  g   K  V'NK  	  up',           4      p(T(p"T ;'       g    T%p \'        V"WDV,            \	        V"4      \	        V"4      WC,           8„  ;'       g    \=        V 4      V R7      # u upi u upi u upppi u upppi u up!i u up!i u up'i )zÌFile-name search via ``rg --files`` (respects .gitignore, skips hidden dirs,
parallel walk). Discovery order stays bounded and fast; exact modification-time
ordering is explicit because it scans globally.rt   Ú*Nr   z--glob r•  r–  r  rh   rÝ   z"File search requires ripgrep (rg).r£   r&  z --sortr=modifiedc              3   óF   <"  € T F  pSP                  V4      x € K  	  R # 5irM   )rA  r)  s   & €r   rQ   Ú/SearchMixin._search_files_rg.<locals>.<genexpr>½  s   øé € ÐZÉMÀD˜T×9Ñ9¸$×?Ð?ËMùr+  zcd z && z --filesz -g z -- r/  )rý   r3  r4  zhExact modification-time order failed; ripgrep 14+ is required. Upgrade ripgrep or use order='discovery'.z)File search failed while running ripgrep.ri   r  r0  >   r  é   r2  )r‡   r7   r   rd  r»   rÐ   r6   r.   r   r<   r   r8   r9   ró  Úrelpathr�  ÚdictÚfromkeysrö   r
   r  rÿ   r:  rn   rì   rj   rè   r"  r  r  rJ   ))rï   r™   r   r®   r¯   r¥  rÜ  Úglob_patternr?   r  Úeffective_exclusionsÚscoped_commonÚcommand_rootsr   r&   Úabsolute_rootsrÉ  rÊ  rc  Úexclusion_termsr*   Ú_absÚexclusion_globsÚexclusion_argsr6  rÝ   Úsort_argÚ	root_argsÚ	cd_prefixÚrg_cmdrf   rm   rµ   ÚfÚ	all_filesr<  r!  Údirectory_limit_reasonrÂ  ÚdÚmerged_entriess)   f&&&&&&                                  r   r4  ÚSearchMixin._search_files_rg–  s¾  ø€ ð *-°GÔ);ÀG×DVÑDVÐWZ×D[ÒD[˜˜7˜)‘}ÐbiˆÜ$ T¬3×/Ò/�‘°TˆØ•n qÕ(ˆØ#×FÑFÀuÓMÐØˆØˆÜˆu‹:˜�>×2Ð2´|ÀE×7JÓ7Jô ˜$Ÿ(™( E¨4Ó0×<Ð<°D·H±HˆCñ "ó#á!�Dô ×"Ò"¬9¯?ª?¸4×+@Ò+@¡4ÄiÇnÂnÐUXÓF_Ö`Ù!ð ð #ô &×0Ò0°Ó@ˆMÙP^Ó_ÑP^ÈœY×.Ò.¨tÖCÑP^ˆMÐ_ñ +?õ@á*>Ñ&�B˜˜hð ˜$×0Ñ0°1´Y×5FÒ5FÀxÐQ^Ó5_Ð4`Ð`cÐ1dÓeÐfÓgÙ*>ð ò @ˆOñ +?õ@á*>Ñ&�B˜ $ð ˜$×0Ñ0°1°X°J¸cÐ1BÓCÐDÓEÙ*>ð ò @ð Ÿ(™(¤4§=¡=°Ó#AÓBˆß2A˜1˜_Ð-Ñ.ÀrˆØ%×DÐD¨×)>Ñ)>¸tÓ)DˆßÜÐ&JÔKÐKØ�JÔØ#×AÑAÀ-ÓPÐßÜ#Ð*:Ô;Ð;Ø×#Ñ# MÓ2ˆØ*/°:Ô*=Ñ&À2ˆØ—H‘HÔZÉMÓZÓZˆ	ßIV�c˜$×0Ñ0°Ó?Ð@ÀÑEÐ\^ˆ	à�D˜  
¨$¨t×/EÑ/EÀlÓ/SÐ.TØ#Ð$ D¨¨ð5ˆà×%Ñ% v h°ÀRÐWdÔSdØ5FÀyÀkÐ3Rð &ó Tˆä7¸Ó?Ñˆ�Ø &× 1Ñ 1Ô 3Ó9Ñ 3˜1´q—Q�QÑ 3ˆ	Ð9ßñ #ó$á"�Aô —_’_ Q×'Ò'‘¬Y×-?Ò-?Ä	ÇÂÈ}Ð^_Ó@`Ó-aÒaÙ"ð ð $ð !×*Ñ*¨cÑ1×SÐS´c¸)³nÈÑ6SˆØ×Ñ ;Ô.·Ø˜
Ô"Ü#ðJôLð Lô  Ð&QÔRÐRð Ð+Ô+´
¸4Ä×0EÒ0EÈ$×J[ÑJ[Ð\b×JcÒJcØ+/×+MÑ+MÈlÐbmÓ+nÑ(ˆDÐ(ßÜ˜y›>�Ø!%×!:Ñ!:Ø©DÓ F©D q°A¸XÑ4E§ ©DÑ FÕFó"H�ð +�	Ø+×EÐEÐ/E�ÜØ˜F¨E¥>Ð2ÄÀIÃÜ˜)“n v¥~Ñ5×KÐK¼¸lÓ9KÐZfôhð 	hùòu#ùò `ùô@ùô@ùò, :ùò$ùò( !GsB   Ã0R9Ã2 R9Ä.R>Å:SÆ%S
Ì
SÌSÌ' SÍ1SÑ	S
ÑS
c                óZ   <€ V ^8„  d   QhRS[ RS[ RS[S[ ,          RS[RS[RS[ RS[RS[/# ©	r   r™   r   r¤  r®   r¯   r­   r°   r   r¦  )r   rÚ   s   "€r   r   rÛ   ä  sX   ø€ ÷ Jñ J¡sð J±#ð JÁ(É3Å-ð JÙ"ðJÙ,/ðJÙ>AðJÙLOðJÙT`ñJr   c                ó�  € V P                  R4      pV'       d1   T P                  YY4YVTV P                  R4      ;'       g    RR7      p	M8V P                  R4      '       d   V P                  WW4WVV4      p	M\	        RR7      # V	P
                  '       g�   V	P                  ^ 8X  d|   V	P                  '       gj   V	P                  '       gX   V	P                  '       gF    V P                  WV4      p
V
'       d+   V	P                  '       g   T
MV	P                   RV
 2V	n        V'       d   V	# \        W‘4      #   \         d    Rp
 LVi ; i)zBContent search: rg, else grep; attaches zero-match steering hints.rÝ   r'  ÚgrepzqContent search requires ripgrep (rg) or grep. Install ripgrep: https://github.com/BurntSushi/ripgrep#installationr£   Nr  )rè   Ú_search_with_rgrö   Ú_search_with_grepr
   r    r§   rº   r³   r·   rç  Ú	Exceptionr¨   r©   )rï   r™   r   r¤  r®   r¯   r­   r°   Úused_rgrf   Úhints   &&&&&&&&   r   r©  ÚSearchMixin._search_contentä  s&  € ð ×#Ñ# DÓ)ˆßØ×)Ñ)¨'¸È6Ð`gØ8<×8MÑ8MÈdÓ8S×8[Ð8[ÐW[ð *ó ]‰Fà×Ñ˜v×&Ò&Ø×+Ñ+¨G¸9ÈVÐbiÓj‰Fäð\ô]ð ]ð ——� ×!3Ñ!3°qÔ!8ØŸŸ˜¨v¯|¯|¨|ÀFÇMÇMÀMðØ×-Ñ-¨g¸YÓG�÷ Ø-3¯^¯^¨^¡ÀFÇNÁNÐCSÐSTÐUYÐTZÐA[�”÷ ØˆMÜ8¸ÓIÐIøô ô Ø’ðús   ÃD5 Ä5EÅEc                ój   <€ V ^8„  d   QhRS[ S[,          RS[RS[RS[RS[RS[S[,          RS[RS[/# )	r   Ú	cmd_partsr­   r®   r¯   r°   r¨   Úline_capr   )r   r   r�   r   rJ   r
   )r   rÚ   s   "€r   r   rÛ   ÿ  s]   ø€ ÷ bñ b©d±3­ið bÁcð bÑRUð bÙ%(ðbÙ36ðbÙAIÉ#Åðbá'+ðbá8Dñbr   c           	     ó,  € W4,           V^ 8”  d   ^ÈM^ ,           pV'       dS   VRRR\        V4      .,           p	VR
9  d   V	. RO,          p	V P                  RRP                  V	4      ,           ^<R7      p
MV P                  W^<RRR7      p
\	        W¢W4WVR	7      # )aê  Run ``cmd_parts | head -n <fetch_limit>`` under pipefail and parse. Extra
rows report the true total (context mode also emits "--" separators, so
grab 200 more). pipefail keeps the engine's exit 2 alive across ``| head``
(a truncating head makes rg exit 0 / grep 141, which the ==2 guard ignores).
``line_cap`` appends ``| cut -c1-2000`` for engines without --max-columns
(grep): bounds giant single-line matches at the pipe layer; skipped for
files_only/count where lines are paths/counts.Ú|Úheadz-nr/  r  rü   T)rý   r  r4  ©r¨   ©rª   r«   )ri  Úcutz-c1-2000)r   rë   r9   r:  rÇ   )rï   rf  r­   r®   r¯   r°   r¨   rg  r  r#   rf   s   &&&&&&&&   r   Ú_run_search_pipelineÚ SearchMixin._run_search_pipelineÿ  s–   € ð •n¨w¸¬{©ÀÕBˆßØ  f¨d´C¸Ó4DÐ EÕEˆEØÐ"9Ô9ØÒ1Õ1�Ø—Z‘ZÐ 3°c·h±h¸u³oÕ EÈr�ZÓR‰Fà×)Ñ)¨)È"Ð[_Ø7Jð *ó LˆFä# F¸ÈÔaÐar   c                óp   <€ V ^8„  d   QhRS[ RS[ RS[S[ ,          RS[RS[RS[ RS[RS[S[ ,          R	S[/	# )
r   r™   r   r¤  r®   r¯   r­   r°   rÜ  r   r¦  )r   rÚ   s   "€r   r   rÛ     se   ø€ ÷ !jñ !j¡sð !j±#ð !jÁ(É3Å-ð !jÙ"ð!jÙ,/ð!jÙ>Að!jÙLOð!já'/±¥}ð!já@Lñ!jr   c	           	     óò  € T;'       g    V P                  R4      pV'       g   \        RR7      # V P                  V4      RRR.p	VR9  d   V	P                  . RO4       \	        V4      p
V
'       d   V	P                  R4       V^ 8”  d   V	P                  R\        V4      .4       V	P                  V P                  V4      4       V'       d#   V	P                  R	V P                  V4      .4       V\        9   d   V	P                  \        V,          4       V	P                  V P                  VR
R7      4       V	P                  V P                  V4      4       V
'       d   RMRpV P                  W–WEW{R7      # )zSearch using ripgrep.rÝ   z%Content search requires ripgrep (rg).r£   z--line-numberz--no-headingz--with-filenamer¢   ú-Cr”  Fr×  ut   Pattern contains \n â€” multiline mode (-U) was enabled automatically so the regex can match across line boundaries.Nrk  rl  )z--max-columnsÚ2000z--max-columns-preview)rö   r
   rÿ   r—  rž   r$   r   r™  r�  Ú_OUTPUT_MODE_FLAGSrA  rn  )rï   r™   r   r¤  r®   r¯   r­   r°   rÜ  rf  Ú	multilineÚml_notes   &&&&&&&&&   r   r_  ÚSearchMixin._search_with_rg  sS  € ð &×DÐD¨×)>Ñ)>¸tÓ)DˆßÜÐ&MÔNÐNØ×+Ñ+¨MÓ:¸OÈ^Ð]nÐoˆ	ð Ð5Ô5Ø×ÑÒOÔPä.¨wÓ7ˆ	ßØ×Ñ˜]Ô+Ø�QŒ;Ø×Ñ˜d¤C¨£LÐ1Ô2Ø×Ñ˜×1Ñ1°$Ó7Ô8ßØ×Ñ˜h¨×(>Ñ(>¸yÓ(IÐJÔKØÔ,Ô,Ø×ÑÔ/°Õ<Ô=Ø×Ñ˜×/Ñ/°ÈÐ/ÓNÔOà×Ñ˜×5Ñ5°dÓ;Ô<÷ ñ=à ð 	ð ×(Ñ(¨ÀÐPWÐ(ÓiÐir   c                ón   <€ V ^8„  d   QhRS[ S[,          RS[RS[RS[RS[S[,          RS[ S[,          /# )r   rj  r™   r­   r°   r¤  r   )r   r   r�   r   )r   rÚ   s   "€r   r   rÛ   7  sF   ø€ ÷ ñ ™d¡3�ið ±#ð ÁCð ÑRUð Ù%¡c�]ðÙ6:¹3µiñr   c                óH  € \        V4      pV^ 8”  d   VP                  R\        V4      .4       V'       d#   VP                  RV P                  V4      .4       V\        9   d   VP                  \        V,          4       VP                  V P                  VRR7      4       V# )zQ``head`` + context/include/mode flags + quoted pattern (argument order is fixed).rr  z	--includeFr×  )r   r—  r   r�  rt  r$   )rï   rj  r™   r­   r°   r¤  r#   s   &&&&&& r   Ú	_grep_cmdÚSearchMixin._grep_cmd7  s„   € ô �T“
ˆØ�QŒ;Ø�L‰L˜$¤ G£Ð-Ô.ßØ�L‰L˜+ t×'=Ñ'=¸iÓ'HÐIÔJØÔ,Ô,Ø�L‰LÔ+¨KÕ8Ô9Ø�‰�T×+Ñ+¨GÀEÐ+ÓJÔKØˆr   c                óZ   <€ V ^8„  d   QhRS[ RS[ RS[S[ ,          RS[RS[RS[ RS[RS[/# r\  r¦  )r   rÚ   s   "€r   r   rÛ   D  sX   ø€ ÷ hñ h©ð h±Cð hÁHÉSÅMð hÙ!$ðhÙ.1ðhÙ@CðhÙNQðhÙVbñhr   c           
     ó  € V P                  V4      pV'       g   V P                  V4      '       d   V P                  WW4WVWx4      # V P                  . ROWWs4      p	VP	                  R4      ;'       g!    \        \        P                  ! RV4      4      p
V
'       d   V P                  V4      pM5VP                  R4      pRpVR	9  d   VRV P                  V4       2,          pV	P                  V4       V P                  W–WEVRR7      # )
zFallback search using grep.rt   rÌ   r-  z"$PWD"T©rg  )r^  z-rnHEz--exclude-dir='.*')rt   z\\>   rh   r‰  )rR  r�  Ú_search_with_grep_prunedrz  r‡   rJ   r‘   r‰   r�  Úremoveprefixr$   rn  )rï   r™   r   r¤  r®   r¯   r­   r°   r}  rf  r   Úsearch_rootÚrelative_paths   &&&&&&&&     r   r`  ÚSearchMixin._search_with_grepD  sþ   € ð
 ×5Ñ5°dÓ;ˆ÷ ˜d×9Ñ9¸$×?Ò?Ø×0Ñ0Ø˜y°Àgó`ð `ð —N‘NÒ#JÈGÐbiÓuˆ	ð —o‘o mÓ4×`Ð`¼¼R¿XºXÐFXÐZ^Ó=_Ó8`ˆßØ×0Ñ0°Ó6‰Kà ×-Ñ-¨dÓ3ˆMØ"ˆKØ IÔ-Ø  4×#9Ñ#9¸-Ó#HÐ"IÐJÕJ�Ø×Ñ˜Ô%Ø×(Ñ(¨ÀÐPWÐbfÐ(ÓgÐgr   c                óp   <€ V ^8„  d   QhRS[ RS[ RS[S[ ,          RS[RS[RS[ RS[RS[S[ ,          R	S[/	# )
r   r™   r   r¤  r®   r¯   r­   r°   r}  r   )r   r   r�   r   r
   )r   rÚ   s   "€r   r   rÛ   `  sf   ø€ ÷ iñ i±ð i¹3ð iÉ8ÑTWÍ=ð iÙ(+ðiÙ58ðiÙGJðiÙUXðiá26±sµ)ðiá@Lñir   c	           	     óº  € V P                  RR.WV4      p	T P                  T;'       g    R4      p
RRV
.pV'       d#   VP                  V P                  V4      R.4       VP                  V P	                  V
.4      RR.4       V'       d#   VP                  RV P                  V4      .4       VP                  R	.V	OR
NRNRN4       V P                  W¶WEVRR7      # )a4  grep fallback via ``find ... -prune -exec grep {} +``, used when the root needs
path-scoped pruning (macOS protected dirs) or is itself under a dot-directory
(#18473: grep's ``--exclude-dir='.*'`` would drop the root). Trade-off: find folds
grep's exit code, so a hard grep error surfaces as an empty result.r^  z-nHEr‰  r  z-Hz-oz-type fz-namez-execz{}Ú+z2>/dev/nullTr~  )rz  r�  r—  r…  rz  rn  )rï   r™   r   r¤  r®   r¯   r­   r°   r}  Ú
grep_partsÚq_rootÚ
find_partss   &&&&&&&&&   r   r  Ú$SearchMixin._search_with_grep_pruned`  sä   € ð —^‘^ V¨VÐ$4°gÈGÓTˆ
Ø×'Ñ'¨¯¨°Ó4ˆð ˜d FÐ+ˆ
ßØ×Ñ˜t×/Ñ/°Ó@À$ÐGÔHØ×Ñ˜4×2Ñ2°F°8Ó<¸dÀIÐNÔOßØ×Ñ˜w¨×(>Ñ(>¸yÓ(IÐJÔKØ×Ñ˜7ÐJ ZÐJ°ÐJ°sÐJ¸MÐJÔKØ×(Ñ(¨À%ÐQXÐcgÐ(ÓhÐhr   r  )F)Ú	discovery))z-iuv   0 exact matches, but {total} case-insensitive match(es) in {n} file(s): {paths} â€” the pattern's casing may be wrong.)z--hidden --no-ignoreu�   0 matches in visible files, but {total} match(es) in {n} hidden or gitignored file(s): {paths} â€” these are excluded by default.)rÖ  u­   0 regex matches, but {total} literal match(es) in {n} file(s): {paths} â€” the pattern contains regex metacharacters that likely need escaping (or pass a simpler substring).)r‹  N)NFrM   ),Ú__name__rD   rE   Ú__firstlineno__Ú__doc__rö   r‘   Úcompiler   r  r1  r:  rÿ   rM  rR  rd  Ústaticmethodrp  rz  r…  r�  r™  r   rª  rº  rË  rÒ  rÙ  rç  r÷  r  r
  r  r"  r¨  r4  r©  rn  r_  rz  r`  r  Ú__static_attributes__Ú__classdictcell__)rÚ   s   @r   rÖ   rÖ     sÈ  ø‡ € ñU÷)ð )ðV —Z’Zð	%ó&€N÷ð ÷ =bò =bð~
oØ-2ð
oØFJð
oà,.÷
oò 
o÷>ð >÷
hð 
h÷lð l÷ð ð8 ÷?ó ð?ð ÷@ó ð@÷)ð )÷
tð t÷
ð ÷fð f÷cò c÷Hð H÷"0ò 0÷d	ð 	ð	Ð÷ ð  ÷D.ð .÷@ð ÷Nð N÷*
ð 
÷<3Kð 3K÷jnhò nh÷`Lhò Lh÷\Jð J÷6bò b÷*!jò !j÷Fò ÷hð h÷8iö ir   rÖ   c                ó‚   € V ^8„  d   Qh/ ^ \         9   d+   \        \        \        \        \        3,          ,          ;R&   # )r   rN   )Ú__conditional_annotations__r  r@   r   )r   s   "r   r   r      s1   € ÷ ñ ÷p AÒ @œs¤5¬¬c´3¨Õ#7Õ8Ñ @òqr   )ÚDesktopÚ	DocumentsÚ	DownloadsÚLibraryÚMoviesÚMusicÚPicturesrM   )7r”  rŽ  r   r<   r‘   r  r  r   r"  r%  Úpathlibr   Útypingr   r   r   Úagent.search_policyr   rJ  r   rZ   Útools.file_operations_commonr   r	   r
   r    r+   Ú	ConditionrX   r  rN   r]   r=   rG   r_   rd   r3  r�  rk   rn   r}   rˆ   r�   r—   rœ   rž   r¤   r©   r¿   rt  rÇ   rÐ   rÔ   rÖ   r   )r”  s   @r   Ú<module>r¡     s?  øðöó 
Û Û 	Û Û Û 
Û Û Ý ß &Ñ &å 6Ý -ß QÑ Qð"Ð ð
Ø'+ðØCGðØcg÷ð: '×0Ò0Ó2Ð Ù;>»5Ð Ó @Ø $Ð õ$õ"õiõ0ð1ð ð ŸJšJÐ'QÓRÐ õõ	_ð —J’JÐRÓSÐ õ6õ(Ið Ÿ:š:Ð&<Ó=Ð õMõ`õ
ð" —’Ð=Ó>€ð # D¨'°4Ð8Ð ÷/õdWõD÷]ió ]ir   