+
    „WÝj/  ã            
      óš   € R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RI	t	R R lt
RRR	R
RR
/R R lltR R ltRRRR
RR
RRRR/R R lltR# )zQPublish plugin code and its dependency selection through one recoverable handoff.)Úannotations)ÚCallable)ÚPath)ÚAnyNc               ó(   € V ^8„  d   QhRRRRRRRR/# )é   Úprojectr   ÚrowÚdictÚjournalÚreturnÚNone© )Úformats   "ÚRC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\plugins_transaction.pyÚ__annotate__r   
   s(   € ÷ 7ñ 7¨ð 7°4ð 7À$ð 7È4ñ 7ó    c                ó$   € ^ RI Hp V! WV4       R# )zERecover a shipped caller's row through the stdlib boot-journal owner.)Ú_recover_plugin_publicationN)Úhermes_cli.runtime_stater   )r   r	   r   r   s   &&& r   Úrecover_plugin_publicationr   
   s   € åDá ¨gÖ6r   Útarget_digestÚrequire_consentFÚassume_consentc               ó8   € V ^8„  d   QhRRRRRRRRRRR	R
RR
RR/# )r   Ústagedr   ÚtargetÚold_metadatar
   Únew_metadatar   z
str | Noner   Úboolr   r   r   r   )r   s   "r   r   r      sI   € ÷  ñ  ˜4ð  ¨ð  ¸Tð  ÐQUð  Ø%/ð ØIMð à#'ð à48ñ r   c               óˆ  € ^ RI Hp ^ RIHp ^ RIHp	 V'       d¼   V'       g´   ^ RIHp
 ^ RIH	p VP                  4       V! VR7      9   dŒ   V
P                  V
P                  V 4      W
P                  4       4      w  rÍV'       gS   VP                  4       '       d   RMRp^ R	IHp T
P#                  VP%                  V4      V! V4      ;'       g    R
R7      hT! RT! R\'        V P                  4       4      R\'        VP)                  4       4      RTRTRVe   TMVP                  4       '       d	   V	! V4      MR/4      R7       R# )a8  Publish *staged* into *target*. *assume_consent* is consent the caller
already holds (``--yes-deps``, or a memory-provider migration under
``security.allow_lazy_installs``): the active-replacement consent veto is
skipped, so an unattended install carries that decision instead of being
refused non-interactively.)Ú	sync_venv)ÚStagedUpdate©Útree_digest©Úplugins_cmd)Úenabled_plugin_dirs©Ú
installingzRReinstall declined: {}. The installed plugin and active environment are unchanged.z,Install declined: {}. Nothing was installed.)Útagged_failure_classÚother)Úfailure_classTr   r   r   r   r   N)ÚexplicitÚplugins)Ú	pm.clientr!   Úpm.plugin_inputsr"   Úpm.storer$   Ú
hermes_clir&   Úpm.workspacer'   ÚresolveÚ_install_plugin_python_depsÚ_read_manifest_for_installÚ_consoleÚexistsÚ.hermes_cli.observability.shared_metrics_fieldsr*   ÚPluginOperationErrorr   ÚstrÚabsolute)r   r   r   r   r   r   r   r!   r"   r$   r&   r'   Ú	consentedÚreasonÚoutcomer*   s   &&&&$$$         r   Úpublish_pluginr@      s  € õ $Ý-Ý$çŸ~Ý*Ý4à�>‰>ÓÑ2¸fÔEÔEØ +× GÑ GØ×6Ñ6°vÓ>À×H\ÑH\ÓH^ó!`ÑˆIçà$Ÿm™mŸošoñ pØ3að õ `à!×6Ñ6Ø—N‘N 6Ó*Ñ:NÈvÓ:V×:aÐ:aÐZað 7ó cð cñ �t¡\Ø”#�f—n‘nÓ&Ó'¨´3°v·±Ó7HÓ3IØ˜ n°lØ¨-Ò*C™Ðag×anÑan×apÒapÉ+ÐV\ÔJ]Ðvzð3ó &÷ r   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r   r   r   r   Úmanifestr
   Úinteractiver   r   r   r   )r   s   "r   r   r   4   s8   € ÷ $fñ $f¨4ð $f¸ð $fÈð $fÐ_cð $fÐhlñ $fr   c               óD  a aaa€ ^ RI Hp ^ RIHo ^ RIHp ^ RIHpHp S R,          P                  4       '       d¦   SR,          P                  4       '       d‰   SR,          P                  4       '       dE   \        ;QJ d!    VVV 3R lR 4       F  '       g   K   RM	  R	M! VVV 3R lR 4       4      '       d(   V! SRR
