Ë
    ³Œjr‘  ã                  óì  — d Z ddlmZ ddlZddlmZmZmZmZ ddl	m
Z
 ddlmZmZ ddlmZmZmZmZ ddlZddlmZmZmZ erdd	lmZ dd
lmZ ddlmZmZ  ej<                  e«      Z d$d„Z! G d„ de«      Z"e
 G d„ d«      «       Z#e
 G d„ d«      «       Z$e
 G d„ d«      «       Z%dZ&dZ' G d„ d«      Z( G d„ d«      Z)ed   Z*	 e
 G d„ d«      «       Z+e
 G d„ d«      «       Z, G d „ d!«      Z- G d"„ d#«      Z.y)%z#Data models for the sandbox client.é    )ÚannotationsN)ÚAsyncIteratorÚ	AwaitableÚCallableÚIterator)Ú	dataclass)ÚdatetimeÚtimezone)ÚTYPE_CHECKINGÚAnyÚLiteralÚOptional)ÚSandboxConnectionErrorÚSandboxOperationErrorÚSandboxServerReloadError)ÚAsyncSandbox)ÚSandbox)Ú_AsyncWSStreamControlÚ_WSStreamControlc                ó`   — | j                  d«      }||k(  ryt        j                  d||«       y)a×  Whether a 'started' frame proves *this* command was reattached to.

    A command and its WebSocket are separate things: the command keeps running on
    the server and the socket is only this client's attachment to it. The server
    acknowledges every successful reattachment with 'started', which for a
    command that produces no output is the only evidence it landed. One naming a
    different command is not evidence, and must not clear the reconnect budget.
    Ú
command_idTzFIgnoring reconnect acknowledgement for command %r while attached to %rF)ÚgetÚloggerÚwarning)Úmsgr   Úackeds      úc/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/langsmith/sandbox/_models.pyÚ_acknowledges_reconnectr      s7   € ð �G‰G�LÓ!€EØ�
ÒØÜ
‡N�NØPØØôð
 ó    c                  ó   — e Zd ZdZy)Ú_StreamEndedBeforeStartedaT  A command WebSocket closed before the guest sent its 'started' frame.

    Internal marker for the idempotently-retryable early close (the proxied
    tunnel was torn down gracefully mid-handshake), as distinct from a
    command-level failure. Subclasses SandboxOperationError so callers that
    catch the public type are unaffected.
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   r!   r!   2   s   „ òr   r!   c                  óB   — e Zd ZU dZded<   ded<   ded<   ed	d„«       Zy)
ÚExecutionResultz+Result of executing a command in a sandbox.ÚstrÚstdoutÚstderrÚintÚ	exit_codec                ó    — | j                   dk(  S )z.Return True if the command exited with code 0.r   )r-   ©Úselfs    r   ÚsuccesszExecutionResult.successD   s   € ð �~‰~ Ñ"Ð"r   N©ÚreturnÚbool)r"   r#   r$   r%   Ú__annotations__Úpropertyr1   r&   r   r   r(   r(   <   s&   … á5àƒKØƒKØƒNàò#ó ñ#r   r(   c                  ó<   — e Zd ZU dZded<   dZded<   edd„«       Zy)	ÚResourceStatusa  Lightweight provisioning status for any async-created resource.

    Attributes:
        status: Resource lifecycle status. One of "provisioning", "ready", "failed".
        status_message: Human-readable details when status is "failed", None otherwise.
    r)   ÚstatusNúOptional[str]Ústatus_messagec                óT   —  | |j                  dd«      |j                  d«      ¬«      S )z/Create a ResourceStatus from API response dict.r9   Úprovisioningr;   )r9   r;   ©r   ©ÚclsÚdatas     r   Ú	from_dictzResourceStatus.from_dictV   s,   € ñ Ø—8‘8˜H nÓ5ØŸ8™8Ð$4Ó5ô
ð 	
r   )rA   údict[str, Any]r3   r8   )r"   r#   r$   r%   r5   r;   ÚclassmethodrB   r&   r   r   r8   r8   J   s*   … ñð ƒKØ$(€N�MÓ(àò
ó ñ
r   r8   c                  óÊ   — e Zd ZU dZded<   ded<   ded<   ded<   dZd	ed
<   dZd	ed<   dZd	ed<   dZd	ed<   dZ	ded<   dZ
d	ed<   dZd	ed<   dZd	ed<   dZd	ed<   edd„«       Zy)ÚSnapshota£  Represents a sandbox snapshot.

    Snapshots are built from Docker images or captured from running sandboxes.
    They are used to create new sandboxes.

    Attributes:
        id: Unique identifier (UUID).
        name: Display name.
        status: Build status. One of "building", "ready", "failed".
        fs_capacity_bytes: Filesystem capacity in bytes.
        docker_image: Source Docker image (for build snapshots).
        image_digest: Docker image digest after pull.
        source_sandbox_id: Source sandbox (for capture snapshots).
        status_message: Human-readable details when status is "failed".
        fs_used_bytes: Actual bytes used on the filesystem.
        created_by: User or service that created the snapshot.
        registry_id: Private registry ID, if applicable.
        created_at: Timestamp when the snapshot was created.
        updated_at: Timestamp when the snapshot was last updated.
    r)   ÚidÚnamer9   r,   Úfs_capacity_bytesNr:   Údocker_imageÚimage_digestÚsource_sandbox_idr;   úOptional[int]Úfs_used_bytesÚ
