+
    lHàj<  ã                   ó’  € R t ^ RIt^ RIHtHtHtHt 0 R9mtRtRt	R	t
R
tRtRRRRRRRR/tRR0t ! R R4      tR:R R l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R&/R'RR$R(. R;O/R)RR$RR*//R+. R<O//R,RR-RR.R/R//R+. //tR=t]! ]R,          .]O54      tR1 R2 ltR3 R4 lt^ R5IHtHt ]P6                  ! RR0]]R6 R7R87       R# )>af  Todo tool: in-memory, revisioned task list for multi-step work. State lives on the
AIAgent (one per session), is re-injected after context compression, and every write bumps
a monotonic revision so UI clients can reject stale updates. One ``todo_list`` tool: pass
``todos`` to write, omit to read; every call returns the full list. No system-prompt mutation.N)ÚAnyÚDictÚListÚOptionalÚpendingÚin_progressÚ	completedÚ	cancelledi   é   i Ð u   â€¦ [truncated]z@[Your active task list was preserved across context compression]z[x]z[>]z[ ]z[~]c                   óR  a € ] tR t^t o RtR tV 3R lR ltR V 3R lR ll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R ltR^ /V 3R lR lltV 3R lR lt]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       tRtV tR# )!Ú	TodoStoreu�   In-memory todo list, one per AIAgent. List position is priority; items are
``{id, content, status, parent?}`` â€” ``parent`` nests a subtask.c                ó"   € . V n         ^ V n        R# )é    N©Ú_itemsÚ	_revision©Úselfs   &Ú4/home/ubuntu/.hermes/hermes-agent/tools/todo_tool.pyÚ__init__ÚTodoStore.__init__   s   € Ø,.ˆŒØˆŽó    c                ór   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          RS[ S[S[S[3,          ,          /# ©é   ÚtodosÚreturn©ÚlistÚdictÚstrr   )ÚformatÚ__classdict__s   "€r   Ú__annotate__ÚTodoStore.__annotate__"   s9   ø€ ÷ ]ñ ]¡$¡t©C±¨H¥~Õ"6ð ]¹4ÁÁSÉ#ÀXÅÕ;Oñ ]r   c                óˆ   € T P                  V P                  V4       Uu. uF  q P                  V4      NK  	  up4      # u upi )z@Validate, dedupe and order a whole new list (replace / restore).)Ú_normalize_orderÚ_dedupe_by_idÚ	_validate)r   r   Úts   && r   Ú_fresh_itemsÚTodoStore._fresh_items"   s:   € à×$Ñ$À×ASÑASÐTYÔAZÓ%[ÑAZ¸A§n¡n°QÖ&7ÑAZÑ%[Ó\Ð\ùÒ%[s   Ÿ?c          	      óx   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          RS[RS[ S[S[S[3,          ,          /# )r   r   Úmerger   )r   r   r    r   Úbool)r!   r"   s   "€r   r#   r$   &   s?   ø€ ÷ ñ ™4¡¡S©# X¥Õ/ð ¹ð ÉÉdÑSVÑX[ÐS[ÍnÕI]ñ r   c                ó‚  € V P                  4       p V'       d   V P                  V4       MV P                  V4      V n         V P                  \
        R1 V P                  V P                  4       V P                  V8w  d   V ;P                  ^,          un        V P                  4       #   \         d	    Y0n        h i ; i)z–Replace the list (default) or merge by id; returns the full list after writing.
