+
    jHàjá<  ã                  ó"  € R t ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RIHt ]P                  ! ]4      tRt ! R R]4      t ! R	 R
]4      tR tR tR tR tR tR t ! R R4      tR tR tR tR tR tR t R t!R t"R t#R t$R# )aø  First-run onboarding on the session authority: ``onboarding.start`` and ``onboarding.skip``.

The onboarding chat is an ordinary local Desktop session the authority owns from its first row: the
start creates it here, writes the run record (``agent.onboarding_record``) before any agent is built,
attaches the asking connection and admits the hidden opening turn through the same durable FIFO as a
typed message. The record is what makes it an onboarding chat for every later turn: the ``onboarding``
toolset fold-in (``run_turn``), the scripted greeting and name card and the per-turn note
(``run_turn_runner``), all from ``agent.onboarding_session``. ``onboarding.state`` and
``onboarding.set_run`` read and write only config and stay on the sidecar handler.
)ÚannotationsN)Úpartial)Ú
SessionRef)ÚRuntimeStoreErrorÚdefaultc                  ó,   a € ] tR t^tRtV 3R ltRtV ;t# )ÚOnboardingRefusalzMA refusal on the sidecar handler's wire: its JSON-RPC code and human message.c                	óF   <€ \         SV `  R VR7       WuV n        V n        R# )Úonboarding_refused©ÚdetailN)ÚsuperÚ__init__Ú	wire_codeÚwire_message)ÚselfÚcodeÚmessageÚ	__class__s   &&&€Ú?/home/ubuntu/.hermes/hermes-agent/gateway/session_onboarding.pyr   ÚOnboardingRefusal.__init__   s%   ø€ Ü‰ÑÐ-°gÐÔ>Ø,0Ð)ˆŒ˜Ö)ó    )r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__static_attributes__Ú__classcell__)r   s   @r   r   r      s   ø† ÙW÷:ó :r   r   c                  ó   € ] tR t^#tRtRtR# )Ú_NoModelForTheRunzFThe claim was blocked and nothing else can carry the run's first chat.© N)r   r   r   r   r   r   r!   r   r   r    r    #   s   † ÝPr   r    c                óF   € R \        \        V 4      R\        \        V 4      /# )zonboarding.startzonboarding.skip)r   ÚstartÚskip©Ú
connections   &r   Úhandlersr'   '   s"   € Ø¤¬¨zÓ :Ð<MÌwÔW[Ð]gÓOhÐiÐir   c                ó@   € V P                  \        4      ;'       g    T # ©N)Ú_sibling_forÚONBOARDING_PROFILEr%   s   &r   Ú_onboarding_connectionr,   +   s   € Ø×"Ñ"Ô#5Ó6×DÐD¸*ÐDr   c              ƒ  óÆ  aaa"  € ^ RI Hp ^ RIHp  VP	                  V4      p\        T 4      pYpJd@   ^ RIH	p T! TP                  4      ;_uu_ 4        \        YqT4      G Rj  x€L
 uuRRR4       # RT P                  P                  9  d   \        R4      hT P                  o\        SR	R4      p	T	f   \        P                   ! 4       ;p	Sn        T	;_uu_4       GRj  x€L
  \        P$                  ! \&        ST4      G Rj  x€L
 p
T
R
,          ;'       g    \)        T 4      G Rj  x€L
 p^ RIHo ^ RIHp \3        S4      pTP4                  '       d.   TP6                  P9                  TT3R lT
R,           4       4       TT3R lp T! S\;        \<        SYZY½4      T4      G Rj  x€L
 pTP6                  P?                  T
R,          4       T
R,          e/   ^ RI H!p \        P$                  ! TPD                  4      G Rj  x€L
  \G        ST
R,           Uu. uF  pTT9  g   K  TNK  	  up4       \I        SPJ                  T4      pT PM                  T/ 4      G Rj  x€L
  T
R
,          '       d
   T
R,          M#\        P$                  ! \N        ST4      G Rj  x€L
 pTeT   \        P$                  ! \P        ST4      G Rj  x€L
 pT PS                  TRTRTRRRRT;'       g    T 2/4      G Rj  x€L
  RTRTRT