7      pV'       d   VP                  RV R24      hS P                  4       V! S R7      9  d   R# V! S 4      V! S4      uop	\        ;QJ d!    . V3R lV	P                   4       F  NK  	  5M! V3R lV	P                   4       4      p
V
'       g'   V	P                   '       d   SP                   '       d   R# V'       g<   TP                  RRP#                  V
4      ;'       g    R RS P$                   R24      hVP'                  VP)                  RS P$                  4      W¤P+                  4       4      w  r¸V'       g   VP                  RV R24      hR# )a3  Dependency changes carried by an update clear the same gates as an install.

New Python requirements install packages into the shared environment: install and
reinstall prompt for that, so an update prompts too, and an unattended one (dashboard,
``plugins.auto_apply`` from the gateway) is REFUSED rather than consented on the user's
behalf. Publication replaces the whole tree, so a Node sidecar the user accepted earlier is
rebuilt in the staged copy when its package.json/lock moved (custom pulls copy a stale
node_modules; catalog re-pins clone without one).
r%   )Ú_bytes)Úread_python_declaration)r'   Úinstall_node_sidecarÚnode_modulesúpackage.jsonc              3  ób   <"  € T F$  pS! SV,          4      S! SV,          4      8g  x € K&  	  R # 5i©Nr   )Ú.0ÚnamerE   r   r   s   & €€€r   Ú	<genexpr>Ú1_refresh_declared_dependencies.<locals>.<genexpr>E   s*   øé € ÐtÑNsÀd‘6˜& 4�-Ó(©F°6¸Dµ=Ó,AÖAÓNsùs   ƒ,/TF)r-   z*Node dependencies could not be refreshed: z<. The installed plugin and active environment are unchanged.r(   Nc              3  óL   <"  € T F  qSP                   9  g   K  Vx € K  	  R # 5irK   )Úinstall_requirements)rL   ÚspecÚbefores   & €r   rN   rO   N   s    øé € ÐiÑ#=˜4ÈV×MhÑMhÑAh—$’$Ó#=ùs   ƒ$š
$z-The update declares new Python dependencies (z, zin its pyproject.tomlz); run `hermes plugins update z` in a terminal to review them.rM   zUpdate declined: )rI   zpackage-lock.json)r2   r&   r   rE   Úpm.plugin_declarationsrF   r3   r'   rG   Úis_dirÚis_fileÚanyr:   r4   ÚtuplerQ   Úinstalls_packagesÚjoinrM   Ú_consent_python_depsÚgetr7   )r   r   rB   rC   ÚpcrF   r'   rG   r>   ÚafterÚaddedr=   rE   rS   s   ff&$        @@r   Ú_refresh_declared_dependenciesr`   4   sÁ  û€ õ -Ý/Ý>ßFà�Õ×'Ñ'×)Ò)¨v¸Õ/F×.OÑ.O×.QÒ.QØ˜.Õ(×0Ñ0×2Ò2ß‹sÖtÑNsÓt�s�sŠsÖtÑNsÓt×tÒtÙ% f°tÔ<ˆßØ×)Ñ)Ø<¸V¸Hð EMð MóNð Nð ‡~�~ÓÑ2¸fÔEÔEÙÙ+¨FÓ3Ñ5LÈVÓ5T€M€FˆEßŒEÔi 5×#=Ò#=Ói�E‰EÔi 5×#=Ò#=ÓiÓi€Eß˜%×1×1Ð1¸&×:R×:RÐ:RÙßØ×%Ñ%Ø;¸D¿I¹IÀeÓ<L×<gÐ<gÐPgÐ;hð i*Ø*0¯+©+¨Ð6UðWóXð 	Xð ×/Ñ/°·±¸VÀVÇ[Á[Ó0QÐSX×ZeÑZeÓZgÓhÑ€IßØ×%Ñ%Ø ˜xÐ'cÐdófð 	fñ r   Úcatalog_entryrC   ÚforceÚscan_decision_cbÚcarry_user_filesc               ó0   € V ^8„  d   QhRRRRRRRRRR	R
R/# )r   r   r   rC   r   rb   rc   zCallable[[Any], bool] | Nonerd   z"Callable[[Path], list[str]] | Noner   r;   r   )r   s   "r   r   r   [   sV   € ÷ {nñ {nØð{nð ð	{nð
 ð{nð 3ð{nð 9ð{nð 	ñ{nr   c               óh  € ^ RI p^ RIHp ^ RIHp ^ RIHp	 V P                  4       p VP                  4       p
\        V
P                  V P                  / 4      4      pVf7   VP                  R4      '       d    VP                  RV P                   R24      hV'       d   VP                  M#\        VP                  R4      ;'       g    R	4      pV'       d"   Vf=   V R
,          P                  4       '       g    VP                  RV P                   R24      hRpVEfY   ^ RIHpHp ^ RIHpHpHp V! V! V P                  VP.                  W4      4      pVP0                  '       d   VP                  VP0                  4      hVP                  R4      '       dß   V! V! VR,          4      4      pVP                  R4      ;'       g    / P                  RR	4      pVP2                  P5                  V4      '       d   VP7                  4       pM0VWÌP9                  R^4      ^ ,          39  d   VP                  R4      hVP                  R4      '       d&   VP;                  RVR,          /V P                  4       V! V P                  V 4       V	! V 4      pVP=                  RV P>                  R7      ;_uu_ 4       p\A        V4      R,          p V'       dà   VPC                  V4      w  ppVPE                  VVVPF                  4      pV'       d   VPI                  VV4      MTpRV 2pRVP                  RVPJ                  RVPL                  RVPF                  RV/pVPO                  VRVPQ                  VV4      R7       VPS                  R R4       VPS                  R!R4       ^ R"IH*p V! VVV4       Mó\V        PX                  ! V VR\V        PZ                  ! R#4      R$7       V'       dq   VP]                  4       pVP_                  VV R%R&R'R(7      p V P`                  Pc                  4       '       d   VP                  R)4      hVPe                  VVV4       R*V 2pM-VPg                  V4      w  p!pV!'       g   VP                  V4      hVPi                  VVP]                  4       4      pVe	   V! V4      MRp"VPk                  V4      p#\        V#P                  R4      ;'       g    V P                  4      p$Vf#   V$V P                  8w  d   VP                  R+4      h VPm                  V$V P>                  4      p%T%T 8w  d,   T%Pq                  4       '       d   TP                  R,T$ R-24      hTP;                  T#T$4       TPs                  TTT"Y4TRJR.7       TPu                  TTPw                  4       4       \y        T TT#TR/7       T	! T 4      T8w  d   TP                  R04      hTTR1&   T%T 8X  d   T	! T4      T8X  d   TuuRRR4       # \{        TT%T
/ T
CT$T/CT%T 8X  d   TMRR27       TuuRRR4       #   \n         d!   p&TP                  \        T&4      4      T&hRp&?&ii ; i  TP                   d    h \|         d(   p&TP                  RT P                   R3T& 24      T&hRp&?&ii ; i  + '       g   i     R# ; i)4a™  Prepare a catalog re-pin or custom Git pull without changing the live tree.

