Skip to content

Commit c2b7b84

Browse files
feat(api): api update
1 parent e8914e3 commit c2b7b84

21 files changed

+135
-22
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 94
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-d1cc15eb5ef9125c6eef2855fc9ccc1129f68116e20ac0a72a9c77a445909033.yml
3-
openapi_spec_hash: 925f218d18ed7f1faff9389b318a674f
4-
config_hash: 82af97d4d6dde958eed9f5e4ae55f75a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-436b4f5c7426cca5e0133377ac1a0d1491b5705407a3d877c3b4abeb4e9935f1.yml
3+
openapi_spec_hash: cd980135831e4407f1063af254fba1cd
4+
config_hash: 95facb8cef59b5a1b05763b871bf6a4b

api.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ from runloop_api_client.types import (
8686
DevboxExecutionDetailView,
8787
DevboxKillExecutionRequest,
8888
DevboxListView,
89+
DevboxSendStdInRequest,
90+
DevboxSendStdInResult,
8991
DevboxSnapshotListView,
9092
DevboxSnapshotView,
9193
DevboxTunnelView,
@@ -198,7 +200,7 @@ Methods:
198200
- <code title="post /v1/devboxes/{id}/execute_async">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">execute_async</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_execute_async_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
199201
- <code title="post /v1/devboxes/{id}/execute_sync">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">execute_sync</a>(id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_execute_sync_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
200202
- <code title="post /v1/devboxes/{devbox_id}/executions/{execution_id}/kill">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">kill</a>(execution_id, \*, devbox_id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_kill_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
201-
- <code title="post /v1/devboxes/{devbox_id}/executions/{execution_id}/send_std_in">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">send_std_in</a>(execution_id, \*, devbox_id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_send_std_in_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
203+
- <code title="post /v1/devboxes/{devbox_id}/executions/{execution_id}/send_std_in">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">send_std_in</a>(execution_id, \*, devbox_id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_send_std_in_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_send_std_in_result.py">DevboxSendStdInResult</a></code>
202204
- <code title="get /v1/devboxes/{devbox_id}/executions/{execution_id}/stream_stderr_updates">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">stream_stderr_updates</a>(execution_id, \*, devbox_id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_stream_stderr_updates_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/execution_update_chunk.py">ExecutionUpdateChunk</a></code>
203205
- <code title="get /v1/devboxes/{devbox_id}/executions/{execution_id}/stream_stdout_updates">client.devboxes.executions.<a href="./src/runloop_api_client/resources/devboxes/executions.py">stream_stdout_updates</a>(execution_id, \*, devbox_id, \*\*<a href="src/runloop_api_client/types/devboxes/execution_stream_stdout_updates_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devboxes/execution_update_chunk.py">ExecutionUpdateChunk</a></code>
204206

src/runloop_api_client/resources/devboxes/disk_snapshots.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def update(
4949
self,
5050
id: str,
5151
*,
52+
commit_message: Optional[str] | Omit = omit,
5253
metadata: Optional[Dict[str, str]] | Omit = omit,
5354
name: Optional[str] | Omit = omit,
5455
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -65,6 +66,8 @@ def update(
6566
replaced.
6667
6768
Args:
69+
commit_message: (Optional) Commit message associated with the snapshot (max 1000 characters)
70+
6871
metadata: (Optional) Metadata used to describe the snapshot
6972
7073
name: (Optional) A user specified name to give the snapshot
@@ -85,6 +88,7 @@ def update(
8588
f"/v1/devboxes/disk_snapshots/{id}",
8689
body=maybe_transform(
8790
{
91+
"commit_message": commit_message,
8892
"metadata": metadata,
8993
"name": name,
9094
},
@@ -260,6 +264,7 @@ async def update(
260264
self,
261265
id: str,
262266
*,
267+
commit_message: Optional[str] | Omit = omit,
263268
metadata: Optional[Dict[str, str]] | Omit = omit,
264269
name: Optional[str] | Omit = omit,
265270
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -276,6 +281,8 @@ async def update(
276281
replaced.
277282
278283
Args:
284+
commit_message: (Optional) Commit message associated with the snapshot (max 1000 characters)
285+
279286
metadata: (Optional) Metadata used to describe the snapshot
280287
281288
name: (Optional) A user specified name to give the snapshot
@@ -296,6 +303,7 @@ async def update(
296303
f"/v1/devboxes/disk_snapshots/{id}",
297304
body=await async_maybe_transform(
298305
{
306+
"commit_message": commit_message,
299307
"metadata": metadata,
300308
"name": name,
301309
},

src/runloop_api_client/resources/devboxes/executions.py

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
execution_stream_stdout_updates_params,
3434
)
3535
from ...lib.polling_async import async_poll_until
36+
from ...types.devbox_send_std_in_result import DevboxSendStdInResult
3637
from ...types.devbox_execution_detail_view import DevboxExecutionDetailView
3738
from ...types.devboxes.execution_update_chunk import ExecutionUpdateChunk
3839
from ...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(

src/runloop_api_client/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
from .object_download_url_view import ObjectDownloadURLView as ObjectDownloadURLView
6161
from .repository_create_params import RepositoryCreateParams as RepositoryCreateParams
6262
from .repository_manifest_view import RepositoryManifestView as RepositoryManifestView
63+
from .devbox_send_std_in_result import DevboxSendStdInResult as DevboxSendStdInResult
6364
from .devbox_snapshot_list_view import DevboxSnapshotListView as DevboxSnapshotListView
6465
from .devbox_upload_file_params import DevboxUploadFileParams as DevboxUploadFileParams
6566
from .object_list_public_params import ObjectListPublicParams as ObjectListPublicParams

src/runloop_api_client/types/devbox_execute_async_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ class DevboxExecuteAsyncParams(TypedDict, total=False):
1717
based on the recent state of the persistent shell.
1818
"""
1919

20+
attach_stdin: Optional[bool]
21+
"""Whether to attach stdin streaming for async commands.
22+
23+
Not valid for execute_sync endpoint. Defaults to false if not specified.
24+
"""
25+
2026
shell_name: Optional[str]
2127
"""The name of the persistent shell to create or use if already created.
2228

src/runloop_api_client/types/devbox_execute_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ class DevboxExecuteParams(TypedDict, total=False):
2020
command_id: Required[str]
2121
"""The command ID in UUIDv7 string format for idempotency and tracking"""
2222

23+
last_n: str
24+
"""Last n lines of standard error / standard out to return (default: 100)"""
25+
2326
optimistic_timeout: Optional[int]
2427
"""Timeout in seconds to wait for command completion.
2528

src/runloop_api_client/types/devbox_execute_sync_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ class DevboxExecuteSyncParams(TypedDict, total=False):
1717
based on the recent state of the persistent shell.
1818
"""
1919

20+
attach_stdin: Optional[bool]
21+
"""Whether to attach stdin streaming for async commands.
22+
23+
Not valid for execute_sync endpoint. Defaults to false if not specified.
24+
"""
25+
2026
shell_name: Optional[str]
2127
"""The name of the persistent shell to create or use if already created.
2228
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .._models import BaseModel
4+
5+
__all__ = ["DevboxSendStdInResult"]
6+
7+
8+
class DevboxSendStdInResult(BaseModel):
9+
devbox_id: str
10+
"""Devbox id where command is executing."""
11+
12+
execution_id: str
13+
"""Execution id that received the stdin."""
14+
15+
success: bool
16+
"""Whether the stdin was successfully sent."""

src/runloop_api_client/types/devbox_snapshot_disk_async_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010

1111
class DevboxSnapshotDiskAsyncParams(TypedDict, total=False):
12+
commit_message: Optional[str]
13+
"""(Optional) Commit message associated with the snapshot (max 1000 characters)"""
14+
1215
metadata: Optional[Dict[str, str]]
1316
"""(Optional) Metadata used to describe the snapshot"""
1417

0 commit comments

Comments
 (0)