+
    „WÝj5©  ã                  óô   a € 0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RIHt R R ltR R	 ltR
 R ltR R ltRR"RR"RR"RR#RR$RR$RR%RR%RR%RR%RR%RR&/tR]R&   R R ltR R lt ! R  R!4      tR# )'z·Simple slash-command wrappers plus goal/heartbeat/loop manager hooks for the interactive CLI.
Mixin on ``HermesCLI``; cli.py symbols are imported lazily inside methods (import cycle).)ÚannotationsN©Út)ÚGatewayClientError)Úescapec               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚstr© )Úformats   "ÚNC:\Users\johnn\AppData\Local\hermes\hermes-agent\hermes_cli\cli_loops_mixin.pyÚ__annotate__r      s   € ÷ 1ñ 1�cñ 1ó    c                 ó    € R\        R4       R2# )uZ   Banner line printed after /clear â€” resolved at call time so the active language applies.ú  zcli.session.fresh_startÚ
r   r   r   r   Ú_fresh_startr      s   € à”Ð+Ó,Ð-¨RÐ0Ð0r   c               ó    € V ^8„  d   QhRRRR/# )r	   Úpayloadr   r
   r   )r   s   "r   r   r      s   € ÷ Añ A�cð A˜cñ Ar   c                óD   € V R ,           \        V 4      ^P8”  d   R 2# R 2# ):NéP   Nz...Ú )Úlen)r   s   &r   Ú_previewr      s,   € Ø�c�lˆ^¤S¨£\°BÔ%6˜EÐ?Ð@Ð@¸BÐ?Ð@Ð@r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r      s   € ÷  ñ  �cñ  r   c                 ó   € \        R 4      # )zcli.queue.usager   r   r   r   Ú_queue_usager      s   € ÜÐÓÐr   c               ó    € V ^8„  d   QhRRRR/# )r	   Útokenr   r
   z
int | Noner   )r   s   "r   r   r      s   € ÷ ñ ˜cð  jñ r   c                ón   € V P                  4       '       g   R#  \        V 4      #   \         d     R# i ; i)uz  1-based queue index from one whitespace-free token, or None when it isn't one.

``str.isdigit()`` alone is not enough: it accepts characters ``int()`` rejects
(``Â²``, ``â‘¡``), and ``int()`` also refuses digit strings past Python's
conversion limit. A ValueError here would escape the slash handler and take
down the prompt_toolkit app, so every queue index goes through this.
N)ÚisdigitÚintÚ
ValueError)r    s   &r   Ú_parse_queue_indexr%      s3   € ð �=‰=�?Š?ÙðÜ�5‹zÐøÜô Úðús   š
% ¥4³4ÚlistÚlsÚshowÚclearÚeditÚsetÚrmÚremoveÚdeleteÚdelÚpopÚmovezdict[str, tuple[str, bool]]Ú_QUEUE_VERBSc               ó    € V ^8„  d   QhRRRR/# )r	   ÚdecisionÚdictr
   Úboolr   )r   s   "r   r   r   9   s   € ÷ ñ  dð ¨tñ r   c                ó€   € ^ RI Hp V P                  R4      ;'       g    RpV'       d   V! RV 24       \        V4      # )zWPrint a manager decision's ``message`` (if any) via _cprint; True when one was printed.©Ú_cprintÚmessager   r   )Úclir9   Úgetr6   )r4   r9   Úmsgs   &  r   Ú_print_decision_messager>   9   s6   € åØ
�,‰,�yÓ
!×
'Ð
' R€Cß
Ù�"�S�E�
ÔÜ�‹9Ðr   c               ó   € V ^8„  d   QhRR/# )r	   r
   r6   r   )r   s   "r   r   r   B   s   € ÷ 1ñ 1 4ñ 1r   c                óv   € \        V R4      '       d   V P                  4       # ^ RIHp V! V P                  4      # )z¨``loops.goal_blocks_loop_tick`` for this loop's session: asked of the gateway when the manager
is the gateway's (it reads the goal row and its barrier where they live).Úgoal_blocks_tick)Úgoal_blocks_loop_tick)ÚhasattrrA   Úhermes_cli.loopsrB   Ú
session_id)ÚmgrrB   s   & r   Ú_goal_blocks_loop_tickrG   B   s3   € ô ˆsÐ&×'Ò'Ø×#Ñ#Ó%Ð%Ý6Ù  §¡Ó0Ð0r   c                  óò  € ] tR t^KtRtR R ltR R ltR R ltR R	 ltR
 R lt	R R lt
RRR R lltR R ltR R ltR R ltR R ltR R ltR R ltR R l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/ tR0 R1 ltR2 R3 ltR4 R5 ltR6 R7 lt R8 R9 lt!R: R; lt"R< R= lt#R> t$R? t%R@ RA lt&RB t'RC t(RD t)RE t*RF RG lt+RH RI lt,RJ RK lt-RL RM lt.RN RO lt/RPt0RQ# )SÚCLILoopsMixinz\Simple slash-command wrappers plus goal/heartbeat/loop manager hooks for the interactive CLIc               ó   € V ^8„  d   QhRR/# ©r	   Úcmd_originalr   r   )r   s   "r   r   ÚCLILoopsMixin.__annotate__N   s   € ÷ 
ñ 
 cñ 
r   c           
     	óÄ   € ^ RI HpHpHpHp V! V4      P                  4       pVR9   d
   RV n        R# V'       d&   V! RV \        R\        V4      R7       V 24       R# R# )é    )Ú_DIMÚ_RSTr9   Ú_slash_argsTr   zcli.exit.unknown_argument)ÚargumentF>   ú-dú--delete)	r;   rP   rQ   r9   rR   ÚlowerÚ_delete_session_on_exitr   Ú_escape)ÚselfrL   rP   rQ   r9   rR   Ú_argss   &&     r   Ú	_cmd_exitÚCLILoopsMixin._cmd_exitN   sb   € ç8Ó8Ù˜LÓ)×/Ñ/Ó1ˆàÐ&Ô&Ø+/ˆDÔ(ñ ÷ Ù�b˜˜œqÐ!<ÄwÈuÃ~ÔVÐWÐX\ÐW]Ð^Ô_ÙÙr   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM   Z   s   € ÷ 2ñ 2 cñ 2r   c                	ó@   € ^ RI Hp V P                  V! V4      4       R# )rO   )rR   N)r;   rR   Ú	show_help)rY   rL   rR   s   && r   Ú	_cmd_helpÚCLILoopsMixin._cmd_helpZ   s   € Ý#Ø�‰‘{ <Ó0Ö1r   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM   ^   s   € ÷ @ñ @¨ñ @r   c                	ój   € ^ RI HpHpHp V P	                  4        V! RV \        R4       V 24       R# )rO   ©rP   rQ   r9   r   zcli.display.ui_redrawnN)r;   rP   rQ   r9   Ú_force_full_redrawr   )rY   rL   rP   rQ   r9   s   &&   r   Ú_cmd_redrawÚCLILoopsMixin._cmd_redraw^   s4   € ÷ 	,Ñ+Ø×ÑÔ!Ù�"�T�Fœ1Ð5Ó6Ð7¸°vÐ>Ö?r   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM   e   s   € ÷ (!ñ (! sñ (!r   c                	óh  € ^ RI HpHpHpHpHp ^ RIHp V P                  RRVR7       f   R# V P                  RR7       V! 4        V P                  '       gP   V P                  P                  4        V P                  4        \        \        4       4       V P!                  4        R# T P                  P"                  pVP%                  4        VP'                  ^ ^ 4       VP)                  4        V! 4       p	^ R	IHp
 V
! W	4      pVP.                  f   V	P                  V! 4       4       MhVP0                  e(   V P3                  W{P0                  VP.                  4       M3V! V P4                  V P6                  RR
7      pV! RRV/VP.                  B  V! \        4       4       V P!                  4        R# )rO   )ÚChatConsoleÚ_build_compact_bannerÚ_clear_output_historyr9   Úget_tool_definitions)Úbuild_welcome_bannerr)   zdThis clears the screen and starts a new session.
The current conversation history will be discarded.©rL   NT)Úsilent)Úbanner_plan)Úenabled_toolsetsÚdisabled_toolsetsÚ
quiet_modeÚtoolsr   )r;   rj   rk   rl   r9   rm   Úhermes_cli.bannerrn   Ú_confirm_destructive_slashÚnew_sessionÚ_appÚconsoler)   Úshow_bannerÚprintr   Ú_print_random_tipÚoutputÚerase_screenÚcursor_gotoÚflushÚhermes_cli.cli_info_mixinrq   Ú	banner_kwÚ	inventoryÚ_show_gateway_bannerrr   rs   )rY   rL   rj   rk   rl   r9   rm   rn   ÚoutÚccrq   Úplanru   s   &&           r   Ú
_cmd_clearÚCLILoopsMixin._cmd_cleare   s^  € ßpÕpÝ:Ø×*Ñ*ØðBà%ð	 +ó 
ð
 òñ Ø×Ñ ÐÔ%ÙÔØ�y�yˆyØ�L‰L×ÑÔ Ø×ÑÔÜ”,“.Ô!Ø×"Ñ"Ô$Ùð �i‰i×ÑˆØ×ÑÔØ�‰˜˜1ÔØ�	‰	ŒÙ‹]ˆõ 	:Ù˜4Ó$ˆØ�>‰>Ò!Ø�H‰HÑ*Ó,Õ-Ø�^‰^Ò'Ø×%Ñ%Ð&:¿N¹NÈDÏNÉNÕ[á(¸$×:OÑ:OØ;?×;QÑ;QÐ^bôdˆEá Ñ? uÐ?°·±Ò?Ù”“ÔØ×ÑÖ r   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM   �   s   € ÷ 4Gñ 4G sñ 4Gr   c           	     	óÐ  € ^ RI Hp ^ RIHp VP	                  ^R7      p\        V4      ^8X  dô   V P                  '       g   V! RV! RR7       24       R# V! R\        RV P                  R	7       24       V P                  P                  V P                  4      pV'       d7   VP                  R