*interactive*: a terminal user is present to consent to newly declared dependencies;
the dashboard and the gateway's auto-apply pass False and get a refusal instead.
Every update is scanned: *force* accepts a caution verdict (the user already saw it), and
*scan_decision_cb(result)* may accept one by asking; a dangerous verdict always blocks.
*carry_user_files(staged)* may merge user-owned state into the staged tree before
manifest validation, example-file generation, dependency preparation and publication; it
returns the carried paths so a scan block can attribute findings to them.Nr%   )Úrefuse_if_installed_removedr#   ÚpinnedzPlugin 'z;' is pinned; reinstall with an explicit --ref to change it.ÚsourceÚ z.gitz7' has no owned Git checkout; reinstall from its source.)Ú
ProvenanceÚProvenanceClass)Úcheck_local_provenanceÚdefault_fetchÚparse_feed_ymlÚ
update_urlÚ	artifactsÚgitÚ#z<Update feed must select a commit or the recorded Git source.Ú
min_hermesÚrequires_hermesz.update-)ÚprefixÚdirÚpluginzUpdated to catalog pin rM   ÚrepoÚtierÚpinÚshaT)Úcatalogrh   ri   Úcatalog_nameÚcatalog_tier)Úwrite_catalog_sidecar_recordÚ__pycache__)ÚsymlinksÚignoreÚstatusz--porcelainz Could not inspect plugin edits: )Úfailure_prefixz@Pinned feed update has local changes; save them before updating.zUpdated to feed commit zGThe updated plugin changed its installed name; reinstall it explicitly.z&The updated plugin renamed itself to 'z"', but that plugin already exists.)rb   rc   Úreviewed_pin)rC   z7Plugin files changed while preparing the update; retry.Úrevision)r   z' update was not published: )?Útempfiler2   r&   Úhermes_cli.plugins_cmd_catalogrg   r1   r$   r4   Ú_read_install_metadatar
   r\   rM   r:   Úinstall_identifierr;   rU   Úhermes_cli.plugins_provenancerk   rl   Úhermes_cli.plugins_updatesrm   rn   ro   ÚGITÚneeds_fixingÚ_EXACT_COMMIT_REÚ	fullmatchÚlowerÚsplitÚ_check_manifest_versionÚTemporaryDirectoryÚparentr   Ú_resolve_git_urlÚ_clone_plugin_repor|   Ú_resolve_subdir_withinry   rz   ÚupdateÚ_canonical_sourceÚpopr€   ÚshutilÚcopytreeÚignore_patternsÚ_resolve_git_executableÚ_git_or_raiseÚstdoutÚstripÚ_checkout_exact_revisionÚ_git_pull_plugin_dirÚ_git_head_revisionr6   Ú_sanitize_plugin_nameÚ