created_byÚregistry_idÚ
created_atÚ
updated_atc                óº  —  | |j                  dd«      |j                  dd«      |j                  dd«      |j                  dd«      |j                  d«      |j                  d	«      |j                  d
«      |j                  d«      |j                  d«      |j                  d«      |j                  d«      |j                  d«      |j                  d«      ¬«      S )z)Create a Snapshot from API response dict.rG   Ú rH   r9   ÚbuildingrI   r   rJ   rK   rL   r;   rN   rO   rP   rQ   rR   )rG   rH   r9   rI   rJ   rK   rL   r;   rN   rO   rP   rQ   rR   r>   r?   s     r   rB   zSnapshot.from_dict„   s¸   € ñ Ø�x‰x˜˜bÓ!Ø—‘˜& "Ó%Ø—8‘8˜H jÓ1Ø"Ÿh™hÐ':¸AÓ>ØŸ™ .Ó1ØŸ™ .Ó1Ø"Ÿh™hÐ':Ó;ØŸ8™8Ð$4Ó5ØŸ(™( ?Ó3Ø—x‘x Ó-ØŸ™ Ó/Ø—x‘x Ó-Ø—x‘x Ó-ô
ð 	
r   )rA   rC   r3   rF   )r"   r#   r$   r%   r5   rJ   rK   rL   r;   rN   rO   rP   rQ   rR   rD   rB   r&   r   r   rF   rF   _   s‹   … ñð* 	ƒGØ
ƒIØƒKØÓØ"&€L�-Ó&Ø"&€L�-Ó&Ø'+Ð�}Ó+Ø$(€N�MÓ(Ø#'€M�=Ó'Ø $€J�Ó$Ø!%€K�Ó%Ø $€J�Ó$Ø $€J�Ó$àò
ó ñ
r   rF   z!X-Langsmith-Sandbox-Service-Tokené   c                  óò   — e Zd ZdZddœ	 	 	 	 	 	 	 	 	 	 	 dd„Zdd„Zdd„Zedd„«       Zedd„«       Z	edd	„«       Z
edd
„«       Zddd„Zddd„Zddd„Zddd„Zddd„Zddd„Zeddœ	 	 	 	 	 dd„«       Zdd„Zy)Ú
ServiceURLar  Authenticated URL for accessing an HTTP service running in a sandbox.

    Properties auto-refresh the token transparently when it nears expiry.
    HTTP helper methods (``.get``, ``.post``, etc.) inject the auth header
    automatically.

    When constructed by :meth:`SandboxClient.service` or
    :meth:`Sandbox.service`, the object holds an internal refresher that
    re-calls the API to obtain a fresh token before the current one expires.

    Example::

        svc = sb.service(port=3000)

        resp = svc.get("/api/data")  # token injected + auto-refreshed
        print(svc.browser_url)  # always-fresh URL
    N©Ú
_refresherc               óJ   — || _         || _        || _        || _        || _        y ©N©Ú_browser_urlÚ_service_urlÚ_tokenÚ_expires_atrZ   ©r0   Úbrowser_urlÚservice_urlÚtokenÚ
expires_atrZ   s         r   Ú__init__zServiceURL.__init__³   ó*   € ð (ˆÔØ'ˆÔØˆŒØ%ˆÔØ$ˆ�r   c                óP  — | j                   €y| j                  j                  dd«      }t        j                  |«      }|j
                  € |j                  t        j                  ¬«      }|t        j                  t        j                  «      z
  j                  «       }|t        k  S ©NFÚZz+00:00)Útzinfo©rZ   ra   Úreplacer	   Úfromisoformatrl   r
   ÚutcÚnowÚtotal_secondsÚ_REFRESH_MARGIN_SECONDS©r0   ÚrawÚexpiresÚ	remainings       r   Ú_should_refreshzServiceURL._should_refreshÄ   ó�   € Ø�?‰?Ð"ØØ×Ñ×&Ñ& s¨HÓ5ˆÜ×(Ñ(¨Ó-ˆØ�>‰>Ð!Ø—o‘o¬X¯\©\�oÓ:ˆGØœxŸ|™|¬H¯L©LÓ9Ñ9×HÑHÓJˆ	ØÔ3Ñ3Ð3r   c                óÎ   — | j                  «       rU| j                  «       }|j                  | _        |j                  | _        |j                  | _        |j
                  | _        y y r\   ©rx   rZ   r^   r_   r`   ra   ©r0   Úfreshs     r   Ú_maybe_refreshzServiceURL._maybe_refreshÎ   sT   € Ø×ÑÔ!Ø—O‘OÓ%ˆEØ %× 2Ñ 2ˆDÔØ %× 2Ñ 2ˆDÔØŸ,™,ˆDŒKØ$×0Ñ0ˆDÕð "r   c                ó:   — | j                  «        | j                  S )ú.Return the raw JWT, refreshing if near expiry.©r~   r`   r/   s    r   re   zServiceURL.tokenØ   s   € ð 	×ÑÔØ�{‰{Ðr   c                ó:   — | j                  «        | j                  S )ú/Return the base URL, refreshing if near expiry.©r~   r_   r/   s    r   rd   zServiceURL.service_urlÞ   ó   € ð 	×ÑÔØ× Ñ Ð r   c                ó:   — | j                  «        | j                  S )ú7Return the browser auth URL, refreshing if near expiry.©r~   r^   r/   s    r   rc   zServiceURL.browser_urlä   r…   r   c                ó:   — | j                  «        | j                  S )ú:Return the ISO 8601 expiration, refreshing if near expiry.©r~   ra   r/   s    r   rf   zServiceURL.expires_atê   s   € ð 	×ÑÔØ×ÑÐr   c                óø   — | j                   j                  d«      dz   |j                  d«      z   }t        |j	                  dd«      xs i «      }| j
                  |t        <   t        j                  ||fd|i|¤ŽS )a"  Make an HTTP request to the service, injecting the auth header.

        Args:
            method: HTTP method (GET, POST, etc.).
            path: Path relative to the service URL.
            **kwargs: Forwarded to ``httpx.request``.

        Returns:
            httpx.Response.
        Ú/ÚheadersN)	rd   ÚrstripÚlstripÚdictÚpopre   Ú_AUTH_HEADERÚhttpxÚrequest)r0   ÚmethodÚpathÚkwargsÚurlrŽ   s         r   r•   zServiceURL.requestò   sp   € ð ×Ñ×%Ñ% cÓ*¨SÑ0°4·;±;¸sÓ3CÑCˆÜ�v—z‘z )¨TÓ2Ò8°bÓ9ˆØ $§
¡
ˆ”ÑÜ�}‰}˜V SÑD°'ÐD¸VÑDÐDr   c                ó*   —  | j                   d|fi |¤ŽS )zHTTP GET to the service.ÚGET©r•   ©r0   r—   r˜   s      r   r   zServiceURL.get  ó   € àˆt�|‰|˜E 4Ñ2¨6Ñ2Ð2r   c                ó*   —  | j                   d|fi |¤ŽS )zHTTP POST to the service.ÚPOSTrœ   r�   s      r   ÚpostzServiceURL.post  s   € àˆt�|‰|˜F DÑ3¨FÑ3Ð3r   c                ó*   —  | j                   d|fi |¤ŽS )zHTTP PUT to the service.ÚPUTrœ   r�   s      r   ÚputzServiceURL.put
  rž   r   c                ó*   —  | j                   d|fi |¤ŽS )zHTTP PATCH to the service.ÚPATCHrœ   r�   s      r   ÚpatchzServiceURL.patch  s   € àˆt�|‰|˜G TÑ4¨VÑ4Ð4r   c                ó*   —  | j                   d|fi |¤ŽS )zHTTP DELETE to the service.ÚDELETErœ   r�   s      r   ÚdeletezServiceURL.delete  s   € àˆt�|‰|˜H dÑ5¨fÑ5Ð5r   c               ó4   —  | |d   |d   |d   |d   |¬«      S )z+Create a ServiceURL from API response dict.rc   rd   re   rf   ©rc   rd   re   rf   rZ   r&   ©r@   rA   rZ   s      r   rB   zServiceURL.from_dict  ó3   € ñ Ø˜]Ñ+Ø˜]Ñ+Ø�w‘-Ø˜LÑ)Ø!ô
