+
    lHàjv*  ã                  ó  a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIHt ^ RIH	t	H
t
 ^ RIHt ^ RIHtHtHtHt RtR5t]! RR	7       ! R
 R4      4       t]! RR	7       ! R R4      4       tR R ltR R ltR6R R lltR R ltR R ltR R lt]P8                  ! 4       t/ tR]R&   / t R]R&   ]	! RRR 7      t!R!]R"&   R# R$ lt"R% R& lt#R' R( lt$Rs%R)]R*&   R+ R, lt&R- R. lt']! RR	7       ! R/ R04      4       t(R1 R2 lt)R3 R4 lt*R# )7a›  Declared per-tool MCP costs and the per-chat spend tally behind the budget gate.

A server may declare what its tools spend (``tool_costs`` in config.yaml, ``costs`` in a portable
package) and a ``spend_limit`` per chat. The approval prompt then names the cost and the chat's
running total, and a call that would take the chat past the limit needs an explicit yes even on a
``trust: full`` server. Figures are the server's own declared estimates: Hermes counts the declared
figure (the top of a range) for every call it dispatched, never a vendor's bill.

Undeclared and zero-cost tools never reach any of this, so a server without a table behaves
exactly as before.
)ÚannotationsN)Úcontextmanager)Ú
ContextVarÚToken)Ú	dataclass)ÚAnyÚIteratorÚMappingÚOptionalÚcreditsT)Úfrozenc                  ó:   € ] tR t^t$ R]R&   R]R&   RtR]R&   RtR# )	ÚToolCostÚfloatÚlowÚhighÚ ÚstrÚnote© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__annotations__r   Ú__static_attributes__r   ó    Ú9/home/ubuntu/.hermes/hermes-agent/tools/mcp_tool_costs.pyr   r      s   ‡ à	ƒJØ
ƒKØ€Dˆ#‡Nr   r   c                  ó6   € ] tR t^"t$ R]R&   R]R&   R]R&   RtR# )	Ú
CostPolicyzMapping[str, ToolCost]Úcostsr   Úlimitr   Úunitr   N)r   r   r   r   r   r   r   r   r   r   r   "   s   ‡ à!Ó!ØƒLØ
‡Ir   r   c               ó$   € V ^8„  d   QhRRRRRR/# )é   Úvaluer   Úwherer   Úreturnr   r   )Úformats   "r   Ú__annotate__r)   )   s!   € ÷ ñ �3ð ˜sð  uñ r   c                óä   € \        V \        4      '       g@   \        V \        \        34      '       d$   \        P
                  ! V 4      '       d   V ^ 8  d   \        V RV : 24      h\        V 4      # )é    z$ must be a non-negative number, not )Ú
