+
    jHàjp  ã                  ó  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
HtHt ^ RIHtHtHt ^ RIHt ^ RIHtHtHtHtHt ^ RIt^ RIHt ^ RIHt ^ R	IHtH t H!t! ^ R
I"H#t# Rt$Rt%Rt&RRRRR]$3t'R](R&   ]])! 0 Rgm4      ,          t*R](R&   Rht+R R lt, ! R R]-4      t.RiR R llt/] ! R R4      4       t0] ! R R 4      4       t1R! R" lt2R# R$ lt3]Ph                  ! R%4      t5R&]Pl                  R']Pn                  R(]Pp                  R)]Pr                  R*]Pt                  R+]Pv                  /t<R, R- lt=R. R/ lt>R0 R1 lt?]Ph                  ! R24      t@R3 R4 ltAR5 R6 ltBR7 R8 ltCR9 R: ltD] ! R; R<4      4       tER= R> ltFRjR? R@ lltGRA RB ltHRC RD ltIRE RF ltJRG RH ltKRI RJ ltLRK RL ltMRM RN ltNRO RP ltORQ RR ltPRS RT ltQRU RV ltRRW RX ltSRY RZ ltTR[ R\ ltUR] R^ ltVRkR_ R` lltWRa Rb ltXRlRc Rd lltYRe Rf ltZR# )mu  Profile distributions â€” shareable, packaged Hermes profiles via git.

Sources: a git URL (``github.com/user/repo``, ``https://...``, ``git@...``, ``ssh://``,
``git://``) or a local directory that already contains ``distribution.yaml`` (profile
development before the first push).
)ÚannotationsN)Ú	dataclassÚfield)ÚdatetimeÚtimezoneÚUTC)ÚPath)ÚAnyÚDictÚListÚOptionalÚTuple)Únoninteractive_git_env)Únormalize_archive_parts)ÚDEFAULT_EXPORT_EXCLUDE_ROOTÚ#profile_path_contains_private_storeÚprofile_path_is_private)Úrmtree_readonlyzdistribution.yamlz.env.templatez.env.EXAMPLEzSOUL.mdúconfig.yamlzmcp.jsonÚskillsÚcronútuple[str, ...]ÚDEFAULT_DIST_OWNEDÚ	frozensetÚUSER_OWNED_EXCLUDEc               ó    € V ^8„  d   QhRRRR/# )é   Úpartsr   ÚreturnÚbool© )Úformats   "ÚD/home/ubuntu/.hermes/hermes-agent/hermes_cli/profile_distribution.pyÚ__annotate__r#   2   s   € ÷ Qñ Q Oð Q¸ñ Qó    c                ó  € \        V 4      '       d   R# \        V 4      ^8  d   R# V ^ ,          R8X  d   V R,          \        8g  # V ^ ,          R8H  ;'       d/    \        V 4      ^8H  ;'       d    V ^,          P                  R4      # )z¬Entries a distribution never writes: credential stores (and Hermes' copies of them) at any
depth, and runtime-owned entries nested under otherwise distribution-owned roots.TFr   :Nr   Nr   Ú.)r   ÚlenÚ_CRON_STORE_RELÚ
startswith)r   s   &r"   Ú_is_installer_owned_pathr*   2   ss   € ô ˜u×%Ò%ÙÜ
ˆ5ƒz�A„~ÙØˆQ…x�6ÔØ�R�yœOÑ+Ð+ð ��8�xÑ×PÐP¤C¨£J°!¡O×PÐP¸¸a½×8KÑ8KÈCÓ8PÐPr$   c                  ó   € ] tR t^AtRtRtR# )ÚDistributionErrorz0Raised for distribution install/update failures.r    N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r    r$   r"   r,   r,   A   s   † Ý:r$   r,   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r   ÚdataÚdictÚkeyÚstrÚdefaultr   r    )r!   s   "r"   r#   r#   G   s(   € ÷ )ñ )ˆtð )˜#ð )¨ð )°Sñ )r$   c                óJ   € \        V P                  V4      ;'       g    T4      # ©N)r7   Úget)r4   r6   r8   s   &&&r"   Ú_strr<   G   s   € Üˆt�x‰x˜‹}×'Ð' Ó(Ð(r$   c                  ón   € ] tR t^Kt$ R]R&   RtR]R&   RtR]R&   RtR	]R
&   ]R R l4       t	R R lt
RtR# )ÚEnvRequirementr7   ÚnameÚ ÚdescriptionTr   ÚrequiredNúOptional[str]r8   c               ó    € V ^8„  d   QhRRRR/# )r   r4   r	   r   r>   r    )r!   s   "r"   r#   ÚEnvRequirement.__annotate__S   s   € ÷ 	
ñ 	
˜Sð 	
 ^ñ 	
r$   c           
     	óF  € \        V\        4      '       g"   \        R \        V4      P                   24      h\        VR4      P                  4       pV'       g   \        R4      hV ! V\        VR4      \        VP                  RR4      4      VP                  R4      R7      # )z*env_requires entry must be a mapping, got r?   z!env_requires entry missing 'name'rA   rB   Tr8   ©r?   rA   rB   r8   )	Ú
isinstancer5   r,   Útyper-   r<   Ústripr   r;   )Úclsr4   r?   s   && r"   Ú	from_dictÚEnvRequirement.from_dictR   s�   € ä˜$¤×%Ò%Ü#Ð&PÔQUÐVZÓQ[×QdÑQdÐPeÐ$fÓgÐgÜ�D˜&Ó!×'Ñ'Ó)ˆßÜ#Ð$GÓHÐHÙØ¤4¨¨mÓ#<ÄtÈDÏHÉHÐU_ÐaeÓLfÓGgØ—H‘H˜YÓ'ô
ð 	
r$   c               ó   € V ^8„  d   QhRR/# ©r   r   údict[str, Any]r    )r!   s   "r"   r#   rE   ^   s   € ÷ ñ ˜ñ r$   c                	ó¢   € R V P                   RV P                  /pV P                  '       g   RVR&   V P                  e   V P                  VR&   V# )r?   rA   FrB   r8   rG   )ÚselfÚouts   & r"   Úto_dictÚEnvRequirement.to_dict^   sH   € Ø% t§y¡y°-À×AQÑAQÐRˆØ�}�}ˆ}Ø#ˆC�
‰OØ�<‰<Ò#Ø!Ÿ\™\ˆC�	‰NØˆ
r$   r    )r-   r.   r/   r0   Ú__annotations__rA   rB   r8   ÚclassmethodrL   rT   r2   r    r$   r"   r>   r>   K   sA   ‡ à
ƒIØ€K�ÓØ€HˆdÓØ!€Gˆ]Ó!àô	
ó ð	
÷ñ r$   r>   c                  óÞ   € ] tR t^gt$ R]R&   RtR]R&   RtR]R&   RtR]R&   RtR]R&   Rt	R]R	&   ]
! ]R
7      tR]R&   ]
! ]R
7      tR]R&   RtR]R&   RtR]R&   ]R R l4       tR R ltRtR# )ÚDistributionManifestr7   r?   ú0.1.0Úversionr@   rA   Úhermes_requiresÚauthorÚlicense)Údefault_factoryzlist[EnvRequirement]Úenv_requiresz	list[str]Údistribution_ownedÚsourceÚinstalled_atc               ó    € V ^8„  d   QhRRRR/# )r   r4   r	   r   rY   r    )r!   s   "r"   r#   Ú!DistributionManifest.__annotate__w   s   € ÷ 
ñ 
˜Sð 
Ð%9ñ 
r$   c                	óž  € \        V\        4      '       g(   \        \         R \	        V4      P
                   24      h\        VR4      P                  4       pV'       g   \        \         R24      hVP                  R4      ;'       g    . p\        V\        4      '       g   \        R4      hVP                  R4      ;'       g    . pV'       d"   \        V\        4      '       g   \        R4      hT ! T\        VRR4      \        VR	4      \        VR
