+
    lHàje  ã                   óØ  € R t ^ RIt^ RIHt ^ RIHt RHtRRRR/t]! RRR	7       ! R
 R4      4       tR t	R R lt
RR/R 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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/ R0 ltR1tR2 R3 ltR4 R5 ltR6tR7t RIR8 R9 llt!R: R; lt"R< R= lt#R> R? lt$ ! R@ RA]%4      t&RB RC lt'RD RE lt(RF RG lt)R# )Ja  Human-readable rendering of ``ProcessRegistry.completion_queue`` events (completion,
watch_match, watch_disabled, watch_overflow_*, async_delegation) into the
``[IMPORTANT: ...]`` / ``[ASYNC DELEGATION ...]`` text the CLI drain loop, gateway and
TUI inject into the agent conversation.N)Ú	dataclass)ÚsuppressÚlostz3marked lost because the process backend disappearedÚfailed_startzfailed to startT)ÚfrozenÚslotsc                   óf   a € ] tR t^t o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R ltR	t	V t
R
# )ÚProcessNotificationBatchzBKeep completion identity until the owning surface starts its turn.c                ó    <€ V ^8„  d   QhRS[ /# ©é   Úreturn)Úlist)ÚformatÚ__classdict__s   "€ÚI/home/ubuntu/.hermes/hermes-agent/tools/process_registry_notifications.pyÚ__annotate__Ú%ProcessNotificationBatch.__annotate__   s   ø€ ÷ Uñ U¡ñ Uó    c           
     ó¢   € V P                    UUu. uF1  w  r#VP                  VP                  R R4      4      '       d   K.  W#3NK3  	  upp# u uppi )Ú
