ó
    üÞ jÁ”  ã                  ó  • S r SSKJr  SSKrSSKJrJrJrJr  SSK	J
r
Jr  SSKJrJr  SSKJrJrJrJr  SSKJr  SS	KJrJrJr  \(       a  SS
KJr  SSKJr  SSKJrJr  \R@                  " \!5      r"S'S jr# " S S\5      r$\
 " S S5      5       r%\
 " S S5      5       r&\
 " S S5      5       r'\
 " S S5      5       r(Sr)Sr* " S S5      r+ " S S5      r,\S   r- \
 " S S 5      5       r.\
 " S! S"5      5       r/ " S# S$5      r0 " S% S&5      r1g)(z#Data models for the sandbox client.é    )ÚannotationsN)ÚAsyncIteratorÚ	AwaitableÚCallableÚIterator)Ú	dataclassÚfield)ÚdatetimeÚtimezone)ÚTYPE_CHECKINGÚAnyÚLiteralÚOptional)Úhttpx)ÚSandboxConnectionErrorÚSandboxOperationErrorÚSandboxServerReloadError)ÚAsyncSandbox)ÚSandbox)Ú_AsyncWSStreamControlÚ_WSStreamControlc                ó`   • U R                  S5      nX!:X  a  g[        R                  SUU5        g)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      ÚS/var/www/html/gaurav/venv/lib/python3.13/site-packages/langsmith/sandbox/_models.pyÚ_acknowledges_reconnectr       s5   € ð �G‰G�LÓ!€EØÓØÜ
‡N�NØPØØôð
 ó    c                  ó   • \ rS rSrSrSrg)Ú_StreamEndedBeforeStartedé1   a@  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__Ú__firstlineno__Ú__doc__Ú__static_attributes__r%   r!   r   r#   r#   1   s   † ôr!   r#   c                  óL   • \ rS rSr% SrS\S'   S\S'   S\S'   \SS j5       rS	rg
)ÚExecutionResulté;   z+Result of executing a command in a sandbox.ÚstrÚstdoutÚstderrÚintÚ	exit_codec                ó    • U R                   S:H  $ )z.Return True if the command exited with code 0.r   )r3   ©Úselfs    r   ÚsuccessÚExecutionResult.successC   s   € ð �~‰~ Ñ"Ð"r!   r%   N©ÚreturnÚbool)	r&   r'   r(   r)   r*   Ú__annotations__Úpropertyr7   r+   r%   r!   r   r-   r-   ;   s&   ‡ á5àƒKØƒKØƒNàó#ó ó#r!   r-   c                  óF   • \ rS rSr% SrS\S'   SrS\S'   \S
S j5       rS	r	g)ÚResourceStatuséI   zò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                óN   • U " UR                  SS5      UR                  S5      S9$ )z/Create a ResourceStatus from API response dict.rA   ÚprovisioningrC   )rA   rC   ©r   ©ÚclsÚdatas     r   Ú	from_dictÚResourceStatus.from_dictU   s,   € ñ Ø—8‘8˜H nÓ5ØŸ8™8Ð$4Ó5ñ
ð 	
r!   r%   )rI   údict[str, Any]r:   r?   )
r&   r'   r(   r)   r*   r<   rC   ÚclassmethodrJ   r+   r%   r!   r   r?   r?   I   s*   ‡ ñð ƒKØ$(€N�MÓ(àó
ó ó
r!   r?   c                  óê   • \ rS rSr% SrS\S'   S\S'   S\S'   S\S'   S	rS
\S'   S	rS
\S'   S	rS
\S'   S	r	S
\S'   S	r
S\S'   S	rS
\S'   S	rS
\S'   S	rS
\S'   S	rS
\S'   \" \S9rS\S'   \SS j5       rSrg	)ÚSnapshoté^   uë  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.
    tags: Tags currently resolving to this snapshot, under its name. Empty
        means the snapshot is dangling â€” reachable only by id.
r/   ÚidÚnamerA   r2   Úfs_capacity_bytesNrB   Údocker_imageÚimage_digestÚsource_sandbox_idrC   úOptional[int]Úfs_used_bytesÚ
created_byÚregistry_idÚ
created_atÚ
updated_at)Údefault_factoryz	list[str]Útagsc                óø  • U " UR                  SS5      UR                  SS5      UR                  SS5      UR                  SS5      UR                  S5      UR                  S	5      UR                  S
5      UR                  S5      UR                  S5      UR                  S5      UR                  S5      UR                  S5      UR                  S5      [        UR                  S5      =(       d    / 5      S9$ )z)Create a Snapshot from API response dict.rQ   Ú rR   rA   ÚbuildingrS   r   rT   rU   rV   rC   rX   rY   rZ   r[   r\   r^   )rQ   rR   rA   rS   rT   rU   rV   rC   rX   rY   rZ   r[   r\   r^   )r   ÚlistrG   s     r   rJ   Ú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 Ó-Ü�d—h‘h˜vÓ&×,¨"Ó-ñ
ð 	
r!   r%   )rI   rL   r:   rO   )r&   r'   r(   r)   r*   r<   rT   rU   rV   rC   rX   rY   rZ   r[   r\   r	   rb   r^   rM   rJ   r+   r%   r!   r   rO   rO   ^   sš   ‡ ñð. 	ƒGØ
ƒIØƒKØÓØ"&€L�-Ó&Ø"&€L�-Ó&Ø'+Ð�}Ó+Ø$(€N�MÓ(Ø#'€M�=Ó'Ø $€J�Ó$Ø!%€K�Ó%Ø $€J�Ó$Ø $€J�Ó$á¨DÑ1€Dˆ)Ó1àó
ó ó
r!   rO   c                  óB   • \ rS rSr% SrS\S'   S\S'   \S	S j5       rSrg)
ÚSnapshotTagéœ   z¡One tag published under a snapshot name, and the snapshot it resolves to.

