+
    jHàjºÅ  ã            	      óª  € R t ^ RIHt ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ]R8X  dH   ]P                  P                  ^ ]! ]
! ]4      P!                  4       P"                  ^,          4      4       ^ RIHtHt RtR R	 ltReR
RRRRRRR/R R llltR R ltReR
RRRRR/R R llltRftRRgRRh/tR R ltRR/R R lltR R ltR tR  R! lt R" R# lt!R$ R% lt"R& R' lt#R(t$R) R* lt%R+ R, lt&R- R. lt'R/ R0 lt(R1R2/R3 R4 llt)R5 R6 lt*R7 R8 lt+R9 R: lt,R; R< lt-R= R> lt.R? R@ lt/RA RB lt0RiR1R2/RC RD lllt1^t2^t3RE RF lt4RG RH lt5RI RJ lt6RK RL lt7RM RN lt8RO RP lt9RQ RR lt:RS RT lt;RU RV lt<RW RX lt=]R8X  EdN   ^ RI>t>]P~                  RY,          RZ.8X  dH   ]! ]
! ]4      P!                  4       P"                  ^,          ]P~                  R[,          4       ]@! ^ 4      h]>P‚                  ! R\R]7      tB]BP‡                  R^]
R_7       ]BP‰                  4       tE]
! ]4      P!                  4       P"                  ^,          tF]! ]FR2R`7      f   ]BP�                  ^Ra4       ]EP�                  P“                  R2R2Rb7       ]0! ]F]EP�                  4      tJ]K! ]J4      ]K! ]4      8w  d   ]BP�                  ^Rc4       ]L! RdP›                  ]J4      4       R# R# )jaÔ  Source-install launchers shared by setup, installers, and Windows repair.

Launchers execute store Python in isolated mode. They set the install's
default home and load hermes_bootstrap before the entry point. Bootstrap
reads the selected dependency generation at each start.

Windows uses distlib executables or a command-file fallback. POSIX uses
an executable shell wrapper. The standalone writer requires PM's store
interpreter before it publishes either command.
)Úannotations)ÚsuppressN)ÚPathÚ__main__)Úowning_home_rootÚ
store_rootÚ_hermes_pin_default_homec               ó    € V ^8„  d   QhRRRR/# )é   ÚvalueÚstrÚreturn© )Úformats   "Ú:/home/ubuntu/.hermes/hermes-agent/hermes_cli/_launchers.pyÚ__annotate__r      s   € ÷ Kñ K #ð K¨#ñ Kó    c                óâ   € \         P                  R8w  d   \        V 4      # V P                  R4      P	                  R4      pRVP                  RR4      P                  RR4      ,           R,           # )zRKeep inline Python source intact through Windows PowerShell's native argv quoting.ÚntÚunicode_escapeÚasciiÚ'z\x27Ú"z\x22)ÚosÚnameÚreprÚencodeÚdecodeÚreplace)r   Úescapeds   & r   Ú_inline_string_literalr       sY   € ä	‡w�w�$„Ü�E‹{ÐØ�l‰lÐ+Ó,×3Ñ3°GÓ<€GØ�—‘  gÓ.×6Ñ6°s¸GÓDÕDÀsÕJÐJr   Úmoduleúhermes_cli.mainÚcodeÚpythonÚhomec               ó0   € V ^8„  d   QhRRRRRRRRR	RR
R/# )r
   Ú	repo_rootr   r!   r   r#   ú
str | Noner$   ústr | Path | Noner%   r   ú	list[str]r   )r   s   "r   r   r   '   s:   € ÷ !7ñ !7˜tð !7¸ð !7Ø$ð!7Ø5Fð!7à+ð!7à7@ñ!7r   c               óÂ  € \        V 4      P                  4       pT;'       g-    \        V4      ;'       g    \        \        P                  4      pVe   R\        V4       R2MR\        V4       R2pVe   R\        \        V4      4       R2Rr˜MR\         R	2pR
p	R\        \        V4      4       R2V,           R,           V	,           V,           p
\        V4      RRV
.VO# )a   An installation-bound command, safe to persist across dependency GC.

Store Python owns the ABI; bootstrap selects and leases dependencies at
child start. Nix and developer interpreters retain their external owner.
No selected generation or ambient PYTHONPATH is captured in the command.
zexec(Ú)zrunpy.run_module(z&, run_name='__main__', alter_sys=True)z=os.environ['HERMES_HOME'] = os.environ.get('HERMES_HOME') or z; Ú zsys.z	 = True; z‡os.environ.get('HERMES_HOME') or os.environ.__setitem__('HERMES_HOME', str(__import__('hermes_constants').get_default_hermes_root())); z—import os, sys, runpy; os.environ.pop('PYTHONHOME', None); os.environ.pop('PYTHONPATH', None); os.environ.pop('VIRTUAL_ENV', None); sys.path.insert(0, z); zimport hermes_bootstrap; ú-Iú-c)r   ÚresolveÚresolve_store_pythonÚsysÚ
executabler    r   ÚPIN_DEFAULT_HOME_FLAG)r'   Úargsr!   r#   r$   r%   ÚrootÚentryÚpinÚsettleÚ	bootstraps   &&$$$$     r   Úruntime_commandr;   '   s  € ô �	‹?×"Ñ"Ó$€DØ×IÐIÔ+¨DÓ1×IÐI´T¼#¿.¹.Ó5I€FØ7;Ò7GˆeÔ*¨4Ó0Ð1°Ñ3Ø
Ô2°6Ó:Ð;Ð;aÐbð 
ð
 ÒØVÜ0´°T³Ó;Ð<¸Bð@ØBDñ ð Ô*Ð+¨9Ð5ˆðUˆð	ô 5´S¸³YÓ?Ð@Àð	Eð õ		ð
 &õ	&ð õ	ð õ	ð ô �‹K˜˜t YÐ6°Ð6Ð6r   c               ó$   € V ^8„  d   QhRRRRRR/# )r
   r'   r   Úargvr*   r   ÚNoner   )r   s   "r   r   r   K   s&   € ÷ 	Oñ 	O Tð 	O°ð 	O¸tñ 	Or   c           
     óŽ  € ^ RI pVP                  ! RR7      pVP                  RRR7       VP                  RVP                  R7       VP	                  V4      pVP
                  R	,          R
.8X  d   VP
                  R,          MVP
                  p\        \        P                  ! \        WVP                  R7      4      4       R# )zDMachine boundary for consumers holding the exact published launcher.Nz+Resolve this installation's launch command.©Údescriptionz--moduler"   )Údefaultr5   )Únargs:Né   Nz--ºrD   NN)r!   )ÚargparseÚArgumentParserÚadd_argumentÚ	REMAINDERÚ
parse_argsr5   ÚprintÚjsonÚdumpsr;   r!   )r'   r=   rF   ÚparserÚoptionsr5   s   &&    r   Úprint_runtime_commandrP   K   s•   € ãà×$Ò$Ð1^Ô_€FØ
×Ñ˜
Ð,=ÐÔ>Ø
×Ñ˜ h×&8Ñ&8ÐÔ9Ø×Ñ Ó%€GØ&Ÿ|™|¨BÕ/°D°6Ô9ˆ7�<‰<˜Ö¸w¿|¹|€DÜ	Œ$�*Š*”_ Y¸W¿^¹^ÔLÓ
MÖNr   c          
     ó,   € 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   s   "r   r   r   W   s9   € ÷ Fñ F Dð F¸cð FØ!2ðFØARðFØ^gñFr   c               ó²   € \        V 4      p\        V4      f   \        WQW#VR7      # VR8X  d   . MRV.p\        VR,          R,          R,          4      .VOVO# )zûPersist a source launcher, never the versioned tool it currently uses.

External/Nix installs retain their externally owned interpreter contract.
Source installation/update publication refreshes the local launcher when
the managed Python pin changes.
)r!   r$   r%   r"   ú--run-moduleú.hermesÚbinÚhermes)r   r1   r;   r   )r'   r5   r!   r$   r%   r6   Úprefixs   &&$$$  r   Úinstallation_commandrX   W   sb   € ô �	‹?€DÜ˜DÓ!Ò)Ü˜t°&ÈdÔSÐSØÐ.Ô.‰R°^ÀVÐ4L€FÜ��yÕ  5Õ(¨8Õ3Ó4ÐE°vÐEÀÐEÐEr   rV   ú
hermes-acpc               ó   € V ^8„  d   QhRR/# )r
   r   Úboolr   )r   s   "r   r   r   q   s   € ÷ ñ �Tñ r   c                 ó(   € \         P                  R 8H  # )r   )r   r   r   r   r   Ú_is_windowsr]   q   s   € Ü�7‰7�d‰?Ðr   ÚpublicationFc               ó$   € V ^8„  d   QhRRRRRR/# )r
   r'   r   r^   r[   r   úPath | Noner   )r   s   "r   r   r   u   s!   € ÷ 0ñ 0 Dð 0¸$ð 0È;ñ 0r   c               ór   € V'       d   \        \        V RR7      4      pVe   V# \        \        V 4      4      # )aõ  Read PM's committed Python tool, without adopting unrecorded bytes.