R
,          RJR\        P$                  ! \P        ST4      G Rj  x€L
 /uuRRR4      GRj  x€L
  #   T d   p\        R\        T4      R7      ThRp?ii ; i EL   + '       g   i     EL; i EL› ELz ELY ELÜ  TP6                  P?                  T
R,          4       i ; i EL«u upi  ELW EL Lø LË L™ L‰  + GRj  x€L 
 '       g   i     R# ; i5i)é    )ÚOnboardingStartParams©ÚValidationErrorÚinvalid_paramsr   N)Úowner_scopezsession:createÚpermission_deniedÚ_onboarding_start_lockÚstored)Úretire_live_sessions©Útracked_writec              3  óŽ   <"  € T F:  pSP                   P                  V4      ;oe   SP                  '       d   K6  Vx € K<  	  R # 5ir)   )ÚsessionsÚgetÚsubscribers)Ú.0ÚsidÚ	authorityÚlives   & €€r   Ú	<genexpr>Ústart.<locals>.<genexpr>J   s@   øé € ð  jÑ/?¨Ø,5×,>Ñ,>×,BÑ,BÀ3Ó,GÐ$G DÒ#PÐX\×XhÕXh÷ !$¢Ó/?ùs
   ƒ3A»
AÚreplacedc                ó   <€ S! SV 4       V # r)   r!   )Údeletedr@   r7   s   &€€r   ÚretireÚstart.<locals>.retireM   s   ø€ Ù  ¨GÔ4ØˆNr   Úclaimed)Úfree_tier_bootstrapÚopeningÚ
session_idÚtextÚdisplay_kindÚhiddenÚsubmission_idzonboarding-opening:Ústored_session_idÚresumedÚrun_id)*Ú?tui_gateway.contracts.profiles_vault_complete_foreign_subagentsr/   Úpydanticr1   Úmodel_validater   Ústrr,   Úgateway.session_authoritiesr3   r@   r#   ÚactorÚcapabilitiesÚgetattrÚasyncioÚLockr5   Ú	to_threadÚ_choose_runÚ_create_chatÚgateway.session_mutationsr7   Úgateway.session_runtime_workersr9   Ú	_discardsÚfresh_launchÚidsÚupdater   Ú_settle_runsÚdifference_updateÚ
hermes_clirJ   Úrefresh_recordÚ_withdraw_setup_cardsr   Ú
profile_idÚresumeÚ_opening_forÚ_run_idÚsubmit)r&   ÚrefÚparamsr/   r1   ÚrequestÚexcÚtargetr3   ÚlockÚplanr6   r9   ÚdiscardsrG   rF   rJ   r?   ÚchatrK   rS   r@   rA   r7   s   &&&                  @@@r   r#   r#   /   sB  úé € ÝeÝ(ðLØ'×6Ñ6°vÓ>ˆô $ JÓ/€FØÓå;Ù˜×)Ñ)×*Õ*Ü˜v¨FÓ3×3÷ +Ò*à˜z×/Ñ/×<Ñ<Ô<ÜÐ 3Ó4Ð4Ø×$Ñ$€IÜ�9Ð6¸Ó=€DØ‚|Ü29·,²,³.Ð@ˆˆyÔ/ç�tŠtÜ×&Ò&¤{°I¸wÓG×GˆØ�h•×AÐA¬°jÓ)A×#AˆÝBÝAÜ˜YÓ'ˆØ××ÐØ�L‰L×Ñõ  j¨t°JÖ/?ó  jô jö	ð	=Ù)¨)´W¼\È9ÐV]ÐekÓ5vØ*0ó2÷ 2ˆGð �L‰L×*Ñ*¨4°
Õ+;Ô<Ø�	�?Ò&Ý6Ü×#Ò#Ð$7×$FÑ$FÓG×GÐGÜ˜i¸¸jÖ9IÓ)`Ñ9I°#ÈSÐX_ÑM_¯#¨#Ñ9IÑ)`ÔaÜ˜)×.Ñ.°Ó7ˆØ×Ñ  bÓ)×)Ð)Ø%)¨(§^¤^�$�y–/¼w×?PÒ?PÔQ]Ð_hÐjpÓ?q×9qˆØÒÜ"×,Ò,¬W°iÀÓH×HˆFØ×#Ñ# D¨<¸ÀÈÐR`ÐbjØ+:Ð>QÐRX×RbÐRbÐ\bÐQcÐ<dð+fó g÷ gð gà˜fÐ&9¸6À9ÈdÐS[ÍnÐdhÐNhØ¤× 1Ò 1´'¸9ÀfÓ M×MðO÷; �tŠtøð ô LÜÐ 0¼¸S»ÔBÈÐKûðLúò 4÷ +×*Ð*úò ÚGÚ#Aò2øð �L‰L×*Ñ*¨4°
Õ+;Õ<úò HùÚ)`â)Ú9qáHñgñ N÷= �t�t‹tüst  …O!“L> ¤0O!ÁM'Á$M$Á%M'Á(A8O!Ã M;Ã!O!Ã$ OÄM>ÄOÄOÄ(NÄ)A!OÆNÆ(NÆ)NÆ-AOÈN.ÈOÈ	N1È'N1È-2OÉN6É OÉ3(OÊN9Ê'OËN<Ë OË%OË2N>Ë33OÌ&O Ì'OÌ+O!Ì8OÌ9O!Ì>M!ÍMÍM!Í!O!Í$M'Í'M8	Í2
O!Í>OÎOÎNÎ$N+Î+OÎ1OÎ9OÎ<OÎ>OÏ OÏO!ÏO	Ï
OÏ
O	ÏO	Ï	O!c                óœ  € ^ RI Hp ^ RIHp ^ RIHpHp ^ RIHp ^ RI	H
p V P                  pV! V4      p	VP                  '       g   VP                  '       d   RM\        \        V	4      R4      p
RT
RT	R	RR
RRRRV	 Uu. uF  q»V
8w  g   K  VNK  	  up/pV
e`   VP!                  V! WŠ4      R
,          4      pVP#                  V
4      ;'       g    / P%                  R4      '       g   V! V4      VR&   WÜR
&   V# V! VP&                  P(                  VP*                  R7      VR
&   VP                  '       g    \-        VP.                  R7      VR	&   V# V# u upi   T d2   p\0        P3                  RT4       \5        R\7        T4      4      ThRp?i\8         d2   p\0        P3                  RT4       \5        R\7        T4      4      ThRp?ii ; i)ztA refused claim (5079) or a blocked one with nothing else to run on (5080) leaves no chat, so
the install stays due.)Ú
read_facts©ÚFacts)ÚloadÚopen_session_ids©Úopening_prompt)Ú	AuthErrorNr6   Úopen_idsrI   ÚfactsrK   rD   Úmessage_count)Úfacts_sourceÚlocale©Úassume_freshz/onboarding.start: welcome trial not claimed: %si×  z$onboarding.start: no chat opened: %séØ  )Úagent.onboarding_factsr{   Úagent.onboarding_flowr}   Úagent.onboarding_recordr~   r   Úagent.onboarding_textr�   Úhermes_cli.auth_constantsr‚   ÚdbÚrerunrd   ÚnextÚiterÚfrom_storedÚget_sessionr<   r†   Úvaluer‡   Ú_claim_before_runr‰   ÚloggerÚinfor   rW   r    )r@   rs   r{   r}   r~   r   r�   r‚   r�   rƒ   r6   r?   rw   r„   rt   s   &&             r   r_   r_   d   s“  € õ 2Ý+ß>Ý4Ý3Ø	�‰€BÙ Ó#€HØ—]—]�] g×&:×&:Ð&:‰TÄÄTÈ(Ã^ÐUYÓ@Z€FØ�f˜j¨(°I¸tÀWÈdÐT]Ð_cØ©ÓB© ¸6±MŸ˜©ÑBðD€DàÒØ×!Ñ!¡$ rÓ"2°7Õ";Ó<ˆØ—‘˜vÓ&×,Ð,¨"×1Ñ1°/×BÒBÙ,¨UÓ3ˆD�‰OØˆW‰ØˆÙ¨G×,@Ñ,@×,FÑ,FÈwÏ~É~Ô^€Dˆ�MØ�=�=ˆ=ð	=Ü/¸W×=QÑ=QÔRˆD�‰Oð €Kˆ4€Kùò# Cøð ô 	=Ü�K‰KÐIÈ3ÔOÜ# D¬#¨c«(Ó3¸Ð<ûÜ ô 	=Ü�K‰KÐ>ÀÔDÜ# D¬#¨c«(Ó3¸Ð<ûð	=ús6   Á?EÂEÄ7E ÅGÅ ,FÆGÆGÆ,GÇGc                óö   € ^ RI Hp ^ RIHp ^ RIHpHp VP                  4       '       g   \        R4      hV! R4       V! V R7      pVf/   VP                  4       '       g   V! 4       '       g   \        R4      hV# )z``onboarding.run: true`` on disk before the welcome-trial claim, so a crash after the claim still
opens onboarding next launch.)Ú	anon_auth)Úset_run)Úclaim_desktop_free_tierÚprovider_configuredzDFirst-run onboarding starts only in the Desktop app on this machine.Trˆ   zCThe welcome trial is not available here, and no provider is set up.)
ri   r›   Úhermes_cli.onboarding_runrœ   Úhermes_cli.welcome_trialr�   rž   Úon_local_desktop_backendr    Úfree_inference_active)r‰   r›   rœ   r�   rž   rI   s   $     r   r—   r—   „   sh   € õ %Ý1ßUØ×-Ñ-×/Ò/ô  Ð fÓgÐgÙˆD„MÙ%°<Ô@€GØ‚ 	× ?Ñ ?× AÒ AÑEX×EZÒEZÜÐ eÓfÐfØ€Nr   c              ƒ  óþ  "  € ^ RI Hp ^ RIHp ^ RIHp ^ RIHp V P                  pV! WPP                  RRR\        P                  ! 4       P                  /V P                  \        V P                  RR	4      R
7      pVR,          ;'       g    / P!                  R4      '       g   \#        RR4      hV! V\%        WEP&                  VP(                  VR7      4      G Rj  x€L
  V! WVR,          4      P*                  #  L5i)r.   )Ústage_local_session)Úrestore_local_sessionr8   )Úcommit_local_sessionÚsourceÚguiÚ
