+
    jHàj´S  ã                   ó2  € R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt ]P                  ! ]4      tRt]! 4       tR tR t ! R	 R
]4      tRR ltRtR tR tRtRtRtR tR tR t R t!R t"R t#R t$R t%R t&R t'R!R lt(R t)R t*R!R lt+R# )"zOBorrow frozen config credentials from the existing profile source, not a vault.N)Úasdict)ÚPath)Úfingerprint_secret_value)ÚRuntimeStoreErrorzprofile-config-v1:c                ó  € T pV Fƒ  p\        V\        4      '       d?   \        V4      \        J d,   ^ Tu;8:  d   \	        V4      8  g    \
        u #  \
        u # M$\        V\        4      '       d   W29  d	   \
        u # W#,          pK…  	  V# )zVThe value *root* defines at *path*, else ``_ABSENT`` when the key is simply not there.)Ú
isinstanceÚlistÚtypeÚintÚlenÚ_ABSENTÚdict)ÚrootÚpathÚvalueÚkeys   &&  ÚG/home/ubuntu/.hermes/hermes-agent/gateway/session_policy_credentials.pyÚ_definedr      ss   € à€EÛˆÜ�eœT×"Ò"¤t¨C£y´CÓ'7Ø˜Ö(œc %›jÕ(Ü’ð )Ü’ð )ä˜E¤4×(Ò(¨CÔ,<ÜŠNØ•
Šñ ð €Ló    c                óø  € ^ RI HpHp \        P                  ! V P
                  4      p\        VP                  R4      \        4      '       d   VP                  R4      M/ pV Uu0 uF  pRV3kK	  	  pp\        VP                  R4      \        4      '       d"   VP                  \        VR,          4      4       \        VP                  R4      ;'       g    R4      pVP                  4       P                  4       R8X  d   V! VP                  R4      V4      pMV! Ws4      pV'       d   \        W84      M\         p	\        V	\        4      '       d    Yi U
