+
    lHàjá?  ã                   óü  € ^ RI t ^ RIHt ^RIHtHt ]! 4       t]P                  t]! R4      R R l4       t]! R4      R R	 l4       tR
R/R R llt	R
R/R R llt
R R ltR R ltR tR R lt] P                  ! 4       tRsR R ltRR/t] P                  ! 4       tR R lt ! R R]4      tR R  lt]! R!4      R" R# l4       t]! R$4      R% R& l4       tR' R( ltR) R* ltR+ R, ltR- R. ltR/ R0 ltR1 R2 ltR# )3é    N)ÚPath)ÚHandlerRegistryÚbind_modulezonboarding.statec                ó0   € V ^8„  d   QhR\         R\         /# ©é   ÚparamsÚreturn©Údict)Úformats   "ÚC/home/ubuntu/.hermes/hermes-agent/tui_gateway/methods_onboarding.pyÚ__annotate__r      s   € ÷ Oñ O”4ð OœDñ Oó    c           
      ó^   € \        V \        \        VP                  R 4      4      R7      4      # )Úassume_fresh©r   )Ú_okÚ
_run_stateÚboolÚget)Úridr	   s   &&r   Ú_r      s"   € äˆs”J¬D°·±¸NÓ1KÓ,LÔMÓNÐNr   zonboarding.set_runc                ó0   € V ^8„  d   QhR\         R\         /# r   r   )r   s   "r   r   r      s   € ÷ 	"ñ 	"”4ð 	"œDñ 	"r   c                 ót  € ^ RI Hp \        VP                  R4      \        4      '       g   \        V RR4      #  V! VR,          \	        VP                  R4      4      R7       \        T \        4       4      #   \         d6   p\        P                  R4       \        T R\        T4      4      u R	p?# R	p?ii ; i)
r   ©Úset_runÚruni¢  z+onboarding.set_run requires a boolean 'run'Úmark_profile_offered)r   zonboarding.set_run failediÕ  N)Úhermes_cli.onboarding_runr   Ú
isinstancer   r   Ú_errÚ	ExceptionÚloggerÚ	exceptionÚstrr   r   )r   r	   r   Úes   &&  r   r   r      s’   € å1Ü�f—j‘j Ó'¬×.Ò.Ü�C˜ÐLÓMÐMð'Ù��u•´D¸¿¹ÐDZÓ9[Ó4\Õ]ô ˆs”J“LÓ!Ð!øô ô 'Ü×ÑÐ4Ô5Ü�C˜œs 1›vÓ&Õ&ûð'ús   º)A7 Á7B7Â*B2Â,B7Â2B7r   Fc                ó0   € V ^8„  d   QhR\         R\        /# ©r   r   r
   )r   r   )r   s   "r   r   r      s   € ÷ $ñ $¤ð $´ñ $r   c                óè   € ^ RI Hp ^ RIHp ^ RIHp V! 4       '       g   RV! V R7      RR/\        4       C# V '       d   \        RR7      MVP                  \        \        R	7      p/ VC\        4       C# )
aÎ  ``run``: the root config says so, else this OS user never used Hermes (or the unpackaged
desktop's ``--fresh-install`` says to assume that). ``eligible``: this is the desktop's local
backend and something can carry the first chat (the welcome trial or a configured provider);
remote backends answer at once and run onboarding only from Settings. On the local backend the
answer comes from the boot computation (``onboarding_due``); ``--fresh-install`` asks live.)Úonboarding_due)Úon_local_desktop_backend©Ú
should_runr   r   ÚeligibleFT)Ústamp)
Ú
hermes_clir+   Úhermes_cli.anon_authr,   r    r.   Ú_active_runÚ_due_nowÚreadÚ
_due_stamp)r   r+   r,   r.   Údues   $    r   r   r      sd   € õ *Ý=Ý4á#×%Ò%Ø‘z¨|Ô<¸jÈ%ÐaÔS^ÓS`ÐaÐaß)5Œ( Õ
%¸>×;NÑ;NÌxÔ_iÐ;NÓ;j€CØ#ˆcÐ#”[“]Ð#Ð#r   c                óR   € V ^8„  d   QhR\         R\        \        \         3,          /# r)   )r   r   r&   )r   s   "r   r   r   -   s&   € ÷ Pñ Pœdð P¬t´C¼°I­ñ Pr   c                 óä   € ^ RI Hp ^ RIHp \	        R4      p\        RV'       d   \        V4      MR/4      ;_uu_ 4        V! V R7      pRRR4       RV! V R7      RX/#   + '       g   i     L; i)	r   r-   )Úinference_availableÚdefaultÚprofile_homeNr   r   r/   )r    r.   Úhermes_cli.welcome_trialr:   Ú_profile_homeÚ_session_profile_runtime_scoper&   )r   r.   r:   Úhomer/   s   $    r   r4   r4   -   s[   € Ý4Ý<ô ˜Ó#€DÜ	'¨Çd¼¸T¼ÐPTÐ(U×	VÕ	VÙ&°LÔAˆ÷ 
Wà‘:¨<Ô8¸*ÀhÐOÐO÷ 
W×	Vús   Á 
AÁA/	c                ó$   € V ^8„  d   QhR\         /# ©r   r
   )Útuple)r   s   "r   r   r   8   s   € ÷ Xñ X”Eñ Xr   c                 ó”  aa€ ^ RI Hp  ^ RIHp ^ RIHo \        \        R4      ;'       g    V! 4       4      pV P                  4       pV! 4       R,          VR,          VR,          VR,          .\        4       OV'       d   VR,          VR,          3MR	O5p\        ;QJ d    . VV3R lV 4       F  NK  	  5# ! VV3R lV 4       4      # )