isinstanceÚboolÚintr   ÚmathÚisfiniteÚ
ValueError)r%   r&   s   &&r   Ú_numberr2   )   sX   € Ü�%œ×Ò¤j°¼¼e¸×&EÒ&EÌTÏ]Ê]Ð[`×MaÒMaÐejÐmnÔenÜ˜E˜7Ð"FÀuÁiÐPÓQÐQÜ�‹<Ð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!   € ÷ 2ñ 2�sð 2 3ð 2¨8ñ 2r   c                ór  € R p\        V \        4      '       do   RV 9  g   \        V 4      RR0,
          '       d   \        V R24      hV P	                  RR 4      p\        V\
        4      '       g   \        V R24      hV R,          p \        V \        \        34      '       dr   \        V 4      ^8w  d   \        V R24      h\        V ^ ,          V4      \        V ^,          V4      rCW48”  d   \        V R24      h\        W4VP                  4       4      # \        W4      p\        WUVP                  4       4      # )r   r   r   zA must be a number, [min, max], or {"credits": ..., "note": "..."}z note must be a stringz range must be [min, max]z) range must be [min, max] with min <= max)r,   ÚdictÚsetr1   Úgetr   ÚlistÚtupleÚlenr2   r   Ústrip)r%   r&   r   r   r   Úamounts   &&    r   Ú_parse_costr=   /   s  € Ø€DÜ�%œ×ÒØ˜EÔ!¤S¨£Z°9¸fÐ2E×%EÔ%EÜ ˜wÐ&oÐpÓqÐqØ�y‰y˜ Ó$ˆÜ˜$¤×$Ò$Ü ˜wÐ&<Ð=Ó>Ð>Ø�iÕ ˆÜ�%œ$¤˜×'Ò'Üˆu‹:˜Œ?Ü ˜wÐ&?Ð@ÓAÐAÜ˜E !�H eÓ,¬g°e¸AµhÀÓ.FˆTØŒ:Ü ˜wÐ&OÐPÓQÐQÜ˜ 4§:¡:£<Ó0Ð0Ü�UÓ"€FÜ�F D§J¡J£LÓ1Ð1r   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r$   r    r   Úspend_limitÚ	cost_unitr&   r   r'   úOptional[CostPolicy]r   )r(   s   "r   r)   r)   C   s1   € ÷ 2ñ 2˜Sð 2°cð 2ÈSð 2Ø ð2Ø%9ñ2r   c               óØ  € V e%   \        V \        4      '       g   \        V R24      h/ pT ;'       g    / P                  4        FD  w  rV\        V\        4      '       d	   V'       g   \        V R24      h\        Wc RV R24      WE&   KF  	  Vf   RM\        W R24      pVf   \        MTp\        V\        4      '       d'   VP                  4       '       d   \        V4      ^ 8”  d   \        V RV: 24      h\        ;QJ d*    R	 VP                  4        4       F  '       g   K   R
M	  RM! R	 VP                  4        4       4      '       g   R# \        WGVP                  4       4      # )z°Validate one server's declaration. None when it declares no tool cost (a limit alone has
nothing to count); raises ValueError naming the bad key otherwise, never a silent pass.Nz8 costs must be an object mapping MCP tool names to costsz, costs keys must be non-empty MCP tool namesz
 cost of 'Ú'ç        z spend_limitz0 cost_unit must be a short non-empty label, not c              3  ó>   "  € T F  qP                   ^ 8„  x € K  	  R# 5i)r+   N)r   )Ú.0Úcosts   & r   Ú	<genexpr>Ú$parse_cost_policy.<locals>.<genexpr>R   s   é € Ð8© �y‰y˜1Ž}«ùs   ‚TF)r,   r5   r1   Úitemsr   r=   r2   ÚDEFAULT_UNITr;   r:   ÚanyÚvaluesr   )	r    r?   r@   r&   ÚtableÚtoolr%   r!   r"   s	   &&&$     r   Úparse_cost_policyrP   C   s'  € ð Ò¤¨E´4×!8Ò!8Ü˜E˜7Ð"ZÐ[Ó\Ð\Ø!#€EØŸ˜ ×*Ñ*Ö,‰ˆÜ˜$¤×$Ò$¯DÜ ˜wÐ&RÐSÓTÐTÜ! %¨7°*¸T¸FÀ!Ð)DÓEˆ‹ñ -ð Ò&‰C¬G°KÀ7È,ÐAWÓ,X€EØ$Ò,�<°)€DÜ�dœC× Ò ¨¯
©
¯ª¼¸D»	ÀB¼Ü˜E˜7Ð"RÐS\ÑR_Ð`ÓaÐaß‹3Ñ8¨¯©¬Ó8�3�3Š3Ñ8¨¯©¬Ó8×8Ò8ÙÜ�e D§J¡J£LÓ1Ð1r   c               ó$   € V ^8„  d   QhRRRRRR/# )r$   Úserver_namer   ÚconfigzMapping[str, Any] | Noner'   rA   r   )r(   s   "r   r)   r)   W   s(   € ÷ Bñ B Cð BÐ1Ið BÐNbñ Br   c                óš   € T;'       g    / p\        VP                  R4      VP                  R4      VP                  R4      RV  R2R7      # )zWPolicy of a native/translated ``mcp_servers`` entry (raises ValueError when malformed).Ú
tool_costsr?   r@   zMCP server 'rC   )r&   )rP   r7   )rR   rS   s   &&r   Úconfig_cost_policyrV   W   sM   € à�\ˆ\�r€FÜ˜VŸZ™Z¨Ó5°v·z±zÀ-Ó7PÐRX×R\ÑR\Ð]hÓRiØ%1°+°¸aÐ#@ôBð Br   c               ó    € V ^8„  d   QhRRRR/# )r$   r<   r   r'   r   r   )r(   s   "r   r)   r)   ^   s   € ÷ jñ j�ð j˜3ñ jr   c                óž   € \        V 4      P                  4       '       d   \        V 4      R  # V R P                  R4      P                  R4      # )Ú,z,.2fÚ0Ú.)r   Ú
is_integerr.   Úrstrip)r<   s   &r   Ú_fmtr^   ^   sC   € Ü!& v£×!9Ñ!9×!;Ò!;Œc�&‹k˜!ˆ_ÐiÀFÈ4À=×AXÑAXÐY\ÓA]×AdÑAdÐehÓAiÐir   c               ó$   € V ^8„  d   QhRRRRRR/# )r$   r<   r   r"   r   r'   r   )r(   s   "r   r)   r)   b   s&   € ÷ Yñ Y�ð Y˜cð Y cñ Yr   c                ól   € \        V 4       RV ^8X  d   VP                  R4      '       d   VRR  2# T 2# )zQ``1 credit``, ``5 credits``: a plural unit label loses its ``s`` for exactly one.Ú ÚsNéÿÿÿÿ)r^   Úendswith)r<   r"   s   &&r   Ú_qtyre   b   s>   € ä�6‹lˆ^˜1¨&°A¬+¸$¿-¹-È×:LÒ:L˜T # 2˜YÐWÐXÐXÐRVÐWÐXÐXr   zdict[tuple, float]Ú_spentzdict[tuple, threading.Lock]Ú
_ask_locksÚmcp_cost_run_keyr   )ÚdefaultzContextVar[str]Ú_run_keyc               ó    € V ^8„  d   QhRRRR/# )r$   Úrun_idr   r'   r   r   )r(   s   "r   r)   r)   t   s   € ÷  ñ  �Sð  ˜Uñ  r   c                ó,   € \         P                  V 4      # ©N)rj   r6   )rl   s   &r   Úbind_runro   t   s   € Ü�<‰<˜ÓÐr   c               ó    € V ^8„  d   QhRRRR/# )r$   Útokenr   r'   ÚNoner   )r(   s   "r   r)   r)   x   s   € ÷ ñ �eð  ñ r   c                ó0   € \         P                  V 4       R # rn   )rj   Úreset)rq   s   &r   Ú
unbind_runru   x   s   € Ü‡N�N�5Ör   c               ó$   € V ^8„  d   QhRRRRRR/# )r$   Úold_keyr   Únew_keyr'   rr   r   )r(   s   "r   r)   r)   |   s&   € ÷ Eñ E˜cð E¨Cð E°Dñ Er   c                ór  € V '       d   V'       d   W8X  d   R# \         ;_uu_ 4        \         Uu. uF  q"^,          V 8X  g   K  VNK  	  up FE  pV^ ,          V3p\        P                  VR4      \        P                  V4      ,           \        V&   KG  	  RRR4       R# u upi   + '       g   i     R# ; i)z²The chat continues under a new session id (compression rotation, /branch): its totals move with it,
or the rotation would hand a chat that already spent its limit a fresh budget.NrD   )Ú_lockrf   r7   Úpop)rw   rx   ÚkÚkeyÚmoveds   &&   r   Útransfer_sessionr   |   s|   € ÷ Ÿ' WÔ%7Ùß	ŽÝ%Ó9™v˜!¨1­°©—A�A™vÔ9ˆCØ˜•V˜WÐ%ˆEÜ"ŸJ™J u¨cÓ2´V·Z±ZÀ³_ÕDŒF�5‹Mñ :÷ 
‰ùÚ9÷ 
�ˆús#   §	B%°B ÁB Á
AB%Â B%Â%B6	zOptional[str]Ú_unscoped_moved_toc               ó    € V ^8„  d   QhRRRR/# )r$   Úscoper   r'   rr   r   )r(   s   "r   r)   r)   Š   s   € ÷ Cñ C˜#ð C $ñ Cr   c           	     ó^  € \         ;_uu_ 4        V s\         Uu. uF$  p\        V^ ,          \        4      '       g   K"  VNK&  	  up FN  p\        P                  V4      p\        P                  \        V4      R4      V,           \        \        V4      &   KP  	  \         Uu. uF$  p\        V^ ,          \        4      '       g   K"  VNK&  	  up F5  p\        P                  \        V4      \        P                  V4      4       K7  	  RRR4       R# u upi u upi   + '       g   i     R# ; i)a  Follow ``mcp_tool_scope.rekey_unscoped_connections``: a process that starts multiplexing moves its
bare-name policies under ``(scope, name)``, and the chats' totals must move with them. A charge built
before the move (booked or refunded after it) resolves to the moved key too.rD   N)
rz   r€   rf   r,   r   r{   r7   Ú_liverg   Ú
setdefault)r‚   r|   r}   r<   s   &   r   Úrekey_unscopedr†   Š   sÉ   € ÷
 