request_idÚdesktop_localF)Úclient_localrª   ÚpolicyÚmodelrŠ   z(No model is set up to run onboarding on.)ÚepochÚreceiptNrL   )Úgateway.session_localr¤   Úgateway.session_local_recoveryr¥   rb   r9   Úhermes_state_localr¦   r@   rY   ÚuuidÚuuid4ÚhexÚnative_ownerr[   Ú	transportr<   r   r   r�   r®   rL   )r&   r¤   r¥   r9   r¦   r@   Ústageds   &      r   r`   r`   •   s×   é € Ý9ÝDÝ=Ý7Ø×$Ñ$€IÙ  ×,<Ñ,<¸xÈÐP\Ô^b×^hÒ^hÓ^j×^nÑ^nÐ>oØ.8×.EÑ.EÜ/6°z×7KÑ7KÈ_Ð^cÓ/dôf€Fð �8Õ×"Ð" ×'Ñ'¨×0Ò0Ü Ð&PÓQÐQÙ
˜	¤7Ð+?ÇÁÐU^×UdÑUdÐntÔ#uÓ
v×vÐvÙ  °<Õ,@ÓA×LÑLÐLñ wùs   ‚B"C=Â%8C=ÃC;ÃC=c                  ó    € ] tR t^¤tRtR tRtR# )Ú	_Discardsa
  The chats a fresh launch's start deletes because no window watched them when it looked. A window