4      '       d    V! R\        RVR
,          R7       24       R# V P                  '       d#   V! R\        RV P                  R7       24       R# V! R\        R4       24       R# V^,          P                  4       pV'       g   V! R\        R4       24       R# V P                  '       g   V! RV! RR7       24       R#  ^ RIHp VP                  V4      pT'       g   T! R\        R4       24       R# T P                  P                  T P                  4      '       dc    T P                  P!                  T P                  T4      '       d    RT n        T! R\        RTR7       24       R# T! R\        R4       24       R# T P                  P%                  T4      p
T
'       d    T! R\        RYŠR,          R7       24       R# Y€n        T! R\        RTR7       24       R#   \         d   p	T! RT	 24        Rp	?	R# Rp	?	ii ; i  \         d   p	T! RT	 24        Rp	?	R# Rp	?	ii ; i)rO   r8   )Úformat_session_db_unavailable)Úmaxsplitr   T)ÚdetailsNzcli.title.session_id©rE   Útitlezcli.title.current©r‘   zcli.title.pendingzcli.title.none_set_usagezcli.title.usage)Ú	SessionDBzcli.title.empty_after_cleanupç        zcli.title.setz gateway.shared.session_not_foundzcli.title.already_in_useÚid)r‘   rE   zcli.title.queued)r;   r9   Úhermes_stater�   Úsplitr   Ú_session_dbr   rE   Úget_sessionr<   Ú_pending_titleÚstripr“   Úsanitize_titler$   Úset_session_titleÚ_status_bar_title_checked_atÚget_session_by_title)rY   rL   r9   r�   ÚpartsÚsessionÚ	raw_titler“   Ú	new_titleÚeÚexistings   &&         r   Ú
_cmd_titleÚCLILoopsMixin._cmd_title�   s’  € ÝÝ>Ø×"Ñ"¨AÐ"Ó.ˆÜˆu‹:˜Œ?à×#×#Ð#Ù˜"Ñ:À4ÔHÐIÐJÔKÙÙ�bœÐ1¸d¿o¹oÔNÐOÐPÔQØ×&Ñ&×2Ñ2°4·?±?ÓCˆGß˜7Ÿ;™; w×/Ò/Ù˜"œQÐ2¸'À'Õ:JÔKÐLÐMÔNñ
 ð	 ×$×$Ð$Ù˜"œQÐ2¸$×:MÑ:MÔNÐOÐPÔQñ ñ ˜"œQÐ9Ó:Ð;Ð<Ô=ÙØ˜!•H—N‘NÓ$ˆ	ßÙ�bœÐ,Ó-Ð.Ð/Ô0ÙØ××ÐÙ�bÑ6¸tÔDÐEÐFÔGÙð	Ý.Ø!×0Ñ0°Ó;ˆI÷ Ù�bœÐ:Ó;Ð<Ð=Ö>Ø×Ñ×)Ñ)¨$¯/©/×:Ò:ð"Ø×#Ñ#×5Ñ5°d·o±oÀy×QÒQØ8;�DÔ5Ù˜b¤ ?¸)Ô!DÐ EÐFÖGá˜b¤Ð#EÓ!FÐ GÐHÖIð
 ×'Ñ'×<Ñ<¸YÓGˆHßÙ˜"œQÐ9ÀÐ`dÕWeÔfÐgÐhÖià&/Ô#Ù˜"œQÐ1¸ÔCÐDÐEÖFøô+ ô 	Ù�b˜˜�HÔÝûð	ûô ô "Ù˜"˜Q˜C˜×!Ò!ûð"ús<   Å>J  Ç+K ÈK È*K Ê KÊ+J<Ê<KËK%ËK Ë K%c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM   Å   s   € ÷ &ñ & Sñ &r   c                	ó¶   € V P                  V4      w  r#VP                  4       ;'       g    R pV P                  RRVR7       f   R# V P                  VR7       R # )NÚnewzPThis starts a fresh session.
The current conversation history will be discarded.ro   Tr’   )Ú_split_destructive_skipr›   rw   rx   )rY   rL   Ú	_new_argsÚ_r‘   s   &&   r   Ú_cmd_newÚCLILoopsMixin._cmd_newÅ   si   € ð ×3Ñ3°LÓA‰ˆ	Ø—‘Ó!×)Ð) TˆØ×*Ñ*ØðBà%ð	 +ó 
ð
 òñ Ø×Ñ˜uÐÖ%r   c               ó$   € V ^8„  d   QhRRRRRR/# )r	   Úsignalr   Úturnsr#   r
   ÚNoner   )r   s   "r   r   rM   Ó   s&   € ÷ kñ k¨Sð k¸ð kÀTñ kr   c                	ó®   € V P                   '       dC   ^ RIHp V! V\        V RR4      \        V RR4      \        V RR4      \        V RR4      VR7       R# R# )rO   )Úrecord_model_frictionrE   NÚagentÚproviderÚmodel)rE   r¶   r·   r¸   r²   )Ú_slash_metrics_surfaceÚ-hermes_cli.observability.shared_metrics_modelrµ   Úgetattr)rY   r±   r²   rµ   s   &&& r   Ú_record_model_frictionÚ$CLILoopsMixin._record_model_frictionÓ   sV   € à×&×&Ð&Ý[Ù!Ø¤7¨4°¸tÓ#DÌGÐTXÐZaÐcgÓLhÜ   z°4Ó8ÄÈÈgÐW[Ó@\Ðdi÷kñ 'r   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM   Û   s   € ÷ /ñ / sñ /r   c                	óÊ   € V P                  4       pV'       d   V P                  R 4       V'       d2   \        V R4      '       d   V P                  P	                  V4       R# R# R# )ÚretryÚ_pending_inputN)Ú
retry_lastr¼   rC   rÁ   Úput)rY   rL   Ú	retry_msgs   && r   Ú
_cmd_retryÚCLILoopsMixin._cmd_retryÛ   sJ   € Ø—O‘OÓ%ˆ	ßØ×'Ñ'¨Ô0ßœ Ð'7×8Ò8Ø×Ñ×#Ñ# IÖ.ñ 9‰9r   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM   â   s   € ÷ >ñ > cñ >r   c           
     	ó
  € ^pVP                  4       p\        V4      ^8”  d    \        ^\        V^,          4      4      pV P                  '       g   \        \        R4      4       R# V^8X  d   \        R4      M\        RVR7      pV P                  RWAR	7      f   R# V P                  V4      pV'       d   V P                  RV4       R