ŽØ"ÐÝ%Ó?™v˜!¬°A°aµD¼#×)>—A�A™vÔ?ˆCÜ—Z‘Z “_ˆFÜ!'§¡¬E°#«J¸Ó!<¸vÕ!EŒF”5˜“:Óñ @õ  *ÓC™z˜!¬Z¸¸!½¼c×-B—A�A™zÔCˆCÜ×!Ñ!¤%¨£*¬j¯n©n¸SÓ.AÖBñ D÷ 
‰ùâ?ùò D÷ 
�ˆús4   �DšD¾DÁADÂ!DÃDÃ<DÄ
DÄD,	c               ó    € V ^8„  d   QhRRRR/# )r$   r}   r9   r'   r   )r(   s   "r   r)   r)   ˜   s   € ÷ ñ ˆuð ˜ñ r   c                ó^   € V w  r\        V\        4      '       d   \        e   \        V3V3# V # rn   )r,   r   r€   )r}   Ú
policy_keyÚsession_keys   &  r   r„   r„   ˜   s2   € Ø!Ñ€JÜ�*œc×"Ò"Ô'9Ò'EÜ" JÐ/°Ð<Ð<Ø€Jr   c                  óÜ   € ] tR t^Ÿt$ RtR]R&   R]R&   R]R&   R]R&   R	]R
&   R R ltR R ltR R ltR R lt	R R lt
R R lt]R R l4       tR R ltR R ltR R ltR R  ltR!tR"# )#ÚChargezPOne costed call about to be admitted: what it costs and whose tally it lands on.r9   r}   r   ÚserverrO   r   rG   r   Úpolicyc               ó   € V ^8„  d   QhRR/# )r$   r'   r   r   )r(   s   "r   r)   ÚCharge.__annotate__¨   s   € ÷ 4ñ 4�uñ 4r   c                	ó®   € \         ;_uu_ 4        \        P                  \        V P                  4      R 4      uuRRR4       #   + '       g   i     R# ; i©rD   N)rz   rf   r7   r„   r}   ©Úselfs   &r   ÚspentÚCharge.spent¨   s)   € ßŽUÜ—:‘:œe D§H¡H›o¨sÓ3÷ �U�U‹Uús   �)AÁA	c               ó    € V ^8„  d   QhRRRR/# )r$   r•   r   r'   r-   r   )r(   s   "r   r)   r�   ¬   s   € ÷ Tñ T ð T¨$ñ Tr   c                	óª   € V P                   P                  ^ 8„  ;'       d4    WP                  P                  ,           V P                   P                  8„  # )r+   )rŽ   r!   rG   r   ©r”   r•   s   &&r   Ú
over_limitÚCharge.over_limit¬   s9   € Ø�{‰{× Ñ  1Ñ$×SÐS¨·±·±Õ)?À$Ç+Á+×BSÑBSÑ)SÐSr   c               ó   € V ^8„  d   QhRR/# )r$   r'   ztuple[bool, float]r   )r(   s   "r   r)   r�   ¯   s   € ÷ ñ Ð&8ñ r   c                óJ  € \         ;_uu_ 4        \        P                  \        V P                  4      R4      pV P                  V4      '       d   RV3uuRRR4       # V P                  V P                  P                  4       RV3uuRRR4       #   + '       g   i     R# ; i)z©Book the estimate when it keeps the chat within its limit; ``(booked, spent before)``.
Check and book share the lock, so parallel calls cannot both slip under the limit.rD   FNT)	rz   rf   r7   r„   r}   rš   Ú_add_lockedrG   r   r™   s   & r   Úreserve_within_limitÚCharge.reserve_within_limit¯   si   € ÷ ŽUÜ—J‘Jœu T§X¡X›°Ó4ˆEØ�‰˜u×%Ò%Ø˜e�|÷ ŠUð ×Ñ˜TŸY™YŸ^™^Ô,Ø˜�;÷ �U�U‹Uús   �ABÁ(BÂB"	c               ó   € V ^8„  d   QhRR/# ©r$   r'   rr   r   )r(   s   "r   r)   r�   ¹   s   € ÷ -ñ -�dñ -r   c                	ó¦   € \         ;_uu_ 4        V P                  V P                  P                  4       R R R 4       R #   + '       g   i     R # ; irn   ©rz   rž   rG   r   r“   s   &r   ÚbookÚCharge.book¹   s)   € ßŽUØ×Ñ˜TŸY™YŸ^™^Ô,÷ �U�UŠUús	   �&?¿A	c               ó   € V ^8„  d   QhRR/# r¢   r   )r(   s   "r   r)   r�   ½   s   € ÷ .ñ .˜ñ .r   c                	ó¨   € \         ;_uu_ 4        V P                  V P                  P                  ) 4       R R R 4       R #   + '       g   i     R # ; irn   r¤   r“   s   &r   ÚrefundÚCharge.refund½   s+   € ßŽUØ×Ñ˜dŸi™iŸn™n˜_Ô-÷ �U�UŠUús   �'A Á A	c               ó    € V ^8„  d   QhRRRR/# )r$   r<   r   r'   rr   r   )r(   s   "r   r)   r�   Á   s   € ÷ >ñ > %ð >¨Dñ >r   c                	óŒ   € \        V P                  4      p\        R \        P	                  VR 4      V,           4      \        V&   R# r’   )r„   r}   Úmaxrf   r7   )r”   r<   r}   s   && r   rž   ÚCharge._add_lockedÁ   s/   € Ü�D—H‘H‹oˆÜ˜#œvŸz™z¨#¨sÓ3°fÕ<Ó=Œˆs‹r   c               ó   € V ^8„  d   QhRR/# )r$   r'   zIterator[None]r   )r(   s   "r   r)   r�   Æ   s   € ÷ ñ ˜ñ r   c              #  ó0  "  € \         ;_uu_ 4        \        P                  \        V P                  4      \
        P                  ! 4       4      pRRR4       X;_uu_ 4        Rx € RRR4       R#   + '       g   i     L); i  + '       g   i     R# ; i5i)z=Hold this chat's budget-prompt slot while asking and booking.N)rz   rg   r…   r„   r}   Ú	threadingÚLock)r”   Úslots   & r   ÚaskingÚCharge.askingÅ   sP   é € ÷ ŽUÜ×(Ñ(¬¨t¯x©x«¼)¿.º.Ó:JÓKˆD÷ çŠTÛ÷ ‰T÷ �Uúç�TˆTüs4   ‚B‘=A/ÁBÁ BÁ%
