3333 execution_stream_stdout_updates_params ,
3434)
3535from ...lib .polling_async import async_poll_until
36+ from ...types .devbox_send_std_in_result import DevboxSendStdInResult
3637from ...types .devbox_execution_detail_view import DevboxExecutionDetailView
3738from ...types .devboxes .execution_update_chunk import ExecutionUpdateChunk
3839from ...types .devbox_async_execution_detail_view import DevboxAsyncExecutionDetailView
@@ -88,7 +89,7 @@ def retrieve(
8889 stdout/error and the exit code if complete.
8990
9091 Args:
91- last_n: Last n lines of standard error / standard out to return
92+ last_n: Last n lines of standard error / standard out to return (default: 100)
9293
9394 extra_headers: Send extra headers
9495
@@ -169,6 +170,7 @@ def execute_async(
169170 id : str ,
170171 * ,
171172 command : str ,
173+ attach_stdin : Optional [bool ] | Omit = omit ,
172174 shell_name : Optional [str ] | Omit = omit ,
173175 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
174176 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -188,6 +190,9 @@ def execute_async(
188190 specified the command is run from the directory based on the recent state of the
189191 persistent shell.
190192
193+ attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
194+ endpoint. Defaults to false if not specified.
195+
191196 shell_name: The name of the persistent shell to create or use if already created. When using
192197 a persistent shell, the command will run from the directory at the end of the
193198 previous command and environment variables will be preserved.
@@ -209,6 +214,7 @@ def execute_async(
209214 body = maybe_transform (
210215 {
211216 "command" : command ,
217+ "attach_stdin" : attach_stdin ,
212218 "shell_name" : shell_name ,
213219 },
214220 execution_execute_async_params .ExecutionExecuteAsyncParams ,
@@ -229,6 +235,7 @@ def execute_sync(
229235 id : str ,
230236 * ,
231237 command : str ,
238+ attach_stdin : Optional [bool ] | Omit = omit ,
232239 shell_name : Optional [str ] | Omit = omit ,
233240 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
234241 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -240,14 +247,18 @@ def execute_sync(
240247 ) -> DevboxExecutionDetailView :
241248 """
242249 Execute a bash command in the Devbox shell, await the command completion and
243- return the output.
250+ return the output. Note: attach_stdin parameter is not supported for synchronous
251+ execution.
244252
245253 Args:
246254 command: The command to execute via the Devbox shell. By default, commands are run from
247255 the user home directory unless shell_name is specified. If shell_name is
248256 specified the command is run from the directory based on the recent state of the
249257 persistent shell.
250258
259+ attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
260+ endpoint. Defaults to false if not specified.
261+
251262 shell_name: The name of the persistent shell to create or use if already created. When using
252263 a persistent shell, the command will run from the directory at the end of the
253264 previous command and environment variables will be preserved.
@@ -271,6 +282,7 @@ def execute_sync(
271282 body = maybe_transform (
272283 {
273284 "command" : command ,
285+ "attach_stdin" : attach_stdin ,
274286 "shell_name" : shell_name ,
275287 },
276288 execution_execute_sync_params .ExecutionExecuteSyncParams ,
@@ -348,7 +360,7 @@ def send_std_in(
348360 extra_body : Body | None = None ,
349361 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
350362 idempotency_key : str | None = None ,
351- ) -> DevboxAsyncExecutionDetailView :
363+ ) -> DevboxSendStdInResult :
352364 """
353365 Send content to the Std In of a running execution.
354366
@@ -387,7 +399,7 @@ def send_std_in(
387399 timeout = timeout ,
388400 idempotency_key = idempotency_key ,
389401 ),
390- cast_to = DevboxAsyncExecutionDetailView ,
402+ cast_to = DevboxSendStdInResult ,
391403 )
392404
393405 def stream_stderr_updates (
@@ -597,7 +609,7 @@ async def retrieve(
597609 stdout/error and the exit code if complete.
598610
599611 Args:
600- last_n: Last n lines of standard error / standard out to return
612+ last_n: Last n lines of standard error / standard out to return (default: 100)
601613
602614 extra_headers: Send extra headers
603615
@@ -676,6 +688,7 @@ async def execute_async(
676688 id : str ,
677689 * ,
678690 command : str ,
691+ attach_stdin : Optional [bool ] | Omit = omit ,
679692 shell_name : Optional [str ] | Omit = omit ,
680693 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
681694 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -695,6 +708,9 @@ async def execute_async(
695708 specified the command is run from the directory based on the recent state of the
696709 persistent shell.
697710
711+ attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
712+ endpoint. Defaults to false if not specified.
713+
698714 shell_name: The name of the persistent shell to create or use if already created. When using
699715 a persistent shell, the command will run from the directory at the end of the
700716 previous command and environment variables will be preserved.
@@ -716,6 +732,7 @@ async def execute_async(
716732 body = await async_maybe_transform (
717733 {
718734 "command" : command ,
735+ "attach_stdin" : attach_stdin ,
719736 "shell_name" : shell_name ,
720737 },
721738 execution_execute_async_params .ExecutionExecuteAsyncParams ,
@@ -736,6 +753,7 @@ async def execute_sync(
736753 id : str ,
737754 * ,
738755 command : str ,
756+ attach_stdin : Optional [bool ] | Omit = omit ,
739757 shell_name : Optional [str ] | Omit = omit ,
740758 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
741759 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -747,14 +765,18 @@ async def execute_sync(
747765 ) -> DevboxExecutionDetailView :
748766 """
749767 Execute a bash command in the Devbox shell, await the command completion and
750- return the output.
768+ return the output. Note: attach_stdin parameter is not supported for synchronous
769+ execution.
751770
752771 Args:
753772 command: The command to execute via the Devbox shell. By default, commands are run from
754773 the user home directory unless shell_name is specified. If shell_name is
755774 specified the command is run from the directory based on the recent state of the
756775 persistent shell.
757776
777+ attach_stdin: Whether to attach stdin streaming for async commands. Not valid for execute_sync
778+ endpoint. Defaults to false if not specified.
779+
758780 shell_name: The name of the persistent shell to create or use if already created. When using
759781 a persistent shell, the command will run from the directory at the end of the
760782 previous command and environment variables will be preserved.
@@ -778,6 +800,7 @@ async def execute_sync(
778800 body = await async_maybe_transform (
779801 {
780802 "command" : command ,
803+ "attach_stdin" : attach_stdin ,
781804 "shell_name" : shell_name ,
782805 },
783806 execution_execute_sync_params .ExecutionExecuteSyncParams ,
@@ -857,7 +880,7 @@ async def send_std_in(
857880 extra_body : Body | None = None ,
858881 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
859882 idempotency_key : str | None = None ,
860- ) -> DevboxAsyncExecutionDetailView :
883+ ) -> DevboxSendStdInResult :
861884 """
862885 Send content to the Std In of a running execution.
863886
@@ -896,7 +919,7 @@ async def send_std_in(
896919 timeout = timeout ,
897920 idempotency_key = idempotency_key ,
898921 ),
899- cast_to = DevboxAsyncExecutionDetailView ,
922+ cast_to = DevboxSendStdInResult ,
900923 )
901924
902925 async def stream_stderr_updates (
0 commit comments