+
    …WÝja«  ã                  ó–  € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIH	t	H
t
Ht ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHtHt ^ R	IHtHtHt ^ R
IHtHt ^ RIHtH t H!t!H"t"H#t# ^ RI$H%t%H&t&H't'H(t(H)t) ^ RI*H+t+H,t, ^ RI-H.t.H/t/H0t0H1t1 ]Pd                  ! ]34      t4RRRRRR/R lt5R R lt6R R lt7R R lt8R R lt9RRRRRR/R R  llt:]! R!R"7       ! R# R$4      4       t;RR/R% R& llt<R' R( lt=R) R* lt>R+ R, lt?R- R. lt@R/ R0 ltAR1 R2 ltBR3 R4 ltCR5^/R6 R7 lltDR8tER9 R: ltFR; R< ltGR= R> ltHR? R@ ltIRA RB ltJ]
RC 4       tKRD RE ltLRF RG ltMRH RI ltNRJ RK ltOR‰RLRRMRRNR/RO RP llltPRŠRRRR/RQ RR llltQ ! RS RT4      tR]
RU 4       tSRVRRWRRR!RRRRRRRXR/RY RZ lltTRVR/R[ R\ lltUR]R/R^ R_ lltVR` Ra ltWRb Rc ltXRd Re ltYRfRRgRR]R/Rh Ri lltZRj Rk lt[]
Rl Rm l4       t\Rn Ro lt]Rp Rq lt^Rr Rs lt_RtR/Ru Rv llt`RŠRWRRgRRwRRxR/Ry Rz llltaR{R!/R| R} lltbR{R!/R~ R lltcR€ R� ltdR‚ Rƒ lteR„R/R… R† lltfR‡ Rˆ ltgR# )‹zlensure(): make the installed state match the lockfile for a package,
and hand back its composed environment.)ÚannotationsN)Ú	ExitStackÚcontextmanagerÚnullcontext)Ú	dataclass)ÚPath)ÚOptional)Úpaths)ÚDownloadPausedÚ
ProgressFn)ÚnativeÚremove_treeÚ
retry_held)ÚFactsÚLockfile)ÚInstallErrorÚPackageÚRunnerÚStatePackageÚcompose_env)Ú
CandidatesÚMembersÚPluginInputÚ	SelectionÚStagedUpdate)Úget_packageÚwalk)ÚStoreÚcurrent_targetÚ
merge_treeÚtree_digestÚprogressÚpause_eventÚdownload_progressc               óÔ  aaa€ VVV3R  lp	VR,          p
VP                  SW)VR7      p\        V4       Fž  w  rÍVe"   VP                  4       '       d   \        R4      hSe5   \	        S4      ^8”  d   V^,            R\	        S4       2MRpS! R^ ^ V4       V^ 8X  d   T
MVRV 2,          pV P                  WßV4       V'       g   K“  \        Wú4       K   	  V P                  WWE4       V
# )c                óú   <a€ Sef   \        \        V4      4      o\        V3R l\        S4       4       4      p\        S4      ^8”  d   V^,            R\        S4       2MRpS! RWV4       Se   S! WV4       R # R # )Nc              3  óL   <"  € T F  w  rVR ,          S8X  g   K  Vx € K  	  R# 5i)ÚurlN© )Ú.0ÚiÚartifactÚactives   &  €Ú>C:\Users\johnn\AppData\Local\hermes\hermes-agent\pm\install.pyÚ	<genexpr>Ú3_prepare_artifacts.<locals>.tick.<locals>.<genexpr>$   s#   øé € Ð`Ñ.B™{˜qÀhÈuÅoÐY_ÑF_ŸšÓ.Bùs   ƒ$š
$Ú/Ú Údownload)ÚnextÚreversedÚ	enumerateÚlen)	ÚdoneÚtotalÚrangesÚindexÚlabelr,   Ú	artifactsr#   r!   s	   &&&  @€€€r-   ÚtickÚ _prepare_artifacts.<locals>.tick!   st   ù€ ØÒÜœ( 6Ó*Ó+ˆFÜÔ`¬i¸	Ô.BÓ`Ó`ˆEÜ7:¸9³~ÈÔ7I�u˜q•y�k ¤3 y£>Ð"2Ñ3ÈrˆEÙ�Z ¨eÔ4ØÒ(Ù˜d¨6Ö2ñ )ó    Útree)r!   r"   úinstall pausedr0   r1   Úunpackzextra-)Ú
fetch_manyr5   Úis_setr
   r6   rB   r   Ústage)ÚpackageÚstoreÚscratchr<   ÚversionÚtargetr!   r"   r#   r=   ÚstagedÚarchivesr:   Úarchiver;   Údestinations   &&&f&&d$d       r-   Ú_prepare_artifactsrO      sß   ú€ ÷3ð �vÕ€FØ×Ñ 	¨7È{ÐÓ[€HÜ# HÖ-‰ˆØÒ" {×'9Ñ'9×';Ò';Ü Ð!1Ó2Ð2ØÒÜ7:¸9³~ÈÔ7I�u˜q•y�k ¤3 y£>Ð"2Ñ3ÈrˆEÙ�X˜q ! UÔ+à %¨¤
‘f°¸FÀ5À'Ð:JÕ0JˆØ�‰�w¨VÔ4ß‰5Ü�{Ö+ñ .ð ‡M�M�% Ô1Ø€Mr?   c               ó   € V ^8„  d   QhRR/# )é   Úreturnr   r(   )Úformats   "r-   Ú__annotate__rT   ;   s   € ÷ +ñ +�8ñ +r?   c                 ó>   € \        \        P                  ! 4       4      # ©N)r   r	   Úlockfile_pathr(   r?   r-   Ú	_lockfilerX   ;   s   € Ü”E×'Ò'Ó)Ó*Ð*r?   c               ó   € V ^8„  d   QhRR/# )rQ   rR   r   r(   )rS   s   "r-   rT   rT   ?   ó   € ÷ %ñ %�ñ %r?   c                 ó>   € \        \        P                  ! 4       4      # rV   )r   r	   Ú
facts_pathr(   r?   r-   Ú_factsr]   ?   ó   € Ü”×!Ò!Ó#Ó$Ð$r?   c               ó   € V ^8„  d   QhRR/# ©rQ   rR   r   r(   )rS   s   "r-   rT   rT   C   rZ   r?   c                 ó>   € \        \        P                  ! 4       4      # rV   )r   r	   Ú
store_rootr(   r?   r-   Ú_storerc   C   r^   r?   c               ó    € V ^8„  d   QhRRRR/# )rQ   Úbinaryr   rR   Úboolr(   )rS   s   "r-   rT   rT   G   s   € ÷ 
&ñ 
&˜4ð 
& Dñ 
&r?   c                óV  € \         P                  R8X  g,   \         P                  ! V \         P                  4      '       d   R#  V P	                  V P                  4       P                  ^I,          4       \         P                  ! T \         P                  4      #   \         d     R# i ; i)zúagent-browser entries staged before stage() set the exec bit sit at 0644 and fail every
launch with PermissionError. Modes are not part of the pinned digest, so restore it in place;
an entry we cannot chmod (sealed store) is treated as not installed.ÚntTF)ÚosÚnameÚaccessÚX_OKÚchmodÚstatÚst_modeÚOSError)re   s   &r-   Ú_heal_exec_bitrq   G   ss   € ô 
‡w�w�$„œ"Ÿ)š) F¬B¯G©G×4Ò4ÙðØ�‰�V—[‘[“]×*Ñ*¨UÕ2Ô3ô �9Š9�VœRŸW™WÓ%Ð%øô ô Úðús   Á0B ÂB(Â'B(ÚverifyFÚallow_outdatedÚrootsc               ó0   € V ^8„  d   QhRRRRRRRRR	RR
R/# )rQ   rF   r   Úlockfiler   rJ   Ústrrr   rf   rs   rt   ztuple[Path, ...] | Noner(   )rS   s   "r-   rT   rT   T   s9   € ÷ ñ  ð °Hð Àcð Ø $ðØ>Bðà6ñr?   c               óR  € \         P                  Ve   TM)\        P                  ! 4       \        P                  ! 4       34      pRpV EFÚ  p\        V4      p	V\        P                  ! 4       8X  d   \        4       M\        VR,          4      p
V
P                  V P                  4      pV'       d.   V
P                  V P                  RV	P                  4      '       g   K—  V P                  V	P                  VR,          4      V4      pVe   VP                  4       '       g   KÛ  Ve$   V\        4       8X  d   \!        V4      '       g   EK  V'       d   \#        WW’4      '       g   EK  V
P                  V P                  VP%                  V P                  4      V	P                  \'        WP                  V4      4      '       d   W©3u # V'       g   EKŠ  VP                  R4      V8X  g   EK£  VP                  R4      '       g   EK½  VP                  R4      '       g   EK×  W©3pEKÝ  	  V# )zGPrefer the current pin. An explicit read may retain a prior PM install.Nú
facts.jsonÚentryrJ   r<   Údigest)ÚdictÚfromkeysr	   rb   Úwritable_store_rootr   r]   r   Úgetrj   Ú	installedÚrootre   rz   Úis_filer   rq   Ú_entry_verifiedrI   Ú	_identity)rF   rv   rJ   rr   rs   rt   Úsearch_rootsÚfallbackr�   rG   ÚfactsÚfactre   s   &&&$$$       r-   Ú_installed_locationr‰   T   s†  € ô —=‘=¨%Ò*;¡Ä%×BRÒBRÓBTÔV[×VoÒVoÓVqÐArÓs€LØ€HÜˆÜ�d“ˆØ ¤E×$4Ò$4Ó$6Ô6””¼EÀ$ÈÕBUÓ<VˆØ�y‰y˜Ÿ™Ó&ˆß˜5Ÿ?™?¨7¯<©<¸¸u¿z¹z×JÒJÙØ—‘ §¡¨D°­MÓ :¸FÓCˆØÒ f§n¡n×&6Ò&6ÙØÒ &¬NÓ,<Ô"<Ä^ÐTZ×E[ÒE[Úßœ/¨'¸×GÒGÚØ�?‰?˜7Ÿ<™<¨×)9Ñ)9¸'¿,¹,Ó)GÈÏÉÜ$ X¯|©|¸VÓD÷Fò Fà�<ÒßŠN˜tŸx™x¨Ó1°V×;Ø—H‘H˜[×)Õ)¨d¯h©h°x×.@Õ.@Ø�|‹Hñ% ð& €Or?   T)Úfrozenc                  ó6   € ] tR t^pt$ R]R&   R]R&   R]R&   RtR# )	ÚInstalledPackager   Úpathrw   rI   úPath | Nonere   r(   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotations__Ú__static_attributes__r(   r?   r-   rŒ   rŒ   p   s   ‡ à
ƒJØƒLØ×r?   rŒ   c               ó$   € V ^8„  d   QhRRRRRR/# )rQ   rj   rw   rs   rf   rR   zInstalledPackage | Noner(   )rS   s   "r-   rT   rT   w   s'   € ÷ Rñ R˜Cð R°Dð RÐE\ñ Rr?   c          	     ó¤  € \        V 4      pVP                  '       d   \        V  R24      h\        4       p\	        V\        4       W1R7      pVf   R# Vw  rVVP                  V 4      pVP                  VR,          4      pVP                  Wƒ4      p	\        \        \        V4      4      VR,          V	e   \        \        V	4      4      4      # R4      # )zDRead the selected PM entry without installing or changing its facts.z3 is internal PM tooling, not an application package)rs   Nrz   rI   )r   ÚinternalÚ
ValueErrorr   r‰   rX   r   rz   re   rŒ   r   r   )
rj   rs   rF   rJ   Úlocationr‡   rG   rˆ   rz   re   s
   &$        r-   Úinstalled_packagerš   w   sÀ   € ä˜$Ó€GØ××ÐÜ˜D˜6Ð!TÐUÓVÐVÜÓ€FÜ" 7¬I«K¸Ô_€HØÒÙØ�L€EØ�9‰9�T‹?€DØ�K‰K˜˜W�Ó&€EØ�^‰^˜EÓ*€FäœD¤¨£Ó/°°iµØ4:Ò4FœD¤¨£Ó0óRð RØLPóRð Rr?   c               ó    € V ^8„  d   QhRRRR/# )rQ   rj   rw   rR   rŽ   r(   )rS   s   "r-   rT   rT   ‰   s   € ÷ [ñ [�cð [˜kñ [r?   c                ó²  € V R9  d   \        V : R24      h\        R4      p\        4       p\        V\	        4       V4      pVf   R# Vw  rEVP                  VP                  VP                  R4      R,          4      V4      pVe"   VP                  WP                  ,           4      MRpVe+   VP                  4       '       d   \        \        V4      4      # R# )zåPM's installed ``uv``/``uvx`` for a user-declared MCP stdio ``command:``, so a bare
``uvx`` server runs the packaged uv, never the user's. Read-only; Hermes's own Python
work still goes through PM operations, not this executable.Úuvz is not a uv launcherNrz   )r�   Úuvx)r˜   r   r   r‰   rX   re   rz   r   Ú	with_nameÚsuffixr‚   r   r   )rj   rF   rJ   r™   r‡   rG   re   Úlaunchers   &       r-   Úuv_launcherr¢   ‰   s¿   € ð �=Ô Ü˜D™8Ð#8Ð9Ó:Ð:Ü˜$Ó€GÜÓ€FÜ" 7¬I«K¸Ó@€HØÒÙØ�L€EØ�^‰^˜EŸK™K¨¯	©	°$«¸Õ(@ÓAÀ6ÓJ€FØ9?Ò9Kˆv×Ñ §}¡}Õ 4Ô5ÐQU€HØ%-Ò%9¸h×>NÑ>N×>PÒ>PŒ4”�xÓ Ó!ÐZÐVZÐZr?   c               ó$   € V ^8„  d   QhRRRRRR/# )rQ   rv   r   rj   rw   rJ   r(   )rS   s   "r-   rT   rT   š   s!   € ÷ ;ñ ;˜ð ;¨ð ;°Sñ ;r?   c                ó–   € V P                  W4      pV'       g   R# T\        ;QJ d    . R V 4       F  NK  	  53# ! R V 4       4      3# )u­   The identity the lock currently pins for `name` on `target`:
(target, tuple(artifact sha256s)) â€” or None when the lock pins no
artifacts (nothing digest-bound to compare).Nc              3  ó2   "  € T F  qR ,          x € K  	  R# 5i)Úsha256Nr(   )r)   Úas   & r-   r.   Ú_identity.<locals>.<genexpr>¡   s   é € Ð9©y¨!˜HŸ+š+«yùs   ‚)r<   Útuple)rv   rj   rJ   r<   s   &&& r-   r„   r„   š   sD   € ð ×"Ñ" 4Ó0€IßÙØ—E”EÑ9©yÓ9—EÐ:Ð:�EÑ9©yÓ9Ó9Ð:Ð:r?   c               ó   € V ^8„  d   QhRR/# ©rQ   rR   rf   r(   )rS   s   "r-   rT   rT   ¤   s   € ÷ ñ ˜tñ r?   c                 ó`  € ^ RI p V P                  P                  RR4      P                  4       P	                  4       R
9   d   R#  ^ RIHpHpHp  T! 4        T! T! 4       RRRR	7      RJ #   \         d   pTP                  R9   u Rp?# Rp?i\         d     R# i ; i  \         d     R# i ; i)u|  Policy: may pm install things on demand right now?

HERMES_DISABLE_LAZY_INSTALLS is an internal bridge var set by the
official Docker image and the hermetic test harness. The user-facing
setting is security.allow_lazy_installs in config.yaml; a config
system that fails to load counts as ALLOWED only when hermes_cli is
genuinely absent (bootstrap) â€” config errors fail closed.
NÚHERMES_DISABLE_LAZY_INSTALLSr1   F)Úcfg_getÚload_config_readonlyÚ$require_readable_config_before_writeÚsecurityÚallow_lazy_installsT)Údefault)Ú1ÚtrueÚyes>   Ú
hermes_cliúhermes_cli.config)ri   Úenvironr   ÚstripÚlowerÚhermes_cli.configr®   r¯   r°   ÚModuleNotFoundErrorrj   ÚImportErrorÚ	Exception)ri   r®   r¯   r°   Úexcs        r-   Úlazy_installs_allowedrÁ   ¤   s±   € ó à	‡z�z‡~�~Ð4°bÓ9×?Ñ?ÓA×GÑGÓIð Nô ñ
 ðßiÑið
ñ 	-Ô.ÙÑ+Ó-¨zÐ;PÐZ^Ô_ÐcgÐgÐgøô ô ?Ø�x‰xÐ>Ñ>Õ>ûÜô Úðûô ô Úðús<   Á
A* ÁB Á*BÁ5B	ÂBÂ	BÂBÂBÂB-Â,B-c               ó   € V ^8„  d   QhRR/# ©rQ   rR   ú	list[str]r(   )rS   s   "r-   rT   rT   Ä   s   € ÷ (ñ (˜	ñ (r?   c                 óè   € \        \        P                  ! 4       4      P                  R4      ;'       g$    \	        4       P                  R4      ;'       g    / p \        V P                  R. 4      4      # )z0The venv extras recorded in the installed state.ÚvenvÚextras)r   r	   Úruntime_facts_pathr   r]   Úlist)rˆ   s    r-   Úenabled_extrasrÊ   Ä   sR   € ä”×)Ò)Ó+Ó,×0Ñ0°Ó8×VÐV¼F»H¿L¹LÈÓ<P×VÐVÐTV€DÜ�—‘˜ 2Ó&Ó'Ð'r?   c               ó    € V ^8„  d   QhRRRR/# )rQ   rj   rw   rR   rf   r(   )rS   s   "r-   rT   rT   Ê   s   € ÷ ]ñ ]�sð ]˜tñ ]r?   c                óR   € \        \        V 4      \        4       \        4       4      R J# rV   )r‰   r   rX   r   ©rj   s   &r-   Úis_installedrÎ   Ê   s!   € Üœ{¨4Ó0´)³+¼~Ó?OÓPÐX\Ð\Ð\r?   c               ó   € V ^8„  d   QhRR/# r«   r(   )rS   s   "r-   rT   rT   Î   s   € ÷ Cñ C�ñ Cr?   c                 ój   € \         P                  ! 4       P                  R,          P                  4       # )zdSealed = bundled LAYOUT only: the store sits beside the bundle
manifest and is read-only as shipped.zmanifest.json)r	   rb   Úparentr‚   r(   r?   r-   ÚsealedrÒ   Î   s'   € ô ×ÒÓ×%Ñ%¨Õ7×@Ñ@ÓBÐBr?   c               ó$   € V ^8„  d   QhRRRRRR/# )rQ   rj   rw   ÚwhatrR   r   r(   )rS   s   "r-   rT   rT   Ô   s!   € ÷ 	ñ 	�sð 	 #ð 	¨,ñ 	r?   c                óh   € ^ RI Hp \        V RV 2R4      pVP                  R\	        V4      4       V# )é    ©Úreceiptz.not installed and lazy installs are disabled: z>enable security.allow_lazy_installs or run `hermes pm install`zlazy-install)ÚpmrØ   r   Úrecord_refusalrw   )rj   rÔ   rØ   Úerrors   &&  r-   Ú_refuse_lazyrÜ   Ô   s:   € ÝäØØ
8¸¸Ð?ØHó€Eð
 ×Ñ˜>¬3¨u«:Ô6Ø€Lr?   Úattemptsc               ó(   € V ^8„  d   QhRRRRRRRR/# )	rQ   rG   r   Ú
entry_namerw   rÝ   ÚintrR   ÚNoner(   )rS   s   "r-   rT   rT   à   s(   € ÷ ,ñ ,˜ð ,¨Cð ,¸cð ,È$ñ ,r?   c               ó†  € ^ RI pV P                  V4      p\        V4       FO  p VP                  4       '       g   VP	                  4       '       g   VP                  RR7       M\        V4        R# 	  R#   \         d      R# \         d2    YR^,
          8X  d   h TP                  RT^,           ,          4        Kž  i ; i)zÑRemove a replaced or failed entry, retrying transient Windows holds.

Corruption may leave a file where the directory belonged. Failure
must propagate so recovery never claims to have removed surviving bytes.
NT)Ú
missing_okgš™™™™™É?)
Útimerz   ÚrangeÚ
is_symlinkÚis_dirÚunlinkr   ÚFileNotFoundErrorrp   Úsleep)rG   rß   rÝ   rä   rz   Úattempts   &&$   r-   Ú_remove_entryrì   à   s˜   € ó à�K‰K˜
Ó#€EÜ˜–?ˆð	,Ø×Ñ×!Ò!¨¯©¯ªØ—‘¨�Õ-ä˜EÔ"Úó #øô !ô 	ÛÜô 	,Ø Q�,Ô&ØØ�J‰J�s˜g¨�kÕ*×+ð	,ús#   ¥+A6ÁA6Á6C ÂC Â.C Â?C z	.reclaim-c               ó$   € V ^8„  d   QhRRRRRR/# )rQ   rG   r   rß   rw   rR   rá   r(   )rS   s   "r-   rT   rT   û   s!   € ÷ #ñ #˜%ð #¨Sð #°Tñ #r?   c                ó|  € ^ RI p \        W4       R#   \         d   pTp Rp?MRp?ii ; i T P                  T4      P	                  T P                  \
         TP                  4       P                   24      4       M(  \         d    \        P                  RY4        R# i ; i\        P                  RY4       R# )aÓ  Drop a tree a finished publish or restore left behind as garbage.

A running Hermes process can keep the replaced interpreter's DLLs mapped
far past the retry window, and failing here reports a completed install
as broken (#124807). Windows still allows renaming a tree with mapped
images, so it moves to a `.reclaim-*` name: its slot is free for the next
publish, no restore ever picks it up, and the next install or
`hermes pm gc` deletes it once the hold is gone.
Nz$could not remove or set aside %s: %szI%s is still in use (%s); set aside for the next install or `hermes pm gc`)
Úuuidrì   rp   rz   ÚrenameÚ_SET_ASIDE_PREFIXÚuuid4ÚhexÚLOGÚwarning)rG   rß   rï   ÚerÛ   s   &&   r-   Ú_discard_entryr÷   û   sž   € ó ðÜ�eÔ(ÙøÜô Ø�ûðúðØ�‰�JÓ×&Ñ& u§{¡{Ô6GÐ5HÈÏÉË×IYÑIYÐHZÐ3[Ó'\Õ]øÜô Ü�‰Ð:¸JÔNÚðúô ‡K�KÐ[Øö#s"   † “*ž%¥*®AA> Á>!B#Â"B#c               ó    € V ^8„  d   QhRRRR/# )rQ   rG   r   rR   rà   r(   )rS   s   "r-   rT   rT     s   € ÷ 	ñ 	˜eð 	¨ñ 	r?   c                óÔ   € ^ p\        V P                  P                  \         R24      4       F$  p \	        WP
                  ^R7       T^,          pK&  	  V#   \         d     K8  i ; i)zKDelete set-aside trees whose hold is gone; the caller holds the store lock.Ú*)rÝ   )Úsortedr�   Úglobrñ   rì   rj   rp   )rG   ÚremovedÚitems   &  r-   Ú_reclaim_set_asiderÿ     sf   € à€GÜ�u—z‘z—‘Ô*;Ð)<¸AÐ'>Ó?Ö@ˆð	Ü˜%§¡°QÕ7ð 	�1�Šñ Að €Nøô ô 	Úð	ús   ²AÁA'Á&A'c               ó$   € V ^8„  d   QhRRRRRR/# )rQ   rG   r   r<   z
list[dict]rR   rá   r(   )rS   s   "r-   rT   rT   !  s!   € ÷ =ñ =˜Uð =¨zð =¸dñ =r?   c                óD   € V F  p\        V RVR,           24       K  	  R# )zHRelease this package's archives after publication, under its store lock.zfetch-r¦   N)r÷   )rG   r<   r+   s   && r-   Ú_remove_downloadsr  !  s#   € ãˆÜ�u  x°Õ'9Ð&:Ð;Ö<ó r?   c          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )rQ   rF   r   rˆ   r|   rG   r   rJ   rw   rR   rf   r(   )rS   s   "r-   rT   rT   '  s0   € ÷ ñ ˜Wð ¨Dð ¸ð Èð ÐPTñ r?   c                óÎ   € VP                  VR,          4      p V P                  WC4      '       * ;'       d    VP                  R4      \        V4      8H  #   \         d     R# i ; i)zOExplicit installs re-check realized bytes; startup keeps its cheap facts check.rz   r{   F)rz   rr   r   r    rp   )rF   rˆ   rG   rJ   rz   s   &&&& r-   rƒ   rƒ   '  sY   € à�K‰K˜˜W�Ó&€EðØ—>‘> %Ó0Ô0×]Ð]°T·X±X¸hÓ5GÌ;ÐW\ÓK]Ñ5]Ð]øÜô Úðús   šA ·A ÁA$Á#A$c               ó    € V ^8„  d   QhRRRR/# )rQ   rG   r   rR   rá   r(   )rS   s   "r-   rT   rT   0  s   € ÷ .ñ . 5ð .¸dñ .r?   c                óž  aaa€ ^ RI pV P                  RVP                  4       P                   24      oSP	                  4       ;'       g    SP                  4       pV'       d   \        VV3R l4        \        VV3R l4       T'       d   \        T SP                  4       R# R#   \         d    T'       d   \        TT3R l4       h i ; i)zAKeep both versions recoverable until the restore rename succeeds.Nz.displaced-c                 ó&   <€ SP                  S 4      # rV   ©rð   ©Ú	displacedrz   s   €€r-   Ú<lambda>Ú)_restore_previous_entry.<locals>.<lambda>7  s   ø€ ˜5Ÿ<™<¨	Ô2r?   c                 ó&   <€ SP                  S 4      # rV   r  )rz   Úpreviouss   €€r-   r  r  9  s   ø€ ˜8Ÿ?™?¨5Ô1r?   c                 ó&   <€ S P                  S4      # rV   r  r	  s   €€r-   r  r  <  s   ø€ ˜y×/Ñ/°Ô6r?   )
rï   rz   rò   ró   Úexistsræ   r   ÚBaseExceptionr÷   rj   )rG   rz   r  rï   Ú	had_entryr
  s   &ff  @r-   Ú_restore_previous_entryr  0  s–   ú€ ãà—‘˜k¨$¯*©*«,×*:Ñ*:Ð);Ð<Ó=€IØ—‘“×4Ð4 %×"2Ñ"2Ó"4€IßÜÕ2Ô3ðÜÕ1Ô2÷
 Ü�u˜iŸn™nÖ-ñ øô	 ô ßÜÕ6Ô7Øðús   Á5B' Â'CÂ:Cc              #  óô  aa"  € SP                  4       '       g   SP                  4       '       d   \        VV3R l4        VP                  VSP                  4       V P                  SV4      pV'       d   \        V P                  RV 24      hRx € SP                  4       '       d   \        TSP                  4       R# R#   \         d&    SP                  4       '       d   \        TSS4       h i ; i5i)zDKeep rollback live through the caller's native facts commit, if any.c                 ó&   <€ S P                  S4      # rV   r  )rz   Úprevious_entrys   €€r-   r  Ú _publish_entry.<locals>.<lambda>F  s   ø€ ˜5Ÿ<™<¨Ô7r?   z%published entry failed verification: N)
r  ræ   r   Úpublishrj   rr   r   r  r  r÷   )rF   rG   rK   rz   r  rJ   Úreasons   &&&ff& r-   Ú_publish_entryr  B  sÆ   ùé € ð ‡|�|‡~‚~˜×)Ñ)×+Ò+ÜÕ7Ô8ð	Ø�‰�f˜eŸj™jÔ)Ø—‘  vÓ.ˆßÜ˜wŸ|™|Ð/TÐU[ÐT\Ð-]Ó^Ð^Ûð
 ×Ñ×ÒÜ�u˜n×1Ñ1Ö2ñ øô	 ô Ø× Ñ ×"Ò"Ü# E¨5°.ÔAØðüs4   „,C8±C8Á5C Á8C ÂC8Â+C8Ã C5Ã&C5Ã5C8c               ó   € V ^8„  d   QhRR/# ©rQ   rR   rá   r(   )rS   s   "r-   rT   rT   U  s   € ÷ 
>ñ 
>ÐW[ñ 
>r?   c                óð   € VP                  4       '       g   R# V'       dJ   VP                  R4      VP                  8X  d*   \        WW4      '       d   \	        WP                  4       R# \        WV4       R# )z<Finish or undo a publication an earlier install left behind.Nrz   )r  r   rj   rƒ   r÷   r  )rF   rG   rz   r  r  rJ   s   &&&&&&r-   Ú_settle_previous_entryr  U  sR   € à× Ñ ×"Ò"Ù÷ 	�X—\‘\ 'Ó*¨e¯j©jÔ8Ü °5×AÒAÜ�u×1Ñ1Ö2ä ¨nÖ=r?   c               ó   € V ^8„  d   QhRR/# r«   r(   )rS   s   "r-   rT   rT   b  s   € ÷ 	Añ 	AÐ^bñ 	Ar?   c	           
     ó^  € Ve\   VR J;'       dP    VP                  V P                  WcP                  \        WP                  V4      4      ;'       d    \	        WW84      #  VR,          P                  RR7      p	W—8H  ;'       d    V P                  WH4      '       * #   \         d    R p	 L1i ; i)Nú.pm-stage-pin.jsonz	utf-8-sig©Úencoding)r€   rj   r�   r„   rƒ   Ú	read_textrp   rr   )
rF   rv   r‡   rG   rz   r  rI   ÚpinrJ   Úrecordeds
   &&&&&&&&& r-   Ú_entry_currentr'  b  s°   € ØÒØ˜tÐ#÷ @ð @¨¯©Ø�L‰L˜'§:¡:¬y¸Ç<Á<ÐQWÓ/Xó)
÷ @ð @ä˜g°Ó?ð	@ðØÐ0Õ0×;Ñ;À[Ð;ÓQˆð ‰?×@Ð@ 7§>¡>°%Ó#@Ô@Ð@øô ô ØŠðús   Á!B ÂB,Â+B,c               ó   € V ^8„  d   QhRR/# r  r(   )rS   s   "r-   rT   rT   n  s   € ÷ 	Yñ 	YÐTXñ 	Yr?   c           
     óÎ  € Vw  rgVP                  V P                  4      pVP                  V P                  WGP                  \	        WP                  V4      4      '       d   \        WWu4      '       g   \        V P                  R 4      h\        P                  ! VP                  VR,          4      VRR7       \        V4      VR,          8w  d   \        V P                  R4      hR# )z'bundled copy source failed verificationrz   T)Úsymlinksr{   z,copied bytes do not match the bundled sourceN)r   rj   r€   r�   r„   rƒ   r   ÚshutilÚcopytreerz   r    )	rF   rv   Ú	copy_fromrK   rI   rJ   Úsource_factsÚsource_storeÚsources	   &&&&&&   r-   Ú_copy_verified_sourcer1  n  s¶   € Ø!*Ñ€LØ×Ñ˜gŸl™lÓ+€FØ×"Ñ" 7§<¡<°×:KÑ:KÜ#,¨X·|±|ÀVÓ#L÷Nò Nä" 7°L×IÒIÜ˜7Ÿ<™<Ð)RÓSÐSÜ
‡O‚O�L×&Ñ& v¨g¥Ó7¸È$ÕOÜ�6Ó˜f XÕ.Ô.Ü˜7Ÿ<™<Ð)WÓXÐXñ /r?   c               ó   € V ^8„  d   QhRR/# r  r(   )rS   s   "r-   rT   rT   z  s   € ÷ Hñ H¸$ñ Hr?   c                óJ  € V'       d   RV9  d   R# VP                  R4      ;'       g    R.^ ,          pVP                  RR4       R\        V4      R,           2pV'       d   V RV^ ,          R,          R,           2MTp\        P                  R	V P                  WV4       R# )
uj   Work item 6: replacing an ESTABLISHED fact is a repair â€” log it,
no transaction system, no receipt file.rz   Nr<   Ú?rI   r0   :Né   Nr¦   zrepair: %s re-realized %s -> %s)r   rw   rô   Úinforj   )rF   r  rI   r<   Úold_artifactÚoldÚnews   &&&&   r-   Ú_log_repairr:  z  s�   € ÷ �w hÔ.ÙØ—L‘L Ó-×6Ð6°#°¸Õ:€LØ�\‰\˜) SÓ)Ð*¨!¬C°Ó,=¸cÕ,BÐ+CÐ
D€Cß8AˆWˆI�Q�y •| HÕ-¨cÕ2Ð3Ñ
4Àw€CÜ‡H�HÐ.°·±¸cÖGr?   r-  Ú
_lock_heldÚ_fresh_copyc               óD   € V ^8„  d   QhRRRRRRRRR	R
RRRRRRRRRRRR/# )rQ   rF   r   rv   r   r‡   zFacts | NonerG   r   rJ   rw   r"   úthreading.Event | Noner#   úProgressFn | Noner-  ztuple[Facts, Store] | Noner;  rf   r<  rR   r   r(   )rS   s   "r-   rT   rT   …  sƒ   € ÷ Uñ UØðUàðUð ðUð ð	Uð
 ðUð (ðUð )ðUð *ðUð ðUð ðUð 
ñUr?   c               ó0  € VP                  V P                  4      pVf   \        V P                  RR4      hV P                  V4      pVe   \        V P                  RV RV 2R4      hV P	                  W´4      pVP                  V4      p\        V RR4      '       d   V# VP                  V P                  V4      p\        P                  ! R	TR
V Uu. uF  pVR
,          NK  	  up/4      pV	'       d   \        4       MVP                  4       ;_uu_ 4        Ve"   VP                  4       '       d   \        R4      hVe   VP                  4        Ve   VP                  V P                  4      MRpTP                  RVf   RMR V 24      p\!        WVVVV4       \#        V4       \%        WW#VVVVV4	      '       d    V
'       g   \'        W?4       VuuRRR4       # V'       g   \        V P                  RV R2R4      hVP)                  4       ;_uu_ 4       pVR,          p Ve   \+        WVVW´4       M\-        WVWûVWVVR7	      pVe"   VP                  4       '       d   \        R4      hVe   V! R^ ^ R4       V P/                  VV4      RppV'       d   V P1                  VWL4      w  ppV'       d   \        V P                  RV 2V4      hVf   VR,          P3                  VRR7       \5        WVVVV4      ;_uu_ 4        Ve[   TP7                  V P                  Y½V P9                  Wä4      VP:                  YO Uu. uF  pVR
,          NK  	  up\=        V4      R7       RRR4       \'        W?4        RRR4       \A        T TY¿4       RRR4       T# u upi u upi   + '       g   i     LE; i  \        \        3 d    h \>         d    p\        T P                  RT 24      ThRp?ii ; i  + '       g   i     L‚; i  + '       g   i     T# ; i)zPRealize one pin. Host installs commit facts; cross-target stages carry a marker.Nznot in the lockfilez#add it with `hermes pm lock --bump`zunavailable on ú: ÚnoneÚpin_onlyFrJ   r¦   rA   z
.previous-zstage-r1   zno artifact for z in the lockfilez,run `hermes pm lock --bump` for this packager@   ©r!   r"   r#   rr   z"staged entry failed verification: r!  zutf-8r"  )rJ   r<   r{   zinstall failed: )!rI   rj   r   Úmissing_reasonÚstore_entryrz   Úgetattrr<   ÚjsonÚdumpsr   Úinstall_lockrD   r
   Úreloadr   r  rÿ   r'  r  rH   r1  rO   rr   Úrepair_staged_verificationÚ
write_textr  ÚrecordÚenvr�   r    r¿   r:  )rF   rv   r‡   rG   rJ   r!   r"   r#   r-  r;  r<  rI   r  rß   rz   r<   r§   r%  r  r  rH   rK   Úremedyrö   s   &&&&&&&&$$$             r-   Ú_installrQ  …  sÓ  € ð ×Ñ˜wŸ|™|Ó,€GØ‚ÜØ�L‰LÐ/Ð1Vó
ð 	
ð ×#Ñ# FÓ+€FØÒÜ˜7Ÿ<™<¨?¸6¸(À"ÀVÀHÐ)MÈvÓVÐVà×$Ñ$ WÓ5€JØ�K‰K˜
Ó#€EÜˆw˜
 E×*Ò*ØˆØ×"Ñ" 7§<¡<°Ó8€IÜ
�*Š*�h ¨É	Ó2RÉ	À1°1°X·;°;É	Ñ2RÐSÓ
T€Cç$ŒŒ¨%×*<Ñ*<Ó*>×	>Ñ	>ØÒ" {×'9Ñ'9×';Ò';Ü Ð!1Ó2Ð2ØÒØ�L‰LŒNØ.3Ò.?�5—9‘9˜WŸ\™\Ô*ÀTˆØŸ™ z¸eºm±(ÐQSÐ1TÐU_ÐT`Ð%aÓbˆÜ˜w¨u°nÀhÐPVÔWÜ˜5Ô!Ü˜7¨e¸EÀ8ÈWÐVYÐ[a×bÒbß#Ü˜eÔ/Ø÷ 
?Ò	>÷ ÜØ—‘Ø" 6 (Ð*:Ð;Ø>óð ð
 �]‰]�_Œ_ Ø˜vÕ%ˆFðPØÒ(Ü)¨'¸YÈÐPWÕ`ä/°ÀÈÐ]cØ9AØBSôU�Fð Ò*¨{×/AÑ/A×/CÒ/CÜ(Ð)9Ó:Ð:ØÒ'Ù˜X q¨!¨RÔ0Ø!(§¡°¸Ó!?À˜�ßØ%,×%GÑ%GÈÐPVÓ%_‘N�F˜FßÜ& w§|¡|Ð7YÐZ`ÐYaÐ5bÐdjÓkÐkØ’=ØÐ2Õ2×>Ñ>¸sÈWÐ>ÔUÜ# G°F¸EÀ>ÐSY×ZÕZØÒ(ØŸ™Ø#ŸL™L¨'¸w¿{¹{È5Ó?YÐ[`×[eÑ[eØ#)È9Ó5UÉ9Àa°a¸·k°kÉ9Ñ5UÜ#.¨uÓ#5ð %ô ÷ [ô " %Õ3÷7 ôB 	�G˜X wÔ:÷i 
?ðj €Lùòo 3SùòZ 6V÷	 [×Zûô !¤.Ð1ô ØÜô PÜ" 7§<¡<Ð3CÀAÀ3Ð1GÓHÈaÐOûðPú÷= �_ú÷' 
?Ö	>ðj €LúsŸ   ÃNÄPÄ2BPÇPÇPÇ&3PÈ
O1	È$=N3É"AN3Ê5AN3Ì;N Ì?N ÍN Í#N3Í7PÎN Î N0Î+N3Î3O.ÏO.ÏO)Ï)O.Ï.O1	Ï1PÏ<PÐP	c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
rQ   rj   rw   rJ   r"   r>  r#   r?  rR   r   r(   )rS   s   "r-   rT   rT   Ý  s?   € ÷ eñ eØ
ðeØðeà'ðeð )ðeð 
ñ	er?   c               óX   € \        \        V 4      \        4       R\        4       VW#VR7      # )zFRealize a cross-target pin without host facts or an executable Runner.NrD  )rQ  r   rX   rc   )rj   rJ   r!   r"   r#   s   &&&$$r-   Ú
stage_onlyrT  Ý  s,   € ô ”K Ó%¤y£{°D¼&»(ÀFØ%ÐRcôeð er?   c                  ó>   € ] tR tRtRtR R ltR R ltR R ltR	tR
# )Ú_InstallOperationiç  zDValidity lasts only while this operation holds the publication lock.c               ó   € V ^8„  d   QhRR/# r  r(   )rS   s   "r-   rT   Ú_InstallOperation.__annotate__ê  s   € ÷ Dñ D˜$ñ Dr?   c                	óP   € \        4       V n        R V n        \        4       V n        R # rV   )r   ÚstackrG   ÚsetÚchecked©Úselfs   &r-   Ú__init__Ú_InstallOperation.__init__ê  s   € Ü“[ˆŒ
Ø#'ˆŒ
Ü>A»eˆŽr?   c               ó   € V ^8„  d   QhRR/# r`   r(   )rS   s   "r-   rT   rX  ï  s   € ÷ ñ �eñ r?   c                	óâ   € V P                   fW   \        \        P                  ! 4       4      V n         V P                  P                  V P                   P                  4       4       V P                   # rV   )rG   r   r	   r~   rZ  Úenter_contextrJ  r]  s   &r-   ÚlockÚ_InstallOperation.lockï  sJ   € Ø�:‰:ÒÜœu×8Ò8Ó:Ó;ˆDŒJØ�J‰J×$Ñ$ T§Z¡Z×%<Ñ%<Ó%>Ô?Ø�z‰zÐr?   c               ó   € V ^8„  d   QhRR/# r  r(   )rS   s   "r-   rT   rX  õ  s   € ÷ ñ �tñ r?   c                	ó|   € V P                   P                  4        R V n        V P                  P	                  4        R # rV   )r\  ÚclearrG   rZ  Úcloser]  s   &r-   ri  Ú_InstallOperation.closeõ  s)   € Ø�‰×ÑÔØˆŒ
Ø�
‰
×ÑÖr?   )r\  rZ  rG   N)	r�   r�   r‘   r’   Ú__doc__r_  rd  ri  r”   r(   r?   r-   rV  rV  ç  s   † ÙNõDõ
÷ñ r?   rV  c               #  óv   "  € \        4       p  V x € V P                  4        R #   T P                  4        i ; i5irV   )rV  ri  )Ú	operations    r-   Ú_install_operationrn  û  s+   é € ä!Ó#€IðØŠà�‰Öøˆ	�‰Õüs   ‚9Ž$ ’9¤6¶9Úbase_envÚexplicitÚ
_operationc               ó8   € V ^8„  d   QhRRRRRRRRRR	R
RRRRR/# )rQ   rj   rw   ro  úOptional[dict]rp  rf   rr   r"   r>  r#   r?  rq  z_InstallOperation | NonerR   r   r(   )rS   s   "r-   rT   rT     sZ   € ÷ ;:ñ ;:Ø
ð;:ð ð;:ð ð	;:ð
 ð;:ð (ð;:ð )ð;:ð )ð;:ð ñ;:r?   c               óž  € \        \        V 4      \        4      '       d8   Ve   VP                  4        \	        VR7       \        V \        . VR7      4      # \        4       p\        4       p	\        V .4      p
Ve   VP                  M	\        4       pVe   VP                  4        . pV
 F›  pVP                  VP                  VP                  4      V	\        P                   ! \#        W�P                  V	4      RR7      3pWë9   d   K^  \%        YØY’;'       d    TR7      f   VP'                  V4       KŠ  VP)                  V4       K�  	  V'       d;   V'       g3   \+        4       '       g#   \-        V RP/                  R V 4       4      4      hV'       d¨   Ve   VP                  4       M\1        \2        P4                  ! 4       4      pVP6                  \9        4       P6                  8X  d   \;        4       M\=        VP6                  R	,          4      pV F&  pVP?                  4        \A        WØVWùVWVVRJR
7	       K(  	  \        V \C        WR7      4      # )u“  ``explicit`` marks a deliberate install command (`hermes pm
install`, `hermes pm bundle`) â€” those ARE the remedy the lazy-install
policy names, so the policy does not apply to them.

``verify`` re-hashes an already-recorded entry and repairs it when the
bytes moved. A deliberate install keeps that check. Shell activation
and the source-build tail (moments after the install/update's own PM
step) pass ``False``. It trusts the recorded digest, the same check
startup uses, because hashing every tool tree costs seconds per call.

``progress(stage, done, total, label)`` reports the slow parts of an
install to a UI, including ordered multi-archive labels.
N)rp  ©ÚbaseT)Ú	sort_keys)rr   z, c              3  ó8   "  € T F  qP                   x € K  	  R # 5irV   rÍ   )r)   Úps   & r-   r.   Úensure.<locals>.<genexpr>5  s   é € Ð*C¹7°a¯6®6»7ùs   ‚ry   )r!   r"   r#   r;  )ro  )"Ú
isinstancer   r   ri  Ú	sync_venvr   r   rX   r   r   r\  r[  rd  rj   rI   rH  rI  r„   r‰   ÚappendÚaddrÁ   rÜ   Újoinr   r	   r~   r�   rc   r]   r   rh  rQ  Úenv_for)rj   ro  rp  rr   r!   r"   r#   rq  rv   rJ   Úchainr\  ÚmissingrF   ÚidentityrG   r‡   s   &$$$$$$$         r-   Úensurer„    sÀ  € ô0 ”+˜dÓ#¤\×2Ò2ØÒ!ð ×ÑÔÜ˜8Õ$Ü�dœK¨°Ô:Ó;Ð;ä‹{€HÜÓ€FÜ�$�‹L€EØ$.Ò$:ˆj× Ò ÄÃ€GØÒØ�‰ÔØ€GÛˆØ—L‘L (×"2Ñ"2°7·<±<Ó"@À&Ü—J’Jœy¨·<±<ÀÓHÐTXÔYð[ˆàÔÙÜ˜w°&×ATÐATÈfÔUÒ]Ø�N‰N˜7Ö#à�K‰K˜Ö!ñ ÷ —xÔ(=×(?Ò(?Ü˜4 §¡Ñ*C¹7Ó*CÓ!CÓDÐDßØ%/Ò%;�
—‘Ô!ÄÄu×G`ÒG`ÓGbÓAcˆØ!ŸJ™J¬&«(¯-©-Ô7””¼UÀ5Ç:Á:ÐP\ÕC\Ó=]ˆÛˆGà�M‰MŒOÜ�W¨¨uÀxØ!,Ø *°$Ð 6÷8ñ ô �$œ Ô8Ó9Ð9r?   c               ó$   € V ^8„  d   QhRRRRRR/# )rQ   Únamesrw   ro  rs  rR   údict[str, str]r(   )rS   s   "r-   rT   rT   B  s!   € ÷ -ñ -�Cð - >ð -¸^ñ -r?   c                ón  € \        4       p\        4       p. pV F|  p \        V.4      pT Ff  pTP                  '       d   K  \        YrT4      pT'       g   K-  Tw  ršTP                  T	P                  TP                  T
P                  4      4       Kh  	  K~  	  \        W@R7      #   \         d     Kš  i ; i)u~   Composed env of already-installed packages only. Never installs,
never raises on missing packages â€” they contribute nothing.ru  )rX   r   r   ÚKeyErrorr—   r‰   r}  r€  rj   r�   r   )ro  r†  rv   rJ   Údiffsrj   r�  rF   r™   r‡   rG   s   $*         r-   r€  r€  B  s¥   € ô ‹{€HÜÓ€FØ€EÛˆð	Ü˜$˜“LˆEó ˆGØ××ÐÙÜ*¨7¸fÓEˆHß‰xØ'‘�Ø—‘˜UŸ]™]¨7¯<©<¸¿¹ÓDÖEó ñ ô �uÔ,Ð,øô ô 	Úð	ús   �B%Â%B4Â3B4Úproject_rootc               ó(   € V ^8„  d   QhRRRRRRRR/# )	rQ   rˆ   r|   Ústamprw   r‹  rŽ   rR   rf   r(   )rS   s   "r-   rT   rT   W  s)   € ÷ 2ñ 2 ð 2¨cð 2ÀKð 2Ð[_ñ 2r?   c               ó¬  € \        V \        4      '       d   V P                  R 4      V8w  d   R# ^ RIHp  T! Vf   \
        P                  ! 4       MT4      pT P                  R4      pTe7   \        T\        4      '       d   \        T4      P                  4       T8w  d   R# TR,          P                  4       #   \        \        \        3 d     R# i ; i)r�  F)Úselected_venvÚenvironmentz
pyvenv.cfg)r{  r|   r   Úpm.environmentsr�  r	   Ú	repo_rootrp   ÚRuntimeErrorr˜   rw   r   Úresolver‚   )rˆ   r�  r‹  r�  r�  r&  s   &&$   r-   Ú_runtime_state_matchesr•  W  s¬   € Ü�dœD×!Ò! T§X¡X¨gÓ%6¸%Ô%?ÙÝ-ðÙ#¸Ò9M¤E§O¢OÔ$5ÐS_Ó`ˆð �x‰x˜Ó&€HØÒ¤Z°¼#×%>Ò%>Ä$ÀxÃ.×BXÑBXÓBZÐ^iÔBiÙØ˜,Õ&×/Ñ/Ó1Ð1øô ”\¤:Ð.ô Úðús   ¶!B9 Â9CÃCc               ó    € V ^8„  d   QhRRRR/# )rQ   ÚpluginsúPluginInput | NonerR   r|   r(   )rS   s   "r-   rT   rT   f  s   € ÷ 
`ñ 
`Ð.ð 
`°4ñ 
`r?   c                óø   € ^ RI Hp \        V \        4      '       d   RV! V P                  4      /# \        V \
        4      '       d   RV P                  /# V f   / # \        \        V 4      P                   R24      h)zOThe ``plugin_dirs`` argument of the venv package; empty means config discovery.)Úcandidate_membersÚplugin_dirsz/ changes plugin state; only a sync may carry it)	Úpm.publicationrš  r{  r   Údirsr   Ú	TypeErrorÚtyper�   )r—  rš  s   & r-   Ú_member_inputsr   f  sk   € å0ä�'œ:×&Ò&ØÑ0°·±Ó>Ð?Ð?Ü�'œ7×#Ò#Ø˜wŸ|™|Ð,Ð,Ø‚Øˆ	Ü
”t˜G“}×-Ñ-Ð.Ð.]Ð^Ó
_Ð_r?   c               ó    € V ^8„  d   QhRRRR/# )rQ   rj   rw   rR   r(   )rS   s   "r-   rT   rT   s  s   € ÷ 0ñ 0�Sð 0˜Sñ 0r?   c                óL   € ^ RI pVP                  RRV 4      P                  4       # )zEThe PEP 685 name uv matches an extra by (``foo_bar`` is ``foo-bar``).Nz[-_.]+Ú-)ÚreÚsubr»   )rj   r¤  s   & r-   Ú
_extra_keyr¦  s  s!   € ãà�6‰6�)˜S $Ó'×-Ñ-Ó/Ð/r?   c               ó    € V ^8„  d   QhRRRR/# )rQ   r&  rÄ   rR   r(   )rS   s   "r-   rT   rT   z  s   € ÷ Jñ J yð J°Yñ Jr?   c                ó  € ^ RI Hp V P                  4       pVR,          P                  4       '       g   \	        V4      # V! V4       Uu0 uF  p\        V4      kK  	  ppV Uu. uF  p\        V4      V9   g   K  VNK  	  up# u upi u upi )a†  The recorded extras this tree still declares.

An extra the source removed (``hindsight``) would otherwise ride the ledger
into every later ``uv sync`` and fail it with "Extra is not defined". Only
recorded extras are pruned; an explicitly requested unknown extra still fails.
Membership uses PEP 685 names (uv matches ``foo_bar`` to ``foo-bar``); the
recorded spelling is what reaches uv.
)Údeclared_extraszpyproject.toml)Úpm.featuresr©  r‹  r‚   rÉ   r¦  )rF   r&  r©  r�   ÚextraÚdeclareds   &&    r-   Ú_still_declaredr­  z  s€   € õ ,à×ÑÓ!€DØÐ#Õ#×,Ñ,×.Ò.Ü�H‹~ÐÙ/>¸tÔ/DÓEÑ/D e”
˜5Ö!Ñ/D€HÐEÙ'ÓI™x�e¬:°eÓ+<ÀÑ+H�EˆE™xÑIÐIùò FùÚIs   Á	BÁ#BÁ:BrÇ   r—  c               ó(   € V ^8„  d   QhRRRRRRRR/# )	rQ   rÇ   zlist[str] | Noner—  zMembers | Candidates | Noner‹  rŽ   rR   rf   r(   )rS   s   "r-   rT   rT   Œ  s2   € ÷ Bñ BÐ/ð BÐA\ð BØ"-ðBØ9=ñBr?   c           	     ó´  € ^ RI Hp ^ RIHp Vf   \        P
                  ! 4       M\        V4      P                  4       pVf   \        R4      MV! V4      p\        V! V4      RR7      P                  R4      pVf0   \        \        P                  ! 4       RR7      P                  R4      pVf   R# \        V\        4      '       d¢   \        VP                  R4      \        4      '       d}   VR,          '       dn   \        VP                  R4      \        4      '       dI   \         ;QJ d#    R	 VR,           4       F  '       g   K   RM	  RM! R	 VR,           4       4      '       d   \#        R
