+
    ÆÚjsü  ã                   ó  € ^ 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t	^ RI
Ht ^RIHt ^RIHt ^RIHt R tR tR t]! 4        ]P(                  P+                  R	R
4      tRtRt]P2                  ! 4       R,          tRRt^ŒtR tR tR tR t R t!R t"R t#RSR lt$RSR lt% ! R R4      t&R t'R t(R t)RSR lt*R t+RSR lt,RSR lt-R  t.R! t/RSR" lt0R# t1R$ t2RSR% lt3R& R' lt4R( R) lt5R* t6R+ t7R, t8RTR- lt9RSR. lt:RUR/ lt;RVR0 lt<RSR1 lt=RWR2 lt>R3 t?R4 t@R5 tAR6 tBR7 tCR8 tDRXR9 ltER: tFRYR; ltGR< tHR= tIR> tJR? tKR@ tLRWRA ltMRB tNRC tORSRD ltPRE tQRZtRR[tSRF tTRG tURH tVRI tWRJ tXRK tYRLtZRM t[RN t\RWRO lt]R\RP lt^RWRQ lt_R# )]é    N)ÚPath)Ú_ipc)Úauth)Úpathsc           	     ól  € \        V 4      \        Jg   V ^ 8:  d   R# \        P                  P	                  R4      '       dw    \        RV  R2R4      ;_uu_ 4       pVP                  4       P                  RRR7      pRRR4        XTP                  R	4      ^,           R P                  4       pT^,          # \        P                  R
8X  dd    \        P                   ! RRRR\#        V 4      .\        P$                  ^R7      pTP                  RRR7      P)                  4       pT;'       g    R# \        P                  R8X  EdD    ^ RIp^ RIHp Rp TP1                  RRR7      p	TP2                  TP4                  TP2                  .T	P6                  n        TP:                  T	P6                  n        TP:                  TP?                  TP@                  4      TP?                  TP@                  4      TP?                  TP@                  4      TP?                  TP@                  4      .T	PB                  n        TP4                  T	PB                  n        TP:                  .T	PD                  n        TP4                  T	PD                  n        T	P7                  TRT 4      p
T
'       g   R#  TPA                  4       pTPA                  4       pTPA                  4       pTPA                  4       pT	PC                  Y¦PI                  T4      TPI                  T4      TPI                  T4      TPI                  T4      4      pT'       g    T	PE                  T
4       R# TPJ                  ^ ,          TPL                  ,          T	PE                  T
4       # R#   + '       g   i     EL; i  \        \        \        3 d     R# i ; i  \        \        3 d     R# i ; i  \        P&                  \        3 d     R# i ; i  \.         d     R# i ; i  \        \F        3 d     R# i ; i  T	PE                  T
4       i ; i)u1  Opaque process-start-time fingerprint at PID, or None if unavailable.

Two reads returning the same non-None value mean the PID still refers to
the same process; a different value means the PID was reused. Used by
restart_daemon() to keep the force-kill recovery path working even when
the daemon has already torn down its IPC socket (e.g. during a slow
remote shutdown), without falling back to "trust the pid file" â€” which
would re-introduce the PID-reuse hazard.

Linux:   /proc/<pid>/stat field 22 (starttime in clock ticks since boot).
macOS:   `ps -o lstart= -p <pid>` (an absolute timestamp string).
Windows: GetProcessTimes via ctypes (FILETIME creation time, 100-ns since 1601).
Anywhere else: returns None; restart_daemon falls back to its strict
identify-only check, which is safer than no check at all.
NÚlinuxz/proc/z/statÚrbÚasciiÚreplace)ÚerrorsÚ)ÚdarwinÚpsú-ozlstart=ú-p)ÚstderrÚtimeoutÚwin32)Úwintypesi   Úkernel32T)Úuse_last_errorF)'ÚtypeÚintÚsysÚplatformÚ
startswithÚopenÚreadÚdecodeÚFileNotFoundErrorÚPermissionErrorÚOSErrorÚrindexÚsplitÚ
ValueErrorÚ
IndexErrorÚ
subprocessÚcheck_outputÚstrÚDEVNULLÚSubprocessErrorÚstripÚctypesr   ÚImportErrorÚWinDLLÚDWORDÚBOOLÚOpenProcessÚargtypesÚHANDLEÚrestypeÚPOINTERÚFILETIMEÚGetProcessTimesÚCloseHandleÚAttributeErrorÚbyrefÚdwHighDateTimeÚdwLowDateTime)ÚpidÚfÚrawÚtailÚoutÚsr-   r   Ú!PROCESS_QUERY_LIMITED_INFORMATIONr   ÚhÚcreationÚexit_ftÚ	kernel_ftÚuser_ftÚoks   &               ÚŒ/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/browser_harness/admin.pyÚ_process_start_timerL      sx  € ô  ˆCƒyœÓ˜s aœxÙÜ
‡|�|×Ñ˜w×'Ò'ð	Ü˜˜s˜e 5Ð)¨4×0Ô0°AØ—f‘f“h—o‘o g°i�oÓ@�÷ 1ð	Ø�s—z‘z #“¨Õ*Ð+Ð,×2Ñ2Ó4ˆDØ˜•8ˆOô ‡|�|�xÔð	Ü×)Ò)Ø�t˜Y¨¬c°#«hÐ7Ü!×)Ñ)°1ôˆCð �J‰J�w yˆJÓ1×7Ñ7Ó9ˆØ�yˆy�DÐÜ
‡|�|�wÕð	ÛÝ'ð -3Ð)ð	Ø—}‘} ZÀ�}ÓEˆHØ-5¯^©^¸X¿]¹]ÈHÏNÉNÐ,[ˆH× Ñ Ô)Ø+3¯?©?ˆH× Ñ Ô(à—‘Ø—‘˜x×0Ñ0Ó1Ø—‘˜x×0Ñ0Ó1Ø—‘˜x×0Ñ0Ó1Ø—‘˜x×0Ñ0Ó1ð1ˆH×$Ñ$Ô-ð 08¯}©}ˆH×$Ñ$Ô,Ø-5¯_©_Ð,=ˆH× Ñ Ô)Ø+3¯=©=ˆH× Ñ Ô(ð × Ñ Ð!BÀEÈ3ÓOˆßÙð	$Ø×(Ñ(Ó*ˆHØ×'Ñ'Ó)ˆGØ ×)Ñ)Ó+ˆIØ×'Ñ'Ó)ˆGØ×)Ñ)Ø—<‘< Ó)¨6¯<©<¸Ó+@Ø—‘˜YÓ'¨¯©°gÓ)>óˆB÷ Øð × Ñ  Ö#ð ×+Ñ+¨rÕ1°X×5KÑ5KÕKà× Ñ  Õ#Ù÷I 1×0Ð0ûä!¤?´GÐ<ô 	Úð	ûô œJÐ'ô 	Úð	ûô ×*Ñ*¬GÐ4ô 	Úð	ûô ô 	Úð	ûô" œÐ(ô 	Úð	ûð$ × Ñ  Õ#úsŒ   ÁN Á"NÁ=N Â1N< Ã5O Å
O6 ÅD6P Ê(BP  Í#P  ÎN	ÎN ÎN ÎN9Î8N9Î<OÏOÏO3Ï2O3Ï6PÐPÐPÐPÐ P3c                  ó  € \        \        4      P                  4       P                  ^,          p \        P
                  ! 4       pV R,          VR,          3 F&  pVP                  4       '       g   K  \        V4       K(  	  R# )é   z.envN)r   Ú__file__ÚresolveÚparentsr   Úworkspace_dirÚexistsÚ_load_env_file)Ú	repo_rootÚ	workspaceÚps      rK   Ú	_load_envrX   l   s\   € Ü”X“×&Ñ&Ó(×0Ñ0°Õ3€IÜ×#Ò#Ó%€IØ˜&Õ  )¨fÕ"4Ó5ˆØ�x‰x�zŠzÙÜ�qÖó 6ó    c                 ó¢  € V P                  R RR7      P                  4        F©  pVP                  4       pV'       d   VP                  R4      '       g   RV9  d   K;  VP	                  R^4      w  r#\
        P                  P                  VP                  4       VP                  4       P                  R4      P                  R4      4       K«  	  R# )z	utf-8-sigr   ©Úencodingr   Ú#Ú=Ú"Ú'N)Ú	read_textÚ
splitlinesr,   r   r$   ÚosÚenvironÚ
setdefault)rW   ÚlineÚkÚvs   &   rK   rT   rT   u   sŽ   € Ø—‘ [¸�ÓC×NÑNÖPˆØ�z‰z‹|ˆß�t—‘ s×+Ò+¨s¸$¬ÙØ�z‰z˜#˜qÓ!‰ˆÜ
�
‰
×Ñ˜aŸg™g›i¨¯©«¯©¸Ó)=×)CÑ)CÀCÓ)HÖIó QrY   ÚBU_NAMEÚdefaultz"https://api.browser-use.com/api/v3z*https://pypi.org/pypi/browser-harness/jsonzversion-cache.jsonc                 óî   €  \         P                  ! T ;'       g    \        4      P                  R RR7      P	                  4       P                  4       R,          #   \        \        \        3 d     R# i ; i)úutf-8r   r[   Néÿÿÿÿ)	ÚipcÚlog_pathÚNAMEra   r,   rb   r    r&   r"   ©Únames   &rK   Ú	_log_tailrs   ˆ   s]   € ðÜ�|Š|˜DŸL˜L¤DÓ)×3Ñ3¸WÈYÐ3ÓW×]Ñ]Ó_×jÑjÓlÐmoÕpÐpøÜœz¬7Ð3ô Úðús   ‚A ›>A ÁA4Á3A4c                ó4  € \         P                  R8X  d   RRRRRV  R2.MRR	R
R\        V 4      .p \        P                  ! VRR^R7      pTP                  ^ 8w  d   R# TP                  pTP                  4       '       g   R# RT9   #   \
         d     R# i ; i)uR  Best effort: does `pid` look like one of our daemons?

Guards against pid reuse â€” a dead daemon's number can be handed to an
unrelated process, and treating that as parked would make every caller wait
instead of spawning. Where the check cannot run (Windows, no ps) we fall
back to the log-freshness guard rather than blocking startup.
r   Ú
powershellz
-NoProfilez-NonInteractivez-Commandz2(Get-CimInstance Win32_Process -Filter 'ProcessId=z').CommandLiner   r   zcommand=r   T)Úcapture_outputÚtextr   FÚbrowser_harness)	r   r   r)   r'   ÚrunÚ	ExceptionÚ
returncodeÚstdoutr,   )r>   ÚcommandÚresultrB   s   &   rK   Ú_is_daemon_processr   �   sª   € ô �<‰<˜7Ô"ð 
�|Ð%6¸
Ø=¸c¸UÀ.Ð	Qñ	Sð �D˜* d¬C°«HÐ5ð	 ðÜ—’ ¸À4ÐQRÔSˆð ×Ñ˜AÔÙØ
�-‰-€CØ�9‰9�;Š;ÙØ Ñ#Ð#øô ô Úðús   ²B ÂBÂBc                óæ  €  V P                  4       p \        P                  ! V4      p\        VR,          4      pVP	                  R4      pT^ 8:  d   R# Te   \        T4      pTe	   Yd8X  d   T# R# \        T4      '       d   T# R#   \        P
                  \        \        3 d(    TP                  4       p\        T^ ,          4      pRp L�i ; i  \        \        \        \        3 d     R# i ; i)z;Read a parent-published PID plus process-start fingerprint.r>   ÚstartedN)ra   ÚjsonÚloadsr   ÚgetÚJSONDecodeErrorÚ	TypeErrorÚKeyErrorr$   r    r"   r%   r&   rL   r   )Úpathr@   Úrecordr>   ÚfingerprintÚfieldsÚcurrents   &      rK   Ú_pending_pid_recordr�   ©   sÞ   € ðØ�n‰nÓˆð	Ü—Z’Z “_ˆFÜ�f˜U•mÓ$ˆCØ Ÿ*™* YÓ/ˆKð ˆa„xÙØÒÜ% cÓ*ˆØÒ)¨gÔ.DˆsÐNÈ$ÐNÜ$ S×)Ò)ˆ3Ð3¨tÐ3øô ×$Ñ$¤i´Ð:ô 	Ø—Y‘Y“[ˆFÜ�f˜Q•i“.ˆCØŠKð	ûô œw¬
´JÐ?ô Úðús/   ‚C “9B ÂACÃC ÃCÃC ÃC0Ã/C0c                ón  €  \         P                  ! V P                  4       4      pVR,          pVP                  R4      p\        T4      \        Jg   ^ Tu;8  d   R8  d	   M R# Tf   R# \        T4      pTe
   YC8X  d   Y#3# R#   \        \
        \        \        \         P                  3 d     R# i ; i)zDReturn (PID, start fingerprint) only while that generation is alive.r>   r�   Nl        )r‚   rƒ   ra   r„   r    r"   r†   r‡   r…   r   r   rL   )rˆ   r‰   r>   rŠ   rŒ   s   &    rK   Ú!_fingerprinted_pending_generationr�   ¿   s¤   € ðÜ—’˜DŸN™NÓ,Ó-ˆØ�U�mˆØ—j‘j Ó+ˆô ˆCƒyœÓ 1 sÖ#6¨gÖ#6Ùð ;FÒ:MÙÜ! #Ó&€GØ!(Ò!4¸Ô9OˆCÐÐYÐUYÐYøô œw¬	´8¼T×=QÑ=QÐRô Úðús   ‚>B Â*B4Â3B4c                 ó6   € \        V 4      pVe
   V^ ,          # R # ©N)r�   )rˆ   Ú
generations   & rK   Ú_fingerprinted_pending_pidr“   Í   s    € Ü2°4Ó8€JØ&Ò2ˆ:�a�=Ð<¸Ð<rY   c                óB  €  V P                  4       p \        \        P                  ! V4      R,          4      #   \        P                  \
        \        3 d$    \        TP                  4       ^ ,          4      u # i ; i  \        \        \        \        3 d     R# i ; i)zCRead only the PID field, without treating it as a trusted identity.r>   N)ra   r   r‚   rƒ   r…   r†   r‡   r$   r    r"   r%   r&   )rˆ   r@   s   & rK   Ú_pid_numberr•   Ò   s{   € ðØ�n‰nÓˆð	'Ü”t—z’z #“ uÕ-Ó.Ð.øÜ×$Ñ$¤i´Ð:ô 	'Ü�s—y‘y“{ 1•~Ó&Ò&ð	'ûäœw¬
´JÐ?ô Úðús-   ‚A? “%9 ¹A A<Á9A? Á;A<Á<A? Á?BÂBc           	      ó:  € \        V4      p\        P                  ! R VRV/RRR7      pV P                  V P                   R\
        P                  ! 4        R\        P                  ! ^4       R24      pVP                  V4       \
        P                  ! W@4       R# )r>   r�   T)Ú	sort_keysÚ
separatorsÚ.z.tmpN)Ú,Ú:)rL   r‚   ÚdumpsÚ	with_namerr   rc   ÚgetpidÚsecretsÚ	token_hexÚ
write_textr   )rˆ   r>   rŠ   ÚvalueÚtmps   &&   rK   Ú_publish_pidr¤   Þ   sw   € Ü% cÓ*€KÜ�JŠJ˜˜s I¨{Ð;ÀtÐXbÔc€EØ
�.‰.˜DŸI™I˜; a¬¯	ª	« }°A´g×6GÒ6GÈÓ6JÐ5KÈ4ÐPÓ
Q€CØ‡N�N�5ÔÜ‡J‚JˆsÖrY   c                óÄ   € \        V 4      ;'       g    RP                  R4      '       g   R# \        \        P                  ! T ;'       g    \
        4      4      pVf   R# V# )aj  PID of a daemon whose handshake is still parked on Chrome's Allow popup.