# R
#   \         d+    \        \        R\        T^,          4      R7      4        R# i ; i)é   zcli.undo.invalid_count)ÚvalueTzcli.session.undo_no_messageszcli.undo.removes_last_exchangezcli.undo.removes_last_turns©ÚcountÚundoro   N)r—   r   Úmaxr#   r$   r|   r   ÚreprÚconversation_historyrw   Ú	undo_lastr¼   )rY   rL   Ú_undo_nÚ_undo_partsÚ
_undo_descÚturns_undones   &&    r   Ú	_cmd_undoÚCLILoopsMixin._cmd_undoâ   sí   € àˆØ"×(Ñ(Ó*ˆÜˆ{Ó˜aÔðÜ˜a¤ [°¥^Ó!4Ó5�ð
 ×(×(Ð(Ü”!Ð2Ó3Ô4Ùð ˜!Œ|ô Ð.Ô/äÐ0¸Ô@ð 	ð ×*Ñ*¨6°:Ð*ÓYÒaÙØ—~‘~ gÓ.ˆßØ×'Ñ'¨°Ö=ñ øô ô Ü”aÐ0¼¸[È½^Ó8LÔMÔNÚðús   ¤C Ã1DÄDc               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM   ú   s   € ÷ 6ñ 6¨ñ 6r   c                	ó²   € V P                  V P                  V4      4      ;_uu_ 4        V P                  V4       R R R 4       R #   + '       g   i     R # ; i©N)Ú_busy_commandÚ_slow_command_statusÚ_handle_skills_command©rY   rL   s   &&r   Ú_cmd_skillsÚCLILoopsMixin._cmd_skillsú   s<   € Ø×Ñ × 9Ñ 9¸,Ó G×HÕHØ×'Ñ'¨Ô5÷ I×H×HÒHús   ©AÁA	c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM   þ   s   € ÷ Añ A¨ñ Ar   c                	ór   € ^ RI HpHp V! RV! RR7      4      P                  pV P	                  VRRR7       R# )rO   )ÚCommandContextÚexecute_commandÚegressr;   )ÚsurfaceF)Ú	highlightÚmarkupN)Úhermes_cli.slash_execrã   rä   ÚtextÚ_console_print)rY   rL   rã   rä   rê   s   &&   r   Ú_cmd_egressÚCLILoopsMixin._cmd_egressþ   s1   € ßIÙ˜x©ÀÔ)FÓG×LÑLˆØ×Ñ˜D¨E¸%ÐÖ@r   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM     s   € ÷ |ñ |¨3ñ |r   c                	ó¦   € V P                   '       * V n         T P                  R V P                   '       d   \        R4      M
\        R4       24       R# )r   zcli.display.status_bar_visiblezcli.display.status_bar_hiddenN)Ú_status_bar_visiblerë   r   rÞ   s   &&r   Ú_cmd_statusbarÚCLILoopsMixin._cmd_statusbar  sG   € Ø'+×'?Ñ'?Ô#?ˆÔ Ø×ÑØ¸×8P×8PÐ8P”Ð3Ô4ÔVWÐXwÓVxÐyÐzö	|r   c               ó    € V ^8„  d   QhRRRR/# )r	   rL   r   r
   r6   r   )r   s   "r   r   rM     s   € ÷ 1ñ 1¨ð 1°ñ 1r   c                	ó,   € V P                  4       '       * # rÚ   )Ú_handle_update_commandrÞ   s   &&r   Ú_cmd_updateÚCLILoopsMixin._cmd_update  s   € à×.Ñ.Ó0Ô0Ð0r   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM     s   € ÷ 0ñ 0¨ñ 0r   c                	ó$   € ^ RI Hp V! RR7       R# )rO   )Ú_print_version_infoT)Úcheck_updatesN)Úhermes_cli.mainrú   )rY   rL   rú   s   && r   Ú_cmd_versionÚCLILoopsMixin._cmd_version  s   € Ý7Ù¨$×/r   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM     s   € ÷ @ñ @¨ñ @r   c                	óR   € ^ RI Hp V! 4       p\        R\        RVR7       24       R# )rO   )Ú
reload_envr   zcli.reload.env_reloadedrË   N)Úhermes_cli.configr  r|   r   )rY   rL   r  rÌ   s   &&  r   Ú_cmd_reloadÚCLILoopsMixin._cmd_reload  s$   € Ý0Ù“ˆÜ�”1Ð.°eÔ<Ð=Ð>Ö?r   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM     s   € ÷ "ñ "¨sñ "r   c                	ó°   € V P                  V P                  V4      4      ;_uu_ 4        V P                  4        R R R 4       R #   + '       g   i     R # ; irÚ   )rÛ   rÜ   Ú_reload_skillsrÞ   s   &&r   Ú_cmd_reload_skillsÚ CLILoopsMixin._cmd_reload_skills  s:   € Ø×Ñ × 9Ñ 9¸,Ó G×HÕHØ×ÑÔ!÷ I×H×HÒHús   ©AÁA	c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM     s   € ÷ .:ñ .:¨ñ .:r   c                	óÐ  € ^ RI Hp  ^ RIHpHpHpHp V! 4       pV! 4       pV! 4       p	V U
u. uF  qª^,          R8w  g   K  V
NK  	  pp
\        V4      \        V4      ,
          pV'       gp   \        \        R4      4       \        R\        R4       24       \        R\        RV! 4        R2R	7       24       V'       d   \        R\        R
VR7       24       R# ^ RI
Hp VP                  V 4      pVf4    ^ RIHp V! 4       P                  4        Uu/ uF  pVR,          VbK  	  pp\        \        R\        V4      R7      4       \#        V4       EF  w  ppppppV! VW‰VR7      pVP%                  V4      ;'       g    / pR& Uu. uF6  pVP%                  V4      '       g   K  VV,           R\        RV 24       2NK8  	  ppRRRR/P%                  VR4      pV'       d   RV 2MRpV'       d   RRP'                  V4       R2MRpVR8X  d   RMRV R2pVP%                  R 4      '       d   R!VR ,           2MRp\        RV RV V V V V 24       EK  	  V'       d   \        R\        R"VR7       24       \        R\        R#4       24       R# u up
i u upi   \          d    / p EL‡i ; iu upi   \          d"   p
\        \        R$T
R%7      4        Rp
?
R# Rp
?
ii ; i)'rO   )Údisplay_hermes_home)Ú_discover_all_pluginsÚ_get_disabled_setÚ_get_enabled_setÚ_plugin_statusÚbundledzcli.plugins.none_installedr   zcli.plugins.install_hintzcli.plugins.drop_dir_hintz	/plugins/)Úpathzcli.plugins.bundled_availablerË   N)Úgateway_plugin_commands)Úget_plugin_managerÚnamezcli.plugins.user_plugins_header)ÚkeyÚ zcli.plugins.count_noun_Úenabledu   âœ“Údisabledu   âœ—u   â—‹z vr   z (z, Ú)z [Ú]Úerroru    â€” zcli.plugins.bundled_morezcli.plugins.enable_disable_hintzcli.plugins.system_error©r  )ru   ÚhooksÚcommands)Úhermes_constantsr  Úhermes_cli.plugins_cmdr  r  r  r  r   r|   r   Ú
hermes_clir  ÚloadedÚhermes_cli.pluginsr  Úlist_pluginsÚ	ExceptionÚsortedr<   Újoin) rY   rL   r  r  r  r  r  Úentriesr  r  r¤   Úuser_entriesÚbundled_countr  r#  r  Úpr  ÚversionÚ_descÚsourceÚ_dirr  ÚstateÚinfoÚkÚbitsÚglyphÚverÚdetailÚlabelr  s    &&                              r   Ú_cmd_pluginsÚCLILoopsMixin._cmd_plugins  sÐ  € Ý8ð,	:÷\ó \á+Ó-ˆGÙ&Ó(ˆGÙ(Ó*ˆHñ (/ÓD¡w !°Aµ$¸)Ñ2CŸA˜A¡wˆLÐDÜ ›L¬3¨|Ó+<Õ<ˆMßÜ”aÐ4Ó5Ô6Ü˜œ1Ð7Ó8Ð9Ð:Ô;Ü˜œ1Ð8ÑBUÓBWÐAXÐXaÐ?bÔcÐdÐeÔfß Ü˜BœqÐ!@ÈÔVÐWÐXÔYÙÝ:Ø,×3Ñ3°DÓ9ˆFØŠ~ð ÝEÙ4FÓ4H×4UÑ4UÔ4WÓXÑ4W¨q˜a �i¨šlÑ4W�FÐXô ”!Ð5¼SÀÓ=NÔOÔPÜ;AÀ,×;OÑ7��g˜u f¨d°CÙ& t¨WÀCÔH�Ø—z‘z $Ó'×-Ð-¨2�ÙQoÓÑQoÈAÐsw×s{Ñs{Ð|}×s~ÔG˜4 �7˜) 1¤QÐ)@ÀÀÐ'DÓ%EÐ$FÓGÑQo�ÐØ" E¨:°uÐ=×AÑAÀ%ÈÓO�ß(/˜˜7˜)‘n°R�ß48˜2˜dŸi™i¨›oÐ.¨aÑ0¸b�Ø# yÔ0™¸¸5¸'À°m�Ø37·8±8¸G×3DÒ3D˜%  W¥˜Ñ/È"�Ü˜˜5˜'  4 &¨¨¨e¨W°V°H¸U¸GÐD×Eñ <P÷ Ü˜œ1Ð7¸}ÔMÐNÐOÔPÜ�B”qÐ:Ó;Ð<Ð=Ö>ùò= Eùò YøÜ ô  Ø“Fð üò @øô ô 	:Ü”!Ð.°aÔ8×9Ò9ûð	:ús–   ˆ%J9 ­JÁJÁBJ9 ÃJ9 Ã7J  ÄJÄ'J  Ä)AJ9 ÆJ9 ÆJ4Æ&J4Ç.J9 Ç3<J9 È03J9 É$0J9 ÊJ9 ÊJ  Ê J1Ê-J9 Ê0J1Ê1J9 Ê9K%ËK Ë K%c               ó   € V ^8„  d   QhRR/# ©r	   r
   r&   r   )r   s   "r   r   rM   L  s   € ÷ 3ñ 3 dñ 3r   c                óº   € V P                   P                  ;_uu_ 4        \        V P                   P                  4      uuRRR4       #   + '       g   i     R# ; i)zUSnapshot of queued next-turn prompts (raw items; may include ``_VoiceInputMessage``).N)rÁ   Úmutexr&   Úqueue©rY   s   &r   Ú_pending_input_itemsÚ"CLILoopsMixin._pending_input_itemsL  s7   € à× Ñ ×&×&Ó&Ü˜×+Ñ+×1Ñ1Ó2÷ '×&×&Ó&ús   ŸA	Á	A	c               ó   € V ^8„  d   QhRR/# )r	   r
   ztuple[list, list]r   )r   s   "r   r   rM   Q  s   € ÷ ñ Ð/@ñ r   c           	     ó²  € V P                   pVP                  ;_uu_ 4        \        VP                  4      p\        V! \        V4      4      4      pVP                  P	                  4        VP                  P                  V4       \        V4      Vn        V'       d   VP                  P                  4        RRR4       W43#   + '       g   i     XX3# ; i)zÍApply ``mutate(items) -> items`` to the queued prompts under the queue's own mutex,
so a voice/interrupt ``put`` from another thread can't slip between snapshot and
write-back. Returns ``(before, after)``.N)
rÁ   r>  r&   r?  r)   Úextendr   Úunfinished_tasksÚ	not_emptyÚ
notify_all)rY   ÚmutateÚqÚbeforeÚafters   &&   r   Ú_mutate_pending_inputÚ#CLILoopsMixin._mutate_pending_inputQ  s—   € ð ×ÑˆØ�W�W‹WÜ˜!Ÿ'™'“]ˆFÜ™¤ V£Ó-Ó.ˆEØ�G‰G�M‰MŒOØ�G‰G�N‰N˜5Ô!Ü!$ U£ˆAÔßØ—‘×&Ñ&Ô(÷ ð ˆ}Ð÷ ŽWð �uˆ}Ðús   ¡BCÃC	c                óH   € ^ RI Hp \        V RR4      '       d	   V! V 4      # R# )zXThe gateway session store when this CLI is a viewer of the gateway's session, else None.)Úgateway_storerE   N)Úhermes_cli.gateway_tools_notifyrP  r»   )rY   rP  s   & r   Ú_gateway_queue_storeÚ"CLILoopsMixin._gateway_queue_store`  s#   € åAÜ&-¨d°LÀ$×&GÒ&G‰}˜TÓ"ÐQÈTÐQr   c               ó   € V ^8„  d   QhRR/# r<  r   )r   s   "r   r   rM   e  s   € ÷ Nñ N˜dñ Nr   c                óÈ   € . pV P                  4       pVe!   ^ RIHp \        VP	                  W4      4      pYP                  4        Uu. uF  pRV3NK	  	  up,           # u upi )z”``[(admission_id | None, item)]``: the owner's queued admissions (run first, in its FIFO
order), then the turns still waiting in ``_pending_input``.N©Úgateway_queue)rR  r"  rW  r&   Úqueued_rowsrA  )rY   ÚitemsÚstorerW  Úitems   &    r   Ú_queue_itemsÚCLILoopsMixin._queue_itemse  s_   € ð ˆØ×)Ñ)Ó+ˆØÒÝ0Ü˜×2Ñ2°4Ó?Ó@ˆEØ×1JÑ1JÔ1LÓMÑ1L¨˜˜t›Ñ1LÑMÕMÐMùÒMs   Á	Ac               ó    € V ^8„  d   QhRRRR/# )r	   rê   r   r
   r³   r   )r   s   "r   r   rM   o  s   € ÷ :ñ : 3ð :¨4ñ :r   c           	     	ó  € ^ RI Hp V P                  V4      pV P                  '       d   V P	                  4       MRpVe   ^ RIHp  VP                  WV4       MV P                  P                  V4       V P                  '       d   RMR	pV! R\        V\        V4      R