session_idÚ )ÚnotificationsÚis_completion_consumedÚget)ÚselfÚregistryÚeventÚtexts   &&  r   Ú_liveÚProcessNotificationBatch._live   sP   € Ø15×1CÒ1Cô UÑ1C¡+ %Ø×6Ñ6°u·y±yÀÈrÓ7R×Sô �“Ñ1Cò Uð 	Uùó Us   �+AÁ Ac                ó.   <€ V ^8„  d   QhRS[ R,          /# ©r   r   N©Ústr)r   r   s   "€r   r   r      s   ø€ ÷ 	0ñ 	0¡#¨¥*ñ 	0r   c                óä   € V P                  V4       UUu. uF  w  r#VNK	  	  pppV'       g   R # \        V4      ^8X  d
   V^ ,          # R\        V4       R2pRP                  V.VO54      # u uppi )Nú[IMPORTANT: z� background processes completed. Treat these results as one batch and give one consolidated response; preserve failures and actionable results.]z

)r   ÚlenÚjoin)r   r   Ú_eventr   ÚmessagesÚheaders   &&    r   ÚrenderÚProcessNotificationBatch.render   su   € Ø-1¯Z©Z¸Ô-AÔBÑ-A™\˜V“DÑ-AˆÑBßÙÜˆx‹=˜AÔØ˜A•;ÐØ ¤ X£ ð 0?ð ?ˆð �{‰{˜FÐ. XÑ.Ó/Ð/ùó Cs   •A,c                ó    <€ V ^8„  d   QhRS[ /# r   r#   )r   r   s   "€r   r   r   #   s   ø€ ÷ añ a©ñ ar   c                ój   € \        V P                  V4       UUu. uF  w  r#VNK	  	  upp4      # u uppi ©N)Úprocess_completion_display_textr   )r   r   r   Ú_texts   &&  r   Údisplay_textÚ%ProcessNotificationBatch.display_text#   s-   € Ü.È$Ï*É*ÐU]ÔJ^Ô/_ÑJ^¹,¸%³ÑJ^Ò/_Ó`Ð`ùÓ/_s   š/
c                óP   <€ V ^8„  d   Qh/ S[ S[ S[S[3,          R3,          ;R&   # )r   .r   )ÚtupleÚdictr$   )r   r   s   "€r   r   r      s%   ø‡ ‚ ñ ™™t¡S˜yÕ)¨3Ð.Õ/Ñ/ò	 r   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r,   r3   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)r   s   @r   r	   r	      s1   ø‡ € áL÷Uð U÷	0ð 	0÷að a÷+ ƒ r   r	   c              #  óæ   "  € . pV  FM  w  r#VP                  RR4      R8X  d   VP                  W#34       K0  V'       d   \        V4      x € . pW#33x € KO  	  V'       d   \        V4      x € R# R# 5i)zIGroup consecutive completions only; watches and delegations are barriers.ÚtypeÚ
completionN)r   Úappendr6   )r   Úbatchr   r   s   &   r   Úgroup_process_notificationsrF   '   sh   é € à€EÛ$‰ˆØ�9‰9�V˜\Ó*¨lÔ:Ø�L‰L˜%˜Ö'çÜ˜E“lÒ"Ø�Ø�=Ð"Ô"ñ %÷ Ü�E‹lÔñ ùs   ‚<A1¿ A1Á A1c                ó0   € V ^8„  d   QhR\         R\        /# ©r   Úevtr   ©r7   Úbool)r   s   "r   r   r   7   s   € ÷ Wñ W¤tð W´ñ Wr   c                óÊ   € V P                  R4      R9   d   R# \        V P                  R4      ;'       g    V P                  R4      ;'       g    R4      P                  R4      # )zGRaw child process noise, not a delegation or work-closeout deliverable.rB   FÚowner_task_idÚtask_idr   úsa->   Úasync_delegationÚasync_delegation_work_closeout)r   r$   Ú
startswith)rI   s   &r   Úis_child_process_notificationrS   7   sO   € à
‡w�wˆvƒÐPÔPÙÜˆs�w‰w�Ó'×CÐC¨3¯7©7°9Ó+=×CÐCÀÓD×OÑOÐPUÓVÐVr   Úsurface_childc                óJ   € V ^8„  d   QhR\         R\        R,          R\        /# )r   rI   rT   Nr   rJ   )r   s   "r   r   r   >   s&   € ÷ ñ ¤Tð ¼TÀD½[ð ÔTXñ r   c               ó`   € \        V 4      '       g   R# Vf   ^ RIHp VP                  4       pV# )zIShared policy; callers must first enter the event's owning profile scope.T)ÚProcessRegistry)rS   Útools.process_registryrW   Ú$_surface_child_process_notifications)rI   rT   rW   s   &$ r   Úshould_surface_notificationrZ   >   s-   € ä(¨×-Ò-ÙØÒÝ:Ø'×LÑLÓNˆØÐr   c                ó0   € V ^8„  d   QhR\         R\        /# )r   Úsecondsr   )Úfloatr$   )r   s   "r   r   r   H   s   € ÷ ,ñ ,œð ,¤3ñ ,r   c                ó8  €  \        \        ^ V 4      4      pT^<8  d   T R2# \	        T^<4      w  r!T^<8  d    T R2T'       d   T R2,           # R,           # \	        T^<4      w  r2T R2T'       d   T R2,           # R,           #   \        \        3 d     R# i ; i)z5Human-friendly elapsed string ('18m', '2h3m', '45s').Ú?ÚsÚmr   Úh)ÚintÚmaxÚ	TypeErrorÚ
ValueErrorÚdivmod)r\   r`   ra   rb   s   &   r   Ú_format_agerh   H   s§   € ðÜ”�A�w“Ó ˆð 	ˆ2„vØ��AˆwˆÜ�!�R‹=�D€AØˆ2„vØ��Aˆw§Q˜Q˜C˜q˜'Õ/Ð/¨BÕ/Ð/Ü�!�R‹=�D€AØˆS�ˆ7§˜˜˜1�gÕ+Ð+¨Õ+Ð+øô ”zÐ"ô Úðús   ‚B ÂBÂBc                ó:   € V ^8„  d   QhR\         \        ,          /# r   ©r   r$   )r   s   "r   r   r   W   s   € ÷ Nñ N¤4¬¥9ñ Nr   c                 óP   €  ^ RI Hp  \        V 4      #   \         d    . ROu # i ; i)u­  Model-not-found phrases from ``agent.error_classifier`` (the failover path's
own list, so nothing drifts); a minimal built-in set if the import fails.

Imported from ``agent.error_classifier`` so the batch renderer applies the SAME classification the
failover path consumes â€” no hand-copied pattern list to drift. Fails open to a minimal built-in set so a
classifier import problem never hides the per-task blocks. See #97667.
©Ú_MODEL_NOT_FOUND_PATTERNS)zis not a valid modelzmodel not foundÚmodel_not_found)Úagent.error_classifierrm   r   Ú	Exceptionrl   s    r   Ú_model_not_found_patternsrq   W   s.   € ðNÝDÜÐ-Ó.Ð.øÜô NÚMÒMðNús   ‚ “%¤%c                ó$   € V ^8„  d   QhR\         /# r   ©r7   )r   s   "r   r   r   f   s   € ÷ ñ œDñ r   c                 óX   €  ^ RI Hp  V ! 4       ;'       g    / #   \         d    / u # i ; i)zLActive delegation config; ``{}`` on any error. Lazy: delegate_tool is heavy.)Ú_load_config)Útools.delegate_toolru   rp   )Ú_cfgs    r   Ú_delegation_configrx   f   s,   € ðÝ<Ù‹v�|ˆ|˜ÐøÜô ØŠ	ðús   ‚ – ™)¨)c                ó$   € V ^8„  d   QhR\         /# r   )rK   )r   s   "r   r   r   o   s   € ÷ 	Uñ 	U´Dñ 	Ur   c                óD  aa€ \        T;'       g    / P                  R4      ;'       g    R4      P                  4       oS'       g   R# \        4       oR T ;'       g    .  4       p\        ;QJ d     VV3R lV 4       F  '       g   K   R# 	  R# ! VV3R lV 4       4      # )zîTrue when a result reflects a config-level model_not_found rejection: needs a
model-not-found phrase AND the currently-configured model name in the same text,
so a stale task failing on a removed model is not mis-attributed to the config.Úmodelr   Fc              3   ó®   "  € T FK  pR P                  R VP                  R4      VP                  R4      3 4       4      P                  4       x € KM  	  R# 5i)Ú c              3   óJ   "  € T F  q'       g   K  \        V4      x € K  	  R # 5ir0   r#   )Ú.0Úxs   & r   Ú	<genexpr>Ú8_delegation_model_not_found.<locals>.<genexpr>.<genexpr>w   s   é € ÐNÑ&H ËA”f”c˜!—f�fÓ&Hùs   ‚	#�#ÚerrorÚsummaryN)r(   r   Úlower)r   Úrs   & r   r�   Ú._delegation_model_not_found.<locals>.<genexpr>w   sD   é € ÐnÑ`mÐ[\ˆS�X‰XÑN q§u¡u¨W£~°q·u±u¸YÓ7GÑ&HÓNÓN×TÑT×VÐVÓ`mùs   ‚AAc              3   ó´   <a"  € T FL  oSS9   ;'       d;    \         ;QJ d    V3R  lS 4       F  '       g   K   RM	  RM! V3R  lS 4       4      x € KN  	  R# 5i)c              3   ó,   <"  € T F	  qS9   x € K  	  R # 5ir0   r8   )r   Úpr   s   & €r   r�   r‚   x   s   øé € Ð$A¹°1¨$¦Y»ùs   ƒTFN)Úany)r   r   r{   Úpatternss   &@€€r   r�   r‡   x   s;   ùé € ÐTÉeÀdˆu˜‰}×AÐA§£Ô$A¹Ó$A§§¢Ô$A¹Ó$AÓ!AÔAËeùs   „A•A¡A¸ AT)r$   r   r…   rq   r‹   )ÚresultsÚconfigÚtextsr{   rŒ   s   && @@r   Ú_delegation_model_not_foundr�   o   s   ù€ ô �—�˜2×"Ñ" 7Ó+×1Ð1¨rÓ2×8Ñ8Ó:€EßÙÜ(Ó*€HÙnÐ`g×`mÐ`mÐkmÐ`mÓn€Eß‹3ÕTÉeÓT�3Œ3ÐTŠ3ÐTˆ3ÕTÉeÓTÓTÐTr   c                óH   € V ^8„  d   QhR\         \        ,          R,          /# r"   rj   )r   s   "r   r   r   {   s   € ÷ ñ ´4¼µ9¸tÕ3Cñ r   c                óv  € \        4       p\        W4      '       g   R# VP                  R4      ;'       g    RpVP                  R4      ;'       g    RpRV RV R2R	R
.p\        \        4      ;_uu_ 4        ^ RIHp V! V4      '       g   VP                  R4       RRR4       V#   + '       g   i     T# ; i)uR   Config-level model_not_found notice lines, or None (fail-open) â€” once per batch.Nr{   r_   Úproviderzconfigured provideru<   âš  SUBAGENT MODEL REJECTED: the configured Subagent Model "z" was rejected by provider "z#" (HTTP 400: not a valid model ID).zFEvery task in this batch failed for this reason before doing any work.uX   Check Settings â†’ Advanced â†’ Subagent Model (or: hermes config get delegation.model).)Úget_fallback_chainz>No fallback chain is configured, so no failover was attempted.)rx   r�   r   r   rp   Úhermes_cli.fallback_configr”   rD   )r�   rŽ   r{   r“   Úlinesr”   s   &     r   Ú"_delegation_model_not_found_noticer—   {   sµ   € äÓ!€FÜ& w×7Ò7ÙØ�J‰J�wÓ×&Ð& 3€EØ�z‰z˜*Ó%×>Ð>Ð)>€Hð	Øˆ7Ð.¨x¨jð 9,ð	,ð 	QØbðd€Eô 
”)×	Õ	ÝAÙ! &×)Ò)Ø�L‰LÐYÔZ÷ 
ð €L÷	 
Ö	ð €Lús   Á7&B'Â'B8	u•   [TRUNCATED â€” subagent hit its iteration cap; the summary below may be incomplete. Verify before relying on it, or re-dispatch the unfinished part.]c                ó0   € V ^8„  d   QhR\         R\        /# )r   Úentryr   rJ   )r   s   "r   r   r   •   s   € ÷ Xñ Xœð X¤$ñ Xr   c                 ón   € \        V P                  R 4      ;'       g    V P                  R4      R8H  4      # )Ú	truncatedÚexit_reasonÚmax_iterations)rK   r   )r™   s   &r   Ú_is_truncatedrž   •   s-   € Ü�—	‘	˜+Ó&×VÐV¨%¯)©)°MÓ*BÐFVÑ*VÓWÐWr   c                ó:   € V ^8„  d   QhR\         \        ,          /# r   rj   )r   s   "r   r   r   ™   s   € ÷ +ñ +œd¤3�iñ +r   c                ó6   € \        V 4      pV'       d   R.VO# . # )zKBlank + model_not_found notice block, or [] when the notice does not apply.r   )r—   )r�   Únotices   & r   Ú_notice_linesr¢   ™   s   € ä/°Ó8€Fß"ˆBˆ=�ˆ=Ð*¨Ð*r   c                óv   € V ^8„  d   QhR\         R\        R\        R\        R\        R\        \        ,          /# )r   rI   ÚtitleÚintroÚcompleted_atÚ	with_goalr   )r7   r$   r]   rK   r   )r   s   "r   r   r   Ÿ   s>   € ÷ ñ ”4ð ¤ð ¬Cð ¼uð ÔTXð Ô]aÔbeÕ]fñ r   c          	     óð  € WR.pV P                  R4      p\        V\        \        34      '       dS   \        P
                  ! R\        P                  ! V4      4      pVP                  RV R\        W6,
          4       R24       V'       d/   TP                  RV P                  RR4      ;'       g    R 24       V P                  R	4      '       d   VP                  R
V R	,           24       V P                  R4      '       d+   VP                  RRP                  V R,          4       24       TP                  RV P                  R4      ;'       g    R RV P                  R4      ;'       g    R 24       V# )zZShared preamble: title, intro, blank, dispatch time, [goal], context/toolsets, role+model.r   Údispatched_atz%Y-%m-%d %H:%M:%SzDispatched: ú (z ago)zOriginal goal: ÚgoalÚcontextzContext you provided: Útoolsetsz
Toolsets: ú, zRole: ÚroleÚleafz
   Model: r{   r_   )
r   Ú
isinstancerc   r]   ÚtimeÚstrftimeÚ	localtimerD   rh   r(   )rI   r¤   r¥   r¦   r§   r–   r©   Útss   &&&&$   r   Ú	_preambler¶   Ÿ   s.  € à˜2Ð€EØ—G‘G˜OÓ,€MÜ�-¤#¤u ×.Ò.Ü�]Š]Ð.´·²¸}Ó0MÓNˆØ�‰�| B 4 r¬+°lÕ6RÓ*SÐ)TÐTYÐZÔ[ßØ�‰� s§w¡w¨v°rÓ':×'@Ð'@¸bÐ&AÐBÔCØ
‡w�wˆy×ÒØ�‰Ð-¨c°)­nÐ-=Ð>Ô?Ø
‡w�wˆz×ÒØ�‰�z $§)¡)¨C°
­OÓ"<Ð!=Ð>Ô?Ø	‡L�L�6˜#Ÿ'™' &›/×3Ð3¨VÐ4°J¸s¿w¹wÀwÓ?O×?VÐ?VÐSVÐ>WÐXÔYØ€Lr   c                ó<   € V ^8„  d   QhR\         R\        R\        /# )r   rI   Údeleg_idr   ©r7   r$   )r   s   "r   r   r   °   s!   € ÷ 5ñ 5¤Tð 5´Sð 5¼Sñ 5r   c           
     ól  € V P                  R4      ;'       g    / .R,          ;'       g    / .w  pV P                  R4      ;'       g    . VP                  R^ 4      V P                  R4      ;'       g%    \        V P                  R4      ;'       g    . 4      rTpV\        V4      8  d	   W4,          MVP                  RR4      p\        VP                  R4      ;'       g    R4      P                  4       P	                  R	R
4      R,          pRV RV^,            RV R2RV'       d   RV 2MRRVP                  RR4       RVP                  RR4       R2V'       d   RV 2MR,           .pVP                  R4      '       d   VP                  RVR,           24       R	P                  R V 4       4      # )zXOne child of a still-running fan-out failed: say which, why, and that the batch goes on.r�   :Né   NÚgoalsÚ
task_indexÚn_tasksr«   r   rƒ   Ú
r}   :Ni�  Nu"   [ASYNC DELEGATION TASK FAILED â€” z, task Ú/Ú]a  One subagent in a background fan-out you dispatched has failed while its siblings are still running. The batch's consolidated results will still arrive when the last sibling finishes; this is an early warning so you can re-dispatch or investigate now instead of then.zTask: úStatus: Ústatusr_   ú   Duration: Úduration_secondsr`   z
Error: Úlive_transcriptzLive transcript: c              3   ó8   "  € T F  q'       g   K  Vx € K  	  R # 5ir0   r8   )r   Úlines   & r   r�   Ú._format_task_failure_notice.<locals>.<genexpr>À   s   é € Ð4¡e˜d«t—T’T£eùs   ‚	�
)r   r'   r$   ÚstripÚreplacerD   r(   )	rI   r¸   r†   r¼   ÚidxÚnr«   Úerrr–   s	   &&       r   Ú_format_task_failure_noticerÏ   °   s�  € à�G‰G�IÓ×&Ð& 2 $¨Õ+×3Ð3°¨t�D€QØ—G‘G˜GÓ$×*Ð*¨¨A¯E©E°,ÀÓ,BÀCÇGÁGÈIÓDV×DuÐDuÔZ]Ð^a×^eÑ^eÐfmÓ^n×^tÐ^tÐrtÓZu�€EØœs 5›zÔ)ˆ5Ž:¨q¯u©u°V¸RÓ/@€DÜ
ˆa�e‰e�G‹n×"Ð" Ó
#×
)Ñ
)Ó
+×
3Ñ
3°D¸#Ó
>¸tÕ
D€Cà
,¨X¨J°g¸cÀA½g¸YÀaÈÀsÈ!ÐLð	M÷  ˆ&��‰ RØ
�1—5‘5˜ 3Ó'Ð(¨°a·e±eÐ<NÐPSÓ6TÐ5UÐUVÐW×psÐ]fÐgjÐfkÑ[lÐy{Õ|ð€Eð 	‡u�uÐ×ÒØ�‰Ð(¨Ð+<Õ)=Ð(>Ð?Ô@Ø�9‰9Ñ4¡eÓ4Ó4Ð4r   c                óF   € V ^8„  d   QhR\         R\        \        ,          /# rH   )r7   r   r$   )r   s   "r   r   r   Ã   s   € ÷ ñ œð ¤$¤s¥)ñ r   c                óÞ  € V P                  R4      '       g   . # RV R,           R2.pV P                  R4      ;'       g    / pV P                  R4      ;'       g    / P                  4        FK  w  r4VP                  RV RV 24       VP                  V4      '       g   K5  VRV R	2W#,          R
.,          pKM  	  V P                  R4      '       d   VP                  RV R,           24       V# )z¦Owner-died recovery diagnostics (``recover_abandoned_delegations``): last persisted
status, per-task transcript paths, their verbatim tails and the owner's git state.Úlast_known_statuszLast persisted unit status: z~ (before owner exit; not current liveness). Unrecorded outcomes remain unknown; inspect evidence before retrying side effects.Útranscript_tailsÚtask_transcriptszTask index z! transcript (may be incomplete): z--- last lines of task z transcript ---z--- end ---Úgit_state_hintz Owner working tree at recovery: )r   ÚitemsrD   )rI   r–   ÚtailsÚindexÚpaths   &    r   Ú_recovery_linesrÚ   Ã   sô   € ð �7‰7Ð&×'Ò'Øˆ	Ø+¨CÐ0CÕ,DÐ+Eð Fbð bð c€Eà�G‰GÐ&Ó'×-Ð-¨2€EØŸ™Ð 2Ó3×9Ð9°r×@Ñ@ÖB‰ˆØ�‰�{ 5 'Ð)JÈ4È&ÐQÔRØ�9‰9�U×ÔØÐ/°¨w°oÐFÈÍÐVcÐdÕdŠEñ Cð ‡w�wÐ× Ò Ø�‰Ð7¸Ð<LÕ8MÐ7NÐOÔPØ€Lr   c                óH   € V ^8„  d   QhR\         R\        R\        R\        /# )r   rI   r¸   r¦   r   )r7   r$   r]   )r   s   "r   r   r   Ô   s(   € ÷ .ñ .¤$ð .´#ð .ÄUð .Ìsñ .r   c                ó*  € V P                  R4      ;'       g    . V P                  R4      ;'       g    . rC\        V4      ;'       g    \        V4      \        V4      ;'       g    \        V4      reV P                  R4      pVe
   RV RV R2MV R2p\        V RV R	2R
V R2VRR7      p	V	R1;;,          RV P                  RV P                  RR4      4       R2,          uu&   V	\        V 4      ,          p	V P                  R4      '       d/   V'       g'   V	RRV R,           2.,          p	RP	                  V	4      # V	\        V4      ,          p	\        VR R7       EF#  p
V
P                  R^ 4      \        V
4      rËV
P                  RR4      V
P                  R4      V
P                  R4      rþpV\        V4      8  d	   WK,          MV
P                  RR4      pV'       d   RMV\        9   d   RMR pR!V R"V^,            R#V 2V'       d   R$V 2MR,           R%V 2,           V
P                  R&4      '       d   R'V
R&,           2MR,           V
P                  R4      e   R(V
R,           R2MR,           V'       d   R)MR,           pV	RVR*,           .,          p	V\        9   d8   V'       d0   V'       d   V	P                  \        4       V	P                  V4       McV'       d-   V'       d   V	P                  R+V R$V R,24       V	R-V.,          p	M/T	P                  R.V 2V'       d   R$V 2MR,           R,,           4       V
P                  R/4      '       d   V	P                  R0V
R/,           24       V	\        V
4      ,          p	EK&  	  RP	                  V	4      # )2zIConsolidated block for a delegate_task fan-out that finished as one unit.r�   r¼   Úgroupzgroup 'z' (z subagent(s))z subagent(s)u%   [ASYNC DELEGATION BATCH COMPLETE â€” rÁ   u5   A background fan-out unit you dispatched earlier â€” u7   â€” has finished; its consolidated results are below. Any other units from the same delegate_task call report separately as they finish. You may have moved on since dispatching â€” act on these or re-dispatch if things have changed. If you are still waiting on siblings, end your turn after acting on this one.F©r§   z   Total duration: Útotal_duration_secondsrÅ   r_   r`   rƒ   z--- ERROR ---z)The batch did not complete successfully: r¿   c                 ó&   € V P                  R ^ 4      # )r½   ©r   )r€   s   &r   Ú<lambda>Ú*_format_batch_delegation.<locals>.<lambda>ë   s   € ¨1¯5©5°¸qÔ+Ar   )Úkeyr½   rÃ   r„   r«   r   u   âš u   âœ“u   âœ—z--- z TASK rÀ   ú: z
  (status=Ú	api_callsz, api_calls=r®   u:   , TRUNCATED: hit max_iterations â€” work may be incompletez) ---Ú(Ú)úPartial output:u   (no summary â€” status=rÆ   z6Full live transcript (complete tool/assistant trace): éÿÿÿÿ)r   r'   r¶   rÚ   r(   r¢   Úsortedrž   Ú_DONErD   Ú_TRUNCATED_SUMMARY_NOTEÚ_process_accounting_lines)rI   r¸   r¦   r�   r¼   rÍ   Ún_unitrÝ   Úunitr–   r†   rÌ   Úr_truncatedÚr_statusÚ	r_summaryÚr_errorÚr_goalÚiconr+   s   &&&                r   Ú_format_batch_delegationr÷   Ô   sR  € à—W‘W˜YÓ'×-Ð-¨2¨s¯w©w°wÓ/?×/EÐ/EÀ2ˆUä�E“
×*Ð*œc '›l¬C°«L×,FÐ,F¼CÀ»J€vØ�G‰G�GÓ€EØ8=Ò8IˆW�U�G˜3˜v˜h mÑ4ÐRXÐQYÐYeÐOf€DÜØØ
/°¨z¸Ð;Ø
?À¸vð F?ð 	?ð 	 ô'€Eð 
ˆ"‡IÐ& s§w¡wÐ/GÈÏÉÐQcÐehÓIiÓ'jÐ&kÐklÐmÕmƒIØ	Œ_˜SÓ!Õ!€EØ
‡w�wˆw×Ò§Ø�/Ð%NÈsÐSZÍ|ÈnÐ#]Ð^Õ^ˆØ�y‰y˜ÓÐð 
Œ]˜7Ó#Õ#€EÜ�GÑ!A×BÐBˆØŸ5™5 ¨qÓ1´=ÀÓ3Cˆ[Ø'(§u¡u¨X°sÓ';¸Q¿U¹UÀ9Ó=MÈqÏuÉuÐU\Ë~˜WˆØ"¤S¨£ZÔ/�–°Q·U±U¸6À2Ó5Fˆß#‰u°8¼uÔ3D©%È%ˆØ˜˜˜f S¨1¥W I¨Q¨q¨cÐ2Çv¸¸6¸(±mÐSUÕVÐ[eÐfnÐeoÐYpÕpØ89¿¹¸k×8JÒ8J�| A k¥NÐ#3Ñ4ÐPRõTà67·e±eÐ<NÓ6OÒ6[�r˜!Ð.Õ/Ð0°Ñ2Ðacõe÷ VaÑQÐfhõjˆð 	�"�f˜wÕ&Ð'Õ'ˆØ”uÔ§ßØ—‘Ô4Ô5Ø�L‰L˜Õ#ßßØ—‘˜q  
¨"¨W¨I°QÐ7Ô8ØÐ'¨Ð3Õ3‰Eà�L‰LÐ2°8°*Ð=×SZÀ2ÀgÀYÁÐ`bÕcÐfiÕiÔjØ�5‰5Ð"×#Ò#Ø�L‰LÐQÐRSÐTeÕRfÐQgÐhÔiØÔ*¨1Ó-Õ-‹ñ- Cð. �9‰9�UÓÐr   c                ó0   € V ^8„  d   QhR\         R\        /# )r   r†   r   )r7   r   )r   s   "r   r   r     s   € ÷ ñ ¤ð ¬$ñ r   c                óÂ  € . pV P                  R4      ;'       g    .  FT  pVP                  RVP                  R4       RVP                  RR4      R,           RVP                  R	R4       R
24       KV  	  V P                  R4      ;'       g    . pV'       dC   VP                  R\        V4       R2RP                  R V 4       4      ,           R,           4       V P                  R4      ;'       g    .  Fe  pVP                  RVP                  R4       RVP                  RR4      R,           RVP                  R4       RVP                  RR4       24       Kg  	  V# )uÚ   Runtime-truth lines about a child's background processes: what it handed to you (you own it now, its
completion lands here) and what it left running (terminated at teardown â€” never trust a child's "watcher running").Úhanded_off_processeszHanded off to you: r   rª   Úcommandr   :Néx   Nu   ) â€” Únotez9. You own it now; its completion notice will arrive here.Úorphaned_processeszChild left zi background process(es) running that were TERMINATED with it (subagent process notices never reach you): ú; c              3   ó    "  € T FD  qP                  R 4       RVP                  RR4      R,           RVP                  R4       R2x € KF  	  R# 5i)	r   ú `rû   r   ºNéd   Nz` (Úruntime_secondszs)Nrá   )r   Úos   & r   r�   Ú,_process_accounting_lines.<locals>.<genexpr>  s[   é € ð  !Iñ  AHÐ{|§E¡E¨,Ó$7Ð#8¸¸1¿5¹5ÀÈBÓ;OÐPTÕ;UÐ:VÐVYÐZ[×Z_ÑZ_Ð`qÓZrÐYsÐsuÕ!vó  AHùs   ‚AAz4. Re-launch in this session anything you still need.Úunread_completionszChild's process r  r  z` finished (exit code Ú	exit_codez4) but the child never read its result; output tail:
Úoutput_tail)r   rD   r'   r(   )r†   r–   rb   ÚorphansÚus   &    r   rî   rî     s„  € ð €EØ�U‰UÐ)Ó*×0Ð0¨bÒ0ˆØ�‰Ð*¨1¯5©5°Ó+>Ð*?¸rÀ!Ç%Á%È	ÐSUÓBVÐW[ÕB\ÐA]Ð]cÐde×diÑdiÐjpÐrtÓduÐcvð wOð Oö 	Pñ 1ð �e‰eÐ(Ó)×/Ð/¨R€GßØ�‰�{¤3 w£< .ð 1Dð Dà—y‘yñ  !Iñ  AHó  !Ió  IõIð NõNô 	Oð �U‰UÐ'Ó(×.Ð.¨BÒ.ˆØ�‰Ð'¨¯©¨lÓ(;Ð'<¸B¸q¿u¹uÀYÐPRÓ?SÐTXÕ?YÐ>ZÐZpØŸ™˜kÓ*Ð+Ð+`Ðab×afÑafÐgtÐvxÓayÐ`zð|ö 	}ñ /ð €Lr   c                ó0   € V ^8„  d   QhR\         R\        /# rH   r¹   )r   s   "r   r   r     s   € ÷ $ñ $¤$ð $¬3ñ $r   c                óV  € V P                  RR4      pV P                  R4      ;'       g    \        P                  ! 4       pV P                  R4      '       d   \        W4      # V P                  R4      '       g&   \        V P                  R4      \        4      '       d   \        WV4      # V P                  R4      ;'       g    RV P                  R	4      V P                  R
4      rTp\        V 4      p\        V RV R2RVRR7      pT\        V .4      RV RV P                  R^ 4       RV P                  RR4       R2V'       d   RMR,           R.,           ,          pV\        9   d8   V'       d0   V'       d   VP                  \        4       VP                  V4       M{VR8X  d'   TP                  RV'       d   RV 2MR,           4       M;TP                  RV R2V'       d   R V 2MR,           4       V\        V 4      ,          pV'       d   VR!V.,          pR P                  V4      # )"zëSelf-contained re-injection for an async-delegation completion: the FULL
original task source (goal, context, toolsets, role, model), dispatch time, status
and result, so an agent deep in unrelated context can act on it or re-dispatch.Údelegation_idÚunknownr¦   Útask_failure_noticeÚis_batchr�   rÃ   Ú	completedr„   rƒ   u   [ASYNC DELEGATION COMPLETE â€” rÁ   zÈA background subagent you dispatched earlier has finished. You may have moved on since dispatching it; the full task source is below so you can act on the result or re-dispatch if things have changed.TrÞ   rÂ   z   API calls: ræ   rÄ   rÅ   r_   r`   u;    [TRUNCATED: hit max_iterations â€” work may be incomplete]r   z--- RESULT ---Úinterruptedz.The subagent was interrupted before completingrå   Ú.z3The subagent did not complete successfully (status=z).r¿   ré   )r   r²   rÏ   r±   r   r÷   rž   r¶   r¢   rì   rD   rí   rÚ   r(   )rI   r¸   r¦   rÃ   r„   rƒ   r›   r–   s   &       r   Ú_format_async_delegationr    sð  € ð �w‰w�¨	Ó2€HØ—7‘7˜>Ó*×9Ð9¬d¯iªi«k€LØ
‡w�wÐ$×%Ò%Ü*¨3Ó9Ð9Ø
‡w�wˆz×Òœj¨¯©°Ó);¼T×BÒBÜ'¨°|ÓDÐDØ ŸW™W XÓ.×=Ð=°+¸s¿w¹wÀyÓ?QÐSV×SZÑSZÐ[bÓSc�U€FÜ˜cÓ"€IÜØØ
)¨(¨°1Ð5ð	Kð 	 ô&€Eð 
Œ]˜C˜5Ó!Ø
�6�(˜.¨¯©°¸aÓ)@Ð(AÀÈsÏwÉwÐWiÐknÓOoÐNpÐpqÐrßLUÑHÐ[]õ	_àð%õ õ €Eð ”„Ÿ7ßØ�L‰LÔ0Ô1Ø�‰�WÕà�]Ô"Ø�L‰LÐI×]bÈrÐRWÐQXÉ\ÐhkÕlÕmà�L‰LØEÀfÀXÈRÐP×diÐVXÐY^ÐX_ÑT`ÐoqÕrôtà”_ SÓ)Õ)ˆEßØÐ'¨Ð1Õ1ˆEØ�9‰9�UÓÐr   c                ó0   € V ^8„  d   QhR\         R\        /# rH   r¹   )r   s   "r   r   r   ?  s   € ÷ Uñ U¤tð U´ñ Ur   c                óÖ  € V P                  R4      p\        V\        4      '       d+   V Uu. uF  p\        V\        4      '       g   K  VNK  	  upM. pT;'       g    V .pV P                  R4      ;'       g    . p. . reRRRRRRRR	R
RRRRRRR/pV EF  pVP                  R4      ;'       g    VP                  R4      '       d   RMRp	V	\        9   d   \        V4      '       d   RMRMVP                  V	R4      p
VP                  V
4       VP                  R^ 4      p^ Tu;8:  d   \        V4      8  d   M MWK,          MVP                  RR4      pTP                  RP                  \        T;'       g    R4      P                  4       4      4       EK  	  \        V4      ^8X  d    RV^ ,           R\        V^ ,          4       2# \        \        V4      4      ^8X  d
   V^ ,          MRpRP                  \        V P                  R4      ;'       g    R4      P                  4       4      ;'       g    RP                  V4      pRV R\        V4       R \        V4       R!2# u upi )"zLCompact UI title; the separate model notification retains all task evidence.r�   r¼   ÚfailedÚFailedrƒ   Ú	cancelledÚ	Cancelledr  ÚInterruptedÚtimeoutz	Timed OutÚstalledÚStalledr  ÚUnknownÚrejectedrÃ   r  Ú