BÁ/A?	Á:BÂB	Â	Bc               ó   € V ^8„  d   QhRR/# )r$   r'   r   r   )r(   s   "r   r)   r�   Í   s   € ÷ Eñ E˜sñ Er   c                	ó\  € V P                   P                  V P                  r!VP                  VP                  8X  d   R \        VP                  V4       2M.R\        VP                  4       R\        VP                  V4       2pVP                  '       d   V RVP                   R2# V R2# )zCosts about zCosts Ú-z (z).r[   )rŽ   r"   rG   r   r   re   r^   r   )r”   r"   rG   Útexts   &   r   Úcost_sentenceÚCharge.cost_sentenceÍ   s�   € Ø—[‘[×%Ñ% t§y¡yˆdØ:>¿(¹(ÀdÇiÁiÔ:O�,œt D§I¡I¨tÓ4Ð5Ñ6Øœd 4§8¡8›nÐ-¨Q¬t°D·I±I¸tÓ/DÐ.EÐFð 	à+/¯9¯9¨9�$��r˜$Ÿ)™)˜ BÐ'ÐD¸T¸FÀ!¸*ÐDr   c               ó    € V ^8„  d   QhRRRR/# ©r$   r•   r   r'   r   r   )r(   s   "r   r)   r�   Ó   s   € ÷ jñ j Eð j¨cñ jr   c                	ó  € V P                   P                  V P                   P                  r2V^ 8”  d8   V^ 8”  d   R\        V4       R2MRpR\	        W4       RV P
                   RV R2# V^ 8”  d   RV P
                   R	\	        W24       R2# R# )