ab  The files the due answer reads, by their config-cache signature: the root config
(``onboarding.run``), the default profile's config, ``.env`` and ``auth.json`` (what carries a
first chat), the shared Nous store (another profile's sign-in or connector guest) and the managed
layer's ``config.yaml`` and ``.env`` (an admin's onboarding or provider policy).)Úmanaged_scope)Úget_default_hermes_root)Úfile_signaturer;   zconfig.yamlz.envz	auth.jsonc              3   ó^   <"  € T F"  p\        V4      ;o'       d	   S! S4      MR x € K$  	  R # 5i©N)Ú_stat)Ú.0ÚpathrG   Ústs   & €€r   Ú	<genexpr>Ú_due_stamp.<locals>.<genexpr>E   s+   øé € ÐWÑQVÈ¬e°D«kÐ(9¨Ö(9‘ Ô#ÀÔDÓQVùs   ƒ*-© )r1   rE   Úhermes_constantsrF   ÚutilsrG   r   r>   Úget_managed_dirÚ_shared_nous_storerC   )rE   rF   r@   ÚmanagedÚpathsrG   rM   s        @@r   r6   r6   8   s®   ù€ õ
 )Ý8Ý$ä”˜iÓ(×EÐEÑ,CÓ,EÓF€DØ×+Ñ+Ó-€GÙ$Ó&¨Õ6¸¸}Õ8LÈdÐU[ÍmÐ]aÐdoÕ]oð gÜ Ó"ðgßU\ w°Õ'>ÀÈ&Õ@PÑ&QÐbdñg€EçŒ5ÕWÑQVÓW�5ÐWˆ5ÕWÑQVÓWÓWÐWr   c                ó>   € V ^8„  d   QhR\         \        R3,          /# )r   r
   .)rC   r   )r   s   "r   r   r   H   s   € ÷ ñ œE¤$¨ )Õ,ñ r   c                 óF   € ^ RI Hp   V ! 4       3#   \         d    Ru # i ; i)zbThe shared Nous store as ``_read_shared_nous_state`` finds it: none when the test seat belt trips.©Ú_nous_shared_store_pathrP   )Úhermes_cli.auth_nousrZ   ÚRuntimeErrorrY   s    r   rT   rT   H   s*   € å<ðÙ'Ó)Ð+Ð+øÜô ØŠ	ðús   ˆ � Ÿ c                 óH   €  V P                  4       #   \         d     R # i ; irI   )ÚstatÚOSError)rL   s   &r   rJ   rJ   Q   s%   € ðØ�y‰y‹{ÐøÜô Úðús   ‚ ’! !c                ó   € V ^8„  d   QhRR/# ©r   r
   NrP   )r   s   "r   r   r   X   s   € ÷ Qñ Q˜ñ Qr   c                 ó”   a€ ^ RI Hp  ^ RIHoHp VP                  \        4      pR V3R llpV ! VRV3R7      P                  4        R# )z�Work out the local Desktop's due answer off the RPC path, after the setup bootstrap has recorded