IncompleteÚ	Completedr½   r«   r   r}   zBackground taskzSubagent Task rå   zFinished with IssuesrÝ   rÿ   zSubagent Tasks rª   z tasks))r   r±   r   r7   rì   rž   rD   r'   r(   r$   ÚsplitÚ_short_titleÚset)rI   Úraw_resultsr†   r�   r¼   ÚlabelsÚtitlesÚstatus_labelsÚresultrÃ   ÚlabelrØ   r«   Úoutcomer¤   s   &              r   Úasync_delegation_display_textr.  ?  s  € à—'‘'˜)Ó$€KÜAKÈKÔY]×A^ÒA^™+Ó=™+�Q¬°A´t×)<�qˆq™+Ò=Ðdf€GØ×Ð˜#˜€GØ�G‰G�GÓ×"Ð" €EØ˜ˆFØ˜x¨°(¸KÈØ" M°9¸kÈ9ÐV_Ø 	¨:°xðA€Mô ˆØ—‘˜HÓ%×[Ð[°f·j±jÀ×6IÒ6I©(È{ˆØLRÔV[ÌO¤¨v×!6Ò!6‘¹KØ×Ñ˜f lÓ3ð 	à�‰�eÔØ—
‘
˜<¨Ó+ˆØ  EÖ6¬C°«J×6ˆuŽ|¸F¿J¹JÀvÈrÓ<RˆØ�‰�c—h‘hœs 4×#<Ð#<Ð+<Ó=×CÑCÓEÓF×Gñ ô ˆ7ƒ|�qÔØ  q¥	˜{¨"¬\¸&À½)Ó-DÐ,EÐFÐFÜœs 6›{Ó+¨qÔ0ˆf�QŽiÐ6L€GØ�H‰H”S˜Ÿ™ Ó)×/Ð/¨RÓ0×6Ñ6Ó8Ó9×NÐN¸T¿Y¹YÀvÓ=N€EØ˜W˜I R¬°UÓ(;Ð'<¸B¼sÀ7»|¸nÈGÐTÐTùò' >s   ¬I&Á	I&c                ó0   € V ^8„  d   QhR\         R\         /# )r   r¤   r   r#   )r   s   "r   r   r   X  s   € ÷ >ñ >œð >¤ñ >r   c                 óF   € \        V 4      ^È8”  d   V R,          R,           # T # )éÈ   :NéÅ   Nú...)r'   )r¤   s   &r   r%  r%  X  s!   € ä"% e£*¨sÔ"2ˆ5��;˜ÕÐ=¸Ð=r   Úprocess_completec                ó$   € V ^8„  d   QhR\         /# r   r#   )r   s   "r   r   r   `  s   € ÷ 6ñ 6œsñ 6r   c                 óª   € R P                  \        T ;'       g    R4      P                  4       4      p\        V4      ^P8”  d   VR,          R,           # T# )r}   r   :NéM   Nr3  )r(   r$   r$  r'   )rû   Úcmds   & r   Ú_short_commandr9  `  sB   € Ø
�(‰(”3�w—}�} "Ó%×+Ñ+Ó-Ó
.€CÜ" 3›x¨"œ}ˆ3ˆs�8�eÕÐ5°#Ð5r   c                ó0   € V ^8„  d   QhR\         R\        /# )r   Úeventsr   rj   )r   s   "r   r   r   e  s   € ÷ nñ n¬Dð n´Sñ nr   c                ó¢  € \        V 4      ^8w  d   \        V 4       R2# V ^ ,          pVP                  R4      ;'       g    RVP                  RR4      r2VR8X  d   RpM"V\        9   d   VR8X  d   R	MR
pMV^ 8X  d   RMRp\        VP                  R4      4      pVR.\        O59  d   V^ 8w  d   RV R2MRpV'       d   RV V RV 2# RV V 2# )z[Compact UI title for one or more process completions; the model text keeps the full output.z Background Processes FinishedÚcompletion_reasonÚexitedr  r_   ÚkilledÚ
Terminatedr   ÚLostzFailed to StartÚFinishedr  rû   z (exit rè   r   zBackground Process rå   )r'   r   Ú_REASON_STATUSr9  )r;  rI   Úreasonr  r-  r8  Údetails   &      r   r1   r1   e  sê   € ä
ˆ6ƒ{�aÔÜ�f“+�Ð<Ð=Ð=Ø
��)€CØŸ™Ð 3Ó4×@Ð@¸À#Ç'Á'È+ÐWZÓB[ˆIØ�ÔØ‰Ø	”>Ô	!Ø" fÔ,‘&Ð2C‰à )¨Q¤‘*°HˆÜ
˜Ÿ™ Ó+Ó
,€CØ'-°hÐ5PÄÑ5PÔ'PÐU^ÐbcÔUcˆw�y�k Ñ#Ðik€Fß=@Ð   	¨&¨°°C°5Ð9ÐmÐH[Ð\cÐ[dÐekÐdlÐFmÐmr   ÚhiddeniÐ  c                ó^   € V ^8„  d   QhR\         R\        R\        \         \        3,          /# )r   ÚoutputÚomittedr   )r$   rc   r6   )r   s   "r   r   r   z  s)   € ÷ ñ ¤#ð ´ð ¼EÄ#ÄsÀ(½Oñ r   c                ó~   € \        V 4      \        8”  d(   V\        V 4      \        ,
          ,          pV \        ) R p W3# )a4  A tick's output capped to its newest characters (a long job's latest lines are what matter),