7       24       R#   TP                   d"   pT! R\        RTR7       24        Rp?R# Rp?i\         d"   pT! R\        RTR7       24        Rp?R# Rp?ii ; i)rO   r8   NrV  r   zcli.queue.submit_unknownr  zcli.queue.gateway_refusedzcli.queue.queued_next_turnzcli.queue.queued©Úpreview)r;   r9   Ú_expand_paste_referencesÚ_agent_runningrR  r"  rW  Úsubmit_queuedÚQueueOutcomeUnknownr   r   rÁ   rÃ   r   )rY   rê   r9   r   rZ  rW  Úexcr  s   &&      r   Ú_queue_enqueueÚCLILoopsMixin._queue_enqueueo  sí   € ÝØ×/Ñ/°Ó5ˆØ/3×/B×/BÐ/B�×)Ñ)Ô+ÈˆØÒõ 1ðØ×+Ñ+¨D¸ÕAð ×Ñ×#Ñ# GÔ,Ø.2×.A×.AÐ.AÑ*ÐGYˆÙ�"”Q�s¤H¨WÓ$5Ô6Ð7Ð8Ö9øð !×4Ñ4ô Ù˜"œQÐ9ÀÔEÐFÐGÔHÝûÜ%ô Ù˜"œQÐ:À#ÔFÐGÐHÔIÝûðús*   ÁB, Â,DÂ=CÃDÃ&DÃ'DÄDc               ó    € V ^8„  d   QhRRRR/# ©r	   Úrestr   r
   r³   r   )r   s   "r   r   rM   „  s   € ÷ 	Tñ 	T ð 	T¨ñ 	Tr   c                	óÀ  € ^ RI HpHp V P                  4       pV'       g7   T! R\	        R4       2V'       d   RMR\        4       ,           ,           4       R# V! R\	        R\        V4      R7       24       \        V^4       FX  w  pw  rg\        Wr4      '       d   RMRpV! R	V R
\        \        V4      P                  \        ^
4      R4      4       V 24       KZ  	  R# )rO   ©Ú_VoiceInputMessager9   r   zcli.queue.emptyr   Nzcli.queue.pending_headerrË   z [voice]z    z. r  )r;   rn  r9   r\  r   r   r   Ú	enumerateÚ
isinstancer   r   ÚreplaceÚchr)	rY   rk  rn  r9   rY  Úidxr­   r[  Útags	   &&       r   Ú_queue_listÚCLILoopsMixin._queue_list„  s·   € ß3Ø×!Ñ!Ó#ˆßÙ�bœÐ,Ó-Ð.Ð/¿±2À4Ì,Ë.ÕCXÕYÔZÙÙ�"”QÐ1¼¸U»ÔDÐEÐFÔGÜ'¨¨qÖ1‰NˆC‘�!Ü *¨4× DÒ D‘*È"ˆCÙ�d˜3˜%˜r¤(¬3¨t«9×+<Ñ+<¼SÀ»WÀcÓ+JÓ"KÐ!LÈSÈEÐRÖSó 2r   c           
     ó–  € ^ RI Hp ^ RIHp ^ RIHp  \        WQ4      ! W P                  4       .VO5!  #   T dc   p\        T4      TP                  9   d   T! R\        RTR7       24        Rp?R# TR8X  d   RMR	pT! R\        Y‚TR
7       24        Rp?R# Rp?i\         d"   pT! R\        RY'R
7       24        Rp?R# Rp?ii ; i)zaOne owner verb on queued item ``index``; its refusal is printed (in its own words), never raised.r8   rV  )ÚGatewayRPCErrorr   úcli.queue.already_started©Úindexrq  zcli.queue.edit_refusedzcli.queue.remove_refused)r{  r  Nzcli.queue.change_unknown)r;   r9   r"  rW  Úhermes_cli.gateway_clientrx  r»   rR  r   ÚSTARTED_REFUSALSr   r   )	rY   Úverbr{  Úargsr9   rW  rx  rf  r  s	   &&&*     r   Ú_queue_gateway_callÚ!CLILoopsMixin._queue_gateway_call�  sÎ   € åÝ,Ý=ð		RÜ˜=Ô/°×6OÑ6OÓ6QÐYÐTXÓYÐYøØô 	?Ü�3‹x˜=×9Ñ9Ô9Ù˜"œQÐ:À%ÔHÐIÐJ×KÐKñ ð	 37¸)Ô2CÑ.ÐIc�Ù˜"œQ˜s°sÔ;Ð<Ð=×>Ð>ñ ûô "ô 	RÙ�bœÐ5¸UÔNÐOÐP×QÐQÙûð	Rús,   ” 5 µC¼0BÁ2!BÂCÂ&CÂ'CÃCc               ó    € V ^8„  d   QhRRRR/# rj  r   )r   s   "r   r   rM      s   € ÷ .ñ . ð .¨ñ .r   c                	óD  a € ^ RI Hp S P                  4        UUu. uF  w  r4V'       g   K  VNK  	  ppp\        V 3R l\	        V^4       4       4      pS P                  R 4      w  rtV\        V4      ,          pV^8X  d   RMRpV! R\        W†R7       24       R# u uppi )	rO   r8   c              3  ó^   <"  € T F"  w  rSP                  R W4      R8X  g   K  ^x € K$  	  R# 5i)ÚcancelÚ	cancelledN)r€  )Ú.0rs  Ú	admissionrY   s   &  €r   Ú	<genexpr>Ú-CLILoopsMixin._queue_clear.<locals>.<genexpr>£  s2   øé € ð \Ñ.A™N˜CØ×1Ñ1°(¸CÓKÈ{ÑZ÷ ’aÓ.Aùs   ƒ-£
-c                ó   € . # rÚ   r   )rY  s   &r   Ú<lambda>Ú,CLILoopsMixin._queue_clear.<locals>.<lambda>¥  s   € ¹Rr   zcli.queue.cleared_onezcli.queue.cleared_otherr   rË   N)r;   r9   r\  Úsumro  rM  r   r   )	rY   rk  r9   rˆ  r­   ÚownedÚclearedrK  r  s	   f&       r   Ú_queue_clearÚCLILoopsMixin._queue_clear   s–   ø€ ÝØ/3×/@Ñ/@Ô/BÔPÑ/B™|˜yÄi—�Ñ/BˆÑPÜô \¬i¸¸qÔ.Aó \ó \ˆà×.Ñ.Ñ/?Ó@‰	ˆØ”3�v“;ÕˆØ)0°A¬Ñ%Ð;TˆÙ�"”Q�sÔ*Ð+Ð,Ö-ùó Qs
   ›B¬Bc               ó    € V ^8„  d   QhRRRR/# rj  r   )r   s   "r   r   rM   ª  s   € ÷ _ñ _ #ð _¨$ñ _r   c                	óD  aa€ ^ RI Hp VP                  4       p\        V4      ^8X  d   \	        V^ ,          4      MRpVf   V! R\        R4       24       R# V P                  4       p\        R V 4       4      p^Tu;8:  d   V8:  d—   M M“WT^,
          ,          w  rxV P                  RWG4      p	V	R8X  d,   V! R\        RV\        \        V4      4      R	7       24       R# V	R
8X  d   V! R\        RVR7       24       R# V	R8X  d   V! R\        RVR7       24       R# WF,
          o. oV P                  VV3R l4      w  r«S'       d3   V! R\        RV\        \        S^ ,          4      4      R	7       24       R# V! R\        RWF\        V
4      ,           R7       24       R# )rO   r8   Nr   zcli.queue.usage_removec              3  ó>   "  € T F  w  rV'       g   K  ^x € K  	  R# 5i©rÉ   Nr   ©r‡  rˆ  r­   s   &  r   r‰  Ú.CLILoopsMixin._queue_remove.<locals>.<genexpr>²  ó   é € Ð=©%™,˜)´9—A’A«%ùó   ‚“
r…  r†  zcli.queue.removed©r{  ra  Ústoppedzcli.queue.started_stoppedrz  Ústartedry  c                ó    <€ ^Su;8:  d   \        V 4      8:  d5   M M1SP                  V P                  S^,
          4      4      ;'       g    T # T # ©rÉ   )r   Úappendr0   )rY  ÚlocalÚremoveds   &€€r   rŒ  Ú-CLILoopsMixin._queue_remove.<locals>.<lambda>À  s@   ø€ ÈQÐRWÖMeÔ[^Ð_dÓ[e×Me˜7Ÿ>™>¨%¯)©)°E¸AµIÓ*>Ó?×HÐHÀ5ÐpÐkpÐpr   úcli.queue.item_not_found©r{  Úsize)r;   r9   r—   r   r%   r   r\  rŽ  r€  r   r   rM  )rY   rk  r9   r4  rs  rY  r�  rˆ  rê   ÚverdictrK  r­   r¡  r¢  s   &&          @@r   Ú_queue_removeÚCLILoopsMixin._queue_removeª  s„  ù€ ÝØ�z‰z‹|ˆÜ-0°«Y¸!¬^Ô   a¥Ô)ÀˆØŠ;Ù�bœÐ3Ó4Ð5Ð6Ô7ÙØ×!Ñ!Ó#ˆÜÑ=©%Ó=Ó=ˆØ�Ö�u×Ø#¨!¥G�n‰OˆIØ×.Ñ.¨x¸ÓHˆGØ˜+Ô%Ù˜"œQÐ2¸#ÄxÔPSÐTXÓPYÓGZÔ[Ð\Ð]Ô^ñ
 ð	 ˜IÔ%Ù˜"œQÐ:À#ÔFÐGÐHÔIñ ð ˜IÔ%Ù˜"œQÐ:À#ÔFÐGÐHÔIÙØ•ˆØˆØ×.Ñ.Ýpór‰	ˆçÙ�bœÐ.°cÄ8ÌCÐPWÐXYÕPZËOÓC\Ô]Ð^Ð_Ö`á�bœÐ5¸SÌsÐSYË{ÕGZÔ[Ð\Ð]Ö^r   c               ó    € V ^8„  d   QhRRRR/# rj  r   )r   s   "r   r   rM   Æ  s   € ÷  Zñ  Z ð  Z¨ñ  Zr   c                	óü  aaa€ ^ RI HoHp VP                  R^4      p\	        V4      ^8X  d   \        V^ ,          4      MRpVf   V! R\        R4       24       R# V^,          pV P                  VP                  4       4      oV P                  4       p\        R V 4       4      p^Tu;8:  d   V8:  dT   M MPV P                  RWFV^,
          ,          ^ ,          S4      '       d!   V! R\        RV\        S4      R7       24       R# WG,
          oR	 VVV3R
 llpV P                  V4      w  ršWš8X  d)   V! R\        RWG\	        V	4      ,           R7       24       R# V! R\        RV\        S4      R7       24       R# )rO   rm  Nr   zcli.queue.usage_editc              3  ó>   "  € T F  w  rV'       g   K  ^x € K  	  R# 5ir–  r   r—  s   &  r   r‰  Ú,CLILoopsMixin._queue_edit.<locals>.<genexpr>Ò  r™  rš  rq  zcli.queue.updatedr›  c               ó    € V ^8„  d   QhRRRR/# ©r	   rY  r&   r
   r   )r   s   "r   r   Ú/CLILoopsMixin._queue_edit.<locals>.__annotate__Ú  s   € ÷ 	ñ 	˜ð 	 $ñ 	r   c                ó¬   <€ ^Su;8:  d   \        V 4      8:  d;   M V # \        V S^,
          ,          S4      pV'       d	   S! S4      MSV S^,
          &   V # rŸ  )r   rp  )rY  Úvoicern  r¡  Únew_texts   & €€€r   Ú_editÚ(CLILoopsMixin._queue_edit.<locals>._editÚ  sP   ø€ Ø�EÖ'œS ›ZÖ'ð
 ˆLô # 5¨°­Õ#3Ð5GÓH�ßCHÑ#5°hÔ#?Èh��e˜a•iÑ ØˆLr   r¤  r¥  )r;   rn  r9   r—   r   r%   r   rb  r›   r\  rŽ  r€  r   rM  )rY   rk  r9   r4  rs  Ú
