+
    jHàjÀ  ã                  óZ   € R t ^ RIHt ^ RIHt ^ RIHtHtHt ^t	R R lt
 ! R R4      tR# )	ao  SessionStore prompt pins: the durable snapshot of the system-prompt inputs internal turns reuse.

Internal events (kanban wakes, delegation completions, startup resume) reuse the last human turn's
session-context bytes and channel prompt so the system prompt stays byte-stable; the routing entry
carries that snapshot so a gateway restart does not flip it (#125793).
)Úannotations)Úreplace)ÚAnyÚDictÚOptionalc               ó    € V ^8„  d   QhRRRR/# )é   Úpinr   ÚreturnúOptional[dict[str, Any]]© )Úformats   "Ú?/home/ubuntu/.hermes/hermes-agent/gateway/session_prompt_pin.pyÚ__annotate__r      s   € ÷ ñ ˜Sð Ð%=ñ ó    c                ó@  € \        V \        4      '       d   V P                  R4      \        8w  d   R# V P                  R4      pV P                  R4      pV P                  R4      pV P                  R4      pV P                  R4      p\        V\        4      '       d   V'       d   \        V\        4      '       g   R# \        V\
        4      '       g   R# Ve   \        V\        4      '       g   R# Ve   \        V\        4      '       g   R# R\        RVRVRVRVRV/# )zøValidated durable snapshot of the exact ephemeral inputs reused by internal turns.

``redact_pii`` is the ``privacy.redact_pii`` the context bytes were rendered under; a pin
without it cannot prove which privacy policy produced them and is refused.ÚversionNÚcontext_keyÚcontext_promptÚ
redact_piiÚchannel_promptÚparent_chat_id)Ú
isinstanceÚdictÚgetÚPROMPT_PIN_VERSIONÚstrÚbool)r	   r   r   r   r   r   s   &     r   Úsanitize_prompt_pinr      sð   € ô
 �cœ4× Ò  C§G¡G¨IÓ$6Ô:LÔ$LÙØ—'‘'˜-Ó(€KØ—W‘WÐ-Ó.€NØ—‘˜Ó&€JØ—W‘WÐ-Ó.€NØ—W‘WÐ-Ó.€NÜ�k¤3×'Ò'¯{Ä*È^Ô]`×BaÒBaÙÜ�j¤$×'Ò'ÙØÒ!¬*°^ÄS×*IÒ*IÙØÒ!¬*°^ÄS×*IÒ*IÙàÔ%Ø�{Ø˜.Ø�jØ˜.Ø˜.ðð r   c                  óB   € ] tR t^.tRtRR/R R lltRR/R R lltRtR# )	ÚSessionPromptPinMixinzFFenced read/write of ``SessionEntry.prompt_pin`` on the routing index.Úexpected_session_idNc               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   Úsession_keyr   r	   zdict[str, Any]r!   úOptional[str]r
   r   r   )r   s   "r   r   Ú"SessionPromptPinMixin.__annotate__1   s,   € ÷ ñ ØðØ%3ðØMZðà	ñr   c          
     ó|  € \        V4      pVf   R# V P                  ;_uu_ 4        V P                  V4      pVe   Ve   VP                  V8w  d    RRR4       R# VP                  V8w  d3   V P                  V\        WTR7      P                  4       RR7       WEn         RRR4       R#   + '       g   i     R# ; i)aB  Persist effective prompt inputs without letting a stale turn cross a boundary.

The candidate is durable before the in-memory entry is published. The expected session id
is the turn's launch identity: a concurrent reset or resume makes this a no-op instead of
writing the old conversation's system bytes onto the new one.
NF)Ú
prompt_pinT)Ú
entry_dataÚ	lock_held)r   Ú_lockÚ_entry_lockedÚ
session_idr'   Ú_save_entryr   Úto_dict)Úselfr#   r	   r!   ÚcleanedÚentrys   &&&$  r   Úset_prompt_pinÚ$SessionPromptPinMixin.set_prompt_pin1   s¡   € ô & cÓ*ˆØŠ?ÙØ�Z�Z‹ZØ×&Ñ& {Ó3ˆEØŠ}Ð!4Ò!@ÀU×EUÑEUÐYlÔElØ÷ ‰Zð ×Ñ 7Ô*Ø× Ñ Ø¬G°EÔ,N×,VÑ,VÓ,XÐdhð !ô jà#*Ô Ø÷ �Z�ZŠZús   ¦,B*ÁAB*Â*B;	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%   G   s)   € ÷ 
Hñ 
HØð
HØ8Eð
Hà	!ñ
Hr   c               ó:  € V P                   ;_uu_ 4        V P                  V4      pVf    RRR4       R# Ve   VP                  V8w  d    RRR4       R# VP                  '       d   \	        VP                  4      MRuuRRR4       #   + '       g   i     R# ; i)zKReturn the prompt pin only while the route still owns the caller's session.N)r*   r+   r,   r'   r   )r/   r#   r!   r1   s   &&$ r   Úget_prompt_pinÚ$SessionPromptPinMixin.get_prompt_pinG   su   € ð �Z�Z‹ZØ×&Ñ& {Ó3ˆEØŠ}Ø÷ ‰Zð #Ò.°5×3CÑ3CÐGZÔ3ZØ÷ ‰Zð .3×-=×-=Ð-=”4˜×(Ñ(Ô)À4÷ �Z�Z‹Zús   •B	¶B	ÁB	Á(B	Â	B	r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r2   r6   Ú__static_attributes__r   r   r   r    r    .   s'   † ÙPðØ]a÷ð,
HØHL÷
Hó 
Hr   r    N)r<   Ú
__future__r   Údataclassesr   Útypingr   r   r   r   r   r    r   r   r   Ú<module>rA      s/   ðñõ #å ß &Ñ &àÐ õ÷<#Hó #Hr   