u0 uF  q¨V
3,           kK  	  up
,          pV# u upi u up
i )z÷Secret paths the session's own route authenticates with: its ``model:`` block, a direct alias's
key (``api_key_from``) and the one ``providers:`` / ``custom_providers:`` entry the runtime's own
named-provider selection routes its provider through.©Ú#custom_provider_config_path_for_urlÚ!named_custom_provider_config_pathÚmodelÚapi_key_fromÚproviderÚ ÚcustomÚbase_url)Ú"hermes_cli.runtime_provider_customr   r   ÚjsonÚloadsÚconfig_jsonr   Úgetr   r   ÚaddÚtupleÚstrÚstripÚlowerr   r   )Úpolicyr   r   Úconfigr   r   Úpathsr   ÚselectedÚentryÚfields   &          r   Ú_route_pathsr/      s"  € ÷Wä�ZŠZ˜×*Ñ*Ó+€FÜ#-¨f¯j©j¸Ó.AÄ4×#HÒ#HˆF�J‰J�wÔÈb€EÙ',Ó-¡u ˆg�s‹^¡u€EÐ-Ü�%—)‘)˜NÓ+¬T×2Ò2Ø�	‰	”%˜˜nÕ-Ó.Ô/Ü�5—9‘9˜ZÓ(×.Ð.¨BÓ/€HØ‡~�~Ó×ÑÓ 8Ô+á6°u·y±yÀÓ7LÈfÓU‰á4°XÓFˆß*2ŒH�VÔ&¼€EÜ�%œ×ÒØ°5Ó9±5¨%˜e˜X×%Ð%±5Ñ9Õ9ˆØ€Lùò .ùò :s   Á%E2ÅE7c                   ó"   € ] tR t^5tRtRtRtRtR# )ÚRecoveredSecretsz½The frozen secrets still valid, plus ``dropped``: the paths whose value changed or was removed
in config.yaml since the session started (never supplied; the policy disables what used them).N© )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚdroppedÚsessionÚ__static_attributes__r2   r   r   r1   r1   5   s   † ñfà€GØ„Gr   r1   c                 óÂ  € \        V 4      pVP                  R 4       VP                  R4       VP                  R4      f   VP                  RR4       VP                  R4      '       g   VP                  RR4       R
 F*  pVP                  V4      e   K  VP                  VR4       K,  	  VP                  R4      '       g   VP                  RR4       VP                  RR4      R8X  d   VP                  RR4       V F  pVP                  VR4       K  	  \        P                  ! \
        P                  ! VRR	7      P                  4       4      P                  4       # )Úcredential_refÚconfig_secret_refÚeditor_mcp_jsonNÚcoding_postureÚclient_env_remoteÚedit_approval_policyÚaskT©Ú	sort_keys)Úclient_env_jsonÚclient_env_rules_json)	r   Úpopr#   ÚhashlibÚsha256r    ÚdumpsÚencodeÚ	hexdigest)r)   ÚunhashedÚdataÚnames   &&  r   Úpolicy_identityrP   <   s  € Ü�&‹>€DØ‡H�HÐÔØ‡H�HÐ Ô!à‡x�xÐ!Ó"Ò*Ø�‰Ð" DÔ)Ø�8‰8Ð$×%Ò%Ø�‰Ð! 4Ô(Û<ˆØ�8‰8�D‹>Ô!Ø�H‰H�T˜4Ö ñ =ð �8‰8Ð'×(Ò(Ø�‰Ð$ dÔ+Ø‡x�xÐ&¨Ó.°%Ô7Ø�‰Ð'¨Ô.ÛˆØ�‰��tÖñ ä�>Š>œ$Ÿ*š* T°TÔ:×AÑAÓCÓD×NÑNÓPÐPr   c           	     ó  € ^ RI Hp \         UUu. uF  w  r#\        W4      V8X  g   K  VNK  	  ppp\	        \        V4      ^,           4       UUu0 uF  qQ! WE4       F  p\        W4      kK  	  K  	  upp# u uppi u uppi )z¸Every whole-policy hash a gateway older than ``bound`` could have stamped for *policy*: the
current hash, plus each subset of the later fields dropped while they are at their defaults.)Úcombinations)Ú	itertoolsrR   Ú_LATER_POLICY_FIELDSÚgetattrÚranger   rP   )r)   rR   rO   ÚdefaultÚunsetÚsizer8   s   &      r   Ú_legacy_identitiesrZ   [   s€   € õ 'Ý';Ô`Ñ';‘m�d¼wÀvÓ?TÐX_Ñ?_�TˆTÑ';€EÑ`äœc %›j¨1�nÔ-ôXÙ-�¸\È%Ö=V°'ô ˜FÖ,Ù=Vñ -Ù-òXð Xùó aùóXs   �A6©A6Á"A<c                 ó|   € \        \        V \        4      '       d   V 4      # \        P                  ! V R R7      4      # )TrC   )r   r   r&   r    rJ   )r   s   &r   Ú_fingerprintr\   d   s.   € Ü#¬Z¸¼s×-CÒ-C EÓkÐkÌÏÊÐTYÐeiÔIjÓkÐkr   c                ój  € V^ ,          \        VR,          4      r2\        V P                  R4      \        4      '       d   V P                  R4      M/ p\        VP                  R4      \        4      '       d#   \        VR,          4      \        V4      8X  d   R
# VR8X  d-   VR,          R8X  d   \        V4      ^8”  d   RRV^,          3# R
# VR8X  d   \        V4      ^8”  d   RV^ ,          3# VR9   dU   \        V P                  V4      \        4      '       d-   V'       d%   \        V^ ,          4      \        J d   W#^ ,          3# V3# VR8X  dc   \        V4      ^8”  dS   V^ ,          pV^,          R8X  d8   \        V4      ^8”  d(   \        V^,          4      \        J d   RVRV^,          3# RV3# R	# )a‹  The config path of the ROUTE block a secret at *path* rides with, else None. Every route shape a
consumer reads: ``model:`` and its aliases (``model.aliases.<n>``, ``model_aliases.<n>``), both
fallback sections in dictionary (one route) and list form, and each ``auxiliary.<task>`` route with
its ``fallback_chain`` entries. A secret nested deeper in a route (headers, extra_body) rides with it.ºé   NNr   r   :Nr_   NÚaliasesÚmodel_aliasesÚ	auxiliaryÚfallback_chainN)r   )r`   )Úfallback_modelÚfallback_providers)r%   r   r#   r   r   r   r	   r
   )r*   r   ÚheadÚrestr   Útasks   &&    r   Ú_route_ownerri   s   sm  € ð
 �a•œ%  R¥›/ˆ$Ü#-¨f¯j©j¸Ó.AÄ4×#HÒ#HˆF�J‰J�wÔÈb€EÜ�%—)‘)˜NÓ+¬T×2Ò2´u¸UÀ>Õ=RÓ7SÔW\Ð]aÓWbÔ7bð ÐØˆw„Ø��8�|Ô#¬¨D«	°A¬Ø˜Y¨¨Q­Ð0Ð0ØÐØˆÔ¤3 t£9¨q¤=Ø  a¥Ð)Ð)ØÐ7Ô7Ü�f—j‘j Ó&¬×-Ò-·$¼4ÀÀQÅ»=ÌCÓ;OØ˜q�'�?Ð"ØˆwˆØˆ{Ôœs 4›y¨1œ}Ø�A�wˆØ��7Ð&Ô&¬3¨t«9°q¬=¼TÀ$ÀqÅ'»]ÌcÓ=QØ Ð'7¸¸a½ÐAÐAØ˜TÐ"Ð"Ùr   c                óˆ   € \        W4      pVe   V# V^ ,          \        9   d   \        VR,          4      # \        VRR 4      # )z°The config path of the block whose endpoint the secret at *path* authenticates: a route block
(_route_owner) or a provider entry as a whole, else the secret's own parent block.NºNé   Néÿÿÿÿ)ri   Ú_ENTRY_SECTIONSr%   )r*   r   Úroutes   && r   Ú_owner_blockrp   �   sD   € ô ˜Ó&€EØÒØˆØˆA…w”/Ô!Ü�T˜"•X‹ÐÜ��c�r�ÓÐr   c                óØ  € ^ RI Hp V ^ ,          R8X  dÇ   \        VP                  R4      ;'       g    R4      P	                  4       P                  4       pV\        9   d|   \        VP                  R4      ;'       g    R4      P	                  4       '       gD   \        VP                  R4      \        4      '       d   VP                  R4      M/ pR.V! WR4      O# \        V! W4      4      # )zN``(provider_identity, url)`` the route *block* at *owner* is actually sent to.)Úresolved_routerb   r   r   r   r   Úmain)
Úgateway.session_route_identityrr   r&   r#   r'   r(   Ú_AUX_FOLLOWS_MAINr   r   r   )ÚownerÚblockr*   rr   r   rs   s   &&&   r   Ú	_resolvedrx   ›   s´   € å=ØˆQ…x�;ÔÜ�u—y‘y Ó,×2Ð2°Ó3×9Ñ9Ó;×AÑAÓCˆØÔ(Ô(´°U·Y±Y¸zÓ5J×5PÐ5PÈbÓ1Q×1WÑ1W×1YÒ1YÜ*4°V·Z±ZÀÓ5HÌ$×*OÒ*O�6—:‘:˜gÔ&ÐUWˆDØÐ:™^¨DÓ9Ð:Ð:Ü‘˜uÓ-Ó.Ð.r   c                 ó`   € ^ RI Hp T! \        T ;'       g    R4      P                  4       4      # )é    )Únormalize_route_base_urlr   )Úhermes_cli.route_identityr{   r&   r'   )r   r{   s   & r   Ú_urlr}   «   s$   € ÝBÙ#¤C¨¯¨°Ó$4×$:Ñ$:Ó$<Ó=Ð=r   c                ó\  € V'       d   V^ ,          e   \        W4      MRpV'       d   \        W4      M\        p\        V\        4      '       d&   \
         Uu/ uF  qDV9   g   K  WCV,          bK  	  upM/ p\        V\        4      '       dA   \        W4      e4   \        W#V 4      VR&   \        VR,          R,          4      VR,          R&   MB\        V\        4      '       d-   V^ ,          \        9   d   ^ RI