A parked daemon has no IPC socket yet, so daemon_alive() and identify() both
say "nothing there" and every caller used to spawn a sibling, raising a
second popup and truncating the first daemon's log. The pid file plus a
fresh `handshake-wait` breadcrumb identify it without needing IPC.
Ú úhandshake-waitN)rs   r   r�   rn   Úpid_pathrp   )rr   r>   s   & rK   Ú_parked_daemon_pidr©   æ   sK   € ô �d‹O×!Ð!˜r×-Ñ-Ð.>×?Ò?ÙÜ
œcŸlšl¨4¯<¨<´4Ó8Ó
9€CØ
‚{ÙØ€JrY   c                óŠ   € \         P                  ! T ;'       g    \        4      p \        V4      pV#   \         d     R# i ; i)zGPID of a daemon child in the short gap before it writes handshake-wait.N)rn   r¨   rp   r�   r"   )rr   rˆ   r>   s   &  rK   Ú_starting_daemon_pidr«   ö   s@   € ä�<Š<˜Ÿ˜¤Ó%€DðÜ! $Ó'ˆð €Jøô ô Úðús   ¦3 ³AÁAc                   ó@   a € ] tR tRt o RtR	R ltR tR tR tRt	V t
R# )
Ú_spawn_locké   a5  Only one process spawns a daemon at a time.

Two cold invocations that both miss the parked check would otherwise open
two connections and raise two popups, which is the bug this file is fixing.
Best effort: if the lock cannot be taken we still proceed, because failing
to start is worse than an extra popup.
Nc                ó�   € \         P                  ! T;'       g    \        4      P                  R 4      V n        W n        RV n        R# )z
.spawnlockN)rn   r¨   rp   Úwith_suffixrˆ   r   Úfd)Úselfrr   r   s   &&&rK   Ú__init__Ú_spawn_lock.__init__	  s/   € Ü—L’L § ¬Ó.×:Ñ:¸<ÓHˆŒ	ØŒØˆŽrY   c                ó¬  € \         P                  R 8X  d_   ^ RIp\        P                  ! V P
                  ^ \        P                  4        VP                  V P
                  VP                  ^4       R# ^ RI
p VP                  V P
                  VP                  VP                  ,          4       R#   \         d     R# i ; i  \         d     R# i ; i)r   NTF)r   r   Úmsvcrtrc   Úlseekr±   ÚSEEK_SETÚlockingÚLK_NBLCKr"   ÚfcntlÚflockÚLOCK_EXÚLOCK_NB)r²   r¶   r»   s   &  rK   Ú	_try_lockÚ_spawn_lock._try_lock  sœ   € Ü�<‰<˜7Ô"ÛÜ�HŠH�T—W‘W˜a¤§¡Ô-ðØ—‘˜tŸw™w¨¯©¸Ô;Ùó 	ð	Ø�K‰K˜Ÿ™ §¡°·±Õ!>Ô?Ùøô ô Úðûô ô 	Úð	ús$   Á'B2 Á97C Â2CÃ CÃCÃCc                ó|  € \         P                   ! 4       V P                  ,           p\        P                  ! \	        V P
                  4      \        P                  \        P                  ,          R 4      V n        \        P                  ! V P                  4      P                  ^ 8X  d"   \        P                  ! V P                  R4        V P                  4       '       d   V # \         P                   ! 4       V8¼  d*   \        P                  ! V P                  4       RV n        V # \         P                  ! R4       Kt  )é€  ó   1Ngš™™™™™¹?)Útimer   rc   r   r)   rˆ   ÚO_CREATÚO_RDWRr±   ÚfstatÚst_sizeÚwriter¿   ÚcloseÚsleep)r²   Údeadlines   & rK   Ú	__enter__Ú_spawn_lock.__enter__  s¶   € Ü—9’9“; §¡Õ-ˆÜ—'’'œ#˜dŸi™i›.¬"¯*©*´r·y±yÕ*@À%ÓHˆŒÜ�8Š8�D—G‘GÓ×$Ñ$¨Ô)Ü�HŠH�T—W‘W˜dÔ#ØØ�~‰~×ÒØ�Ü�yŠy‹{˜hÔ&Ü—’˜Ÿ™Ô!Ø�”Ø�Ü�JŠJ�sŽOrY   c                óè  € V P                   eÁ    \        P                  R8X  d]   ^ R Ip\        P
                  ! V P                   ^ \        P                  4       VP                  V P                   VP                  ^4       M+^ R I	pVP                  V P                   VP                  4         \        P                  ! V P                   4       R# R#   \         d     L2i ; i  \         d     R# i ; i)Nr   F)r±   r   r   r¶   rc   r·   r¸   r¹   ÚLK_UNLCKr»   r¼   ÚLOCK_UNr"   rÊ   )r²   Úexcr¶   r»   s   &*  rK   Ú__exit__Ú_spawn_lock.__exit__,  s­   € Ø�7‰7Òð	Ü—<‘< 7Ô*Û!Ü—H’H˜TŸW™W a¬¯©Ô5Ø—N‘N 4§7¡7¨F¯O©O¸QÕ?ã Ø—K‘K §¡¨¯©Õ7ðÜ—’˜Ÿ™Ô!ó øô ô Ùðûô ô ØÙðús*   �A0C Â*C Â- C" ÃCÃCÃ"C1Ã0C1)r±   rˆ   r   )Ng      >@)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r³   r¿   rÍ   rÓ   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @rK   r­   r­      s#   ø‡ € ñôò