a fresh install (``begin_local_desktop_boot``).©Úspawn_context_thread)Úfree_tier_bootstrapr+   c                óF   € V ^8„  d   QhR\         \        \        3,          /# rB   )r   r&   r   )r   s   "r   r   Ú$start_due_boot.<locals>.__annotate__`   s   € ÷ ñ ”Tœ#œt˜)•_ñ r   c                  ó8   <€ S P                  4        \        4       # rI   )Úwait_for_recordr4   ©re   s   €r   ÚcomputeÚstart_due_boot.<locals>.compute`   s   ø€ Ø×+Ñ+Ô-Ü‹zÐr   zonboarding-due)ÚnameÚargsN)Úagent.memory_providerrd   r1   re   r+   Ú
begin_bootr6   Ústart)rd   r+   Úfinishrk   re   s       @r   Ústart_due_bootrs   X   s?   ø€ õ ;ß>à×&Ñ&¤zÓ2€F÷ð ñ
 ˜Ð&6¸g¸ZÔH×NÑNÖPr   c                ó   € V ^8„  d   QhRR/# ra   rP   )r   s   "r   r   r   l   s   € ÷ ñ  $ñ r   c            	     ó  € ^ RI Hp  ^ RIHp ^ RIHp ^ RIHp \        ;_uu_ 4        \        '       * Rups	RRR4       V! 4       ;_uu_ 4        V! R4      ;_uu_ 4        X'       g6   V ! VP                  RR7      P                  4         RRR4       RRR4       R# VP                  4        \        4        RRR4       RRR4       R#   + '       g   i     Lš; i  + '       g   i     L-; i  + '       g   i     R# ; i)	a!  An accepted local Desktop connection to this process: record a fresh install, settle an
interrupted claim, the setup record and the due answer, once, as work for that Desktop. This
process outlives app launches, so a later connection retries the install steps a failed boot
left unsettled.rc   rj   )Úserving_local_desktop)Ú#launch_profile_scope_if_multiplexedTNzfree-tier-resettle)rm   )ro   rd   r1   re   Úhermes_cli.process_identityrv   Ú!tui_gateway.launch_profile_policyrw   Ú_local_desktop_boot_lockÚ_local_desktop_boot_startedÚresettle_after_failed_bootrq   Ústart_background_bootstraprs   )rd   re   rv   rw   Úfirsts        r   Úbegin_local_desktop_bootr   l   s«   € õ ;Ý.ÝAÝUç	!Ö	!Ü1LÔ-LÈdÐ*ˆÐ*÷ 
"ñ 
-×	.Õ	.Ñ0EÀd×0KÕ0KßÙ Ð!4×!OÑ!OÐVjÔk×qÑqÔsØ÷ 1L×	.Ñ	.ð 	×6Ñ6Ô8ÜÔ÷ 1L×	.Ñ	.÷ 
"×	!ú÷ 1L×0Kú×	.×	.Ð	.ús;   §CÁC.Á,C	Â
C.ÂC	Â6C.ÃC	ÃC+Ã&C.Ã.C?	Úprofiler;   c                ó$   € V ^8„  d   QhR\         /# rB   r   )r   s   "r   r   r   Š   s   € ÷ xñ x”Tñ xr   c            	     óø   € ^ RI Hp Hp \        \        4      ;_uu_ 4       pVf   RMV ! V4      pRTRV'       d"   V! W#4      ;'       g    / P                  R4      MR/uuRRR4       #   + '       g   i     R# ; i)zNThe onboarding chat in progress and its run id, both None when no run is open.)Úactive_session_idÚloadNÚ
session_idÚrun_id)Úagent.onboarding_recordrƒ   r„   Ú_profile_dbÚ_ONBOARDING_PROFILEr   )rƒ   r„   Údbr…   s       r   r3   r3   Š   s^   € ç?Ü	Ô(×	)Ô	)¨RØšZ‘TÑ->¸rÓ-Bˆ
Ø˜j¨(×bl±T¸"Ó5I×5OÐ5OÈR×4TÑ4TÐU]Ô4^ÐrvÐw÷ 
*×	)×	)Ó	)ús    A(ºA(Á	A(Á(A9	c                   ó   € ] tR t^’tRtRtR# )Ú_NoModelForTheRunzFThe claim was blocked and nothing else can carry the run's first chat.rP   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__rP   r   r   rŒ   rŒ   ’   s   † ÝPr   rŒ   c                ó0   € V ^8„  d   QhR\         R\        /# )r   Úscoper   )r   r   )r   s   "r   r   r   –   s   € ÷ ñ œTð ´Dñ r   c               óV  € ^ 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 4      ;_uu_ 4        V! VR7      pVf/   VP                  4       '       g   V! 4       '       g   \        R4      hRRR4       V#   + '       g   i     X# ; i)	aë  Claim the welcome trial with ``onboarding.run: true`` already on disk, so a crash after the claim
makes this machine read as used still opens onboarding next launch. The run's chat comes after:
a refused claim (error 5079) leaves no guest and no chat, and the install still due. A blocked claim
(another install took the trial since the due check) with no trial or provider to run on is error
5080, with no chat either: the desktop lands on provider setup and sign-in, not a chat that fails.)Ú	anon_authr   )Úclaim_desktop_free_tierÚprovider_configuredzDFirst-run onboarding starts only in the Desktop app on this machine.Tr   NzCThe welcome trial is not available here, and no provider is set up.)r1   r–   r    r   r=   r—   r˜   r,   rŒ   r?   Úfree_inference_active)r”   r   r–   r   r—   r˜   Úclaimeds   &$     r   Ú_claim_before_runr›   –   sˆ   € õ %Ý1ßUØ×-Ñ-×/Ò/ÜÐ fÓgÐgÙˆD„MÜ	'¨×	.Õ	.Ù)°|ÔDˆØŠ? I×$CÑ$C×$EÒ$EÑI\×I^ÒI^Ü#Ð$iÓjÐj÷ 
/ð €N÷	 
/Ö	.ð €Nús   Á#BÁ5BÂBÂB(	zonboarding.startc                ó0   € V ^8„  d   QhR\         R\         /# r   r   )r   s   "r   r   r   ª   s"   € ÷ Gpñ Gp”4ð GpœDñ Gpr   c                 ó	  € ^ RI Hp ^ RIHpHp ^ RIHpHpHpH	p ^ RI
Hp	Hp
 ^ RIHp ^ RIHp \#        VP%                  R4      4      p\&        ;_uu_ 4        Rp \)        \*        R	R
