o
    x¹Ÿi©  ã                   @   sP   d dl mZmZ d dlmZ G dd„ deƒZG dd„ deƒZG dd„ deƒZd	S )
é    )ÚABCÚabstractmethod)ÚOptionalc                   @   sB   e Zd ZU dZdZeed< dedefdd„Zdedefdd	„Z	d
S )ÚUserInterfaceAdaptera'  Base adapter for user interaction. Implementations may be sync or async.

    Methods:
      - supports_sync: whether adapter can synchronously ask and return an answer
      - ask_sync(prompt): return answer (or raise NotImplementedError)
      - ask_async(prompt): return a token to await
    FÚsupports_syncÚpromptÚreturnc                 C   ó   t ƒ ‚©N©ÚNotImplementedError©Úselfr   © r   ú:/var/www/apps/myagent/mysuperagent/agent_src/interfaces.pyÚask_sync   s   zUserInterfaceAdapter.ask_syncc                 C   r	   )z1Return a token representing the pending question.r   r   r   r   r   Ú	ask_async   ó   zUserInterfaceAdapter.ask_asyncN)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚboolÚ__annotations__Ústrr   r   r   r   r   r   r      s
   
 r   c                   @   s"   e Zd ZdZdedefdd„ZdS )Ú
CLIAdapterTr   r   c                 C   s   t d|› dƒS )Nu   ðŸ¤”  Ú )Úinputr   r   r   r   r      s   zCLIAdapter.ask_syncN)r   r   r   r   r   r   r   r   r   r   r      s    r   c                   @   s&   e Zd ZdZdZdedefdd„ZdS )Ú
WebAdapterz‡Web adapter is not sync; it relies on token/resume flow.
    The actual pending store is managed in `agent_src.ui_state`/`web.py`.
    Fr   r   c                 C   r	   r
   r   r   r   r   r   r   $   r   zWebAdapter.ask_asyncN)r   r   r   r   r   r   r   r   r   r   r   r      s    r   N)Úabcr   r   Útypingr   r   r   r   r   r   r   r   Ú<module>   s
    