new_promptrY  r�  r´  rK  rL  rn  r¡  r³  s   &&         @@@r   Ú_queue_editÚCLILoopsMixin._queue_editÆ  sN  ú€ ß3ð �z‰z˜$ Ó"ˆÜ-0°«Y¸!¬^Ô   a¥Ô)ÀˆØŠ;Ù�bœÐ1Ó2Ð3Ð4Ô5ÙØ˜!•Wˆ
Ø×0Ñ0°×1AÑ1AÓ1CÓDˆØ×!Ñ!Ó#ˆÜÑ=©%Ó=Ó=ˆØ�Ö�u×à×'Ñ'¨	°3¸cÀA½g½ÀqÕ8IÈ8×TÒTÙ˜"œQÐ2¸#ÄxÐPXÓGYÔZÐ[Ð\Ô]ÙØ•ˆ÷	ò 	ð ×2Ñ2°5Ó9‰ˆØŒ?Ù�bœÐ5¸SÌsÐSYË{ÕGZÔ[Ð\Ð]Ö^á�bœÐ.°cÄ8ÈHÓCUÔVÐWÐXÖYr   c               ó    € V ^8„  d   QhRRRR/# rj  r   )r   s   "r   r   rM   è  s   € ÷ ^ñ ^ ð ^¨ñ ^r   c           
     	ón  aa	€ ^ RI Hp VP                  4       p\        V4      ^8X  d
   R V 4       MRw  o	oS	e   Sf   V! R\	        R4       24       R# \        R V P                  4        4       4      pV'       d/   \        S	S4      V8:  d   S	S8w  d   V! R\	        R4       24       R# S	V,
          SV,
          uo	oR VV	3R	 llpV P                  V4      w  rgWg8X  d0   S	S8w  d)   V! R\	        R
V\        V4      ,           R7       24       R# V! R\	        RS	V,           SV,           R7       24       R# )rO   r8   c              3  ó8   "  € T F  p\        V4      x € K  	  R # 5irÚ   )r%   )r‡  Úbs   & r   r‰  Ú,CLILoopsMixin._queue_move.<locals>.<genexpr>ë  s   é € Ð8±4¨aÔ& q×)Ð)³4ùs   ‚Nr   zcli.queue.usage_movec              3  ó>   "  € T F  w  rV'       g   K  ^x € K  	  R# 5ir–  r   r—  s   &  r   r‰  r½  ï  s   é € ÐKÑ*=™,˜)Ä—A’AÓ*=ùrš  zcli.queue.move_gateway_fifoc               ó    € V ^8„  d   QhRRRR/# r¯  r   )r   s   "r   r   Ú/CLILoopsMixin._queue_move.<locals>.__annotate__ö  s   € ÷ 	ñ 	˜ð 	 $ñ 	r   c                óÖ   <€ ^Su;8:  d   \        V 4      8:  dP   M V # ^Su;8:  d   \        V 4      8:  d4   M V # V P                  S^,
          V P                  S^,
          4      4       V # rŸ  )r   Úinsertr0   )rY  ÚdstÚsrcs   &€€r   Ú_moveÚ(CLILoopsMixin._queue_move.<locals>._moveö  sW   ø€ Ø�CÖ%œ3˜u›:Ö%àˆLð +,¨sÖ*@´c¸%³jÖ*@àˆLð —‘˜S 1�W e§i¡i°°aµÓ&8Ô9ØˆLr   zcli.queue.move_out_of_range)r¦  zcli.queue.moved)r/  Údestination)NN)	r;   r9   r—   r   r   rŽ  r\  ÚminrM  )
rY   rk  r9   r4  r�  rÅ  rK  rL  rÃ  rÄ  s
   &&      @@r   Ú_queue_moveÚCLILoopsMixin._queue_moveè  s  ù€ ÝØ�z‰z‹|ˆÜ<?À»IÈ¼NÑ8±4Ô8ÐP\‰ˆˆSØŠ;˜#š+Ù�bœÐ1Ó2Ð3Ð4Ô5ÙÜÑK¨$×*;Ñ*;Ô*=ÓKÓKˆß”S˜˜c“] eÔ+°°s´
á�bœÐ8Ó9Ð:Ð;Ô<ÙØ˜•;  e¥ˆˆˆS÷	ñ 	ð
 ×2Ñ2°5Ó9‰ˆØŒ?˜s cœzÙ�bœÐ8¸uÄsÈ6Ã{Õ?RÔSÐTÐUÖVá�bœÐ,°S¸5µ[ÈcÐTYÍkÔZÐ[Ð\Ö]r   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM     s   € ÷ )ñ ) sñ )r   c                óN  € ^ RI HpHp V! V4      pV'       g   V P                  R4       R# VP	                  R4      w  rVpVP                  4       VP                  4       ruVR8X  d2   V'       d   V P                  V4       R# V! R\        R4       24       R# \        P                  VR4      w  r‰VRJ;'       d?    V	'       d0   V'       d(   VP                  R^4      ^ ,          P                  4       MV'       * p
V
'       d   \        W4      ! V4       R# V P                  V4       R# )	u#  ``/queue <prompt>`` enqueues; a leading management verb whose arguments fit
(``list``/``clear`` alone, ``edit N â€¦``/``rm N``/``move A B``) manages the queue
instead. Anything else â€” ``clear the logs``, ``edit the config`` â€” is still a prompt;
``/queue add <prompt>`` forces enqueueing.©r9   rR   r   Nr  Úaddr   zcli.queue.usage_add)NF)r;   r9   rR   ru  Ú	partitionrV   r›   rg  r   r2   r<   r—   r"   r»   )rY   rL   r9   rR   r   r~  r­   rk  ÚhandlerÚtakes_indexÚis_managements   &&         r   Ú
_cmd_queueÚCLILoopsMixin._cmd_queue  sô   € ÷
 	-Ù˜lÓ+ˆßØ×Ñ˜RÔ ÙØ×)Ñ)¨#Ó.‰ˆ�Ø—Z‘Z“\ 4§:¡:£<ˆdØ�5Œ=ßØ×#Ñ# DÔ)ñ ñ ˜"œQÐ4Ó5Ð6Ð7Ô8ÙÜ+×/Ñ/°°mÓDÑˆØ tÐ+÷ 