ð 	
r   c                ó<   — d| j                   ›d| j                  ›d�S )NzServiceURL(service_url=ú, expires_at=Ú)©r_   ra   r/   s    r   Ú__repr__zServiceURL.__repr__(  s-   € à% d×&7Ñ&7Ð%:ð ;Ø×*Ñ*Ð-¨Qð0ð	
r   )rc   r)   rd   r)   re   r)   rf   r)   rZ   ú"Optional[Callable[[], ServiceURL]]r3   ÚNoner2   ©r3   rµ   ©r3   r)   ©r�   ©r–   r)   r—   r)   r˜   r   r3   úhttpx.Response©r—   r)   r˜   r   r3   rº   )rA   rC   rZ   r´   r3   rX   )r"   r#   r$   r%   rg   rx   r~   r6   re   rd   rc   rf   r•   r   r¡   r¤   r§   rª   rD   rB   r³   r&   r   r   rX   rX       sþ   „ ñð2 :>ñ%àð%ð ð%ð ð	%ð
 ð%ð 7ð%ð 
ó%ó"4ó1ð òó ðð
 ò!ó ð!ð
 ò!ó ð!ð
 ò ó ð ôEô 3ô4ô3ô5ô6ð ð
 :>ñ	
àð
ð 7ð	
ð
 
ò
ó ð
ô
r   rX   c                  ó"  — e Zd ZdZddœ	 	 	 	 	 	 	 	 	 	 	 dd„Zdd„Zdd„Zdd„Zdd„Zdd	„Z	dd
„Z
edd„«       Zedd„«       Zedd„«       Zedd„«       Z	 d	 	 	 	 	 	 	 dd„Zddd„Zddd„Zddd„Zddd„Zddd„Zeddœ	 	 	 	 	 dd„«       Zdd„Zy)ÚAsyncServiceURLaR  Async variant of :class:`ServiceURL` with auto-refreshing token.

    Properties and HTTP helpers are async. Use with
    :meth:`AsyncSandboxClient.service` or :meth:`AsyncSandbox.service`.

    Example::

        svc = await sb.service(port=3000)

        resp = await svc.get("/api/data")
        print(await svc.get_browser_url())
    NrY   c               óJ   — || _         || _        || _        || _        || _        y r\   r]   rb   s         r   rg   zAsyncServiceURL.__init__=  rh   r   c                óP  — | j                   €y| j                  j                  dd«      }t        j                  |«      }|j
                  € |j                  t        j                  ¬«      }|t        j                  t        j                  «      z
  j                  «       }|t        k  S rj   rm   rt   s       r   rx   zAsyncServiceURL._should_refreshN  ry   r   c              ƒ  óê   K  — | j                  «       r]| j                  «       ƒ d {  –—† }|j                  | _        |j                  | _        |j                  | _        |j
                  | _        y y 7 ŒJ­wr\   r{   r|   s     r   r~   zAsyncServiceURL._maybe_refreshX  s^   è ø€ Ø×ÑÔ!ØŸ/™/Ó+×+ˆEØ %× 2Ñ 2ˆDÔØ %× 2Ñ 2ˆDÔØŸ,™,ˆDŒKØ$×0Ñ0ˆDÕð "Ø+ús   ‚$A3¦A1§AA3c              ƒ  óV   K  — | j                  «       ƒ d{  –—†  | j                  S 7 Œ­w)r€   Nr�   r/   s    r   Ú	get_tokenzAsyncServiceURL.get_tokenb  s'   è ø€ à×!Ñ!Ó#×#Ð#Ø�{‰{Ðð 	$úó   ‚)–'—)c              ƒ  óV   K  — | j                  «       ƒ d{  –—†  | j                  S 7 Œ­w)rƒ   Nr„   r/   s    r   Úget_service_urlzAsyncServiceURL.get_service_urlg  ó)   è ø€ à×!Ñ!Ó#×#Ð#Ø× Ñ Ð ð 	$úrÃ   c              ƒ  óV   K  — | j                  «       ƒ d{  –—†  | j                  S 7 Œ­w)r‡   Nrˆ   r/   s    r   Úget_browser_urlzAsyncServiceURL.get_browser_urll  rÆ   rÃ   c              ƒ  óV   K  — | j                  «       ƒ d{  –—†  | j                  S 7 Œ­w)rŠ   Nr‹   r/   s    r   Úget_expires_atzAsyncServiceURL.get_expires_atq  s)   è ø€ à×!Ñ!Ó#×#Ð#Ø×ÑÐð 	$úrÃ   c                ó   — | j                   S )z&Return the raw JWT without refreshing.)r`   r/   s    r   re   zAsyncServiceURL.tokenx  s   € ð �{‰{Ðr   c                ó   — | j                   S )z'Return the base URL without refreshing.)r_   r/   s    r   rd   zAsyncServiceURL.service_url}  ó   € ð × Ñ Ð r   c                ó   — | j                   S )z/Return the browser auth URL without refreshing.)r^   r/   s    r   rc   zAsyncServiceURL.browser_url‚  rÍ   r   c                ó   — | j                   S )z3Return the expiration timestamp without refreshing.)ra   r/   s    r   rf   zAsyncServiceURL.expires_at‡  ó   € ð ×ÑÐr   c              ‹  óÔ  K  — | j                  «       ƒ d{  –—† j                  d«      dz   |j                  d«      z   }t        |j	                  dd«      xs i «      }| j                  «       ƒ d{  –—† |t        <   t        j                  «       4 ƒd{  –—† } |j                  ||fd|i|¤Žƒ d{  –—† cddd«      ƒd{  –—†  S 7 Œ²7 ŒY7 Œ77 Œ7 Œ# 1 ƒd{  –—†7  sw Y   yxY w­w)a4  Make an async HTTP request to the service, injecting the auth header.

        Args:
            method: HTTP method (GET, POST, etc.).
            path: Path relative to the service URL.
            **kwargs: Forwarded to ``httpx.AsyncClient.request``.

        Returns:
            httpx.Response.
        Nr�   rŽ   )