ValueErrorr8   Ú_scan_merged_treeÚ_copy_example_filesr7   r`   r@   Ú	Exception)'r   ra   rC   rb   rc   rd   rˆ   r]   rg   r$   ÚmetadataÚrecordri   Úfeed_revisionrk   rl   rm   rn   ro   ÚcheckedÚfeedÚproposedrS   Ú	directoryr   Úgit_urlÚsubdirr‡   ÚoutputÚcatalog_recordr€   rr   r„   ÚokÚmergedrB   Úinstalled_nameÚ
new_targetÚexcs'   &$$$$$                                 r   Úupdate_pluginr¼   [   s  € ó$ å,ÝJÝ$à�^‰^Ó€FØ×(Ñ(Ó*€HÜ�(—,‘,˜vŸ{™{¨BÓ/Ó0€FØÒ §¡¨H×!5Ò!5Ø×%Ñ%¨°·±°Ð=xÐ&yÓzÐzß1>ˆ]×-Ò-ÄCÈÏ
É
ÐS[ÓH\×HbÐHbÐ`bÓDc€Fß�mÒ+°V¸fµ_×4LÑ4L×4NÒ4NØ×%Ñ%¨°·±°Ð=tÐ&uÓvÐvØ€MØÓßMßdÑdá(©°F·K±KÀ×ATÑATÐV\Ó)eÓfˆØ××ÐØ×)Ñ)¨'×*>Ñ*>Ó?Ð?Ø�:‰:�l×#Ò#Ù!¡-°°|Õ0DÓ"EÓFˆDØŸ™ Ó-×3Ð3°×8Ñ8¸ÀÓCˆHØ×"Ñ"×,Ñ,¨X×6Ò6Ø (§¡Ó 0‘Ø &¯,©,°s¸AÓ*>¸qÕ*AÐ!BÔBØ×-Ñ-Ð.lÓmÐmØ�x‰x˜×%Ò%Ø×*Ñ*Ð,=¸tÀLÕ?QÐ+RÐTZ×T_ÑT_Ô`Ù §¡¨VÔ4Ù˜Ó €FØ	×	$Ñ	$¨J¸F¿M¹MÐ	$×	JÔ	JÈiÜ�i“ 8Õ+ˆðF	nßØ"$×"5Ñ"5°fÓ"=‘�˜Ø×0Ñ0°¸À-×BSÑBSÓT�ßFL˜×2Ñ2°6¸6ÔBÐRX�Ø2°8°*Ð=�à˜M×.Ñ.Ø˜M×.Ñ.Ø˜M×.Ñ.Ø˜=×,Ñ,Ø˜8ð"�ð —‘Ø*ØØ×/Ñ/°¸Ó@ð ô ð
 —