ò ÷ð rY   r­   c                óö   € T ;'       g    RP                  4       pRV9   ;'       gT    RV9   ;'       gG    RV9   ;'       g:    RV9   ;'       d-    RV9   ;'       g     RV9   ;'       g    RV9   ;'       g    R	V9   # )
z8True when Chrome needs the inspect-page permission flow.r¦   zdevtoolsactiveport not foundzenable chrome://inspectznot live yetzws handshake failedÚ403zopening handshakez	timed outr   ©Úlower©Úmsgrà   s   & rK   Ú%_needs_chrome_remote_debugging_promptrã   ?  s¤   € à�YˆY�B×ÑÓ€Eà&¨%Ñ/÷ 	
ð 	
Ø$¨Ñ-÷	
ð 	
à˜UÑ"÷	
ð 	
ð " UÑ*÷ ð à˜‘÷ &ð &Ø&¨%Ñ/÷&ð &à %Ñ'÷&ð &ð  Ñ%ðrY   c                ó@   € T ;'       g    RP                  4       pRV9   # )zITrue when Chrome is reachable but waiting on the per-session Allow popup.r¦   zpermission-blockedrß   rá   s   & rK   Ú_needs_chrome_permission_popuprå   R  s!   € à�YˆY�B×ÑÓ€EØ 5Ñ(Ð(rY   c                ó<   € RT ;'       g    RP                  4       9   # )z7True when the daemon found no running supported browserzchrome-not-runningr¦   rß   )râ   s   &rK   Ú_chrome_not_runningrç   X  s   € à C§I I¨2×#4Ñ#4Ó#6Ñ6Ð6rY   c                ó  € T ;'       g    / p V P                  R4      ;'       g`    V P                  R4      ;'       gG    \        P                  P                  R4      ;'       g     \        P                  P                  R4      '       * # )zITrue when the daemon discovers a local Chrome instead of a remote CDP WS.Ú	BU_CDP_WSÚ
BU_CDP_URL)r„   rc   rd   )Úenvs   &rK   Ú_is_local_chrome_moderì   ]  so   € à
�)ˆ)�€Cà�‰�Ó÷ 	(ð 	(Ø�7‰7�<Ó ÷	(ð 	(ä�:‰:�>‰>˜+Ó&÷	(ð 	(ô �:‰:�>‰>˜,Ó'ô	ð rY   c                ób   € V RJpV'       d   \        V 4      MRpV'       d   V'       g   RMTpW43# )zBReturn normal startup and Chrome-approval wait windows in seconds.Ng      N@)Úfloat)ÚwaitÚlocalÚexplicit_waitÚstartup_waitÚapproval_waits   &&   rK   Ú_daemon_wait_windowsrô   h  s-   € à Ð$€Mß"/”5˜”;°T€Lß!¯-‘D¸\€MØÐ&Ð&rY   c                 óN   € \         P                  ! T ;'       g    \        R R7      # )ç      ð?©r   )rn   Úpingrp   rq   s   &rK   Údaemon_aliverù   p  s   € ô �8Š8�D—L�LœD¨#Ô.Ð.rY   c                ó  € Rp \         P                  ! T ;'       g    \        RR7      w  r\         P                  ! WRR/4      p\	        V\
        4      '       d   VP                  R4      MRpVR9   d   TMR V'       d   VP                  4        # #   \        \        \        \        P                  \        \        3 d     T'       d   TP                  4        R# R# i ; i  T'       d   TP                  4        i i ; i)zª'cloud' | 'cdp' | 'local' as self-reported by a live daemon, else None.

None covers unreachable daemons and pre-browser_kind daemons still running
from an older version.Nrö   r÷   Úmetarø   Úbrowser_kind>   ÚcdpÚcloudrð   )rn   Úconnectrp   ÚrequestÚ
isinstanceÚdictr„   rÊ   r    ÚConnectionRefusedErrorÚTimeoutErrorÚsocketr   r"   r%   )rr   ÚcÚtokenÚresponseÚkinds   &    rK   Údaemon_browser_kindr
  v  sÇ   € ð
 	€Að	Ü—;’;˜tŸ|˜|¤t°SÔ9‰ˆÜ—;’;˜q¨&°&Ð)9Ó:ˆÜ/9¸(ÄD×/IÒ/Iˆx�|‰|˜NÔ+ÈtˆØÐ8Ô8‰t¸dÐB÷ Ø�G‰G�Ið øô Ô5´|ÄVÇ^Á^ÔU\Ô^hÐiô ØçØ�G‰GŽIñ ðû÷ Ø�G‰G�Ið ús$   „A4B Â/C ÃC# ÃC Ã C# Ã#C>c                  ó  € \         P                  '       d   R MRp \         P                  '       dN   \         P                  '       g8   \         P                  RV  2,          P                  4       '       d   \        .# . # . p\        \         P                  P                  RV  24      4       FD  pVP                  ^\        V 4      )  p \         P                  ! V4       TP                  T4       KF  	  V#   \         d     KX  i ; i)z.portz.sockÚbuzbu-*)rn   Ú
IS_WINDOWSÚBH_RUNTIME_DIRÚBH_RUNTIME_DIR_SHAREDÚ_RUNTIMErS   rp   ÚsortedÚglobrr   ÚlenÚ_checkr%   Úappend)ÚsuffixÚnamesrW   r@   s       rK   Ú_daemon_endpoint_namesr  ˆ  sÌ   € ô
 ŸŸ˜‰W¨G€FÜ
××Ð¤#×";×";Ð";ÜŸ,™,¨2¨f¨X¨Õ6×>Ñ>×@Ò@”ˆvÐHÀbÐHØ€EÜ”C—L‘L×%Ñ%¨¨V¨H oÓ6Ö7ˆØ�f‰f�Qœ˜F›�|Ð$ˆð	Ü�JŠJ�sŒOð 	�‰�SÖñ 8ð €Løô ô 	Úð	ús   ÃC5Ã5DÄDc           
      óš  € R p \         P                  ! V RR7      w  r\         P                  ! WRR/4      pRV9   d    V'       d   VP                  4        R # R # VP	                  R4      pV'       d9   RVP	                  R4      ;'       g    RR	VP	                  R	4      ;'       g    R
/pRV RV/V'       d   VP                  4        # #   \
        \        \        \        P                  \        \        \        \        P                  3 d     T'       d   TP                  4        R # R # i ; i  T'       d   TP                  4        i i ; i)Nrö   r÷   rû   Úconnection_statusÚerrorÚpageÚtitlez
(untitled)Úurlr¦   rr   )rn   rÿ   r   rÊ   r„   r    r  r  r  r   r"   r‡   r%   r‚   r…   )rr   r  r  r  r  s   &    rK   Ú_daemon_browser_connectionr  ›  s  € Ø€AðÜ—;’;˜t¨SÔ1‰ˆÜ—;’;˜q¨&Ð2EÐ)FÓGˆØ�hÔØ÷ Ø�G‰GŽIñ ð �|‰|˜FÓ#ˆßØ˜TŸX™X gÓ.×>Ð>°,ÀÀtÇxÁxÐPUÃ×G\ÐG\ÐZ\Ð]ˆDØ˜˜f dÐ+÷ Ø�G‰G�Ið øô Ô5´|ÄVÇ^Á^ÔU\Ô^fÔhrÔtx÷  uIñ  uIð  Jô ØçØ�G‰GŽIñ ðû÷ Ø�G‰G�Ið ús<   „:C ÁC Á4C ÂC Â(	C ÃAD,ÄD/ Ä+D,Ä,D/ Ä/E
c                ó8   € \        T ;'       g    \        4      RJ# )zFWhether the selected daemon has a healthy attached browser connection.N)r  rp   rq   s   &rK   Údaemon_browser_readyr!  ­  s   € ä% d§l l¬dÓ3¸4Ð?Ð?rY   c                 óx   € . p \        4        F)  p\        V4      pV'       g   K  V P                  V4       K+  	  V # )zZLive browser-harness daemons with healthy CDP browser connections and their attached page.)r  r  r  )rB   rr   Úconns      rK   Úbrowser_connectionsr$  ²  s6   € à
€CÜ&Ö(ˆÜ)¨$Ó/ˆß‰4Ø�J‰J�tÖñ )ð €JrY   c                 ó(   € \        \        4       4      # )zICount live browser-harness daemons with a healthy CDP browser connection.)r  r$  © rY   rK   Úactive_browser_connectionsr'  ¼  s   € äÔ"Ó$Ó%Ð%rY   c                 ó‚   € T;'       g    \         p\        V 4      p \        V 4      V8:  d   V # V R V^,
           R,           # )Nz...)ÚDOCTOR_TEXT_LIMITr)   r  )r¢   Úlimits   &&rK   Ú_doctor_short_textr+  Á  s?   € Ø×&Ð&Ô&€EÜ�‹J€EÜ˜“J %Ô'ˆ5ÐF¨U°:°E¸AµIÐ->ÀÕ-FÐFrY   c                ó0   € V ^8„  d   QhR\         R\        /# ©rN   rˆ   Úreturn)r)   Úbool)Úformats   "rK   Ú__annotate__r1  Ç  s   € ÷ 3ñ 3œ3ð 3¤4ñ 3rY   c                óN   € \        V 4      ;'       d    RV P                  4       9   # )zNTrue when a Chrome binary path lives under /snap/ (Snap confinement on Linux).z/snap/)r/  rà   )rˆ   s   &rK   Ú_is_snap_browserr3  Ç  s   € ä�‹:×2Ð2˜( d§j¡j£lÑ2Ð2rY   c                ó0   € V ^8„  d   QhR\         R\         /# r-  )r)   )r0  s   "rK   r1  r1  Ì  s   € ÷ 6ñ 6¤#ð 6¬#ñ 6rY   c                 ó¨   € \        V 4      p \        P                  P                  V4      p\        V4      '       d   V# T#   \         d    Tp L$i ; ir‘   )r)   rc   rˆ   Úrealpathr"   r3  )rˆ   r@   Úresolveds   &  rK   Ú_doctor_snap_probe_pathr8  Ì  sQ   € Ü
ˆd‹)€CðÜ—7‘7×#Ñ# CÓ(ˆô # 3×'Ò'ˆ3Ð5¨XÐ5øô ô ØŠðús   �A ÁAÁAc                 óò  € ^ RI p R F–  p\        P                  P                  V4      ;'       g    RP	                  4       pV'       g   KD  \        V4      P                  4       p VP                  4       '       d#   VP                  \        \        V4      4      3u # K˜  	  R F,  pV P                  V4      pV'       g   K   V\        V4      3u # 	  R#   \         d     KÜ  i ; i  \         d     KR  i ; i)z©Return (label, probe_path) for the first Chrome/Chromium binary found, else (None, None).

Honors BH_CHROME_PATH and CHROME_PATH before searching PATH for common names.
Nr¦   ©ÚBH_CHROME_PATHÚCHROME_PATH)úgoogle-chrome-stableúgoogle-chromeúchromium-browserÚchromium)NN)Úshutilrc   rd   r„   r,   r   Ú
expanduserÚis_filerr   r8  r)   r"   Úwhich)rA  Úkeyr@   rW   ÚcmdÚws         rK   Ú$_doctor_probe_chrome_binary_for_snaprH  Õ  sá   € ó
 ã0ˆÜ�z‰z�~‰~˜cÓ"×(Ð( b×/Ñ/Ó1ˆßÙÜ�‹I× Ñ Ó"ˆð	Ø�y‰y�{Š{ØŸ™Ô 7¼¸A»Ó ?Ð@Ò@ñ ñ 1ó YˆØ�L‰L˜ÓˆßÙð	ØÔ0°Ó3Ð4Ò4ñ Yð Ðøô ô 	Úð	ûô ô 	Úð	ús$   Á%5CÃC'ÃC$Ã#C$Ã'C6Ã5C6c                  ó   € R # )zThttps://github.com/browser-use/browser-harness/blob/main/docs/snap-linux-headless.mdr&  r&  rY   rK   Ú_snap_linux_headless_doc_urlrJ  ñ  s   € ÙarY   c                 ó¢  € \        4       p \        R4       \        4        \        R4       \        RV  24       \        4        \        R4       \        R4       \        R4       \        4        \        R4       \        R4       \        R	4       \        R
4       \        4        \        R4       \        R4       \        R4       \        4        ^ # )zQPrint steps to replace Snap Chromium with a native Chrome for CDP. Always exit 0.z!browser-harness doctor --fix-snapzLSnap-packaged Chromium cannot expose DevTools the way browser-harness needs.zFull background: zA1. Install Google Chrome from Google's .deb (not the Snap store):zQ   wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.debz<   sudo apt install ./google-chrome-stable_current_amd64.debzK2. Point the harness (and your shell) at the native binary so PATH does notzL   pick the Snap wrapper first. Example for bash (~/.bashrc or session env):z6   export BH_CHROME_PATH=/usr/bin/google-chrome-stablezP   # CHROME_PATH is also honored by doctor's snap probe if you prefer that name.zH3. Launch Chrome from that path (Way 2) or open Chrome normally (Way 1),z7   enable remote debugging per install.md, then verify:z   browser-harness --doctor)rJ  Úprint)Údocs    rK   Úrun_doctor_fix_snaprN  õ  s¢   € ä
&Ó
(€CÜ	Ð
-Ô.Ü	„GÜ	Ð
XÔYÜ	Ð˜c˜UÐ
#Ô$Ü	„GÜ	Ð
MÔNÜ	Ð
]Ô^Ü	Ð
HÔIÜ	„GÜ	Ð
WÔXÜ	Ð
XÔYÜ	Ð
BÔCÜ	Ð
\Ô]Ü	„GÜ	Ð
TÔUÜ	Ð
CÔDÜ	Ð
'Ô(Ü	„GÙrY   c                ó”  € \        V4      '       d°   R1 Fr  p \        P                  ! T;'       g    \        RR7      w  rE\        P                  ! WERRR/ /4      pRV9   d    R	#  V'       d   K\  \        P                  ! R
4       Kt  	  \        V4      pVR29   d   \        T;'       g    \        4       M\        V4       ^ R	Ip^ R	Ip	\        V4      p
\        W
4      w  r¼R	pRp\        ^4       EFª  p/ \         P"                  CV'       d   RV/M/ CT;'       g    / Cp \%        \        P&                  ! T;'       g    \        4      R4      pV
'       Ed%   \-        WR7      ;_uu_ 4       pVP.                  f   \1        R4      h\        V4      '       d-   VVP*                  Jd   VP3                  4         R	R	R	4        R	# \5        V4      ;'       g    \7        V4      pV'       d   R	pM‡VP8                  ! V	P:                  RR.3RVRVP*                  RV/\        P<                  ! 4       B p\?        \        P@                  ! T;'       g    \        4      VPB                  4       VPB                  pR	R	R	4       MCVP8                  ! V	P:                  RR.3RVRVP*                  RV/\        P<                  ! 4       B pVVP*                  Jd   VP3                  4        \        PD                  ! 4       pVV,           pV
'       * pRpRpVe   \        PD                  ! 4       V8  Ed�   \        V4      '       d   \G        V4        R	# Xe   VPI                  4       e   RpEMGVf?   X'       d7   \K        \        P@                  ! T;'       g    \        4      4      V8w  d   RpEM\M        V4      ;'       g    RpV
'       d;   V'       g3   VPO                  R4      '       d   RpVf   R	M\Q        VVV,           4      pV'       gŽ   \        PD                  ! 4       V,
          ^8”  dm   VPO                  R4      '       dV   T;'       g    \        pVR8X  d   RMRV R2pV	PR                  R8X  d   RV R2MRp\U        RV R2V	PV                  R7       Rp\        P                  ! R 4       EKŸ  \M        V4      ;'       g    RpT
;'       d%    VPO                  R4      ;'       g    \Y        V4      pV
'       d°   V'       d¨   \-        VR!R7      ;_uu_ 4       p V P.                  ef   \[        \        P@                  ! T;'       g    \        4      4      X8X  d4    \        P@                  ! T;'       g    \        4      P]                  4        R	R	R	4       V'       d   \1        R"4      hEK±  V
'       d#   VPO                  R4      '       d   \1        R#4      hV
'       d4   \Y        V4      '       d#   \U        R$V	PV                  R7       \1        R%4      hV
'       dµ   Vf±   \a        V4      '       d    \        V4       \c        4       pVf   \1        R&4      h\U        R'V	PV                  R7       ^R(I2H3p! \        P                  ! 4       ^,           p"\        P                  ! 4       V"8  d&   V!! 4       '       g   \        P                  ! R)4       K?  EKÒ  V
'       d‰   V'       g�   \i        V4      '       dp   Rp^R*I2H5p#H6p$ V$! 4       '       d#   \U        R$V	PV                  R7       \1        R%4      h\        V4       \o        4        V#! 4       '       d   R+p%MR,p%\1        R-V% R.24      h\1        T;'       g9    R/T;'       g    \         R0\        P&                  ! T;'       g    \        4       24      h	  \1        R/T;'       g    \         R0\        P&                  ! T;'       g    \        4       24      h  \
         d     ELˆi ; i  \(         d    TP*                  p EL½i ; i  + '       g   i     ELb; i  \^         d     EL¯i ; i  + '       g   i     EL¼; i)3zuIdempotent. Self-heals stale daemon, closed Chrome (launches it), cold