that resumes one before its delete takes it back (``keep_from_discard``); the lock makes the take-back
and the delete one or the other, never a viewer on a deleted chat.c                	óX   € \         P                  ! 4       V n        \        4       V n        R # r)   )Ú	threadingr]   rv   Úsetre   )r   s   &r   r   Ú_Discards.__init__©   s   € Ü—N’NÓ$ˆŒ	Ü“5ˆŽr   )re   rv   N)r   r   r   r   r   r   r   r!   r   r   rº   rº   ¤   s   † ñJör   rº   c                óH   € \        V R R4      pVf   \        4       ;qn        V# )Ú_onboarding_discardsN)r[   rº   rÀ   )r@   rx   s   & r   rc   rc   ®   s)   € Ü�yÐ"8¸$Ó?€HØÒÜ4=³KÐ?ˆÔ1Ø€Or   c              ƒ  óZ  a"  € \        V RR4      oSe“   VSP                  9   d€   SP                  P                  RR7      '       d8   SP                  P	                  V4       SP                  P                  4        R# V3R lp\        P                  ! V4      G Rj  x€L
  K”  R# R#  L
5i)ae  ``attach``, after its last other await: a chat a fresh launch was about to delete is kept. The
take-back itself never yields, so the viewer joins in the same loop step and a later start sees it
watched; a start claims only on the loop. A delete in flight holds the lock across its write, so
that wait runs off the loop and the take-back is retried after it.rÀ   NF)Úblockingc                 ól   <€ S P                   ;_uu_ 4         R R R 4       R #   + '       g   i     R # ; ir)   )rv   )rx   s   €r   Údelete_finishedÚ*keep_from_discard.<locals>.delete_finishedÁ   s   ø€ Ø——“Ø÷ ——’ús   –"¢3	)r[   re   rv   ÚacquireÚdiscardÚreleaser\   r^   )r@   rL   rÄ   rx   s   && @r   Úkeep_from_discardrÉ   µ   s�   øé € ô
 �yÐ"8¸$Ó?€HØ
