+
    iHàjR  ã                  ó�   € R t ^ RIHt ^ RIHtHtHt R R ltR R ltR R lt	R	 R
 lt
R R ltR tR R ltR R ltR R ltR# )a   The onboarding chat's per-session pieces, shared by every runtime that hosts it (the session
authority's local turns and the old sidecar): the ``onboarding`` toolset fold-in, the scripted opening
and the per-turn note. Pure over the agent and the run record (``agent.onboarding_record``).)Úannotations)ÚAnyÚIterableÚIteratorc               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚbool© )Úformats   "Ú=/home/ubuntu/.hermes/hermes-agent/agent/onboarding_session.pyÚ__annotate__r   
   s   € ÷ Lñ L ñ Ló    c                ó6   € R \        V RR4      ;'       g    R9   # )Ú
setup_beatÚvalid_tool_namesNr   )Úgetattr)Úagents   &r   Úbuilds_onboardingr   
   s   € ØœG EÐ+=¸tÓD×JÐJÈÑKÐKr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r      s   € ÷ Lñ L˜tñ Lr   c                óB   € V RJ;'       d    V '       * ;'       g    RV 9   # )z\An explicit empty list is a zero-tool chat; None is unrestricted and still gets the fold-in.NÚ
onboardingr   )Úenableds   &r   Úkeeps_toolsetsr      s$   € à˜$Ð×KÐK¨¤K×$JÐ$J°<À7Ñ3JÐKr   c               ó   € V ^8„  d   QhRR/# )r   r	   z	list[str]r   )r   s   "r   r   r      s   € ÷ $ñ $ 	ñ $r   c                ól   € V f'   ^ RI HpHp V! 4        Uu. uF  q3V9  g   K  VNK  	  p p. V ORN# u upi )z¾*enabled* plus onboarding. None (every toolset outside the session-gated ones, which onboarding
is) is spelled out by name: the agent's other toolset gates read the names, as they read None.)ÚTOOLSET_SESSION_PLATFORMSÚget_all_toolsetsr   )Útoolsetsr   r   )r   r   r   Únames   &   r   Úwith_onboardingr!      sC   € ð ‚ßHÙ$4Ô$6Ó`Ñ$6˜DÐF_Ñ:_—4�4Ñ$6ˆÐ`Ø#ˆWÐ#�lÐ#Ð#ùò as   –1£1c               ó   € V ^8„  d   QhRR/# ©r   Ú
session_idÚstrr   )r   s   "r   r   r      s   € ÷ Tñ T°ñ Tr   c                ó‚   € ^ RI Hp ^ RIHp \	        V 4      '       d   V # V! V! W4      4      '       d   \        V 4      # T # )zÝ*enabled* plus ``onboarding`` for a chat whose run is in progress. Decided once, at agent build:
the tool array is part of the cached prefix, so a finished run keeps setup_beat (as a refusal)
until the session is rebuilt.©Ú	is_active©Úload)Úagent.onboarding_flowr(   Úagent.onboarding_recordr*   r   r!   )r   Údbr$   r(   r*   s   &&&  r   Úonboarding_toolsetsr.      s9   € õ 0Ý,Ü�g×ÒØˆÙ'0±°bÓ1E×'FÒ'FŒ?˜7Ó#ÐSÈGÐSr   c               ó   € V ^8„  d   QhRR/# r#   r   )r   s   "r   r   r   '   s   € ÷ 	Nñ 	N°cñ 	Nr   c                ó    € ^ RI Hp \        V 4      '       g   Vf   V # VP                  V4      ;'       g    TpV! W4      e   \	        V 4      # T # )a|  The session authority's per-turn fold-in: *enabled* plus ``onboarding`` for a chat that is or was
an onboarding chat. Keyed on the record existing, never on the run being open, because the
authority resolves toolsets every turn and the tool array is part of the cached prefix: a run that
ends must not change it mid-conversation (setup_beat answers a finished run with a refusal).r)   )r,   r*   r   Úget_compression_tipr!   )r   r-   r$   r*   Útips   &&&  r   Úonboarding_chat_toolsetsr3   '   sL   € õ
 -Ü�g×Ò "¢*ØˆØ
×
 Ñ
  Ó
