
    i                     l    U d Z ddlmZmZmZmZmZ i Zee	d<   da
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	_REGISTRYF_discoveredapi_modetransport_clsreturnNc                     |t           | <   dS )z2Register a transport class for an api_mode string.N)r   )r
   r   s     >/home/piyush/.hermes/hermes-agent/agent/transports/__init__.pyregister_transportr      s    'Ih    c                     t           st                       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	   _discover_transportsr   get)r
   clss     r   get_transportr      sb      
--
!
!C
{
 	mmH%%
{t355Lr   c                      da 	 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.Tr   N)r	   agent.transports.anthropicImportErroragent.transports.codex!agent.transports.chat_completionsagent.transports.bedrock)agents    r   r   r   1   s     K)))))   %%%%%   00000   ''''''   s9   	 
 
,,5 
AAA 
AA)r   N)__doc__agent.transports.typesr   r   r   r   r   r   dict__annotations__r	   boolstrtyper   r   r    r   r   <module>r%      s                   	4   T   ( (T (d ( ( ( (
C    .     r   