Callers that PERSIST the result in a launcher (``stage_launcher`` and the
publication gates below) pass ``publication=True``: the tree's own store
wins over an inherited ``HERMES_RUNTIME_DIR``. The override names a store
for the running process (an e2e fixture, a desktop toolchain) that a later
scratch cleanup may delete, leaving the launcher to exit 127 forever
(#131745). It still supplies the store when the tree records none.
F)Úhonor_runtime_override)Ú_store_pythonr   )r'   r^   Úowns   &$ r   r1   r1   u   s2   € ÷ ÜœJ yÈÔOÓPˆØŠ?ØˆJÜœ IÓ.Ó/Ð/r   c               ó    € V ^8„  d   QhRRRR/# )r
   Úruntimer   r   r`   r   )r   s   "r   r   r   †   s   € ÷ ñ ˜4ð  Kñ r   c                ó¾  € \        4       '       d   R MRpV R,          pVP                  4       '       d‘    \        P                  ! VP	                  RR7      4      P                  R/ 4      pVP                  R4      ;'       g    / P                  R4      pV'       d(   W,          V,          pVP                  4       '       d   V# R#   \        \        3 d    Rp LFi ; i)	ú
python.exezbin/python3z
facts.jsonú	utf-8-sig©ÚencodingÚpackagesr$   r7   N)r]   Úis_filerL   ÚloadsÚ	read_textÚgetÚOSErrorÚ
ValueError)rf   ÚrelÚfactsrl   r7   Ú	candidates   &     r   rc   rc   †   s¹   € Ü%Ÿ-š-‰,¨]€Cà�lÕ"€EØ‡}�}‡‚ð	Ü—z’z %§/¡/¸; /Ó"GÓH×LÑLØ˜BóˆHð —\‘\ (Ó+×1Ð1¨r×6Ñ6°wÓ?ˆE÷ Ø�¨#Õ-ˆIØ× Ñ ×"Ò"Ø Ð áøô œÐ$ô 	ØŠEð	ús   µAC ÂC ÃCÃCc                 ól   €  ^ RI Hp  V #   \         d     Mi ; i ^ RIHp  T #   \         d     R# i ; i)uE   distlib's ScriptMaker â€” standalone first, then pip's vendored copy.©ÚScriptMakerN)Údistlib.scriptsrx   ÚImportErrorÚpip._vendor.distlib.scriptsrw   s    r   Ú_load_script_makerr|   š   sB   € ðÝ/àÐøÜô ÙðúðÝ;àÐøÜô Úðús   ‚
 Š—œ$ ¤3²3c               ó   € V ^8„  d   QhRR/# )r
   Ú
python_exer   r   )r   s   "r   r   r   ª   s   € ÷ ñ  Dñ r   c                óp  € \        V 4      P                  R,          R,          R,          R,          R,          pVR,          P                  4       '       g   R# ^ RIp^ RIp^ RIpRVP                  \        V4      P                  4       4      P                  4       R	,           2p V\        P                  9  dŸ   VP                  P                  WAR
,          \        V4      .R7      pVe   VP                  f   R# VP                  P                  V4      \        P                  V&   VP                  P!                  \        P                  V,          4       VP#                  V R24      P$                  #   \&        \(        \*        \,        3 d%    \        P                  P/                  TR4        R# i ; i)a8  ScriptMaker from the pip that ships with the interpreter being bound.

A launch activates only the dependency environment, which carries no
distlib and drops the store's site-packages, so the update that repins
Python could only publish a .cmd and retire hermes.exe -- which Desktop's
backend sweep, shortcuts and terminal profiles name. python-build-standalone
ships pip (the installer mints the first hermes.exe through it), and its
vendored distlib is self-contained. It loads under a private name so the
store's pip never answers an ``import pip`` in this process.ÚLibzsite-packagesÚpipÚ_vendorÚdistlibz
scripts.pyNÚ_hermes_store_distlib_:Né   Nz__init__.py)Úsubmodule_search_locationsz.scripts)r   Úparentrm   ÚhashlibÚ	importlibÚimportlib.utilÚsha256r   r   Ú	hexdigestr2   ÚmodulesÚutilÚspec_from_file_locationÚloaderÚmodule_from_specÚexec_moduleÚimport_modulerx   rz   rq   ÚSyntaxErrorÚAttributeErrorÚpop)r~   Úpackagerˆ   r‰   r   Úspecs   &     r   Ú_store_script_makerr™   ª   sQ  € ô �:Ó×%Ñ%¨Õ-°Õ?À%ÕGÈ)ÕSÐV_Õ_€GØ�lÕ"×+Ñ+×-Ò-ÙÛÛÛð $ G§N¡N´3°w³<×3FÑ3FÓ3HÓ$I×$SÑ$SÓ$UÐVYÕ$ZÐ#[Ð\€DðØ”s—{‘{Ô"Ø—>‘>×9Ñ9Ø Õ-Ì3ÈwË<È.ð :ó ZˆDàŠ|˜tŸ{™{Ò2ÙØ )§¡× ?Ñ ?ÀÓ EŒC�K‰K˜ÑØ�K‰K×#Ñ#¤C§K¡K°Õ$5Ô6Ø×&Ñ&¨$¨¨xÐ'8Ó9×EÑEÐEøÜœ¤+¬~Ð>ô Ü�‰�‰˜˜dÔ#Úðús   Â%AE6 Ã<A9E6 Å6;F5Æ4F5c               ó$   € V ^8„  d   QhRRRRRR/# )r
   Úexer   Úvenv_dirr`   r   r[   r   )r   s   "r   r   r   Ë   s!   € ÷ 5ñ 5˜4ð 5¨;ð 5¸4ñ 5r   c                ó@  a€ Vf   R# \        4       pVR,          R,          VR,          R,          VR,          R,          VR,          R,          VR,          R,          VR,          R	,          3 F6  pR F-  p VP                  \        V4      P                  V4      4       K/  	  K8  	   \        V 4      P                  4       o\        ;QJ d    T3R
 lT 4       F  '       g   K   R# 	  R# ! T3R
 lT 4       4      #   \         d     K—  i ; i  \         d     R# i ; i)uE  True when an existing launcher exe embeds the venv interpreter â€”
i.e. it is a copied venv console-script trampoline from the pre-pm
installer, which boots through ``venv\Scripts\python.exe`` and must be
replaced. distlib launchers append the interpreter shebang after the zip
payload; both encodings are scanned to be safe.FÚScriptsz
hermes.exezhermes-acp.exerh   rU   Úpython3rV   rY   c              3  ó,   <"  € T F	  qS9   x € K  	  R # 5i©Nr   )Ú.0ÚneedleÚdatas   & €r   Ú	<genexpr>Ú$exe_is_venv_bound.<locals>.<genexpr>å   s   øé € Ð4©G &˜Ž~«Gùs   ƒT)úutf-8ú	utf-16-le)	ÚsetÚaddr   r   Ú	Exceptionr   Ú
read_bytesrq   Úany)r›   rœ   ÚneedlesÚinterpreterÚencr¤   s   &&   @r   Úexe_is_venv_boundr±   Ë   s  ø€ ð ÒÙÜ‹e€Gà�9Õ˜|Õ+Ø�9ÕÐ/Õ/Ø�9Õ˜|Õ+Ø�5Õ˜9Õ$Ø�5Õ˜8Õ#Ø�5Õ˜<Õ'óˆó *ˆCðØ—‘œC Ó,×3Ñ3°CÓ8Ö9ó *ñðÜ�C‹y×#Ñ#Ó%ˆ÷ ‹3Ô4©GÓ4�3Œ3Ð4Š3Ð4ˆ3Ô4©GÓ4Ó4Ð4øô ô Úðûô ô Úðús$   Á7)C<Â)D Ã<DÄ
DÄDÄDc               ó    € V ^8„  d   QhRRRR/# ©r
   Útargetr   r   r`   r   )r   s   "r   r   r   è   s   € ÷ ñ ˜$ð ¨+ñ r   c                ó  € V P                  V P                   R\        P                  ! 4        24      p V! V4       \        P                  ! W 4       V #   \
         d(     TP                  4        M  \
         d     Mi ; i R# i ; i)zjStage under a pid-suffixed name then os.replace, so a concurrent
process start never sees a torn launcher.z.stage.N)Ú	with_namer   r   Úgetpidr   rq   Úunlink)r´   ÚwriteÚstagings   && r   Ú_write_atomicr»   è   sy   € ð ×Ñ &§+¡+ ¨g´b·i²i³k°]ÐCÓD€Gð	ÙˆgŒÜ
�
Š
�7Ô#ØˆøÜô ð	Ø�N‰NÕøÜô 	Ùð	úâðús5   µA ÁBÁ!A2Á1BÁ2B Á=BÁ?B Â BÂBc               ó0   € V ^8„  d   QhRRRRRRRRRRR	R/# )
r
   r   r   r'   r   Úout_dirr~   Úsite_packagesr`   r   r   )r   s   "r   r   r   ø   sT   € ÷ [bñ [bØ