ð 
ß0;ÇˆD�J‰J�t˜QÓ Õ"×*Ñ*Ô,ÈdÌ(ð 	÷ Ü�DÔ" 4Ö(à×Ñ Ö(r   c               ó   € V ^8„  d   QhRR/# rK   r   )r   s   "r   r   rM     s   € ÷ Vñ V sñ Vr   c           	     	ót  € ^ RI HpHp V! V4      pV'       g   V! R\        R4       24       R# V P                  '       d�   V P
                  e�   \        V P
                  R4      '       de    V P
                  P                  V4      pVR8X  d   R# V'       d"   V! R\        R\        V4      R7       24       R# V! R\        R	4       24       R# V P                  P                  V4       V! R\        R\        V4      R7       24       R#   \         d"   pT! R\        R
TR7       24        Rp?R# Rp?ii ; i)rO   rÍ  r   zcli.steer.usageNÚsteerÚvoice_stoppedzcli.steer.queuedr`  zcli.steer.rejected_emptyzcli.steer.failedr  zcli.steer.no_agent_queued)r;   r9   rR   r   rc  r¶   rC   r×  r   r&  rÁ   rÃ   )rY   rL   r9   rR   r   Úacceptedrf  s   &&     r   Ú
_cmd_steerÚCLILoopsMixin._cmd_steer  s  € ÷ 	-Ù˜lÓ+ˆßÙ�bœÐ,Ó-Ð.Ð/Ö0Ø× × Ð  T§Z¡ZÒ%;ÄÈÏ
É
ÐT[×@\Ò@\ð
BØŸ:™:×+Ñ+¨GÓ4�ð ˜Ô.ÙßÙ˜b¤Ð#5¼xÈÓ?PÔ!QÐ RÐSÖTá˜b¤Ð#=Ó!>Ð ?Ð@ÖAà×Ñ×#Ñ# GÔ,Ù�bœÐ6ÄÈÓ@QÔRÐSÐTÖUøô ô AÙ˜"œQÐ1¸Ô=Ð>Ð?×@Ò@ûðAús   Á,D ÄD7ÄD2Ä2D7c               ó    € V ^8„  d   QhRRRR/# )r	   Úattrr   r8  r   )r   s   "r   r   rM   7  s   € ÷ ñ ¨3ð °sñ r   c                ó(  €  V! 4       p\        T RR4      ;'       g    RpT'       g   R# \        YR4      pTe   \        TRR4      T8X  d   T# T! T4      p\	        YT4       T#   \          d#   p\        P                  ! RY%4        Rp?R# Rp?ii ; i)a  Return the manager cached on ``self.<attr>``, rebuilt when ``session_id`` changed
(after /new or a compression-driven session split).

``load()`` does the imports and returns a ``sid -> manager`` factory; an import
failure is logged and yields None, as does an empty session_id.
z%s unavailable: %sNrE   r   )r&  ÚloggingÚdebugr»   Úsetattr)	rY   rÝ  r8  ÚloadÚmakerf  Úsidr¥   rF   s	   &&&&     r   Ú_session_bound_managerÚ$CLILoopsMixin._session_bound_manager7  s�   € ð	Ù“6ˆDô �d˜L¨$Ó/×5Ð5°2ˆßÙÜ˜4 tÓ,ˆØÒ¤G¨H°lÀDÓ$IÈSÔ$PØˆOÙ�3‹iˆÜ�˜CÔ Øˆ
øô ô 	Ü�MŠMÐ.°Ô;Ýûð	ús   ‚A$ Á$BÁ/BÂBc                ó–   € ^ RI Hp \        V RR4      p\        W!4      '       g   R# R\        V RR4      '       d   VP                  3# R3# )aS  ``(gateway, connection)``: on a gateway session store the managers are the gateway's
(``hermes_cli.gateway_automation``), and none exists until the gateway session is open, so this
process never opens state.db read-write nor calls the goal judge. Off the gateway (tests, the
TUI slash worker's shadow CLI) main's in-process managers apply.)ÚGatewaySessionStorer˜   NFTÚ_gateway_session_open)FN)Ú hermes_cli.gateway_session_storerè  r»   rp  Ú
connection)rY   rè  rZ  s   &  r   Ú_automation_connectionÚ$CLILoopsMixin._automation_connectionM  sQ   € õ
 	IÜ˜˜m¨TÓ2ˆÜ˜%×5Ò5ØÐØ¬°Ð7NÐPU×)VÒ)V�U×%Ñ%Ð`Ð`Ð\`Ð`Ð`r   c                	ó’   aa€ V P                  4       w  poV'       d   Sf   R # T P                  YV'       d   VV3R l4      # T4      # )Nc                 ó   <€ V V3R  l# )c                ó   <€ S! V S4      # rÚ   r   )rä  rë  Úremotes   &€€r   rŒ  ÚECLILoopsMixin._automation_manager.<locals>.<lambda>.<locals>.<lambda>]  s   ø€ ©f°S¸*Ô.Er   r   )rë  rñ  s   €€r   rŒ  Ú3CLILoopsMixin._automation_manager.<locals>.<lambda>]  s   ø€ Ö"Er   )rì  rå  )rY   rÝ  r8  r¡  rñ  Úgatewayrë  s   &&&&f @r   Ú_automation_managerÚ!CLILoopsMixin._automation_managerX  sM   ù€ Ø"×9Ñ9Ó;Ñˆ�ß�zÒ)ÙØ×*Ñ*ØÏ'ÕEó^ð 	^ØW\ó^ð 	^r   c               ó   € V ^8„  d   QhRR/# ©r	   r
   r³   r   )r   s   "r   r   rM   _  s   € ÷ &ñ &¨ñ &r   c                ó   € RV n         R# )z¾Agent thread: the gateway published this session's goal/loop state mid-turn (a tool moved it).
The dock re-reads the mirrored managers on its next spinner-thread poll (``cli_session_dock``).TN)Ú_automation_staler@  s   &r   Ú_mark_automation_staleÚ$CLILoopsMixin._mark_automation_stale_  s   € ð "&ˆÖr   c                óB   a€ R oV3R lpR pV P                  RRW4      # )zMGoalManager bound to the current session_id (see ``_session_bound_manager``).c                 óÒ   € ^ RI Hp   V ! 4       ;'       g    / P                  R4      ;'       g    / p\        VP                  R^4      ;'       g    ^4      #   \         d     ^# i ; i)rO   )Úload_configÚgoalsÚ	max_turns)r  rÿ  r<   r#   r&  )rÿ  Ú	goals_cfgs     r   r  Ú2CLILoopsMixin._get_goal_manager.<locals>.max_turnsf  s\   € Ý5ðÙ(›]×0Ð0¨b×5Ñ5°gÓ>×DÐDÀ"�	Ü˜9Ÿ=™=¨°bÓ9×?Ð?¸RÓ@Ð@øÜô Úðús!   ˆA –A ¯ A ÁA ÁA&Á%A&c                 ó    <a € ^ RI Ho  V V3R l# )rO   )ÚGoalManagerc                ó"   <€ S! V S! 4       R 7      # ))rE   Údefault_max_turnsr   )rä  r  r  s   &€€r   rŒ  Ú?CLILoopsMixin._get_goal_manager.<locals>.load.<locals>.<lambda>p  s   ø€ ™{°cÉYË[ÕYr   )Úhermes_cli.goalsr  )r  r  s   @€r   râ  Ú-CLILoopsMixin._get_goal_manager.<locals>.loadn  s   ù€ Ý4ÝYÐYr   c                ó   € ^ RI Hp V! W4      # )rO   )ÚGatewayGoalManager)Úhermes_cli.gateway_automationr  )rä  rë  r  s   && r   rñ  Ú/CLILoopsMixin._get_goal_manager.<locals>.remoter  ó   € ÝHÙ% cÓ6Ð6r   Ú_goal_managerzgoal manager©rõ  )rY   râ  rñ  r  s   &  @r   Ú_get_goal_managerÚCLILoopsMixin._get_goal_managerd  s*   ø€ ò	õ	Zò	7ð ×'Ñ'¨¸ÈÓVÐVr   c                ó4   € R pR pV P                  RRW4      # )zRHeartbeatManager bound to the current session_id (see ``_session_bound_manager``).c                 ó   a € ^ RI Ho  V 3R l# )rO   ©ÚHeartbeatManagerc                ó   <€ S! V R 7      # ©r�   r   )rä  r  s   &€r   rŒ  ÚDCLILoopsMixin._get_heartbeat_manager.<locals>.load.<locals>.<lambda>{  s   ø€ Ñ/¸3Õ?r   )Úhermes_cli.heartbeatr  r  s   @r   râ  Ú2CLILoopsMixin._get_heartbeat_manager.<locals>.loady  s   ø€ Ý=Ü?Ð?r   c                ó   € ^ RI Hp V! W4      # )rO   )ÚGatewayHeartbeatManager)r  r  )rä  rë  r  s   && r   rñ  Ú4CLILoopsMixin._get_heartbeat_manager.<locals>.remote}  s   € ÝMÙ*¨3Ó;Ð;r   Ú_heartbeat_managerzheartbeat managerr  ©rY   râ  rñ  s   &  r   Ú_get_heartbeat_managerÚ$CLILoopsMixin._get_heartbeat_managerw  s'   € ò	@ò	<ð ×'Ñ'Ð(<Ð>QÐSWÓ`Ð`r   c                ó4   € R pR pV P                  RRW4      # )zMLoopManager bound to the current session_id (see ``_session_bound_manager``).c                 ó   a € ^ RI Ho  V 3R l# )rO   ©ÚLoopManagerc                ó   <€ S! V R 7      # r  r   )rä  r'  s   &€r   rŒ  Ú?CLILoopsMixin._get_loop_manager.<locals>.load.<locals>.<lambda>†  s
   ø€ ™{°cÕ:r   )rD   r'  r&  s   @r   râ  Ú-CLILoopsMixin._get_loop_manager.<locals>.load„  s   ø€ Ý4Ü:Ð:r   c                ó   € ^ RI Hp V! W4      # )rO   )ÚGatewayLoopManager)r  r,  )rä  rë  r,  s   && r   rñ  Ú/CLILoopsMixin._get_loop_manager.<locals>.remoteˆ  r  r   Ú_loop_managerzloop managerr  r!  s   &  r   Ú_get_loop_managerÚCLILoopsMixin._get_loop_manager‚  s#   € ò	;ò	7ð ×'Ñ'¨¸ÈÓVÐVr   c                óª   a a€ \        S RR4      '       d   R# RS n        ^ RIHo VV 3R lp\        P
                  ! VRRR7      P                  4        R# )	a  Start the idle-poll daemon that injects a due heartbeat prompt into
``_pending_input`` as a normal user turn when the session is idle. Missed ticks
coalesce (the anchor resets on fire, so a busy hour yields ONE heartbeat turn).
Idempotent; safe to call on every /heartbeat set.Ú_heartbeat_watchdog_startedFNT)ÚPOLL_SECONDSc                 ó|  <€  \        SR R4      '       gâ   \        P                  ! S4        SP                  4       p V e   V P	                  4       '       g   KV  SP
                  ;'       gJ    \        SRR4      ;'       g5    \        SRR4      ;'       g     SP                  P                  4       '       * pV'       d   K½  V P                  4       pV'       d   SP                  P                  V4       Kò  Kô   RSn        R#   \         d$   p\        P                  ! RT4        Rp?EK'  Rp?ii ; i  RSn        i ; i)Ú_should_exitFNÚ_voice_recordingÚ_voice_processingz"heartbeat watchdog tick failed: %s)r»   ÚtimeÚsleepr"  Ú	is_activerc  rÁ   ÚemptyÚ
due_promptrÃ   r&  rß  rà  r2  )rF   ÚbusyÚpromptrf  r3  rY   s       €€r   Ú_loopÚ6CLILoopsMixin._start_heartbeat_watchdog.<locals>._loop—  s  ø€ ð9Ü! $¨¸×>Ò>Ü—J’J˜|Ô,ðQØ"×9Ñ9Ó;˜Øš;¨c¯m©m¯oªoÙ$à ×/Ñ/÷ ?ð ?Ü& tÐ-?ÀÓG÷?ð ?ä& tÐ-@À%ÓH÷?ð ?ð $(×#6Ñ#6×#<Ñ#<Ó#>Ô>ð	 ÷
  Ù$Ø!$§¡Ó!1˜ß!Ø ×/Ñ/×3Ñ3°FÖ;ñ "ð ?ð& 49�Ö0øô %ô QÜŸšÐ&JÈC×PÓPûðQûð 49�Õ0úsd   ƒ)D2 ­)D ÁD2 ÁD Á,D ÂD Â'D Â>D2 Ã D ÃD Ã3D2 ÄD/ÄD*Ä#D2 Ä*D/Ä/D2 Ä2	D;zheartbeat-watchdog)ÚtargetÚdaemonr  )r»   r2  r  r3  Ú	threadingÚThreadÚstart)rY   r?  r3  s   f @r   Ú_start_heartbeat_watchdogÚ'CLILoopsMixin._start_heartbeat_watchdog�  sF   ù€ ô
 �4Ð6¸×>Ò>ÙØ+/ˆÔ(Ý5ö	9ô, 	×Ò ¨dÐ9MÔN×TÑTÖVr   c               ó   € V ^8„  d   QhRR/# rø  r   )r   s   "r   r   rM   ¯  s   € ÷ Fñ F¨4ñ Fr   c                óÊ  € \         P                   ! 4       pV\        V RR4      ,
          R8  d   R# Wn         V P                  P	                  4       '       g   R# V P                  4       pVe   \        VRR4      MRpVe   VP                  R8w  d   R# VP                  f#   VP                  f   VP                  '       g   R# VP                  4       '       d   R# VP                  4       pV'       d@   ^ RIHpHpHp V! RV \!        R	4       V 24       V P                  P#                  V4       R# R#   \$         d#   p\&        P(                  ! R
T4        Rp?R# Rp?ii ; i)a£  Idle hook run from process_loop: when a parked /goal's barrier has lifted (the process
exited, the timer elapsed, or the wait aged past its cap), queue the continuation so the
loop resumes WITHOUT waiting for an unrelated turn to re-evaluate it. The barrier used to be
checked only lazily, on the next turn; a session with nothing else arriving stayed parked
indefinitely (one run: 3 h 22 min on a grandchild's poller).Ú_last_goal_barrier_checkr”   g      @Nr1  Úactiverd   r   zcli.goal.barrier_liftedz#parked-goal resume check failed: %s)r8  r»   rJ  rÁ   r;  r  ÚstatusÚwaiting_on_pidÚwaiting_on_sessionÚwaiting_untilÚ
is_waitingÚnext_continuation_promptr;   rP   rQ   r9   r   rÃ   r&  rß  rà  )	rY   ÚnowrF   r1  r>  rP   rQ   r9   rf  s	   &        r   Ú_maybe_resume_parked_goalÚ'CLILoopsMixin._maybe_resume_parked_goal¯  s,  € ô �iŠi‹kˆØ”˜Ð9¸3Ó?Õ?À#ÔEÙØ(+Ô%ð	FØ×&Ñ&×,Ñ,×.Ò.ÙØ×(Ñ(Ó*ˆCØ36²?”G˜C ¨$Ô/ÈˆEØŠ} §¡°Ô 8ÙØ×(Ñ(Ò4¸×8PÑ8PÒ8\Ð`e×`s×`sÐ`sÙØ�~‰~×ÒÙØ×1Ñ1Ó3ˆFßß3Ñ3Ù˜"˜T˜F¤1Ð%>Ó#?Ð"@ÀÀÐGÔHØ×#Ñ#×'Ñ'¨Ö/ñ øô ô 	FÜ�MŠMÐ?À×EÒEûð	Fús5   ¸ D5 Á8D5 Â-D5 ÃD5 ÃD5 Ã4=D5 Ä5E"Å EÅE"c               ó   € V ^8„  d   QhRR/# rø  r   )r   s   "r   r   rM   Ì  s   € ÷ 2ñ 2 tñ 2r   c           	     óÈ  € ^ RI HpHpHp V P	                  4       pVe   VP                  4       '       g   R# \        P                  ! 4       pV\        V RR4      ,
          R8  d   R# WPn         V P                  P                  4       '       g   R#   \        T4      '       d   R#  TP                  4       pT'       g   R#  TP                  pT'       d   TP                  MRpT! RT \!        RTR	7       T 24       T P                  P#                  T4       TP+                  4       P-                  R4      '       d    \/        TP1                  R4      4       R# R#   \         d     R# i ; i  \         d     LÕi ; i  \         dF   p	\$        P&                  ! R
T	4        TP)                  4        M  \         d     Mi ; i Rp	?	R# Rp	?	ii ; i  \         d     R# i ; i)u  Idle hook run from process_loop: fire a due /loop wakeup.

Only while the agent is idle and nothing is queued â€” a real user message always
wins the idle boundary, and so does an active (non-parked) /goal, whose
judge-driven continuations own it; the loop defers to the next poll.
rd   NÚ_last_loop_tick_checkr”   g       @Ú?r   zcli.loop.wakeup_firing)Útickzloop tick injection failed: %sÚ/r   )r;   rP   rQ   r9   r/  Úis_duer8  r»   rW  rÁ   r;  r&  rG   Ú	fire_tickr1  Úticks_firedr   rÃ   rß  rà  Úabandon_tickÚlstripÚ
startswithr>   Úcomplete_tick)
rY   rP   rQ   r9   rF   rR  Úwakeupr1  Útick_norf  s
   &         r   Ú_maybe_fire_loop_tickÚ#CLILoopsMixin._maybe_fire_loop_tickÌ  s«  € ÷ 	,Ñ+Ø×$Ñ$Ó&ˆØŠ;˜cŸj™jŸlšlÙô �iŠi‹kˆØ”˜Ð6¸Ó<Õ<¸sÔBÙØ%(Ô"ð	Ø×&Ñ&×,Ñ,×.Ò.Ùð /ð	Ü% c×*Ò*Ùð +ð —‘“ˆßÙð	Ø—I‘IˆEß+0�e×'Ò'°cˆGÙ�b˜˜œqÐ!9ÀÔHÐIÈ$ÈÐPÔQØ×Ñ×#Ñ# FÔ+ð �=‰=‹?×%Ñ% c×*Ò*ðÜ'¨×(9Ñ(9¸"Ó(=Ö>ñ +øô5 ô 	Úð	ûô
 ô 	Ùð	ûô ô 	Ü�MŠMÐ:¸CÔ@ðØ× Ñ Õ"øÜô Ùðúåûð	ûô ô Úðúsy   Á. E ÂE. ÃE? ÃAE? Ä>G ÅE+Å*E+Å.E<Å;E<Å?GÆ
G
Æ"F3Æ2G
Æ3GÆ>G
Ç GÇG
Ç
GÇG!Ç G!c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   rM      s   € ÷ ñ ¨sñ r   c                ó  €  \        V P                  ;'       g    . 4       FÃ  pVP                  R4      R8X  g   K  VP                  RR4      p\        V\        4      '       dl   V Uu. uFE  p\        V\
        4      '       g   K  VP                  R4      R	9   g   K3  VP                  RR4      NKG  	  ppRP                  R V 4       4      u # \        T;'       g    R4      u # 	  R# u upi   \         d     R# i ; i)
zYText of the most recent assistant message ("" when none); multimodal parts are flattened.ÚroleÚ	assistantÚcontentr   Útyperê   r   c              3  ó8   "  € T F  q'       g   K  Vx € K  	  R # 5irÚ   r   )r‡  r   s   & r   r‰  Ú>CLILoopsMixin._last_assistant_response_text.<locals>.<genexpr>  s   é € Ð(?±E¨q»Q¯ª³Eùs   ‚	�
>   rê   Úoutput_text)	ÚreversedrÐ   r<   rp  r&   r5   r(  r   r&  )rY   r=   rj  r,  r    s   &    r   Ú_last_assistant_response_textÚ+CLILoopsMixin._last_assistant_response_text   sí   € ð	Ü × 9Ñ 9× ?Ð ?¸RÖ@�Ø—7‘7˜6“? kÖ1Ø!Ÿg™g i°Ó4�GÜ! '¬4×0Ò0ñ &-ó!aá%, Ü)¨!¬T×2ô .à78·u±u¸V³}ÐH_Ñ7_ô .˜AŸE™E &¨"Ö-Ù%,ð ð !að  $Ÿy™yÑ(?±EÓ(?Ó?Ò?Ü˜wŸ}˜}¨"Ó-Ò-ñ Añ ùò!aøô ô 	ØÙð	úsK   ‚C/ šC/ ¼,C/ Á(C*ÂC*ÂC*Â3C/ ÃC/ ÃC/ Ã&C/ Ã*C/ Ã/C>Ã=C>c               ó   € V ^8„  d   QhRR/# rø  r   )r   s   "r   r   rM     s   € ÷ cñ c°dñ cr   c           	     ó”  € ^ RI HpHpHp V P	                  4       pVf   R# VP
                  pVe   VP                  '       g   R# \        V RR4      '       d.    VP                  RR7       V! RV \        R4       V 24       R# TP                  \        V R	R4      '       d   R
MV P                  4       4      p\        V4      '       gn   VP                  R4      R8X  dV   VP
                  eF   \        V RR4      f5   V! RV \        RVP
                  P                  4       R7       V 24       R# R# R# R# R#   \         d     LÛi ; i)a  Post-turn hook: evaluate a finished /loop wakeup turn.

No-op unless the turn was a loop wakeup (``awaiting_response`` set by
``fire_tick``). Detects the LOOP_COMPLETE marker, judges --until, applies caps,
and schedules the next tick. Mirrors _maybe_continue_goal_after_turn's shape.
rd   NÚ_last_turn_interruptedFúuser-interrupted (Ctrl+C)©Úreasonr   zcli.loop.paused_interruptedÚ_last_turn_failedr   rL  rK  Ú_subagent_monitorzcli.loop.remaining)r8  )r;   rP   rQ   r9   r/  r1  Úawaiting_responser»   Úpauser&  r   ra  rp  r>   r<   Úremaining_label)rY   rP   rQ   r9   rF   r1  r4   s   &      r   Ú$_maybe_complete_loop_tick_after_turnÚ2CLILoopsMixin._maybe_complete_loop_tick_after_turn  s@  € ÷ 	,Ñ+Ø×$Ñ$Ó&ˆØŠ;ÙØ—	‘	ˆØŠ= × 7× 7Ð 7Ùô �4Ð1°5×9Ò9ðØ—	‘	Ð!<�	Ô=ñ �b˜˜œqÐ!>Ó?Ð@ÀÀÐGÔHÙØ×$Ñ$¬7°4Ð9LÈe×+TÒ+T¡RØ*.×*LÑ*LÓ*NóPˆô (¨×1Ò1°h·l±lÀ8Ó6LÐPXÔ6XØ—I‘IÒ)¬g°dÐ<OÐQUÓ.VÒ.^Ù�b˜˜œqÐ!5¸S¿Y¹Y×=VÑ=VÓ=XÔYÐZÐ[_ÐZ`ÐaÖbñ /_Ñ)ñ 7YÑ1øô ô Ùðús   ÁD9 Ä9EÅEc               ó   € V ^8„  d   QhRR/# rø  r   )r   s   "r   r   rM   0  s   € ÷ ?Oñ ?O°ñ ?Or   c                óˆ  a€ ^ RI HpHpHpHo V P                  4       pVe   VP                  4       '       g   R#  \        V RR4      pVe§   VP                  4       '       g‘    \        VP                  4       Uu. uF,  p\        V\        4      '       d   V'       d
   V^ ,          MTNK.  	  pp\        ;QJ d    V3R lV 4       F  '       g   K   RM	  RM! V3R lV 4       4      pV'       d   R# \        T RR4      '       d.    TP                  RR	7       T! RT \%        R4       T 24       R# \        T RR4      '       d   R# T P'                  4       p