rÅ   r�   r�   r‘   r’   rÂ   r“   r”   ÚAsyncClientr•   )r0   r–   r—   r˜   r™   rŽ   Úclients          r   r•   zAsyncServiceURL.requestŽ  s¿   è ø€ ð ×)Ñ)Ó+×+×3Ñ3°CÓ8¸3Ñ>ÀÇÁÈSÓAQÑQˆÜ�v—z‘z )¨TÓ2Ò8°bÓ9ˆØ&*§n¡nÓ&6× 6ˆ”ÑÜ×$Ñ$×&Ô&¨&Ø'˜Ÿ™¨°ÑO¸WÐOÈÑO×O÷ '×&Ñ&ð ,øà 6øØ&øØOøð 'ø×&×&Ñ&üs|   ‚C(–C	—AC(Á1CÁ2#C(ÂCÂC(ÂCÂ3CÂ4CÂ7C(ÃCÃC(ÃC(ÃC(ÃCÃC(ÃC%ÃCÃC%Ã!C(c              ‹  óF   K  —  | j                   d|fi |¤Žƒ d{  –—† S 7 Œ­w)zAsync HTTP GET to the service.r›   Nrœ   r�   s      r   r   zAsyncServiceURL.get¡  ó$   è ø€ à!�T—\‘\ %¨Ñ8°Ñ8×8Ð8Ð8úó   ‚!š›!c              ‹  óF   K  —  | j                   d|fi |¤Žƒ d{  –—† S 7 Œ­w)zAsync HTTP POST to the service.r    Nrœ   r�   s      r   r¡   zAsyncServiceURL.post¥  s$   è ø€ à!�T—\‘\ &¨$Ñ9°&Ñ9×9Ð9Ð9úrÖ   c              ‹  óF   K  —  | j                   d|fi |¤Žƒ d{  –—† S 7 Œ­w)zAsync HTTP PUT to the service.r£   Nrœ   r�   s      r   r¤   zAsyncServiceURL.put©  rÕ   rÖ   c              ‹  óF   K  —  | j                   d|fi |¤Žƒ d{  –—† S 7 Œ­w)z Async HTTP PATCH to the service.r¦   Nrœ   r�   s      r   r§   zAsyncServiceURL.patch­  s$   è ø€ à!�T—\‘\ '¨4Ñ:°6Ñ:×:Ð:Ð:úrÖ   c              ‹  óF   K  —  | j                   d|fi |¤Žƒ d{  –—† S 7 Œ­w)z!Async HTTP DELETE to the service.r©   Nrœ   r�   s      r   rª   zAsyncServiceURL.delete±  s$   è ø€ à!�T—\‘\ (¨DÑ;°FÑ;×;Ð;Ð;úrÖ   c               ó4   —  | |d   |d   |d   |d   |¬«      S )z1Create an AsyncServiceURL from API response dict.rc   rd   re   rf   r¬   r&   r­   s      r   rB   zAsyncServiceURL.from_dict·  r®   r   c                ó<   — d| j                   ›d| j                  ›d�S )NzAsyncServiceURL(service_url=r°   r±   r²   r/   s    r   r³   zAsyncServiceURL.__repr__Ç  s.   € à*¨4×+<Ñ+<Ð*?ð @Ø×*Ñ*Ð-¨Qð0ð	
r   )rc   r)   rd   r)   re   r)   rf   r)   rZ   ú2Optional[Callable[[], Awaitable[AsyncServiceURL]]]r3   rµ   r2   r¶   r·   r¸   r¹   r»   )rA   rC   rZ   rÝ   r3   r½   )r"   r#   r$   r%   rg   rx   r~   rÂ   rÅ   rÈ   rÊ   r6   re   rd   rc   rf   r•   r   r¡   r¤   r§   rª   rD   rB   r³   r&   r   r   r½   r½   /  sA  „ ñð( JNñ%àð%ð ð%ð ð	%ð
 ð%ð Gð%ð 
ó%ó"4ó1óó
!ó
!ó
 ð òó ðð ò!ó ð!ð ò!ó ð!ð ò ó ð ð (+ðPØðPØ!$ðPØ69ðPà	óPô&9ô:ô9ô;ô<ð ð
 JNñ	
àð
ð Gð	
ð
 
ò
ó ð
ô
r   r½   )Ú
attachmentÚinlinec                  óF   — e Zd ZU dZded<   ded<   dZded<   ed	d„«       Zy)
ÚDownloadURLa8  A link that downloads one sandbox file with no LangSmith credential.

    The link is pinned to the sandbox, the file path, and the response
    headers, so it cannot be repointed at another file. It is pinned to the
    path rather than to a snapshot of the contents, so the file must not be
    modified while the link is in use.

    Attributes:
        download_url: The full URL to fetch. Supports GET, HEAD, and Range.
        token: The signed token embedded in ``download_url``.
        expires_at: Expiry timestamp, or None for a link that never expires.
    r)   Údownload_urlre   Nr:   rf   c                óv   —  | |j                  dd«      |j                  dd«      |j                  d«      ¬«      S )z,Create a DownloadURL from API response dict.râ   rT   re   rf   )râ   re   rf   r>   r?   s     r   rB   zDownloadURL.from_dictê  s9   € ñ ØŸ™ .°"Ó5Ø—(‘(˜7 BÓ'Ø—x‘x Ó-ô
ð 	
r   )rA   rC   r3   rá   )r"   r#   r$   r%   r5   rf   rD   rB   r&   r   r   rá   rá   ×  s0   … ñð ÓØƒJØ $€J�Ó$àò
ó ñ
r   rá   c                  ó0   — e Zd ZU dZded<   ded<   ded<   y)ÚOutputChunkaf  A single chunk of streaming output from command execution.

    Attributes:
        stream: Either "stdout" or "stderr".
        data: The text content of this chunk (valid UTF-8, server handles
            boundary splitting).
        offset: Byte offset within the stream. Used internally for
            reconnection; users typically don't need this.
    r)   ÚstreamrA   r,   ÚoffsetN)r"   r#   r$   r%   r5   r&   r   r   rå   rå   ù  s   … ñð ƒKØ