ð[bàð[bð ð[bð ð	[bð
 ð[bð ñ[br   c                ó	  a aaaaaaa€ \         S ,          w  oo\        V4      p\        S \        V4      V4      o\        4       '       g   \	        S VSS4      # \        4       ;'       g    \        S4      pVEeè    ! V3R lRV4      o^ RIp^ RIH	pH
p R VVVV V3R llp	VP                  RS  R2VR	7      ;_uu_ 4       p
 \        R
 V	! \        V
4      4       4       R4      pVEeq   W+P                  ,          p V! V4      ;_uu_ 4       qØ! V4      ;_uu_ 4       pVP                  4       VP                  4       u;8X  d	   R.8X  d°   M M¬VP!                  4       RVP#                  4       ^ ,          P$                   VP!                  4       RVP#                  4       ^ ,          P$                   8X  dF   VP'                  R4      VP'                  R4      8X  d!   VuuRRR4       uuRRR4       uuRRR4       # RRR4       RRR4        T	! T4      pT FB  p\        T4      P,                  P/                  4       R8X  g   K-  \        T4      u uuRRR4       # 	  RRR4       TS  R2,          p^ RIH	pH
p  V! V4      ;_uu_ 4       pVP                  4       R.8X  dÝ   VP!                  4       RVP#                  4       ^ ,          P$                   pRS R2P1                  4       RS R2P1                  4       3pVP3                  R4      o\4        ;QJ d    V3R lV 4       F  '       g   K   RM	  RM! V3R lV 4       4      '       d2   VP'                  R4      SP1                  R4      8X  d   VuuRRR4       # RRR4       ^ RIpTP9                  SP1                  R4      4      P;                  R4      pRT R2pRS RT R2o\=        TS  R2,          T3R l4      #   \         d    Rp EL	i ; i  + '       g   i     EL; i  + '       g   i     EL; i  \(        T\*        3 d     EL&i ; i  \         d    . p EL1i ; i  + '       g   i     ELö; i  + '       g   i     Lé; i  \(        T\*        3 d     ELi ; i)zIWrite a native launcher with the shared bootstrap script, or return None.Nc                  ó$   <€ ] tR tRtV 3R ltRtR# )Ú)mint_launcher.<locals>._PathedScriptMakeri	  c                	ó   <€ S# r¡   r   )Úselfr7   Úscripts   &&€r   Ú_get_script_textÚ:mint_launcher.<locals>._PathedScriptMaker._get_script_text
  s   ø€ Ø�r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__rÅ   Ú__static_attributes__)rÄ   s   €r   Ú_PathedScriptMakerrÁ   	  s   ø† ÷ñ r   rÌ   ©Ú
BadZipFileÚZipFilec               ó    € V ^8„  d   QhRRRR/# )r
   Ú	directoryr   r   r*   r   )r   s   "r   r   Ú#mint_launcher.<locals>.__annotate__  s   € ÷ 	Yñ 	Y˜Dð 	Y Yñ 	Yr   c                ó¤   <€ S! R \        V 4      RR7      p\        S4      Vn        R0Vn        RVn        VP	                  S RS RS 2RR./4      # )NT)Úadd_launchersr-   z = Ú:Úinterpreter_argsr.   )r   r3   ÚvariantsÚclobberÚmake)rÑ   ÚmakerrÌ   Úfuncr!   r   r~   s   & €€€€€r   rÙ   Úmint_launcher.<locals>.make  s]   ø€ Ù& t¬S°«^È4ÔPˆEÜ" :›ˆEÔØ ˜TˆEŒNØ ˆEŒMØ—:‘:   c¨&¨°°4°&Ð9Ð<NÐQUÐPVÐ;WÓXÐXr   Ú.Ú-)rW   Údirc              3  óŒ   "  € T F:  p\        V4      P                  P                  4       R 8X  g   K-  \        V4      x € K<  	  R# 5i)ú.exeN)r   ÚsuffixÚlower)r¢   Úps   & r   r¥   Ú mint_launcher.<locals>.<genexpr>  s9   é € ð "GÑ3F¨aÜ%)¨!£W§^¡^×%9Ñ%9Ó%;¸vÑ%Eô #*¤$ q§' 'Ó3Fùs
   ‚*A±Az__main__.pyrá   z#!z -I
z#!"z" -I
ó   
c              3  ód   <"  € T F%  pSP                  VP                  R 4      4      x € K'  	  R# 5i)ræ   N)ÚendswithÚrstrip)r¢   ÚshebangÚtails   & €r   r¥   rå   E  s&   øé € ÐWÉhÀ7˜Ÿ™ g§n¡n°WÓ&=×>Ð>Ëhùs   ƒ-0TFr§   r   z&import base64; exec(base64.b64decode('z'))z@echo off
"z	" -I -c "z" %*
ú.cmdc                ó*   <€ V P                  SR R7      # )r§   rj   )Ú
write_text)rä   Úbodys   &€r   Ú<lambda>Úmint_launcher.<locals>.<lambda>S  s   ø€ ¸A¿L¹LÈÐX_¸LÔ<`r   )ÚENTRY_POINTSr   Ú_launcher_scriptr]   Ú_mint_shell_launcherr|   r™   ÚtempfileÚzipfilerÎ   rÏ   ÚTemporaryDirectoryÚnextr«   r   Únamelistr¬   ÚinfolistÚheader_offsetÚreadrq   ÚKeyErrorrâ   rã   r   ré   r­   Úbase64Ú	b64encoder   r»   )r   r'   r½   r~   r¾   Úscript_maker_clsrõ   rÎ   rÏ   rÙ   rº   ru   r´   ÚoldÚnewÚwrittenÚpathÚexistingÚarchiverW   Úshebangsrþ   Úencodedr#   rÌ   rï   rÛ   r!   rÄ   rë   s   f&&f&                   @@@@@@r   Úmint_launcherr	  ø   sÜ  ÿ€ ô   Õ%�L€FˆDÜ�7‹m€GÜ˜d¤D¨£O°]ÓC€Fä�=Š=Ü# D¨'°:¸vÓFÐFä)Ó+×NÐNÔ/BÀ:Ó/NÐØÓ#÷	Ð!1ô 	ó 	ß/÷	Yô 	Yð ×(Ñ(°!°D°6¸°ÀÐ(×IÔIÈWð!Ü ñ "G±4¼¸W»Ô3Fó "GØHLóN�	ð Ó$Ø §>¡>Õ1�ðÙ  Ÿœ¨C°¸×1CÔ1CÀsØŸL™L›N¨c¯l©l«nÖOÀÀ×OØ$*×$5Ñ$5Ó$7Ð8X¸¿¹»ÈÕ9J×9XÑ9XÐ$YØ#,×#7Ñ#7Ó#9Ð:Z¸3¿<¹<»>È!Õ;L×;ZÑ;ZÐ#[ô%\à$'§H¡H¨]Ó$;¸s¿x¹xÈÓ?VÔ$VØ#)÷ 2DÑ1CŸ™÷ JÒI÷ 2DŸð!Ù" 7›m�Gó $�DÜ˜D“z×(Ñ(×.Ñ.Ó0°FÖ:Ü# D›zÑ)÷3 JÒIñ. $÷/ Jð@ ˜D˜6 ˜Õ&€Hß+ðÙ�X×Ô 'Ø×ÑÓ! m _Ô4Ø!×,Ñ,Ó.Ð/S°×0@Ñ0@Ó0BÀ1Õ0E×0SÑ0SÐT�Ø   ¨EÐ2×9Ñ9Ó;Ø! * ¨VÐ4×;Ñ;Ó=ð?�ð —}‘} WÓ-�ß“CÔWÉhÓW—C—C’CÔWÉhÓW×WÒWØ#ŸL™L¨Ó7¸6¿=¹=ÈÓ;QÔQØ#÷ ×Òó Ø×Ñ˜vŸ}™}¨WÓ5Ó6×=Ñ=¸gÓF€GØ3°G°9¸CÐ@€Dð	Øˆ<�y   hð	0ð 	ô ˜ d V¨4 =Õ0Ô2`ÓaÐaøôk ô !Ø “	ð!ú÷
 2D×1CÐ1CúŸŸ˜ûô   ¬XÐ6ô Úðûô !ô !Ø “Gð!ú÷+ J×IÐIú÷F ×ûô �Z¤Ð*ô Úðús  Ã QÃ"OÃ$QÃ<PÄP	ÄB=O1Ç
P	Ç#
PÇ8P	È PÈ	P2È*QÉ QÉQÉ6Q- ÊBQÌQÌ*QÍ&QÍ.
Q- Í9Q- ÏO.Ï*QÏ-O.Ï.QÏ1PÏ<	P	ÐPÐPÐQÐPÐP/Ð+QÐ.P/Ð/QÐ2QÐ?QÑQÑQÑQ	ÑQ*	Ñ%Q- Ñ*Q- Ñ-RÒRas  def _hermes_closure_repair():
    import contextlib, hashlib, io, shutil, subprocess
    from pathlib import Path
    root = Path(__ROOT__)
    git = root / '.git'
    try:
        if git.is_file():
            text = git.read_text(encoding='utf-8-sig').strip()
            git = root / text[7:].strip() if text.startswith('gitdir:') else git
        fields = dict(line.partition('=')[::2] for line in (git / __MARKER__).read_text(encoding='utf-8-sig').splitlines())
    except OSError:
        return
    pre = fields.get('pre', '').strip()
    if not re.fullmatch('[0-9a-f]{40}|[0-9a-f]{64}', pre):
        return
    closure = git / __CLOSURE_DIR__ / pre
    files = (*__CLOSURE__, __INIT__)

    def blob_id(data):
        return hashlib.new('sha1' if len(pre) == 40 else 'sha256', b'blob %d\0' % len(data) + data).hexdigest()

    def verified():
        try:
            listed = dict(line.split(' ', 1)[::-1] for line in (closure / __MANIFEST__).read_text(encoding='utf-8-sig').splitlines())
            return (set(listed) == set(files) and listed[__INIT__] == blob_id(b'')
                    and all(blob_id((closure / rel).read_bytes()) == oid for rel, oid in listed.items()))
        except (OSError, ValueError):
            return False

    if not verified():
        exe = fields.get('git', '').strip()
        if not (os.path.isabs(exe) and os.path.isfile(exe)):
            names = ('git.exe',) if os.name == 'nt' else ('git',)
            exe = next((os.path.join(d, n) for d in os.environ.get('PATH', '').split(os.pathsep) if os.path.isabs(d)
                        for n in names if os.path.isfile(os.path.join(d, n))), '')
        if not exe:
            return

        def git_out(*args):
            done = subprocess.run([exe, '--no-replace-objects', '-C', str(root), *args], capture_output=True, timeout=60,
                                  stdin=subprocess.DEVNULL, creationflags=getattr(subprocess, 'CREATE_NO_WINDOW', 0))
            if done.returncode != 0:
                raise OSError(done.stderr)
            return done.stdout

        staging = closure.with_name('.%s.%d.launch' % (pre, os.getpid()))
        try:
            ids = {}
            for entry in git_out('ls-tree', '-z', '--full-tree', pre, '--', *__CLOSURE__).split(b'\0'):
                meta, _, rel = entry.decode('utf-8', 'replace').partition('\t')
                if meta.split()[1:2] == ['blob']:
                    ids[rel] = meta.split()[2]
            blobs = {__INIT__: b''}
            for rel in __CLOSURE__:
                blobs[rel] = git_out('cat-file', 'blob', ids[rel])
                if blob_id(blobs[rel]) != ids[rel]:  # an object that inflates to bytes pre never had
                    raise OSError('%s does not hash to %s' % (rel, ids[rel]))
            blobs[__MANIFEST__] = ''.join('%s %s\n' % (blob_id(data), rel) for rel, data in blobs.items()).encode('utf-8')
            for rel, data in blobs.items():
                (staging / rel).parent.mkdir(parents=True, exist_ok=True)
                (staging / rel).write_bytes(data)
            shutil.rmtree(closure, ignore_errors=True)
            os.replace(staging, closure)
        except (OSError, KeyError, subprocess.SubprocessError):
            pass
        finally:
            shutil.rmtree(staging, ignore_errors=True)
        if not verified():
            return
    for name in [n for n in sys.modules if n.split('.')[0] in ('hermes_cli', 'hermes_bootstrap', 'hermes_constants', 'pm')]:
        del sys.modules[name]
    tree = os.path.normcase(os.path.realpath(root))
    sys.path[:] = [str(closure)] + [p for p in sys.path if p and os.path.normcase(os.path.realpath(p)) != tree
                                    and not os.path.normcase(os.path.realpath(p)).startswith(tree + os.sep)]
    sys.dont_write_bytecode = True
    said = io.StringIO()
    restored = False
    try:
        with contextlib.redirect_stderr(said):
            from hermes_cli import _early_recovery
            restored = _early_recovery.restore_interrupted_pull(root)
    except Exception as exc:
        said.write('hermes: the checkout cannot start after an interrupted `hermes update`, and it was not '
                   'repaired: %s\n' % (exc,))
    if restored:
        sys.stderr.write('hermes: the checkout could not start after an interrupted `hermes update`; '
                         'repaired it with the recovery code saved before the update.\n' + said.getvalue())
        _early_recovery.relaunch_after_restore()
    sys.stderr.write(said.getvalue() or 'hermes: the checkout cannot start after an interrupted `hermes update`; '
                     'launch again once the update that owns it finishes.\n')
    raise SystemExit(1)
c               ó(   € V ^8„  d   QhRRRRRRRR/# )r
   r   r   r'   r   Údependenciesr`   r   r   )r   s   "r   r   r   ½  s.   € ÷ Gñ G˜3ð G¨4ð G¸{ð GÈsñ Gr   c                ó  € \         V ,          w  r4\        VP                  4       4      p^ RIHpHpHpHp	Hp
 \        P                  R\        V4      4      P                  R\        V4      4      P                  R\        V
4      4      P                  R\        V	4      4      P                  R\        V4      4      P                  R\        V4      4      pRV: R	2V,           R
V: RV: R\         RV RV RV R2,           # )é    )ÚINTERRUPTED_PULL_MARKERÚRECOVERY_CLOSUREÚRECOVERY_CLOSURE_DIRÚRECOVERY_CLOSURE_INITÚRECOVERY_CLOSURE_MANIFESTÚ
__MARKER__Ú__CLOSURE_DIR__Ú__MANIFEST__Ú__INIT__Ú__CLOSURE__Ú__ROOT__z¨import os, re, sys
import contextlib, hashlib, io, pathlib, shutil, subprocess
os.environ.pop('PYTHONHOME', None)
os.environ.pop('PYTHONPATH', None)
sys.path.insert(0, z)
aØ  if sys.argv[1:2] == ['--print-runtime-command']:
    sys.dont_write_bytecode = True
    from pathlib import Path
    try:
        from hermes_cli import _early_recovery
    except Exception as exc:
        if _hermes_closure_repair() or not isinstance(exc, ImportError):
            raise
        _early_recovery = None  # a tree without the repair: the imports below report real damage
    if _early_recovery is not None and _early_recovery.restore_interrupted_pull(Path(a)  )):
        _early_recovery.relaunch_after_restore()
    from hermes_constants import get_default_hermes_root
    os.environ['HERMES_HOME'] = os.environ.get('HERMES_HOME') or str(get_default_hermes_root())
    from hermes_cli._launchers import print_runtime_command
    print_runtime_command(Path(z%), sys.argv[2:])
    sys.exit(0)
sys.a	   = True
try:
    import hermes_bootstrap
except Exception:
    _hermes_closure_repair()
    raise
if not os.environ.get('HERMES_HOME'):
    from hermes_constants import get_default_hermes_root
    os.environ['HERMES_HOME'] = str(get_default_hermes_root())
if sys.argv[1:2] == ['--run-module']:
    import runpy
    if len(sys.argv) < 3: sys.exit('hermes: --run-module needs a module')
    module = sys.argv.pop(2)
    del sys.argv[1]
    runpy.run_module(module, run_name='__main__', alter_sys=True)
    sys.exit(0)
from z import zK
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(z())
)rò   r   r0   Úhermes_cli._early_recoveryr  r  r  r  r  Ú_CLOSURE_REPAIRr   r   r4   )r   r'   r  r!   rÛ   r6   r  r  r  r  r  Úclosure_repairs   &&&         r   ró   ró   ½  s  € Ü Õ%�L€Fô ˆy× Ñ Ó"Ó#€D÷õ ô &×-Ñ-¨l¼DÐAXÓ<YÓZß‘wÐ0´$Ð7KÓ2LÓMß‘w˜~¬tÐ4MÓ/NÓOß‘w˜z¬4Ð0EÓ+FÓGß‘w˜}¬dÐ3CÓ.DÓEß‘w˜z¬4°«:Ó6ð ð	ð #™X Sð		*ð
 õ	ð		`ð aeÑ_gð h*ð
 +/©ð 2ä$Ð%ð &ð  ˆx�x ˜vð &à�6˜ðE"	 õ(	 ð	-r   c               ó$   € V ^8„  d   QhRRRRRR/# )r
   r´   r   Úcommandr*   r   r`   r   )r   s   "r   r   r     s!   € ÷ (ñ (˜ð (¨	ð (°kñ (r   c                óR  a€ R \         P                  ! V4       R2o V P                  4       '       gR   V P                  4       SP	                  R4      8X  d.   \
        P                  ! V \
        P                  4      '       d   V # R T3R llp\        Y4      #   \         d     L!i ; i)z#!/bin/sh