,×
:Ð
:°
€CÙ'+¨B£}Ò'@Œ?˜7Ó#ÐMÀgÐMr   c                óv   € \        V 4      '       g   R\        VRR4      ;'       g    R9  d   V # \        V 4      # )zEA tool refresh keeps the onboarding toolset the agent was built with.r   Úenabled_toolsetsNr   )r   r   r!   )r   r   s   &&r   Úcarry_onboarding_toolsetr6   3   s8   € ä�g×Ò ,´w¸uÐFXÐZ^Ó7_×7eÐ7eÐceÔ"fØˆÜ˜7Ó#Ð#r   c               ó    € V ^8„  d   QhRRRR/# )r   ÚhistoryzIterable[dict]r	   z&Iterator[tuple[str, str, dict]] | Noner   )r   s   "r   r   r   :   s   € ÷ ñ  ~ð Ð:`ñ r   c                óÐ  aa	€ ^ RI HpHp ^ RIHp ^ RIHp \        V 4      '       g   R# V! V P                  V P                  4      pVe$   V! V4      '       d   VR,          R,          V8w  d   R# T! VP                  R4      ;'       g    / P                  R4      4      o\        ;QJ d    V3R	 lV 4       F  '       g   K   R
M	  RM! V3R	 lV 4       4      o	VV	3R lpV! 4       # )z˜The opening's scripted step, greeting and name card, while the name beat was never shown. A
greeting already in the chat (a relaunch) is not said twice.)ÚPENDINGr(   r)   )ÚgreetingNÚbeatsr    ÚfactsÚlocalec              3  ó‚   <"  € T F4  qP                  R 4      R8H  ;'       d    VP                  R4      S8H  x € K6  	  R# 5i)ÚroleÚ	assistantÚcontentN)Úget)Ú.0ÚmÚhellos   & €r   Ú	<genexpr>Ú%onboarding_prelude.<locals>.<genexpr>F   s7   øé € Ð[ÑSZÈa�u‰u�V‹} Ñ+×IÐI°·±°iÓ0@ÀEÑ0IÔIÓSZùs   ƒ?¢?TFc               3  ó6   <"  € S'       d   R MS RRR/3x € R# 5i)Ú r   Úbeatr    Nr   )rF   Úsaids   €€r   ÚopeningÚ#onboarding_prelude.<locals>.openingH   s   øé € ß‰r˜u |°f¸fÐ5EÐEÔEùs   ƒ)r+   r:   r(   r,   r*   Úagent.onboarding_textr;   r   Ú_session_dbr$   rC   Úany)
r   r8   r:   r(   r*   r;   ÚrecordrM   rF   rL   s
   &&      @@r   Úonboarding_preluderS   :   s¬   ù€ ÷ 9Ý,Ý.Ü˜U×#Ò#ÙÙ�%×#Ñ# U×%5Ñ%5Ó6€FØ‚~™Y v×.Ò.°&¸µ/À&Õ2IÈWÔ2TÙÙ�f—j‘j Ó)×/Ð/¨R×4Ñ4°XÓ>Ó?€Eß‹3Ô[ÑSZÓ[�3�3Š3Ô[ÑSZÓ[Ó[€DöFá‹9Ðr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úhistory_emptyr
   Úcard_waitingr	   r%   r   )r   s   "r   r   r   M   s&   € ÷ 	Yñ 	Y°$ð 	YÀdð 	YÈsñ 	Yr   c               óò   € ^ RI Hp ^ RIHp ^ RIHp V'       g   V'       g   \        V 4      '       g   R# V! V P                  V P                  4      pVe!   V! V4      '       d   V! V4      ;'       g    R# R# )znBefore a user turn in the onboarding chat, while no card waits: which card is closed and how to
bring it back.r'   r)   )Ú	turn_noterJ   )	r+   r(   r,   r*   rO   rX   r   rP   r$   )r   rU   rV   r(   r*   rX   rR   s   &$$    r   Úonboarding_turn_noterY   M   s`   € õ 0Ý,Ý/ßŸÔ,=¸e×,DÒ,DÙÙ�%×#Ñ# U×%5Ñ%5Ó6€FØ(.Ò(:¹yÈ×?PÒ?P‰I�fÓ×#Ð# ÐXÐVXÐXr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r   r   Únoter%   r	   ÚNoner   )r   s   "r   r   r   Y   s&   € ÷ Tñ T˜Cð T sð T¨tñ Tr   c                ót   € V'       d0   \        V R R4      ;'       g    RpV'       d   V RV 2MTV n        R# R# )Ú_gateway_turn_context_notesrJ   z

N)r   r^   )r   r[   Úpriors   && r   Úappend_turn_noter`   Y   s8   € ßÜ˜Ð<¸bÓA×GÐGÀRˆßDI¨u¨g°T¸$¸Ñ,@ÈtˆÖ)ñ r   N)Ú__doc__Ú
__future__r   Útypingr   r   r   r   r   r!   r.   r3   r6   rS   rY   r`   r   r   r   Ú<module>rd      sI   ðñ`õ #ç *Ñ *õLõLõ
$õTõ	Nò$õõ&	Y÷Tr   