and the count of characters cut before it. ``omitted`` counts characters already cut before
``output``. The count rides the tick as its own field (``omitted``): text a job printed is never
read back as a cut marker.N)r'   ÚHEARTBEAT_OUTPUT_CHARS)rH  rI  s   &&r   Úheartbeat_output_tailrL  z  s>   € ô
 ˆ6ƒ{Ô+Ô+Ø”3�v“;Ô!7Õ7Õ7ˆØÔ/Ð/Ð0Ð1ˆØˆ?Ðr   c                ó<   € V ^8„  d   QhR\         R\         R\         /# )r   ÚearlierÚlaterr   rs   )r   s   "r   r   r   …  s!   € ÷ 	2ñ 	2¤Dð 	2´ð 	2¼$ñ 	2r   c                ó¬  € \        V P                  R4      ;'       g    ^ 4      \        V P                  R4      ;'       g    R4      r2\        VP                  R4      ;'       g    ^ 4      \        VP                  R4      ;'       g    R4      rTV'       d&   \        WR\	        V4      ,           V,           4      w  rgM\        W5,           V4      w  rgRVRV/# )zºTwo consecutive ticks' ``output``/``omitted`` as one tick's, capped the same way, counting
every character either cut. A later tick that was itself cut leaves none of the earlier output.rI  rH  r   )rc   r   r$   rL  r'   )rN  rO  Úearlier_cutÚearlier_textÚ	later_cutÚ
later_textrH  rI  s   &&      r   Újoin_heartbeat_outputsrU  …  s®   € ô !$ G§K¡K°	Ó$:×$?Ð$?¸aÓ @Ä#ÀgÇkÁkÐRZÓF[×FaÐFaÐ_aÓBb�Ü §	¡	¨)Ó 4× 9Ð 9¸Ó:¼CÀÇ	Á	È(Ó@S×@YÐ@YÐWYÓ<ZˆzßÜ/°
Ì#ÈlÓJ[Õ<[Ð^gÕ<gÓh‰ˆ�ä/°Õ0IÈ;ÓW‰ˆØ�f˜i¨Ð1Ð1r   c                ó0   € V ^8„  d   QhR\         R\        /# rH   r¹   )r   s   "r   r   r   ‘  s   € ÷ Yñ Yœtð Y¬ñ Yr   c                ó´   € \        V P                  R4      ;'       g    ^ 4      \        V P                  R4      ;'       g    R4      r!V'       d	   RV RV 2# T# )zYA tick's output as the agent reads it: the cut marker, rendered here only, then the tail.rI  rH  r   z...(z earlier characters omitted)
)rc   r   r$   )rI   rI  rH  s   &  r   Úheartbeat_output_textrX  ‘  sQ   € ä˜#Ÿ'™' )Ó,×1Ð1°Ó2´C¸¿¹ÀÓ8I×8OÐ8OÈRÓ4PˆVßELˆT�'�Ð8¸¸ÐAÐXÐRXÐXr   c                ó0   € V ^8„  d   QhR\         R\        /# rH   r¹   )r   s   "r   r   r   —  s   € ÷ pñ p¤ð p¬ñ pr   c                óº   € \        V P                  R4      4      p\        \        V P                  R4      ;'       g    ^ 4      4      pV'       d	   RV RV 2# RV 2# )zaOne-line CLI receipt for a heartbeat wake; the row itself is hidden (``HEARTBEAT_DISPLAY_KIND``).rû   Úelapsedz Background Process Output after rå   )r9  r   rh   r]   )rI   r8  Úages   &  r   Úheartbeat_display_textr]  —  sZ   € ä
˜Ÿ™ Ó+Ó
,€CÜ
”e˜CŸG™G IÓ.×3Ð3°!Ó4Ó
5€Cß>AÐ-¨c¨U°"°S°EÐ:ÐoÐIiÐjmÐinÐGoÐor   c                   ón   a a€ ] tR tRt oRtR	V3R lV 3R lllt]V3R lR l4       tV3R ltRt	Vt
V ;t# )
ÚTimelineNotificationiž  z–Queued model text that stays string-compatible, plus the display kind and compact human
title the surface paints instead of the raw notification wall.c                ó2   <€ V ^8„  d   QhRS[ RS[ RS[ RS[ /# )r   r   r3   Údisplay_kindÚnotification_categoryr#   )r   r   s   "€r   r   Ú!TimelineNotification.__annotate__¦  s*   ø€ ÷ ñ ™3ð ©cð Áð Ñ]`ñ r   c                óJ   <€ \         SV `  W4      pW%n        W5n        WEn        V# r0   )ÚsuperÚ__new__r3   ra  rb  )Úclsr   r3   ra  rb  ÚinstanceÚ	__class__s   &&&&& €r   rf  ÚTimelineNotification.__new__¦  s(   ø€ Ü‘7‘? 3Ó-ˆØ ,ÔØ ,ÔØ)>Ô&Øˆr   c                ó*   <€ V ^8„  d   QhRS[ RS[RR/# )r   r   r   r   r_  )r$   r7   )r   r   s   "€r   r   rc  ®  s(   ø€ ÷ Rñ R¡#ð R©dð RÐ7Mñ Rr   c                ó^   € ^ RI Hp T ! T\        V4      RV! V4      '       d   R4      # R4      # )é    )Údiagnostic_process_eventÚasync_delegation_completeÚ
diagnosticr+  )Úagent.notification_presentationrn  r.  )rg  r   r   rn  s   &&& r   Úfor_delegationÚ#TimelineNotification.for_delegation­  s=   € åLÙ�4Ô6°uÓ=Ð?ZÙ#;¸E×#BÒ#B�<óRð 	RØHPóRð 	Rr   c                ó>   <€ V ^8„  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   # )r   r3   ra  rb  r#   )r   r   s   "€r   r   rc  ž  s,   ø‡ ‚ ñ Ññ	 ñ
 Ññ ñ Ñò r   r8   )r+  )r9   r:   r;   r<   r=   rf  Úclassmethodrr  r>   r?   r@   Ú__classcell__)ri  r   s   @@r   r_  r_  ž  s2   ù‡ € ñF÷õ ð ÷Ró ðR÷! … r   r_  c                ó>   € V ^8„  d   QhR\         R\        R,          /# ©r   rI   r   Nr¹   )r   s   "r   r   r   ´  s   € ÷ 4ñ 4¤dð 4¬s°T­zñ 4r   c                óŽ  € \        V P                  R4      ;'       g    V P                  R4      ;'       g    R4      pVP                  R4      '       g   R# Rp\        \        4      ;_uu_ 4        ^ RIHp V! V4      pRRR4       V'       g   RV R2# \        VP                  R	4      ;'       g    R4      P                  4       VP                  R
