o
    Æ°i7  ã                
   @   s^   d Z ddlmZmZmZ dddœdeeeef  deeeef  deeeef  fdd	„ZdS )
z(Utility helpers for A2A agent endpoints.é    )ÚDictÚMappingÚOptionalN)Údynamic_headersÚstatic_headersr   r   Úreturnc                 C   sD   i }| r|  dd„ |  ¡ D ƒ¡ |r|  dd„ | ¡ D ƒ¡ |p!dS )a  Merge outbound HTTP headers for A2A agent calls.

    Merge rules:
    - Start with ``dynamic_headers`` (values extracted from the incoming client request).
    - Overlay ``static_headers`` (admin-configured per agent).

    If both contain the same key, ``static_headers`` wins.
    c                 S   ó   i | ]\}}t |ƒt |ƒ“qS © ©Ústr©Ú.0ÚkÚvr	   r	   úZ/home/app/Keep/.python/lib/python3.10/site-packages/litellm/proxy/agent_endpoints/utils.pyÚ
<dictcomp>   ó    z'merge_agent_headers.<locals>.<dictcomp>c                 S   r   r	   r
   r   r	   r	   r   r      r   N)ÚupdateÚitems)r   r   Úmergedr	   r	   r   Úmerge_agent_headers   s   r   )Ú__doc__Útypingr   r   r   r   r   r	   r	   r	   r   Ú<module>   s    ýþýü