4      \        VR4      \        VR4      V Uu. uF  p\        P                  V4      NK  	  upV Uu. uFL  p\        V4      P                  4       '       g   K$  \        V4      P                  4       P                  R4      NKN  	  up\        VR4      \        VR4      R7
      # u upi u upi )z must be a mapping, got r?   z missing 'name'r`   zenv_requires must be a listra   z!distribution_owned must be a listr[   rZ   rA   r\   r]   r^   Ú/rb   rc   )
r?   r[   rA   r\   r]   r^   r`   ra   rb   rc   )rH   r5   r,   ÚMANIFEST_FILENAMErI   r-   r<   rJ   r;   Úlistr>   rL   r7   )rK   r4   r?   Úenv_rawÚdist_owned_rawÚeÚps   &&     r"   rL   ÚDistributionManifest.from_dictv   s€  € ä˜$¤×%Ò%Ü#Ô'8Ð&9Ð9QÔRVÐW[ÓR\×ReÑReÐQfÐ$gÓhÐhÜ�D˜&Ó!×'Ñ'Ó)ˆßÜ#Ô'8Ð&9¸Ð$IÓJÐJØ—(‘(˜>Ó*×0Ð0¨bˆÜ˜'¤4×(Ò(Ü#Ð$AÓBÐBØŸ™Ð"6Ó7×=Ð=¸2ˆß¤*¨^¼T×"BÒ"BÜ#Ð$GÓHÐHÙØœt D¨)°WÓ=Ì4ÐPTÐVcÓKdÜ  Ð'8Ó9Ä$ÀtÈXÓBVÜ˜˜yÓ)Ñ^eÓ8fÑ^eÐYZ¼×9QÑ9QÐRSÖ9TÑ^eÑ8fÙCQÓdÁ>¸aÔUXÐYZÓU[×UaÑUa×UcÔ 9¤ A£§¡£× 4Ñ 4°SÖ 9Á>ÑdÜ˜˜hÓ'´d¸4ÀÓ6Pô
ð 	
ùò 9gùÚds   Ä1GÅ!G
Å;,G
c               ó   € V ^8„  d   QhRR/# rO   r    )r!   s   "r"   r#   re   ‹   s   € ÷ ñ ˜ñ r$   c           
     	ó‚  € R V P                   RV P                  /pRV P                  3RV P                  3RV P                  3RV P
                  3RV P                   Uu. uF  q"P                  4       NK  	  up3RV P                  3RV P                  3R	V P                  33pVP                  R
 V 4       4       V# u upi )r?   r[   rA   r\   r]   r^   r`   ra   rb   rc   c              3  ó@   "  € T F  w  rV'       g   K  W3x € K  	  R # 5ir:   r    )Ú.0ÚkÚvs   &  r"   Ú	<genexpr>Ú/DistributionManifest.to_dict.<locals>.<genexpr>•   s   é € Ð4¡h™d˜a´!”6�A•6£hùs   ‚“)r?   r[   rA   r\   r]   r^   r`   rT   ra   rb   rc   Úupdate)rR   rS   rl   Úoptionals   &   r"   rT   ÚDistributionManifest.to_dict‹   s½   € Ø% t§y¡y°)¸T¿\¹\ÐJˆð ˜D×,Ñ,Ð-Ð0AÀ4×CWÑCWÐ/XØ�t—{‘{Ð# i°·±Ð%>Ø°4×3DÒ3DÓEÑ3D¨aŸi™ižkÑ3DÑEÐFØ! 4×#:Ñ#:Ð;¸hÈÏÉÐ=TØ˜T×.Ñ.Ð/ð
ˆð 	�
‰
Ñ4¡hÓ4Ô4Øˆ
ùò Fs   ÁB<r    N)r-   r.   r/   r0   rV   r[   rA   r\   r]   r^   r   ri   r`   ra   rb   rc   rW   rL   rT   r2   r    r$   r"   rY   rY   g   s‰   ‡ à
ƒIØ€GˆSÓØ€K�ÓØ€O�SÓØ€FˆCÓØ€GˆSÓÙ).¸tÔ)D€LÐ&ÓDÙ$)¸$Ô$?Ð˜	Ó?à€FˆCÓà€L�#Óàô
ó ð
÷(ñ r$   rY   c               ó    € V ^8„  d   QhRRRR/# )r   Úprofile_dirr   r   zOptional[DistributionManifest]r    )r!   s   "r"   r#   r#   ™   s   € ÷ 	6ñ 	6˜tð 	6Ð(Fñ 	6r$   c                ó"  € V \         ,          pVP                  4       '       g   R#  \        P                  ! VP	                  RR7      4      p\        P                  T;'       g    / 4      #   \
         d   p\        RT RT 24      ThRp?ii ; i)zJReturn the manifest for *profile_dir*, or None if it isn't a distribution.Nz	utf-8-sig©ÚencodingzFailed to parse ú: )	rh   Úis_fileÚyamlÚ	safe_loadÚ	read_textÚ	Exceptionr,   rY   rL   )r{   Úmf_pathr4   Úexcs   &   r"   Úread_manifestr‡   ™   s‡   € àÔ-Õ-€GØ�?‰?×ÒÙðNÜ�~Š~˜g×/Ñ/¸Ð/ÓEÓFˆô  ×)Ñ)¨$¯*¨*°"Ó5Ð5øô ô NÜÐ"2°7°)¸2¸c¸UÐ CÓDÈ#ÐMûðNús   §&A, Á,BÁ7B	Â	Bc               ó$   € V ^8„  d   QhRRRRRR/# )r   r{   r   ÚmanifestrY   r   r    )r!   s   "r"   r#   r#   ¥   s"   € ÷ ñ  ð Ð0Dð Èñ r$   c                ó`   € V \         ,          p^ RIHp V! W!P                  4       RRRR7       V# )zòAtomically write ``distribution.yaml``. A bare write_text() truncates before the dump