ƒIØ„Kr   rå   c                  óÞ   — e Zd ZdZdZdZdZddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd	„Zdd
„Ze	dd„«       Z
e	dd„«       Ze	dd„«       Zdd„Zdd„Zdd„Zdd„Ze	dd„«       Ze	dd„«       Zdd„Zy)ÚCommandHandleu  Handle to a running command with streaming output and auto-reconnect.

    Iterable, yielding OutputChunk objects (stdout and stderr interleaved
    in arrival order). Access .result after iteration to get the full
    ExecutionResult.

    Auto-reconnect behavior:
    - Server hot-reload (1001 Going Away): reconnect immediately
    - Network error / unexpected close:    reconnect with exponential backoff
    - User called kill():                  do NOT reconnect (propagate error)

    The auto-reconnect is transparent -- the iterator reconnects and
    continues yielding chunks without any user intervention. If all
    reconnect attempts are exhausted, SandboxConnectionError is raised.

    Construction modes (controlled by ``command_id``):
    - **New execution** (``command_id=""``, the default): the constructor
      eagerly reads the server's ``"started"`` message to populate
      ``command_id`` and ``pid`` before returning.
    - **Reconnection** (``command_id`` set): skips the started-message
      read. A reconnect stream's ``"started"`` message is the server's
      acknowledgement that the reattachment landed, consumed while iterating to
      clear the reconnect budget â€” the only such signal for a command that
      emits no output.

    Example:
        handle = sandbox.run("make build", timeout=600, wait=False)

        for chunk in handle:          # auto-reconnects on transient errors
            print(chunk.data, end="")

        result = handle.result
        print(f"Exit code: {result.exit_code}")
    é   ç      à?ç       @rT   r   N©r   Ústdout_offsetÚstderr_offsetÚ	on_stdoutÚ	on_stderrc               óü   — || _         || _        || _        || _        || _        d | _        d | _        d | _        g | _        g | _	        d| _
        || _        || _        d| _        |r|| _        y | j                  «        y )NFr   )Ú_streamÚ_controlÚ_sandboxÚ
_on_stdoutÚ
_on_stderrÚ_command_idÚ_pidÚ_resultÚ_stdout_partsÚ_stderr_partsÚ
_exhaustedÚ_last_stdout_offsetÚ_last_stderr_offsetÚ_reconnect_attemptsÚ_consume_started©	r0   Úmessage_streamÚcontrolÚsandboxr   rî   rï   rð   rñ   s	            r   rg   zCommandHandle.__init__2  s…   € ð &ˆŒØˆŒØˆŒØ#ˆŒØ#ˆŒØ*.ˆÔØ#'ˆŒ	Ø26ˆŒØ(*ˆÔØ(*ˆÔØˆŒØ#0ˆÔ Ø#0ˆÔ Ø#$ˆÔ ñ
 Ø)ˆDÕà×!Ñ!Õ#r   c                ó$  — 	 t        | j                  «      }|j	                  d«      dk7  r t        d|j	                  d«      › d�d¬«      ‚|j	                  d«      | _        |j	                  d	«      | _        y
# t        $ r t        dd¬«      ‚w xY w)aH  Eagerly read the 'started' message to populate command_id and pid.

        Blocks briefly until the server sends the started message (arrives
        near-instantly after connection). After this call, command_id and
        pid are available, and the WebSocket is bound to the control object
        (so kill() works).
        ú-Command stream ended before 'started' messageÚcommand©Ú	operationÚtypeÚstartedú!Expected 'started' message, got 'Ú'r   ÚpidN)Únextró   ÚStopIterationr!   r   r   rø   rù   ©r0   Ú	first_msgs     r   r  zCommandHandle._consume_startedU  s•   € ð	Ü˜TŸ\™\Ó*ˆIð �=‰=˜Ó  IÒ-Ü'Ø3°I·M±MÀ&Ó4IÐ3JÈ!ÐLØ#ôð ð %Ÿ=™=¨Ó6ˆÔØ—M‘M %Ó(ˆ�	øô ò 	Ü+Ø?Ø#ôð ð	ús   ‚A8 Á8Bc                ó   — | j                   S )z=The server-assigned command ID. Available after construction.©rø   r/   s    r   r   zCommandHandle.command_idl  rÐ   r   c                ó   — | j                   S )z<The process ID on the sandbox. Available after construction.©rù   r/   s    r   r  zCommandHandle.pidq  ó   € ð �y‰yÐr   c                ór   — | j                   €| D ]  }Œ | j                   €t        dd¬«      ‚| j                   S )zßThe final execution result. Blocks until the command completes.

        Drains the remaining stream if not already exhausted, then returns
        the ExecutionResult with aggregated stdout, stderr, and exit_code.
        ú)Command stream ended without exit messager  r	  ©rú   r   ©r0   Ú_s     r   ÚresultzCommandHandle.resultv  sD   € ð �<‰<ÐÛ�Øð à�<‰<ÐÜ'Ø;Ø#ôð ð �|‰|Ðr   c           	   #  óJ  K  — | j                   ry| j                  D ]ù  }|j                  d«      }|dk(  rt        || j                  «      sŒ0d| _        Œ8|dv rht        ||d   |j                  dd«      ¬«      }|d	k(  r| j                  j                  |d   «       n| j                  j                  |d   «       |–— Œ¤|d
k(  sŒªt        dj                  | j                  «      dj                  | j                  «      |d   ¬«      | _        d| _          y t        d«      ‚­w©zBIterate over output chunks from the current stream (no reconnect).Nr  r  r   )r*   r+   rA   rç   )ræ   rA   rç   r*   ÚexitrT   r-   )r*   r+   r-   Tr  )rý   ró   r   r   rø   r   rå   rû   Úappendrü   r(   Újoinrú   r   ©r0   r   Úmsg_typeÚchunks       r   Ú_iter_streamzCommandHandle._iter_stream‡  s  è ø€ à�?Š?ØØ—<”<ˆCØ—w‘w˜v“ˆHØ˜9Ò$Ü*¨3°×0@Ñ0@ÕAØ/0�DÕ,ØÐ1Ñ1Ü#Ø#Ø˜V™ØŸ7™7 8¨QÓ/ô�ð
 ˜xÒ'Ø×&Ñ&×-Ñ-¨c°&©kÕ:à×&Ñ&×-Ñ-¨c°&©kÔ:Ø“Ø˜VÓ#Ü.ØŸ7™7 4×#5Ñ#5Ó6ØŸ7™7 4×#5Ñ#5Ó6Ø! +Ñ.ô �”ð
 #'�”Ùð/  ô0 %Ð%PÓQÐQùs   ‚A	D#ÁA9D#ÃAD#c              #  ó”  K  — ddl }d| _        	 	 | j                  «       D ]×  }d| _        |j                  dk(  r^|j                  t        |j                  j                  d«      «      z   | _        | j                  �y| j                  |j                  «       n]|j                  t        |j                  j                  d«      «      z   | _
        | j                  �| j                  |j                  «       |–— ŒÙ y# t        $ �r>}| j                  r| j                  j                  r‚ | xj                  dz  c_        | j                  | j                  kD  rt        d| j                  › d�«      |‚t!        |t"        «      }|sDt%        | j&                  d| j                  dz
  z  z  | j(                  «      }|j+                  |«       | j,                  €J ‚| j.                  j1                  | j,                  | j                  | j                  ¬	«      }|j2                  | _        |j                  | _        d
