+
    lHàjp   ã                  óH  a € 0 t $ R t^ RIHt ^ RIHt / RR1bRR1bRR2bRR2bRR3bRR3bR	R4bR
R5bRR6bRR7bRR8bRR9bRR:bRR;bRR<bRR=bRR>btR]R&   RR?RR2RR@RRARRBRRCRRD/tR]R&   REt	Rt
R R ltR R  ltRFR" R# lltRGR%R!/R& R' llltRHR( R) lltRItR* R+ ltR,tR-tR.tR/ R0 ltR$# )Ju?  User-facing copy for gateway refusals and session-level failures.

One place for the sentences the TUI, Desktop and dashboard print verbatim, so the
"what happened / what to do" shape stays consistent and the slash commands cited
(`/model`, `/new`, `/sessions`, `/retry`) exist on EVERY client this gateway serves (TUI,
Desktop, dashboard) â€” no client-only forms (`/sessions new`, `/setup`) and no single-surface
gestures stated as fact (Ctrl+C is copy on Desktop). Lead phrases that clients pattern-match
on (``Session busy``) are part of the wire contract â€” keep them.
)Úannotations)ÚAnyÚauthÚauth_permanentÚbillingÚbilling_unverifiedÚ
rate_limitÚupstream_rate_limitÚupstream_blockedÚ
overloadedÚserver_errorÚtimeoutÚcontext_overflowÚpayload_too_largeÚmodel_not_foundÚcontent_policy_blockedÚprovider_policy_blockedÚformat_errorÚssl_cert_verificationzdict[str, tuple[str, str]]Ú_TURN_ERROR_CODE_COPYÚendpointÚ	streamingÚdiskÚgatewayÚproviderÚ_TURN_ERROR_LAYER_COPYi�  c               ó    € V ^8„  d   QhRRRR/# ©é   Úsurfaceúdict | NoneÚreturnÚstr© )Úformats   "Ú>/home/ubuntu/.hermes/hermes-agent/tui_gateway/user_messages.pyÚ__annotate__r&   5   s   € ÷ 0ñ 0�{ð 0 sñ 0ó    c                óš   € \        T ;'       g    / P                  R 4      ;'       g    R4      P                  4       pV'       d   RV R2# R# )r   Ú z (Ú))r"   ÚgetÚstrip)r   r   s   & r%   Ú	_identityr-   5   sD   € Ü�G—M�M˜r×&Ñ& zÓ2×8Ð8°bÓ9×?Ñ?ÓA€Hß'ˆR�ˆz˜ÐÐ/¨RÐ/r'   c               ó    € V ^8„  d   QhRRRR/# r   r#   )r$   s   "r%   r&   r&   :   s   € ÷ *ñ *˜kð *¨cñ *r'   c                ó`  € \        V \        4      '       d   T M/ p \        P                  \	        V P                  R4      ;'       g    R4      4      ;'       gF    \
        P                  \	        V P                  R4      ;'       g    R4      4      ;'       g    \        w  rV \        V 4       2# )zMPlain title for a failed turn, picked from ``error_surface`` code then layer.Úcoder)   Úlayer)Ú