Hp \        V! V4      4      VR&   \         F=  p\        VP                  V4      \        4      '       g   K*  \        WW,          4      WW&   K?  	  \        P                   ! \"        P$                  ! \'        V4      V.RR7      P)                  4       4      P+                  4       # u upi )z›Digest of the endpoint the secret at *path* authenticates in the frozen *config* (a terminal-scope
secret, ``path[0] is None``, authenticates no endpoint).NÚresolved)Ú
_entry_urlTrC   rm   )rp   r   r   r   r   Ú_ENDPOINT_KEYSri   rx   r}   rn   r   r€   Ú	_URL_KEYSr#   r&   rH   rI   r    rJ   r   rK   rL   )r*   r   rv   rw   ÚkÚendpointr€   r   s   &&      r   Ú_bindingr…   °   s:  € ÷ +/°4¸µ7Ò3FŒL˜Ô&ÈD€Eß',ŒH�VÔ#´'€EÜFPÐQVÔX\×F]ÒF]¥^ÓB¡^ ¸E±z”�˜•8’¡^ÒBÐce€HÜ�%œ×Ò¤<°Ó#=Ò#Iä(¨°vÓ>ˆ�ÑÜ#'¨°Õ(<¸RÕ(@Ó#Aˆ�Õ˜RÒ Ü	�Eœ4×	 Ò	  T¨!¥W´Ô%?ÝAÜ#¡J¨uÓ$5Ó6ˆ�ÑßˆÜ�h—l‘l 3Ó'¬×-Ô-Ü  ¥Ó/ˆH‹Mñ ô �>Š>œ$Ÿ*š*¤d¨4£j°(Ð%;ÀtÔL×SÑSÓUÓV×`Ñ`ÓbÐbùò Cs   ÁF)Á%F)c                 ó  € \        V P                  P                  4      P                  4       P                  p\
        P                  ! VP                  4      p\        \
        P                  ! R \        V4      RV P                  RTR\        V4      RV Uu. uF  p\        V4      \        WV4      .NK  	  upRVP                  4        UUu. uF  w  rg\        V4      \!        V4      .NK  	  upp/RR7      ,           # u upi u uppi )ÚhomeÚprofiler9   r)   ÚboundÚentriesTrC   )r   ÚdbÚdb_pathÚresolveÚparentr    r!   r"   ÚPREFIXrJ   r&   Ú