| _        Y d}~nd}~ww xY w�Œ9­w)aE  Iterate over output chunks, auto-reconnecting on transient errors.

        Reconnect strategy:
        - 1001 Going Away (hot-reload): immediate reconnect, no delay
        - Other SandboxConnectionError:  exponential backoff (0.5s, 1s, 2s...)
        - After kill():                  no reconnect, error propagates
        r   Nr*   úutf-8é   ú"Failed to reattach to the command ú times in succession, giving upé   ©rî   rï   F)Útimer   r'  ræ   rç   ÚlenrA   Úencoderþ   rö   rÿ   r÷   r   rô   ÚkilledÚMAX_AUTO_RECONNECTSÚ
isinstancer   ÚminÚ_BACKOFF_BASEÚ_BACKOFF_MAXÚsleeprø   rõ   Ú	reconnectró   rý   )r0   r/  r&  ÚeÚis_hot_reloadÚdelayÚ
new_handles          r   Ú__iter__zCommandHandle.__iter__¥  s  è ø€ ó 	à#$ˆÔ Øð.(Ø!×.Ñ.Ö0�EØ/0�DÔ,Ø—|‘| xÒ/Ø38·<±<Ä#Ø!ŸJ™J×-Ñ-¨gÓ6óCñ 4˜Ô0ð  Ÿ?™?Ð6Ø ŸO™O¨E¯J©JÕ7à38·<±<Ä#Ø!ŸJ™J×-Ñ-¨gÓ6óCñ 4˜Ô0ð  Ÿ?™?Ð6Ø ŸO™O¨E¯J©JÔ7Ø“Kð 1ð øä)ó (Ø—=’= T§]¡]×%9Ò%9Øà×(Ò(¨AÑ-Õ(Ø×+Ñ+¨d×.FÑ.FÒFÜ0Ø<Ø×3Ñ3Ð4ð 5$ð%óð ð	ô !+¨1Ô.FÓ G�Ù$ÜØ×*Ñ*¨a°D×4LÑ4LÈqÑ4PÑ.QÑRØ×)Ñ)ó�Eð —J‘J˜uÔ%à×'Ñ'Ð3Ð3Ð3Ø!Ÿ]™]×4Ñ4Ø×$Ñ$Ø"&×":Ñ":Ø"&×":Ñ":ð 5ó �
ð
  *×1Ñ1�”Ø *× 3Ñ 3�”Ø"'�—‘ûð9(úñ' ùs0   ‚I�C*C; Ã:IÃ;
IÄD4H>È9IÈ>IÉIc                óR   — | j                   r| j                   j                  «        yy)a/  Send a kill signal to the running command (SIGKILL).

        The server kills the entire process group. The stream will
        subsequently yield an exit message with a non-zero exit code.

        Has no effect if the command has already exited or the
        WebSocket connection is closed.
        N©rô   Ú	send_killr/   s    r   ÚkillzCommandHandle.killá  s    € ð �=Š=Ø�M‰M×#Ñ#Õ%ð r   c                óT   — | j                   r| j                   j                  |«       yy)zÓWrite data to the command's stdin.

        Args:
            data: String data to write to stdin.

        Has no effect if the command has already exited or the
        WebSocket connection is closed.
        N©rô   Ú
send_input©r0   rA   s     r   rE  zCommandHandle.send_inputí  s"   € ð �=Š=Ø�M‰M×$Ñ$ TÕ*ð r   c                ó   — | j                   S ©z8Last known stdout byte offset (for manual reconnection).©rþ   r/   s    r   Úlast_stdout_offsetz CommandHandle.last_stdout_offsetù  ó   € ð ×'Ñ'Ð'r   c                ó   — | j                   S ©z8Last known stderr byte offset (for manual reconnection).©rÿ   r/   s    r   Úlast_stderr_offsetz CommandHandle.last_stderr_offsetþ  rK  r   c                ó–   — | j                   €J ‚| j                  j                  | j                   | j                  | j                  ¬«      S )aÛ  Reconnect to this command from the last known offsets.

        Returns a new handle that resumes output from where this one
        left off. Any output produced while disconnected is replayed
        from the server's ring buffer.

        Returns:
            A new CommandHandle.

        Raises:
            SandboxOperationError: If command_id is not found or
                session expired.
            SandboxConnectionError: If connection to sandbox fails.
        r.  ©rø   rõ   r9  rþ   rÿ   r/   s    r   r9  zCommandHandle.reconnect  sM   € ð ×ÑÐ+Ð+Ð+Ø�}‰}×&Ñ&Ø×ÑØ×2Ñ2Ø×2Ñ2ð 'ó 
ð 	
r   )r  zIterator[dict]r  zOptional[_WSStreamControl]r  r   r   r)   rî   r,   rï   r,   rð   úOptional[Callable[[str], Any]]rñ   rR  r3   rµ   r¶   ©r3   r:   ©r3   rM   ©r3   r(   )r3   zIterator[OutputChunk]©rA   r)   r3   rµ   ©r3   r,   )r3   ré   )r"   r#   r$   r%   r3  r6  r7  rg   r  r6   r   r  r  r'  r>  rB  rE  rJ  rO  r9  r&   r   r   ré   ré   
  s  „ ñ!ðF ÐØ€MØ€Lð ØØØ48Ø48ñ!$à&ð!$ð ,ð!$ð ð	!$ð ð!$ð ð!$ð ð!$ð 2ð!$ð 2ð!$ð 