7      ;_uu_ 4       pVf"   \-        V RR7      uuRRR4       uuRRR4       # V! V4      pVP%                  R4      '       g	   V'       d   RM\/        \1        V4      R4      pVRJ pV'       dÔ   \3        R4      pRV'       d   \5        V4      MR/p\7        VRR7      ;_uu_ 4        T! VP%                  R4      ;'       g    RVP%                  R4      R7      pRRR4       VP%                  R4      '       g&   \9        V\#        VP%                  R4      4      R7      pVP;                  \=        4       R4      pV! VVX4       MVP?                  V! VV4      R,          4      pV! VV4      P%                  R4      ;'       g    RpV Uu. uF  pVV8w  g   K  VNK  	  ppV'       d   \A        VV4       MV F  pV! VVV! R4      4       K  	  V'       d"   VPC                  VVPE                  V	4      4       VPG                  V4      ;'       g    / P%                  R4      '       d   RMV
! V4      pRRR4       Te   TPU                  4        \W        T'       d   . MX4       \X        R$,          ! T / \*        CR%XR&R/C4      pR'T9   d   TuuRRR4       # TR(,          R%,          pXe.   \X        R),          ! T R%TR*TR+R,/4      pR'T9   d   TuuRRR4       # RRR4       \[        T R%XR-XR.X'       * RX/4      #   + '       g   i     EL$; iu upi   + '       g   i     Lç; i  T dA   p\H        PK                  RT4       \M        T R\5        T4      4      u Rp?uuRRR4       # Rp?i\N         dA   p\H        PK                  R T4       \M        T R!\5        T4      4      u Rp?uuRRR4       # Rp?i\P         d@   p\H        PS                  R"4       \M        T R#\5        T4      4      u Rp?uuRRR4       # Rp?ii ; i  + '       g   i     EL1; i)/r   )Ú
read_facts)ÚEndÚFacts)Úadvancer„   Úopen_session_idsrq   )Ú
CHAT_TITLEÚopening_prompt)Ú	AuthErrorrj   Úfresh_launchNT)Úwriteriˆ  )ÚcodeÚrerunr;   r<   F)Úhydrate_secretsÚfacts_sourceÚlocalÚlocale)r«   r­   r   r   ÚdesktopÚfactsr†   Ú ÚreplacedÚmessage_countz/onboarding.start: welcome trial not claimed: %si×  z$onboarding.start: no chat opened: %siØ  zonboarding.start failediÖ  zsession.resumer…   ÚsourceÚerrorÚresultzprompt.submitÚtextÚdisplay_kindÚhiddenÚstored_session_idÚresumed).Úagent.onboarding_factsrž   Úagent.onboarding_flowrŸ   r    r‡   r¡   r„   r¢   rq   Úagent.onboarding_textr£   r¤   Úhermes_cli.auth_constantsr¥   r1   re   r   r   Ú_onboarding_start_lockrˆ   r‰   Ú_db_unavailable_errorÚnextÚiterr>   r&   r?   r›   Úcreate_sessionÚnew_session_idÚfrom_storedÚ_discard_unfinished_runsÚset_session_titleÚget_next_title_in_lineageÚget_sessionr$   Úinfor"   rŒ   r#   r%   Úrefresh_recordÚ_withdraw_setup_cardsÚ_methodsr   )r   r	   rž   rŸ   r    r¡   r„   r¢   rq   r£   r¤   r¥   re   r¦   rš   rŠ   Úopen_idsÚstoredÚcreatedr@   r”   r¯   r†   Úsidr±   ÚoldÚopeningr'   rº   Ú	submitteds   &&                            r   r   r   ©   sÊ  € å1ß0ßNÓNß@Ý3Ý.ô ˜Ÿ
™
 >Ó2Ó3€Lç	Ö	Øˆð,	+ÜÔ0¸×>Õ>À"Ø’:Ü0°¸4Ô@÷ ?Ñ>÷ 
 Ò	ñ ,¨BÓ/�Ø!'§¡¨G×!4Ò!4¿™Ì$ÌtÐT\Ë~Ð_cÓJd�Ø  D˜.�ßä(¨Ó3�DØ+¿$¬S°¬YÀDÐI�EÜ7¸Èu×UÖUÙ *¸¿