4      rT\        V4      ^x8”  d   VR,          R,           MTpRV 2V'       d   RV 2MR,           R,           V'       d   RV R2,           # R,           #   + '       g   i     L½; i)u  One-line provenance for a subagent-owned process event, else None. Such a process
outlives the child and lands in the PARENT conversation, which would otherwise see an
anonymous output wall. Keyed on ``owner_task_id`` â€” ``task_id`` may be the session key.rM   rN   r   rO   N)Úget_subagent_attributionzStarted by subagent z (delegate_task).r«   r  :Néu   Nr3  z of delegation r  z Task: "Ú")	r$   r   rR   r   rp   rv   rz  rÊ   r'   )rI   rN   Úinforz  r«   Údelegs   &     r   Ú_delegation_attribution_liner  ´  s  € ô �#—'‘'˜/Ó*×FÐF¨c¯g©g°iÓ.@×FÐFÀBÓG€GØ×Ñ˜e×$Ò$ÙØ€DÜ	”)×	Õ	Ý@Ù'¨Ó0ˆ÷ 
÷ à% g YÐ.?Ð@Ð@Ü�d—h‘h˜vÓ&×,Ð,¨"Ó-×3Ñ3Ó5°t·x±xÀÓ7Pˆ%Ü!$ T£¨S¤ˆ4��:˜Ö°d€DØ" 7 )Ð,ÏU°/À%ÀÑ0IÐXZÕ[Ð^aÕaß%)�˜$˜˜qÐ!õ3ð 4Ø/1õ3ð 4÷ 
×	ús   Á0D4Ä4E	c                ó0   € V ^8„  d   QhR\         R\        /# rH   r¹   )r   s   "r   r   r   È  s   € ÷ pñ pœDð p¤Sñ pr   c                 óò   € V P                  R 4      ;'       g    RpVR8X  d   RV P                  R4      ;'       g    R 2# \        P                  V4      ;'       g    V P                  RR4      ^ 8X  d   R# R# )	r=  r>  r?  zterminated by Útermination_sourceÚHermesr  r_   zcompleted normally)r   rC  )rI   rD  s   & r   Ú_completion_statusr„  È  su   € Ø�W‰WÐ(Ó)×5Ð5¨X€FØ�ÔØ §¡Ð(<Ó =× IÐ IÀÐJÐKÐKÜ×Ñ˜fÓ%×oÐoÀ#Ç'Á'È+ÐWZÓB[Ð_`ÔB`Ð*>ÐoÐfnÐor   c                ó>   € V ^8„  d   QhR\         R\        R,          /# rx  r¹   )r   s   "r   r   r   Ï  s   € ÷ +;ñ +;¤Tð +;¬c°D­jñ +;r   c                ó\  € V P                  RR4      pVR19   d   RV P                  RR4       R2# VR8X  d   \        V 4      # V P                  RR	4      V P                  R
R	4      r2\        V 4      pV P                  R4      '       d   RV R,           2pV'       d   V R2MRpVR8X  dm   RT RV P                  RR4       R\        \	        V P                  R4      ;'       g    ^ 4      4       RV P                  RR4       RV RV R\        V 4       R2# VR8X  d`   V P                  R^ 4      pRV RV P                  RR4       RV RV R V P                  R!R4       2
V'       d   R"V R#2MR,           R,           # V P                  R$R4      pV P                  R!R4      pVR29   d   R%MRp	V'       d4   \        V\        4      '       d   \        V4      R&8”  d   R'VR3R( ,           pM)V P                  R)4      '       d   R*V R),           R+V R,V 2pRV R-\        V 4       R.V V	 R/V RV R0V R2# )4zEFormat a completion_queue event into an ``[IMPORTANT: ...]`` message.rB   rC   r&   Úmessager   rÁ   rP   r   r  rû   Úhandoff_notez=Handed off to you by a subagent before it finished. Purpose: r¿   Ú	heartbeatz[Background process z heartbeat #Úseqr_   u    â€” still running after r[  z
 (next in ÚintervalzBs when there is new output; you will also be told when it exits).