4      h\%        \'        \)        WgR,          4      4      \'        T ;'       g    . 4      ,          4      pVP*                  ! V3/ \-        V4      B p	\/        WyVR7      # )zEProbe the requested union without changing recorded dependency state.)rÈ   )ÚVenvrÆ   T©ÚstrictFr�  rÇ   c              3  óL   "  € T F  p\        V\        4      '       * x € K  	  R # 5irV   ©r{  rw   ©r)   r«  s   & r-   r.   Ú"venv_is_current.<locals>.<genexpr>›  s   é € ÐJ¹>°%”z %¬Ó-×-Ñ-»>ùó   ‚"$z!invalid recorded dependency state)r‹  )r‘  rÈ   Úpm.packagesr°  r	   r’  r   Úabsoluter   r   r   r\   r{  r|   rw   rÉ   Úanyr˜   rû   r[  r­  Úexpected_stampr   r•  )
rÇ   r—  r‹  rÈ   r°  r�   rF   rˆ   Úenabledr�  s
   $$$       r-   Úvenv_is_currentr½  Œ  sS  € õ 3Ý à ,Ò 4Œ5�?Š?Ô¼$¸|Ó:L×:UÑ:UÓ:W€DØ%1Ò%9Œk˜&Ô!¹tÀD»z€GÜÑ# DÓ)°$Ô7×;Ñ;¸FÓC€DØ‚|Ü”U×%Ò%Ó'°Ô5×9Ñ9¸&ÓAˆØ‚|ÙÜ�tœT×"Ò"¬*°T·X±X¸gÓ5FÌ×*LÒ*LÐTXÐY`×TaÔTaÜ˜dŸh™h xÓ0´$×7Ò7ß‹sÑJ¸4À¾>ÓJ�s�sŠsÑJ¸4À¾>ÓJ×JÒJÜÐ<Ó=Ð=Ü”Sœ¨°xµ.ÓAÓBÄSÈÏÈÐSUÓEVÕVÓW€GØ×"Ò" 7ÑF¬n¸WÓ.EÑF€EÜ! $¸DÔAÐAr?   c               ó$   € V ^8„  d   QhRRRRRR/# )rQ   rÇ   úOptional[list[str]]Úrepairrf   rR   z)tuple[list[str] | None, list[str] | None]r(   )rS   s   "r-   rT   rT   ¢  s#   € ÷ ñ Ð/ð ¸Dð ÐEnñ r?   c               ó’  € ^ RI Hp V '       dD   ^ RIHp V  Uu. uF  pV! VR R7      '       d   K  VNK  	  ppV'       d   \	        RRV R2R4      hV! 4       pTpVe   V'       g   \        4       '       d   R	pVeE   V '       d=   \        \        V 4      \        V4      ,
          4      pV'       d   \        RRV R
