+
    KÿÎi-  ã                   óL   € R t ^ RIt]P                  ! 4       tR R ltR R ltR# )a“  Shared interrupt signaling for all tools.

Provides a global threading.Event that any tool can check to determine
if the user has requested an interrupt. The agent's interrupt() method
sets this event, and tools poll it during long-running operations.

Usage in tools:
    from tools.interrupt import is_interrupted
    if is_interrupted():
        return {"output": "[interrupted]", "returncode": 130}
Nc                ó(   € V ^8„  d   QhR\         RR/# )é   ÚactiveÚreturnN©Úbool)Úformats   "Ú,/home/ubuntu/hermes-agent/tools/interrupt.pyÚ__annotate__r
      s   € ÷ !ñ !œ$ð ! 4ñ !ó    c                ój   € V '       d   \         P                  4        R# \         P                  4        R# )z5Called by the agent to signal or clear the interrupt.N)Ú_interrupt_eventÚsetÚclear)r   s   &r	   Úset_interruptr      s   € çÜ×ÑÖä×ÑÖ r   c                ó$   € V ^8„  d   QhR\         /# )r   r   r   )r   s   "r	   r
   r
      s   € ÷ %ñ %œñ %r   c                 ó*   € \         P                  4       # )zGCheck if an interrupt has been requested. Safe to call from any thread.)r   Úis_set© r   r	   Úis_interruptedr      s   € ä×"Ñ"Ó$Ð$r   )Ú__doc__Ú	threadingÚEventr   r   r   r   r   r	   Ú<module>r      s&   ðñ
ó à—?’?Ó$Ð õ!÷%r   