Ò
 :°·±Ô#=Ø�=‰=× Ñ ¨%Ð ×0Ò0Ø�L‰L× Ñ  Ô,Ø�M‰M×!Ñ!Ô#Ùõ	ô ×Ò Ó0×0Ò0ñ $>Ñ
ñ 	1ùs   ƒAB+ÁAB+ÂB)ÂB+c                ón  € ^ RI Hp ^ RIHpHp ^ RIHp V P                  p	VR,          f   V! W“VR,          4       . p
VP                  '       d   \        W’R,          V4      p
VR,           F  pWº9  g   K  V! W›V! R4      4       K  	  VR,          f!   V	P                  W9P                  V4      4       V
# )zÔThe new chat's record and title, and the end of every other open run; returns the chats it
deleted. One open run at a time: the kept run is open before the others end, so the install flag
never closes in between.©ÚEnd)Úadvancer#   )Ú
CHAT_TITLEr6   r„   rD   )rŒ   rÌ   r�   rÍ   r#   rŽ   rÎ   r�   rd   Ú_discard_unfinished_runsÚset_session_titleÚget_next_title_in_lineage)r@   rs   rw   r6   rx   rÌ   rÍ   r#   rÎ   r�   rF   Úolds   &&&&&       r   rg   rg   Ç   s    € õ *ß6Ý0Ø	�‰€BØˆH…~Òáˆb˜$˜w�-Ô(Ø€GØ××ÐÜ*¨2°JÕ/?ÀÓJˆØ�J×ÐˆØÖÙ�B™S ›_Ö-ñ  ð ˆH…~Òà
×Ñ˜V×%AÑ%AÀ*Ó%MÔNØ€Nr   c           
     ó¶  a a€ ^ RI Hp ^ RIHp V! S P                  4      P
                  R,          o. pV Fd  pVP                  ;_uu_ 4        WbP                  9  d    RRR4       K3   V! S Wf3V V3R ll4      '       d   VP                  V4       RRR4       Kf  	  V#   \         d    \        P                  RT4        L1i ; i  + '       g   i     K¢  ; i)aª  A new launch's start: the runs the app was closed on never count as done. A chat no window