Raises ValueError (leaving the list untouched) if any item is invalid.N)ÚreadÚ_merger*   r   Ú
ValueErrorÚMAX_TODO_ITEMSÚ_sanitize_parentsr   )r   r   r-   Úbefores   &&& r   ÚwriteÚTodoStore.write&   s–   € ð —‘“ˆð	ßØ—‘˜EÕ"à"×/Ñ/°Ó6�•ð �K‰Kœ™Ð(Ø×Ñ˜tŸ{™{Ô+Ø�;‰;˜&Ô Ø�NŠN˜aÕ�NØ�y‰y‹{Ðøô ô 	Ø ŒKØð	ús   ’B+ šB+ ¬B+ Â+B>c                óJ   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          RR/# )r   r   r   Nr   )r!   r"   s   "€r   r#   r$   8   s,   ø€ ÷ Dñ D™D¡¡c©3 h¥Õ0ð D°Tñ Dr   c                óš  € V P                    Uu/ uF  q"R,          VbK  	  ppV P                  V4       EF¢  p\        VP                  RR4      4      P	                  4       pV'       g   K7  VP                  V4      pVf:   V P                  V4      pWsVR,          &   V P                   P                  V4       K…  VP                  R4      '       d3   V P                  \        VR,          4      P	                  4       4      VR&   VP                  R4      '       di   \        VR,          4      P	                  4       P                  4       \        9   d2   \        VR,          4      P	                  4       P                  4       VR&   RV9   g   EKW  \        VR,          ;'       g    R4      P	                  4       pV'       d   W†R&   EK�  VP                  RR4       EK¥  	  V P                    Uu/ uF#  q"R,          VP                  VR,          V4      bK%  	  p	pV P                  \        V	P                  4       4      4      V n         R# u upi u upi )zOUpdate existing items only in the fields provided; append new ones (validated).ÚidÚ NÚcontentÚstatusÚparent)r   r'   r    ÚgetÚstripr(   ÚappendÚ_cap_contentÚlowerÚVALID_STATUSESÚpopr&   r   Úvalues)
r   r   ÚitemÚexistingr)   Úitem_idÚcurÚ	validatedr>   Úrebuilts
   &&        r   r1   ÚTodoStore._merge8   s¼  € à15·²Ó=±¨˜•J Ò$±ˆÐ=Ø×#Ñ# E×*ˆAÜ˜!Ÿ%™%  b›/Ó*×0Ñ0Ó2ˆGßÙØ—,‘,˜wÓ'ˆCØŠ{Ø ŸN™N¨1Ó-�	Ø,5˜ 4�Ñ)Ø—‘×"Ñ" 9Ô-ÙØ�u‰u�Y×ÒØ!%×!2Ñ!2´3°q¸µ|Ó3D×3JÑ3JÓ3LÓ!M��I‘Ø�u‰u�X�Š¤3 q¨¥{Ó#3×#9Ñ#9Ó#;×#AÑ#AÓ#CÄ~Ô#UÜ # A h¥KÓ 0× 6Ñ 6Ó 8× >Ñ >Ó @��H‘Ø˜1�}Ü˜Q˜x�[×.Ð.¨BÓ/×5Ñ5Ó7�ßØ$*˜”Mà—G‘G˜H d×+ñ' +ð* KOÏ+Ê+ÓVÉ+À$˜•:˜xŸ|™|¨D°­J¸Ó=Ò=É+ˆÐVØ×+Ñ+¬D°·±Ó1AÓ,BÓCˆŽùò/ >ùò, Ws   �IÇ))Ic                óF   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          /# ©r   r   ©r   r   r    )r!   r"   s   "€r   r#   r$   S   s!   ø€ ÷ 5ñ 5‘d™4¡¡S �>Õ*ñ 5r   c                ó^   € V P                    Uu. uF  qP                  4       NK  	  up# u upi ©N)r   Úcopy)r   rG   s   & r   r0   ÚTodoStore.readS   s"   € Ø(,¯ªÓ4© —	‘	–©Ñ4Ð4ùÒ4s   �*c                ó    <€ V ^8„  d   QhRS[ /# rO   ©r.   )r!   r"   s   "€r   r#   r$   V   s   ø€ ÷ !ñ !™4ñ !r   c                ó,   € \        V P                  4      # rR   )r.   r   r   s   &r   Ú	has_itemsÚTodoStore.has_itemsV   s   € Ü�D—K‘KÓ Ð r   c                ó6   <€ V ^8„  d   QhRS[ S[S[3,          /# rO   ©r   r    r   )r!   r"   s   "€r   r#   r$   Y   s   ø€ ÷ Bñ B™$™s¡C˜x�.ñ Br   c                ó>   € RV P                  4       RV P                  /# )z,Full state clients can reconcile atomically.r   Úrevision)r0   r   r   s   &r   ÚsnapshotÚTodoStore.snapshotY   s   € à˜Ÿ™› j°$·.±.ÐAÐAr   r]   c          	      óx   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          RS[RS[ S[S[S[3,          ,          /# )r   r   r]   r   r   )r!   r"   s   "€r   r#   r$   ]   sA   ø€ ÷ ñ ™T¡$¡s©C x¥.Õ1ð Áð ÉDÑQUÑVYÑ[^ÐV^ÕQ_ÕL`ñ r   c               ó   € V P                  V4      R\         V n         \        ^ \	        T;'       g    ^ 4      4      V n        V P                  4       #   \        \        3 d    ^ T n         T P                  4       # i ; i)z@Restore a trusted snapshot without manufacturing a new revision.N)	r*   r3   r   ÚmaxÚintr   Ú	TypeErrorr2   r0   )r   r   r]   s   &&$r   ÚrestoreÚTodoStore.restore]   sp   € à×'Ñ'¨Ó.¨´Ð?ˆŒð	Ü  ¤C¨¯¨°AÓ$6Ó7ˆDŒNð �y‰y‹{Ðøô œ:Ð&ô 	ØˆD�NØ�y‰y‹{Ðð	ús   ŸA ³A ÁA=Á<A=c                ó0   <€ V ^8„  d   QhRS[ S[,          /# rO   )r   r    )r!   r"   s   "€r   r#   r$   f   s   ø€ ÷ <ñ <¡h©s¥mñ <r   c                ó®  aa€ V P                   '       g   R# / oV P                    FD  pVP                  R4      '       g   K  SP                  VR,          . 4      P                  V4       KF  	  R VV3R llo\        .pV P                    F&  pVP                  R4      '       d   K  S! V^ V4       K(  	  \        V4      ^8”  d   RP                  V4      # R# )u  Render the list for post-compression injection, or None if nothing active. Only
pending/in_progress items are injected â€” finished ones make the model re-do work after
compression. A parent is kept (with its real status marker) when any descendant is
active so subtasks keep context.Nr>   c                ó€   € V ^8„  d   QhR\         \        \        3,          R\        R\        \        ,          R\        /# )r   rG   ÚdepthÚoutr   )r   r    rc   r   r.   )r!   s   "r   r#   Ú4TodoStore.format_for_injection.<locals>.__annotate__r   s4   € ÷ 	ñ 	œœc¤3˜h�ð 	´ð 	¼$¼s½)ð 	Ìñ 	r   c                 ó–  <€ . pR pSP                  V R,          . 4       F  pVS	! WQ^,           V4      ,          pK  	  V R,          \        9   ;'       g    TpV'       dk   \        P                  V R,          R4      pVP                  RV,           RV RV R,           RV R,           R	V R,           R
2
4       VP	                  V4       V# )Fr:   r=   z[?]z  z- Ú z. r<   z (Ú))r?   Ú_ACTIVE_STATUSESÚ_STATUS_MARKERSrA   Úextend)
rG   rj   rk   Ú	kid_linesÚhas_active_kidÚkidÚkeepÚmarkerÚchildrenÚrenders
   &&&     €€r   ry   Ú.TodoStore.format_for_injection.<locals>.renderr   sÀ   ø€ Ø#%ˆIØ"ˆNØ—|‘| D¨¥J°Ö3�Ø¡&¨°a­i¸Ó"CÕC’ñ 4à˜•>Ô%5Ñ5×GÐG¸ˆDßÜ(×,Ñ,¨T°(­^¸UÓC�Ø—
‘
˜d U�l˜^¨2¨f¨X°Q°t¸Dµz°lÀ"Ø" 9�oÐ.¨b°°hµÐ0@ÀðCô Dà—
‘
˜9Ô%ØˆKr   Ú
)r   r?   Ú
setdefaultrA   ÚTODO_INJECTION_HEADERÚlenÚjoin)r   rG   Úlinesrx   ry   s   &  @@r   Úformat_for_injectionÚTodoStore.format_for_injectionf   s¯   ù€ ð
 �{�{ˆ{ÙØ46ˆØ—K”KˆDØ�x‰x˜×!Ô!Ø×#Ñ# D¨¥N°BÓ7×>Ñ>¸tÖDñ  ÷	ñ 	ô 'Ð'ˆØ—K”KˆDØ—8‘8˜H×%Ô%Ù�t˜Q Ö&ñ  ô $' u£:°¤>ˆt�y‰y˜ÓÐ;°tÐ;r   c                ó&   <€ V ^8„  d   QhRS[ RS[ /# )r   r<   r   )r    )r!   r"   s   "€r   r#   r$   †   s   ø€ ÷ ñ ™cð ¡cñ r   c                ó~   € \        V 4      \        8”  d)   V R\        \        \        4      ,
           \        ,           # V # )zSTruncate to MAX_TODO_CONTENT_CHARS keeping the head (the actionable part) + marker.N)r~   ÚMAX_TODO_CONTENT_CHARSÚ_TRUNCATION_MARKER)r<   s   &r   rB   ÚTodoStore._cap_content…   s6   € ô ˆw‹<Ô0Ô0ØÐLÔ2´SÔ9KÓ5LÕLÐMÔPbÕbÐbØˆr   c                óR   <€ V ^8„  d   QhRS[ S[S[3,          RS[ S[S[3,          /# )r   rG   r   r[   )r!   r"   s   "€r   r#   r$   �   s+   ø€ ÷ ñ ™™S¡#˜X�ð ©4±±S°­>ñ r   c                ón  € \        V \        4      '       g	   RRRRRR/# \        V P                  RR4      4      P	                  4       ;'       g    Rp\        V P                  RR4      4      P	                  4       pV'       g   \        RV R	24      h\        V P                  RR4      4      P	                  4       P                  4       pRTR\        P                  V4      RV\        9   d   TMR/p\        V P                  R
4      ;'       g    R4      P	                  4       pV'       d   WQ8w  d   WTR
&   V# )zUNormalize one item to ``{id, content, status, parent?}`` (placeholders when missing).r:   Ú?r<   z(invalid item)r=   r   r;   zTodo item 'zL' has empty or missing content. Each item must have a non-empty description.r>   )
Ú
isinstancer   r    r?   r@   r2   rC   r   rB   rD   )rG   rI   r<   r=   Úresultr>   s   &     r   r(   ÚTodoStore._validateŒ   s  € ô ˜$¤×%Ò%Ø˜#˜yÐ*:¸HÀiÐPÐPÜ�d—h‘h˜t RÓ(Ó)×/Ñ/Ó1×8Ð8°SˆÜ�d—h‘h˜y¨"Ó-Ó.×4Ñ4Ó6ˆßÜØ˜g˜Yð '?ð ?óð ô �T—X‘X˜h¨	Ó2Ó3×9Ñ9Ó;×AÑAÓCˆØ˜ØœY×3Ñ3°GÓ<Ø f´Ô&>™FÀIðOˆô �T—X‘X˜hÓ'×-Ð-¨2Ó.×4Ñ4Ó6ˆß�fÔ'Ø%�8ÑØˆr   c                óJ   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          RR/# )r   Úitemsr   NrP   )r!   r"   s   "€r   r#   r$   ¢   s(   ø€ ÷ -ñ -¡¡d©3±¨8¥nÕ!5ð -¸$ñ -r   c                ó´  € V  Uu/ uF  qR,          VbK  	  ppV  F>  pVP                  R4      '       g   K  VR,          V9  g   K,  VP                  RR4       K@  	  V  Fp  pVR,          0TrCVP                  R4      '       g   K'  VR,          V9   d   VP                  RR4       KI  VP                  VR,          4       W$R,          ,          pKd  	  R# u upi )zNDrop dangling parent refs and break cycles in place (such items become roots).r:   r>   N)r?   rE   Úadd)r�   rG   Úby_idÚseenÚnodes   &    r   r4   ÚTodoStore._sanitize_parents¡   s·   € ñ /4Ó4©e d�d•˜TÒ!©eˆÐ4ÛˆDØ�x‰x˜×!Ô! d¨8¥n¸EÖ&AØ—‘˜ 4Ö(ñ ó ˆDØ˜t�*˜ t�$Ø—(‘(˜8×$Ô$Ø˜•> TÔ)Ø—H‘H˜X tÔ,ÙØ—‘˜˜h�Ô(Ø (�^Õ,’ó ùò	 5s   …Cc                ór   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          RS[ S[S[S[3,          ,          /# r   r   )r!   r"   s   "€r   r#   r$   ²   s5   ø€ ÷ ?ñ ?™T¡$¡s©C x¥.Õ1ð ?±d¹4ÁÁSÀ½>Õ6Jñ ?r   c                ó:  € / p\        V 4       FW  w  r#\        V\        4      '       d*   \        VP	                  RR4      4      P                  4       MRV 2pY!T;'       g    R&   KY  	  \        VP                  4       4       Uu. uF  q V,          NK  	  up# u upi )zDCollapse duplicate ids, keeping the last occurrence in its position.r:   r;   Ú
__invalid_rŠ   )Ú	enumerater‹   r   r    r?   r@   ÚsortedrF   )r   Ú
last_indexÚirG   Úkeys   &    r   r'   ÚTodoStore._dedupe_by_id±   sŒ   € ð &(ˆ
Ü  Ö'‰GˆAÜ5?ÀÄd×5KÒ5K”#�d—h‘h˜t RÓ(Ó)×/Ñ/Ô1ÐS]Ð^_Ð]`ÐQaˆCØ%&�s—z�z˜cÓ"ñ (ô #)¨×):Ñ):Ó)<Ô"=Ó>Ñ"=˜Q�a—�Ñ"=Ñ>Ð>ùÒ>s   ÂBc                ór   <€ V ^8„  d   QhRS[ S[S[S[3,          ,          RS[ S[S[S[3,          ,          /# )r   r�   r   rP   )r!   r"   s   "€r   r#   r$   »   s5   ø€ ÷ ñ ¡¡T©#©s¨(¥^Õ 4ð ¹¹dÁ3ÉÀ8½nÕ9Mñ r   c                ó~  € V  Uu. uF  qR,          NK  	  pp\         ;QJ d    R V  4       F  '       g   K   RM	  RM! R V  4       4      '       g   RV9  d   V # VP                  R4      pRVRV 9  d   V # V P                  4       pVP                  VP                  R4      VP	                  V4      4       V# u upi )u›   Lift the in_progress step ahead of any earlier pending placeholder. Nested lists
keep authored order â€” reordering would tear a subtask from its siblings.r=   c              3   óB   "  € T F  qP                  R 4      x € K  	  R# 5i)r>   N)r?   )Ú.0rG   s   & r   Ú	<genexpr>Ú-TodoStore._normalize_order.<locals>.<genexpr>¿   s   é € Ð4©e d�x‰x˜×!Ð!«eùs   ‚TFr   r   N)ÚanyÚindexrS   ÚinsertrE   )r�   rG   ÚstatusesÚactive_indexÚ
normalizeds   &    r   r&   ÚTodoStore._normalize_orderº   s£   € ñ 05Ó5©u t˜—N�N©uˆÐ5ß‹3Ñ4©eÓ4�3�3Š3Ñ4©eÓ4×4Ò4¸ÈXÔ8UØˆLØ—~‘~ mÓ4ˆØ˜H ] lÐ3Ô3ØˆLØ—Z‘Z“\ˆ
Ø×Ñ˜(Ÿ.™.¨Ó3°Z·^±^ÀLÓ5QÔRØÐùò 6s   …B:r   N)F)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r*   r6   r1   r0   rX   r^   re   r�   ÚstaticmethodrB   r(   r4   r'   r&   Ú__static_attributes__Ú__classdictcell__)r"   s   @r   r   r      sÑ   ø‡ € ñJò÷]ð ]÷ò ÷$Dð D÷65ð 5÷!ð !÷Bð BðÀa÷ ò ÷<ð <ð> ÷ó ðð ÷ó ðð( ÷-ó ð-ð ÷?ó ð?ð ÷ó ör   r   Fc                ó¬   € V ^8„  d   QhR\         \        \        \        \        3,          ,          ,          R\
        R\         \        ,          R\        /# )r   r   r-   Ústorer   )r   r   r   r    r   r.   r   )r!   s   "r   r#   r#   É   sG   € ÷ @ñ @”Xœd¤4¬¬S¨¥>Õ2Õ3ð @Ä4ð @ÜœiÕ(ð@Ü47ñ@r   c                óø  a€ Vf   \        R4      # V f   VP                  4       pMI\        V \        4      '       g"   \        R\	        V 4      P
                   24      #  VP                  W4      pR\        V4      /pR F  o\        V3R lV 4       4      VS&   K  	  \        P                  ! RVRVP                  4       R,          RV/R	R
7      #   \         d   p\        \        T4      4      u Rp?# Rp?ii ; i)zWWrite ``todos`` (replace, or ``merge`` by id) or read when None -> list + summary JSON.NzTodoStore not initializedztodos must be a list, got Útotalc              3   óF   <"  € T F  qR ,          S8X  g   K  ^x € K  	  R# 5i)r=   N© )r¢   rœ   r=   s   & €r   r£   Útodo_tool.<locals>.<genexpr>Ù   s   øé € ÐH© A°Hµ+ÀÑ2GŸaša«ùs   ƒ!—
!r   r]   ÚsummaryF)Úensure_ascii©r   r   r   r	   )Ú
tool_errorr0   r‹   r   Útyper¬   r6   r2   r    r~   ÚsumÚjsonÚdumpsr^   )r   r-   rµ   r�   Úer»   r=   s   &&&   @r   Ú	todo_toolrÄ   É   sè   ø€ ð ‚}ÜÐ5Ó6Ð6Ø‚}Ø—
‘
“‰ä˜%¤×&Ò&ÜÐ :¼4À»;×;OÑ;OÐ:PÐQÓRÐRð	&Ø—K‘K Ó-ˆEð œ˜E›
Ð#€GÛFˆÜÔH©ÓHÓHˆ�‹ñ Gä�:Š:�w  z°5·>±>Ó3CÀJÕ3OØ  'ð+Ø9>ô@ð @øô ô 	&Üœc !›fÓ%Õ%ûð	&ús   ÁC ÃC9ÃC4Ã.C9Ã4C9c                ó$   € V ^8„  d   QhR\         /# rO   rV   )r!   s   "r   r#   r#   Þ   s   € ÷ ñ ¤ñ r   c                 ó   € R# )z;Todo tool has no external requirements -- always available.Tr¹   r¹   r   r   Úcheck_todo_requirementsrÇ   Þ   s   € ár   ÚnameÚ	todo_listÚdescriptiona5  Track a task list for multi-step work (3+ steps). Use for complex tasks with 3+ steps or when the user provides multiple tasks. For 'all N items' tasks, enumerate every instance as its own checklist item so none are silently dropped. Call with no parameters to read the current list.
List order is priority. Only ONE item in_progress at a time. Break large phases into subtasks via parent. Mark an item completed only after the work is verified done, never based on intent. If something fails, cancel it and add a revised item. Always returns the full current list.Ú
parametersr¿   ÚobjectÚ
propertiesr   ÚarrayzTask items to write.r�   r:   Ústringr<   zTask descriptionr=   Úenumr>   zNOptional id of another item, making this a nested subtask. Omit for top-level.Úrequiredr-   Úbooleanzltrue: update existing items by id, add new ones. false (default): replace the entire list with a fresh plan.ÚdefaultÚtodoc                ó0   € V ^8„  d   QhR\         R\        /# )r   rÈ   r   ©r   r.   )r!   s   "r   r#   r#   #  s   € ÷ =ñ =œCð =¤Dñ =r   c                óD   € \        V \        4      ;'       d
    V \        9   # )z]True for the Todo tool's current name or a legacy alias (an already-unwrapped dispatch name).)r‹   r    ÚTODO_TOOL_NAMES)rÈ   s   &r   Úis_todo_tool_namerÙ   #  s   € ä�dœCÓ ×<Ð< T¬_Ñ%<Ð<r   c                ó0   € V ^8„  d   QhR\         R\        /# )r   Ú	tool_callr   rÖ   )r!   s   "r   r#   r#   (  s   € ÷ Uñ U¤ð U¬ñ Ur   c                ó8  € ^ RI Hp V! V R4      pV! VR4      ;'       g    RV! VR4      rC\        V4      '       d   R# \        V\        4      '       d
   RV9  d   R# ^ R	IHp W58w  d   R#  \        V\        4      '       d   \        P                  ! V4      MTp\        T\        4      '       g   R# ^ R