exec z "$@"
r§   c               ó    € V ^8„  d   QhRRRR/# )r
   rº   r   r   r>   r   )r   s   "r   r   Ú"_write_shell.<locals>.__annotate__  s   € ÷ ñ �tð  ñ r   c                óR   <€ V P                  SR RR7       V P                  R4       R# )r§   Ú
)rk   Únewlineií  N)rî   Úchmod)rº   rï   s   &€r   r¹   Ú_write_shell.<locals>.write  s$   ø€ Ø×Ñ˜4¨'¸4ÐÔ@Ø�‰�eÖr   )
ÚshlexÚjoinÚ
is_symlinkr¬   r   r   ÚaccessÚX_OKrq   r»   )r´   r  r¹   rï   s   && @r   Ú_write_shellr+    s�   ø€ ØœeŸjšj¨Ó1Ð2°'Ð:€DðØ× Ñ ×"Ò" v×'8Ñ'8Ó':¸d¿k¹kÈ'Ó>RÔ'RÜ�yŠy˜¤§¡×)Ò)Ø�÷ð ô ˜Ó'Ð'øô ô Ùðús   �B ³AB ÂB ÂB&Â%B&c          
     ó,   € 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   s   "r   r   r     s7   € ÷ Oñ O˜sð O¨Tð O¸tð OÈSð OÐU`ñ Or   c                ó@   € \        W,          \        V4      R RV.4      # )r.   r/   )r+  r   )r   r½   r~   rÄ   s   &&&&r   rô   rô     s   € Ü˜�¬¨Z«¸$ÀÀfÐ(MÓNÐNr   c               ó$   € V ^8„  d   QhRRRRRR/# )r
   r´   r   r6   r   r[   r   )r   s   "r   r   r     s!   € ÷ ñ ˜4ð  tð °ñ r   c                ó¨  a€ V P                  4       '       d    V P                  4       P                  V4      #  \        P                  ! V P                  RR7      RR7      pR Uu0 uF  p\        Y,          4      kK  	  ppR\        T4      : R2oTP                  T4      '       gA   \        ;QJ d    T3R	 lT 4       F  '       g   K   RM	  RM! T3R	 lT 4       4      '       d   R# T P                  R
8X  d7   T P                  R4      pTR\        T4      RR.8H  ;'       d    \        YQ4      # R#   \        \        \        3 d     R# i ; iu upi )zKRecognize our old source/venv launchers, never a mere mention in a comment.ri   rj   T)ÚcommentsFrV   zsys.path.insert(0, r,   c              3  ó.   <"  € T F
  pSV9   x € K  	  R # 5ir¡   r   )r¢   Útokenr:   s   & €r   r¥   Ú!_owns_launcher.<locals>.<genexpr>*  s   øé € Ð(PÉÀ¨°eÖ);Ëùs   ƒrY   ÚexecÚacpz$@)rV   zrun_agent.pyzvenv/bin/pythonzvenv/bin/python3zvenv/bin/hermesú.hermes/bin/hermesz.hermes/bin/hermes-acp)r(  r0   Úis_relative_tor&  Úsplitro   rq   ÚUnicodeErrorrr   r   Úintersectionr­   r   r¶   Ú_owns_launcher)r´   r6   Útokensrä   ÚpathsÚsiblingr:   s   &&    @r   r;  r;    s'  ø€ à×Ñ×ÒØ�~‰~Ó×.Ñ.¨tÓ4Ð4ðÜ—’˜V×-Ñ-°{Ð-ÓCÈdÔSˆñ%ó ñ %˜qŒS�•Ž]ñ %€Eð ð &¤c¨$£i¡]°!Ð4€IØ×Ñ˜&×!Ò!§S£SÔ(PÉÓ(P§S§S¢SÔ(PÉÓ(P×%PÒ%PÙð ‡{�{�lÔ"Ø×"Ñ" 8Ó,ˆØ˜6¤3 w£<°¸Ð=Ñ=÷ 2ð 2Ü" 7Ó1ð	3áøô# ”\¤:Ð.ô Úðüòs   ¸(D2 Á$EÄ2EÅEÚcreateTc               ó(   € V ^8„  d   QhRRRRRRRR/# )r
   r6   r   r½   r?  r[   r   zdict[Path, bool]r   )r   s   "r   r   r   5  s)   € ÷ ñ  ð ¨tð Àtð ÐWgñ r   c               ó”  € V'       d   VP                  RRR7       MVP                  4       '       g   / # / pV EF
  pW,          pV'       d-   VP                  4       '       g   VP                  4       '       d   \	        W`4      '       g   KS  VP                  4       '       g   VP                  4       '       d   VP                  4       P                  MRpVR8X  d   \        V R,          4      RR.M\        V R,          V,          4      .p\        Wh4      f   \        R	V 24      hWvP                  4       P                  8g  WF&   EK  	  V# )