Attributes:
    tag: Tag name.
    snapshot_id: Snapshot the tag currently points at.
r/   ÚtagÚsnapshot_idc                óP   • U " UR                  SS5      UR                  SS5      S9$ )z/Create a SnapshotTag from an API response dict.rg   r`   rh   )rg   rh   rF   rG   s     r   rJ   ÚSnapshotTag.from_dict¨   s(   € ñ �t—x‘x  rÓ*¸¿¹ÀÐPRÓ8SÑTÐTr!   r%   N)rI   rL   r:   re   )	r&   r'   r(   r)   r*   r<   rM   rJ   r+   r%   r!   r   re   re   œ   s(   ‡ ñð 
ƒHØÓàóUó óUr!   re   z!X-Langsmith-Sandbox-Service-Tokené   c                  ó(  • \ rS rSrSrSS.           SS jjrSS jrSS jr\SS j5       r	\SS	 j5       r
\SS
 j5       r\SS j5       rSSS jjrSSS jjrSSS jjrSSS jjrSSS jjrSSS jjr\SS.     SS jj5       rSS jrSrg)Ú
ServiceURLé¶   aF  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               ó@   • Xl         X l        X0l        X@l        XPl        g ©N©Ú_browser_urlÚ_service_urlÚ_tokenÚ_expires_atrp   ©r6   Úbrowser_urlÚservice_urlÚtokenÚ
expires_atrp   s         r   Ú__init__ÚServiceURL.__init__É   ó    € ð (ÔØ'ÔØŒØ%ÔØ$�r!   c                óR  • U R                   c  gU R                  R                  SS5      n[        R                  " U5      nUR
                  c  UR                  [        R                  S9nU[        R                  " [        R                  5      -
  R                  5       nU[        :*  $ ©NFÚZz+00:00)Útzinfo©rp   rw   Úreplacer
   Úfromisoformatrƒ   r   ÚutcÚnowÚtotal_secondsÚ_REFRESH_MARGIN_SECONDS©r6   ÚrawÚexpiresÚ	remainings       r   Ú_should_refreshÚServiceURL._should_refreshÚ   ó�   € Ø�?‰?Ñ"ØØ×Ñ×&Ñ& s¨HÓ5ˆÜ×(Ò(¨Ó-ˆØ�>‰>Ñ!Ø—o‘o¬X¯\©\�oÐ:ˆGØœxŸ|š|¬H¯L©LÓ9Ñ9×HÑHÓJˆ	ØÔ3Ñ3Ð3r!   c                óØ   • U R                  5       (       aU  U R                  5       nUR                  U l        UR                  U l        UR                  U l        UR
                  U l        g g rr   ©r�   rp   rt   ru   rv   rw   ©r6   Úfreshs     r   Ú_maybe_refreshÚServiceURL._maybe_refreshä   sW   € Ø×Ñ×!Ñ!Ø—O‘OÓ%ˆEØ %× 2Ñ 2ˆDÔØ %× 2Ñ 2ˆDÔØŸ,™,ˆDŒKØ$×0Ñ0ˆDÕð "r!   c                ó:   • U R                  5         U R                  $ )ú.Return the raw JWT, refreshing if near expiry.©r–   rv   r5   s    r   r{   ÚServiceURL.tokenî   s   € ð 	×ÑÔØ�{‰{Ðr!   c                ó:   • U R                  5         U R                  $ )ú/Return the base URL, refreshing if near expiry.©r–   ru   r5   s    r   rz   ÚServiceURL.service_urlô   ó   € ð 	×ÑÔØ× Ñ Ð r!   c                ó:   • U R                  5         U R                  $ )ú7Return the browser auth URL, refreshing if near expiry.©r–   rt   r5   s    r   ry   ÚServiceURL.browser_urlú   r    r!   c                ó:   • U R                  5         U R                  $ )ú:Return the ISO 8601 expiration, refreshing if near expiry.©r–   rw   r5   s    r   r|   ÚServiceURL.expires_at   s   € ð 	×ÑÔØ×ÑÐr!   c                ó  • U R                   R                  S5      S-   UR                  S5      -   n[        UR	                  SS5      =(       d    0 5      nU R
                  U[        '   [        R                  " X4SU0UD6$ )zê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)	rz   ÚrstripÚlstripÚdictÚpopr{   Ú_AUTH_HEADERr   Úrequest)r6   ÚmethodÚpathÚkwargsÚurlr«   s         r   r±   ÚServiceURL.request  sn   € ð ×Ñ×%Ñ% cÓ*¨SÑ0°4·;±;¸sÓ3CÑCˆÜ�v—z‘z )¨TÓ2×8°bÓ9ˆØ $§
¡
ˆ”ÑÜ�}Š}˜VÑD°'ÐD¸VÑDÐDr!   c                ó*   • U R                   " SU40 UD6$ )zHTTP GET to the service.ÚGET©r±   ©r6   r³   r´   s      r   r   ÚServiceURL.get  ó   € à�|Š|˜E 4Ñ2¨6Ñ2Ð2r!   c                ó*   • U R                   " SU40 UD6$ )zHTTP POST to the service.ÚPOSTr¹   rº   s      r   ÚpostÚServiceURL.post  s   € à�|Š|˜F DÑ3¨FÑ3Ð3r!   c                ó*   • U R                   " SU40 UD6$ )zHTTP PUT to the service.ÚPUTr¹   rº   s      r   ÚputÚServiceURL.put   r¼   r!   c                ó*   • U R                   " SU40 UD6$ )zHTTP PATCH to the service.ÚPATCHr¹   rº   s      r   ÚpatchÚServiceURL.patch$  s   € à�|Š|˜G TÑ4¨VÑ4Ð4r!   c                ó*   • U R                   " SU40 UD6$ )zHTTP DELETE to the service.ÚDELETEr¹   rº   s      r   ÚdeleteÚServiceURL.delete(  s   € à�|Š|˜H dÑ5¨fÑ5Ð5r!   c               ó.   • U " US   US   US   US   US9$ )z+Create a ServiceURL from API response dict.ry   rz   r{   r|   ©ry   rz   r{   r|   rp   r%   ©rH   rI   rp   s      r   rJ   ÚServiceURL.from_dict.  ó3   € ñ Ø˜]Ñ+Ø˜]Ñ+Ø�w‘-Ø˜LÑ)Ø!ñ
ð 	
r!   c                ó@   • SU R                   < SU R                  < S3$ )NzServiceURL(service_url=ú, expires_at=Ú)©ru   rw   r5   s    r   Ú__repr__ÚServiceURL.__repr__>  s-   € à% d×&7Ñ&7Ñ%:ð ;Ø×*Ñ*Ñ-¨Qð0ð	
r!   ©rt   rw   rp   ru   rv   )ry   r/   rz   r/   r{   r/   r|   r/   rp   ú"Optional[Callable[[], ServiceURL]]r:   ÚNoner9   ©r:   rÚ   ©r:   r/   ©rª   ©r²   r/   r³   r/   r´   r   r:   úhttpx.Response©r³   r/   r´   r   r:   rß   )rI   rL   rp   rÙ   r:   rm   )r&   r'   r(   r)   r*   r}   r�   r–   r=   r{   rz   ry   r|   r±   r   r¿   rÃ   rÇ   rË   rM   rJ   rÖ   r+   r%   r!   r   rm   rm   ¶   sþ   † ñð2 :>ñ%àð%ð ð%ð ð	%ð
 ð%ð 7ð%ð 
õ%ô"4ô1ð óó ðð
 ó!ó ð!ð
 ó!ó ð!ð
 ó ó ð öEö 3ö4ö3ö5ö6ð ð
 :>ñ	
àð
ð 7ð	
ð
 
ô
ó ð
÷
r!   rm   c                  ó`  • \ rS rSrSrSS.           SS jjrSS jrSS jrSS jrSS	 jr	SS
 jr
SS jr\SS j5       r\SS j5       r\SS j5       r\SS j5       r S       SS jjrSSS jjrSSS jjrSSS jjrSSS jjrSSS jjr\SS.     S S jj5       rSS jrSrg)!ÚAsyncServiceURLiE  a6  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())
Nro   c               ó@   • Xl         X l        X0l        X@l        XPl        g rr   rs   rx   s         r   r}   ÚAsyncServiceURL.__init__S  r   r!   c                óR  • U R                   c  gU R                  R                  SS5      n[        R                  " U5      nUR
                  c  UR                  [        R                  S9nU[        R                  " [        R                  5      -
  R                  5       nU[        :*  $ r�   r„   r‹   s       r   r�   ÚAsyncServiceURL._should_refreshd  r‘   r!   c              ƒ  óô   #   • U R                  5       (       a]  U R                  5       I S h  v•N nUR                  U l        UR                  U l        UR                  U l        UR
                  U l        g g  NJ7frr   r“   r”   s     r   r–   ÚAsyncServiceURL._maybe_refreshn  s`   é € Ø×Ñ×!Ñ!ØŸ/™/Ó+×+ˆEØ %× 2Ñ 2ˆDÔØ %× 2Ñ 2ˆDÔØŸ,™,ˆDŒKØ$×0Ñ0ˆDÕð "Ù+ùs   ‚)A8«A6¬AA8c              ƒ  óV   #   • U R                  5       I Sh  v•N   U R                  $  N7f)r™   Nrš   r5   s    r   Ú	get_tokenÚAsyncServiceURL.get_tokenx  s&   é € à×!Ñ!Ó#×#Ð#Ø�{‰{Ðñ 	$ùó   ‚)–'—)c              ƒ  óV   #   • U R                  5       I Sh  v•N   U R                  $  N7f)r�   Nrž   r5   s    r   Úget_service_urlÚAsyncServiceURL.get_service_url}  ó(   é € à×!Ñ!Ó#×#Ð#Ø× Ñ Ð ñ 	$ùrì   c              ƒ  óV   #   • U R                  5       I Sh  v•N   U R                  $  N7f)r¢   Nr£   r5   s    r   Úget_browser_urlÚAsyncServiceURL.get_browser_url‚  rð   rì   c              ƒ  óV   #   • U R                  5       I Sh  v•N   U R                  $  N7f)r¦   Nr§   r5   s    r   Úget_expires_atÚAsyncServiceURL.get_expires_at‡  s(   é € à×!Ñ!Ó#×#Ð#Ø×ÑÐñ 	$ùrì   c                ó   • U R                   $ )z&Return the raw JWT without refreshing.)rv   r5   s    r   r{   ÚAsyncServiceURL.tokenŽ  s   € ð �{‰{Ðr!   c                ó   • U R                   $ )z'Return the base URL without refreshing.)ru   r5   s    r   rz   ÚAsyncServiceURL.service_url“  ó   € ð × Ñ Ð r!   c                ó   • U R                   $ )z/Return the browser auth URL without refreshing.)rt   r5   s    r   ry   ÚAsyncServiceURL.browser_url˜  rû   r!   c                ó   • U R                   $ )z3Return the expiration timestamp without refreshing.)rw   r5   s    r   r|   ÚAsyncServiceURL.expires_at�  ó   € ð ×ÑÐr!   c              ‹  óè  #   • U R                  5       I Sh  v•N R                  S5      S-   UR                  S5      -   n[        UR	                  SS5      =(       d    0 5      nU R                  5       I Sh  v•N U[        '   [        R                  " 5        ISh  v•N nUR                  " X4SU0UD6I Sh  v•N sSSS5      ISh  v•N   $  N· NY N6 N N! , ISh  v•N  (       d  f       g= f7f)zü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±   )r6   r²   r³   r´   rµ   r«   Úclients          r   r±   Ú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|   ‚C2–C—AC2Á6CÁ7$C2ÂCÂC2ÂCÂ8CÂ9CÂ<C2ÃCÃ	C2ÃC2ÃC2ÃCÃC2ÃC/ÃC!ÃC/Ã+C2c              ‹  óF   #   • U R                   " SU40 UD6I Sh  v•N $  N7f)zAsync HTTP GET to the service.r¸   Nr¹   rº   s      r   r   ÚAsyncServiceURL.get·  ó!   é € à—\’\ %¨Ñ8°Ñ8×8Ð8Ñ8ùó   ‚!š›!c              ‹  óF   #   • U R                   " SU40 UD6I Sh  v•N $  N7f)zAsync HTTP POST to the service.r¾   Nr¹   rº   s      r   r¿   ÚAsyncServiceURL.post»  s!   é € à—\’\ &¨$Ñ9°&Ñ9×9Ð9Ñ9ùr  c              ‹  óF   #   • U R                   " SU40 UD6I Sh  v•N $  N7f)zAsync HTTP PUT to the service.rÂ   Nr¹   rº   s      r   rÃ   ÚAsyncServiceURL.put¿  r  r  c              ‹  óF   #   • U R                   " SU40 UD6I Sh  v•N $  N7f)z Async HTTP PATCH to the service.rÆ   Nr¹   rº   s      r   rÇ   ÚAsyncServiceURL.patchÃ  s!   é € à—\’\ '¨4Ñ:°6Ñ:×:Ð:Ñ:ùr  c              ‹  óF   #   • U R                   " SU40 UD6I Sh  v•N $  N7f)z!Async HTTP DELETE to the service.rÊ   Nr¹   rº   s      r   rË   ÚAsyncServiceURL.deleteÇ  s!   é € à—\’\ (¨DÑ;°FÑ;×;Ð;Ñ;ùr  c               ó.   • U " US   US   US   US   US9$ )z1Create an AsyncServiceURL from API response dict.ry   rz   r{   r|   rÎ   r%   rÏ   s      r   rJ   ÚAsyncServiceURL.from_dictÍ  rÑ   r!   c                ó@   • SU R                   < SU R                  < S3$ )NzAsyncServiceURL(service_url=rÓ   rÔ   rÕ   r5   s    r   rÖ   ÚAsyncServiceURL.__repr__Ý  s.   € à*¨4×+<Ñ+<Ñ*?ð @Ø×*Ñ*Ñ-¨Qð0ð	
