+
    iHàj…  ã                  ó¢   € R t ^ RIHt ^ RIt^ RIHtHtHt ^ RIH	t	 ]
! 0 Rm4      t^tR R ltR R ltR	 R
 ltRRR^ R]RR/R R llt. ROtR# )uÇ  Turn-end guard for kanban workers, which must end with a terminal board tool that hands
the card to whoever owns it next (``kanban_complete``, ``kanban_block``,
``kanban_request_review``, ``kanban_request_changes``). Some models narrate the next step
and stop with no tool calls; Hermes treats that as a clean exit â†’ ``rc=0`` â†’ dispatcher
``protocol_violation``. Policy-only: return a bounded synthetic nudge so the loop continues
instead of exiting.
)ÚannotationsN)ÚAnyÚIterableÚOptional)Úowned_kanban_taskc               ó   € V ^8„  d   QhRR/# )é   ÚreturnÚbool© )Úformats   "Ú6/home/ubuntu/.hermes/hermes-agent/agent/kanban_stop.pyÚ__annotate__r   !   s   € ÷ %ñ % 4ñ %ó    c                 óÀ   € \         P                  P                  R4      ;'       g    RP                  4       P	                  4       R9   d   R# \        \        4       4      # )zîOn when ``HERMES_KANBAN_TASK`` is set for the dispatcher-owned worker, unless
``HERMES_KANBAN_STOP_NUDGE`` disables it. In-process delegate_task children and cron runs
inherit the env var but own no board task and carry no kanban toolset.ÚHERMES_KANBAN_STOP_NUDGEÚ F>   Ú0ÚnoÚoffÚfalse)ÚosÚenvironÚgetÚstripÚlowerr
   r   r   r   r   Úkanban_stop_nudge_enabledr   !   sG   € ô 	�
‰
�‰Ð1Ó2×8Ð8°b×?Ñ?ÓA×GÑGÓIÐMhÔhÙÜÔ!Ó#Ó$Ð$r   c               ó    € V ^8„  d   QhRRRR/# )r   Útcr   r	   Ústrr   )r   s   "r   r   r   *   s   € ÷ _ñ _˜ð _ ñ _r   c                ób  € \        V \        4      '       d]   V P                  R4      p\        \        V\        4      '       d   VP                  R4      MV P                  R4      ;'       g    R4      # \	        V RR4      p\        Ve   \	        VRR4      M\	        V RR4      ;'       g    R4      # )zSTool name from a dict or object tool call (``function.name`` first, then ``name``).ÚfunctionÚnamer   N)Ú
isinstanceÚdictr   r   Úgetattr)r   Úfns   & r   Ú_tool_call_namer'   *   sŠ   € ä�"”d×ÒØ�V‰V�JÓˆÜ¤j°´T×&:Ò&:�B—F‘F˜6”NÀÇÁÀvÃ×UÐUÐSUÓVÐVÜ	��Z Ó	&€BÜ¨2ª>”˜˜F BÔ'¼wÀrÈ6ÐSUÓ?V×]Ð]Ð[]Ó^Ð^r   c               ó    € V ^8„  d   QhRRRR/# )r   ÚmessagesúIterable[dict] | Noner	   r
   r   )r   s   "r   r   r   3   s   € ÷ 
