o
    i                     @  sH   d Z ddlmZ ddlmZmZ ddlmZ eddG dd dZd	S )
a  Tenant-aware request context primitives.

The gateway creates one :class:`RequestContext` per incoming request and makes
it available to downstream platform components. Existing apps can remain
unaware of the platform layer while integration points consume this context.
    )annotations)	dataclassfield)AnyT)slotsc                   @  sz   e Zd ZU dZded< ded< ded< ded< ded	< eed
Zded< eed
Zded< eed
Z	ded< dddZ
dS )RequestContextz>Normalized metadata attached to a request before app dispatch.str
request_idzdict[str, Any] | Nonetenantz
str | Noneappdbstorage)default_factorydict[str, Any]limitsauthextrasreturnc              	   C  s&   | j | j| j| j| j| j| j| jdS )z<Return a serializable representation for logs and debugging.r	   r
   r   r   r   r   r   r   r   )self r   #platform/gateway/request_context.pyas_dict   s   zRequestContext.as_dictN)r   r   )__name__
__module____qualname____doc____annotations__r   dictr   r   r   r   r   r   r   r   r      s   
 r   N)	r   
__future__r   dataclassesr   r   typingr   r   r   r   r   r   <module>   s    