zGUser-bin commands forward to durable local launchers, not a Python pin.T©ÚparentsÚexist_okNúhermes-agentr6  rS   Ú	run_agentz.hermes/binzcould not publish launcher )
ÚmkdirÚis_dirÚexistsr(  r;  ÚlstatÚst_mtime_nsr   r+  rq   )	r6   r½   Únamesr?  Ú	publishedr   r´   Úbeforer  s	   &&&$     r   Ú_publish_conveniencesrO  5  s  € çØ�‰˜d¨TˆÕ2Ø�^‰^×ÒØˆ	Ø€IÜˆØ•ˆß˜&Ÿ-™-Ÿ/š/¨V×->Ñ->×-@Ò-@Ì.ÐY_×JfÒJfÙØ/5¯}©}¯ªÀ&×BSÑBS×BUÒBU�—‘“×+Ò+Ð[_ˆà˜nÔ,ô ˜Ð3Õ3Ó4°nÀkÑRÜ36°t¸mÕ7KÈdÕ7RÓ3SÐ2Tð 	ä˜Ó(Ò0ÜÐ7¸°xÐ@ÓAÐAØ"§l¡l£n×&@Ñ&@Ñ@ˆ	Ôñ ð Ðr   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r
   r   r   r'   r   r½   r   r`   r   )r   s   "r   r   r   I  s(   € ÷ ñ ˜ð ¨ð ¸ð Àñ r   c                ó  € \        V4      p\        VRR7      pVek   \        WW#R4      pVf   R# \        \        V4      V  R2,          4       VP                  R8X  d'   \        \        V4      V  R2,          4      '       g   R# V# R# )zDPublish one launcher bound to store Python, or refuse missing tools.T©r^   Nrá   rì   )r   r1   r	  Ú_collect_retiredrâ   Ú_retire_exe)r   r'   r½   Ústore_pythonr  s   &&&  r   Ústage_launcherrV  I  s�   € ä�Y“€Iô (¨	¸tÔD€LØÒÜ˜T¨gÀTÓJˆØŠ<Ùô 	œ˜g›¨D¨6°¨Õ6Ô7Ø�;‰;˜&Ô ô œt G›}°$°°t¨}Õ<×=Ò=ÙØˆÙr   c               ó    € V ^8„  d   QhRRRR/# )r
   r›   r   r   r>   r   )r   s   "r   r   r   _  s   € ÷ ñ ˜$ð  4ñ r   c                óì   € V P                   P                  V P                   R24       F3  p\        \        4      ;_uu_ 4        VP                  4        RRR4       K5  	  R#   + '       g   i     KJ  ; i)z|Delete aside copies of ``exe`` whose process has since exited: ours
(``.<pid>.deleteme``) and distlib's own (``.deleteme``).z
*.deletemeN)r‡   Úglobr   r   rq   r¸   )r›   Úleftovers   & r   rS  rS  _  sM   € ð —J‘J—O‘O s§x¡x j°
Ð$;Ö<ˆÜ”g×ÕØ�O‰OÔ÷ Ñó =ß×Ðús   ÁA"Á"A3c               ó    € V ^8„  d   QhRRRR/# )r
   r›   r   r   r[   r   )r   s   "r   r   r   g  s   € ÷ ñ �Tð ˜dñ r   c                ó–  €  V P                  RR7       R#   \         d     Mi ; iT P                  T P                   R\        P
                  ! 4        R24      p \        P                  ! Y4       M  \         d     R# i ; i\        \        4      ;_uu_ 4        TP                  4        RRR4       R#   + '       g   i     R# ; i)a°  Remove ``exe``; a running one is renamed aside instead.

Windows refuses to delete a mapped image but allows renaming it, and the
launcher a Python repin has to retire is usually the one running
``hermes update`` (or the launch retrying its owed launcher step), so a
plain unlink left every repinned update owing launchers -- and the install
stamp -- forever. The aside copy goes on the next publication once its
process has exited.T©Ú
missing_okrÝ   z	.deletemeFN)r¸   rq   r¶   r   r   r·   r   r   )r›   Úasides   & r   rT  rT  g  sš   € ðØ�
‰
˜dˆ
Ô#ÙøÜô Ùðúà�M‰M˜SŸX™X˜J a¬¯	ª	« }°IÐ>Ó?€EðÜ
�
Š
�3ÕøÜô Úðúä	”'×	Õ	Ø�‰Œ÷ 
á÷ 
Ö	áús*   ‚ –$£$ÁA3 Á3BÂBÂB7Â7C	c               ó    € V ^8„  d   QhRRRR/# )r
   Úliner   r   r`   r   )r   s   "r   r   r     s   € ÷ (ñ (�sð (˜{ñ (r   c                óö   € V P                  4       pV'       g   R# V^ ,          R9   d1   VP                  V^ ,          ^4      pVR8X  d   R# \        V^V 4      # \        VP                  R^4      ^ ,          4      # )u  First whitespace-delimited token of *line*, honoring one quote pair.

The published launchers always carry the interpreter as the first token
(quoted only when the path holds spaces), so full shell lexing â€” which
would also eat Windows backslashes as escapes â€” is the wrong tool.Nz"'éÿÿÿÿ)ÚstripÚfindr   r8  )ra  ÚtextÚends   &  r   Ú_first_tokenrh    sk   € ð �:‰:‹<€DßÙØˆA…w�%ÔØ�i‰i˜˜Q� Ó#ˆØ�"Œ9ÙÜ�D˜˜3�KÓ Ð Ü�—
‘
˜4 Ó# AÕ&Ó'Ð'r   c               ó    € V ^8„  d   QhRRRR/# r³   r   )r   s   "r   r   r   �  s   € ÷ <ñ <˜Tð < kñ <r   c                óê  €  \        V 4      P                  4       pRp\        T 4      P                  P	                  4       pTR8X  dß   ^ RIHpHp  T! T 4      ;_uu_ 4       pTRTP                  4       ^ ,          P                   pRRR4       XP                  RTP                  R4      ^,           4      pTR8w  d   Yx^,           R P                  R4      MRp	T	P                  R4      '       d   R	T	9   d   R#  \        T	RR P                  R
4      P!                  R4      4      #  TP                  R4      p
T
P%                  4       pTR8X  d"   \'        R TR,           4       R4      pTf   R# Mm\'        R T 4       R4      pTf   R# \(        P(                  ! TP+                  R4      RR7      pRTn         TP/                  4       pT'       d   \        T4      # R#  \3        T4      #   \         d     R# i ; i  + '       g   i     EL~; i  T\        \        3 d     R# i ; i  \"         d     R# i ; i  \"         d     R# i ; i  \0         d     R# i ; i  \0        \        3 d     R# i ; i)zzEmbedded interpreter of an existing launcher, else None.

Fail-open: an unrecognized layout republishes exactly as before.Nrá   rÍ   s   #!ó    ræ   r   s    -Ió   
r§   r   ri   rì   c              3  óT   "  € T F  qP                  4       '       g   K  Vx € K   	  R # 5ir¡   )rd  ©r¢   r7   s   & r   r¥   Ú#_launcher_python.<locals>.<genexpr>·  s   é € ÐG©I 5¿¹¿Ÿš«Iùs   ‚(ž
(rE   c              3  óV   "  € T F  qP                  R 4      '       g   K  Vx € K!  	  R# 5i)úexec N)Ú
startswithrn  s   & r   r¥   ro  ¼  s   é € ÐO©E 5×5EÑ5EÀg×5NŸš«Eùs   ‚)Ÿ
)rq  T)Úposixrc  éýÿÿÿ)r   r¬   rq   râ   rã   rö   rÎ   rÏ   rú   rû   Ú
IndexErrorre  Úrfindré   rè   r   rd  ÚUnicodeDecodeErrorÚ
splitlinesrø   r&  ÚremoveprefixÚwhitespace_splitÚ	get_tokenrr   rh  )r´   r¤   ra  râ   rÎ   rÏ   r  rW   Ústartrê   rf  ÚlinesÚlexerr2  s   &             r   Ú_launcher_pythonr  �  sO  € ðÜ�F‹|×&Ñ&Ó(ˆð €DÜ�&‹\× Ñ ×&Ñ&Ó(€FØ�Ô÷
 	0ð	Ù˜—” GØÐB˜w×/Ñ/Ó1°!Õ4×BÑBÐC�÷ !ð —‘˜E 6§<¡<°Ó#6¸Õ#:Ó;ˆØ8=À¼�& �˜Ð$×+Ñ+¨GÔ4ÈˆØ×Ñ ×'Ò'¨5°GÔ+;Ùð	Ü˜  ˜×+Ñ+¨GÓ4×:Ñ:¸3Ó?Ó@Ð@ð	Ø—;‘;˜{Ó+ˆDð —‘Ó!ˆØ�VÔô ÑG¨E°"®IÓGÈÓNˆDØŠ|Ùð ô ÑO©EÓOÐQUÓVˆDØŠ|Ùô —K’K × 1Ñ 1°'Ó :À$ÔGˆEØ%)ˆEÔ"ðØŸ™Ó)�÷ #(”4˜“;Ð1¨TÐ1ðÜ˜DÓ!Ð!øôi ô Úðú÷ !—�ûàœJ¬Ð0ô 	Úð	ûô "ô 	Úð	ûô
 "ô 	Úð	ûô, ô Úðûô
 œÐ ô Úðús‰   ‚G( ÁH Á %G:ÂH Ã9+H' Ä&H9 Æ7I Ç
I Ç(G7Ç6G7Ç:H	ÈH ÈH ÈH$È#H$È'H6È5H6È9IÉIÉIÉIÉI2É1I2c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r
   r   r   Úlocalr   Ústorerd   r`   r   r   )r   s   "r   r   r   Ï  s0   € ÷ /ñ / ð /¨Dð /¸ð /ÀKð /ÐT_ñ /r   c                ó  a€ Vf   R# \        4       '       g
   W,          .MW R2,          W R2,          .p. pV EF  p VP                  4       ;'       g    VP                  4       pT'       g   K7  \	        T4      pTe   Yƒ8X  d   KN  TP                  4       '       g   TP                  T4       Kw   TP                  4       o\        ;QJ d)    T3R lTP                   4       F  '       g   K   RM	  RM! T3R lTP                   4       4      '       * p	T	'       g   Kå  T F  p
 T