lands and read_manifest() treats a missing/unparseable manifest as "not a distribution",
so an interrupted install/update would silently demote the profile.)Úatomic_yaml_writeFi¤  )Ú	sort_keysÚdefault_flow_styleÚcreate_mode)rh   Úutilsr‹   rT   )r{   r‰   r…   r‹   s   &&  r"   Úwrite_manifestr�   ¥   s2   € ð Ô-Õ-€GÝ'ñ �g×/Ñ/Ó1¸UÐW\ÐjoÕpØ€Nr$   z!^\s*(>=|<=|==|!=|>|<)\s*(.+?)\s*$ú>=z<=z==z!=Ú>Ú<c               ó    € V ^8„  d   QhRRRR/# )r   rt   r7   r   ztuple[int, int, int]r    )r!   s   "r"   r#   r#   º   s   € ÷ Hñ H�Sð HÐ1ñ Hr$   c                óž  € \         P                  ! R\        V 4      P                  4       P	                  R4      ^4      ^ ,          P                  R4      pVR.^\        V4      ,
          ,          ,          p \        V^ ,          4      \        V^,          4      \        V^,          4      3#   \         d   p\        RT : 24      ThRp?ii ; i)zQmajor.minor.patch only; pre-release / build metadata ("0.12.0-rc1+abc") stripped.z[-+]rt   r&   Ú0zUnparseable version: N)	ÚreÚsplitr7   rJ   Úlstripr'   ÚintÚ
ValueErrorr,   )rt   r   r†   s   &  r"   Ú_parse_semverrœ   º   s¤   € ä�HŠH�Wœc !›fŸl™l›n×3Ñ3°CÓ8¸!Ó<¸QÕ?×EÑEÀcÓJ€EØ	ˆcˆU�aœ#˜e›*•nÕ%Õ%€EðHÜ�5˜•8‹}œc %¨¥(›m¬S°°qµ«]Ð:Ð:øÜô HÜÐ"7¸±uÐ =Ó>ÀCÐGûðHús   Á74B, Â,CÂ7CÃCc               ó$   € V ^8„  d   QhRRRRRR/# )r   Úspecr7   Úcurrent_versionr   ÚNoner    )r!   s   "r"   r#   r#   Ä   s&   € ÷ tñ t ð t°cð t¸dñ tr$   c                óH  € V '       d   V P                  4       '       g   R# \        P                  V 4      pV'       d   VP                  4       MRV P                  4       3w  r4\        V,          ! \        V4      \        V4      4      '       g   \        RV V RV R24      hR# )zaRaise DistributionError if ``current_version`` does not satisfy ``spec`` (bare version = ``>=``).Nr‘   z"This distribution requires Hermes z, but you have r&   )rJ   Ú_VERSION_OP_REÚmatchÚgroupsÚ_VERSION_OPSrœ   r,   )rž   rŸ   ÚmÚopÚtargets   &&   r"   Úcheck_hermes_requiresr©   Ä   sƒ   € ç�t—z‘z—|’|ÙÜ×Ñ˜TÓ"€Aß �—‘” t¨T¯Z©Z«\Ð&:�J€BÜ˜ÖœM¨/Ó:¼MÈ&Ó<Q×RÒRÜÐ"DÀRÀDÈÈÐP_Ð`oÐ_pÐpqÐ rÓsÐsñ Sr$   c               ó    € V ^8„  d   QhRRRR/# )r   r‰   rY   r   r7   r    )r!   s   "r"   r#   r#   Î   s   € ÷ ,ñ ,Ð*>ð ,À3ñ ,r$   c                óª  € . ROpV P                    Fš  pVP                  '       d   VP                  RVP                   24       VP                  e   VP                  MRpVP                  '       d   VRVP
                   RV 2R.,          pK~  VRRVP
                   RV 2R.,          pKœ  	  RP                  V4      P                  4       R,           # )z4Generate a ``.env.template`` body from env_requires.r@   z# z# (required)Ú=z# (optional)Ú
)z=# Environment variables required by this Hermes distribution.z<# Copy to `.env` and fill in your own values before running.r@   )r`   rA   Úappendr8   rB   r?   ÚjoinÚrstrip)r‰   ÚlinesÚreqÚdefault_vals   &   r"   Ú_env_template_from_manifestr´   Î   sº   € ò€Eð ×$Ô$ˆØ�?�?ˆ?Ø�L‰L˜2˜cŸo™oÐ.Ð/Ô0Ø%(§[¡[Ò%<�c—k’kÀ"ˆØ�<�<ˆ<Ø�n¨¯©¨
°!°K°=Ð&AÀ2ÐFÕFŠEà�n¨¨3¯8©8¨*°A°k°]Ð&CÀRÐHÕHŠEñ %ð �9‰9�UÓ×"Ñ"Ó$ tÕ+Ð+r$   z^github\.com/[\w.-]+/[\w.-]+/?$c               ó    € V ^8„  d   QhRRRR/# )r   Úsr7   r   r   r    )r!   s   "r"   r#   r#   ä   s   € ÷ ñ ˜3ð  4ñ r$   c                óÂ   € V P                  4       p V P                  R4      ;'       g8    V P                  R4      ;'       g    \        \        P                  V 4      4      # )uT   Any http(s) URL is a git repo â€” git is the only remote transport (no tar.gz URLs).ú.git)zgit@zssh://zgit://zhttp://úhttps://)rJ   Úendswithr)   r   Ú_GITHUB_SHORTHAND_REr£   )r¶   s   &r"   Ú_looks_like_git_urlr¼   ä   sS   € à	�‰‹	€Aà	�
‰
�6Ó÷ 	/ð 	/Ø�<‰<ÐKÓL÷	/ð 	/äÔ$×*Ñ*¨1Ó-Ó.ðr$   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úurlr7   Údestr   r   r    r    )r!   s   "r"   r#   r#   î   s&   € ÷ Vñ V�Cð V˜tð V¨ñ Vr$   c           
     ó~  € \         P                  V 4      '       d   R V P                  R4       2p ^ RIHp  V! RRRRV \        V4      .V \        4       RRRR	R