z	Command: z
Output since last heartbeat:
Úwatch_matchÚ
suppressedz[IMPORTANT: Background process z matched watch pattern "Úpatternz".
z
Matched output:
rH  z
(z/ earlier matches were suppressed by rate limit)r  z	, SIGTERMiX  ue   ...(output trimmed â€” subagent-owned process; see the delegation's live transcript for full output)
NÚ
output_cutz
...(first u6    characters cut â€” process(action="log", session_id="z") has the full output)
r}   z (exit code z).
z	
Output:
)Úwatch_disabledÚwatch_overflow_trippedÚwatch_overflow_released>   Ú143é�   éñÿÿÿú-15i¨ýÿÿ)
r   r  r  rh   r]   rX  r±   r$   r'   r„  )
rI   Úevt_typeÚ_sidÚ_cmdÚ_attributionÚattributionÚ_supÚ_exitÚ_outÚ_signals
   &         r   Úformat_process_notificationr   Ï  s’  € à�w‰w�v˜|Ó,€Hð ÐZÔZØ˜cŸg™g i°Ó4Ð5°QÐ7Ð7ØÐ%Ô%Ü'¨Ó,Ð,Ø—‘˜ yÓ1°3·7±7¸9ÀiÓ3Pˆ$Ü/°Ó4€LØ
