
    i2                     ^    U d Z ddlmZmZmZmZmZ i Zee	d<   de
deddfdZde
fd	Zdd
ZdS )zTransport layer types and registry for provider response normalization.

Usage:
    from agent.transports import get_transport
    transport = get_transport("anthropic_messages")
    result = transport.normalize_response(raw_response)
    )NormalizedResponseToolCallUsagebuild_tool_callmap_finish_reason	_REGISTRYapi_modetransport_clsreturnNc                     |t           | <   dS )z2Register a transport class for an api_mode string.N)r   )r	   r
   s     >/home/ubuntu/.hermes/hermes-agent/agent/transports/__init__.pyregister_transportr      s    'Ih    c                     t                               |           }|(t                       t                               |           }|dS  |            S )u   Get a transport instance for the given api_mode.

    Returns None if no transport is registered for this api_mode.
    This allows gradual migration — call sites can check for None
    and fall back to the legacy code path.
    N)r   get_discover_transports)r	   clss     r   get_transportr      sN     --
!
!C
{
 	mmH%%
{t355Lr   c                      	 ddl } n# t          $ r Y nw xY w	 ddl} n# t          $ r Y nw xY w	 ddl} n# t          $ r Y nw xY w	 ddl} dS # t          $ r Y dS w xY w)z:Import all transport modules to trigger auto-registration.r   N)agent.transports.anthropicImportErroragent.transports.codex!agent.transports.chat_completionsagent.transports.bedrock)agents    r   r   r   '   s    )))))   %%%%%   00000   ''''''   s8    
 
**3 
A A A
 

AA)r   N)__doc__agent.transports.typesr   r   r   r   r   r   dict__annotations__strtyper   r   r    r   r   <module>r#      s      k j j j j j j j j j j j j j	4   ( (T (d ( ( ( (
C    (     r   