r+   z (limit Ú)r   zThis chat has used about ú on 'rC   r[   zSpend limit for this chat on 'z': )rŽ   r"   r!   r^   re   r�   )r”   r•   r"   r!   Úcaps   &&   r   Úspend_sentenceÚCharge.spend_sentenceÓ   s–   € Ø—k‘k×&Ñ&¨¯©×(9Ñ(9ˆeØ�1Œ9Ø/4°q¬y�HœT %›[˜M¨Ñ+¸bˆCØ.¬t°EÓ/@Ð.AÀÀtÇ{Á{ÀmÐSTÐUXÐTYÐYZÐ[Ð[ØX]Ð`aÔXaÐ/°·±¨}¸CÄÀUÓ@QÐ?RÐRSÐTÐiÐgiÐir   c               ó    € V ^8„  d   QhRRRR/# )r$   r•   r   r'   ú	list[str]r   )r(   s   "r   r)   r�   Ú   s   € ÷ Tñ T˜5ð T Yñ Tr   c                	ó€   € V P                  4       V P                  V4      3 Uu. uF  q"'       g   K  VNK  	  up# u upi rn   )rº   rÂ   )r”   r•   rb   s   && r   ÚlinesÚCharge.linesÚ   s:   € Ø ×.Ñ.Ó0°$×2EÑ2EÀeÓ2LÑMÓSÑM�aÓQR—�ÑMÑSÐSùÒSs   ¤	;²;c               ó    € V ^8„  d   QhRRRR/# r½   r   )r(   s   "r   r)   r�   Ý   s   € ÷ Rñ R˜Uð R sñ Rr   c                	ó  € V P                   P                  pR V P                   RV P                   R\	        W4       RV P                   R\	        V P                   P
                  V4       R\	        V P                  P                  V4       R2# )z
MCP tool 'z' on server 'z(' was NOT run: this chat has used about rÀ   z' and its spend limit is z. This call (about zk) needed an explicit approval and did not get one. Do not retry; tell the user the spend limit was reached.)rŽ   r"   rO   r�   re   r!   rG   r   )r”   r•   r"   s   && r   ÚrefusalÚCharge.refusalÝ   sŠ   € Ø�{‰{×ÑˆØ˜TŸY™Y˜K }°T·[±[°MÐAiÜ˜Ó$Ð% U¨4¯;©;¨-Ð7PÔQUÐVZ×VaÑVa×VgÑVgÐimÓQnÐPoð p$Ü$(¨¯©¯©¸Ó$>Ð#?ð @PðQð 	Rr   r   N)r   r   r   r   Ú__doc__r   r•   rš   rŸ   r¥   r©   rž   r   r´   rº   rÂ   rÇ   rË   r   r   r   r   rŒ   rŒ   Ÿ   sp   ‡ áZØ	ƒJØƒKØ
ƒIØ
ƒNØÓõ4õTõõ-õ.õ>ð ôó ðõEõjõT÷Rñ Rr   rŒ   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r$   r‰   r   rR   r   Ú	tool_namerŠ   r'   zOptional[Charge]r   )r(   s   "r   r)   r)   å   s8   € ÷ 	eñ 	e˜sð 	e°ð 	eÀð 	eÐSVð 	eÐ[kñ 	er   c                ó
  € ^ RI Hp VP                  P                  V 4      pVf   R# VP                  P                  V4      pVe   VP
                  ^ 8:  d   R# \        T \        P                  4       ;'       g    T3WWe4      # )zUThe charge a call to *tool_name* would add, or None for an undeclared/zero-cost tool.)Ú_coreN)Útools.mcp_tool_commonrÑ   Ú_server_cost_policiesr7   r    r   rŒ   rj   )r‰   rR   rÏ   rŠ   rÑ   rŽ   rG   s   &&&&   r   Úpending_chargerÔ   å   sl   € å+Ø×(Ñ(×,Ñ,¨ZÓ8€FØ‚~ÙØ�<‰<×Ñ˜IÓ&€DØ‚|�t—y‘y A”~ÙÜ�:œxŸ|™|›~×<Ð<°Ð=¸{ÐW[ÓdÐdr   c               ó$   € V ^8„  d   QhRRRRRR/# )r$   rŽ   rA   Ú
tool_namesrÅ   r'   r   )r(   s   "r   r)   r)   ñ   s"   € ÷ ?ñ ?Ð2ð ?À	ð ?Èiñ ?r   c                ót   a€ V e	   V'       g   . # \        V4      o\        V3R lV P                   4       4      # )zÂDeclared tool names the server does not offer: a typo, or Hermes' ``mcp_<server>_`` display prefix
copied into the table. Those tools would run with no cost and no budget, so registration warns.c              3  ó8   <"  € T F  qS9  g   K  Vx € K  	  R # 5irn   r   )rF   r|   Úoffereds   & €r   rH   Ú$unknown_cost_keys.<locals>.<genexpr>÷   s   øé € Ð>™\˜°gÑ-=—!’!›\ùs   ƒ�
)r6   Úsortedr    )rŽ   rÖ   rÙ   s   &&@r   Úunknown_cost_keysrÜ   ñ   s/   ø€ ð ‚~ŸZØˆ	Ü�*‹o€GÜÔ>˜VŸ\š\Ó>Ó>Ð>r   )rU   r?   r@   )NNN)+Ú__conditional_annotations__rÍ   Ú
__future__r   r/   r±   Ú
contextlibr   Úcontextvarsr   r   Údataclassesr   Útypingr   r   r	   r
   rK   ÚCONFIG_KEYSr   r   r2   r=   rP   rV   r^   re   r²   rz   rf   r   rg   rj   ro   ru   r   r€   r†   r„   rŒ   rÔ   rÜ   )rÝ   s   @r   Ú<module>rä      s  øðô
õ #ã Û Ý %ß )Ý !ß 3Ó 3à€à8€ñ �$Ô÷ð ó ðñ �$Ô÷ð ó ðõõ2÷(2õ(BõjõYð 	�ŠÓ€Ø€ÐÓ ð +-€
Ð'Ó ,ñ 'Ð'9À2ÔF€ˆ/Ó Fõ õõEð %)Ð �MÓ (õCõñ �$Ô÷BRð BRó ðBRõJ	e÷?r   