¹
À>Ó8R×8]Ð8]ÐV]Ðfl×fpÑfpÐqyÓfzÔ {˜÷ Và!Ÿ:™: g×.Ò.Ü"3°EÌÈVÏZÉZÐXfÓMgÓHhÔ"i˜Ø×.Ñ.¬~Ó/?ÀÓK�Fá˜"˜f eÕ,à!×-Ñ-©d°2°vÓ.>¸wÕ.GÓH�EÙ˜b &Ó)×-Ñ-¨hÓ7×=Ð=¸2�ñ ,4ÓE©8 C°s¸f±}ŸC˜C©8�ÐEßÜ,¨R°Õ:ã'˜Ù  C©¨Z«Ö9ñ  (çà×(Ñ(¨°×1MÑ1MÈjÓ1YÔZà#%§>¡>°&Ó#9×#?Ð#?¸R×"DÑ"DÀ_×"UÒ"U™$Ñ[iÐjoÓ[p�÷A ?ðX Òà×.Ñ.Ô0Ü§L™b°hÔ?ÜÐ+Ö,¨SÐ2tÔ5HÐ2tÈ,ÐX^Ð`hÐjsÑ2tÓuˆØ�gÔØ÷k 
 Ò	ðl �hÕ Õ-ˆØÒä  Ö1°#¸ÀcÈ6ÐSZÐ\jÐltÐ7uÓvˆIØ˜)Ô#Ø ÷w 
 ×	Ò	ôx ˆs�\ 3Ð(;¸VÀYÐT[ÔP[Ð]eÐgmÐnÓoÐo÷_ V×UÐUüò F÷- ?×>ûðB ô 	+ô �K‰KÐIÈ1ÔMÜ˜˜T¤3 q£6Ó*Ô*÷Q 
 Ò	ûôR !ô 	+Ü�K‰KÐ>ÀÔBÜ˜˜T¤3 q£6Ó*Ô*÷W 
 Ò	ûôX ô 	+Ü×ÑÐ6Ô7Ü˜˜T¤3 q£6Ó*Ô*÷] 
 Ò	ûðX	+ú÷Y 
 ×	Ð	ús
  ÁQ0ÁNÁ4N	Â
NÂN	Â9N	Ã"N	Ã$7N	Ä3M)ÅN	Å-BN	Ç5N	Ç<	M=È
M=È7N	É8N	ÊN	Ê
N	Ê#NÊ+AQ0Ì6Q0Í)M:Í4N	ÎNÎNÎQ0ÎNÎQ-Î+OÏQ-ÏQ0ÏQ-Ï$Q-Ï%+P ÐQ-ÐQ0Ð Q-Ð-Q-Ð.*Q(ÑQ-ÑQ0Ñ(Q-Ñ-Q0Ñ0R	zonboarding.skipc                ó0   € V ^8„  d   QhR\         R\         /# r   r   )r   s   "r   r   r   õ   s   € ÷ Gñ G”4ð GœDñ Gr   c           	      óô  € ^ RI Hp ^ RIHpHp \        W4      w  rVV'       d   V# VP                  R4      p\        VRR4      ;'       g
    VR,          p\        V4      ;_uu_ 4       p	V! W˜4      f   \        V RR/4      uuRRR4       # V! W˜V! R4      4      p
RRR4       \        VR,          R	R
R7       \        V R\        X
P                  P                  R4      4      /4      #   + '       g   i     LU; i)r   ©rŸ   )r¡   r„   Úagentr…   NÚsession_keyÚskippedFÚresolvedÚ
setup_beat©ÚmethodÚskipped_all)r¼   rŸ   r‡   r¡   r„   Ú_sess_nowaitr   ÚgetattrÚ_session_dbr   Ú_cancel_session_requestsr   rµ   )r   r	   rŸ   r¡   r„   ÚsessionÚerrrØ   rÏ   rŠ   Ústeps   &&         r   r   r   ô   sË   € å)ß5Ü Ó,�L€Gß
Øˆ
Ø�K‰K˜Ó €EÜ�U˜L¨$Ó/×IÐI°7¸=Õ3I€FÜ	�W×	Ô	 Ù�ÓÒ#Ü�s˜Y¨Ð.Ó/÷ 
Ò	ñ �r¡3 y£>Ó2ˆ÷ 
ô
 ˜V LÕ1°:ÀlÕSÜˆs�Y¤ T§[¡[§_¡_°]Ó%CÓ DÐEÓFÐF÷ 
×	ús   Á(C'ÂC'Ã'C7	c                ó\   € V ^8„  d   QhR\         \        ,          R\         \        ,          /# )r   Ú
stored_idsr
   ©Úlistr&   )r   s   "r   r   r     s&   € ÷ nñ n¤$¤s¥)ð n´´Sµ	ñ nr   c                óD  € V '       g   . # \         ;_uu_ 4        \        P                  4        UUu. uFC  w  r\        VP	                  R4      RR4      ;'       g    VP	                  R4      V 9   g   KA  VNKE  	  uppuuRRR4       # u uppi   + '       g   i     R# ; i)z5The live sessions here that show one of *stored_ids*.rØ   r…   NrÙ   )Ú_sessions_lockÚ	_sessionsÚitemsrá   r   )rè   rÑ   Úsesss   &  r   Ú_live_session_idsrð     sz   € çØˆ	ß	ŽÜ%.§_¡_Ô%6ô nÑ%6™	˜Ü˜DŸH™H WÓ-¨|¸TÓB×]Ð]ÀdÇhÁhÈ}ÓF]ÐblÑl÷ �Ñ%6ò n÷ 
Šùón÷ 
�ˆús(   ™B±)B
ÁB
Á4B
Á:BÂBÂB	c                ó>   € V ^8„  d   QhR\         \        ,          RR/# ©r   rè   r
   Nré   )r   s   "r   r   r     s"   € ÷ Gñ G¤d¬3¥ið G°Dñ Gr   c                óF   € \        V 4       F  p\        VRRR7       K  	  R# )zYClose the card still waiting in a chat whose run just ended; its answer would be refused.rÛ   rÜ   rÝ   N)rð   rã   )rè   rÑ   s   & r   rÌ   rÌ     s   € ä  Ö,ˆÜ   j¸×Fó -r   c                ó>   € V ^8„  d   QhR\         \        ,          RR/# rò   ré   )r   s   "r   r   r     s   € ÷ .ñ .¬T´#­Yð .¸4ñ .r   c                óx  a a€ ^ RI Hp ^ RIHpHp \        V4       F  p\        VRR7       K  	  \        \        R4      ;'       g    \        4       4      R,          oV F.  p V! S Wf3V V3R ll4      pV'       d   K  V! S Wb! R