24      hWg3# u upi )zVRefuse extras this platform or a frozen bundle cannot carry; return (shipped, frozen).)Úread_features)Úextra_supportedc                ó   € R # )Fr(   )Ú_s   &r-   r  Ú!_feature_policy.<locals>.<lambda>©  s   € É%r?   )Ú
importablerÆ   zextras z* are not supported by this Python/platformzBchoose a supported provider; no dependency environment was changedNzU are outside this bundle's frozen feature set (security.allow_lazy_installs is false))	rª  rÂ  Ú	pm.extrasrÃ  r   rÁ   rû   r[  rÜ   )	rÇ   rÀ  rÂ  rÃ  r«  ÚunsupportedÚshippedrŠ   Úoutsides	   &$       r-   Ú_feature_policyrÌ  ¢  sÑ   € å)çÝ-Ù*0ó R©& Ù-¨eÁ×PÐP÷ �u©&ˆð RçÜ˜v¨°°Ð=gÐ'hØcóeð eá‹o€GØ€Fð Ò§&Ô-B×-DÒ-DØˆØÒŸfÜœ˜V›¤s¨6£{Õ2Ó3ˆßÜØØ˜'˜ð #>ð >óð ð
 ˆ?Ðùò'Rs
   ™C±Cc               ó   € V ^8„  d   QhRR/# )rQ   Úpatientrf   r(   )rS   s   "r-   rT   rT   ¿  s   € ÷ ñ  4ñ r?   c              #  ó8  "  € ^ RI Hp ^ RIHpHp T! \
        P                  ! 4       V '       d   RMTR7      ;_uu_ 4       pV'       g0   \        RRVR R2R	4      pVP                  R
\        V4      4       VhRx € RRR4       R#   + '       g   i     R# ; i5i)zIHold the dependency lock, or refuse when an impatient caller would queue.r×   )ÚINSTALL_LOCK_TIMEOUT_SECONDSÚruntime_lockN)ÚtimeoutrÆ   z:another Hermes process is installing dependencies (waited z.0fzs)zCretry in a moment, or run `hermes pm install` to install explicitlyzinstall-busy)
rÙ   rØ   Úhermes_cli.runtime_staterÐ  rÑ  r	   r’  r   rÚ   rw   )rÎ  rØ   rÐ  rÑ  ÚheldrÛ   s   $     r-   Ú_venv_install_lockrÕ  ¾  s}   é € õ ßSñ 
”e—o’oÓ'¿±ÐFb×	cÕ	cÐgkßÜ ØØLÐMiÐjmÐLnÐnpÐqØUóˆEð
 ×"Ñ" >´3°u³:Ô>ØˆKÛ÷ 