Chrome, and missing Allow on chrome://inspect.FTç      @r÷   ÚmethodúTarget.getTargetsÚparamsr~   Nç      à?ri   ÚabzNdaemon-starting: another browser-harness daemon is still starting; retry laterz-mzbrowser_harness.daemonrë   r|   r   r¦   r§   rj   zbrowser-harness mac-approvezBU_NAME=z browser-harness mac-approver   zrun `z!` in another shell or click Allowzclick Allowu@   browser-harness: Chrome is asking "Allow remote debugging?" â€” z to continue.©Úfileçš™™™™™É?rö   z„permission-blocked: the pending Chrome connection ended before approval; browser-harness did not retry or create another connection.zµpermission-blocked: Chrome's Allow popup is still open and the pending daemon was left running. Approve that exact popup; browser-harness did not retry or create another connection.z}browser-harness: Chrome is asking "Allow remote debugging?". Approve that exact popup; no replacement connection was started.zvpermission-blocked: Chrome did not approve the connection; browser-harness did not retry or create another connection.zzchrome-not-running: no supported browser is running and none could be launched -- ask the user to open Chrome, then retry.ux   browser-harness: Chrome isn't running â€” launching it. If Chrome shows an "Allow remote debugging?" popup, click Allow.)Úsupported_browser_runningg333333Ó?)Ú remote_debugging_toggle_profilesÚremote_debugging_user_enabledz„click Allow on Chrome's "Allow remote debugging?" popup (the checkbox is already ticked; if no popup appears, untick and re-tick it)zTtick "Allow remote debugging for this browser instance" and click Allow on the popupz_remote-debugging-setup: opened chrome://inspect/#remote-debugging in Chrome -- ask the user to zÈ. Warn them Chrome shows ONE more Allow popup when the harness connects on the next attempt (per-connection approval; it is expected, not a re-ask). Retry after the user confirms; do not retry before.údaemon z didn't come up -- check )FT>   Nrþ   )8rù   rn   rÿ   rp   r   rz   rÄ   rË   r
  Ústop_remote_daemonÚrestart_daemonr'   r   rì   rô   Úrangerc   rd   r   ro   r"   r*   r­   r±   ÚRuntimeErrorrÊ   r©   r«   ÚPopenÚ
executableÚspawn_kwargsr¤   r¨   r>   Ú	monotonicÚ"_cleanup_unattached_browser_launchÚpollr�   rs   r   Úmaxr   rL  r   rå   r•   Úunlinkr    rç   Ú_launch_browserÚdaemonrY  rã   rZ  r[  Ú_open_chrome_inspect_once)&rï   rr   rë   ÚlastrC   r  Úresprü   r'   r   rð   rò   ró   Úlaunched_browserÚopened_inspectÚ_ÚeÚstderr_sinkÚlockÚpending_pidrW   ÚspawnedrÌ   ÚhintedÚapproval_waitingÚpending_diedÚlog_tailÚdaemon_nameÚapprove_commandÚactionrâ   Úpermission_waitÚcleanup_lockrY  Úboot_deadlinerZ  r[  Útodos&   &&&                                   rK   Úensure_daemonr�    s'  € ô �D×Òó
 "ˆDðÜŸ;š; t§| |¬t¸SÔA‘�Ü—{’{ 1¨hÐ8KÈXÐWYÐ-ZÓ[�Ø˜tÔ#¢VÐ#÷ ‘4œŸš Cžñ "ô +¨4Ó0ˆØ˜?Ô*ô ˜tŸ|˜|¤tÕ,ä˜4Ô çÜ! #Ó&€EÜ"6°tÓ"CÑ€Lð ÐØ€NÜ�1�XˆØPŒr�z‰zÐP·4˜y¨$Ñ/¸RÐPÀSÇYÀYÈBÐPˆð	-ÜœsŸ|š|¨D¯L¨L´DÓ9¸4Ó@ˆK÷ ˆ5Ü˜T×8Õ8¸DØ—7‘7’?Ü&Ð'wÓxÐxÜ ×%Ò%Ø"¨*×*<Ñ*<Ó<Ø#×)Ñ)Ô+Ø÷ 9Ò8ô 1°Ó6×TÐTÔ:NÈtÓ:T�ßØ‘Aà"×(Ò(ØŸ™¨Ð/GÐHñàðà&0×&8Ñ&8ðàALðäPS×P`ÒP`ÓPbñ�Aô !¤§¢¨d¯l¨l´dÓ!;¸Q¿U¹UÔCØ"#§%¡%�K÷! 9Ð8ð$ × Ò Ø—‘ Ð'?Ð@ñàðà(×0Ñ0ðà9DðäHK×HXÒHXÓHZñˆAð ˜j×0Ñ0Ó0Ø×ÑÔÜ—.’.Ó"ˆØ˜\Õ)ˆØ”ˆØ ÐØˆØÒ¤$§.¢.Ó"2°XÕ"=Ü˜D×!Ò!Ü2Ð3CÔDÚØŠ} §¡£Ò!5Ø#�ÙØŠyŸ[Ô-@ÄÇÂÈdÏlÈlÔVZÓA[Ó-\Ð`kÔ-kØ#�ÙÜ  “×,Ð,¨"ˆHß×-°(×2EÑ2EÐFV×2WÒ2WØ#'Ð Ø#0Ò#8™4¼cÀ(ÈGÐVcÕLcÓ>d�ßœdŸnšnÓ.°Õ8¸1Ô<À×ATÑATÐUe×AfÒAfØ"Ÿl˜l¤d�ð # iÔ/ñ 2à# K =Ð0LÐMð  ð —|‘| xÔ/ð ˜OÐ,Ð,MÑNà&ð ô
 ØVÐW]ÐV^Ð^kÐlØŸ™õð �Ü�JŠJ�s�OÜ˜‹o×#Ð# ˆØ×mÐm S§^¡^Ð4DÓ%E×%lÐ%lÔIgÐhkÓIlˆß—\ô ˜T¨3×/Õ/°<Ø—?‘?Ò.´;¼s¿|º|ÈDÏLÈLÔTXÓ?YÓ3ZÐ^iÔ3iðÜŸš T§\ \¬TÓ2×9Ñ9Ô;÷ 0÷ ô #ðRóð ò ß�S—^‘^Ð$4×5Ò5ô ðhóð ÷ Ô3°C×8Ò8ÜðSà—Z‘Zõô
 ð Ióð ÷ Ð%Ò-Ô2EÀc×2JÒ2Jä˜4Ô Ü.Ó0ÐØÒ'Ü"ð Qóð ô ð  Oð  VY÷  V`ñ  V`õ  aÝ9Ü ŸIšI›K¨"Õ,ˆMÜ—)’)“+ Ô-Ñ6O×6QÒ6QÜ—
’
˜3–ÚßŸÔ,QÐRU×,VÒ,VØ!ˆNß_Ù,×.Ò.äðWàŸ™õô
 #ð Móð ô ˜4Ô Ü%Ô'Ù/×1Ò1ð _‘àm�ÜØqÐrvÐqwð xFð Fóð ô
 ˜3×oÐo G¨D¯L¨L´D¨>Ð9RÔSV×S_ÒS_Ð`d×`lÐ`lÔhlÓSmÐRnÐ"oÓpÐpñe ôf ˜ § ¬ Ð.GÌÏÊÐUY×UaÐUaÔ]aÓHbÐGcÐdÓ
eÐeøôU ô Úðûô6 ô 	-Ø$×,Ñ,‹Kð	-ú÷ 9×8Ð8ûôN -ô Úðú÷	 0×/Ð/úsŠ   ˜_ ±1_ Ä!_2Ä?_2Å,A`Ç`Ç`Ç)A#`É&`Ô,`6Ô<`6Õ`$Õ*`$ß _/ß._/ß2`à`à`!à$`3	à/`6à2`3	à3`6à6ac                óÆ  € T ;'       g    \         p\        V4      '       g   \        RV: R24      h \        P                  ! VRR7      w  r# \        P
                  ! W#RRR/ /4      pVP                  4        \        T\        4      '       d   R
T9  d   \        RT: R24      hR	#   TP                  4        i ; i  \         d   p\        RT: RT 24      ThR	p?ii ; i)a  Require a healthy existing daemon without spawning or reconnecting.