P                  RR7       K  	  Tu # 	  R#   \         d     EK  i ; i  \        \        \        3 d     EK6  i ; i  \         d     Ka  i ; i)a6  Existing checkout launcher already bound outside this root's store.

Checkout launchers are shared by every HERMES_HOME; a launch under one
data root must never repoint them at another root's interpreter (#123238):
once that root is deleted, every hermes breaks. Keep the file when it
execs a live interpreter outside *store*. Missing launchers, dead
interpreters and same-store repins still publish. A launcher whose
interpreter is gone is never left in front of a kept one: PATHEXT resolves
the ``.exe`` first, so the kept ``.cmd`` would not be the file that runs.Nrá   rì   c              3  óH   <"  € T F  qP                  4       S8H  x € K  	  R # 5ir¡   )r0   )r¢   r‡   Ú	store_dirs   & €r   r¥   Ú(_kept_shared_launcher.<locals>.<genexpr>ñ  s   øé € ÐYÉ.ÀŸn™nÓ.°)Ö;Ë.ùs   ƒ"TFr]  )r]   rm   r(  rq   r  Úappendr0   r­   rC  ÚRuntimeErrorrr   r¸   )r   r�  r‚  rd   Ú
candidatesÚdeadr´   Úpresentr$   ÚforeignÚstaler…  s   &&&&       @r   Ú_kept_shared_launcherrŽ  Ï  sT  ø€ ð ‚{ñ Ü'2§}¢}�%•,‘¸5ÀVÈ4À=Õ;PÐRWÐ\bÐbfÐZgÕRgÐ:h€JØ€DÜˆð	Ø—n‘nÓ&×=Ð=¨&×*;Ñ*;Ó*=ˆG÷ ÙÜ! &Ó)ˆØŠ>˜Vœ]ÙØ�~‰~×ÒØ�K‰K˜ÔÙð	ð Ÿ™›ˆIß›#ÔYÈ&Ï.Ê.ÓYŸ#Ÿ#š#ÔYÈ&Ï.Ê.ÓYÓYÔYˆG÷ ‰7Û�ðØ—L‘L¨D�LÖ1ñ ð ŠMñ; ñ< øô7 ô 	Ûð	ûô œ¤zÐ2ô 	Ûð	ûô ô ÚðúsH   Á EÁEÂ3EÃEÃ/'EÄ&E5ÅEÅEÅE2Å1E2Å5FÆFc               ó$   € V ^8„  d   QhRRRRRR/# )r
   r'   r   r½   r   r*   r   )r   s   "r   r   r     s&   € ÷ #Pñ #P¨ð #P°tð #PÀ	ñ #Pr   c           
     ó*  € \        V 4      P                  4       pVR,          R,          pVP                  RRR7       \        V4      p\	        V4      p^ RIHp V! 4       P                  4       pVP                  V8H  ;'       d>    VP                  4       VR,          P                  4       8H  ;'       d    \        V4      RJ p. p	\         Fe  p
V'       d   RM\        W£WE4      pVe   V	P                  \        V4      4       K9  \        W¢V4      ;pf   KK  V	P                  \        V4      4       Kg  	  \        V4      P                  4       V8X  d   V	# \        V	4      \        \        4      8w  d   . # \        4       '       g4   \!        V\        V4      \        4       Uu. uF  p\        V4      NK  	  up# \        V4      P                  RRR7       \         U
u. uF)  p
\        W¢\        V4      4      ;pf   K  \        V4      NK+  	  up
# u upi u up
i )zNPublish exact-install commands; conveniences follow them across Python repins.rT   rU   TrB  ©Úget_default_hermes_rootÚtoolsN)r   r0   rG  r   r1   Úhermes_constantsr’  r‡   r   ÚWINDOWS_BIN_LAUNCHERSrŽ  r‡  r   rV  Úlenr]   rO  )r'   r½   r6   r�  r‚  rd   r’  r%   Úownerr  r   Úkeptr  s   &&           r   Úensure_install_launchersr™    sÈ  € ä�	‹?×"Ñ"Ó$€DØ�9Õ˜uÕ$€EØ	‡K�K˜ t€KÔ,Ü�tÓ€EÜ
˜tÓ
$€CÝ8Ù"Ó$×,Ñ,Ó.€Dð �[‰[˜DÑ ÷ 0ð 0 U§]¡]£_¸À½×8PÑ8PÓ8RÑ%R÷ 0ð 0Ü! $Ó'¨4Ð/ð 
à€Gß%ˆ÷ ‰tÔ"7¸ÀUÓ"PˆØÒØ�N‰Nœ3˜t›9Ô%ÙÜ" 4¨uÓ5Ð5ˆDÔBØ�N‰Nœ3˜t›9Ö%ñ &ô ˆGƒ}×ÑÓ %Ô'ØˆÜ
ˆ7ƒ|”sÔ0Ó1Ô1Øˆ	Ü�=Š=Ü&;¸DÄ$ÀwÃ-ÔQfÔ&gÓhÑ&g˜d”�D–	Ñ&gÑhÐhÜˆƒM×Ñ ¨tÐÔ4Ý"7ó PÑ"7˜$Ü& t´4¸³=ÓAÐA�ô ŒC�ŽIÑ"7ñ Pð Pùò iùòPs   ÆHÇHÇ9Hc               ó$   € V ^8„  d   QhRRRRRR/# )r
   Úproject_rootr`   r?  r[   r   Údictr   )r   s   "r   r   r   '  s!   € ÷ :0ñ :0˜[ð :0¸Dð :0ÈDñ :0r   c               ó  € ^ RI Hp \        T ;'       g    V! 4       4      P                  4       p\	        4       '       d   \        W1R7      # V'       d]    ^ RIHp T! 4       ;'       g    / P                  R/ 4      p\        T\        4      '       d   TP                  R	R4      '       g   RRRR
/# ^ RIHp \        V4      '       d@   V'       d2   \        P                   R8X  d   \#        VP$                  R,          4      # RRRR/# V! V4      P                  R4      R8X  d   RRRR/# \'        VRR7      f   RRRR/#  VR,          R,          p\)        \+        W74      4      \)        \,        4      8w  d   RRRR/# \        P.                  ! 4       R,          R,          .p^ RIHp	 V	! 4       R,          \        R4      3 F?  p
W¨9  g   K  V'       d   \5        V
R,          V4      '       g   K.  VP7                  V
4       KA  	  . pV F@  p
\9        W:. \,        ORN5VR7      pVP;                  R VP=                  4        4       4       KB  	  RRRV/#   \         d
    RRRR/u # i ; i  \>         d   pRRR\A        T4      /u Rp?# Rp?ii ; i) a	  Repair PATH conveniences without taking over another installation's files.

macOS CLI-first launches link the bundle's signed shims directly; Electron
need not have run. Source installs converge on the store launcher owner.
POSIX shell rc registration remains installer-owned. On Windows the User
PATH entry is repaired only for the home new consoles use (owns_user_path).

Before dependency sync succeeds, create=False maintains only commands we
already own, without loading application config or enabling new exposure.
)Úinstall_root©r?  )Úload_configÚokTÚskippedzconfig-unavailableÚcliÚexpose_on_pathzconfig-disabled)Úread_install_stampÚdarwinrU   zbundle-owns-launchersÚupdateMechanismÚexternalzexternally-ownedrR  Nzno-store-pythonrT   FÚerrorú"source launcher publication failedú.localr‘  z/usr/local/binrV   rE  c              3  óR   "  € T F  w  rV'       g   K  VP                   x € K  	  R # 5ir¡   )r   )r¢   r  Úchangeds   &  r   r¥   Úexpose_cli.<locals>.<genexpr>^  s   é € ÐWÑ:K©¨Ìwœ9˜4Ÿ9ž9Ó:Kùs   ‚'“'r  )!Úpm.pathsrž  r   r0   r]   Ú_expose_windows_user_binÚhermes_cli.configr   rz   rp   Ú
isinstancerœ  Úhermes_cli.stewardr¥  Ú_is_bundled_payloadr2   ÚplatformÚ_symlink_sealed_launchersr‡   r1   r–  r™  r•  r%   r”  r’  r;  r‡  rO  ÚextendÚitemsrq   r   )r›  r?  rž  r6   r   Úcli_cfgr¥  r�  Údirsr’  rÑ   r  rM  Úexcs   &$            r   Ú
expose_clir¼  '  sT  € õ &ä�×.Ð.¡£Ó/×7Ñ7Ó9€DÜ‡}‚}ô (¨Ô<Ð<ßð	AÝ5ñ “=×&Ð& B×+Ñ+¨E°2Ó6ˆÜ�gœt×$Ò$¨W¯[©[Ð9IÈ4×-PÒ-PØ˜$ 	Ð+<Ð=Ð=Ý5ä˜4× Ò ß”c—l‘l hÔ.Ü,¨T¯[©[¸5Õ-@ÓAÐAØ�d˜IÐ'>Ð?Ð?Ù˜$Ó×#Ñ#Ð$5Ó6¸*ÔDØ�d˜IÐ'9Ð:Ð:Ü˜D¨dÔ3Ò;Ø�d˜IÐ'8Ð9Ð9ð0Ø�yÕ  5Õ(ˆÜÔ'¨Ó4Ó5¼Ô=RÓ9SÔSØ˜% Ð*NÐOÐOÜ—	’	“˜hÕ&¨Õ.Ð/ˆõ 	=Ù1Ó3°eÕ;¼TÐBRÓ=SÓTˆIØÖ$¯f¼ÀyÐS[ÕG[Ð]a×8bÔ8bØ—‘˜IÖ&ñ Uð ˆÛˆIÜ-¨dÐ?gÔAVÐ?gÐXfÑ?gÐpvÔwˆIØ�N‰NÑW¸)¿/¹/Ô:KÓWÖWñ ð �d˜I wÐ/Ð/øô? ô 	Aà˜$ 	Ð+?Ð@Ò@ð	Aûô@ ô 0Ø�e˜W¤c¨#£hÐ/Õ/ûð0úsJ   ÁI Ä=;I$ Å9A	I$ ÇI$ ÇI$ Ç*A"I$ ÉI!É I!É$JÉ/JÉ=JÊJc               ó   € V ^8„  d   QhRR/# )r
   r   zdict[str, str] | Noner   )r   s   "r   r   r   h  s   € ÷ !$ñ !$Ð"7ñ !$r   c                 óÄ  € ^ RI p ^ RI Hp V P                  RRR7      pV P                  RRR7      pV P                  RRR7      pVP                  VP                  n        VP                  .VP                  n        VP                  VP                  V P                  VP                  4      .VP                  n        V P                  V P                  4      VP                  VP                  .VP                  n        V P                  .VP                  n        VP                  4       pVP                  VP	                  4       \        \         ,          V P#                  V4      4      '       g   R# V P                  4       p VP                  V P#                  V4      VR4      '       g8    VP$                  '       d   VP                  V4       VP                  V4       R# \'        VP$                  4      VP$                  '       d   VP                  V4       VP                  V4       #   TP$                  '       d   TP                  T4       TP                  T4       i ; i)	a›  The environment Windows gives a new process of this user, or None.

CreateEnvironmentBlock builds it from the user's stored variables
(HKCU\Environment, the profile folders, the system variables) and ignores
this process's environment. A sandbox that overrides HERMES_HOME or
LOCALAPPDATA for its own processes does not change the result. Names are
upper-cased because Windows compares them case-insensitively.
N)ÚwintypesÚkernel32T)Úuse_last_errorÚadvapi32ÚuserenvF)Úctypesr¿  ÚWinDLLÚHANDLEÚGetCurrentProcessÚrestypeÚCloseHandleÚargtypesÚDWORDÚPOINTERÚOpenProcessTokenÚc_void_pÚBOOLÚCreateEnvironmentBlockÚDestroyEnvironmentBlockÚ_TOKEN_QUERYÚ_TOKEN_DUPLICATEÚbyrefr   Ú_read_environment_block)rÄ  r¿  rÀ  rÂ  rÃ  r2  Úblocks          r   Ú_new_console_environmentr×  h  sÏ  € ó Ýà�}‰}˜Z¸ˆ}Ó=€HØ�}‰}˜Z¸ˆ}Ó=€HØ�m‰m˜I°dˆmÓ;€GØ)1¯©€H×ÑÔ&Ø%-§_¡_Ð$5€H×ÑÔ!Ø*2¯/©/¸8¿>¹>È6Ï>É>ÐZb×ZiÑZiÓKjÐ)k€H×ÑÔ&Ø/5¯~©~¸f¿o¹oÓ/NÐPX×P_ÑP_Ðai×anÑanÐ.o€G×"Ñ"Ô+Ø06·±Ð/@€G×#Ñ#Ô,à�O‰OÓ€EØ×$Ñ$ X×%?Ñ%?Ó%AÄ<ÔRbÕCbØ%+§\¡\°%Ó%8÷:ò :áØ�O‰OÓ€Eð$Ø×-Ñ-¨f¯l©l¸5Ó.AÀ5È%×PÒPØð �;�;ˆ;Ø×+Ñ+¨EÔ2Ø×Ñ˜UÖ#ô	 ' u§{¡{Ó3à�;�;ˆ;Ø×+Ñ+¨EÔ2Ø×Ñ˜UÕ#øð �;�;ˆ;Ø×+Ñ+¨EÔ2Ø×Ñ˜UÕ#ús   Æ'H) Ç H) È)6Ic               ó    € V ^8„  d   QhRRRR/# )r
   ÚaddressÚintr   zdict[str, str]r   )r   s   "r   r   r   Œ  s   € ÷ ñ  Sð ¨^ñ r   c                ó,  € ^ RI p/ pT pVP                  V4      ;p'       ds   VP                  R4      w  rVpV'       d   WrVP                  4       &   V\	        VP                  RR4      4      VP                  VP                  4      ,           ,          pK‹  V# )a  Parse a Windows environment block: NUL-terminated UTF-16 ``NAME=value`` entries, then an empty one.

The cursor advances by UTF-16 code units, not Python characters: a value
holding a character outside the Basic Multilingual Plane (an emoji) takes
two units and one character.
NÚ=r¨   Úsurrogatepass)rÄ  Ú
wstring_atÚ	partitionÚupperr–  r   ÚsizeofÚc_wchar)rÙ  rÄ  ÚenvironÚcursorr7   r   Ú_r   s   &       r   rÕ  rÕ  Œ  s~   € ó à €GØ€FØ×$Ñ$ VÓ,Ð
,ˆ%Ö
,ØŸ™¨Ó-‰ˆ�ßØ$)�D—J‘J“LÑ!Ø”#�e—l‘l ;°Ó@ÓAÀFÇMÁMÐRX×R`ÑR`ÓDaÕaÕaŠØ€Nr   c               ó   € V ^8„  d   QhRR/# )r
   r   r`   r   )r   s   "r   r   r   Ÿ  s   € ÷ Mñ M ñ Mr   c                 ó>   € ^ RI Hp  \        4       pVf   R# V ! V4      # )zVThe Hermes root that a newly opened console resolves, or None when Windows cannot say.)Úhermes_root_for_environmentN)r”  rè  r×  )rè  rã  s     r   Únew_console_hermes_rootré  Ÿ  s"   € å<ä&Ó(€GØ’?ˆ4ÐLÑ(CÀGÓ(LÐLr   c               ó    € V ^8„  d   QhRRRR/# ©r
   r6   r   r   r[   r   )r   s   "r   r   r   §  s   € ÷ ñ ˜ð  $ñ r   c                ó„  € \        4       pVe~   \        P                  P                  \        P                  P	                  V 4      4      \        P                  P                  \        P                  P	                  V4      4      8X  d   R# ^ RIpVP                  \        4      P                  RT;'       g    RV 4       R# )aÙ  May ``root`` put its commands on the User PATH?

Every console the user opens reads the User PATH, so only the root that
new consoles resolve may register there. A custom root qualifies only when
HERMES_HOME is stored as a user variable. A process whose own HERMES_HOME,
LOCALAPPDATA or USERPROFILE override selects a different root (a review
sandbox, a test home, a suffixed data directory) gets False. So does any
root when Windows cannot report the console environment.
NTz5User PATH left unchanged: new consoles use %s, not %szan unknown Hermes homeF)	ré  r   r  ÚnormcaseÚrealpathÚloggingÚ	getLoggerrÇ   Úinfo)r6   Úconsole_rootrï  s   &  r   Úowns_user_pathró  §  sŒ   € ô +Ó,€LØÒÜ
�‰×ÑœŸ™×)Ñ)¨$Ó/Ó0´B·G±G×4DÑ4DÄRÇWÁW×EUÑEUÐVbÓEcÓ4dÔdáÛà×Ñ”hÓ×$Ñ$Ø?Ø×0Ð0Ð0°$ô8ñ r   c               ó$   € V ^8„  d   QhRRRRRR/# )r
   r  r   r7   r   r(   r   )r   s   "r   r   r   ¾  s!   € ÷ 