ó!$óF)ð. ò ó ð ð òó ðð òó ðó Ró<:(óx
&ó
+ð ò(ó ð(ð ò(ó ð(ô
r   ré   c                  óÞ   — e Zd ZdZdZdZdZddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd	„Zdd
„Ze	dd„«       Z
e	dd„«       Ze	dd„«       Zdd„Zdd„Zdd„Zdd„Ze	dd„«       Ze	dd„«       Zdd„Zy)ÚAsyncCommandHandleue  Async handle to a running command with streaming output and auto-reconnect.

    Async iterable, yielding OutputChunk objects (stdout and stderr interleaved
    in arrival order). Access .result after iteration to get the full
    ExecutionResult.

    Auto-reconnect behavior:
    - Server hot-reload (1001 Going Away): reconnect immediately
    - Network error / unexpected close:    reconnect with exponential backoff
    - User called kill():                  do NOT reconnect (propagate error)

    Construction modes (controlled by ``command_id``):
    - **New execution** (``command_id=""``, the default): call
      ``await handle._ensure_started()`` after construction to read the
      server's ``"started"`` message and populate ``command_id`` / ``pid``.
    - **Reconnection** (``command_id`` set): skips the started-message
      read. A reconnect stream's ``"started"`` message is the server's
      acknowledgement that the reattachment landed, consumed while iterating to
      clear the reconnect budget â€” the only such signal for a command that
      emits no output.

    Example:
        handle = await sandbox.run("make build", timeout=600, wait=False)

        async for chunk in handle:    # auto-reconnects on transient errors
            print(chunk.data, end="")

        result = await handle.result
        print(f"Exit code: {result.exit_code}")
    rê   rë   rì   rT   r   Nrí   c               óø   — || _         || _        || _        || _        || _        d | _        d | _        d | _        g | _        g | _	        d| _
        || _        || _        d| _        |r|| _        d| _        y d| _        y )NFr   T)ró   rô   rõ   rö   r÷   rø   rù   rú   rû   rü   rý   rþ   rÿ   r   Ú_startedr  s	            r   rg   zAsyncCommandHandle.__init__>  s‡   € ð &ˆŒØˆŒØˆŒØ#ˆŒØ#ˆŒØ*.ˆÔØ#'ˆŒ	Ø26ˆŒØ(*ˆÔØ(*ˆÔØˆŒØ#0ˆÔ Ø#0ˆÔ Ø#$ˆÔ ñ
 Ø)ˆDÔØ ˆD�Mà!ˆD�Mr   c              ƒ  ór  K  — | j                   ry	 | j                  j                  «       ƒ d{  –—† }|j                  d«      dk7  r t        d|j                  d«      › d�d¬«      ‚|j                  d	«      | _        |j                  d
«      | _        d| _         y7 Œl# t        $ r t	        dd¬«      ‚w xY w­w)z:Read the 'started' message to populate command_id and pid.Nr  r  r	  r  r  r  r  r   r  T)	r[  ró   Ú	__anext__ÚStopAsyncIterationr!   r   r   rø   rù   r  s     r   Ú_ensure_startedz"AsyncCommandHandle._ensure_startedb  s³   è ø€ à�=Š=Øð	Ø"Ÿl™l×4Ñ4Ó6×6ˆIð �=‰=˜Ó  IÒ-Ü'Ø3°I·M±MÀ&Ó4IÐ3JÈ!ÐLØ#ôð ð %Ÿ=™=¨Ó6ˆÔØ—M‘M %Ó(ˆŒ	Øˆ�ð 7ùÜ!ò 	Ü+Ø?Ø#ôð ð	üs,   ‚B7‘B ®B¯B ³A(B7ÂB ÂB4Â4B7c                ó   — | j                   S )z@The server-assigned command ID. Available after _ensure_started.r  r/   s    r   r   zAsyncCommandHandle.command_idv  rÐ   r   c                ó   — | j                   S )z?The process ID on the sandbox. Available after _ensure_started.r  r/   s    r   r  zAsyncCommandHandle.pid{  r  r   c              ƒ  óŒ   K  — | j                   €| 2 3 d{  –—† }Œ
| j                   €t        dd¬«      ‚| j                   S 7 Œ*6 Œ)­w)z&The final execution result. Awaitable.Nr  r  r	  r  r  s     r   r  zAsyncCommandHandle.result€  sP   è ø€ ð �<‰<ÐÙ÷ �aØØ�<‰<ÐÜ'Ø;Ø#ôð ð �|‰|Ððø˜4ús%   ‚A‘A•A –A™'AÁ AÁAc           	    ó”  K  — | j                  «       ƒ d{  –—†  | j                  ry| j                  2 3 d{  –—† }|j                  d«      }|dk(  rt	        || j
                  «      sŒ6d| _        Œ>|dv rit        ||d   |j                  dd«      ¬«      }|d	k(  r| j                  j                  |d   «       n| j                  j                  |d   «       |­–— Œ«|d
k(  sŒ±t        dj                  | j                  «      dj                  | j                  «      |d   ¬«      | _        d| _         y7 �Œ 7 �Œ6 t        d«      ‚­wr   )r_  rý   ró   r   r   rø   r   rå   rû   r"  rü   r(   r#  rú   r   r$  s       r   Ú_aiter_streamz AsyncCommandHandle._aiter_stream�  s/  è ø€ à×"Ñ"Ó$×$Ð$Ø�?Š?ØØŸš÷ 	�#Ø—w‘w˜v“ˆHØ˜9Ò$Ü*¨3°×0@Ñ0@ÕAØ/0�DÕ,ØÐ1Ñ1Ü#Ø#Ø˜V™ØŸ7™7 8¨QÓ/ô�ð
 ˜xÒ'Ø×&Ñ&×-Ñ-¨c°&©kÕ:à×&Ñ&×-Ñ-¨c°&©kÔ:Ø”Ø˜VÓ#Ü.ØŸ7™7 4×#5Ñ#5Ó6ØŸ7™7 4×#5Ñ#5Ó6Ø! +Ñ.ô �”ð
 #'�”Ùð5 	%ùð	ù˜ô0 %Ð%PÓQÐQùs=   ‚E–D6—E´D<¸D9¹D<¼-EÁ*A:EÃ%AEÄ9D<Ä<Ec               óÊ  K  — ddl }d| _        	 	 | j                  «       2 3 d{  –—† }d| _        |j                  dk(  r^|j                  t        |j                  j                  d«      «      z   | _        | j                  �y| j                  |j                  «       n]|j                  t        |j                  j                  d«      «      z   | _
        | j                  �| j                  |j                  «       |­–— Œà7 ŒÛ6 y# t        $ �rP}| j                  r| j                  j                  r‚ | xj                  dz  c_        | j                  | j                  kD  rt        d| j                  › d�«      |‚t!        |t"        «      }|sMt%        | j&                  d| j                  dz
  z  z  | j(                  «      }|j+                  |«      ƒ d{  –—†7   | j,                  €J ‚| j.                  j1                  | j,                  | j                  | j                  ¬	«      ƒ d{  –—†7  }|j2                  | _        |j                  | _        d
| _        Y d}~nd}~ww xY w�ŒT­w)z6Async iterate with auto-reconnect on transient errors.r   Nr*   r)  r*  r+  r,  r-  r.  F)Úasyncior   rd  ræ   rç   r0  rA   r1  rþ   rö   rÿ   r÷   r   rô   r2  r3  r4  r   r5  r6  r7  r8  rø   rõ   r9  ró   rý   )r0   rf  r&  r:  r;  r<  r=  s          r   Ú	__aiter__zAsyncCommandHandle.__aiter__¬  s(  è ø€ ãà#$ˆÔ Øð.(Ø#'×#5Ñ#5Ô#7÷  ˜%Ø/0�DÔ,Ø—|‘| xÒ/Ø38·<±<Ä#Ø!ŸJ™J×-Ñ-¨gÓ6óCñ 4˜Ô0ð  Ÿ?™?Ð6Ø ŸO™O¨E¯J©JÕ7à38·<±<Ä#Ø!ŸJ™J×-Ñ-¨gÓ6óCñ 4˜Ô0ð  Ÿ?™?Ð6Ø ŸO™O¨E¯J©JÔ7Ø”Kð øÐ#7ð øä)ó (Ø—=’= T§]¡]×%9Ò%9Øà×(Ò(¨AÑ-Õ(Ø×+Ñ+¨d×.FÑ.FÒFÜ0Ø<Ø×3Ñ3Ð4ð 5$ð%óð ð	ô !+¨1Ô.FÓ G�Ù$ÜØ×*Ñ*¨a°D×4LÑ4LÈqÑ4PÑ.QÑRØ×)Ñ)ó�Eð "Ÿ-™-¨Ó.×.Ñ.à×'Ñ'Ð3Ð3Ð3Ø#'§=¡=×#:Ñ#:Ø×$Ñ$Ø"&×":Ñ":Ø"&×":Ñ":ð $;ó $÷ ð �
ð
  *×1Ñ1�”Ø *× 3Ñ 3�”Ø"'�—‘ûð9(úñ' ùsi   ‚I#�D  D¤D ¥D¨CD Ä DÄD ÄI#Ä
IÄCIÇGÇAIÈ%H(È&.IÉI#ÉIÉI#c              ƒ  ón   K  — | j                   r#| j                   j                  «       ƒ d{  –—†  yy7 Œ­w)z*Send a kill signal to the running command.Nr@  r/   s    r   rB  zAsyncCommandHandle.killâ  s+   è ø€ à�=Š=Ø—-‘-×)Ñ)Ó+×+Ñ+ð Ø+ús   ‚*5¬3­5c              ƒ  óp   K  — | j                   r$| j                   j                  |«      ƒ d{  –—†  yy7 Œ­w)z"Write data to the command's stdin.NrD  rF  s     r   rE  zAsyncCommandHandle.send_inputç  s-   è ø€ à�=Š=Ø—-‘-×*Ñ*¨4Ó0×0Ñ0ð Ø0ús   ‚+6­4®6c                ó   — | j                   S rH  rI  r/   s    r   rJ  z%AsyncCommandHandle.last_stdout_offsetì  rK  r   c                ó   — | j                   S rM  rN  r/   s    r   rO  z%AsyncCommandHandle.last_stderr_offsetñ  rK  r   c              ƒ  ó²   K  — | j                   €J ‚| j                  j                  | j                   | j                  | j                  ¬«      ƒ d{  –—† S 7 Œ­w)z6Reconnect to this command from the last known offsets.Nr.  rQ  r/   s    r   r9  zAsyncCommandHandle.reconnectö  sY   è ø€ à×ÑÐ+Ð+Ð+Ø—]‘]×,Ñ,Ø×ÑØ×2Ñ2Ø×2Ñ2ð -ó 
÷ 
ð 	
ð 
ús   ‚AAÁAÁA)r  zAsyncIterator[dict]r  zOptional[_AsyncWSStreamControl]r  r   r   r)   rî   r,   rï   r,   rð   rR  rñ   rR  r3   rµ   r¶   rS  rT  rU  )r3   zAsyncIterator[OutputChunk]rV  rW  )r3   rY  )r"   r#   r$   r%   r3  r6  r7  rg   r_  r6   r   r  r  rd  rg  rB  rE  rJ  rO  r9  r&   r   r   rY  rY    s  „ ñð> ÐØ€MØ€Lð ØØØ48Ø48ñ""à+ð""ð 1ð""ð ð	""ð ð""ð ð""ð ð""ð 2ð""ð 2ð""ð 
ó""óHð( ò ó ð ð òó ðð ò
ó ð
óRó>4(ól,ó
1ð
 ò(ó ð(ð ò(ó ð(ô
r   rY  )r   r‘   r   r:   r3   r4   )/r%   Ú
__future__r   ÚloggingÚcollections.abcr   r   r   r   Údataclassesr   r	   r
   Útypingr   r   r   r   r”   Úlangsmith.sandbox._exceptionsr   r   r   Ú langsmith.sandbox._async_sandboxr   Úlangsmith.sandbox._sandboxr   Úlangsmith.sandbox._ws_executer   r   Ú	getLoggerr"   r   r   r!   r(   r8   rF   r“   rs   rX   r½   ÚDownloadContentDispositionrá   rå   ré   rY  r&   r   r   Ú<module>rx     s3  ðÙ )å "ã ß HÓ HÝ !ß 'ß 8Ó 8ã ÷ñ ñ Ý=Ý2÷ð
 
ˆ×	Ñ	˜8Ó	$€óô(Ð 5ô ð ÷
#ð 
#ó ð
#ð ÷
ð 
ó ð
ð( ÷5
ð 5
ó ð5
ðx 3€ØÐ ÷L
ñ L
÷^\
ñ \
ðH %Ð%;Ñ<Ð Ø >ð ÷
ð 
ó ð
ðB ÷ð ó ð÷ M
ñ M
÷`c
ò c
r   