Trusted orchestrators use this after they provision a scoped CDP transport.
Failing closed prevents a later CLI call from silently discovering a
different local Chrome when that orchestrator-owned daemon dies.
zrequired daemon z is not runningrP  r÷   rQ  rR  rS  z is unhealthy: Nr~   z failed its CDP health check)
rp   rù   r`  rn   rÿ   r   rÊ   rz   r  r  )rr   rz  rC   r  rm  rÒ   s   &     rK   Úrequire_existing_daemonrƒ  Ç  sÛ   € ð —,�,œ$€KÜ˜×$Ò$ÜÐ-¨k©_¸OÐLÓMÐMð\Ü—;’;˜{°CÔ8‰ˆð	Ü—;’;˜q¨(Ð4GÈÐSUÐ)VÓWˆDà�G‰GŒIô �dœD×!Ò! X°TÔ%9ÜÐ-¨k©_Ð<XÐYÓZÐZñ &:øð �G‰G�IûÜô \ÜÐ-¨k©_¸OÈCÈ5ÐQÓRÐX[Ð[ûð\ús/   ³B= ÁB( Á)B= Â(B:Â:B= Â=C ÃCÃC c                ó    € \        V RR7       R# )zØStop a remote daemon and its backing Browser Use cloud browser.

Triggers the daemon's clean shutdown, which PATCHes
/browsers/{id} {"action":"stop"} so billing ends and any profile
state in the session is persisted.T)Úrequire_cleanN)r^  rq   s   &rK   r]  r]  Ý  s   € ô �4 t×,rY   c                óÔ	  € ^ RI pT ;'       g    \        p \        P                  ! V 4      p\	        V4      pRpRp\        V 4      ;'       g    RP                  R4      '       d'   \        V 4      p\        V4      pVRJ;'       d    VRJ p\        P                  ! V RR7      pVRJ;'       g    \        P                  ! V RR7      p	V'       d   V	'       g   \        RV : R	24      hV	'       g   V'       d   \        R
V : R24      hV	'       gè   Veä   \        V RR7      ;_uu_ 4       p
V
P                  f   \        R
V : R24      h\        V4      pWµ8w  d   \        R
V : R24      h\        P                  ! V RR7      '       d   \        R
V : R24      h \        P                  ! V^ ,          VP                   4       \        P*                  ! V 4        \        P,                  ! V4       RRR4       R# \1        V4      pV	'       dö   Rp \        P2                  ! Y'       d   RMRR7      w  rÞ\        P4                  ! WÞRR/4      pV'       d�   \7        V\8        4      '       d6   VP;                  R4      RJg!   \=        VP;                  R4      4      '       dD   \7        V\8        4      '       d   VP;                  R4      MRp\        T;'       g    RV : R24      hTe   \A        TRR4      pT'       d   T! 4        Ve©   \C        ^K4       F1  p \        P                  ! V^ 4       \D        PF                  ! R4       K3  	  \        P                  ! V RR7      pVV8H  ;'       g    VRJ;'       d    \1        V4      V8H  pV'       d"    \        P                  ! W‚P                   4       \        P*                  ! V 4        \        P,                  ! V4       R#   \"        \$        \&        \(        3 d     EL8i ; i  \.         d     ELi ; i  + '       g   i     R# ; i  \>         d>   pT'       d+   \7        T\        4      '       d   h \        RT : RT 24      Th Rp?EL†Rp?ii ; i  Te   \A        TRR4      pT'       d	   T! 4        i i i ; i  \"        \$        \&        \(        3 d      EK	  i ; i  \"        \$        \&        \(        3 d     EL+i ; i  \.         d     R# i ; i)aÀ  Best-effort daemon shutdown + socket/pid cleanup.

Name is historical: callers typically follow this with another
`browser-harness` invocation, which auto-spawns a fresh daemon via
ensure_daemon(). The function itself only stops.

With require_clean=True, an unavailable daemon or any response other than
{"ok": true} raises before endpoint cleanup or process termination.

Ready-daemon identity is verified via ipc.identify() before any process
signal. A local daemon waiting on Chrome approval has no IPC socket yet;
`--reload` may stop that exact pending generation only when its atomically
published process-start fingerprint still matches. A stale or legacy PID
file is never trusted for signaling.
NFr¦   r§   g      @r÷   rö   r\  z+ is unavailable for required clean shutdownzpending daemon zp is live but has no verifiable process fingerprint; it was not signaled and its ownership records were preservedz+ is changing ownership; it was not signaledzQ changed ownership; the successor was not signaled and its records were preservedrX  z5 became ready during cancellation; run --reload againg      I@rû   ÚshutdownrJ   Tr  z did not confirm clean shutdownz! did not confirm clean shutdown: rÊ   )$Úsignalrp   rn   r¨   r)   rs   r   r©   r�   Úidentifyrø   r`  r­   r±   rc   ÚkillÚSIGTERMÚProcessLookupErrorr"   ÚSystemErrorÚOverflowErrorÚcleanup_endpointrh  r    rL   rÿ   r   r  r  r„   r/  rz   Úgetattrr_  rÄ   rË   )rr   r…  rˆ  Úpending_pathr¨   Úpending_generationÚpending_unverifiedÚ
parked_pidÚ
daemon_pidrù   Ú
owner_lockÚcurrent_generationÚdaemon_startr  r  r  r  rÒ   rÊ   rp  Úverified_pidÚsame_processs   &&                    rK   r^  r^  ë  sY  € ó  à�<ˆ<”4€DÜ—<’< Ó%€LÜ�<Ó €HØÐØÐÜ�$‹×Ð˜2×)Ñ)Ð*:×;Ò;Ü'¨Ó-ˆ
Ü>¸|ÓLÐØ'¨tÐ3×RÐRÐ8JÈdÐ8RÐô —’˜d¨CÔ0€JØ TÐ)×HÐH¬S¯XªX°dÀCÔ-H€LßŸ\Ü˜W T¡HÐ,WÐXÓYÐYß×.ÜØ˜d™Xð &Kð Kó
ð 	
÷ Ð.Ò:Ü˜ s×+Õ+¨zØ�}‰}Ò$Ü"Ø% d¡XÐ-XÐYóð ô "CÀ<Ó!PÐØ!Ô7Ü"Ø% d¡Xð .5ð 5óð ô �xŠx˜ c×*Ó*Ü"Ø% d¡XÐ-bÐcóð ðÜ—’Ð*¨1Õ-¨v¯~©~Ô>ô × Ò  Ô&ðÜ—	’	˜(Ô#÷+ ,ñ0 	ô ' zÓ2€LçØˆð	Ü—{’{ 4¾±ÈCÔP‰HˆAÜ—{’{ 1¨f°jÐ-AÓBˆHßÜ˜x¬×.Ò.Ø—<‘< Ó%¨TÓ1Ü˜Ÿ™ WÓ-×.Ò.ä1;¸HÄd×1KÒ1K˜Ÿ™ WÔ-ÐQU�Ü" 5×#]Ð#]¨g°d±XÐ=\Ð,]Ó^Ð^ð Š}Ü  7¨DÓ1�ßÙ”GàÒÜ�r–ˆAðÜ—’˜
 AÔ&Ü—
’
˜3–ñ ô Ÿ<š<¨°cÔ:ˆLØ'¨:Ñ5÷ ð Ø DÐ(÷ Dð DÜ'¨
Ó3°|ÑCð ÷ ðÜ—G’G˜J¯©Ô7ô ×Ò˜ÔðÜ
�	Š	�(ÖøôO '¬´¼mÐLô Úðûô
 %ô Úðú÷- ,Ö+ñ0 	ûô, ô 	ßÜ˜c¤<×0Ò0ØÜ"Ø˜d™XÐ%FÀsÀeÐLóàðõ ûð	ûð Š}Ü  7¨DÓ1�ßÙ•Gð ð ûô '¬´¼mÐLô Üðûô& +¬G´[Ä-ÐPô Úðûô ô Úðús¼   Ä'APÆPÆ(OÆ>PÇO:ÈCP  ËP  Ì-RÎ	 R6 Ï S ÏO7Ï3PÏ6O7Ï7PÏ:P	ÐPÐP	Ð	PÐP	Ð Q(Ð+2Q#ÑQ+ Ñ#Q(Ñ(Q+ Ñ+$RÒR3Ò2R3Ò6SÓSÓS'Ó&S'c           	      ót  € \         P                  ! 4       p\        P                  P	                  \
         V  2TVe%   \        P                  ! V4      P                  4       MR RVRR/R7      p\        P                  ! \        P                  P                  V^<R7      P                  4       ;'       g    R4      # )NzX-Browser-Use-API-KeyzContent-Typezapplication/json)rQ  ÚdataÚheadersr÷   s   {})r   Úget_browser_use_api_keyÚurllibr   ÚRequestÚBU_APIr‚   rœ   Úencoderƒ   Úurlopenr   )rˆ   rQ  ÚbodyrE  Úreqs   &&&  rK   Ú_browser_user¦  v  s—   € Ü
×
&Ò
&Ó
(€CÜ
�.‰.×
 Ñ
 Üˆ(�4�&ÐØØ+/Ò+;Œd�jŠj˜Ó×%Ñ%Ô'ÀØ(¨#¨~Ð?QÐRð	 !ó €Cô �:Š:”f—n‘n×,Ñ,¨S¸"Ð,Ó=×BÑBÓD×MÐMÈÓNÐNrY   c                 ó4  € V '       g   R # Rp\        ^4       F  p \        RV  2RRR/4        R # 	  V'       d   \        RV  RV 24      hR	#   \         d?   pTpT^8  d+   \        P                  ! RT^,           ,          4        Rp?Kt   Rp?Kz  Rp?ii ; i)
TNz
/browsers/ÚPATCHr|  ÚstoprT  zfailed to stop remote browser z: F)r_  r¦  ÚBaseExceptionrÄ   rË   r`  )Ú
browser_idÚstrictÚ
last_errorÚattemptrÒ   s   &&   rK   Ú_stop_cloud_browserr¯  �  s—   € ßÙØ€JÜ˜–8ˆð	0Ü˜: j \Ð2°G¸hÈÐ=OÔPÚñ ÷ ÜÐ;¸J¸<ÀrÈ*ÈÐVÓWÐWÙøô ô 	0ØˆJØ˜Œ{Ü—
’
˜3 '¨A¥+Õ.×/Ò/õ ûð	0ús   œAÁBÁ-BÂBc                 óœ   € \         P                  ! \        P                  P	                  V  R 2^R7      P                  4       4      R,          # )z/json/versionr÷   ÚwebSocketDebuggerUrl)r‚   rƒ   rŸ  r   r£  r   )Úcdp_urls   &rK   Ú_cdp_ws_from_urlr³  ’  s<   € Ü�:Š:”f—n‘n×,Ñ,°¨y¸Ð-FÐPRÐ,ÓS×XÑXÓZÓ[Ð\rÕsÐsrY   c                 óì   € ^ RI p V P                  4       pVR9   d   R# VR8X  dP   \        \        P                  P                  R4      ;'       g     \        P                  P                  R4      4      # R# )zVTrue when this machine plausibly has a browser we can open. False on headless servers.NTÚLinuxÚDISPLAYÚWAYLAND_DISPLAYF©ÚDarwinÚWindows)r   Úsystemr/  rc   rd   r„   )r   r»  s     rK   Ú_has_local_guir¼  –  sV   € ãØ�_‰_Ó€FØÐ&Ô&ÙØ�ÔÜ”B—J‘J—N‘N 9Ó-×RÐR´·±·±Ð@QÓ1RÓSÐSÙrY   c                óP  € ^ RI p^ RIpV '       g   R# \        V 4       \        4       '       g   \        RVP                  R7       R#  VP                  V ^R7       \        RVP                  R7       R#   \         d'   p\        RT R2TP                  R7        Rp?R# Rp?ii ; i)z8Print liveUrl and auto-open it locally if there's a GUI.Nu2   (no local GUI â€” share the liveUrl with the user)rV  ©Únewz((opened liveUrl in your default browser)z(couldn't auto-open: u%    â€” share the liveUrl with the user))r   Ú
webbrowserrL  r¼  r   r   rz   )r  r   rÀ  rq  s   &   rK   Ú_show_live_urlrÁ  ¡  s‚   € çß‘Ü	ˆ#„JÜ×ÒÜÐBÈÏÉÕTÙðaØ�‰˜ ˆÔ#ÜÐ8¸s¿z¹z×JøÜô aÜÐ% a SÐ(MÐNÐUX×U_ÑU_×`Ó`ûðaús   Á*A4 Á4B%Á?B Â B%c                 óÂ   € \         P                  P                  R4      p V f   R# V P                  4       P	                  4       pVR9   d   R# VR9   d   R# \        R4      h)zKWhether Cloud provisioning should print and open its interactive live view.ÚBH_OPEN_LIVE_URLTFzDBH_OPEN_LIVE_URL must be one of: 1, true, yes, on, 0, false, no, off>   Ú0ÚnoÚoffÚfalse>   Ú1ÚonÚyesÚtrue)rc   rd   r„   r,   rà   r%   )r@   r¢   s     rK   Ú_should_show_remote_live_viewrÌ  °  sU   € ä
�*‰*�.‰.Ð+Ó
,€CØ
‚{ÙØ�I‰I‹K×ÑÓ€EØÐ+Ô+ÙØÐ*Ô*ÙÜ
Ð[Ó
\Ð\rY   c                 ó:  € . ^r \        RV 2R4      p\        V\        4      '       d   VP                  R4      MTpV'       g    V # V F�  p\        RVR,           2R4      pT P	                  RVR,          RVP                  R4      RVP                  R4      RVP                  R4      ;'       g    . R	VP                  R	4      /4       Kƒ  	  \        V\        4      '       d-   \        V 4      VP                  R
\        V 4      4      8¼  d    V # V^,          pEK  )u¤  List cloud profiles under the current API key.

Returns [{id, name, userId, cookieDomains, lastUsedAt}, ...]. `cookieDomains`
is the array of domain strings the cloud profile has cookies for â€” use
`len(cookieDomains)` as a cheap 'how much is logged in' summary. Per-cookie
detail on a *local* profile before sync: `profile-use inspect --profile <name>`.

Paginates through all pages â€” the API caps `pageSize` at 100.z"/profiles?pageSize=100&pageNumber=ÚGETÚitemsz
/profiles/Úidrr   ÚuserIdÚcookieDomainsÚ
lastUsedAtÚ
totalItems)r¦  r  r  r„   r  r  )rB   r  ÚlistingrÏ  rW   Údetails         rK   Úlist_cloud_profilesr×  ½  s  € ð �AˆØ
ÜÐ!CÀDÀ6ÐJÈEÓRˆÜ(2°7¼D×(AÒ(A�—‘˜GÔ$ÀwˆßØð €Jó ˆAÜ! J¨q°­w¨iÐ"8¸%Ó@ˆFØ�J‰JØ�f˜T•lØ˜Ÿ
™
 6Ó*Ø˜&Ÿ*™* XÓ.Ø §¡¨OÓ!<×!BÐ!BÀØ˜fŸj™j¨Ó6ðö ñ ô �gœt×$Ò$¬¨S«°W·[±[ÀÌsÐSVËxÓ5XÔ)XØà€Jð 	��	‹rY   c                ó  € \        4        Uu. uF  qP                  R4      V 8X  g   K  VNK  	  ppV'       g   \        RV : R24      h\        V4      ^8”  d   \        \        V4       RV : R24      hV^ ,          R,          # u upi )zBFind a single cloud profile by exact name; raise if 0 or >1 match.rr   zno cloud profile named z< -- call list_cloud_profiles() or sync_local_profile() firstz cloud profiles named z! -- pass profileId=<uuid> insteadrÐ  )r×  r„   r`  r  )Úprofile_namerW   Úmatchess   &  rK   Ú_resolve_profile_namerÛ  Û  s‘   € ä-Ô/ÓQÑ/�Q·5±5¸³=ÀLÑ3P�qˆqÑ/€GÐQßÜÐ4°\Ñ4Dð  EAð  Bó  Cð  	CÜ
ˆ7ƒ|�aÔÜœc '›l˜^Ð+AÀ,ÑAQÐQrÐsÓtÐtØ�1�:�dÕÐùò Rs
   �B©Bc                ó  € \        4       p\        V 4      '       d   \        RV : RV : R24      hV'       d!   RV9   d   \        R4      h\        V4      VR&   \	        RRV4      p \        V R\        VR	,          4      R
VR,          /R7       T'       d   \        TP                  R4      4       T#   \         dD   p \        TP                  R4      RR7       h   \         d   p\        RYV.4      hRp?ii ; iRp?ii ; i)um  Provision a Browser Use cloud browser and start a daemon attached to it.

kwargs forwarded to `POST /browsers` (camelCase):
  profileId        â€” cloud profile UUID; start already-logged-in. Default: none (clean browser).
  profileName      â€” cloud profile name; resolved client-side to profileId via list_cloud_profiles().
  proxyCountryCode â€” ISO2 country code (default "us"); pass None to disable the BU proxy.
  timeout          â€” minutes, 1..240.
  customProxy      â€” {host, port, username, password, ignoreCertErrors}.
  browserScreenWidth / browserScreenHeight, allowResizing, enableRecording.

Returns the full browser dict including `liveUrl`. By default, prints that
URL and opens it locally when a GUI is detected. Set BH_OPEN_LIVE_URL to
0, false, no, or off (case-insensitive) to suppress only those display side
effects; the returned URL remains present.r\  z! already alive -- restart_daemon(z) firstÚ	profileIdz'pass profileName OR profileId, not bothz	/browsersÚPOSTré   ÚcdpUrlÚBU_BROWSER_IDrÐ  )rr   rë   T)r¬  z;remote daemon startup and cloud browser cleanup both failedNÚliveUrl)rÌ  rù   r`  rÛ  r¦  r�  r³  rª  r¯  r„   ÚBaseExceptionGrouprÁ  )rr   ÚprofileNameÚcreate_kwargsÚshow_live_viewÚbrowserÚstart_errorÚcleanup_errors   &&,    rK   Ústart_remote_daemonré  å  s  € ô 3Ó4€NÜ�D×ÒÜ˜W T¡HÐ,MÈdÉXÐU\Ð]Ó^Ð^ßØ˜-Ô'ÜÐHÓIÐIÜ%:¸;Ó%Gˆ�kÑ"Ü˜;¨°Ó>€GðÜØØÔ.¨w°xÕ/@ÓAÀ?ÐT[Ð\`ÕTaÐbõ	
÷ Ü�w—{‘{ 9Ó-Ô.Ø€Nøô ô ð	Ü §¡¨DÓ 1¸$Õ?ð 	øô ô 	Ü$ØMØÐ,óð ûð	þðús6   Á&(B2 Â2D Â>CÃC;ÃC8Ã&C3Ã3C8Ã8C;Ã;D c            	     ó®   € ^ RI p ^ RIp^ RIpVP                  R4      '       g   \	        R4      hV P
                  ! VP                  ! . RORRRR7      4      # )	zYDetected local browser profiles on this machine. Shells out to `profile-use list --json`.Núprofile-useúOprofile-use not installed -- curl -fsSL https://browser-use.com/profile.sh | shTrl   r   )rw   r\   r   )rë  Úlistz--json)r‚   rA  r'   rD  r`  rƒ   r(   )r‚   rA  r'   s      rK   Úlist_local_profilesrî    sM   € ç#Ó#Ø�<‰<˜×&Ò&ÜÐlÓmÐmØ�:Š:�j×-Ò-Ò.OÐVZÐelÐu~Ôó  Að  ArY   c           
     óR  € ^ RI p^ RIp^ RIpVP                  R4      '       g   \	        R4      h\
        P                  ! 4       pRRRV .p	V'       d   V	RV.,          p	V'       d   V	RV.,          p	T;'       g    .  F  p
V	RV
.,          p	K  	  T;'       g    .  F  p
V	R	V
.,          p	K  	  VP                  ! V	R
RRR
/ \        P                  CRV/CR7      pVP                  P                  VP                  4       VP                  P                  VP                  4       VP                  ^ 8w  d   \	        RVP                   R24      hV'       d   V# \        P                  ! RVP                  4      pV'       g   \	        RVP                   R24      hVP!                  ^4      # )u  Sync a local profile's cookies to a cloud profile. Returns the cloud UUID.

Shells out to `profile-use sync` (v1.0.5+). Requires BROWSER_USE_API_KEY.
profile-use copies the profile dir to a temp and syncs from the copy, so Chrome
can stay open.

Args:
  profile_name:       local Chrome profile name (as shown by `list_local_profiles`).
  browser:            disambiguate when multiple browsers have profiles of the
                      same name (e.g. "Google Chrome"). Default: any match.
  cloud_profile_id:   push cookies into this existing cloud profile instead of
                      creating a new one. Idempotent â€” call again to refresh
                      the same profile. Default: create new.
  include_domains:    only sync cookies for these domains (and subdomains).
                      Leading dot is optional. Example: ["google.com", "stripe.com"].
  exclude_domains:    drop cookies for these domains (and subdomains). Applied
                      before `include_domains` so exclude wins on overlap.Nrë  rì  Úsyncz	--profilez	--browserz--cloud-profile-idz--domainz--exclude-domainTrl   r   ÚBROWSER_USE_API_KEY)rw   r\   r   rv   rë   zprofile-use sync failed (exit r   z"Profile created:\s+([0-9a-f-]{36})z0profile-use did not report a profile UUID (exit )rA  r'   r   rD  r`  r   rž  ry   rc   rd   r|   rÉ   r   r{   ÚreÚsearchÚgroup)rÙ  ræ  Úcloud_profile_idÚinclude_domainsÚexclude_domainsrA  r'   r   rE  rF  ÚdÚrÚms   &&&&&        rK   Úsync_local_profilerû    s‘  € ÷& #Ó"Ø�<‰<˜×&Ò&ÜÐlÓmÐmÜ
×
&Ò
&Ó
(€CØ˜& +¨|Ð
<€CßØ�˜WÐ%Õ%ˆßØÐ$Ð&6Ð7Õ7ˆØ×"Ð" Ò"ˆØ�
˜AˆÕŠñ #à×"Ð" Ò"ˆØÐ" AÐ&Õ&Šñ #à�Š�s °À	ÐZ^ð  eOÔgi×gqÑgqð  eOð  tIð  KNñ  eOô  	P€AØ‡J�J×Ñ�Q—X‘XÔØ‡J�J×Ñ�Q—X‘XÔØ‡|�|�qÔÜÐ;¸A¿L¹L¸>ÈÐKÓLÐL÷ ØÐÜ
�	Š	Ð7¸¿¹ÓB€AßÜÐMÈaÏlÉlÈ^Ð[\Ð]Ó^Ð^Ø�7‰7�1‹:ÐrY   c                 óf   €  ^ RI Hp Hp  V! R4      #   T  d     R# i ; i  \         d     R# i ; i)zJInstalled version of the browser-harness package. Empty string if unknown.©ÚPackageNotFoundErrorÚversionúbrowser-harnessr¦   )Úimportlib.metadatarþ  rÿ  rz   rý  s     rK   Ú_versionr  F  s>   € ðßDð	ÙÐ,Ó-Ð-øØ#ô 	Úð	ûäô Úðús    ‚! ‹ “š! �ž! ¡0¯0c                 óè   € \        \        4      P                  4       P                  p V P                  V P                  P                  3 F$  pVR,          P	                  4       '       g   K"  Vu # 	  R# )uå  Return the repo root if this install is an editable git clone, else None.

Only the directories that could actually hold this package as source count:
the package's own parent (flat layout) and its grandparent (src layout).
Walking all the way up would claim any enclosing repository â€” a wheel
installed into a venv inside the user's project, or a tool install under a
dotfiles-managed $HOME â€” and run_update() would then `git pull` that repo
instead of upgrading browser-harness.
z.gitN)r   rO   rP   ÚparentÚis_dir)ÚpackageÚ	candidates     rK   Ú	_repo_dirr  R  sX   € ô ”8‹n×$Ñ$Ó&×-Ñ-€GØ—n‘n g§n¡n×&;Ñ&;Ó<ˆ	Ø˜Õ×&Ñ&×(Ô(ØÒñ =ñ rY   c                 óN   € \        4       '       d   R# \        4       '       d   R# R# )zM"git" for editable clone, "pypi" for an installed wheel, "unknown" otherwise.ÚgitÚpypiÚunknown)r  r  r&  rY   rK   Ú_install_moder  c  s   € ä‡{‚{ÙÜ—Z’Zˆ6Ð. YÐ.rY   c                  óŠ   €  \         P                  ! \        P                  R R7      4      #   \        \
        3 d    / u # i ; i)rl   )r\   )r‚   rƒ   ÚVERSION_CACHEra   r"   r%   r&  rY   rK   Ú_cache_readr  j  s=   € ðÜ�zŠzœ-×1Ñ1¸7Ð1ÓCÓDÐDøÜ”ZÐ ô ØŠ	ðús   ‚), ¬AÁAc                 ó  €  \         P                  P                  R R R7       \         P                  \        P
                  ! V 4      4        \        P                  ! \         R4       R#   \         d     R# i ; i  \         d     R# i ; i)T©rQ   Úexist_okrÂ   N)	r  r  Úmkdirr¡   r‚   rœ   rc   Úchmodr"   )rœ  s   &rK   Ú_cache_writer  q  sm   € ðÜ×Ñ×"Ñ"¨4¸$Ð"Ô?Ü× Ñ ¤§¢¨DÓ!1Ô2ð	Ü�HŠH”] EÖ*øÜô 	Úð	ûäô Úðús0   ‚A
A< ÁA* Á*A9Á5A< Á8A9Á9A< Á<BÂ
Bc                óX  € \        4       p\        P                  ! 4       pV '       gB   VP                  R4      '       d+   W!P                  R^ 4      ,
          \        8  d
   VR,          #  \        P
                  ! \        P                  P                  \        ^R7      P                  4       4      P                  R/ 4      P                  R4      ;'       g    RpTP                  R4      p\        / TCRTRT/C4       T;'       g    R#   \         d    TP                  R4      u # i ; i)	zLReturn latest PyPI version, or None. Cached for 24h to avoid hammering PyPI.ÚtagÚ
fetched_atr÷   Úinforÿ  r¦   rh   N)r  rÄ   r„   ÚVERSION_CACHE_TTLr‚   rƒ   rŸ  r   r£  Ú	PYPI_JSONr   rz   Úlstripr  )ÚforceÚcacheÚnowr  s   &   rK   Ú_latest_release_tagr!  }  sí   € ä‹M€EÜ
�)Š)‹+€Cß�U—Y‘Y˜u×%Ò%¨#·	±	¸,ÈÓ0JÕ*JÔM^Ô*^Ø�U�|Ðð Ü�jŠjœŸ™×/Ñ/´	À1Ð/ÓE×JÑJÓLÓM×QÑQÐRXÐZ\Ó]×aÑaÐbkÓl×rÐrÐprˆð �*‰*�S‹/€CÜÐ9�EÐ9˜5 # |°SÑ9Ô:Ø�;ˆ;�$Ðøô	 ô  Ø�y‰y˜ÓÒð ús   Á*A,D
 ÃD
 Ä
D)Ä(D)c                ó,  € \         P                  ! RT ;'       g    R\         P                  4      pV'       g   R# VP                  ^4      P	                  R4      R,           Uu. uF  p\        V4      NK  	  ppVP                  ^ .^\        V4      ,
          ,          4       VP                  ^4      ;'       g    RP                  4       pR^ R^R^/P                  V^4      p\        VP                  ^4      ;'       g    ^ 4      p. VOVNVN5# u upi )	z9Best-effort PEP 440-ish parse: alpha < beta < rc < final.z'^\s*v?(\d+(?:\.\d+)*)(?:(a|b|rc)(\d+))?r¦   r™   :Né   NÚaÚbÚrc)r   r   r   r#  r   )