d×	c×	cÒ	cüs   ‚>BÁ <BÁ<
BÂB	Â	Bc               ó   € V ^8„  d   QhRR/# )rQ   r—  r˜  r(   )rS   s   "r-   rT   rT   Ô  s   € ÷ ñ Ð,ñ r?   c                óÚ   € ^ RI HpHp \        V \        4      '       d   V! \        V P                  4      4      # \        V \        4      '       d   V! \        V P                  4      4      # R# )zSSnapshot a plugin state change under the held lock, or None for member-only inputs.)ÚPluginSelectionÚStagedPluginN)rœ  rØ  rÙ  r{  r   r|   Údatar   )r—  rØ  rÙ  s   &  r-   Ú_publicationrÛ  Ô  sJ   € ç<ä�'œ9×%Ò%Ùœt G§L¡LÓ1Ó2Ð2Ü�'œ<×(Ò(ÙœD §¡Ó.Ó/Ð/Ùr?   c               ó   € V ^8„  d   QhRR/# r  r(   )rS   s   "r-   rT   rT   ß  s   € ÷ :ñ : ñ :r?   c                ó  € ^ RI Hp ^ RIHpHp  V P                  \        P                  ! 4       4       V! \        P                  ! 4       4       TP                  RR4       R#   \         d    T! \        P                  ! 4       4       h i ; i)zMA disabled plugin's code changes without touching the dependency environment.r×   ©Úfinish_publicationÚrecover_publicationFzinactive pluginN)
rÙ   rØ   rÓ  rß  rà  r  r	   r’  r  Úrecord_venv_rebuild)ÚchangerØ   rß  rà  s   &   r-   Ú_publish_inactiverã  ß  se   € åßPðØ�‰”u—’Ó(Ô)Ùœ5Ÿ?š?Ó,Ô-ð ×Ñ Ð'8Ö9øô ô ÙœEŸOšOÓ-Ô.Øðús   �?A# Á#(Bc               ó$   € V ^8„  d   QhRRRRRR/# )rQ   rˆ   r|   ÚinputsrÀ  rf   r(   )rS   s   "r-   rT   rT   í  s&   € ÷ Fñ F Tð F¸dð FÈDñ Fr?   c               óò  € V'       Ed
   V'       d®   \        VP                  R4      \        4      '       d}   \        ;QJ d#    R VR,           4       F  '       g   K   RM	  RM! R VR,           4       4      '       g5   \        VP                  R4      \        4      '       d   VR,          '       g   \        RR4      h\        TP                  RVe   TMR.4      4      pVP                  R4      ;'       g    V P                  V. R	7      pWxR