7      pTP                  ^ 8w  d1   \        RTP                  ;'       g    RP                  4        24      hR#   \         d   p\        R4      ThRp?ii ; i)r¹   rg   )Ú run_git_with_credential_fallbackÚgitÚclonez--depthÚ1Túutf-8Úreplace)ÚenvÚcapture_outputÚtextr~   Úerrorsz$git is required for git-URL installsNzgit clone failed: r@   )r»   r£   r°   Úhermes_cli.git_credentialsrÁ   r7   r   ÚFileNotFoundErrorr,   Ú
returncodeÚstderrrJ   )r¾   r¿   rÁ   Úresultr†   s   &&   r"   Ú
_git_clonerÐ   î   sÀ   € Ü×!Ñ! #×&Ò&Ø˜Ÿ™ C›Ð)Ð*ˆÝKðQÙ1Ø�G˜Y¨¨S´#°d³)Ð<¸cÔG]ÓG_Ø d°WÀYô
ˆð ×Ñ˜AÔÜÐ"4°f·m±m×6IÐ6IÀr×5PÑ5PÓ5RÐ4SÐ TÓUÐUñ øô ô QÜÐ FÓGÈSÐPûðQús   ·&B  Â B<Â+B7Â7B<c               ó$   € V ^8„  d   QhRRRRRR/# )r   rb   r7   Úworkdirr   r   ztuple[Path, str]r    )r!   s   "r"   r#   r#   ý   s"   € ÷ ñ ˜#ð ¨ð Ð1Añ r$   c                óÞ  € V P                  4       p\        V4      '       d7   VR,          TrC\        W#4       \        VR,          4       R\         RV: R2pMh\        V4      P                  4       ;pP                  4       '       d*   VP                  4       p\        V4      pR\         RV R2pM\        RV : R	24      hV\        ,          P                  4       '       g   \        V4      hW43# )
z”Resolve *source* to ``(staged_dir, provenance)``: git URLs are shallow-cloned into
*workdir* (``.git`` removed); a local directory is used in place.rÃ   r¸   úNo z at the root of z7. This repository is not a Hermes profile distribution.z in zH. A local-directory source must contain a distribution.yaml at its root.z$Cannot resolve distribution source: zF. Expected a git URL (e.g. github.com/user/repo) or a local directory.)rJ   r¼   rÐ   r   rh   r   Ú
expanduserÚis_dirÚresolver7   r,   r€   )rb   rÒ   Úsrc_strÚstagedÚ
provenanceÚmissingÚ
path_guesss   &&     r"   Ú_stage_sourcerÝ   ý   s  € ð �l‰l‹n€GÜ˜7×#Ò#Ø$ wÕ.°�
Ü�7Ô#ô 	˜ �Ô(àÔ#Ð$Ð$4°W±Kð @Dð Dñ 	ô ˜W›×0Ñ0Ó2Ð
2ˆ*×	:Ñ	:×	<Ò	<Ø×#Ñ#Ó%ˆÜ˜“[ˆ
àÔ#Ð$ D¨¨ð 5Uð Uñ 	ô
  Ø