%ñ 
%˜sð 
%¨3ð 
%°:ñ 
%r   c                óB  a€ VP                  R4      oT ;'       g    RP                  R4       Uu. uF  q"'       g   K  VNK  	  pp\        ;QJ d    V3R lV 4       F  '       g   K   RM	  RM! V3R lV 4       4      '       d   R# RP                  V.VO4      # u upi )z²``entry`` first, or None when the PATH already names it.

Windows paths are case-insensitive and may carry a trailing separator, so
compare that way rather than by exact string.
ú\/r-   Ú;c              3  ó‚   <"  € T F4  qP                  R 4      P                  4       SP                  4       8H  x € K6  	  R# 5i)rö  N)ré   Úcasefold)r¢   ÚpartÚwanteds   & €r   r¥   Ú#_merge_user_path.<locals>.<genexpr>Æ  s-   øé € Ð
PÉ%À$�;‰;�uÓ×&Ñ&Ó(¨F¯O©OÓ,=Ö=Ë%ùs   ƒ<?TFN)ré   r8  r­   r'  )r  r7   rú  Úpartsrû  s   &&  @r   Ú_merge_user_pathrþ  ¾  s}   ø€ ð �\‰\˜%Ó €FØ'Ÿ~˜~¨2×4Ñ4°SÔ9ÓBÑ9�d»T�TˆTÑ9€EÐBß
ƒsÔ
PÉ%Ó
P‡s‡s‚sÔ
PÉ%Ó
P×PÒPÙØ�8‰8�U�O˜U�OÓ$Ð$ùò Cs
   °	B¾Bc               ó    € V ^8„  d   QhRRRR/# )r
   r7   r   r   r   r   )r   s   "r   r   r   Ë  s   € ÷ ñ  tð °ñ r   c           	     ó  € ^ RI pVP                  VP                  R^ VP                  VP                  ,          4      ;_uu_ 4       p VP                  VR4      w  r4\        \        V4      \        V 4      4      pVf    RRR4       R# WAP                  VP                  39  d   VP                  pVP                  VR^ WE4       RRR4       \        4        R#   \         d    RTP                  rC L—i ; i  + '       g   i     L:; i)zÞPut ``entry`` on the User PATH. Returns 'present' or 'added'.