isinstanceÚdictr   r+   r"   r   Ú_TURN_ERROR_DEFAULTr-   )r   ÚtitleÚ_s   &  r%   Úturn_error_titler7   :   s”   € ä# G¬T×2Ò2‰g¸€GÜ$×(Ñ(¬¨W¯[©[¸Ó-@×-FÐ-FÀBÓ)GÓH÷ ^ð ^Ü!×%Ñ%¤c¨'¯+©+°gÓ*>×*DÐ*DÀ"Ó&EÓF÷^ð ^ÜJ]ñ €EàˆW”Y˜wÓ'Ð(Ð)Ð)r'   Tc               ó$   € V ^8„  d   QhRRRRRR/# )r   r   r    ÚrecoverableÚboolr!   r"   r#   )r$   s   "r%   r&   r&   B   s&   € ÷ bñ b˜[ð b°tð bÀsñ br'   c                óz  € \        V \        4      '       d   T M/ p \        P                  \	        V P                  R 4      ;'       g    R4      4      ;'       gF    \
        P                  \	        V P                  R4      ;'       g    R4      4      ;'       g    \        w  r#V'       d   V# VP                  RR4      # )r0   r)   r1   zSend /retryzPick another model with /model)r2   r3   r   r+   r"   r   r4   Úreplace)r   r9   r6   Úhints   &&  r%   Úturn_error_hintr>   B   s˜   € Ü# G¬T×2Ò2‰g¸€GÜ#×'Ñ'¬¨G¯K©K¸Ó,?×,EÐ,EÀ2Ó(FÓG÷ ^ð ^Ü!×%Ñ%¤c¨'¯+©+°gÓ*>×*DÐ*DÀ"Ó&EÓF÷^ð ^ÜJ]ñ €Açˆ4Ða D§L¡L°Ð@`Ó$aÐar'   Nr9   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   Úerrorr   r   r    r9   r:   r!   r"   r#   )r$   s   "r%   r&   r&   I   s)   € ÷ 