.¨v©jð 9Oð 	Oóð 	ð Ô&Õ&×/Ñ/×1Ò1Ü Ó(Ð(ØÐÐr$   c               ó    € V ^8„  d   QhRRRR/# )r   rÙ   r   r   r    r    )r!   s   "r"   r#   r#     s   € ÷ 	Yñ 	Y¨$ð 	Y°4ñ 	Yr$   c                óÈ   € V P                  R4       F9  pVP                  4       '       g   K   VP                  V 4      p\	        RV 24      h	  R#   \         d    Tp L!i ; i)z=Reject symlinks before reading or copying distribution files.Ú*z/Profile distributions cannot contain symlinks: N)ÚrglobÚ
is_symlinkÚrelative_tor›   r,   )rÙ   ÚentryÚrels   &  r"   Ú_reject_distribution_symlinksræ     si   € à—‘˜cÖ"ˆØ×Ñ×!Ò!Ùð	Ø×#Ñ# FÓ+ˆCô  Ð"QÐRUÐQVÐ WÓXÐXó #øô
 ô 	ØŠCð	ús   ®AÁA!Á A!c                  ój   € ] tR tRt$ RtR]R&   R]R&   R]R&   R]R	&   R
]R&   RtR
]R&   RtR
]R&   RtR# )ÚInstallPlani*  zCSummary of what an install will do, surfaced for user confirmation.rY   r‰   r   Ú
staged_dirr7   rÚ   Ú
target_dirr   ÚexistingTÚpreserves_configFÚhas_cronr    N)	r-   r.   r/   r0   r1   rV   rì   rí   r2   r    r$   r"   rè   rè   *  s6   ‡ áMØ"Ó"ØÓØƒOØÓØƒNØ!Ð�dÓ!Ø€Hˆd×r$   rè   c               ó    € V ^8„  d   QhRRRR/# )r   rÙ   r   r   r   r    )r!   s   "r"   r#   r#   6  s   € ÷ 7ñ 7˜4ð 7 Dñ 7r$   c                óD   € V P                   ! \         P                  4       # r:   )Újoinpathr(   r€   )rÙ   s   &r"   Ú_has_cron_jobsrñ   6  s   € Ø�?Š?œOÐ,×4Ñ4Ó6Ð6r$   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   rb   r7   rÒ   r   Úoverride_namerC   r   rè   r    )r!   s   "r"   r#   r#   :  s)   € ÷ ñ ˜ð  tð ¸Mð ÐU`ñ r$   c                ó  € ^ RI HpHp ^ RIHp \        W4      w  rg\        V4       \        V4      pVf   \        R\         R24      h\        VP                  V! 4       P                  4       T! T;'       g    VP                  4      p	V	R8X  d   \        R4      hW˜n        Wxn        \        P                   ! \"        4      P%                  RR7      Vn        V! V	4      p
V
P)                  4       p\+        W†WzVV\-        V4      R	7      # )
zCStage *source* and produce a plan describing what install would do.)Ú_canon_validÚget_profile_dir)Úget_version_inforÔ   uM    found at the distribution root â€” this source is not a Hermes distribution.r8   u‘   Cannot install a distribution as 'default' â€” that is the built-in root profile (~/.hermes).  Pass --name <name> to install under a new profile.Úseconds)Útimespec)r‰   ré   rÚ   rê   rë   rì   rí   )Úhermes_cli.profilesrõ   rö   Úhermes_cli.version_infor÷   rÝ   ræ   r‡   r,   rh   r©   r\   Úbase_versionr?   rb   r   Únowr   Ú	isoformatrc   rÖ   rè   rñ   )rb   rÒ   ró   rõ   rö   r÷   rÙ   rÚ   r‰   Úcanonrê   rë   s   &&&         r"   Úplan_installr   :  sø   € çAÝ8Ü& vÓ7Ñ€FÜ! &Ô)Ü˜VÓ$€HØÒÜØÔ#Ð$Ð$qÐró
ð 	
ô ˜(×2Ñ2Ñ4DÓ4F×4SÑ4SÔTÙ˜×7Ð7¨(¯-©-Ó8€EØ�	ÔÜð\ó
ð 	
ð „MØ „Oä$ŸLšL¬Ó-×7Ñ7ÀÐ7ÓK€HÔÙ  Ó'€JØ× Ñ Ó"€HÜØ¸ÐemØ!¬N¸6Ó,Bôð r$   c               ó    € V ^8„  d   QhRRRR/# )r   rÙ   r   r‰   rY   r    )r!   s   "r"   r#   r#   X  s   € ÷ !ñ !˜4ð !Ð+?ñ !r$   c              #  ó>  "  € R VP                    4        Uu. uF  q"'       g   K  VNK  	  ppV'       g_   V P                  4        FH  pVP                  \        9  g   K  \	        VP                  34      '       d   K8  WDP                  33x € KJ  	  R# V Fj  p \        \        V4      4      pT^ ,          \        9   g   \	        T4      '       d   K=  T P                  ! T!  pTP                  4       '       g   Ke  Yv3x € Kl  	  R# u upi   \         d     Kƒ  i ; i5i)zGYield ``(src, rel_parts)`` for every staged path the distribution owns.c              3  ó^   "  € T F#  qP                  4       P                  R 4      x € K%  	  R# 5i)rg   N)rJ   ©rr   rm   s   & r"   ru   Ú!_owned_entries.<locals>.<genexpr>Z  s"   é € Ð!\Ñ@[¸1§'¡'£)§/¡/°#×"6Ð"6Ó@[ùs   ‚+-N)
ra   Úiterdirr?   r   r*   Útupler   r›   rð   Úexists)rÙ   r‰   rm   Úexplicit_ownedrä   rå   Ú	rel_partsÚsrcs   &&      r"   Ú_owned_entriesr  X  sí   é € á!\À×@[Ò@[Ô!\ÓbÑ!\˜AÓ`a—a�aÑ!\€NÐbßð —^‘^Ö%ˆEØ�z‰zÔ!3Ö3Ô<TÐV[×V`ÑV`ÐUb×<cÔ<cØŸj™j˜]Ð*Ô*ñ &ñ 	ãˆð	ÜÔ5°cÓ:Ó;ˆIð �Q�<Ô-Ô-Ô1IÈ)×1TÒ1TÙØ�oŠo˜yÑ)ˆØ�:‰:�<Œ<Ø�.Ô ó ùò cøô ô 	Úð	üsK   ‚D˜	D¦D¬/DÁ DÁ>DÂDÂ.ADÃ;DÄDÄDÄDÄDc               ó    € V ^8„  d   QhRRRR/# ©r   Úpathr   r   r    r    )r!   s   "r"   r#   r#   p  s   € ÷ ñ ˜4ð  Dñ r$   c                óü   € V P                  4       '       d/   V P                  4       '       g   \        P                  ! V 4       R# \        P
                  P                  V 4      '       d   V P                  4        R# R# )zERemove one destination entry without following a destination symlink.N)rÖ   râ   ÚshutilÚrmtreeÚosr  ÚlexistsÚunlink©r  s   &r"   Ú_remove_existingr  p  sF   € à‡{�{‡}‚}˜TŸ_™_×.Ò.Ü�Š�dÖÜ	�‰�‰˜×	Ò	à�‰Žñ 
r$   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r  r   r¿   r   r    r    )r!   s   "r"   r#   r#   y  s!   € ÷  ñ  ˜ð   Dð  ¨Tñ  r$   c                ó¤   € \        V4       V P                  4       '       d   \        P                  ! W4       R# \        P                  ! W4       R# )z”Replace *dest* with *src* wholesale so files retired upstream disappear and
file<->directory transitions cannot raise or leave stale content behind.N)r  rÖ   r  ÚcopytreeÚcopy2)r  r¿   s   &&r"   Ú_replace_entryr  y  s/   € ô �TÔØ
‡z�z‡|‚|Ü�Š˜Ö"ä�Š�SÖr$   c               ó    € V ^8„  d   QhRRRR/# )r   Úentriesz"list[tuple[Path, tuple[str, ...]]]r   zOptional[Path]r    )r!   s   "r"   r#   r#   ƒ  s   € ÷ ñ Ð!Cð Èñ r$   c                óÞ   € V  Ff  w  rV\         8X  d   Vu # V\         R,          8X  g   K(  V\         ^,          ,          P                  4       '       g   KR  V\         ^,          ,          u # 	  R# )z^Return the staged ``cron/jobs.json`` when the distribution owns it (via ``cron/`` or exactly).:Né   NN)r(   r€   )r  r  r
  s   &  r"   Ú_shipped_cron_storer!  ƒ  sU   € ã!‰ˆØœÔ'ØŠJØœ¨Õ+Ö+°´ÀqÕ7IÕ1I×0RÑ0R×0TÔ0TØœ¨Õ+Õ+Ò+ñ	 "ñ
 r$   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r  r   Úhomer   r    r    )r!   s   "r"   r#   r#   �  s&   € ÷ Zñ Z˜4ð Z tð Z°ñ Zr$   c                ó4  € ^ RI Hp ^ RIHp VP                  ! \         p \        P                  ! RR7      ;_uu_ 4       p\        V4      R,          pVP                  4        \        P                  ! WR,          4       VP                  V4      ;_uu_ 4        VP                  4        Uu/ uF>  p\        V\        4      '       g   K  VP!                  R4      '       g   K4  VR,          VbK@  	  ppRRR4       RRR4       VP                  V4      ;_uu_ 4        V! XR	R
7       RRR4       R# u upi   + '       g   i     LK; i  + '       g   i     LV; i  + '       g   i     R# ; i  \"        \$        3 d   p	\'        RT RT	 24      T	hRp	?	ii ; i)zóMerge a distribution's cron store into profile *home* by job id; new jobs arrive paused.

Nothing is written when a shipped job cannot be scheduled (unparseable schedule, past
one-shot for a job the installer resumed); the error names the job.)Újobs)Úimport_job_definitionsÚhermes_dist_cron_©Úprefixr   ú	jobs.jsonÚidNz>Installed from a profile distribution; review it, then resume.)Úpaused_reasonzCould not merge cron jobs into r   )r   r%  Úcron.job_definitionr&  rð   r(   ÚtempfileÚTemporaryDirectoryr   Úmkdirr  r  Úuse_cron_storeÚ	load_jobsrH   r5   r;   ÚRuntimeErrorr›   r,   )
r  r#  Ú	cron_jobsr&  r¿   ÚtmpÚstaged_storeÚjobÚshippedr†   s
   &&        r"   Ú_merge_cron_storer9  �  sJ  € õ
 'Ý:à�=Š=œ/Ð*€DðZÜ×(Ò(Ð0C×DÕDÈÜ ›9 vÕ-ˆLØ×ÑÔ Ü�LŠL˜¨[Õ8Ô9Ø×)Ñ)¨#×.Õ.à.7×.AÑ.AÔ.CóÙ.C sÜ! #¤t×,ô #Ø14·±¸·ô #�C˜•I˜s’NÑ.Cð ð ÷ /÷	 Eð ×%Ñ% d×+Õ+Ù"ØÐ'gõi÷ ,Ñ+ùò	÷ /×.ú÷	 E×Dú÷ ,×+Ð+ûô œ*Ð%ô Zô  Ð"AÀ$ÀÀrÈ#ÈÐ OÓPÐVYÐYûðZús„   ¡E/ Á AEÂD5	Â,D0Ã	D0Ã"D0Ã0D5	Ã2EÃ:!E/ ÄEÄ&E/ Ä0D5	Ä5EÅ EÅE	ÅE/ ÅE,	Å&E/ Å,E/ Å/FÆ FÆFc               ó$   € V ^8„  d   QhRRRRRR/# )r   Úbaser   r   r   r   r    )r!   s   "r"   r#   r#   ©  s!   € ÷ ñ �Dð  ð °Tñ r$   c                óÔ   € T pV F_  pW#,          p\        V4       VP                  4       '       d"   VP                  4       '       g   \        V4       VP	                  RR7       Ka  	  V# )av  Return ``base/parts`` as a chain of real directories.