rò  ÚmatchÚIrô  r$   r   Úextendr  rà   r„   )rh   rú  rW   ÚnumsÚpreÚpre_rankÚpre_nums   &      rK   Ú_version_tupler.  Œ  sä   € ä
�ŠÐ;¸Q¿W¸WÀ"ÄbÇdÁdÓK€AßØÐØŸG™G A›J×,Ñ,¨SÓ1°"Ö5Ó6Ñ5�qŒC�ŽFÑ5€DÐ6Ø‡K�K���qœ3˜t›9•}Õ%Ô&Ø�7‰7�1‹:×Ð˜×
"Ñ
"Ó
$€CØ�Q˜˜Q  aÐ(×,Ñ,¨S°!Ó4€HÜ�!—'‘'˜!“*—/�/ Ó"€GØ%ˆTÐ%�8Ð%˜WÑ%Ð%ùò 7s   Á$Dc                 óš   € \        4       p \        4       p\        T ;'       d"    T;'       d    \        V4      \        V 4      8„  4      pWV3# )zf(current, latest, newer_available). latest may be None if the API was unreachable and no cache exists.)r  r!  r/  r.  )ÚcurÚlatestÚnewers      rK   Úcheck_for_updater3  ™  sE   € ä
‹*€CÜ Ó"€FÜ�×PÐP˜×PÐP¤N°6Ó$:¼^ÈCÓ=PÑ$PÓQ€EØ˜ÐÐrY   c                óÀ  € ^ RI p\        P                  P                  RR4      P	                  4       P                  4       R
9   d   R# T ;'       g    VP                  p \        4       p\        P                  ! R4      pVP                  R4      V8X  d   R# \        4       w  rEpV'       g   R# \        RV RV 2V R7       \        R	V R7       \        / VCRV/C4       R# )zRPrint the update banner to stderr once per day. Silent when up-to-date or offline.NÚBH_UPDATE_CHECKr¦   z%Y-%m-%dÚbanner_shown_onz$[browser-harness] update available: ú -> rV  z][browser-harness] agents: run `browser-harness --update -y` to upgrade and restart the daemon>   rÄ  rÅ  rÆ  rÇ  )r   rc   rd   r„   r,   rà   r   r  rÄ   Ústrftimer3  rL  r  )rB   r   r  Útodayr0  r1  r2  s   &      rK   Úprint_update_bannerr:  ¡  s»   € ãÜ	‡z�z‡~�~Ð'¨Ó,×2Ñ2Ó4×:Ñ:Ó<Ð@[Ô[ÙØ
×
Ð
�—‘€CÜ‹M€EÜ�MŠM˜*Ó%€EØ‡y�yÐ"Ó# uÔ,ÙÜ)Ó+Ñ€C�ßÙÜ	Ð0°°°T¸&¸Ð
BÈÕMÜ	ÐiÐqtÕuÜÐ4�EÐ4Ð,¨eÑ4Ö5rY   c                 óD  a€ ^ RI p ^ RIpV P                  4       p VR8X  d   VP                  ! R.RR^R7      oR	pMVP                  ! . R
ORR^R7      oRp\        ;QJ d    V3R lV 4       F  '       g   K   R# 	  R# ! V3R lV 4       4      #   \
         d     R# i ; i)zFCross-platform best-effort check for a running Chromium-based browser.Nrº  ÚtasklistTr   )rw   r   r   c              3   ód   <"  € T F%  qP                  4       SP                  4       9   x € K'  	  R # 5ir‘   rß   )Ú.0ÚnrB   s   & €rK   Ú	<genexpr>Ú"_chrome_running.<locals>.<genexpr>¾  s    øé € Ð;±U°—7‘7“9 §	¡	£Ö+³Uùs   ƒ-0F)z
chrome.exez
msedge.exez
helium.exe)r   z-Ar   zcomm=)úGoogle ChromeÚchromer@  úMicrosoft EdgeÚmsedgeÚhelium)r   r'   r»  r(   Úanyrz   )r   r'   r»  r  rB   s       @rK   Ú_chrome_runningrH  ³  s–   ø€ çØ�_‰_Ó€Fð	Ø�YÔØ×)Ò)¨:¨,¸TÈ)Ð]^Ô_ˆCØ>‰Eà×)Ò)Ò*EÈDÐYbÐlmÔnˆCØaˆEß‹sÔ;±UÓ;�sŒsÐ;ŠsÐ;ˆsÔ;±UÓ;Ó;Ð;øÜô Úðús.   ›B ¢>B Á!B Á8B Á;B Á?B ÂBÂBc                ó¢   € RP                  R \        V 4      P                  RR  4       4      p\         F  w  r#rEW!9   g   K  W4V3u # 	  \        # )zG(mac app, posix commands, windows target) for the browser w profile dirÚ/c              3   ó@   "  € T F  qP                  4       x € K  	  R # 5ir‘   rß   )r>  rW   s   & rK   r@  Ú'_browser_launch_spec.<locals>.<genexpr>Ø  s   é € Ð=Ñ'< !—G‘G—I�IÓ'<ùs   ‚Néþÿÿÿ)Újoinr   ÚpartsÚ_BROWSER_LAUNCHÚ_DEFAULT_LAUNCH)ÚbaserA   ÚfragÚmac_appÚ
posix_cmdsÚ
win_targets   &     rK   Ú_browser_launch_specrW  Ö  sO   € à�8‰8Ñ=¤t¨D£z×'7Ñ'7¸¸Ñ'<Ó=Ó=€Dß1@Ñ-ˆ�zØŽ<Ø¨Ð4Ò4ñ 2Aô ÐrY   c                ó$  aa€ \        V 4      P                  P                  4       P                  R4      p\	        V4      w  r4pV.VOVN5pR oS! V4      o\
        ;QJ d     VV3R lV 4       F  '       g   K   R# 	  R# ! VV3R lV 4       4      # )z9True when an explicit browser binary belongs to ``base``.z.exec                 ób   € R P                  R T ;'       g    R P                  4        4       4      # )r¦   c              3   óT   "  € T F  qP                  4       '       g   K  Vx € K   	  R # 5ir‘   )Úisalnum)r>  Úchars   & rK   r@  ÚE_browser_binary_matches_profile.<locals>.normalize.<locals>.<genexpr>æ  s   é € ÐPÑ(= ÇÁÇ—t’tÓ(=ùs   ‚(ž
