+
    jHàj@  ã                   ó¼   € R t ^ RIHt  ! R R]4      tR R ltR R ltR R	 ltR
 R ltRR R llt	RR R llt
RRRR/R R lltRRRR/R R lltRR R lltR# )zMDelivery policy for engine diagnostics, never assistant or command responses.)Úresolve_display_settingc                   ó   € ] tR t^tRtRtR# )ÚDiagnosticTextzçProducer-owned classification on the legacy two-argument status callback.

String behavior and event kind stay unchanged for existing plugin renderers.
Durable carriers must serialize their own category, not this in-memory marker.
© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    ÚB/home/ubuntu/.hermes/hermes-agent/gateway/warning_notifications.pyr   r      s   † õr   r   c                ó<   € V ^8„  d   QhR\         R\         R\        /# )é   Ú
event_typeÚmessageÚreturn)ÚstrÚbool)Úformats   "r   Ú__annotate__r      s&   € ÷ Gñ G¤#ð G´ð G¼ñ Gr   c                 ó<   € V R 8H  ;'       g    \        V\        4      # )Úwarn)Ú
isinstancer   )r   r   s   &&r   Úis_warning_statusr      s   € Ø˜Ñ×FÐF¤:¨g´~Ó#FÐFr   c                ó$   € V ^8„  d   QhR\         /# ©r   r   ©r   )r   s   "r   r   r      s   € ÷ Mñ M¤Dñ Mr   c                ó�   € \        V RR4      R9   ;'       g0    \        \        V RR4      ;'       g    R4      P                  R4      # )a	  Out-of-band ``AgentNotice`` classification shared by the gateway, TUI and CLI sinks.

Credit-service notices are automatic diagnostics at every level (usage bands are ``info``,
``credits.restored`` is ``success``); everything else is diagnostic only when it warns.
ÚlevelNÚkeyÚ zcredits.>   r   Úerror)Úgetattrr   Ú
startswith)Únotices   &r   Úis_diagnostic_noticer&      sL   € ô �F˜G TÓ*Ð.?Ñ?÷ Lð LÜ”7˜6 5¨"Ó-×3Ð3°Ó4×?Ñ?À
ÓKðMr   c                ó$   € V ^8„  d   QhR\         /# r   ©Údict)r   s   "r   r   r      s   € ÷ ñ ¤$ñ r   c                óŠ   € \        V RR4      '       d0   \        V RR4      ;'       g    / P                  R4      R8X  d   RR/# / # )z¡``{"notification_category": "diagnostic"}`` for a trusted diagnostic-only wake, else ``{}``.