A user could have swapped an ancestor for a file; writing through it is impossible,
so a file is replaced by a real directory. A symlinked ancestor is refused rather
than silently unlinked: it is deliberate user configuration (a shared skills dir,
say) and writing through it would land the payload outside the profile.T)Úexist_ok)Ú_refuse_symlinkr  rÖ   r  r0  )r;  r   r  Úparts   &&  r"   Ú	_real_dirr@  ©  sT   € ð €DÛˆØ�{ˆÜ˜ÔØ�;‰;�=Š= §¡§¢Ü˜TÔ"Ø�
‰
˜Dˆ
Ö!ñ ð €Kr$   c               ó    € V ^8„  d   QhRRRR/# r  r    )r!   s   "r"   r#   r#   º  s   € ÷ 
ñ 
˜$ð 
 4ñ 
r$   c                óN   € V P                  4       '       d   \        V  R 24      hR# )uj    is a symlink; refusing to replace it â€” remove the link (or replace it with a real directory) and re-runN)râ   r,   r  s   &r"   r>  r>  º  s0   € Ø‡�×ÒÜØˆfð ?ð ?ó
ð 	
ñ r$   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r  r   rå   r   r   r   r    )r!   s   "r"   r#   r#   Â  s!   € ÷ ñ ˜ð  ?ð °tñ r$   c           	     ó  € V P                  4       '       g   R# V^ ,          R8X  d„   \        ;QJ dF    R V .V P                  R\        V4      ^,
           O 4       F  '       g   K   R'       * # 	  R'       * # ! R V .V P                  R\        V4      ^,
           O 4       4      '       * # \        ;QJ d4    R V P	                  4        4       F  '       g   K   R'       * # 	  R'       * # ! R V P	                  4        4       4      '       * # )aG  A container of roots, not a root itself. Under ``skills/`` that is a dir with no
SKILL.md in it or above it (a category, whatever metadata it ships: DESCRIPTION.md,
README.md, LICENSE; a dir inside a skill, like its ``scripts/``, belongs to that skill);
elsewhere, a dir holding no files other than DESCRIPTION.md and dotfiles.Fr   c              3  óN   "  € T F  qR ,          P                  4       x € K  	  R# 5i)zSKILL.mdN)r€   r  s   & r"   ru   Ú _is_container.<locals>.<genexpr>Ê  s    é € ÐaÑ;`°a˜J�×/Ñ/×1Ð1Ó;`ùs   ‚#%NTc              3  ó¾   "  € T FS  qP                  4       ;'       d8    VP                  R 8g  ;'       d!    VP                  P                  R4      '       * x € KU  	  R# 5i)zDESCRIPTION.mdr&   N)r€   r?   r)   r  s   & r"   ru   rF  Ë  sH   é € ð Ù[iÐVW�	‰	‹×QÐQ˜Ÿ™Ð"2Ñ2×QÐQ¸1¿6¹6×;LÑ;LÈSÓ;QÔ7QÔQÓ[iùs   ‚A�A´)A)rÖ   ÚanyÚparentsr'   r  )r  rå   s   &&r"   Ú_is_containerrJ  Â  sî   € ð
 �;‰;�=Š=ÙØ
