3131)
3232from ...lib .polling_async import async_poll_until
3333from ...types .devbox_execution_detail_view import DevboxExecutionDetailView
34+ from ...types .devboxes .execution_update_chunk import ExecutionUpdateChunk
3435from ...types .devbox_async_execution_detail_view import DevboxAsyncExecutionDetailView
35- from ...types .devboxes .execution_stream_stderr_updates_response import ExecutionStreamStderrUpdatesResponse
36- from ...types .devboxes .execution_stream_stdout_updates_response import ExecutionStreamStdoutUpdatesResponse
3736
3837__all__ = ["ExecutionsResource" , "AsyncExecutionsResource" ]
3938
@@ -340,7 +339,7 @@ def stream_stderr_updates(
340339 extra_query : Query | None = None ,
341340 extra_body : Body | None = None ,
342341 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
343- ) -> Stream [ExecutionStreamStderrUpdatesResponse ]:
342+ ) -> Stream [ExecutionUpdateChunk ]:
344343 """
345344 Tails the stderr logs for the given execution with SSE streaming
346345
@@ -359,7 +358,6 @@ def stream_stderr_updates(
359358 raise ValueError (f"Expected a non-empty value for `devbox_id` but received { devbox_id !r} " )
360359 if not execution_id :
361360 raise ValueError (f"Expected a non-empty value for `execution_id` but received { execution_id !r} " )
362- extra_headers = {"Accept" : "text/plain" , ** (extra_headers or {})}
363361 return self ._get (
364362 f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /stream_stderr_updates" ,
365363 options = make_request_options (
@@ -371,9 +369,9 @@ def stream_stderr_updates(
371369 {"offset" : offset }, execution_stream_stderr_updates_params .ExecutionStreamStderrUpdatesParams
372370 ),
373371 ),
374- cast_to = str ,
372+ cast_to = ExecutionUpdateChunk ,
375373 stream = True ,
376- stream_cls = Stream [ExecutionStreamStderrUpdatesResponse ],
374+ stream_cls = Stream [ExecutionUpdateChunk ],
377375 )
378376
379377 def stream_stdout_updates (
@@ -388,7 +386,7 @@ def stream_stdout_updates(
388386 extra_query : Query | None = None ,
389387 extra_body : Body | None = None ,
390388 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
391- ) -> Stream [ExecutionStreamStdoutUpdatesResponse ]:
389+ ) -> Stream [ExecutionUpdateChunk ]:
392390 """
393391 Tails the stdout logs for the given execution with SSE streaming
394392
@@ -407,7 +405,6 @@ def stream_stdout_updates(
407405 raise ValueError (f"Expected a non-empty value for `devbox_id` but received { devbox_id !r} " )
408406 if not execution_id :
409407 raise ValueError (f"Expected a non-empty value for `execution_id` but received { execution_id !r} " )
410- extra_headers = {"Accept" : "text/plain" , ** (extra_headers or {})}
411408 return self ._get (
412409 f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /stream_stdout_updates" ,
413410 options = make_request_options (
@@ -419,9 +416,9 @@ def stream_stdout_updates(
419416 {"offset" : offset }, execution_stream_stdout_updates_params .ExecutionStreamStdoutUpdatesParams
420417 ),
421418 ),
422- cast_to = str ,
419+ cast_to = ExecutionUpdateChunk ,
423420 stream = True ,
424- stream_cls = Stream [ExecutionStreamStdoutUpdatesResponse ],
421+ stream_cls = Stream [ExecutionUpdateChunk ],
425422 )
426423
427424
@@ -717,7 +714,7 @@ async def stream_stderr_updates(
717714 extra_query : Query | None = None ,
718715 extra_body : Body | None = None ,
719716 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
720- ) -> AsyncStream [ExecutionStreamStderrUpdatesResponse ]:
717+ ) -> AsyncStream [ExecutionUpdateChunk ]:
721718 """
722719 Tails the stderr logs for the given execution with SSE streaming
723720
@@ -736,7 +733,6 @@ async def stream_stderr_updates(
736733 raise ValueError (f"Expected a non-empty value for `devbox_id` but received { devbox_id !r} " )
737734 if not execution_id :
738735 raise ValueError (f"Expected a non-empty value for `execution_id` but received { execution_id !r} " )
739- extra_headers = {"Accept" : "text/plain" , ** (extra_headers or {})}
740736 return await self ._get (
741737 f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /stream_stderr_updates" ,
742738 options = make_request_options (
@@ -748,9 +744,9 @@ async def stream_stderr_updates(
748744 {"offset" : offset }, execution_stream_stderr_updates_params .ExecutionStreamStderrUpdatesParams
749745 ),
750746 ),
751- cast_to = str ,
747+ cast_to = ExecutionUpdateChunk ,
752748 stream = True ,
753- stream_cls = AsyncStream [ExecutionStreamStderrUpdatesResponse ],
749+ stream_cls = AsyncStream [ExecutionUpdateChunk ],
754750 )
755751
756752 async def stream_stdout_updates (
@@ -765,7 +761,7 @@ async def stream_stdout_updates(
765761 extra_query : Query | None = None ,
766762 extra_body : Body | None = None ,
767763 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
768- ) -> AsyncStream [ExecutionStreamStdoutUpdatesResponse ]:
764+ ) -> AsyncStream [ExecutionUpdateChunk ]:
769765 """
770766 Tails the stdout logs for the given execution with SSE streaming
771767
@@ -784,7 +780,6 @@ async def stream_stdout_updates(
784780 raise ValueError (f"Expected a non-empty value for `devbox_id` but received { devbox_id !r} " )
785781 if not execution_id :
786782 raise ValueError (f"Expected a non-empty value for `execution_id` but received { execution_id !r} " )
787- extra_headers = {"Accept" : "text/plain" , ** (extra_headers or {})}
788783 return await self ._get (
789784 f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /stream_stdout_updates" ,
790785 options = make_request_options (
@@ -796,9 +791,9 @@ async def stream_stdout_updates(
796791 {"offset" : offset }, execution_stream_stdout_updates_params .ExecutionStreamStdoutUpdatesParams
797792 ),
798793 ),
799- cast_to = str ,
794+ cast_to = ExecutionUpdateChunk ,
800795 stream = True ,
801- stream_cls = AsyncStream [ExecutionStreamStdoutUpdatesResponse ],
796+ stream_cls = AsyncStream [ExecutionUpdateChunk ],
802797 )
803798
804799
0 commit comments