R/3# \        \        \        YP                  RT;'       g    . 4      4      4      \        T;'       g    . 4      ,          4      pWpP                  ! V3/ VB V3# )zMReturn (enabled extras, expected stamp, package inputs) this sync must reach.rÇ   c              3  óL   "  € T F  p\        V\        4      '       * x € K  	  R # 5irV   r´  rµ  s   & r-   r.   Ú$_target_selection.<locals>.<genexpr>ñ  s   é € ÐSÁN¸5¤
¨5´#Ó 6×6Ñ6ÃNùr·  TFr�  rÆ   zIrecorded dependency selection is incomplete; refusing to change its graphÚall)r›  rÀ  )
r{  r   rÉ   rº  rw   r   r»  rû   r[  r­  )	rF   rˆ   rÇ   rå  rÀ  rÊ  rŠ   r¼  r�  s	   &&$$$$$  r-   Ú_target_selectionrê  í  s!  € ç€vßœ D§H¡H¨XÓ$6¼×=Ò=ß›ÑSÀDÈÆNÓSŸŸšÑSÀDÈÆNÓS×SÒSÜ& t§x¡x°Ó'8¼#×>Ò>ÀdÈ7ÇmÄmÜ˜vÐ'rÓsÐsÜ�t—x‘x °FÒ4F©&ÈUÈGÓTÓUˆØ—‘˜Ó!×TÐT W×%;Ñ%;¸GÐQSÐ%;Ó%TˆØ ¨$Ð/Ð/Ð/ô ”Sœ¨·(±(¸8ÀWÇ]À]ÐPRÓ2SÓTÓUÔX[Ð\b×\hÐ\hÐfhÓXiÕiÓj€GØ×*Ò*¨7Ñ=°fÑ=¸vÐEÐEr?   Úskip_invalid_secondaryc               ó<   € V ^8„  d   QhRRRRRRRRR	R
RR
RR
RR
RR/	# )rQ   r‡   r   r¼  rÄ   r�  rw   rå  r|   Úcurrentrf   rÀ  rp  rë  rR   rá   r(   )rS   s   "r-   rT   rT   ý  sR   € ÷ ñ  eð Àð ÐSVð Ð`dð Ø#ðØ-1ðØ=AðØ[_ðØlpñr?   c               ón  € ^ RI Hp
 ^ RIHpHp  V'       d   / M V P
                  ! V3RVRV	/VB ;'       g    / pV'       g$   V P                  ! V3/ VB V8w  d   \        R4      hVe%   VP                  \        P                  ! 4       4       V'       g5   VP                  R4      e   ^ RIHp V! 4        VP                  ! R	WC3/ VB  Ve   V! \        P                  ! 4       4       T
P                  V'       * V'       d   R
MR4       R#   \          d    T! \        P                  ! 4       4       h i ; i)zMBuild (unless current), publish the plugin change, then record the selection.r×   rÞ  rp  rë  z=Dependency inputs changed while preparing publication; retry.Nr�  )Úflush_before_selectingrÆ   zalready in syncr1   )rÙ   rØ   rÓ  rß  rà  Úapplyr»  r˜   r  r	   r’  r   r‘  rï  Úrecord_staterá  r  )rF   r‡   râ  r¼  r�  rå  rí  rÀ  rp  rë  rØ   rß  rà  Úresultrï  s   &&&$$$$$$$     r-   Ú_commit_selectionró  ý  s  € õ ßPðß‘ W§]¢]°7ñ &lÀXð &lØJ`ð&lØdjñ&l÷ &rð &rØoqð 	ç˜'×0Ò0°ÑC¸FÑCÀuÔLÜÐ\Ó]Ð]ØÒØ�N‰Nœ5Ÿ?š?Ó,Ô-ßØ�z‰z˜-Ó(Ò4ÝBÙ&Ô(Ø×Ò˜v uÑ@¸Ò@ØÒÙœuŸšÓ0Ô1Ø×#Ñ#¨¤KÇgÑ1BÐSUÖVøÜô ÙœEŸOšOÓ-Ô.Øðús)   �D ˜D ¸
D ÁAD ÂA+D ÄD Ä(D4rÀ  Úevict_incompatible_pluginsc               ó0   € V ^8„  d   QhRRRRRRRRRRR	R
/# )rQ   rÇ   r¿  rp  rf   r—  r˜  rÀ  rô  rR   rá   r(   )rS   s   "r-   rT   rT     sK   € ÷ DLñ DLÐ)ð DL¸tð DLØ)ðDLØ:>ðDLà*.ðDLà;?ñDLr?   c               ó@  € ^ RI Hp VP                  R4      pRp V'       d   V f   Ve   \        R4      hV'       d    V'       g   Vf	   V'       g   \        R4      h\	        WR7      w  r‰\        R4      p
^ R	IHp ^ R
IH	p \        T;'       g    TR7      ;_uu_ 4        V! \        P                  ! 4       4       \        V4      p\        WÜ4      '       d    VP                  '       g   \!        V4       EM�V'       do   ^ RIHp \'        \        P(                  ! 4       4      pVP+                  R4      ;'       g$    \-        4       P+                  R4      ;'       g    / pV! W¯VWW‘R7       EMVe   RVP.                  /M
\1        V4      p\'        \        P(                  ! 4       VR7      pVP+                  R4      ;'       g$    \-        4       P+                  R4      ;'       g    / p\3        V
VV VW8V	R7      w  pppV'       * ;'       d    \5        VV4      pV'       gD   V'       g<   V'       g4   \7        4       '       g$   \9        RV '       d   \;        V 4      4      hR4      hVP=                  V4       \?        W¯VVVVVW1R7	       RRR4       Rp TPI                  YwR8X  d   ^ M^TR7       R#   + '       g   i     L1; i  \@         d2   pTPC                  RR\E        T4      PF                   RT 24       h Rp?ii ; i  TPI                  YwR8X  d   ^ M^TR7       i ; i)uÉ  Make the venv match uv.lock + the enabled extras. Extras union into
the installed state (one ledger); no-op when the stamp already matches.
``repair`` restores the recorded dependency graph into a fresh generation,
bypassing both that shortcut and config discovery. It cannot add features.
``explicit`` marks a deliberate install command (`hermes pm install`,
`hermes update`) â€” those are the remedy the lazy-install policy points
at, so the policy does not apply to them. ``plugins`` names the one
source of plugin members (see pm.plugin_inputs); None discovers them from config.
``evict_incompatible_plugins`` is the update's contract: a discovered plugin that
keeps the environment from building is disabled instead of failing the sync
(see pm.plugin_eviction).

Lazy installs OFF = the frozen feature set: when
security.allow_lazy_installs is false AND the bundle's
enabled-features.json exists, the feature list is FROZEN to that file
â€” requested extras outside it are refused, and plugin members are
never installed (the bundle IS the install).

Receipt contract: EVERY outcome writes a receipt. ``begin`` fires
BEFORE the frozen/lazy refusals (a refusal is a recorded ``failed``
outcome, not a silent raise); finalize runs in FINALLY â€” no-op syncs
("ok" with ``venv_rebuild`` false) and refusals ("failed") both get
a receipt. Plugin selection data is discovered and published by the worker
under this lock; no executable transaction phases cross the process boundary.r×   ÚsyncÚfailedNzNrepair restores the recorded environment; it cannot change features or pluginszLonly an explicit sync of the discovered plugin selection may disable plugins)rÀ  rÆ   )rà  )rÙ  )rÎ  )Úsync_evicting)rÇ   rÊ  rŠ   rp  r›  r±  )rÇ   rå  rÀ  rÊ  rŠ   zvenv out of sync)r¼  r�  rå  rí  rÀ  rp  Úokzdependency-syncFrA  )Útoken)%rÙ   rØ   Úbeginr˜   rÌ  r   rÓ  rà  rœ  rÙ  rÕ  r	   r’  rÛ  r{  r,   rã  Úpm.plugin_evictionrù  r   rÈ   r   r]   Úmembersr   rê  r•  rÁ   rÜ   rw   Úrecord_feature_listró  r  Úrecord_steprŸ  r�   Úfinalize)rÇ   rp  r—  rÀ  rô  rØ   rû  ÚoutcomerÊ  rŠ   rF   rà  rÙ  râ  rù  r‡   rˆ   rå  r¼  r�  rí  rÀ   s   &$$$$                 r-   r|  r|    sz  € õ6 à�M‰M˜&Ó!€EØ€Gð%Lß�vÒ)¨WÒ-@ÜÐmÓnÐnß%¯6°WÒ5H×PXÜÐkÓlÐlÜ)¨&Ô@‰ˆÜ˜fÓ%ˆÝ@Ý/Ü¨×(:Ð(:°F×;Ö;Ù¤§¢Ó 1Ô2Ü! 'Ó*ˆFÜ˜&×/Ò/¸¿¿¸Ü! &Ö)ß+Ý<äœe×6Ò6Ó8Ó9�Ø—y‘y Ó(×FÐF¬F«H¯L©L¸Ó,@×FÐFÀB�Ù˜g¨d¸6Ð[a×uà<BÒ<N˜-¨¯©Ñ8ÔTbÐcjÓTk�Üœe×6Ò6Ó8ÀÔH�Ø—y‘y Ó(×FÐF¬F«H¯L©L¸Ó,@×FÐFÀB�Ü):¸7ÀDÐQWÐ`fØBHÐbhô*jÑ&�˜ à$œ*×LÐLÔ)?ÀÀeÓ)L�ß§v·hÔG\×G^ÒG^Ü& v¿f¬s°6«{Ó]Ð]ÐJ\Ó]Ð]Ø×+Ñ+¨GÔ4Ü! '°&À'ÐQVÐ_eØ*1¸&õU÷+ <ð. ‰ð
 	×Ñ˜°$¤¡!¸AÀUÐÖK÷9 <×;ûô0 ô Ø×ÑÐ-¨u¼¸c»×9KÑ9KÐ8LÈBÈsÈeÐ6TÔUØûðûð 	×Ñ˜°$¤¡!¸AÀUÐÕKúsŒ   ›"K  ¾K  ÁK  ÁAK  Â A	J-Ã*J-Ã?;J-Ä; J-ÅA%J-Ç J-Ç#%J-È	J-ÈJ-È&J-È.AJ-Ê
K  Ê-J=	Ê8K  Ë K<Ë,K7Ë7K<Ë<K? Ë?LÚinclude_venvc               ó    € V ^8„  d   QhRRRR/# )rQ   r  rf   rR   r‡  r(   )rS   s   "r-   rT   rT   ^  s   € ÷ #ñ #˜4ð #¨>ñ #r?   c                óX  € \         P                  ! 4       P                  4       '       g,   \         P                  ! 4       P                  4       '       g   / # / p\	        4       p\        4       p\        4       pVP                  4        F^  p \        V4      pTP                  '       g   TP                  '       d   K5  TP                  T4      e   KJ  \        YbT4      e   KZ  RY&   K`  	   \        R4      pV '       dY   VeU   \         P                  ! 4       P                  4       '       g   VP                  R4      e    \        4       '       g   RVR&   V# V#   \         d     KÞ  i ; i  \         d    Rp Lƒi ; i  \         \"        \$        3 d   p\'        T4      TR&    Rp?T# Rp?ii ; i)u�  Cheap stamp comparisons of the installed state
against the lockfile. Maps package names to reasons; empty means healthy. Never
installs, never touches the network. An install pm has never touched
(no installed-state file) reports nothing â€” pm only vouches for what
it installed. Lockfile packages this build doesn't know (version skew
during a partial update) are skipped, not fatal.Nznot installed or outdatedrÆ   zout of sync with uv.lock)r	   r\   r‚   rÈ   rX   r]   r   r†  r   r‰  Úoptionalr—   rE  r‰   r   r½  rp   r“  r˜   rw   )	r  Úproblemsrv   r‡   rJ   rj   rF   rÆ   rÀ   s	   $        r-   Údriftr  ^  sp  € ô ×ÒÓ×%Ñ%×'Ò'´×0HÒ0HÓ0J×0RÑ0R×0TÒ0TØˆ	à!€HÜ‹{€HÜ‹H€EÜÓ€FØ—‘Ö ˆð	Ü! $Ó'ˆGð ××Ð˜w×/×/Ð/ÙØ×!Ñ! &Ó)Ò5ÙÜ˜w°&Ó9ÔAØ8ˆH‹Nñ !ðÜ˜6Ó"ˆ÷ ˜Ò(¬e×.FÒ.FÓ.H×.PÑ.P×.RÒ.RÐV[×V_ÑV_Ð`fÓVgÒVsð	(Ü"×$Ò$Ø#=�˜Ñ ð €Oˆ8€Oøô% ô 	Úð	ûô ô ØŠðûô œ¤zÐ2ô 	(Ü" 3›xˆH�VÕØ€Oûð	(ús<   Â	EÃ(E' Ä<E: ÅE$Å#E$Å'E7Å6E7Å:F)ÆF$Æ$F)c               ó    € V ^8„  d   QhRRRR/# )rQ   r  rf   rR   rÄ   r(   )rS   s   "r-   rT   rT   „  s   € ÷ ^ñ ^˜4ð ^¨9ñ ^r?   c                ót   € \        V R7      P                  4        UUu. uF  w  rV RV 2NK  	  upp# u uppi )zGHuman-readable startup diagnostics. Use drift() for package identities.©r  rA  )r  Úitems)r  rj   r  s   $  r-   Úcheckr  „  s7   € ä49À|Ô4T×4ZÑ4ZÔ4\Ô]Ñ4\¡L Dˆtˆf�B�v�hÓÑ4\Ò]Ð]ùÓ]s   ž4c               ó    € V ^8„  d   QhRRRR/# )rQ   r†  rÄ   rR   r(   )rS   s   "r-   rT   rT   ‰  s   € ÷ ñ ˜Yð ¨9ñ r?   c                óÀ  € \        V 4      pV  F°  p \        V.4       Uu0 uF  q3P                  kK  	  upV0,
          pT Uu. uF  qUT9   g   K  TP	                  T4      NK  	  ppT'       g   Kc  \        T4      TP	                  T4      8  g   K„  TP                  T4       TP                  \        T4      T4       K²  	  V# u upi   \         d     KÉ  i ; iu upi )a  *names* with each package moved ahead of the packages it depends on.

A package that extends its dependency must win on PATH: node's own dir also holds node's
bundled npm and npx, so with node first every ``npm`` ran that copy, not the pinned npm.
Unrelated packages keep their order.
)rÉ   r   rj   r‰  r:   ÚminÚremoveÚinsert)r†  Úorderrj   rF   ÚdepsÚdepÚ	positionss   &      r-   Ú_dependents_firstr  ‰  s¼   € ô �‹K€EÛˆð	Ü04°d°V´Ó=± W—L”L±Ñ=ÀÀÕFˆDñ 26ÓF±¨#À¹Ô%�U—[‘[ Ö%±ˆ	ÐFß‰9œ˜Y›¨%¯+©+°dÓ*;Ö;Ø�L‰L˜ÔØ�L‰Lœ˜Y›¨Ö.ñ ð €Lùò >øÜô 	Úð	üâFs-   ’C	 C´C	ÁCÁCÃC	Ã	CÃCc               ó   € V ^8„  d   QhRR/# rÃ   r(   )rS   s   "r-   rT   rT   �  s   € ÷ +ñ +˜)ñ +r?   c                 ó(  a
aaa€ \        4       o\        4       o/ oVVV3R lo
. p \        SP                  4       4       EF<  p \	        V4      p\        V.4      pTP                  '       d   K0  \        TRR4      '       g   KE  TP                  S4      e   KZ  S
! T4      pTeC   \        ;QJ d     T
T3R lT 4       F  '       g   K   RM	  RM! T
T3R lT 4       4      '       d   Kª  Tw  rVTP                  YP                  4      pTP                  R4      ;'       g    . p\        T\        4      '       d   T.pT F9  p	T	'       g   K  \!        T	4      T 9  g   K  T P#                  \!        T	4      4       K;  	  EK?  	  V #   \         d     EKR  i ; i)uÖ  Composed PATH dirs of all installed (non-internal, on_path) store
packages, each package ahead of its dependencies (``_dependents_first``),
deduped. Includes optional packages that are
*installed* (facts say so) â€” an installed git/gh must be on PATH even
though it's not in the root closure. A package whose dependency chain is
not fully installed contributes nothing: store npm over a missing store
node would run the user's node, a partial toolchain. Never installs.c                ó€   <€ V P                   S9  d   \        V SS4      SV P                   &   SV P                   ,          # rV   )rj   r‰   )rF   Ú	locationsrv   rJ   s   &€€€r-   ÚlocatedÚ!_store_path_dirs.<locals>.locatedª  s5   ø€ Ø�<‰<˜yÔ(Ü&9¸'À8ÈVÓ&TˆI�g—l‘lÑ#Ø˜Ÿ™Õ&Ð&r?   Úon_pathTc              3  ób   <"  € T F$  pVP                  S4      e   K  S! V4      R J x € K&  	  R # 5irV   )rE  )r)   r  r  rJ   s   & €€r-   r.   Ú#_store_path_dirs.<locals>.<genexpr>½  s0   øé € ð #JÁ5¸CØ&)×&8Ñ&8¸Ó&@ô $8¡7¨3£<°4Õ#7Ã5ùs   ƒ/�/FÚPATH)rX   r   r  r†  r   r   r‰  r—   rG  rE  rº  r€  r�   r   r{  rw   r   r}  )r�  rj   rF   r�  r™   r‡   rG   rO  Ú	path_dirsÚ	directoryr  r  rv   rJ   s             @@@@r-   Ú_store_path_dirsr$  �  sZ  û€ ô ‹{€HÜÓ€FØ#%€I÷'ð
 €DÜ! (§.¡.Ó"2×3ˆð	Ü! $Ó'ˆGÜ˜$˜“LˆEð ××ÐÙÜ�w 	¨4×0Ò0ÙØ×!Ñ! &Ó)Ò5ÙÙ˜7Ó#ˆØÒŸs›sõ #JÁ5ó #JŸsŸsšsõ #JÁ5ó #J÷  Jò  JáØ‰ˆØ�m‰m˜D§*¡*Ó-ˆØ—G‘G˜F“O×)Ð) rˆ	Ü�i¤×%Ò%Ø"˜ˆIÛ"ˆIß‰yœV IÓ.°dÖ:Ø—‘œF 9Ó-Ö.ô #ñ+ 4ð0 €Køô) ô 	Ûð	ús   ÁFÆFÆFÚallow_incompletec               ó    € V ^8„  d   QhRRRR/# )rQ   r%  rf   rR   rÄ   r(   )rS   s   "r-   rT   rT   Ë  s   € ÷ ñ  $ð °9ñ r?   c                ó¦   € ^ RI p\        V '       * R7      pVP                  P                  RR4      p\	        V4      pWC8w  d   WAP                  R&   V# )u¿  Make the installed store usable: put its tool dirs at the FRONT of
os.environ['PATH'] so reactive `shutil.which('git'|'node'|'ffmpeg'|...)`
resolves the bundled binaries, never a user copy that sorts earlier.
Return `check()`'s problems, or an empty list on success, so startup
callers can report the verdict without checking the store twice.

Drift still activates every package whose whole chain is installed
(`_store_path_dirs`): refusing all of them handed every tool to the
user's PATH copies. A damaged package, and anything depending on it,
stays off PATH so no toolchain is served half from the store.

``allow_incomplete`` is the install-time exception: tools are published
before the venv sync, so the venv verdict is not computed at all.

This is the ONE sanctioned global PATH write: PATH is the discovery
contract every `which` reads, not a tool-specific env leak. Store-first
unconditionally â€” pinned bundled versions win on dev machines too.
Nr  r!  r1   )ri   r  r¹   r   Ústore_first_path)r%  ri   r  r�   Úfirsts   $    r-   Úactivater*  Ë  sK   € ó& ô Ð&6Ô"6Ô7€HØ�:‰:�>‰>˜& "Ó%€DÜ˜TÓ"€EØ„}Ø"�
‰
�6ÑØ€Or?   c               ó    € V ^8„  d   QhRRRR/# )rQ   r�   rw   rR   r(   )rS   s   "r-   rT   rT   ê  s   € ÷ 
+ñ 
+˜3ð 
+ 3ñ 
+r?   c                óT  € ^ RI p\        4       pV'       g   V # V Uu0 uF  q3P                  4       kK  	  ppV P                  VP                  4       Uu. uF%  qU'       g   K  VP                  4       V9  g   K#  VNK'  	  ppVP                  P                  . VOVO4      # u upi u upi )z�``path`` with the installed store's tool dirs moved to the front, for
Hermes's own children whose PATH gets other dirs prepended after activate.N)ri   r$  r»   ÚsplitÚpathsepr  )r�   ri   r�  ÚdrG   ry  Úrests   &      r-   r(  r(  ê  sˆ   € ó äÓ€DßØˆÙ $Ó%¡˜1�W‰WŽY¡€EÐ%Ø—z‘z "§*¡*Ô-ÓNÑ-�!³ŒA°q·w±w³yÈÑ7M�AˆAÑ-€DÐNØ�:‰:�?‰?˜>˜T˜> D˜>Ó*Ð*ùò &ùÚNs   �B Á	B%Á"B%Á9B%)NNNrV   )hrk  Ú
__future__r   rH  Úloggingri   r+  Ú	threadingÚ
contextlibr   r   r   Údataclassesr   Úpathlibr   Útypingr   rÙ   r	   Úpm.downloaderr
   r   Úpm.filesystemr   r   r   Úpm.lockr   r   Ú