ˆ1…v�Ôß“3Ña¸DÐ;`À4Ç<Á<ÐP^ÔRUÐVYÓRZÐ]^ÕR^ÐC_Ñ;`Óa—3”3ÔaÐa’3ÔaÐa�3Ña¸DÐ;`À4Ç<Á<ÐP^ÔRUÐVYÓRZÐ]^ÕR^ÐC_Ñ;`ÓaÓaÔaÐaß‹sñ Ø[_×[gÑ[gÔ[ió�sŒsô ð Šsô ð ˆsñ Ø[_×[gÑ[gÔ[ióó ô ð 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#   Ð  s(   € ÷ 5ñ 5�Dð 5 ð 5¨?ð 5¸tñ 5r$   c                ó6  € V P                  4        F„  p. VOVP                  N5p\        V4      '       d   K'  V\        8X  d   K4  \	        W44      '       d$   \        V\        WP                  34      V4       Kh  \        W1VP                  ,          4       K†  	  R# )zHMerge authored roots while leaving runtime-owned nested state untouched.N)r  r?   r*   r(   Ú_merges_per_rootÚ
_merge_dirr@  r  ©r  r¿   rå   Úchildr   s   &&&  r"   rO  rO  Ð  sq   € à—‘–ˆØ"�#Ð"�u—z‘zÑ"ˆÜ# E×*Ò*ÙØ”OÔ#ÙÜ˜E×)Ò)Ü�uœi¨¯z©z¨mÓ<¸eÖDä˜5¨¯©Õ"3Ö4ó r$   c               ó(   € V ^8„  d   QhRRRRRRRR/# rL  r    )r!   s   "r"   r#   r#   Þ  s/   € ÷ 	Iñ 	I dð 	I°$ð 	I¸_ð 	IÐQUñ 	Ir$   c                óJ  € V P                  4        FŽ  p. VOVP                  N5p\        V4      '       d   K'  \        W44      '       d;   \	        WP                  ,          4       \        W1VP                  ,          V4       Kr  \        WP                  ,          V4       K�  	  R # r:   )r  r?   r*   rN  r>  Ú_refuse_symlinked_containersÚ"_refuse_store_ancestor_replacementrP  s   &&&  r"   rT  rT  Þ  sq   € Ø—‘–ˆØ"�#Ð"�u—z‘zÑ"ˆÜ# E×*Ò*ÙÜ˜E×)Ò)Ü˜D§:¡:Õ-Ô.Ü(¨°u·z±zÕ0AÀ5ÖIä.¨t·j±jÕ/@À%ÖHó r$   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r¿   r   r
  r   r   r    r    )r!   s   "r"   r#   r#   ê  s"   € ÷ 	
ñ 	
¨Tð 	
¸oð 	
ÐRVñ 	
r$   c                óÈ   € \        V4      '       dQ   V P                  4       '       d9   V P                  4       '       g!   \        V  RRP	                  V4       R24      hR# R# R# )aQ  A payload file where the profile has a directory that holds credential stores
(``platforms`` shipped as a file over ``platforms/``) would be a whole-directory replace,
taking ``platforms/pairing`` with it. Refused before the first write. Only called for entries
``_merges_per_root`` rejected, so a store ancestor reaching here is a file.zV is a directory that holds credential stores, and the distribution ships a file named rg   z; refusing to replace itN)r   rÖ   râ   r,   r¯   )r¿   r
  s   &&r"   rU  rU  ê  sc   € ô
 +¨9×5Ò5¸$¿+¹+¿-º-ÐPT×P_ÑP_×PaÒPaÜØˆfð ØŸ(™( 9Ó-Ð.Ð.FðHó
ð 	
ñ Qb¹-Ñ5r$   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r  r   r
  r   r   r   r    )r!   s   "r"   r#   r#   ö  s&   € ÷ 	Pñ 	P˜$ð 	P¨?ð 	P¸tñ 	Pr$   c                óš   € V P                  4       ;'       d5    \        V4      ^8H  ;'       g    \        W4      ;'       g    \        V4      # )a4  An owned top-level dir, or an owned container (``skills/research/``, see
``_is_container``), is merged per authored root instead of replaced whole, so skills the installer
added to it (``hermes skills install`` and agent-created skills land in
``skills/<category>/``) survive. The pre-write symlink guard and the copy loop both
use this, so the guard covers exactly what the copy merges. An ancestor of a credential
store (``platforms`` of ``platforms/pairing``) is merged too, so replacing it whole can
neither delete the installer's store nor plant the author's.)rÖ   r'   rJ  r   )r  r
  s   &&r"   rN  rN  ö  sQ   € ð �:‰:‹<÷ Pð PœS ›^¨qÑ0÷ Oð O´MÀ#Ó4Q÷ Oð OÜ CÀIÓ NðPr$   c               ó    € V ^8„  d   QhRRRR/# ©r   r¨   r   r   r    r    )r!   s   "r"   r#   r#     s   € ÷ Pñ P dð P¸ñ Pr$   c                ó4  € V F‘  w  r#VP                  4       '       d   \        V4      M\        V4      ^,
          pT pVRV  F  pWV,          p\        V4       K  	  \        W#4      '       d   \	        W%V4       Kx  \        WSR,          ,          V4       K“  	  R# )zëRefuse before the first write. The per-entry check in ``_real_dir`` fires mid-loop,
after earlier entries were already replaced and before the manifest is rewritten,
leaving a half-updated profile that fails identically on every retry.Néÿÿÿÿ)rÖ   r'   r>  rN  rT  rU  )r¨   r  r  r
  Údepthr  r?  s   &&     r"   Ú_refuse_symlinked_targetsr_    s}   € ó "‰ˆð #&§*¡*§,¢,”�I”´C¸	³NÀQÕ4FˆØˆØ˜f˜uÓ%ˆDØ•;ˆDÜ˜DÖ!ñ &ô ˜C×+Ò+Ü(¨°IÖ>ä.¨tÀµmÕ/CÀYÖOó "r$   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r   rÙ   r   r¨   r‰   rY   Úpreserve_configr   r   r    r    )r!   s   "r"   r#   r#     s2   € ÷ *%ñ *%˜tð *%¨Tð *%Ð=Qð *%Ðdhð *%Ðmqñ *%r$   c           
     ó0  € VP                  RRR7       \        \        W4      4      p\        W4       \	        V4      pVe   \        V\        RR 4       \        WQ4       V FË  w  rgV\        8X  d   K  \        V4      ^8X  d[   V^ ,          pV\        8X  d   \        Wa\        ,          4       KN  VR8X  d(   V'       d    VR,          P                  4       '       d   K|  \        Wg4      '       d   \        V\        W4      V4       K¥  \        V\        WRR 4      VR,          ,          4       KÍ  	  VP                  '       dI   V\        ,          P                  4       '       g(   V\        ,          P!                  \#        V4      RR7       \%        W4       R# )a$  Copy distribution-owned files (see ``_owned_entries``) from *staged* into *target*.

User-owned paths are never touched. ``config.yaml`` is replaced only when
``preserve_config`` is False (fresh install / ``--force-config``). ``.env.template`` lands
as ``.env.EXAMPLE`` so it never shadows a real ``.env``.

A top-level owned directory, and an owned container (``_is_container``), is merged per
authored root. ``cron/jobs.json`` is special: it is one multi-record runtime store, so
shipped definitions merge by job id instead of replacing the file.T©rI  r=  Nr   rÅ   r}   r]  )r0  ri   r  r_  r!  r@  r(   r9  r'   ÚENV_TEMPLATE_FILENAMEr  ÚENV_EXAMPLE_FILENAMEr  rN  rO  r`   Ú
write_textr´   r�   )	rÙ   r¨   r‰   ra  r  Ú
cron_storer  r
  r?   s	   &&&&     r"   Ú_copy_dist_payloadrh    sE  € ð ‡L�L˜¨€LÔ-Ü”> &Ó3Ó4€GÜ˜fÔ.ô % WÓ-€JØÒÜ�&œ/¨#¨2Ð.Ô/Ü˜*Ô-ã!‰ˆØœÔ'ÙÜˆy‹>˜QÔØ˜Q•<ˆDØÔ,Ô,ä˜sÔ-AÕ$AÔBÙØ�}Ô$¯¸fÀ}Õ>T×=\Ñ=\×=^Ò=^ÙÜ˜C×+Ò+Ü�sœI fÓ8¸)ÔDÙÜ�sœI f¸¸¨nÓ=À	È"ÅÕMÖNñ "ð" ××Ð fÔ/CÕ&C×%KÑ%K×%MÒ%MØ	Ô&Õ	&×2Ñ2Ô3NÈxÓ3XÐcjÐ2Ôkô �6Ö$r$   c               ó    € V ^8„  d   QhRRRR/# r[  r    )r!   s   "r"   r#   r#   A  s   € ÷ 8ñ 8 ð 8¨$ñ 8r$   c                óV   € ^ RI Hp V F  pW,          P                  RRR7       K  	  R# )zSCreate the bootstrap dirs a fresh profile expects (same set as ``create_profile``).)Ú_PROFILE_DIRSTrc  N)rú   rk  r0  )r¨   rk  Úds   &  r"   Ú_bootstrap_user_dirsrm  A  s$   € å1ÛˆØ	�×Ñ 4°$ÐÖ7ó r$   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r   rb   r7   r?   rC   Úforcer   Úcreate_aliasr   rè   r    )r!   s   "r"   r#   r#   H  s4   € ÷ ñ ØðØ$ðØ48ðØPTðàñr$   c           	     ó\  € ^ RI HpHp \        P                  ! RR7      ;_uu_ 4       p\        V \        V4      VR7      pVP                  '       d9   V'       g1   \        RVP                  P                   RVP                   R24      h\        VP                  4       \        VP                  VP                  VP                  RR	7       V'       d;   V! VP                  P                  4      f   V! VP                  P                  4       VuuR
R
R
4       #   + '       g   i     R
# ; i)z‡Install a distribution from *source* into a new profile; returns the resolved plan.
Use :func:`plan_install` first to preview + prompt.)Úcheck_alias_collisionÚcreate_wrapper_scriptÚhermes_dist_install_r(  ©ró   ú	Profile 'z' already exists at zP. Use `hermes profile update` to upgrade in place, or pass --force to overwrite.F©ra  N)rú   rr  rs  r.  r/  r   r   rë   r,   r‰   r?   rê   rm  rh  ré   )rb   r?   ro  rp  rr  rs  r5  Úplans   &&&&    r"   Úinstall_distributionry  H  s×   € ÷
 QÜ	×	$Ò	$Ð,B×	CÕ	CÀsÜ˜F¤D¨£I¸TÔBˆØ�=�=ˆ=§Ü#Ø˜DŸM™M×.Ñ.Ð/Ð/CÀDÇOÁOÐCTð Uað aóð ô 	˜TŸ_™_Ô-Ü˜4Ÿ?™?¨D¯O©O¸T¿]¹]Ð\aÕbßÑ1°$·-±-×2DÑ2DÓEÒMÙ! $§-¡-×"4Ñ"4Ô5Ø÷ 