watches (still in *discards*) is deleted the way ``session.delete`` deletes it, which ends its run
(``deleted``) and tells every window; the caller retires the deleted ids from the authority. A chat a
window reopened, or one a turn still writes (the delete refuses it), is kept, and its run ends as
``replaced`` so it is never resumed.)ÚPath©Údelete_chatr;   Nc                ó,   <€ SP                  V SR R7      # )T)Úsessions_dirÚexclude_active_write_guards)Údelete_session)rÒ   r�   rØ   s   &€€r   Ú<lambda>Ú*_discard_unfinished_runs.<locals>.<lambda>í   s   ø€ ¸×8IÑ8IØ¨,ÐTXð 9Jô 9Zr   z4onboarding.start could not delete unfinished chat %s)ÚpathlibrÔ   r�   rÖ   Údb_pathÚparentrv   re   ÚappendÚ	Exceptionr˜   Ú	exception)r�   Ú
stored_idsrx   rÔ   rÖ   rF   rÒ   rØ   s   f&&    @r   rÏ   rÏ   Þ   s¸   ù€ õ Ý3Ù˜Ÿ
™
Ó#×*Ñ*¨ZÕ7€LØ€GÛˆØ�]�]‹]ØŸ,™,Ô&Ø÷ ‰]ð^Ù˜r 3÷ )Z÷ [ò [à—N‘N 3Ô'÷ ‰]ñ ð €Nøô ô ^Ü× Ñ Ð!WÐY\Ö]ð^ú÷ �]ˆ]ús*   ÁCÁ*(B Â !C	ÃCÃC	ÃCÃCc                óN   aaa€ ^ RI Hp . oVVV3R lpV! V SV4       S^ ,          # )zÜ*commit* (the canonical delete's receipt transaction) wrapped so deleting the chat that holds
the live run ends that run (``deleted``) and tells every window, as the sidecar's
``session.delete`` did. Returns the receipt.rÕ   c                 óV   <€ SP                  S ! 4       4       SS^ ,          R,          9   # )r.   Údeleted_ids)rà   )Úcommitr¯   rL   s   €€€r   ÚdeleteÚ$ending_run_on_delete.<locals>.deleteü   s%   ø€ Ø�‰‘v“xÔ Ø˜W Q�Z¨Õ6Ñ6Ð6r   )r�   rÖ   )r�   rL   rç   rÖ   rè   r¯   s   &ff  @r   Úending_run_on_deleterê   õ   s*   ú€ õ 4Ø€G÷7ñ ��J Ô'Ø�1�:Ðr   c                óŽ   € ^ RI Hp V F8  pV P                  P                  V4      pVf   K$  V! VP                  VR4       K:  	  R# )zYClose the card still waiting in a chat whose run just ended; its answer would be refused.©ÚwithdrawNÚ
setup_beat)Úgateway.session_server_requestsrí   r;   r<   Úevent_stream)r@   rã   rí   r?   rA   s   &&   r   rk   rk     s=   € å8ÛˆØ×!Ñ!×%Ñ% cÓ*ˆØÔÙ�T×&Ñ&¨¨\Ö:ó r   c                óü   € ^ RI Hp ^ RIHp ^ RIHp V P                  P                  V4      ;'       g    / P                  R4      '       d   R# V! VP                  V! V P                  V4      R,          4      4      # )r.   r|   ©r~   r€   r…   Nr„   )
rŒ   r}   r�   r~   rŽ   r�   r�   r•   r<   r”   )r@   r6   r}   r~   r�   s   &&   r   rn   rn     s\   € Ý+Ý,Ý4Ø�‰× Ñ  Ó(×.Ð.¨B×3Ñ3°O×DÒDÙÙ˜%×+Ñ+©D°·±¸vÓ,FÀwÕ,OÓPÓQÐQr   c                óz   € ^ RI Hp V! V P                  V4      ;'       g    / P                  R4      ;'       g    R# )r.   rò   rS   Ú )r�   r~   r�   r<   )r@   r6   r~   s   && r   ro   ro     s1   € Ý,Ù�—‘˜vÓ&×,Ð,¨"×1Ñ1°(Ó;×AÐA¸rÐAr   c              ƒ  ó  "  € ^ RI Hp ^ RIHpHp ^ RIHp ^ RIHp ^ RI	H
p ^ RIHp	  V	P                  V4      p
T
P                   '       g   \        R4      hT P"                  pTP%                  T P&                  TR
4       TP(                  pT! YÝP+                  TP                   4      ;'       g    TP                   4      f   RR/# T! T\-        YMTP                   T! R4      4      4      G R	j  x€L
 pTP.                  P1                  TP                   4      pTe   T! TP2                  TP                   R4       R\5        TP6                  P1                  R4      4      /#   T d   p\        R\        T4      R7      ThR	p?ii ; i L—5i)z‡Skip setup: end the chat's run and close the card that waits. The card's asker reads the
skipped record when it wakes (``setup_beat``).rË   )rÍ   r~   r8   rì   r0   )ÚOnboardingSkipParamsr2   r   Nzsession:controlÚskippedFrî   Úskipped_all)rŒ   rÌ   r�   rÍ   r~   rb   r9   rï   rí   rU   r1   rT   rö   rV   r   rW   rL   r@   Ú	authorizerY   r�   Úget_compression_tipr   r;   r<   rð   ÚboolÚresult)r&   rq   rr   rÌ   rÍ   r~   r9   rí   r1   rö   rs   rt   r@   r�   ÚsteprA   s   &&&             r   r$   r$     sI  é € õ *ß5Ý=Ý8Ý(ÝdðLØ&×5Ñ5°fÓ=ˆð ××ÐÜÐ 0Ó1Ð1Ø×$Ñ$€IØ×Ñ˜
×(Ñ(¨#Ð/@ÔAØ	�‰€BÙˆB×&Ñ& s§~¡~Ó6×HÐH¸#¿.¹.ÓIÒQØ˜5Ð!Ð!Ù˜y¬'°'¸s¿~¹~ÉsÐS\Ë~Ó*^Ó_×_€DØ×Ñ×!Ñ! #§.¡.Ó1€DØÒÙ�×"Ñ" C§N¡N°LÔAØ”t˜DŸK™KŸO™O¨MÓ:Ó;Ð<Ð<øð ô LÜÐ 0¼¸S»ÔBÈÐKûðLúñ `ùsA   ‚'F	ªE! »F	ÁA#F	Â1>F	Ã/FÃ0A1F	Å!FÅ(E?Å?FÆF	c           	     ó  € ^ RI HpHpHpHp Ve   V! V 4      '       g   R# ^ RIHp Vw  r‰p
VP                  P                  V	4      pVRJ;'       d    V! VP                  V	R4      pV! W! W'       * VR7      4       V! W4      # )a  The onboarding chat's per-turn inputs on an authority-owned local turn: the turn note (which
card is closed and how to bring it back) appended to the API-only notes, and the scripted opening
returned for ``run_conversation(prelude=...)``. Nothing for a chat without ``setup_beat``.)Úappend_turn_noteÚbuilds_onboardingÚonboarding_preludeÚonboarding_turn_noteN)Úwaitingrî   )Úhistory_emptyÚcard_waiting)
Úagent.onboarding_sessionrÿ   r   r  r  rï   r  r;   r<   rð   )ÚagentÚownerÚhistoryrÿ   r   r  r  r  r@   rL   Ú_generationrA   r  s   &&&          r   Úarm_onboarding_turnr  5  s‚   € ÷ wÓvØ‚}Ñ-¨e×4Ò4ÙÝ7Ø).Ñ&€I˜;Ø×Ñ×!Ñ! *Ó-€DØ˜tÐ#×\Ð\©°×0AÑ0AÀ:È|Ó(\€LÙ�UÐ0°ÄkÐ`lÔmÔnÙ˜eÓ-Ð-r   )%r   Ú
__future__r   r\   Úloggingr¼   r³   Ú	functoolsr   Úgateway.session_contractr   Úhermes_state_runtimer   Ú	getLoggerr   r˜   r+   r   rá   r    r'   r,   r#   r_   r—   r`   rº   rc   rÉ   rg   rÏ   rê   rk   rn   ro   r$   r  r!   r   r   Ú<module>r     s·   ðñ	õ #ã Û Û Û Ý å /Ý 2à	×	Ò	˜8Ó	$€àÐ ô:Ð)ô :ôQ˜	ô QòjòEò2Oòjò@ò"M÷ñ òò1ò$ò.ò.ò;òRòBò
=ô6.r   