+
    jHàj�  ã                  óf   € R t ^ RIHt ^ RIt ^ RItRt^
tR R ltR R lt	R#   ] d    Rt Li ; i)a  Shared HTTP client factory for long-lived platform adapters.

httpx's default ``keepalive_expiry`` (5s) lets peer-initiated FIN sit in
``CLOSE_WAIT`` behind transparent proxies (macOS + Cloudflare Warp); across 7
adapters plus LLM/MCP clients that walks into the default 256 fd limit.
``platform_httpx_limits()`` returns tighter ``httpx.Limits``: 10 keepalive
connections (platform APIs rarely parallelise beyond this), 2.0s expiry.
Override via ``HERMES_GATEWAY_HTTPX_KEEPALIVE_EXPIRY`` / ``HERMES_GATEWAY_HTTPX_MAX_KEEPALIVE``.
)ÚannotationsNg       @c               ó   € V ^8„  d   QhRR/# )é   ÚnameÚstr© )Úformats   "ÚJ/home/ubuntu/.hermes/hermes-agent/gateway/platforms/_http_client_limits.pyÚ__annotate__r
      s   € ÷ 	'ñ 	'˜ñ 	'ó    c                óÌ   € \         P                  P                  V R4      P                  4       pV'       g   V#  V! V4      pT^ 8”  d   T# T#   \        \
        3 d    Tu # i ; i)z:``cast(env)`` when set, parseable and > 0; else *default*.Ú )ÚosÚenvironÚgetÚstripÚ	TypeErrorÚ
ValueError)r   ÚdefaultÚcastÚrawÚvals   &&&  r	   Ú_positive_envr      sc   € ä
�*‰*�.‰.˜˜rÓ
"×
(Ñ
(Ó
*€CßØˆðÙ�3‹iˆð ˜”'ˆ3Ð&˜wÐ&øô ”zÐ"ô ØŠðús   ºA ÁA#Á"A#c               ó   € V ^8„  d   QhRR/# )r   Úreturnzhttpx.Limits | Noner   )r   s   "r	   r
   r
   %   s   € ÷ 
ñ 
Ð2ñ 
r   c                 ó’   € \         f   R# \         P                  ! \        R\        \        4      \        R\
        \        4      R7      # )zW``httpx.Limits`` tuned for persistent platform-adapter clients; ``None`` without httpx.NÚ"HERMES_GATEWAY_HTTPX_MAX_KEEPALIVEÚ%HERMES_GATEWAY_HTTPX_KEEPALIVE_EXPIRY)Úmax_keepalive_connectionsÚkeepalive_expiry)ÚhttpxÚLimitsr   Ú_DEFAULT_MAX_KEEPALIVEÚintÚ_DEFAULT_KEEPALIVE_EXPIRY_SÚfloatr   r   r	   Úplatform_httpx_limitsr&   %   s>   € ä‚}Ùä�<Š<Ü"/Ø0Ô2HÌ#ó#Oä&Ø3Ô5PÔRWóYôð r   )
Ú__doc__Ú
__future__r   r   r    ÚImportErrorr$   r"   r   r&   r   r   r	   Ú<module>r*      sH   ðñõ #ã 	ðÛð
 "Ð ØÐ õ	'÷
øð) ô Ø‚Eðús   Ž$ ¤	0¯0