ñ 
Ð-Bð 
Àtñ 
r   c                óÂ  € \        R T ;'       g    R4       FÃ  pVP                  R4      pVR8X  dp   \        ;QJ d5    R VP                  R4      ;'       g    .  4       F  '       g   K   RM*	  RM&! R VP                  R4      ;'       g    .  4       4      '       d    R# VR8X  g   K“  \        VP                  R	4      ;'       g    R
4      \        9   g   KÂ   R# 	  R# )zATrue if this conversation already invoked a terminal kanban tool.c                ó"   € \        V \        4      # ©N)r#   r$   )Úms   &r   Ú<lambda>Ú0session_called_kanban_terminal.<locals>.<lambda>5   s   € ¤
¨1¬dÔ 3r   ÚroleÚ	assistantc              3  óF   "  € T F  p\        V4      \        9   x € K  	  R # 5ir-   )r'   Ú_TERMINAL_KANBAN_TOOLS)Ú.0r   s   & r   Ú	<genexpr>Ú1session_called_kanban_terminal.<locals>.<genexpr>7   s   é € ð '
ÙD_¸bŒO˜BÓÔ#9Ö9ÓD_ùs   ‚!Ú
tool_callsTFÚtoolr"   r   r   )Úfilterr   Úanyr   r4   )r)   Úmsgr1   s   &  r   Úsession_called_kanban_terminalr=   3   s¹   € äÑ3°X·^°^ÀÖDˆØ�w‰w�v‹ˆØ�;Ô§3£3ñ '
ØDGÇGÁGÈLÓDY×D_ÐD_Ð]_ÐD_ó'
§3§3¢3ñ '
ØDGÇGÁGÈLÓDY×D_ÐD_Ð]_ÐD_ó'
÷ $
ò $
ò Ø�6Ž>œc #§'¡'¨&£/×"7Ð"7°RÓ8Ô<RÖRÚñ Eñ r   r)   ÚattemptsÚmax_attemptsÚtask_idc          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   r)   r*   r>   Úintr?   r@   zOptional[str]r	   r   )r   s   "r   r   r   @   s<   € ÷ "ñ "à#ð"ð ð"ð ð	"ð
 ð"ð ñ"r   c                óö   € \        4       '       d   W8¼  g   \        V 4      '       d   R# T;'       g*    \        P                  P	                  R4      ;'       g    RP                  4       ;'       g    RpRV R2# )z³Synthetic follow-up when a kanban worker exits without a terminal tool; ``None`` when
the guard should not fire (not a kanban worker, already completed/blocked, budget exhausted).NÚHERMES_KANBAN_TASKr   z	this taskzj[System: You are a Hermes kanban worker. A plain-text reply is NOT a terminal state for the board.

Task `uD  ` has not been handed off: this session made no terminal board call (`kanban_complete` / `kanban_request_review` / `kanban_block`). Ending now causes a protocol violation (clean exit with the card still `running`).

Do this immediately in your next response â€” do not narrate intent:
1. Finish any remaining deliverable (write the required file(s) now).
2. Call `kanban_complete(summary=..., artifacts=[...])` if the work is done and needs no review, `kanban_request_review(summary=...)` if it is a code change that needs same-card review, OR `kanban_block(reason=...)` if you are blocked. Reviewers approve with `kanban_complete` or send the card back with `kanban_request_changes(reason=...)`.

Never end a turn with only a promise of future action. Repeated protocol violations will block this task and require manual intervention.])r   r=   r   r   r   r   )r)   r>   r?   r@   Útids   $$$$ r   Úbuild_kanban_stop_nudgerF   @   sp   € ô &×'Ò'ØÔ#Ü)¨(×3Ò3áà×@Ð@”b—j‘j—n‘nÐ%9Ó:×@Ð@¸b×
GÑ
GÓ
I×
XÐ
XÈ[€Cð	à�ð Uð	Uðr   >   Úkanban_blockÚkanban_completeÚkanban_scheduleÚkanban_request_reviewÚkanban_request_changes)rF   r   r=   )Ú__doc__Ú
__future__r   r   Útypingr   r   r   Úagent.delegation_contextr   Ú	frozensetr4   Ú_DEFAULT_MAX_ATTEMPTSr   r'   r=   rF   Ú__all__r   r   r   Ú<module>rS      sy   ðñõ #ã 	ß *Ñ *å 6ñ #ò $ó Ð ð Ð õ%õ_õ
ð"à&*ð"ð ð"ð .ð	"ð
 "÷"òJ e‚r   