2525from ...types .devboxes import (
2626 execution_kill_params ,
2727 execution_retrieve_params ,
28+ execution_send_std_in_params ,
2829 execution_execute_sync_params ,
2930 execution_execute_async_params ,
3031 execution_stream_stderr_updates_params ,
@@ -332,6 +333,53 @@ def kill(
332333 cast_to = DevboxAsyncExecutionDetailView ,
333334 )
334335
336+ def send_std_in (
337+ self ,
338+ execution_id : str ,
339+ * ,
340+ devbox_id : str ,
341+ text : str | Omit = omit ,
342+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
343+ # The extra values given here take precedence over values defined on the client or passed to this method.
344+ extra_headers : Headers | None = None ,
345+ extra_query : Query | None = None ,
346+ extra_body : Body | None = None ,
347+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
348+ idempotency_key : str | None = None ,
349+ ) -> DevboxAsyncExecutionDetailView :
350+ """
351+ Send content to the Std In of a running execution.
352+
353+ Args:
354+ text: Text to send to std in of the running execution.
355+
356+ extra_headers: Send extra headers
357+
358+ extra_query: Add additional query parameters to the request
359+
360+ extra_body: Add additional JSON properties to the request
361+
362+ timeout: Override the client-level default timeout for this request, in seconds
363+
364+ idempotency_key: Specify a custom idempotency key for this request
365+ """
366+ if not devbox_id :
367+ raise ValueError (f"Expected a non-empty value for `devbox_id` but received { devbox_id !r} " )
368+ if not execution_id :
369+ raise ValueError (f"Expected a non-empty value for `execution_id` but received { execution_id !r} " )
370+ return self ._post (
371+ f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /send_std_in" ,
372+ body = maybe_transform ({"text" : text }, execution_send_std_in_params .ExecutionSendStdInParams ),
373+ options = make_request_options (
374+ extra_headers = extra_headers ,
375+ extra_query = extra_query ,
376+ extra_body = extra_body ,
377+ timeout = timeout ,
378+ idempotency_key = idempotency_key ,
379+ ),
380+ cast_to = DevboxAsyncExecutionDetailView ,
381+ )
382+
335383 def stream_stderr_updates (
336384 self ,
337385 execution_id : str ,
@@ -785,6 +833,53 @@ async def kill(
785833 cast_to = DevboxAsyncExecutionDetailView ,
786834 )
787835
836+ async def send_std_in (
837+ self ,
838+ execution_id : str ,
839+ * ,
840+ devbox_id : str ,
841+ text : str | Omit = omit ,
842+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
843+ # The extra values given here take precedence over values defined on the client or passed to this method.
844+ extra_headers : Headers | None = None ,
845+ extra_query : Query | None = None ,
846+ extra_body : Body | None = None ,
847+ timeout : float | httpx .Timeout | None | NotGiven = not_given ,
848+ idempotency_key : str | None = None ,
849+ ) -> DevboxAsyncExecutionDetailView :
850+ """
851+ Send content to the Std In of a running execution.
852+
853+ Args:
854+ text: Text to send to std in of the running execution.
855+
856+ extra_headers: Send extra headers
857+
858+ extra_query: Add additional query parameters to the request
859+
860+ extra_body: Add additional JSON properties to the request
861+
862+ timeout: Override the client-level default timeout for this request, in seconds
863+
864+ idempotency_key: Specify a custom idempotency key for this request
865+ """
866+ if not devbox_id :
867+ raise ValueError (f"Expected a non-empty value for `devbox_id` but received { devbox_id !r} " )
868+ if not execution_id :
869+ raise ValueError (f"Expected a non-empty value for `execution_id` but received { execution_id !r} " )
870+ return await self ._post (
871+ f"/v1/devboxes/{ devbox_id } /executions/{ execution_id } /send_std_in" ,
872+ body = await async_maybe_transform ({"text" : text }, execution_send_std_in_params .ExecutionSendStdInParams ),
873+ options = make_request_options (
874+ extra_headers = extra_headers ,
875+ extra_query = extra_query ,
876+ extra_body = extra_body ,
877+ timeout = timeout ,
878+ idempotency_key = idempotency_key ,
879+ ),
880+ cast_to = DevboxAsyncExecutionDetailView ,
881+ )
882+
788883 async def stream_stderr_updates (
789884 self ,
790885 execution_id : str ,
@@ -973,6 +1068,9 @@ def __init__(self, executions: ExecutionsResource) -> None:
9731068 self .kill = to_raw_response_wrapper (
9741069 executions .kill ,
9751070 )
1071+ self .send_std_in = to_raw_response_wrapper (
1072+ executions .send_std_in ,
1073+ )
9761074 self .stream_stdout_updates = to_raw_response_wrapper (
9771075 executions .stream_stdout_updates ,
9781076 )
@@ -999,6 +1097,9 @@ def __init__(self, executions: AsyncExecutionsResource) -> None:
9991097 self .kill = async_to_raw_response_wrapper (
10001098 executions .kill ,
10011099 )
1100+ self .send_std_in = async_to_raw_response_wrapper (
1101+ executions .send_std_in ,
1102+ )
10021103 self .stream_stdout_updates = async_to_raw_response_wrapper (
10031104 executions .stream_stdout_updates ,
10041105 )
@@ -1025,6 +1126,9 @@ def __init__(self, executions: ExecutionsResource) -> None:
10251126 self .kill = to_streamed_response_wrapper (
10261127 executions .kill ,
10271128 )
1129+ self .send_std_in = to_streamed_response_wrapper (
1130+ executions .send_std_in ,
1131+ )
10281132 self .stream_stdout_updates = to_streamed_response_wrapper (
10291133 executions .stream_stdout_updates ,
10301134 )
@@ -1051,6 +1155,9 @@ def __init__(self, executions: AsyncExecutionsResource) -> None:
10511155 self .kill = async_to_streamed_response_wrapper (
10521156 executions .kill ,
10531157 )
1158+ self .send_std_in = async_to_streamed_response_wrapper (
1159+ executions .send_std_in ,
1160+ )
10541161 self .stream_stdout_updates = async_to_streamed_response_wrapper (
10551162 executions .stream_stdout_updates ,
10561163 )
0 commit comments