Only internal wakes may classify a turn; human content never does.
ÚinternalFÚmetadataNÚnotification_categoryÚ
diagnostic)r#   Úget)Úevents   &r   Údiagnostic_metadatar1      sM   € ô
 ˆu�j %×(Ò(¬g°e¸ZÈÓ.N×.TÐ.TÐRT×-YÑ-YØ#ó.%Ø(4ô.5à'¨Ð6Ð6Ø€Ir   c                ó$   € V ^8„  d   QhR\         /# r   r(   )r   s   "r   r   r   '   s   € ÷ 6ñ 6œtñ 6r   c                 óx   € ^ RI Hp   V ! 4       p\        T\        4      '       d   T# / #   \         d    / u # i ; i)zbThe active profile's effective config, or ``{}`` when it cannot be read (presentation fails open).)Úload_user_config_effective)Úhermes_cli.config_effectiver4   Ú	Exceptionr   r)   )r4   Úconfigs     r   Úeffective_user_configr8   '   sA   € åFðÙ+Ó-ˆô   ¬×-Ò-ˆ6Ð5°2Ð5øô ô ØŠ	ðús   ˆ) ©9¸9Nc                ó$   € V ^8„  d   QhR\         /# r   r   )r   s   "r   r   r   1   s   € ÷ Jñ JÌ4ñ Jr   c                ón   € T ;'       g    / P                  R4      R8H  ;'       d    \        W4      '       * # )z¨One admission rule for every surface: a diagnostic-category wake mutes its turn's
presentation only when the owning policy hides diagnostics. Human content never mutes.r-   r.   )r/   Úwarning_notifications_enabled)Údisplay_metadataÚplatformÚuser_configs   &&&r   Údiagnostic_turn_mutedr?   1   s=   € ð ×#Ð# ×(Ñ(Ð)@ÓAÀ\ÑQ÷ Ið IÜ1°(ÓHÔHðJr   c                ó$   € V ^8„  d   QhR\         /# r   r   )r   s   "r   r   r   8   s   € ÷ Nñ N´dñ Nr   c                óà   € \        V RR4      p\        V\        4      '       d   V# \        \        V RR4      4      ;'       d-    \        \        V RR4      V P                  P
                  V4      # )zHOnly trusted diagnostic-only wakes can mute a turn, never human content.Ú_notification_reply_mutedNr+   Fr,   )r#   r   r   r?   Úsourcer=   )r0   r>   Úsnapshots   && r   Údiagnostic_wake_mutedrE   8   si   € ä�uÐ9¸4Ó@€HÜ�(œD×!Ò!ØˆÜ”˜˜z¨5Ó1Ó2÷ Nð NÔ7LÜ��z 4Ó(¨%¯,©,×*?Ñ*?Àó8Nð Nr   r.   Tr>   c                ó$   € V ^8„  d   QhR\         /# r   r   )r   s   "r   r   r   A   s   € ÷ 
ñ 
ÔSWñ 
r   c               óJ   € V'       d   \        W4      '       g   R# V ! 4        R# )a@  Invoke a synchronous UI renderer only when its classified content is visible.

Return whether the renderer ran, not whether a transport delivered anything.
Call only at a presentation sink, never around producer callbacks or persistence.
The caller supplies the owning scope/turn snapshot; exceptions remain its policy.
FT©r;   )Úrenderr=   r.   r>   s   &$$$r   Úrender_notificationrJ   A   s   € ÷ Ô7¸×NÒNÙÙ
„HÙr   c                ó$   € V ^8„  d   QhR\         /# r   r   )r   s   "r   r   r   N   s   € ÷ 	ñ 	Ô[_ñ 	r   c             ƒ  óf   "  € V'       d   \        W4      '       g   R# V ! 4       G Rj  x€L
  R#  L5i)a  Async twin of :func:`render_notification` for lifecycle emitters that await a send.

Return whether the presenter ran; its own receipt/exception is the caller's to interpret.
The caller binds the owning profile scope BEFORE calling (watchers/shutdown fan-outs).
FNTrH   )Úpresentr=   r.   r>   s   &$$$r   Úpresent_notificationrN   N   s)   é € ÷ Ô7¸×NÒNÙÙ
‹)‡O€OÙñ ùs   ‚&1¨/©1c                ó$   € V ^8„  d   QhR\         /# r   r   )r   s   "r   r   r   Z   s   € ÷ kñ kÄñ kr   c                óŽ   € Vf   \        4       pM\        V\        4      '       g   / p\        V RV 4      p\	        WRR4      '       * # )zïUse the turn snapshot when supplied, otherwise the active profile's effective config.

No surface exemption: direct command/API outcomes are not notifications.
Unknown values never opt in; null inherits via the canonical display resolver.
ÚvalueÚsuppress_warning_notificationsF)r8   r   r)   r#   r   )r=   r>   Úplatform_keys   && r   r;   r;   Z   sF   € ð ÒÜ+Ó-‰Ü˜¤T×*Ò*ØˆÜ˜8 W¨hÓ7€LÜ& {ÐBbÐdiÓjÔjÐjr   )N)r
   Úgateway.display_configr   r   r   r   r&   r1   r8   r?   rE   rJ   rN   r;   r   r   r   Ú<module>rU      sl   ðÙ Så :ô�Sô õGõMõõ6÷J÷Nð
¸ð 
È$÷ 
ð	Àð 	ÐRV÷ 	÷kñ kr   