‡w�wˆ~×ÒØVÐWZÐ[iÕWjÐVkÐlˆß)5�\�N "Ñ%¸2€KØ�;Ôà" 4 &¨°S·W±W¸UÀCÓ5HÐ4IÐIbÜœ5 §¡¨Ó!3×!8Ð!8°qÓ9Ó:Ð;¸:ÀcÇgÁgÈjÐZ]ÓF^ÐE_ð `Eàˆm˜9 T FÐ*JÔK`ÐadÓKeÐJfÐfgðið	jð
 �=Ô Ø�w‰w�| QÓ'ˆà-¨d¨VÐ3LÈSÏWÉWÐU^Ð`cÓMdÐLeÐejØˆm˜9 T FÐ*=¸c¿g¹gÀhÐPRÓ>SÐ=TðVçNR��T�FÐIÑJÐXZõ\à^aõbð	cð �G‰G�K Ó%€EØ�7‰7�8˜RÓ €DØ"Ð&>Ô>‰kÀB€G÷ œ
 4¬×-Ò-´#°d³)¸c´/ð>à�4�5ˆkõñ 	ð 
�‰�×	Ò	à˜S Õ.Ð/ð 0 Ø $˜vÐ%?À¸vðGˆð *¨$¨¨qÔ1CÀCÓ1HÐ0IÈÐV[ÐU\Ð]dÐ\eÐeiØˆ-�y   k°$°°qð	:ð;r   )r  Úsuccess)rm  )*r=   r²   Údataclassesr   Ú
contextlibr   rì   rC  r	   rF   rS   rZ   rh   rq   rx   r�   r—   rí   rž   r¢   r¶   rÏ   rÚ   r÷   rî   r  r.  r%  ÚPROCESS_COMPLETE_DISPLAY_KINDr9  r1   ÚHEARTBEAT_DISPLAY_KINDrK  rL  rU  rX  r]  r$   r_  r  r„  r   r8   r   r   Ú<module>r¦     s  ðñ+ó
 Ý !Ý à €ØÐOÐQ_ÐarÐs€ñ �$˜dÔ#÷að aó $ðaò0õ WðÈ4÷ õ,õNõõ	Uõð*ð õXõ+õõ"5õ&õ".õbõ&$õNUõ2>ð
 !3Ð õ6õ
nð" "Ð ØÐ ÷õ	2õYõpôR˜3ô Rõ,4õ(p÷+;r   