+
    „WÝjÞ  ã                  ó€   € R t ^ RIHt ^ RIt^ RIt^ RIHt ^ RIt^ RIt^ RI	t	Rt
RR/R R lltR R	 ltR
 tR R ltR# )zSProfile directory removal: wait out the live owner, then rmtree with a short retry.)ÚannotationsN)ÚPathg      N@Útimeoutc               ó$   € V ^8„  d   QhRRRRRR/# )é   Úprofile_dirr   r   zfloat | NoneÚreturnÚbool© )Úformats   "ÚNC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\profiles_remove.pyÚ__annotate__r      s"   € ÷ ñ  dð ¸ð ÐPTñ ó    c               ó’  € ^ RI HpHp \        P                  ! 4       Vf   \
        MT,           p  V! V .4      ;_uu_ 4         RRR4       R#   + '       g   i     M7; i  T d     M+\         d    \        T R,          4      '       d    R#  Mi ; i\        P                  ! 4       T8¼  d   R# \        P                  ! R4       Kš  )z´True once no gateway runtime holds ``profile_dir``'s ``gateway.lock`` (taken and released
through ``exclusive_maintenance``); False when it is still held after ``timeout`` seconds.)ÚOwnershipConflictÚexclusive_maintenanceNTzgateway.lockFg      Ð?)	Úgateway.runtime_ownershipr   r   ÚtimeÚ	monotonicÚOWNER_RELEASE_WAIT_SECONDSÚOSErrorÚ_lock_unheld_read_onlyÚsleep)r   r   r   r   Údeadlines   &$   r   Úwait_profile_unownedr      sš   € ÷ SÜ�~Š~ÓÀÂÕ#=ÐV]Õ^€HØ
ð	Ù&¨ }×5Õ5Ø÷ 6×5×5Ñ5ûà ô 	ÙÜô 	ä% k°NÕ&B×CÒCÚñ Dð	úô �>Š>Ó˜xÔ'ÙÜ�
Š
�4Ös;   ±A! ÁAÁA! ÁA	ÁA! ÁA! Á!BÁ*BÁ3BÂBc               ó    € V ^8„  d   QhRRRR/# )r   Úpathr   r   r	   r
   )r   s   "r   r   r   $   s   € ÷ ñ  ð ¨$ñ r   c           	     ó  € \         P                  R8X  d   R# ^ RIp \         P                  ! V \         P                  \        \         R^ 4      ,          \         P                  ,          4      p TP                  Y!P                  TP                  ,          4        \         P                  ! T4       R#   \         d     R# i ; i  \         d     \         P                  ! T4       R# i ; i  \         P                  ! T4       i ; i)zXA missing lock, or one our own flock through a read-only descriptor wins, has no holder.ÚntFNÚ
O_NOFOLLOWT)ÚosÚnameÚfcntlÚopenÚO_RDONLYÚgetattrÚ
O_NONBLOCKÚFileNotFoundErrorÚflockÚLOCK_EXÚLOCK_NBÚcloser   )r   r"   Úfds   &  r   r   r   $   s±   € ä	‡w�w�$„ÙÛðÜ�WŠW�Tœ2Ÿ;™;¬´°\À1Ó)EÕEÌÏÉÕUÓVˆðØ�‰�BŸ™¨¯©Õ5Ô6Øô 	�Š�Žøô ô Úðûô
 ô Øä
�Š�Žðûô 	�Š��ús6   �AB3 Á.,C Â3CÃCÃC*ÃC- Ã)C*Ã*C- Ã-Dc           	     óø  € \        V\        4      '       d
   V^,          p\        V\        4      '       g   h V\        P                  P                  V4      3 F‚  pV'       g   K  \        P                  ! \        4      ;_uu_ 4        \        P                  ! V\        P                  ! V4      P                  \        P                  ,          4       RRR4       K„  	  V ! V4       R#   + '       g   i     K¡  ; i)z®onexc/onerror handler: add +w on PermissionError so rmtree can proceed. Covers NixOS-
style read-only copies where the path itself (0444) or its parent (0555) isn't writable.N)Ú
isinstanceÚtupleÚPermissionErrorr    r   ÚdirnameÚ
contextlibÚsuppressr   ÚchmodÚstatÚst_modeÚS_IWUSR)Úfuncr   ÚexcÚtargets   &&& r   Ú_rmtree_make_writabler;   6   sž   € ô �#”u×ÒØ�!�fˆÜ�cœ?×+Ò+ØØœŸ™Ÿ™¨Ó.Ó/ˆß‰6Ü×$Ò$¤W×-Õ-Ü—’˜¤§¢¨£×!8Ñ!8¼4¿<¹<Õ!GÔH÷ .Ñ-ñ 0ñ 	ˆ†J÷ .×-Ð-ús   ÂAC(Ã(C9c               ó    € V ^8„  d   QhRRRR/# )r   r   r   r   ÚNoner
   )r   s   "r   r   r   E   s   € ÷ ñ  Dð ¸Dñ r   c                ó   € ^pRp\        V4       F  p  \        P                  ! WR7        R# 	  Ve   VhR#   \         d    \        P                  ! YR7        L1i ; i  \         db   pTpT P                  4       '       g    Rp? R# YB^,
          8  d+   \        P                  ! RT^,           ,          4        Rp?K²   Rp?K¸  Rp?ii ; i)uý   ``shutil.rmtree`` with a short retry loop: a just-terminated process can leave in-flight
writes (SQLite -wal/-shm checkpoints, sandbox temp files) landing after rmtree walked
past a directory â€” ENOTEMPTY on POSIX, transient PermissionError on Windows.N)Úonexc)Úonerrorg333333Ó?)ÚrangeÚshutilÚrmtreeÚ	TypeErrorr   Úexistsr   r   )r   Úonexc_handlerÚattemptsÚlast_excÚattemptÚes   &&    r   Ú_rmtree_with_retryrK   E   s¸   € ð €HØ#€HÜ˜–?ˆð	0ðBÜ—’˜kÕ?ò ñ #ð ÒØˆñ øô ô BÜ—’˜k×AðBûô ô 	0ØˆHØ×%Ñ%×'Ò'ÞØ A�Ô%Ü—
’
˜3 '¨A¥+Õ.×/Ò/õ &ûð		0ús3   •9¹"AÁA!ÁAÁA!Á!CÁ,CÂ1CÃC)Ú__doc__Ú
__future__r   r2   r    Úpathlibr   rB   r5   r   r   r   r   r;   rK   r
   r   r   Ú<module>rO      s@   ðÙ YÝ "ã Û 	Ý Û Û Û ð "Ð ðÀt÷ õ(ò$÷r   