pm.packager   r   r   r   r   Úpm.plugin_inputsr   r   r   r   r   Úpm.registryr   r   Úpm.storer   r   r   r    Ú	getLoggerr�   rô   rO   rX   r]   rc   rq   r‰   rŒ   rš   r¢   r„   rÁ   rÊ   rÎ   rÒ   rÜ   rì   rñ   r÷   rÿ   r  rƒ   r  r  r  r'  r1  r:  rQ  rT  rV  rn  r„  r€  r•  r   r¦  r­  r½  rÌ  rÕ  rÛ  rã  rê  ró  r|  r  r  r  r$  r*  r(  r(   r?   r-   Ú<module>r@     sÿ  ðñ+õ #ã Û Û 	Û Û ß =Ñ =Ý !Ý Ý å ß 4ß 9Ñ 9ß #ß OÕ Oß VÕ Vß )ß CÓ Cà×Ò˜Ó!€ðØ $ðØ26ðØJNôõ8+õ%õ%õ
&ðØ',ðØEJðà9=÷ñ8 �$Ô÷ð ó ððR¸5÷ Rõ$[õ";õõ@(õ]õCõ	ð,ÀA÷ ,ð0  Ð õ#õ4	õ=õõ.ð$ ñ3ó ð3õ$
>õ	Aõ	YõHñUð -1ðUð ðUð ÷Uð Uñpeà*.ðeð ,0÷eð e÷ñ ð( ñó ðð;:ð  $ð;:ð ð	;:ð
 ð;:ð ð;:ð +/ð;:ð ,0ð;:ð ,0÷;:ð|-°D÷ -ð*2ÐRV÷ 2õ
`õ0õJð$B°$ð BÐ_cð BØ04÷Bõ,ð8 ôó ðõ*õ:õFð Øbg÷ñ4DLÀeð DLØ,0ðDLØAFðDLà16÷DLð DLðN# $÷ #ðL^ $÷ ^õ
õ(+ð\¨÷ ÷>
+r?   