2626 execution_retrieve_params ,
2727 execution_execute_sync_params ,
2828 execution_execute_async_params ,
29- execution_stream_updates_params ,
29+ execution_stream_stderr_updates_params ,
30+ execution_stream_stdout_updates_params ,
3031)
3132from ...lib .polling_async import async_poll_until
3233from ...types .devbox_execution_detail_view import DevboxExecutionDetailView
33- from ...types .devboxes .execution_update_chunk import ExecutionUpdateChunk
3434from ...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
3537
3638__all__ = ["ExecutionsResource" , "AsyncExecutionsResource" ]
3739
@@ -326,7 +328,7 @@ def kill(
326328 cast_to = DevboxAsyncExecutionDetailView ,
327329 )
328330
329- def stream_updates (
331+ def stream_stderr_updates (
330332 self ,
331333 execution_id : str ,
332334 * ,
@@ -338,9 +340,9 @@ def stream_updates(
338340 extra_query : Query | None = None ,
339341 extra_body : Body | None = None ,
340342 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
341- ) -> Stream [ExecutionUpdateChunk ]:
343+ ) -> Stream [ExecutionStreamStderrUpdatesResponse ]:
342344 """
343- Tails the logs for the given execution with SSE streaming
345+ Tails the stderr logs for the given execution with SSE streaming
344346
345347 Args:
346348 offset: The byte offset to start the stream from
@@ -357,18 +359,69 @@ def stream_updates(
357359 raise ValueError (f"Expected a non-empty value for `devbox_id` but received { devbox_id !r} " )
358360 if not execution_id :
359361 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 {})}
360363 return self ._get (
361- f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /stream_updates " ,
364+ f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /stream_stderr_updates " ,
362365 options = make_request_options (
363366 extra_headers = extra_headers ,
364367 extra_query = extra_query ,
365368 extra_body = extra_body ,
366369 timeout = timeout ,
367- query = maybe_transform ({"offset" : offset }, execution_stream_updates_params .ExecutionStreamUpdatesParams ),
370+ query = maybe_transform (
371+ {"offset" : offset }, execution_stream_stderr_updates_params .ExecutionStreamStderrUpdatesParams
372+ ),
368373 ),
369- cast_to = DevboxAsyncExecutionDetailView ,
374+ cast_to = str ,
370375 stream = True ,
371- stream_cls = Stream [ExecutionUpdateChunk ],
376+ stream_cls = Stream [ExecutionStreamStderrUpdatesResponse ],
377+ )
378+
379+ def stream_stdout_updates (
380+ self ,
381+ execution_id : str ,
382+ * ,
383+ devbox_id : str ,
384+ offset : str | NotGiven = NOT_GIVEN ,
385+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
386+ # The extra values given here take precedence over values defined on the client or passed to this method.
387+ extra_headers : Headers | None = None ,
388+ extra_query : Query | None = None ,
389+ extra_body : Body | None = None ,
390+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
391+ ) -> Stream [ExecutionStreamStdoutUpdatesResponse ]:
392+ """
393+ Tails the stdout logs for the given execution with SSE streaming
394+
395+ Args:
396+ offset: The byte offset to start the stream from
397+
398+ extra_headers: Send extra headers
399+
400+ extra_query: Add additional query parameters to the request
401+
402+ extra_body: Add additional JSON properties to the request
403+
404+ timeout: Override the client-level default timeout for this request, in seconds
405+ """
406+ if not devbox_id :
407+ raise ValueError (f"Expected a non-empty value for `devbox_id` but received { devbox_id !r} " )
408+ if not execution_id :
409+ 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 {})}
411+ return self ._get (
412+ f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /stream_stdout_updates" ,
413+ options = make_request_options (
414+ extra_headers = extra_headers ,
415+ extra_query = extra_query ,
416+ extra_body = extra_body ,
417+ timeout = timeout ,
418+ query = maybe_transform (
419+ {"offset" : offset }, execution_stream_stdout_updates_params .ExecutionStreamStdoutUpdatesParams
420+ ),
421+ ),
422+ cast_to = str ,
423+ stream = True ,
424+ stream_cls = Stream [ExecutionStreamStdoutUpdatesResponse ],
372425 )
373426
374427
@@ -652,7 +705,7 @@ async def kill(
652705 cast_to = DevboxAsyncExecutionDetailView ,
653706 )
654707
655- async def stream_updates (
708+ async def stream_stderr_updates (
656709 self ,
657710 execution_id : str ,
658711 * ,
@@ -664,9 +717,9 @@ async def stream_updates(
664717 extra_query : Query | None = None ,
665718 extra_body : Body | None = None ,
666719 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
667- ) -> AsyncStream [ExecutionUpdateChunk ]:
720+ ) -> AsyncStream [ExecutionStreamStderrUpdatesResponse ]:
668721 """
669- Tails the logs for the given execution with SSE streaming
722+ Tails the stderr logs for the given execution with SSE streaming
670723
671724 Args:
672725 offset: The byte offset to start the stream from
@@ -683,20 +736,69 @@ async def stream_updates(
683736 raise ValueError (f"Expected a non-empty value for `devbox_id` but received { devbox_id !r} " )
684737 if not execution_id :
685738 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 {})}
686740 return await self ._get (
687- f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /stream_updates " ,
741+ f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /stream_stderr_updates " ,
688742 options = make_request_options (
689743 extra_headers = extra_headers ,
690744 extra_query = extra_query ,
691745 extra_body = extra_body ,
692746 timeout = timeout ,
693747 query = await async_maybe_transform (
694- {"offset" : offset }, execution_stream_updates_params . ExecutionStreamUpdatesParams
748+ {"offset" : offset }, execution_stream_stderr_updates_params . ExecutionStreamStderrUpdatesParams
695749 ),
696750 ),
697- cast_to = DevboxAsyncExecutionDetailView ,
751+ cast_to = str ,
752+ stream = True ,
753+ stream_cls = AsyncStream [ExecutionStreamStderrUpdatesResponse ],
754+ )
755+
756+ async def stream_stdout_updates (
757+ self ,
758+ execution_id : str ,
759+ * ,
760+ devbox_id : str ,
761+ offset : str | NotGiven = NOT_GIVEN ,
762+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
763+ # The extra values given here take precedence over values defined on the client or passed to this method.
764+ extra_headers : Headers | None = None ,
765+ extra_query : Query | None = None ,
766+ extra_body : Body | None = None ,
767+ timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
768+ ) -> AsyncStream [ExecutionStreamStdoutUpdatesResponse ]:
769+ """
770+ Tails the stdout logs for the given execution with SSE streaming
771+
772+ Args:
773+ offset: The byte offset to start the stream from
774+
775+ extra_headers: Send extra headers
776+
777+ extra_query: Add additional query parameters to the request
778+
779+ extra_body: Add additional JSON properties to the request
780+
781+ timeout: Override the client-level default timeout for this request, in seconds
782+ """
783+ if not devbox_id :
784+ raise ValueError (f"Expected a non-empty value for `devbox_id` but received { devbox_id !r} " )
785+ if not execution_id :
786+ 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 {})}
788+ return await self ._get (
789+ f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /stream_stdout_updates" ,
790+ options = make_request_options (
791+ extra_headers = extra_headers ,
792+ extra_query = extra_query ,
793+ extra_body = extra_body ,
794+ timeout = timeout ,
795+ query = await async_maybe_transform (
796+ {"offset" : offset }, execution_stream_stdout_updates_params .ExecutionStreamStdoutUpdatesParams
797+ ),
798+ ),
799+ cast_to = str ,
698800 stream = True ,
699- stream_cls = AsyncStream [ExecutionUpdateChunk ],
801+ stream_cls = AsyncStream [ExecutionStreamStdoutUpdatesResponse ],
700802 )
701803
702804
@@ -716,8 +818,11 @@ def __init__(self, executions: ExecutionsResource) -> None:
716818 self .kill = to_raw_response_wrapper (
717819 executions .kill ,
718820 )
719- self .stream_updates = to_raw_response_wrapper (
720- executions .stream_updates ,
821+ self .stream_stderr_updates = to_raw_response_wrapper (
822+ executions .stream_stderr_updates ,
823+ )
824+ self .stream_stdout_updates = to_raw_response_wrapper (
825+ executions .stream_stdout_updates ,
721826 )
722827
723828
@@ -737,8 +842,11 @@ def __init__(self, executions: AsyncExecutionsResource) -> None:
737842 self .kill = async_to_raw_response_wrapper (
738843 executions .kill ,
739844 )
740- self .stream_updates = async_to_raw_response_wrapper (
741- executions .stream_updates ,
845+ self .stream_stderr_updates = async_to_raw_response_wrapper (
846+ executions .stream_stderr_updates ,
847+ )
848+ self .stream_stdout_updates = async_to_raw_response_wrapper (
849+ executions .stream_stdout_updates ,
742850 )
743851
744852
@@ -758,8 +866,11 @@ def __init__(self, executions: ExecutionsResource) -> None:
758866 self .kill = to_streamed_response_wrapper (
759867 executions .kill ,
760868 )
761- self .stream_updates = to_streamed_response_wrapper (
762- executions .stream_updates ,
869+ self .stream_stderr_updates = to_streamed_response_wrapper (
870+ executions .stream_stderr_updates ,
871+ )
872+ self .stream_stdout_updates = to_streamed_response_wrapper (
873+ executions .stream_stdout_updates ,
763874 )
764875
765876
@@ -779,6 +890,9 @@ def __init__(self, executions: AsyncExecutionsResource) -> None:
779890 self .kill = async_to_streamed_response_wrapper (
780891 executions .kill ,
781892 )
782- self .stream_updates = async_to_streamed_response_wrapper (
783- executions .stream_updates ,
893+ self .stream_stderr_updates = async_to_streamed_response_wrapper (
894+ executions .stream_stderr_updates ,
895+ )
896+ self .stream_stdout_updates = async_to_streamed_response_wrapper (
897+ executions .stream_stdout_updates ,
784898 )
0 commit comments