IHp T! T4      w  r‰T	'       * ;'       d0    \        T4      ^8H  ;'       d    \        T^ ,          R,          4      #   \        P                   d     R# i ; i)aÝ  True when a transcript tool_call entry (dict or object) invoked the Todo tool.

Covers the current name, legacy aliases, and the ``tool_call`` bridge (``todo_list`` is deferred by
default, and the transcript keeps the bridge name). The bridge is peeled from the recorded arguments
only, never live tool-search config, and must wrap exactly one call. Keep this module free of model_tools / agent.tool_executor
imports: TUI resume and run_agent call this without loading either.
)Ú	_tc_fieldÚfunctionrÈ   r;   Ú	argumentsTrÔ   F)ÚTOOL_CALL_NAME)Únormalize_tool_call_entries)Úagent.message_sanitizationrÝ   rÙ   r‹   r    Útools.tool_search_catalogrà   rÁ   ÚloadsÚJSONDecodeErrorr   Útools.tool_search_validationrá   r~   )
rÛ   rÝ   ÚfnrÈ   Úraw_argsrà   Úargsrá   ÚentriesÚerrors
   &         r   Úis_todo_tool_callrì   (  sï   € õ 5á	�9˜jÓ	)€BÙ˜r 6Ó*×0Ð0¨b±)¸BÀÓ2Lˆ(Ü˜×ÒÙô �(œC× Ò  V°8Ô%;ÙÝ8àÔÙðÜ'1°(¼C×'@Ò'@Œt�zŠz˜(Ô#Àhˆô �dœD×!Ò!ÙÝHá0°Ó6�N€GØŒ9×TÐTœ˜W›¨Ñ*×TÐTÔ/@ÀÈÅÈFÕASÓ/TÐTøô ×Ñô Úðús   Á,.D  Ä DÄD)Úregistryr¾   c                 óz   € \        V P                  R 4      V P                  RR4      VP                  R4      R7      # )r   r-   Frµ   )r   r-   rµ   )rÄ   r?   )ré   Úkws   &,r   Ú<lambda>rð   N  s-   € œyØ�h‰h�wÓ t§x¡x°¸Ó'?ÀrÇvÁvÈgÃõ Xr   u   ðŸ“‹)rÈ   ÚtoolsetÚschemaÚcheck_fnÚhandlerÚemoji>   r   r	   r   r   )NFNr½   )r:   r<   r=   )rÔ   )r°   rÁ   Útypingr   r   r   r   rD   r…   r3   ÚMAX_TODO_RESULT_CHARSr†   r}   rq   rp   r   rÄ   rÇ   ÚTODO_SCHEMAÚTODO_LEGACY_ALIASESÚ	frozensetrØ   rÙ   rì   Útools.registryrí   r¾   Úregisterr¹   r   r   Ú<module>rý      s�  ðñbó
 ß ,Ó ,âE€ð Ð Ø€ð  Ð Ø&Ð ð [Ð Ø  }°e¸YÈÈ{Ð\aÐb€Ø˜}Ð-Ð ÷lñ l÷^@õ*ð ˆKØð		6ð Ø�ØØØ˜ØÐ5ØØ˜HØ ØØ" Hðð "Ø" HØ)Ð+=ð$ð !Ø" HØ"Ò$Xð#ð !Ø" HØ)Ð+{ð#ð#ð" Ò ;ð'ðð2 Ø˜	ØðRð ˜5ðð5"
ðF 	�BðK&ð6€ðt  Ð Ù˜[¨Õ0ÐGÐ3FÑGÓH€õ=õ
U÷D 0à × Ò Ø	˜f¨[ÐCZñXà
÷	r   