ñ 
˜3ð 
¨ð 
ÈTð 
Ð]`ñ 
r'   c               óh  € RP                  \        T ;'       g    R4      P                  4       4      p\        V4      \        8”  d   VR\        ^,
           R,           p\        V4       R2.pV'       d   VP                  RV 24       VP                  \        W4      4       RP                  V4      # )z¥The assistant-slot text for a turn that produced no reply: title, what it means for the
user, the raw provider detail on its own dimmed-able line, and the next step.Ú r)   Nu   â€¦z . Your message was not answered.z	Details: Ú
)Újoinr"   ÚsplitÚlenÚ_DETAIL_LIMITr7   Úappendr>   )r@   r   r9   ÚdetailÚliness   &&$  r%   Úturn_error_textrK   I   s•   € ð �X‰X”c˜%Ÿ+˜+ 2Ó&×,Ñ,Ó.Ó/€FÜ
ˆ6ƒ{”]Ô"ØÐ*œ¨Õ*Ð+¨eÕ3ˆÜ  Ó)Ð*Ð*JÐKÐL€EßØ�‰�y  Ð)Ô*Ø	‡L�L” Ó6Ô7Ø�9‰9�UÓÐr'   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úcommandr"   Úcompressingr:   r!   r#   )r$   s   "r%   r&   r&   V   s&   € ÷ Kñ K˜#ð K¨Dð K¸Sñ Kr'   c                óf   € V'       d   RV P                  R4       R2# RV P                  R4       R2# )ug  4009 refusal for a history-mutating command while a reply is streaming. There is no
``/interrupt`` slash command on any client: Desktop has a Stop button, the terminal TUI uses
Ctrl+C â€” name both without assuming which one the reader has. A manual /compress also holds
the session busy, but nothing is replying and Stop does not end it: say to wait instead.u.   session busy â€” a /compress is running; run /Ú/z when it finishes.uz   session busy â€” Hermes is still replying. Stop the current reply first (Stop button, or Ctrl+C in a terminal), then run /Ú.)Úlstrip)rM   rN   s   &&r%   Úbusy_messagerS   V   sC   € ÷
 Ø?ÀÇÁÈsÓ@SÐ?TÐTfÐgÐgð3Ø3:·>±>À#Ó3FÐ2GÀqðJð Kr'   c               ó    € V ^8„  d   QhRRRR/# ©r   Úexcr   r!   r"   r#   )r$   s   "r%   r&   r&   m   s   € ÷ mñ m 3ð m¨3ñ mr'   c                ó¬   a € \         ;QJ d#    V 3R  l\         4       F  '       g   K   RM	  RM! V 3R  l\         4       4      '       d   RS  R2# RS  R2# )c              3  ó>   <"  € T F  q\        S4      9   x € K  	  R # 5i©N)r"   )Ú.0ÚprefixrV   s   & €r%   Ú	<genexpr>Ú,agent_init_failed_message.<locals>.<genexpr>n   s   øé € Ð
HÑ,G &”S˜“XÖÓ,Gùs   ƒTFz@Hermes could not start the assistant for this session. Details: u‰   . Wait for the other process to release the lock (or exit it â€” check for a running dashboard or background hermes process), then retry.z_. Check the model and provider with /model, or run `hermes setup` in a terminal to reconfigure.)ÚanyÚ_AUTH_LOCK_TIMEOUT_PREFIXES©rV   s   fr%   Úagent_init_failed_messagera   m   s_   ø€ ß
ƒsÔ
HÕ,GÓ
H‡s‡s‚sÔ
HÕ,GÓ
H×HÒHØRÐSVÐRWð XGð Gð 	Hð OÈsÈeð Tlð lð mr'   zŽHermes is still starting this session (loading tools), so this command could not run yet. Wait for the status bar to show ready and try again.zQagent build aborted: the session was closed or replaced before the build finishedz˜Hermes could not start the assistant for this session, so your message was not run. Reopen the session (or start a new one with /new) and send it again.c               ó    € V ^8„  d   QhRRRR/# rU   r#   )r$   s   "r%   r&   r&   ƒ   s   € ÷ Kñ K˜sð K sñ Kr'   c                ó   € R V  R2# )zKCould not reopen that session (its transcript could not be read). Details: z=. Start a new session (/new), or pick another from /sessions.r#   r`   s   &r%   Úresume_failed_messagerd   ƒ   s   € ØYÐZ]ÐY^ð _Jð Jð Kr'   )z'The model provider rejected the API keyz%Fix the key with /model, then /retry.)z)The model provider reports no credit leftz)Top up the account or switch with /model.)z,The model provider is rate-limiting requestsúWait a moment, then /retry.)zAA firewall/CDN in front of the model provider blocked the requestzISet a User-Agent via the provider's extra_headers, or switch with /model.)z The model provider is overloadedre   )z(The model provider had an internal errorre   )z)The model provider did not answer in timez6Try /retry; if it keeps happening, switch with /model.)z+The conversation is too long for this modelúRun /compress, then /retry.)z(The request was too large for this modelrf   )z+The model provider does not know this modelzPick another model with /model.)z8The model provider refused this request (content policy)zRephrase and send again.)z8The model provider refused this request (account policy)zSwitch with /model.)z.The model provider rejected the request formatz/Try /retry; if it persists, switch with /model.)z@The connection to the model provider could not be verified (TLS)z.Check the endpoint's certificate, then /retry.)z+The model provider rejected the credentialsz"Fix them with /model, then /retry.)z)Your custom model endpoint did not answerz+Check the endpoint is running, then /retry.)z6The connection to the model provider dropped mid-replyzSend /retry.)z3The disk is full, so Hermes could not save the turnzFree some space, then /retry.)z4Hermes hit an internal error while running this turnz&Send /retry; type /logs for the trace.)z$The model provider returned an errorú#Send /retry, or switch with /model.)zThe request failedrg   )TrY   )F)z%Timed out waiting for auth store lockz+Timed out waiting for shared Nous auth lock)Ú__conditional_annotations__Ú__doc__Ú
__future__r   Útypingr   r   Ú__annotations__r   r4   rG   r-   r7   r>   rK   rS   r_   ra   ÚAGENT_STILL_STARTINGÚAGENT_BUILD_ABANDONEDÚAGENT_MISSING_FOR_TURNrd   )rh   s   @r%   Ú<module>rp      s¦  øðôõ #å ð5Ø
Ð`ð5àÐjð5ð Ðið5ð Ðtð	5ð
 Ðað5ð Ðjð5ð ð  kð5ð ÐUð5ð Ð_ð5ð Ðvð5ð Ðfð5ð Ðdð5ð Ðið5ð Ðvð5ð Ðrð5ð  Ðyð!5ð" ð Pð#5Ð Ð1ó ð, ÐaØÐiØÐlØÐ[Ø
ÐdØÐqØÐ_ð6Ð Ð2ó ð TÐ à€õ0õ
*÷bñ
ÐTX÷ 
ð 
÷Kð"Ð õmð;ð ð lÐ ðKð ÷
Kr'   