r!   rØ   )ry   r/   rz   r/   r{   r/   r|   r/   rp   ú2Optional[Callable[[], Awaitable[AsyncServiceURL]]]r:   rÚ   r9   rÛ   rÜ   rÝ   rÞ   rà   )rI   rL   rp   r  r:   râ   )r&   r'   r(   r)   r*   r}   r�   r–   rê   rî   rò   rõ   r=   r{   rz   ry   r|   r±   r   r¿   rÃ   rÇ   rË   rM   rJ   rÖ   r+   r%   r!   r   râ   râ   E  sA  † ñð( JNñ%àð%ð ð%ð ð	%ð
 ð%ð Gð%ð 
õ%ô"4ô1ôô
!ô
!ô
 ð óó ðð ó!ó ð!ð ó!ó ð!ð ó ó ð ð (+ðPØðPØ!$ðPØ69ðPà	õPö&9ö:ö9ö;ö<ð ð
 JNñ	
àð
ð Gð	
ð
 
ô
ó ð
÷
r!   râ   )Ú
attachmentÚinlinec                  óP   • \ rS rSr% SrS\S'   S\S'   SrS\S'   \SS	 j5       rS
r	g)ÚDownloadURLií  a  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_urlr{   NrB   r|   c                óp   • U " UR                  SS5      UR                  SS5      UR                  S5      S9$ )z,Create a DownloadURL from API response dict.r  r`   r{   r|   )r  r{   r|   rF   rG   s     r   rJ   ÚDownloadURL.from_dict   s9   € ñ ØŸ™ .°"Ó5Ø—(‘(˜7 BÓ'Ø—x‘x Ó-ñ
ð 	
r!   r%   )rI   rL   r:   r  )
r&   r'   r(   r)   r*   r<   r|   rM   rJ   r+   r%   r!   r   r  r  í  s0   ‡ ñð ÓØƒJØ $€J�Ó$àó
ó ó
r!   r  c                  ó8   • \ rS rSr% SrS\S'   S\S'   S\S'   Srg	)
ÚOutputChunki  aJ  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/   ÚstreamrI   r2   Úoffsetr%   N)r&   r'   r(   r)   r*   r<   r+   r%   r!   r   r  r    s   ‡ ñð ƒKØ
ƒIØ†Kr!   r  c                  ó   • \ rS rSrSrSrSrSrSSSSSS	.                 SS
 jjrSS jr	\
