§
    ÷žyj.  ã                  ó4   — d Z ddlmZ ddlZddlmZ ddd„ZdS )z7Compatibility helper for explicit agent stop producers.é    )ÚannotationsN)ÚAnyÚagentr   Úmessageú
str | NoneÚreturnÚboolc                ó  — 	 t          j        | d¦  «         t          | dd¦  «        }n# t          $ r d}Y nw xY wt	          |¦  «        st          | dd¦  «        }t	          |¦  «        sdS |€ |¦   «          n ||¦  «         dS )at  Request an explicit stop, falling back to the legacy interrupt ABI.

    New agents expose ``hard_interrupt(message=None)``. Third-party agents and
    old test doubles may only expose ``interrupt(message=None)``; keep those
    usable without sending the newer ``hard_cancel=`` keyword they do not know.
    Returns ``False`` only when neither callable is available.
    Úhard_interruptNÚ	interruptFT)ÚinspectÚgetattr_staticÚgetattrÚAttributeErrorÚcallable)r   r   r   s      ú</home/ragecks/.hermes/hermes-agent/agent/interrupt_compat.pyÚrequest_hard_interruptr   	   s¶   € ð;ÝÔ˜uÐ&6Ñ7Ô7Ð7õ ˜EÐ#3°TÑ:Ô:ˆ	ˆ	øõ ð ð ð Øˆ	ˆ	ˆ	ðøøøõ �IÑÔð 6Ý˜E ;°Ñ5Ô5ˆ	Ý�IÑÔð ØˆuØ€Øˆ	‰Œˆˆàˆ	�'ÑÔÐØˆ4s   ‚) ©8·8)N)r   r   r   r   r   r	   )Ú__doc__Ú
__future__r   r   Útypingr   r   © ó    r   ú<module>r      s[   ðØ =Ð =à "Ð "Ð "Ð "Ð "Ð "à €€€Ø Ð Ð Ð Ð Ð ðð ð ð ð ð ð r   