Preserves the stored value type: install.ps1 writes expandable entries
(``%LOCALAPPDATA%\...``), and rewriting the value as a plain string would
freeze those.
NÚEnvironmentr   r-   r‹  Úadded)ÚwinregÚOpenKeyÚHKEY_CURRENT_USERÚKEY_QUERY_VALUEÚKEY_SET_VALUEÚQueryValueExÚFileNotFoundErrorÚREG_EXPAND_SZrþ  r   ÚREG_SZÚ
SetValueExÚ_broadcast_environment_change)r7   r  ÚkeyÚcurrentÚkindÚmergeds   &     r   Ú_register_windows_user_pathr  Ë  sò   € ó à	�‰˜×0Ñ0°-ÀØ×.Ñ.°×1EÑ1EÕE÷
Gô 
GØJMð	5Ø"×/Ñ/°°VÓ<‰MˆGô "¤# g£,´°E³
Ó;ˆØŠ>Ø÷
Gñ 
Gð Ÿ™ v×';Ñ';Ð<Ô<Ø×'Ñ'ˆDØ×Ñ˜#˜v q¨$Ô7÷
Gô "Ô#Ùøô !ô 	5Ø × 4Ñ 4’Tð	5ú÷	
G÷ 
Gús6   ÁC7ÁCÁ#C7Â	<C7ÃC4Ã1C7Ã3C4Ã4C7Ã7D	c               ó   € V ^8„  d   QhRR/# )r
   r   r>   r   )r   s   "r   r   r   ä  s   € ÷ ñ  tñ r   c            	     óŠ   € ^ RI p  V P                  P                  P                  R^^ R^RR4       R#   \         d     R# i ; i)z=Tell running processes the environment changed (best effort).Niÿÿ  r  iˆ  )rÄ  ÚwindllÚuser32ÚSendMessageTimeoutWr«   )rÄ  s    r   r  r  ä  sC   € ãðØ�‰×Ñ×0Ñ0°¸¸qÀ-ÐQWÐY]Ð_cÖdøÜô Úðús   †+3 ³AÁAc               ó$   € V ^8„  d   QhRRRRRR/# )r
   r6   r   r?  r[   r   rœ  r   )r   s   "r   r   r   î  s!   € ÷ 0ñ 0 4ð 0°Dð 0¸Tñ 0r   c          	     ón  € ^ RI Hp V! 4       R,          p V'       gO   \        W\        RR7      pRRRVP	                  4        UUu. uF  w  rVV'       g   K  VP
                  NK  	  upp/# VP                  RRR7       \        W4      p\        V4      \        \        4      8w  d   RRR	R
/# V Uu. uF  p\        V4      P
                  NK  	  pp\        VP                  4      '       g	   RRRRRV/# RRR\        V4      RV/# u uppi u upi   \         d   p	RRR	\        T	4      /u Rp	?	# Rp	?	ii ; i)a“  Windows twin of expose_cli's POSIX half.

Stage the user-facing commands into ``$HERMES_HOME\bin`` and register that
directory in the User PATH -- the same two things scripts/install.ps1 does --
so an update converges a machine installed under the older venv\Scripts
convention instead of leaving it there forever. The registration happens
only when new consoles resolve this home (``owns_user_path``).
r‘  rU   FrŸ  r¡  Tr  rB  r©  rª  r¢  z.User PATH belongs to the home new consoles user  N)r”  r’  rO  r•  r¸  r   rG  r™  r–  r   ró  r‡   r  rq   r   )
r6   r?  r’  rÑ   rM  r  r­  r  rL  r»  s
   &$        r   r°  r°  î  s'  € õ 9á'Ó)¨EÕ1€Ið0ßä-¨dÔ?TÐ]bÔcˆIØ˜$ 	È9Ï?É?ÔK\Ô+hÑK\¹-¸$Ô`g¬I¨D¯I¬IÑK\Ò+hÐiÐiØ�‰ ¨tˆÔ4Ü*¨4Ó;ˆÜˆw‹<œ3Ô4Ó5Ô5Ø˜% Ð*NÐOÐOÙ-4Ó5©W T”�d“—”©WˆÐ5Ü˜i×.Ñ.×/Ò/à˜$ 	Ð+[Ð]fÐhmÐnÐnØ�d˜FÔ$?À	Ó$JÈIÐW\Ð]Ð]ùó ,iùò
 6øô
 ô 0Ø�e˜W¤c¨#£hÐ/Õ/ûð0úsY   –D ž(D ÁDÁDÁ'D Á,A D Â-D Â1DÃ$D Ã4D ÄD ÄD4ÄD/Ä)D4Ä/D4c               ó    € V ^8„  d   QhRRRR/# rë  r   )r   s   "r   r   r     s   € ÷ Vñ V˜dð V tñ Vr   c                óà   € V R,          P                  4       '       d   R# ^ RIHpHp V! V 4      pV'       g   R# \	        VP                  R4      4      ;'       g    VP                  R4      V8H  # )zÀIs ``root`` a desktop bundle's agent payload? The stamp is the
authority (payload marker / desktop-app distribution), never a
sibling-directory sniff; a .git tree is a dev checkout regardless.z.gitF)ÚSTEWARD_DESKTOPr¥  ÚpayloadÚdistribution)rI  r³  r  r¥  r[   rp   )r6   r  r¥  Ústamps   &   r   r´  r´    sW   € ð 	ˆv�×Ñ×ÒÙßFá˜tÓ$€EßÙÜ�—	‘	˜)Ó$Ó%×UÐU¨¯©°>Ó)BÀoÑ)UÐUr   c               ó   € V ^8„  d   QhRR/# )r
   r   rœ  r   )r   s   "r   r   r     s   € ÷ )Gñ )G¨dñ )Gr   c                ó(  € \         P                  ! 4       R,          R,          pV P                  p. p VP                  RRR7       R EF  pW,          pVP	                  4       '       g   K$  W,          pVP                  4       '       d‹   \        P                  ! V4      pV\        V4      8X  d   Kj  \        \        V4      4      P                  \        V4      \        P                  ,           4      pV'       g   VP                  4       '       d   KË  MVP                  4       '       d   Kä  VP                  RR7       VP                  V4       VP                  V4       EK  	  RRR
TRR/#   \         d   p	RRR\        T	4      /u R	p	?	# R	p	?	ii ; i)uV  Link ~/.local/bin/{hermes,hermes-agent,hermes-acp} at a sealed
bundle's own prebuilt shims (macOS only).

Symlinks, not copies: the shims are signed as part of the app bundle,
and a copy would both orphan the signature's context and go stale on
every app update â€” a symlink into the .app follows the bundle's
content wherever Squirrel.Mac swaps it.

Ownership guard mirrors expose_cli's wrapper logic: an existing
entry is replaced only when it is ours â€” a symlink into THIS app
bundle's payload â€” or missing/broken. A user's own `hermes` (pipx,
another checkout's wrapper) is never touched.
r«  rU   TrB  r]  r¡  Fr©  Nr  Úmodezsealed-symlinks)rV   rE  rY   )r   r%   r‡   rG  rm   r(  r   Úreadlinkr   rr  ÚseprI  r¸   Ú
symlink_tor‡  rq   )
Úpayload_binÚlink_dirÚpayload_rootr  r   Úsourcer´   r  Úpoints_into_payloadr»  s
   &         r   r¶  r¶    sB  € ô �yŠy‹{˜XÕ%¨Õ-€HØ×%Ñ%€LØ€Gð0Ø�‰˜t¨dˆÔ3Ü<ˆDØ Õ'ˆFØ—>‘>×#Ò#ÙØ•_ˆFØ× Ñ ×"Ò"ÜŸ+š+ fÓ-�Øœc &›kÔ)Ùô '*¬$¨w«-Ó&8×&CÑ&CÄCÈÓDUÔXZ×X^ÑX^ÕD^Ó&_Ð#ß*¨v¯}©}¯ªÙøØ—‘—’ÙØ�M‰M TˆMÔ*Ø×Ñ˜fÔ%Ø�N‰N˜4× ñ' =ð, �$˜	 7¨FÐ4EÐFÐFøô ô 0Ø�e˜W¤c¨#£hÐ/Õ/ûð0ús*   ³CE- ÄE- Ä*;E- Å-FÅ8FÆFÆF:rD   r
   Nz--print-runtime-command:r
   NNz!Publish source-install launchers.r@   r½   )ÚtyperR  zThermes: store interpreter is missing; finish pm install before publishing launchers
rB  z$hermes: launcher publication failed
r"  )r   )rV   rY   )r"   Úmain)zacp_adapter.entryr,  r¡   )NÚ__doc__Ú
__future__r   Ú
contextlibr   rL   r   r&  r2   Úpathlibr   rÇ   r  Úinsertr   Ú__file__r0   rC  Úpm.environmentsr   r   r4   r    r;   rP   rX   r•  rò   r]   r1   rc   r|   r™   r±   r»   r	  r  ró   r+  rô   r;  rO  rV  rS  rT  rh  r  rŽ  r™  r¼  rÓ  rÒ  r×  rÕ  ré  ró  rþ  r  r  r°  r´  r¶  rF   r=   Ú
SystemExitrG   rN   rH   rJ   r5   r'   Úexitr½   rG  r  r–  rK   r'  r   r   r   Ú<module>r6     s×  ðñ	õ #å Û Û 	Û Û 
Ý àˆzÔØ‡H�H‡O�O�A‘s™4 ›>×1Ñ1Ó3×;Ñ;¸AÕ>Ó?Ô@ç 8ð 3Ð õKñ!7Ð?Pð !7Ø'+ð!7ØIMð!7à.2÷!7ð !7õH	OñFÐDUð FØ59ðFØUY÷Fð Fð  1Ð ð
 Ð)ØÐ/ð€õð0À÷ 0õ"ò(õ õB5õ:õ [bðL\€õ~GõT(õ Oõð4Èd÷ õ(õ,õõ0(õ"<õ~/õd#PñL:0À4÷ :0ð :0ðz Ð Ø€õ!$õHõ&Mõõ.
%õõ2õ0õ<Võ)GðX ˆzÕÛà
‡x�x�…}Ð2Ð3Ô3Ù™d 8›n×4Ñ4Ó6×>Ñ>¸qÕAÀ3Ç8Á8ÈBÅ<ÔPÙ˜‹mÐà×$Ò$Ð1TÔU€FØ
×Ñ˜	¨ÐÔ-Ø×ÑÓ€DÙ�X“×&Ñ&Ó(×0Ñ0°Õ3€IÙ˜I°4Ô8Ò@Ø�‰�AÐnÔoØ‡L�L×Ñ˜t¨dÐÔ3Ù& y°$·,±,Ó?€GÙ
ˆ7ƒ|‘s˜<Ó(Ô(Ø�‰�AÐ>Ô?Ù	ˆ$�)‰)�GÓ
Öñ# r   