profile_idrP   r   r…   Úitemsr\   )Ú	authorityÚ
session_idr)   Úsecretsr‡   r*   r   r   s   &&&&    r   Úconfig_referencer•   Ã   sÓ   € Ü�	—‘×$Ñ$Ó%×-Ñ-Ó/×6Ñ6€DÜ�ZŠZ˜×*Ñ*Ó+€FÜ”D—J’J ¬¨D«	°9¸i×>RÑ>Rð 	�:˜x¬¸Ó)@ØÁ7ÓKÁ7¸4”4˜“:œx¨Ó5Ó6Á7ÑKØÈÏÉÌÔYÉ¹+¸$”T˜$“Z¤¨eÓ!4Ó5ÉÒYð [ð ôõ ð ùò LùÛYs   ÂC=Ã!D"c                 ó2   € R P                  R V  4       4      # )Ú.c              3   óB   "  € T F  qf   K  \        V4      x € K  	  R # 5i©N)r&   )Ú.0Úparts   & r   Ú	<genexpr>Ú_field.<locals>.<genexpr>Ð   s   é € ÐC©$ $”I”C˜—I�I«$ùs   ‚Œ)Újoin)r   s   &r   Ú_fieldrŸ   Ï   s   € Ø�8‰8ÑC©$ÓCÓCÐCr   c                óä  € R\        V4      3RV P                  33 F#  w  rVW,          V8w  g   K  \        RVRV 2R7      h	  RV9  d(   VR,          \        V4      9  d   \        RRR	R7      hR
# \        P
                  ! VP                  4      pVR,           FR  w  r‰V^ ,          V9  g   K  \        P                  ! \        Wx4      V	4      '       d   K=  \        R\        V4      RR7      h	  R
# )a.  Refuse, by name, a reference from another home or profile, or a secret whose endpoint the policy
moved without re-binding it. A change to anything else in the policy (model name, reasoning, toolsets,
an unrelated provider or MCP server, a policy field a later release added) is not a credential change.r‡   rˆ   Úlaunch_credentials_unavailablez0the frozen config credentials belong to another ©r.   Údetailr‰   r)   r=   z6stamped by an older gateway for another session policyNz:its endpoint moved in the session policy without a re-bind)r&   r�   r   rZ   r    r!   r"   ÚhmacÚcompare_digestr…   rŸ   )
r’   Úsourcer)   r‡   ÚskiprO   Úminer*   r   Údigests
   &&&&&     r   Ú_check_scoperª   Ó   sô   € ð ¤ D£	Ð*¨Y¸	×8LÑ8LÐ,MÓN‰