()rN  rà   )r¢   s   &rK   Ú	normalizeÚ2_browser_binary_matches_profile.<locals>.normalizeå  s&   € Ø�w‰wÑP¨¯¨°"×(;Ñ(;Ô(=ÓPÓPÐPrY   c              3   ó:   <"  € T F  pSS! V4      8H  x € K  	  R # 5ir‘   r&  )r>  r  r^  Únormalized_names   & €€rK   r@  Ú2_browser_binary_matches_profile.<locals>.<genexpr>é  s   øé € ÐSÉ
¸9ˆ¡)¨IÓ"6Ö6Ë
ùs   ƒTF)r   rr   rà   ÚremovesuffixrW  rG  )	ÚbinaryrR  rr   rT  rU  rV  Ú
candidatesr^  ra  s	   &&     @@rK   Ú_browser_binary_matches_profilerf  ß  s�   ù€ ä�‹<×Ñ×"Ñ"Ó$×1Ñ1°&Ó9€DÜ&:¸4Ó&@Ñ#€G˜ØÐ3˜JÐ3¨
Ñ3€JòQñ   “o€Oß‹3ÕSÉ
ÓS�3Œ3ÐSŠ3ÐSˆ3ÕSÉ
ÓSÓSÐSrY   c                ó²  € V '       g   . #  \         P                  ! \        V 4      R,          P                  RRR7      4      pVP	                  R4      ;'       g    / P	                  R4      ;'       g    Rp\        V\        4      '       d'   \        V 4      V,          P                  4       '       g   . # RV 2.#   \
        \        \        3 d    Rp L^i ; i)	z&Relaunch skips Chrome's profile pickerúLocal Staterl   r   r[   ÚprofileÚ	last_usedÚDefaultz--profile-directory=)r‚   rƒ   r   ra   r„   r"   r%   r:   r  r)   r  )rR  Ústaterl  s   &  rK   Ú_profile_directory_argsrm  ì  s¸   € çØˆ	ðÜ—
’
œD ›J¨Õ6×AÑAÈ7Ð[dÐAÓeÓfˆØ—‘˜9Ó%×+Ð+¨×0Ñ0°Ó=×KÐKÀ)ˆô �dœC× Ò ¬¨d«°dÕ):×(BÑ(B×(DÒ(DØˆ	Ø" 4 &Ð)Ð*Ð*øô	 ”Z¤Ð0ô ØŠðús   ŒAB; ÁB; Á4B; Â;CÃCc                 óŠ  a€ ^ RI p ^ RIp^ RIp^RIHpHp V! 4       pTV Uu. uF,  qfV9  g   K  VR,          P                  4       '       g   K*  VNK.  	  up,           pV P                  4       pR F÷  p	\        P                  P                  V	4      ;'       g    RP                  4       p
V
'       g   KD  \        V
4      P                  4       P                  4       '       g   Ks   \        V
4      P                  4       oVP                  ! \!        S4      .3RVP"                  RVP"                  /\$        P&                  ! 4       B pVR9  d   \)        V3R	 lV 4       R4      MRpW¼3u # 	  V'       d
   V^ ,          M\)        R
 V 4       R4      pV'       d   \/        V4      M\0        w  rÞp\3        V4      p VR8X  d|   RRV.V'       d   R.V,           M. ,           pVP4                  ! V^
RRR7      pVP6                  ^ 8w  d    VR8w  d   VP4                  ! . RO^
RRR7      pVP6                  ^ 8X  d   RV3# R# VR8X  dA   VP                  ! RRRRT;'       g    R.V,           3/ \$        P&                  ! 4       B  RV3# T;'       g    \0        ^,           Fg  pVP9                  V4      pV'       g   K  VP                  ! V.V,           3RVP"                  RVP"                  /\$        P&                  ! 4       B pW¶3u # 	  R# u upi   \*        TP,                  3 d     EK´  i ; i  \*        TP,                  3 d     R# i ; i)aI  Prefers the browser whose profile already has perm box checked.

Returns ``(process, profile)`` on success. ``process`` is available only
when we launched the browser directly; ``profile`` is the user-data dir we
expect that browser to use. The caller uses both to clean up a direct
launch that never becomes reachable over CDP.
N)ÚPROFILESrZ  rh  r¦   r|   r   r¹  rº  c              3   óP   <"  € T F  p\        SV4      '       g   K  Vx € K  	  R # 5ir‘   )rf  )r>  rR  rd  s   & €rK   r@  Ú"_launch_browser.<locals>.<genexpr>  s   øé € Ðf¡n˜dÔ8WÐX^Ð`d×8e—T’T£nùs   ƒ&œ
&c              3   ób   "  € T F%  qR ,          P                  4       '       g   K!  Vx € K'  	  R# 5i)rh  N)rS   )r>  r%  s   & rK   r@  rq    s    é € Ð+`±x°!ÈÕDU×C]ÑC]×C_¯AªA³xùs   ‚/¥
/r   ú-az--argsFT©r   Úcheckrv   rB  rF  z/cÚstartrC  r:  r¸  )r   rs  rB  )r   rA  r'   rj  ro  rZ  rS   r»  rc   rd   r„   r,   r   rB  rC  ra  r)   r*   rn   rc  Únextr"   r+   rW  rQ  rm  ry   r{   rD  )r   rA  r'   ro  rZ  ÚenabledrR  Úknown_profilesr»  rE  r@   Úprocessri  rT  rU  rV  Úprofile_argsrF  rù  rG  rd  s                       @rK   ri  ri  ú  s  ø€ ÷ (Ó'ßBá.Ó0€GØÙ!ó Ù!�°Ñ%8Œ¸dÀ]Õ>R×=ZÑ=Z×=\�ˆ™ñ õ €Nð �_‰_Ó€FÛ0ˆÜ�z‰z�~‰~˜cÓ"×(Ð( b×/Ñ/Ó1ˆß‰3”4˜“9×'Ñ'Ó)×1Ñ1×3Ô3ðÜ˜c›×-Ñ-Ó/�Ø$×*Ò*Ü˜“[�Mñà%×-Ñ-ðà6@×6HÑ6HðäLO×L\ÒL\ÓL^ñ�ð Ð#8Ô8ô Üf¡nÓfØôð ?Cð ð Ð'Ò'ñ 1÷& !ˆ7�1Ž:¤dÑ+`±xÓ+`ÐbfÓ&g€DßDHÔ&:¸4Ô&@ÌoÑ#€G˜Ü*¨4Ó0€LðØ�XÔØ˜4 Ð)Ï,¨h¨Z¸,Ö-FÐ\^Õ_ˆCØ—’˜s¨B°eÈDÔQˆAØ�|‰|˜qÔ  W°Ô%?à—N’NÒ#BÈBÐV[ÐlpÔq�Ø#$§<¡<°1Ô#4�D˜$�<Ð>¸$Ð>Ø�YÔà×Ò˜e T¨7°B¸
×8NÐ8NÀhÐOÐR^Õ^ÑuÔbe×brÒbrÓbtÒuØ˜�:ÐØ×3Ð3¤°Õ!3Ò3ˆCØ—‘˜SÓ!ˆAß‰qØ$×*Ò*Ø�C˜,Õ&ñà%×-Ñ-ðð &×-Ñ-ðô ×&Ò&Ó(ñ	�ð �}Ò$ñ 4ñ ùòa øô$ ˜Z×7Ñ7Ð8ô ó ðûô> �Z×/Ñ/Ð0ô Úðúsg   ¢L¯LÁLÃ#BLÆ6L' Ç	A,L' È6L' È8L' É&L' É?L' Ê'L' Ê4A
L' Ë?L' ÌL$Ì#L$Ì'MÍMc                óz  € V '       g   R# V w  rVe   Ve   VP                  4       e   R# ^RIHp V! V4      '       d   R# ^ RIp \        P
                  '       d   VP                  4        R# \        P                  ! VP                  VP                  4       R#   \        \        P                  3 d     R# i ; i)zCStop a browser we launched when the daemon attached somewhere else.N)Ú_devtools_port_live)rf  rj  r}  rˆ  rn   r  Ú	terminaterc   Úkillpgr>   r‹  r"   r'   r+   )Úlaunchrz  ri  r}  rˆ  s   &    rK   re  re  ;  sˆ   € çÙØÑ€GØ‚˜'š/¨W¯\©\«^Ò-GÙå+á˜7×#Ò#ÙãðÜ�>�>ˆ>Ø×ÑÖä�IŠI�g—k‘k 6§>¡>Ö2øÜ”Z×/Ñ/Ð0ô Úðús   ÁB ÁB Á.+B ÂB:Â9B:c            	     ó0  € ^ RI p ^ RIp^ RIpRpV P                  4       R8X  d5    VP                  ! RRRRRV R2.^R	R
R7      pVP
                  ^ 8X  d   R
#   \        VP                  V^R7      4      #   \         d     L*i ; i  \         d     R	# i ; i)zJOpen chrome://inspect/#remote-debugging so the user can tick the checkbox.Nz"chrome://inspect/#remote-debuggingr¹  Ú	osascriptz-ez,tell application "Google Chrome" to activatez3tell application "Google Chrome" to open location "r_   FTrt  r¾  )	r   r'   rÀ  r»  ry   r{   rz   r/  r   )r   r'   rÀ  r  rù  s        rK   Ú_open_chrome_inspectrƒ  S  s°   € ç+Ó+Ø
.€CØ‡�Ó˜HÔ$ð		Ø—’ØØÐDØÐKÈCÈ5ÐPQÐRð ð  °dô	<ˆAð
 �|‰|˜qÔ Ùð !ðÜ�J—O‘O C¨Q�OÓ/Ó0Ð0øô ô 	Ùð	ûô ô Úðús#   ¥0A5 ÁB Á5BÂBÂBÂBg     €f@c                 óx  € \         P                  ! 4       p  \        P                  ! 4       V P                  4       P                  ,
          \
        8  d   R#  \        4       '       g   R#  V P                  P                  RRR7       V P                  4        R#   \         d     LOi ; i  \         d     R# i ; i)zLOpen chrome://inspect at most once per INSPECT_REOPEN_TTL across invocationsNTr  )r   Úinspect_markerrÄ   ÚstatÚst_mtimeÚINSPECT_REOPEN_TTLr"   rƒ  r  r  Útouch)Úmarkers    rK   rk  rk  k  s˜   € ä×!Ò!Ó#€FðÜ�9Š9‹;˜Ÿ™›×/Ñ/Õ/Ô2DÔDÙð Eô  ×!Ò!ÙðØ�‰×Ñ D°4ÐÔ8Ø�‰Žøô ô Ùðûô ô Úðús#   —=B Á*-B* ÂB'Â&B'Â*B9Â8B9c            	     óV  € ^ RI p ^ RIp\        4       p\        4       p\	        4       p\        4       p\        4       p \        P                  ! 4       pVP                  R4      R8H  p	\        4       p
