Skip to content

Commit fff1e21

Browse files
feat(api): api update
1 parent 23b364e commit fff1e21

File tree

8 files changed

+65
-29
lines changed

8 files changed

+65
-29
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 92
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-f1d928f705d6771a22fe701dfb8c0c66aabbd0dd6d17e3fa09b8eb3a48259a84.yml
3-
openapi_spec_hash: 12dc18a4da3f084fee3d2c5f428e1df3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-6b65a42b74406a77acb03ddb582288396d7af64df16eebf887c77246d3a54470.yml
3+
openapi_spec_hash: aeb9f595d53412926ef507174f33a1a1
44
config_hash: f9f7bc60c36f103c77333d9149cd3e46

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ def create(
185185
file_mounts: Optional[Dict[str, str]] | Omit = omit,
186186
launch_parameters: Optional[LaunchParameters] | Omit = omit,
187187
metadata: Optional[Dict[str, str]] | Omit = omit,
188+
mounts: Optional[Iterable[devbox_create_params.Mount]] | Omit = omit,
188189
name: Optional[str] | Omit = omit,
189190
repo_connection_id: Optional[str] | Omit = omit,
190191
secrets: Optional[Dict[str, str]] | Omit = omit,
@@ -228,6 +229,8 @@ def create(
228229
229230
metadata: User defined metadata to attach to the devbox for organization.
230231
232+
mounts: A list of file system mounts to be included in the Devbox.
233+
231234
name: (Optional) A user specified name to give the Devbox.
232235
233236
repo_connection_id: Repository connection id the devbox should source its base image from.
@@ -262,6 +265,7 @@ def create(
262265
"file_mounts": file_mounts,
263266
"launch_parameters": launch_parameters,
264267
"metadata": metadata,
268+
"mounts": mounts,
265269
"name": name,
266270
"repo_connection_id": repo_connection_id,
267271
"secrets": secrets,
@@ -740,7 +744,7 @@ def execute(
740744
specified the command is run from the directory based on the recent state of the
741745
persistent shell.
742746
743-
command_id: The command ID for idempotency and tracking
747+
command_id: The command ID in UUIDv7 string format for idempotency and tracking
744748
745749
optimistic_timeout: Timeout in seconds to wait for command completion. Operation is not killed. Max
746750
is 600 seconds.
@@ -1633,6 +1637,7 @@ async def create(
16331637
file_mounts: Optional[Dict[str, str]] | Omit = omit,
16341638
launch_parameters: Optional[LaunchParameters] | Omit = omit,
16351639
metadata: Optional[Dict[str, str]] | Omit = omit,
1640+
mounts: Optional[Iterable[devbox_create_params.Mount]] | Omit = omit,
16361641
name: Optional[str] | Omit = omit,
16371642
repo_connection_id: Optional[str] | Omit = omit,
16381643
secrets: Optional[Dict[str, str]] | Omit = omit,
@@ -1676,6 +1681,8 @@ async def create(
16761681
16771682
metadata: User defined metadata to attach to the devbox for organization.
16781683
1684+
mounts: A list of file system mounts to be included in the Devbox.
1685+
16791686
name: (Optional) A user specified name to give the Devbox.
16801687
16811688
repo_connection_id: Repository connection id the devbox should source its base image from.
@@ -1710,6 +1717,7 @@ async def create(
17101717
"file_mounts": file_mounts,
17111718
"launch_parameters": launch_parameters,
17121719
"metadata": metadata,
1720+
"mounts": mounts,
17131721
"name": name,
17141722
"repo_connection_id": repo_connection_id,
17151723
"secrets": secrets,
@@ -2187,7 +2195,7 @@ async def execute(
21872195
specified the command is run from the directory based on the recent state of the
21882196
persistent shell.
21892197
2190-
command_id: The command ID for idempotency and tracking
2198+
command_id: The command ID in UUIDv7 string format for idempotency and tracking
21912199
21922200
optimistic_timeout: Timeout in seconds to wait for command completion. Operation is not killed. Max
21932201
is 600 seconds.

src/runloop_api_client/resources/repositories.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ def inspect(
244244
self,
245245
id: str,
246246
*,
247-
blueprint_id: Optional[str] | Omit = omit,
248247
github_auth_token: Optional[str] | Omit = omit,
249248
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
250249
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -259,8 +258,6 @@ def inspect(
259258
repo's technical stack and developer environment requirements.
260259
261260
Args:
262-
blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint.
263-
264261
github_auth_token: GitHub authentication token for accessing private repositories.
265262
266263
extra_headers: Send extra headers
@@ -278,11 +275,7 @@ def inspect(
278275
return self._post(
279276
f"/v1/repositories/{id}/inspect",
280277
body=maybe_transform(
281-
{
282-
"blueprint_id": blueprint_id,
283-
"github_auth_token": github_auth_token,
284-
},
285-
repository_inspect_params.RepositoryInspectParams,
278+
{"github_auth_token": github_auth_token}, repository_inspect_params.RepositoryInspectParams
286279
),
287280
options=make_request_options(
288281
extra_headers=extra_headers,
@@ -596,7 +589,6 @@ async def inspect(
596589
self,
597590
id: str,
598591
*,
599-
blueprint_id: Optional[str] | Omit = omit,
600592
github_auth_token: Optional[str] | Omit = omit,
601593
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
602594
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -611,8 +603,6 @@ async def inspect(
611603
repo's technical stack and developer environment requirements.
612604
613605
Args:
614-
blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint.
615-
616606
github_auth_token: GitHub authentication token for accessing private repositories.
617607
618608
extra_headers: Send extra headers
@@ -630,11 +620,7 @@ async def inspect(
630620
return await self._post(
631621
f"/v1/repositories/{id}/inspect",
632622
body=await async_maybe_transform(
633-
{
634-
"blueprint_id": blueprint_id,
635-
"github_auth_token": github_auth_token,
636-
},
637-
repository_inspect_params.RepositoryInspectParams,
623+
{"github_auth_token": github_auth_token}, repository_inspect_params.RepositoryInspectParams
638624
),
639625
options=make_request_options(
640626
extra_headers=extra_headers,

src/runloop_api_client/types/devbox_create_params.py

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Iterable, Optional
6-
from typing_extensions import TypedDict
5+
from typing import Dict, Union, Iterable, Optional
6+
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

88
from .shared_params.launch_parameters import LaunchParameters
99
from .shared_params.code_mount_parameters import CodeMountParameters
1010

11-
__all__ = ["DevboxCreateParams"]
11+
__all__ = ["DevboxCreateParams", "Mount", "MountObjectMountParameters", "MountAgentMountParameters"]
1212

1313

1414
class DevboxCreateParams(TypedDict, total=False):
@@ -49,6 +49,9 @@ class DevboxCreateParams(TypedDict, total=False):
4949
metadata: Optional[Dict[str, str]]
5050
"""User defined metadata to attach to the devbox for organization."""
5151

52+
mounts: Optional[Iterable[Mount]]
53+
"""A list of file system mounts to be included in the Devbox."""
54+
5255
name: Optional[str]
5356
"""(Optional) A user specified name to give the Devbox."""
5457

@@ -68,3 +71,33 @@ class DevboxCreateParams(TypedDict, total=False):
6871
6972
Only one of (Snapshot ID, Blueprint ID, Blueprint name) should be specified.
7073
"""
74+
75+
76+
class MountObjectMountParameters(TypedDict, total=False):
77+
object_id: Required[str]
78+
"""The ID of the object to write."""
79+
80+
object_path: Required[str]
81+
"""The path to write the object on the Devbox.
82+
83+
Use absolute path of object (ie /home/user/object.txt, or directory if archive
84+
/home/user/archive_dir)
85+
"""
86+
87+
type: Required[Literal["object_mount"]]
88+
89+
90+
class MountAgentMountParameters(TypedDict, total=False):
91+
agent_id: Required[str]
92+
"""The ID of the agent to mount."""
93+
94+
type: Required[Literal["agent_mount"]]
95+
96+
agent_path: Optional[str]
97+
"""Optional path to mount the agent on the Devbox.
98+
99+
Required for git and object agents. Use absolute path (e.g., /home/user/agent)
100+
"""
101+
102+
103+
Mount: TypeAlias = Union[MountObjectMountParameters, MountAgentMountParameters]

src/runloop_api_client/types/devbox_execute_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class DevboxExecuteParams(TypedDict, total=False):
1818
"""
1919

2020
command_id: Required[str]
21-
"""The command ID for idempotency and tracking"""
21+
"""The command ID in UUIDv7 string format for idempotency and tracking"""
2222

2323
optimistic_timeout: Optional[int]
2424
"""Timeout in seconds to wait for command completion.

src/runloop_api_client/types/repository_inspect_params.py

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

1010

1111
class RepositoryInspectParams(TypedDict, total=False):
12-
blueprint_id: Optional[str]
13-
"""ID of blueprint to use as base for resulting RepositoryVersion blueprint."""
14-
1512
github_auth_token: Optional[str]
1613
"""GitHub authentication token for accessing private repositories."""

tests/api_resources/test_devboxes.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ def test_method_create_with_all_params(self, client: Runloop) -> None:
8585
},
8686
},
8787
metadata={"foo": "string"},
88+
mounts=[
89+
{
90+
"object_id": "object_id",
91+
"object_path": "object_path",
92+
"type": "object_mount",
93+
}
94+
],
8895
name="name",
8996
repo_connection_id="repo_connection_id",
9097
secrets={"foo": "string"},
@@ -1432,6 +1439,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) -
14321439
},
14331440
},
14341441
metadata={"foo": "string"},
1442+
mounts=[
1443+
{
1444+
"object_id": "object_id",
1445+
"object_path": "object_path",
1446+
"type": "object_mount",
1447+
}
1448+
],
14351449
name="name",
14361450
repo_connection_id="repo_connection_id",
14371451
secrets={"foo": "string"},

tests/api_resources/test_repositories.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ def test_method_inspect(self, client: Runloop) -> None:
188188
def test_method_inspect_with_all_params(self, client: Runloop) -> None:
189189
repository = client.repositories.inspect(
190190
id="id",
191-
blueprint_id="blueprint_id",
192191
github_auth_token="github_auth_token",
193192
)
194193
assert_matches_type(RepositoryInspectionDetails, repository, path=["response"])
@@ -481,7 +480,6 @@ async def test_method_inspect(self, async_client: AsyncRunloop) -> None:
481480
async def test_method_inspect_with_all_params(self, async_client: AsyncRunloop) -> None:
482481
repository = await async_client.repositories.inspect(
483482
id="id",
484-
blueprint_id="blueprint_id",
485483
github_auth_token="github_auth_token",
486484
)
487485
assert_matches_type(RepositoryInspectionDetails, repository, path=["response"])

0 commit comments

Comments
 (0)