4      4       K0  	  R#   \         d    \        P                  RT4       R	p LDi ; i)ag  A new launch's start: the runs the app was closed on never count as done. Each chat is closed if
still live here (a backend that outlived the app), then deleted the way ``session.delete`` deletes
it, which ends its run (``deleted``) and tells every window. A chat the delete refuses keeps its
messages, and its run ends as ``replaced`` so it is never resumed.r×   )r¡   Údelete_chatÚonboarding_restart)Ú
end_reasonr;   Úsessionsc                 ó,   <€ 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   ø€ ¸2×;LÑ;LØ ,ÈDð <Mô <Rr   z4onboarding.start could not delete unfinished chat %sFr±   N)r¼   rŸ   r‡   r¡   rö   rð   Ú_close_session_by_idr   r>   Úget_hermes_homer#   r$   r%   )	rŠ   rè   rŸ   r¡   rö   rÑ   rÒ   Údeletedrû   s	   f&      @r   rÆ   rÆ     s§   ù€ õ
 *ß<Ü  Ö,ˆÜ˜SÐ-A×Bñ -äœ iÓ0×EÐE´OÓ4EÓFÈÕS€LÛˆð	Ù! " c÷ ,Ró SˆG÷
 ‰wÙ�B˜˜S ›_Ö-ó øô ô 	Ü×ÑÐSÐUXÔYØŠGð	ús   Á#BÂ#B9Â8B9c                óJ   € V ^8„  d   QhR\         R\        R\        R,          /# )r   rÑ   Úpayloadr
   N)r&   r   )r   s   "r   r   r   *  s*   € ÷ Zñ ZœSð Z¬4ð Z´D¸4µKñ Zr   c                 óV   € ^ RI Hp ^ RIHp VP	                  RV \        V4      VR7      # )r   )ÚCARD_TIMEOUT_S©Úserver_requestsrÜ   )Útimeout)r¼   r  Útui_gatewayr  Úsendr   )rÑ   r  r  r  s   &&  r   Ú_setup_beat_requestr  *  s&   € Ý4Ý+Ø×Ñ ¨c´4¸³=È.ÐÓYÐYr   c                ó4   € V ^8„  d   QhR\         R\        RR/# )r   rÑ   Úhistory_emptyr
   N)r&   r   )r   s   "r   r   r   0  s&   € ÷ mñ m¤Sð mÄð mÈñ mr   c           
     óf   € ^ RI HpHp ^ RIHp V! W! WVP                  V 4      R8H  R7      4       R# )z^Before a user turn in the onboarding chat (``agent.onboarding_session.onboarding_turn_note``).)Úappend_turn_noteÚonboarding_turn_noter  rÜ   )r  Úcard_waitingN)Úagent.onboarding_sessionr  r  r
  r  Úpending_kind)rÑ   rØ   r  r  r  r  s   &&&   r   Ú_stage_onboarding_turn_noter  0  s3   € çOÝ+Ù�UÐ0Ø¸×9UÑ9UÐVYÓ9ZÐ^jÑ9jôlö mr   c                ó   € V ^8„  d   QhRR/# ra   rP   )r   s   "r   r   r   8  s   € ÷ Vñ V˜ñ Vr   c                 óX   a € ^ RI Hp \        \        4       S RR7       V! V 3R l4       R# )r   )Úon_ended)Úskipc                 ó(   <€ SP                  R V 4      # )zonboarding.ended)Ú_broadcast_global_event)ÚendedÚservers   &€r   rþ   Úregister.<locals>.<lambda>=  s   ø€ ˜6×9Ñ9Ð:LÈeÔTr   N)r   )r‡   r  r   Úglobals)r  r  s   f r   Úregisterr   8  s   ø€ Ý0ä”“	˜6¨Õ/áÔTÖUr   )Ú	threadingÚpathlibr   Ú
method_ctxr   r   Ú	_registryrÞ   r   r   r4   r6   rT   rJ   rs   ÚLockrz   r{   r   r‰   r¿   r3   r#   rŒ   r›   rð   rÌ   rÆ   r  r  r   rP   r   r   Ú<module>r&     s2  ðÛ Ý ç 4áÓ€	Ø	×	Ñ	€ñ ÐÓôOó ðOñ ÐÓô	"ó ð	"ð$ u÷ $ð P U÷ PõXõ òõQð  %Ÿ>š>Ó+Ð Ø#Ð õð2 ! )Ð,Ð à"ŸšÓ)Ð õxôQ˜	ô Qõñ& ÐÓôGpó ðGpñT ÐÓôGó ðGõ"nõGõ.õ*Zõm÷Vr   