D×	C×	CÓ	Cús   ¨1DÁB5DÄD+	c               ó    € V ^8„  d   QhRRRR/# )r   Úprofile_namer7   r   ztuple[str, Path]r    )r!   s   "r"   r#   r#   _  s   € ÷ 3ñ 3 Cð 3Ð,<ñ 3r$   c                óp   € ^ RI Hp  V! V 4      #   \         d   p\        \	        T4      4      ThRp?ii ; i)zOReturn ``(canonical_name, profile_dir)`` or raise if the profile doesn't exist.)Ú_existing_profile_dirN)rú   r}  rÌ   r,   r7   )r{  r}  r†   s   &  r"   Ú_existing_profiler~  _  s6   € å9ð3Ù$ \Ó2Ð2øÜô 3Ü¤ C£Ó)¨sÐ2ûð3ús   ˆ �5›0°5c               ó$   € V ^8„  d   QhRRRRRR/# )r   r{  r7   Úforce_configr   r   rè   r    )r!   s   "r"   r#   r#   i  s!   € ÷ ñ  cð ¸ð È+ñ r$   c           	     óð  € \        V 4      w  r#\        V4      pVf   \        RV R\         R24      hVP                  '       g   \        RV R24      h\
        P                  ! RR7      ;_uu_ 4       p\        VP                  \        V4      VR7      pV'       * Vn	        \        VP                  VP                  VP                  VP                  R	7       VuuRRR4       #   + '       g   i     R# ; i)
z¦Re-pull from the installed manifest's ``source:`` and apply: dist-owned files
overwritten, user data never touched, ``config.yaml`` preserved unless ``force_config``.Nrv  z' is not a distribution (no zG). Only profiles installed via `hermes profile install` can be updated.zd' has no recorded source.  Re-install with `hermes profile install <source> --name {canon} --force`.Úhermes_dist_update_r(  ru  rw  )r~  r‡   r,   rh   rb   r.  r/  r   r   rì   rh  ré   rê   r‰   )r{  r€  rÿ   r¨   Úexisting_manifestr5  rx  s   &&     r"   Úupdate_distributionr„  i  sç   € ô & lÓ3�M€EÜ% fÓ-ÐØÒ ÜØ˜�wÐ:Ô;LÐ:Mð NSð Só
ð 	
ð ×#×#Ð#ÜØ˜�wð Hð Hó
ð 	
ô 
×	$Ò	$Ð,A×	BÕ	BÀcÜÐ-×4Ñ4´d¸3³iÈuÔUˆØ$0Ô 0ˆÔÜ˜4Ÿ?™?¨D¯O©O¸T¿]¹]Ð\`×\qÑ\qÕrØ÷	 
C×	B×	BÓ	Bús   Á3A&C$Ã$C5	c               ó    € V ^8„  d   QhRRRR/# )r   r{  r7   r   rP   r    )r!   s   "r"   r#   r#     s   € ÷ :ñ :¨ð :°ñ :r$   c                ód   € \        \        V 4      ^,          4      pVf   / # VP                  4       # )zYReturn a structured view of a profile's distribution metadata ({} if not a distribution).)r‡   r~  rT   )r{  r‰   s   & r"   Údescribe_distributionr‡    s0   € äÔ.¨|Ó<¸QÕ?Ó@€HØÒ!ˆ2Ð9 x×'7Ñ'7Ó'9Ð9r$   >   r#  ÚcacheÚlocalÚplansÚbackupsÚmemoriesÚsessionsÚ	workspace)r   r*  )r@   r:   )NFF)F)[Ú__conditional_annotations__r1   Ú
__future__r   Úoperatorr  r—   r  Ú
subprocessr.  Údataclassesr   r   r   r   r   Úpathlibr   Útypingr	   r
   r   r   r   Úhermes_yamlr�   Úhermes_cli._subprocess_compatr   Úhermes_cli.archive_safer   rú   r   r   r   r�   r   rh   rd  re  r   rV   r   r   r(   r*   r„   r,   r<   r>   rY   r‡   r�   Úcompiler¢   ÚgeÚleÚeqÚneÚgtÚltr¥   rœ   r©   r´   r»   r¼   rÐ   rÝ   ræ   rè   rñ   r   r  r  r  r!  r9  r@  r>  rJ  rO  rT  rU  rN  r_  rh  rm  ry  r~  r„  r‡  )r�  s   @r"   Ú<module>r      s  øðôõ #ã Û 	Û 	Û Û Û ß (ß ,Ñ ,Ý ß 3Õ 3ã å @Ý ;÷ñ õ "ð (Ð Ø'Ð Ø%Ð ð (1°-ÀÈXÐW]Ð_pÐ&qÐ �OÓ qð !<¹iò Ió ?õ !Ð �Ió ð (€õQô;˜	ô ;÷)ð ÷ð ó ðð6 ÷.ð .ó ð.õb	6õð" —’Ð@ÓA€Ø�h—k‘k 4¨¯©°d¸H¿K¹KÈÈxÏ{É{Ð\_Ðai×alÑalÐnqÐs{×s~Ñs~Ð€õHõtõ,ð& —z’zÐ"DÓEÐ õõVõõ>	Yð ÷ð ó ðõ7÷õ<!õ0õ õõZõ8õ"
õõ5õ	Iõ	
õ	PõPõ$*%õZ8÷õ.3÷÷,:r$   