‘
˜>¨4Ô0Ø—
‘
˜>¨4Ô0ÝWÙ,¨V°^ÀXÕNô —’ ¨¸Äf×F\ÒF\Ð]jÓFkÕlß Ø×4Ñ4Ó6�CØ×-Ñ-¨c°6¸8À]ð  dFÐ-ó  G�FØ—}‘}×*Ñ*×,Ò,Ø ×5Ñ5Ð6xÓyÐyØ×/Ñ/°¸¸]ÔKØ6°}°oÐF‘Fà!#×!8Ñ!8¸Ó!@‘J�B˜ßØ ×5Ñ5°fÓ=Ð=Ø×0Ñ0°¸×9SÑ9SÓ9UÓV�Ø1AÒ1MÑ% fÔ-ÐSWˆFØ×4Ñ4°VÓ<ˆHÜ  §¡¨fÓ!5×!DÐ!D¸¿¹ÓEˆNØÒ$¨¸6¿;¹;Ô)FØ×-Ñ-Ð.wÓxÐxðAØ×5Ñ5°nÀfÇmÁmÓT�
ð ˜VÔ#¨
×(9Ñ(9×(;Ò(;Ø×-Ñ-Ø<¸^Ð<LÐLnÐoóqð qà×&Ñ& x°Ô@Ø× Ñ  ¨°¸uØ.;À4Ð.Gð !ô Ià×"Ñ" 6¨2¯;©;«=Ô9Ü*¨6°6¸8ÐQ\Õ]Ù˜6Ó" fÔ,Ø×-Ñ-Ð.gÓhÐhØ!)ˆF�:ÑØ˜VÔ#©°FÓ(;¸vÔ(EØ÷y 
KÒ	Jôz ØØØØ4�8Ð4˜^¨VÑ4Ø(2°fÔ(<™fÀ$õð ÷I 
KÒ	Jøô\ ô AØ×-Ñ-¬c°#«hÓ7¸SÐ@ûðAûð. ×&Ñ&ô 	ØÜô 	nØ×)Ñ)¨H°V·[±[°MÐA]Ð^aÐ]bÐ*cÓdÐjmÐmûð	nú÷O 
K×	JÐ	Jús„   Ê5Z Ë	A YÌ
CYÏ&AYÐ,AYÑ2A,YÓ7YÔX,Ô3YÕB&YØ YØ,YØ7YÙYÙYÙZÙ5ZÙ6"ZÚZÚZ Ú Z1	)Ú__doc__Ú
__future__r   Úcollections.abcr   Úpathlibr   Útypingr   r�   r   r@   r`   r¼   r   r   r   Ú<module>rÂ      sŒ   ðÙ WÝ "å $Ý Ý Û õ7ð Ø26ð ØPUð à*/÷ õF$fðN{nð ð{nð ð	{nð
 ð{nð 6:ð{nð <@÷{nñ {nr   