ˆØ�<˜4ÖÜ#Ð$DÈDØ-]Ð^bÐ]cÐ+dôfð fñ Oð �fÔð �(ÕÔ#5°fÓ#=Ô=Ü#Ð$DÐL_Ø+côeð eáÜ�ZŠZ˜×*Ñ*Ó+€FØ˜wŸ˜‰ˆØ��7˜$Ö¤t×':Ò':¼8ÀFÓ;QÐSY×'ZÔ'ZÜ#Ð$DÌFÐSWËLØ+gôið ió (r   c           	     óˆ  € V e   V P                  \        4      '       g   R# V '       d.   \        P                  ! V \	        \        4      R 4      R,          M. pV UUu/ uF!  w  rEV^ ,          V9   g   K  \        V4      VbK#  	  pppYaP                  4        UUu/ uF  w  rGV\        V4      bK  	  upp8g  # u uppi u uppi )zÊWhether *secrets* (the private values of *sections*, as the profile has them now) differ from the ones
the durable reference *ref* froze there, by fingerprint. Unknown for an in-memory reference: False.NFrŠ   )Ú
startswithr�   r    r!   r   r%   r‘   r\   )Úrefr”   ÚsectionsrŠ   r   ÚfingerprintÚfrozenr   s   &&&     r   Úsecrets_movedr±   ê   sŸ   € ð ‚˜sŸ~™~¬f×5Ò5Ùß:=Œd�jŠj˜œS¤›[˜\Ð*Ó+¨IÖ6À2€GÙ@GÔ_ÁÑ+<¨4È4ÐPQÍ7ÐV^ÑK^Ô&Œe�D‹k˜;Ò&Á€FÑ_ØÇ=Á=Ä?ÔSÁ?±K°D�dœL¨Ó/Ò/Á?ÒSÑSÐSùó `ùÛSs   ÁB8Á5B8ÂB>c           	     óV  € Vf   ^ RI Hp VP                  '       d   TMRpVP                  pVP	                  \
        4      '       g`   \        V R/ 4      P                  V4      pVf   \        R4      hVP                  4        UUu/ uF  w  rgV^ ,          V9  g   K  WgbK  	  upp#  \        P                  ! V\        \
        4      R 4      p\        V P                  P                  4      P!                  4       P"                  p	\%        WWV4       \        V R/ 4      P                  V4      p
V
e5   V
P                  4        UUu/ uF  w  rgV^ ,          V9  g   K  WgbK  	  upp# ^ RIHp VR,           Uu. uF  qÌ^ ,          ^ ,          V9  g   K  VNK  	  pp\*        ;QJ d    R V 4       F  '       g   K   RM	  R	M! R V 4       4      '       d   V! V	R
,          4      M/ pRp\-        4       . ppRpV EFs  w  ppYæppV^ ,          R8X  d]   \        V4      ^8”  dM   \/        V^,          4      \0        J d3   Vf!   \        P                  ! VP2                  4      MTp\5        VWæ4      pV^ ,          f   ^ RIHp V! V	4      VR,          pp\;        VV4      pV\<        J d   RM
\?        V4      pVe   \@        PB                  ! VV4      '       g�   Vf   \E        V4      p\G        V4      V9   d+   \        R\I        V4      V\<        J d   RMRR,           R7      h\J        PM                  RVP                  R4      V4       VPO                  \G        V4      4       EKf  Wu\G        V4      &   EKv  	  \G        V4      VP                  R4      uVn(        Vn)        V# u uppi u uppi u upi   \         d    h \T        \V        \X        \Z        \\        3 dU   p\J        PM                  R\/        T4      P^                  4       \        RRR\/        T4      P^                   R2R7      ThRp?ii ; i)z÷The frozen config secrets; entries under a *skip* section are neither re-read nor checked. Every
caller of a following session skips its followed sections: the live profile supplies them, so a key
rotation there is not a revoked launch credential.N)ÚFOLLOW_SECTIONSÚ_local_config_secretsr¡   )Ú_load_gateway_configrŠ   c              3   ó<   "  € T F  w  rV^ ,          RJx € K  	  R# 5i)rz   Nr2   )rš   r   Ú_s   &  r   rœ   Ú)recover_config_secrets.<locals>.<genexpr>
  s    é € ÐBnÑfmÑ[bÐ[_À4ÈÅ7ÐRVÕCVÓfmùs   ‚TFzconfig.yamlÚcustom_providers)Úbuild_profile_terminal_scoper^   zremoved fromz
changed inz' config.yaml since this session startedr¢   zUSession %s: frozen config secret %s no longer matches the profile config; skipping itr9   z&Frozen config reference unreadable: %sr=   zunreadable (Ú)r2   )0Úgateway.session_policyr³   Úfollows_profiler=   r¬   r�   rU   r#   r   r‘   r    r!   r   r   r‹   rŒ   r�   rŽ   rª   Úgateway.runrµ   Úanyr1   r	   r
   r"   Ú_current_custom_pathÚtools.terminal_scoperº   r   r   r\   r¤   r¥   r/   r%   rŸ   ÚloggerÚwarningÚappendr8   r9   ÚKeyErrorÚ	TypeErrorÚ
ValueErrorÚAttributeErrorÚOSErrorr3   )r’   r)   r§   r³   r­   Úvaluesr   r   r¦   r‡   Úcachedrµ   r-   rŠ   r*   ro   r8   r°   r¯   Úlookuprº   ÚactualÚexcs   &&&                    r   Úrecover_config_secretsrÏ   ô   sŒ  € ð ‚|Ý:Ø"(×"8×"8Ð"8‰¸bˆØ
×
"Ñ
"€CØ�>‰>œ&×!Ò!Ü˜Ð$;¸RÓ@×DÑDÀSÓIˆØŠ>Ü#Ð$DÓEÐEØ/5¯|©|¬~ÔU©~¡ ÀÀaÅÐPTÑAT”�’©~ÒUÐUð,VÜ—’˜C¤¤F£ Ð-Ó.ˆÜ�I—L‘L×(Ñ(Ó)×1Ñ1Ó3×:Ñ:ˆÜ�Y¨°dÔ;Ü˜Ð$;¸RÓ@×DÑDÀSÓIˆØÒØ39·<±<´>ÔY±>¡K DÀTÈ!ÅWÐTXÑEX”K�D’K±>ÒYÐYÝ4Ø&,¨YÖ&7ÓSÑ&7˜UÀ½8ÀA½;ÈdÑ;R—5�5Ñ&7ˆÐSß?B»sÑBnÑfmÓBn¿s¿sºsÑBnÑfmÓBn×?nÒ?nÑ% d¨]Õ&:Ô;ÐtvˆØˆÜ*Ó,¨b�ˆØˆÜ!(ÑˆD�+Ø"�6ˆEØ�A�wÐ,Ô,´°T³¸Q´Ä4ÈÈQÍÃ=ÔTWÓCWØ;Aº>œŸš F×$6Ñ$6Ô7Èv�Ü-¨f°fÓC�Ø�A�wŠÝMÙ <¸TÓ BÀDÈÅH�v�Ü˜U FÓ+ˆEØ"¤gÓ-‘T´<ÀÓ3FˆFØŠ~¤T×%8Ò%8¸À×%MÒ%MØ’=Ü(¨Ó0�EÜ˜“; %Ô'Ü+Ð,LÔTZÐ[_ÓT`Ø27¼7Ó2B¡ÈØCõ DôEð Eô
 —‘ð  5Ø6<·j±jÀÓ6KÈTôSà—‘œu T›{Ô+ÚØ"'”5˜“;Ôñ/ ")ô0 */¨w«¸¿¹ÀIÓ9NÐ&ˆŒ˜œØˆùóO Vùó ZùâSøô> ô ØÜ”i¤¬^¼WÐEô VÜ�‰Ð?ÄÀcÃ×ASÑASÔTÜÐ @ÐH[Ø)5´d¸3³i×6HÑ6HÐ5IÈÐ'KôMØRUð	VûðVúsp   ÂNÂNÂ(BN) ÅNÅNÅ"N) Å&N) Å7N$ÆN$ÆN) Æ9N) ÇC<N) ËCN) ÎN) Î))P(ÏP(ÏAP#Ð#P(c                ón  a€ ^ RI Ho V3R lpV P                  R4      p\        V\        4      '       d8   ^ V^,          u;8:  d   \        V4      8  d   M MV! WB^,          ,          4      MRpVP                  R4      pVe   \        V\        4      '       g   V# ^ V^,          u;8:  d   \        V4      8  d    M MV! Wb^,          ,          4      V8X  d   V# \        V4       F)  w  rxV! V4      V8X  g   K  V^ ,          V.VR,          O5u # 	  ^ RIHp	H	p
 ^ V^,          u;8:  d   \        V4      8  db   M M^\        Wb^,          ,          \        4      '       d<   V