\        T;'       d"    T
;'       d    \        V
4      \        V4      8„  4      pT;'       g    Rp\!        4       pR)R	 lp\#        R
4       \#        RV P%                  4        RV P'                  4        24       \#        RVP(                  P+                  4       ^ ,           24       \#        RV RV R24       V
'       d!   \#        RV
 2V'       d   RMR,           4       M\#        R4       V P%                  4       R8X  db   \-        4       w  ppV'       dM   V'       dE   \/        V4      '       d4   \#        R4       \#        RV R24       \#        R4       \#        RV 24       T! RYD'       d   RMR4       T! RYU'       d   RMR4       V! R\        V4      \        \1        V4      4      4       V Fs  pVP                  R4      pV'       dB   \3        VR ,          4      p\3        VR!,          4      p\#        R"VR#,           R$V R%V 24       K]  \#        R"VR#,           R&24       Ku  	  T! R'Y—P                  R4      ;'       g    VP                  R4      ;'       g    R(4       V'       d   V'       d   ^ # ^#   \        P                  \        3 d   pRRRRR\        T4      /p Rp?ELÒRp?ii ; i)*z;Read-only diagnostics. Exit 0 iff everything looks healthy.NÚstatusr  ÚsourceÚreasonÚauthenticatedz	(unknown)r¦   c                 óf   € V'       d   R MRp\        RT RT  V'       d
   RV,           MR 24       R# )zok  ÚFAILz  [z] õ    â€” r¦   N)rL  )ÚlabelrJ   rÖ  Úmarks   &&& rK   ÚrowÚrun_doctor.<locals>.row�  s.   € ß‰v ˆÜ��D�6˜˜E˜7¿ G¨fÖ$4ÀRÐ"HÐIÖJrY   zbrowser-harness doctorz  platform          Ú z  python            z  version           z (r   z  latest release    z (update available)z*  latest release    (could not reach PyPI)rµ  z[snap-detect]z	Browser: u;    (snap) â€” WARNING: Snap confinement prevents CDP binding.z@  Fix: Install Chrome natively (see docs/snap-linux-headless.md)z  Docs: zchrome runningzstart chrome/edgezdaemon alivezsee install.mdzactive browser connectionsr  r  r  z        rr   u    â€” active page: r’  u     â€” active page: (no real page)zBrowser Use cloud authz$optional: browser-harness auth login)r¦   )r   r   r  r  rH  rù   r$  r   Úauth_statusÚ	AuthErrorr"   r)   r„   r!  r/  r.  rJ  rL  r»  Úreleaserÿ  r$   rH  r3  r  r+  )r   r   r0  ÚmoderC  rj  ÚconnectionsÚ
auth_staterq  Ú
cloud_authr1  r2  Úcur_displayÚdoc_urlr•  ÚbnameÚbpathr#  r  r  r  s                        rK   Ú
run_doctorr£  |  sÆ  € çÜ
‹*€CÜ‹?€DÜÓ€FÜ‹^€FÜ%Ó'€KðKÜ×%Ò%Ó'ˆ
ð —‘ Ó)¨_Ñ<€JÜ Ó"€Fô �×PÐP˜×PÐP¤N°6Ó$:¼^ÈCÓ=PÑ$PÓQ€EØ×$Ð$˜€KÜ*Ó,€GôKô 
Ð
"Ô#Ü	Ð  §¡Ó!2Ð 3°1°X×5EÑ5EÓ5GÐ4HÐ
IÔJÜ	Ð  §¡×!2Ñ!2Ó!4°QÕ!7Ð 8Ð
9Ô:Ü	Ð   ¨R°¨v°QÐ
7Ô8ßÜÐ$ V HÐ-Ï%Ñ1FÐUWÕXÕYäÐ:Ô;Ø‡�Ó˜GÔ#Ü;Ó=‰ˆˆuß—UÔ/°×6Ò6Ü�/Ô"Ü�I˜e˜WÐ$_Ð`ÔaÜÐTÔVÜ�H˜W˜IÐ&Ô'ÙÐ˜&®¡"Ð4GÔHÙˆ˜¦f¡Ð2BÔCÙÐ$¤d¨;Ó&7¼¼SÀÓ=MÓ9NÔOÛˆØ�x‰x˜ÓˆßÜ& t¨G¥}Ó5ˆEÜ$ T¨%¥[Ó1ˆCÜ�H˜T &�\˜NÐ*<¸U¸GÀ5ÈÈÐNÖOä�H˜T &�\˜NÐ*JÐKÖLñ ñ Ð  *¯n©n¸XÓ.F÷  /Mð  /MÈ*Ï.É.ÐYaÓJb÷  /Mð  /Mð  gMô  NçŸFˆ1Ð*¨Ð*øôU �N‰NœGÐ$ô KØ ¨°4¸Ä3ÀqÃ6ÐJŽ
ûðKús   ¼K1 Ë1L(ÌL#Ì#L(c                ó¦  € \        V 4      pV'       d   RM	\        4       p\        \        4      pT;'       g    \	        \        4      pV'       d   T;'       d    TMT;'       g    T;'       d    TpR^RTRTR\        4       ;'       g    RR\        4       RVRR	\        R
VRV//p\        \        P                  ! VRR7      4       V'       d   ^ # ^# )a  Print a stable, non-networked runtime health report as JSON.

The strict mode is intended for trusted orchestrators that provision an
exact named daemon. It checks only that selected daemon and its live CDP
connection; it never starts, repairs, or discovers another daemon.
NÚschema_versionÚhealthyrƒ  rÿ  Úinstall_modeÚchrome_runningrj  rr   ÚaliveÚbrowser_readyT)r—   )
r/  rH  r!  rp   rù   r  r  rL  r‚   rœ   )rƒ  r¬  rC  rª  rj  r¦  Úreports   &      rK   Úrun_doctor_jsonr¬  ³  sÄ   € ô Ð)Ó*€Fß‰T¤Ó!2€FÜ(¬Ó.€MØ×0Ð0œl¬4Ó0€Fß,2ˆv×'Ð'˜-ø¸×9]Ð9]È6×K\ÐK\ÐV\€Gà˜!Ø�7Ø! 6Ø”8“:×%Ð% Øœ›Ø˜&ØØ”DØ�VØ˜]ð
ð€Fô 
Œ$�*Š*�V tÔ
,Ô-ßˆ1Ð˜QÐrY   c                 óæ   € V'       d   R # V'       d   RMRp \        V  RV R24      P                  4       P                  4       pT'       g   T# TP	                  R4      #   \         d    Tu # i ; i)Tz[Y/n]z[y/N]r—  Úy)Úinputr,   rà   ÚEOFErrorr   )ÚquestionÚdefault_yesrÊ  r  Úanss   &&&  rK   Ú_prompt_yesr´  Ð  sp   € ß
Ùß#‰W¨€FðÜ�x�j  & ¨Ð+Ó,×2Ñ2Ó4×:Ñ:Ó<ˆ÷ ØÐØ�>‰>˜#ÓÐøô	 ô ØÒðús   ˜-A  Á A0Á/A0c                óÖ  € ^ RI p^ RIp\        4       w  r4pV'       d"   V'       d   V'       g   \        RV R24       ^ # V'       d   V'       d   \        RV RV 24       M#V'       d   \        RV R24       M\        R4       \	        4       pVR	8X  Ed   \        4       pVP                  ! R	R
\        V4      RR.RRR7      pVP                  ^ 8w  d5   \        RVP                  P                  4        2VP                  R7       ^# VP                  P                  4       '       d;   \        RV 2VP                  R7       \        RV,          VP                  R7       ^# VP                  ! R	R
\        V4      RR.4      p	V	P                  ^ 8w  d   V	P                  # MRVR8X  d3   VP                  ! . RO4      p
V
P                  ^ 8w  d   V
P                  # M\        RVP                  R7       ^# \        4       pVP                  RR4       \        V4       \        4       '       d6   \!        RRV R7      '       d   \#        4        \        R4       M\        R4       \        R4       ^ # )zƒPull the latest version and (after prompt) restart the daemon so it picks up changed code.

Exit 0 on success, non-zero on failure.Nzbrowser-harness is up to date (z).zupdating browser-harness: r7  z1installed version unknown; will try to update to r™   z0could not reach PyPI; will try to update anyway.r
  z-CrŒ  z--porcelainT)rv   rw   zgit status failed: rV  z+refusing to update: uncommitted changes in z=commit or stash them first, or run `git -C %s pull` yourself.Úpullz	--ff-onlyr  z(unknown install mode; can't auto-update.r6  z7restart the running daemon so it picks up the new code?)r²  rÊ  zDdaemon stopped; it will auto-restart on next `browser-harness` call.zldaemon left running on old code. run `browser-harness` and it'll use the new code after the daemon recycles.zupdate complete.)ÚuvÚtoolÚupgrader   )r'   r   r3  rL  r  r  ry   r)   r{   r   r,   r|   r  Úpopr  rù   r´  r^  )rÊ  r'   r   r0  r1  r2  r›  ÚreporŒ  rù  Útool_upgrader  s   &           rK   Ú
run_updater½  Ý  s   € ÷ Ü)Ó+Ñ€C�÷ �vŸeÜÐ/°¨u°BÐ7Ô8Ùß
�vÜÐ*¨3¨%¨t°F°8Ð<Õ=ß	ÜÐAÀ&ÀÈÐKÕLäÐ@ÔAä‹?€DØˆu…}Ü‹{ˆØ—’ ¨¬c°$«i¸À=Ð QÐbfÐmqÔrˆØ×Ñ Ô!ÜÐ'¨¯©×(;Ñ(;Ó(=Ð'>Ð?ÀcÇjÁjÕQÙØ�=‰=×Ñ× Ò ÜÐ?À¸vÐFÈSÏZÉZÕXÜÐQÐTXÕXÐ_b×_iÑ_iÕjÙØ�NŠN˜E 4¬¨T«°F¸KÐHÓIˆØ�<‰<˜1ÔØ—<‘<Ðð à	�ŒØ!—~’~Ò&RÓSˆØ×"Ñ" aÔ'Ø×*Ñ*Ð*ð (ô 	Ð8¸s¿z¹zÕJÙô ‹M€EØ	‡I�IÐ Ô&Ü�Ôä‡~‚~ÜÐPÐ^bÐhk×lÓlÜÔÜÐXÕYäð  Aô  BÜ	Ð
ÔÙrY   i€Q r‘   )NNN)Úremote)NF)F)r¾  N)NNNN)	)zchrome canaryzGoogle Chrome Canary)zgoogle-chrome-canaryrC  )r@  ÚChromium)r@  r?  r@  )rC  rB  )r=  r>  rC  )ÚedgerD  )úmicrosoft-edgezmicrosoft-edge-stablerE  )zbrave-originzBrave Originr&  N)ÚbravezBrave Browser)zbrave-browserrÂ  rÂ  )ÚarcÚArcr&  N)ÚdiaÚDiar&  N)ÚcometÚCometr&  N)rB  )r=  r>  r@  r?  rÁ  rC  )TF)`r‚   rc   rò  rŸ   r  r'   r   rÄ   Úurllib.requestrŸ  Úpathlibr   r¦   r   rn   r   r   rL   rX   rT   rd   r„   rp   r¡  r  Ú
config_dirr  r  r)  rs   r   r�   r�   r“   r•   r¤   r©   r«   r­   rã   rå   rç   rì   rô   rù   r
  r  r  r!  r$  r'  r+  r3  r8  rH  rJ  rN  r�  rƒ  r]  r^  r¦  r¯  r³  r¼  rÁ  rÌ  r×  rÛ  ré  rî  rû  r  r  r  r  r  r!  r.  r3  r:  rH  rP  rQ  rW  rf  rm  ri  re  rƒ  rˆ  rk  r£  r¬  r´  r½  r&  rY   rK   Ú<module>rÌ     só  ðÛ Û 	Û 	Û Û Û Û 
Û Û Ý å Ý Ý òXòvòJñ 
„à	‡z�z‡~�~�i Ó+€Ø	-€Ø8€	Ø× Ò Ó"Ð%9Õ9€ØÐ ØÐ òò$ò44ò,Zò=ò
	òôô ÷<ñ <ò~ò&)ò7ô
ò'ô/ôò$ò&ô$@ò
ò&ô
Gõ3õ
6òò8bòô0wfôt[ô,-ôHôVOôò"tòòaò
]òò<ô'òTAô,ò^	òò"/òò	ôò
&òô6ò$ð €ð€òò
Tò+ò>òBò0ð* Ð òò"4+ônô:
ö4rY   