SS j5       r\
SS j5       r\
SS j5       rSS jrSS jrSS jrSS jr\
SS j5       r\
SS j5       rSS jrSrg) ÚCommandHandlei   u¤  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}")
é   ç      à?ç       @r`   r   N©r   Ústdout_offsetÚstderr_offsetÚ	on_stdoutÚ	on_stderrc               óö   • Xl         X l        X0l        Xpl        X€l        S U l        S U l        S U l        / U l        / U l	        SU l
        XPl        X`l        SU l        U(       a  X@l        g U R                  5         g )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©	r6   Úmessage_streamÚcontrolÚsandboxr   r'  r(  r)  r*  s	            r   r}   ÚCommandHandle.__init__H  su   € ð &ŒØŒØŒØ#ŒØ#ŒØ*.ˆÔØ#'ˆŒ	Ø26ˆŒØ(*ˆÔØ(*ˆÔØˆŒØ#0Ô Ø#0Ô Ø#$ˆÔ ö
 Ø)Õà×!Ñ!Õ#r!   c                ó  •  [        U R                  5      nUR	                  S5      S:w  a  [        SUR	                  S5       S3SS9eUR	                  S5      U l        UR	                  S	5      U l        g
! [         a    [        SSS9ef = f)a   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   r1  r2  ©r6   Ú	first_msgs     r   r:  ÚCommandHandle._consume_startedk  s•   € ð	Ü˜TŸ\™\Ó*ˆIð �=‰=˜Ó  IÓ-Ü'Ø3°I·M±MÀ&Ó4IÐ3JÈ!ÐLØ#ñð ð %Ÿ=™=¨Ó6ˆÔØ—M‘M %Ó(ˆ�	øô ó 	Ü+Ø?Ø#ñð ð	ús   ‚A6 Á6Bc                ó   • U R                   $ )z=The server-assigned command ID. Available after construction.©r1  r5   s    r   r   ÚCommandHandle.command_id‚  r   r!   c                ó   • U R                   $ )z<The process ID on the sandbox. Available after construction.©r2  r5   s    r   rI  ÚCommandHandle.pid‡  ó   € ð �y‰yÐr!   c                ót   • U R                   c	  U  H  nM     U R                   c
  [        SSS9eU R                   $ )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 messagerB  rC  ©r3  r   ©r6   Ú_s     r   ÚresultÚCommandHandle.resultŒ  sD   € ð �<‰<ÑÛ�Ùñ à�<‰<ÑÜ'Ø;Ø#ñð ð �|‰|Ðr!   c           	   #  óf  #   • U R                   (       a  gU R                   GH   nUR                  S5      nUS:X  a%  [        XR                  5      (       a	  SU l        M>  M@  US;   ag  [        UUS   UR                  SS5      S9nUS	:X  a  U R                  R                  US   5        OU R                  R                  US   5        Uv •  M­  US
:X  d  Mµ  [        SR                  U R                  5      SR                  U R                  5      US   S9U l        SU l           g   [        S5      e7f©zBIterate over output chunks from the current stream (no reconnect).NrE  rF  r   )r0   r1   rI   r   )r  rI   r   r0   Úexitr`   r3   )r0   r1   r3   TrW  )r6  r,  r   r    r1  r9  r  r4  Úappendr5  r-   Újoinr3  r   ©r6   r   Úmsg_typeÚchunks       r   Ú_iter_streamÚCommandHandle._iter_stream�  s  é € à�?�?ØØ—<•<ˆCØ—w‘w˜v“ˆHØ˜9Ó$Ü*¨3×0@Ñ0@×AÑAØ/0�DÖ,ñ BàÐ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   ‚CD1ÃAD1c              #  ó¾  #   • SSK nSU l          U R                  5        HÛ  nSU l        UR                  S:X  a_  UR                  [        UR                  R                  S5      5      -   U l        U R                  b  U R                  UR                  5        O^UR                  [        UR                  R                  S5      5      -   U l
        U R                  b  U R                  UR                  5        Uv •  MÝ     g! [         GaL  nU R                  (       a  U R                  R                  (       a  e U =R                  S-  sl        U R                  U R                  :”  a  [        SU R                   S35      Ue[!        U["        5      nU(       dD  [%        U R&                  SU R                  S-
  -  -  U R(                  5      nUR+                  U5        U R,                  c   eU R.                  R1                  U R,                  U R                  U R                  S	9nUR2                  U l        UR                  U l        S
U l         SnAOSnAff = fGMN  7f)a  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   Nr0   úutf-8é   ú"Failed to reattach to the command ú times in succession, giving upé   ©r'  r(  F)Útimer9  re  r  r   ÚlenrI   Úencoder7  r/  r8  r0  r   r-  ÚkilledÚMAX_AUTO_RECONNECTSÚ
isinstancer   ÚminÚ_BACKOFF_BASEÚ_BACKOFF_MAXÚsleepr1  r.  Ú	reconnectr,  r6  )r6   rn  rd  ÚeÚis_hot_reloadÚdelayÚ
new_handles          r   Ú__iter__Ú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/D  Ã?IÄ IÄEIÉIÉIÉIc                ó\   • U R                   (       a  U R                   R                  5         gg)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_killr5   s    r   ÚkillÚCommandHandle.kill÷  s    € ð �=�=Ø�M‰M×#Ñ#Õ%ð r!   c                ó^   • U R                   (       a  U R                   R                  U5        gg)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©r6   rI   s     r   r†  ÚCommandHandle.send_input  s"   € ð �=�=Ø�M‰M×$Ñ$ TÕ*ð r!   c                ó   • U R                   $ ©z8Last known stdout byte offset (for manual reconnection).©r7  r5   s    r   Úlast_stdout_offsetÚ CommandHandle.last_stdout_offset  ó   € ð ×'Ñ'Ð'r!   c                ó   • U R                   $ ©z8Last known stderr byte offset (for manual reconnection).©r8  r5   s    r   Úlast_stderr_offsetÚ CommandHandle.last_stderr_offset  rŽ  r!   c                ó’   • U R                   c   eU R                  R                  U R                   U R                  U R                  S9$ )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.
rm  ©r1  r.  rx  r7  r8  r5   s    r   rx  ÚCommandHandle.reconnect  sM   € ð ×ÑÑ+Ð+Ð+Ø�}‰}×&Ñ&Ø×ÑØ×2Ñ2Ø×2Ñ2ð 'ð 
ð 	
r!   )r1  r-  r6  r8  r7  r0  r/  r2  r9  r3  r.  r5  r4  r,  )r<  zIterator[dict]r=  zOptional[_WSStreamControl]r>  r   r   r/   r'  r2   r(  r2   r)  úOptional[Callable[[str], Any]]r*  r—  r:   rÚ   rÛ   ©r:   rB   ©r:   rW   ©r:   r-   )r:   zIterator[OutputChunk]©rI   r/   r:   rÚ   ©r:   r2   )r:   r"  )r&   r'   r(   r)   r*   rr  ru  rv  r}   r:  r=   r   rI  r[  re  r}  r‚  r†  rŒ  r’  rx  r+   r%   r!   r   r"  r"     s  † ñ!ðF ÐØ€MØ€Lð ØØØ48Ø48ñ!$à&ð!$ð ,ð!$ð ð	!$ð ð!$ð ð!$ð ð!$ð 2ð!$ð 2ð!$ð 
õ!$ôF)ð. ó ó ð ð óó ðð óó ðô Rô<:(ôx
&ô
+ð ó(ó ð(ð ó(ó ð(÷
r!   r"  c                  ó   • \ rS rSrSrSrSrSrSSSSSS	.                 SS
 jjrSS jr	\
SS j5       r\
SS j5       r\
SS j5       rSS jrSS jrSS jrSS jr\
SS j5       r\
SS j5       rSS jrSrg) ÚAsyncCommandHandlei0  u	  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%  r`   r   Nr&  c               óò   • Xl         X l        X0l        Xpl        X€l        S U l        S U l        S U l        / U l        / U l	        SU l
        XPl        X`l        SU l        U(       a  X@l        SU l        g SU l        g )NFr   T)r,  r-  r.  r/  r0  r1  r2  r3  r4  r5  r6  r7  r8  r9  Ú_startedr;  s	            r   r}   ÚAsyncCommandHandle.__init__T  sw   € ð &ŒØŒØŒØ#ŒØ#ŒØ*.ˆÔØ#'ˆŒ	Ø26ˆŒØ(*ˆÔØ(*ˆÔØˆŒØ#0Ô Ø#0Ô Ø#$ˆÔ ö
 Ø)ÔØ ˆD�Mà!ˆD�Mr!   c              ƒ  ót  #   • U R                   (       a  g U R                  R                  5       I Sh  v•N nUR                  S5      S:w  a  [        SUR                  S5       S3SS9eUR                  S	5      U l        UR                  S
5      U l        SU l         g Nj! [         a    [	        SSS9ef = f7f)z:Read the 'started' message to populate command_id and pid.NrA  rB  rC  rE  rF  rG  rH  r   rI  T)	r   r,  Ú	__anext__ÚStopAsyncIterationr#   r   r   r1  r2  rL  s     r   Ú_ensure_startedÚ"AsyncCommandHandle._ensure_startedx  s²   é € à�=�=Øð	Ø"Ÿl™l×4Ñ4Ó6×6ˆIð �=‰=˜Ó  IÓ-Ü'Ø3°I·M±MÀ&Ó4IÐ3JÈ!ÐLØ#ñð ð %Ÿ=™=¨Ó6ˆÔØ—M‘M %Ó(ˆŒ	Øˆ�ñ 7øÜ!ó 	Ü+Ø?Ø#ñð ð	üs,   ‚B8–B  ³B´B  ¸A&B8ÂB  Â B5Â5B8c                ó   • U R                   $ )z@The server-assigned command ID. Available after _ensure_started.rP  r5   s    r   r   ÚAsyncCommandHandle.command_idŒ  r   r!   c                ó   • U R                   $ )z?The process ID on the sandbox. Available after _ensure_started.rS  r5   s    r   rI  ÚAsyncCommandHandle.pid‘  rU  r!   c              ƒ  óŒ   #   • U R                   c  U   Sh  v•N nM  U R                   c
  [        SSS9eU R                   $  N)
 N'7f)z&The final execution result. Awaitable.NrW  rB  rC  rX  rY  s     r   r[  ÚAsyncCommandHandle.result–  sN   é € ð �<‰<ÑÙ÷ �aÙØ�<‰<ÑÜ'Ø;Ø#ñð ð �|‰|Ðñ™4ùs%   ‚A’A–A —Aš&AÁ AÁAc           	    ó¬  #   • U R                  5       I Sh  v•N   U R                  (       a  gU R                    Sh  v•N nUR                  S5      nUS:X  a%  [	        XR
                  5      (       a	  SU l        MC  ME  US;   ah  [        UUS   UR                  SS5      S9nUS	:X  a  U R                  R                  US   5        OU R                  R                  US   5        U7v •  M³  US
:X  d  M»  [        SR                  U R                  5      SR                  U R                  5      US   S9U l        SU l          g GN, GN
 [        S5      e7fr^  )r¥  r6  r,  r   r    r1  r9  r  r4  r`  r5  r-   ra  r3  r   rb  s       r   Ú_aiter_streamÚ AsyncCommandHandle._aiter_stream£  s3  é € à×"Ñ"Ó$×$Ð$Ø�?�?ØØŸš÷ 	�#Ø—w‘w˜v“ˆHØ˜9Ó$Ü*¨3×0@Ñ0@×AÑAØ/0�DÖ,ñ BàÐ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ùs8   ‚E–E—"E¹E½E¾EÁB/EÃ4AEÅEÅEc               óò  #   • SSK nSU l          U R                  5         Sh  v•N nSU l        UR                  S:X  a_  UR                  [        UR                  R                  S5      5      -   U l        U R                  b  U R                  UR                  5        O^UR                  [        UR                  R                  S5      5      -   U l
        U R                  b  U R                  UR                  5        U7v •  Mä   Nß
 g! [         Ga^  nU R                  (       a  U R                  R                  (       a  e U =R                  S-  sl        U R                  U R                  :”  a  [        SU R                   S35      Ue[!        U["        5      nU(       dM  [%        U R&                  SU R                  S-
  -  -  U R(                  5      nUR+                  U5      I Sh  v•N    U R,                  c   eU R.                  R1                  U R,                  U R                  U R                  S	9I Sh  v•N  nUR2                  U l        UR                  U l        S
U l         SnAOSnAff = fGMh  7f)z6Async iterate with auto-reconnect on transient errors.r   Nr0   rh  ri  rj  rk  rl  rm  F)Úasyncior9  r®  r  r   ro  rI   rp  r7  r/  r8  r0  r   r-  rq  rr  rs  r   rt  ru  rv  rw  r1  r.  rx  r,  r6  )r6   r±  rd  ry  rz  r{  r|  s          r   Ú	__aiter__Ú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   ‚I7�D  D¤D¥D¨CD ÄDÄD ÄI7ÄI1ÄCI,Ç'G*Ç(AI,È8H;È9.I,É'I7É,I1É1I7c              ƒ  óx   #   • U R                   (       a#  U R                   R                  5       I Sh  v•N   gg N7f)z*Send a kill signal to the running command.Nr€  r5   s    r   r‚  ÚAsyncCommandHandle.killø  s*   é € à�=�=Ø—-‘-×)Ñ)Ó+×+Ñ+ð Ù+ùs   ‚/:±8²:c              ƒ  óz   #   • U R                   (       a$  U R                   R                  U5      I Sh  v•N   gg N7f)z"Write data to the command's stdin.Nr…  r‡  s     r   r†  ÚAsyncCommandHandle.send_inputý  s,   é € à�=�=Ø—-‘-×*Ñ*¨4Ó0×0Ñ0ð Ù0ùs   ‚0;²9³;c                ó   • U R                   $ rŠ  r‹  r5   s    r   rŒ  Ú%AsyncCommandHandle.last_stdout_offset  rŽ  r!   c                ó   • U R                   $ r�  r‘  r5   s    r   r’  Ú%AsyncCommandHandle.last_stderr_offset  rŽ  r!   c              ƒ  ó®   #   • U R                   c   eU R                  R                  U R                   U R                  U R                  S9I Sh  v•N $  N7f)z6Reconnect to this command from the last known offsets.Nrm  r•  r5   s    r   rx  ÚAsyncCommandHandle.reconnect  sX   é € à×ÑÑ+Ð+Ð+Ø—]‘]×,Ñ,Ø×ÑØ×2Ñ2Ø×2Ñ2ð -ð 
÷ 
ð 	
ñ 
ùs   ‚AAÁAÁA)r1  r-  r6  r8  r7  r0  r/  r2  r9  r3  r.  r   r5  r4  r,  )r<  zAsyncIterator[dict]r=  zOptional[_AsyncWSStreamControl]r>  r   r   r/   r'  r2   r(  r2   r)  r—  r*  r—  r:   rÚ   rÛ   r˜  r™  rš  )r:   zAsyncIterator[OutputChunk]r›  rœ  )r:   rž  )r&   r'   r(   r)   r*   rr  ru  rv  r}   r¥  r=   r   rI  r[  r®  r²  r‚  r†  rŒ  r’  rx  r+   r%   r!   r   rž  rž  0  s  † ñð> ÐØ€MØ€Lð ØØØ48Ø48ñ""à+ð""ð 1ð""ð ð	""ð ð""ð ð""ð ð""ð 2ð""ð 2ð""ð 
õ""ôHð( ó ó ð ð óó ðð ó
ó ð
ôRô>4(ôl,ô
1ð
 ó(ó ð(ð ó(ó ð(÷
r!   rž  )r   r®   r   rB   r:   r;   )2r*   Ú
__future__r   ÚloggingÚcollections.abcr   r   r   r   Údataclassesr   r	   r
   r   Útypingr   r   r   r   Ú langsmith._openapi_client._httpxr   Úlangsmith.sandbox._exceptionsr   r   r   Ú langsmith.sandbox._async_sandboxr   Úlangsmith.sandbox._sandboxr   Úlangsmith.sandbox._ws_executer   r   Ú	getLoggerr&   r   r    r#   r-   r?   rO   re   r°   rŠ   rm   râ   ÚDownloadContentDispositionr  r  r"  rž  r%   r!   r   Ú<module>rÊ     sM  ðÙ )å "ã ß HÓ Hß (ß 'ß 8Ó 8å 2÷ñ ö Ý=Ý2÷ð
 
×	Ò	˜8Ó	$€ôô(Ð 5ô ð ÷
#ð 
#ó ð
#ð ÷
ð 
ó ð
ð( ÷:
ð :
ó ð:
ðz ÷Uð Uó ðUð* 3€ØÐ ÷L
ñ L
÷^\
ñ \
ðH %Ð%;Ñ<Ð Ø >ð ÷
ð 
ó ð
ðB ÷ð ó ð÷ M
ñ M
÷`c
ò c
r!   