! V	! Wb^,          ,          4      4      V
! V	! WB^,          ,          4      4      8X  d   V# V^ ,          \        V4      .VR,          O5# )aÖ  *path* (``custom_providers[i]...``, an index into the frozen list) re-pointed at the profile's
entry of the SAME canonical identity (``custom_provider_slug``), wherever a reorder moved it.
An entry the profile no longer declares maps to no index (absent), never to whatever entry now
sits at ``i``, unless that entry is the same endpoint renamed in place (the fingerprint then decides,
as on main). A frozen entry with no name has no identity: its index is all there is.)Úcustom_provider_slugc                 ó*  <€ \        V \        4      '       d/   V P                  R 4      '       g   V P                  R4      '       g   R# S! \        V P                  R 4      ;'       g    R4      \        V P                  R4      ;'       g    R4      4      # )rO   Úprovider_keyNr   )r   r   r#   r&   )r-   rÑ   s   &€r   ÚidentityÚ&_current_custom_path.<locals>.identity8  sj   ø€ Ü˜%¤×&Ò&¨u¯y©y¸×/@Ò/@ÀEÇIÁIÈn×D]ÒD]ÙÙ#¤C¨¯	©	°&Ó(9×(?Ð(?¸RÓ$@Ä#ÀeÇiÁiÐP^ÓF_×FeÐFeÐceÓBfÓgÐgr   r¹   N:rl   NN)r€   Ú_normalize_base_url_for_match)Úhermes_cli.providersrÑ   r#   r   r   r   Ú	enumerater   r€   rÖ   r   )r°   r*   r   rÔ   Úheldr¨   ÚcurrentÚindexr-   r€   ÚurlrÑ   s   &&&        @r   rÀ   rÀ   0  sT  ø€ õ :õhð
 �:‰:Ð(Ó)€DÜ&0°´t×&<Ò&<ÀÀdÈ1ÅgÖAYÔPSÐTXÓPY×AY‰8�D˜a�•MÔ"Ð_c€DØ�j‰jÐ+Ó,€GØ‚|œ: g¬t×4Ò4ØˆØˆD��GÖ"”c˜'“l×"¡x°¸Q½Õ0@Ó'AÀTÔ'IØˆÜ! 'Ö*‰ˆÙ�E‹?˜dÖ"Ø˜•G˜UÐ. T¨"¥XÑ.Ò.ñ +÷ dØˆD��GÖ"”c˜'“l×"¤z°'¸q½'Õ2BÄD×'IÒ'IÙ‘J˜w¨A¥wÕ/Ó0Ó1±S¹ÀDÈaÍÅMÓ9RÓ5SÔSØˆØ��G”S˜“\Ð- D¨¥HÑ-Ð-r   c                óô   € ^ RI HpHp \        V P	                  R4      ;'       g    R4      P                  4       pVP                  4       R8X  d   V! V P	                  R4      V4      # V'       d	   V! WA4      # R# )zXThe ``providers:`` / ``custom_providers:`` entry a fallback entry authenticates through.r   r   r   r   r   N)r   r   r   r&   r#   r'   r(   )r-   r*   r   r   r   s   &&   r   Ú_entry_owner_pathrÞ   N  se   € ÷Wä�5—9‘9˜ZÓ(×.Ð.¨BÓ/×5Ñ5Ó7€HØ‡~�~Ó˜8Ô#Ù2°5·9±9¸ZÓ3HÈ&ÓQÐQßBJÑ,¨XÓ>ÐTÐPTÐTr   c                óX  a€ V'       g   V # ^ RI Hp \        V P                  R4      \        4      '       d   V P                  R4      M/ p\        V Uu0 uF-  qU^ ,          R8X  g   K  \        V4      ^8”  g   K$  V^,          kK/  	  up\        R7       F  pVP                  V4      p\        V\        4      '       g   K,  / VP                  4        UU	u/ uF  w  r‰Wƒ9  g   K  VR8w  g   K  W‰bK  	  up	pCRR/CWF&   \        P                  RW&4       K�  	  V Uu0 uF-  qU^ ,          R9   g   K  \        V4      ^8”  g   K$  VR,          kK/  	  p