T
P)                  4       '       g   R# ^ p ^ RIHpHp T! \        T RR4      ;'       g    RR7      pT! \        T P0                  RR4      4      pTP3                  T
RYëR7      p\5        T4       TP7                  R4      '       d:   TP7                  R4      pT'       d    T P8                  P;                  T4       R# R# R# u upi   \         d    Rp ELSi ; i  \         d     EL[i ; i  \         d#   p	\         P"                  ! R
T	4        Rp	?	ELaRp	?	ii ; i  \         d    Rp LÛi ; i  \         d#   p	\         P"                  ! RT	4        Rp	?	R# Rp	?	ii ; i)uƒ  Post-turn hook: judge the goal and maybe re-queue a continuation. A real user
message already queued preempts judging (re-judged after their turn). Ctrl+C
AUTO-PAUSES instead of judging â€” the judge on partial output nearly always says
"continue" and would re-queue exactly what was cancelled; pausing is recoverable
via ``/goal resume``. Empty-response skip mirrors ``gateway/run.py``.)rP   rQ   r9   Ú_looks_like_slash_commandNrÁ   c              3  ón   <"  € T F*  p\        V\        4      ;'       d	    S! V4      '       * x € K,  	  R # 5irÚ   )rp  r   )r‡  r¤   r�  s   & €r   r‰  Ú@CLILoopsMixin._maybe_continue_goal_after_turn.<locals>.<genexpr>E  s2   øé € ð +dÙ[bÐVWœZ¨¬3Ó/×PÐPÑ4MÈaÓ4P×QÑQÓ[bùs   ƒ5Ÿ5TFrt  ru  rv  z"goal pause-on-interrupt failed: %sr   zcli.goal.paused_interruptedrx  )Úcount_active_delegationsÚgather_background_processesrE   )Úowner_task_id)Úuser_initiatedÚbackground_processesÚactive_delegationsÚshould_continueÚcontinuation_promptz$goal continuation enqueue failed: %s)r;   rP   rQ   r9   r�  r  r:  r»   r;  r&   r?  rp  ÚtupleÚanyr&  r{  rß  rà  r   rp  r›   r	  r„  r…  r¶   Úevaluate_after_turnr>   r<   rÁ   rÃ   )rY   rP   rQ   r9   rF   Úpendingr¤   r)  Úhas_real_messagerf  Úlast_responseÚ_active_delegr„  Ú
_gather_bgÚ	_bg_procsr4   r>  r�  s   &                @r   Ú_maybe_continue_goal_after_turnÚ-CLILoopsMixin._maybe_continue_goal_after_turn0  s…  ø€ ÷ 	GÓFØ×$Ñ$Ó&ˆØŠ;˜cŸm™mŸošoÙð	Ü˜dÐ$4°dÓ;ˆGØÒ"¨7¯=©=¯?ª?ð,ÜRVÐW^×WdÑWdÔReÓfÑReÈQ¤z°!´U×';Ò';Ç˜q žtÀqÒHÑRe�GÐfß'*£sô +dÙ[bó+d§s§s¢sô +dÙ[bó+dó (dÐ$÷ $Ùô �4Ð1°5×9Ò9ðIØ—	‘	Ð!<�	Ô=ñ �b˜˜œqÐ!>Ó?Ð@ÀÀÐGÔHÙô �4Ð,¨e×4Ò4ÙØ×:Ñ:Ó<ˆØ×"Ñ"×$Ò$ÙØˆð	ßlá"´¸¸|ÈTÓ1R×1ZÐ1ZÐVZÔ[ˆIÙ4´W¸T¿Z¹ZÈÐW[Ó5\Ó]ˆMð ×*Ñ*Ø¨$ÀYð +ó rˆä Ô)Ø�<‰<Ð)×*Ò*Ø—\‘\Ð"7Ó8ˆFßðOØ×'Ñ'×+Ñ+¨FÖ3ñ ñ +ùòK gøô !ô ,Ø'+Ó$ð,ûô ô 	Úð	ûô
 ô IÜ—’ÐBÀC×HÒHûðIûô( ô 	ØŠIð	ûô !ô OÜ—M’MÐ"HÈ#×NÒNûðOús›   »&H? Á#H+ Á:"H&ÂH&Â,!H+ ÃH+ Ã(H? ÄI Å2J Æ%J ÈJ È&H+ È+H<È8H? È;H<È<H? È?IÉIÉI>ÉI9É9I>ÊJÊJÊKÊJ<Ê<K)rú  rW   r2  rJ  rW  rš   rž   rð   NrŸ  )1Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r[   r`   rf   r‰   r¦   r®   r¼   rÅ   rÖ   rß   rì   rñ   rö   rý   r  r  r9  rA  rM  rR  r\  rg  ru  r€  r‘  r¨  r·  rÉ  rÓ  rÚ  rå  rì  rõ  rû  r  r"  r/  rF  rS  rd  rp  r}  r•  Ú__static_attributes__r   r   r   rI   rI   K   sþ   † Ùfõ
õ2õ@õ(!õT4Gõl&÷kõ/õ>õ06õAõ
|õ
1õ0õ@õ
"õ.:õf3õ
òRõ
Nõ:õ*	Tòõ".õ_õ8 ZõD^õ2)õ6Võ6ò,	aò^õ&ò
Wò&	aò	Wò WõDFõ:2õhõ"c÷>?Oñ ?Or   rI   )ru  F)r‘  F)r·  T)r¨  T)rÉ  T)Ú__conditional_annotations__r›  Ú
__future__r   rß  rC  r8  Ú
agent.i18nr   r|  r   Úrich.markupr   rX   r   r   r   r%   r2   Ú__annotations__r>   rG   rI   )r�  s   @r   Ú<module>r¢     s£   øðô]õ #ã Û Û å Ý 8Ý )õ1õ
Aõ õð( Ð" DÐ*@À&ÐJ`ØÐ$Ø
Ð! 5Ð*?ØÐ
! 8Ð-DÀhÐPgØ	Ð" EÐ+BØ
Ð!ð-€Ð)ó õõ1÷dOó dOr   