pR EFÄ  pV P                  V4      p\        V\        4      '       d   V.R	ríM%\        V\        4      '       d   \        V4      R
ríMKU  . p\        V4       EF&  w  ppV'       d   V3MVV3o\        ;QJ d    V3R lV 4       F  '       g   K   R	M	  R
M! V3R lV 4       4      p\        V\        4      '       d   V
'       d   \        VV 4      MRpV'       g   VeŽ   \        V4      V
9   d~   \        P                  RT\        V\        4      '       d   T;'       g    / P                  R4      MR\        V\        4      '       d   T;'       g    / P                  R4      MR4       EK  VP!                  V4       EK)  	  V'       d,   V'       d   V^ ,          W&   EK«  V P#                  VR4       EKÀ  WðV&   EKÇ  	  V # u upi u up	pi u upi )a‡  Disable, in the session's effective *config*, whatever authenticated with a *dropped* frozen
secret, instead of leaving it with a null key (null means 'resolve another credential' and would
send another account's key). A fallback using it is removed from the chain; an ``auxiliary.<task>``
override using it is replaced by the session's primary route (``provider: main``). Never substitutes.)Ú_AUX_ROUTE_KEYSrb   )r   rc   r   rs   z}Session %s: auxiliary task %s returned to the primary route: its credential changed in config.yaml since this session startedrk   TFc              3   óD   <"  € T F  qR \        S4       S8H  x € K  	  R # 5ir™   )r   )rš   r   Úprefixs   & €r   rœ   Ú*disable_dropped_secrets.<locals>.<genexpr>u  s   øé € ÐG¹w°t˜<œC ›KÐ(¨FÖ2»wùs   ƒ NzdSession %s: fallback %s/%s removed: its credential changed in config.yaml since this session startedÚ?r   ©Ú	providersr¹   )re   rd   )Úagent.auxiliary_task_configrà   r   r#   r   Úsortedr   r&   r‘   rÂ   rÃ   r   rØ   r¿   rÞ   r%   rÄ   rG   )r*   r8   r9   rà   rb   r   rh   rw   rƒ   ÚvÚownersÚsectionÚrawrŠ   ÚsingleÚkeptrÛ   r-   Úownrv   râ   s   &&&                 @r   Údisable_dropped_secretsrð   X  s¤  ø€ ÷
 ØˆÝ;Ü+5°f·j±jÀÓ6MÌt×+TÒ+T�—
‘
˜;Ô'ÐZ\€IÜ©GÓ`©G D¸AµwÀ+Ñ7MœÔRUÐVZÓR[Ð^_ÑR_œ˜˜QŸ˜©GÑ`Ôfi×jˆØ—‘˜dÓ#ˆÜ�eœT×"Ô"ðR°5·;±;´=ô "=±=©4¨1ÀAÑD\¤$Ø&'Ð+;Ñ&;ô #' !¢$±=ò "=ð RØ>HÈ&ñRˆI‰Oä�N‰Nð OØPWö_ñ kñ $+Óm¡7˜4°1­gÐ9ZÑ.ZŒhÔ_bÐcgÓ_hÐklÑ_lŒhˆd�2�hˆh¡7€FÐmÜ;ˆØ�j‰j˜Ó!ˆÜ�cœ4× Ò Ø"˜e T‘VÜ˜œT×"Ò"Ü" 3›i¨‘VáØˆÜ% g×.‰LˆE�5ß#)�g‘Z°¸Ð/?ˆFß“#ÔG¹wÓG—#—#’#ÔG¹wÓGÓGˆCÜ8BÀ5Ì$×8OÒ8O×TZÔ% e¨VÔ4Ð`dˆEß�uÒ(¬U°5«\¸VÔ-CÜ—‘ð  <Ø=DÜ@JÈ5ÔRV×@WÒ@W § ¨×0Ñ0°Ô<Ð]`Ü=GÈÌt×=TÒ=T § ¨×0Ñ0°Ô9ÐZ]ô_ò Ø�K‰K˜×ñ /÷ ßØ"& q¥'�”à—
‘
˜7 D×)à"�7ŒOñ5 <ð6 €MùòI aùó"=ùò ns6   ÁLÁ'LÁ9LÃ
L!
Ã"L!
Ã+L!
ÄL'Ä.L'Å L')r2   ))Úskills_promptN)Úkanban_jsonN)Ú	safe_modeF)Úignore_user_configF)r   r   ÚapirÜ   ÚcommandÚargsÚapi_moderå   )r   Úautors   )r   rõ   rÜ   r™   ),r7   rH   r¤   r    ÚloggingÚdataclassesr   Úpathlibr   Úagent.credential_persistencer   Úhermes_state_runtimer   Ú	getLoggerr3   rÂ   r�   Úobjectr   r   r/   r   r1   rP   rT   rZ   r\   r�   rn   ru   ri   rp   rx   r‚   r}   r…   r•   rŸ   rª   r±   rÏ   rÀ   rÞ   rð   r2   r   r   Ú<module>r     sÐ   ðÙ UÛ Û Û Û Ý Ý å AÝ 2à	×	Ò	˜8Ó	$€Ø	€Ù
‹(€ò
òô.�tô ôQð27Ð òXòlð W€Ø3€ð )Ð òò:ò/ð '€	ò>ò
cò&	òDòiò.Tô9Vòx.ò<Uö-r   