Skip to content

Commit dbf7a2e

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

13 files changed

Lines changed: 135 additions & 37 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 92
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-6b65a42b74406a77acb03ddb582288396d7af64df16eebf887c77246d3a54470.yml
33
openapi_spec_hash: aeb9f595d53412926ef507174f33a1a1
4-
config_hash: f9f7bc60c36f103c77333d9149cd3e46
4+
config_hash: f008c82c6ae5099c9a4b8e1fce1e15f1

api.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
# Shared Types
22

33
```python
4-
from runloop_api_client.types import AfterIdle, CodeMountParameters, LaunchParameters, RunProfile
4+
from runloop_api_client.types import (
5+
AfterIdle,
6+
AgentMountParameters,
7+
CodeMountParameters,
8+
LaunchParameters,
9+
Mount,
10+
ObjectMountParameters,
11+
RunProfile,
12+
)
513
```
614

715
# Benchmarks

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
from ...lib.polling_async import async_poll_until
101101
from ...types.devbox_view import DevboxView
102102
from ...types.devbox_tunnel_view import DevboxTunnelView
103+
from ...types.shared_params.mount import Mount
103104
from ...types.devbox_snapshot_view import DevboxSnapshotView
104105
from ...types.shared.launch_parameters import LaunchParameters as SharedLaunchParameters
105106
from ...types.devbox_execution_detail_view import DevboxExecutionDetailView
@@ -185,7 +186,7 @@ def create(
185186
file_mounts: Optional[Dict[str, str]] | Omit = omit,
186187
launch_parameters: Optional[LaunchParameters] | Omit = omit,
187188
metadata: Optional[Dict[str, str]] | Omit = omit,
188-
mounts: Optional[Iterable[devbox_create_params.Mount]] | Omit = omit,
189+
mounts: Optional[Iterable[Mount]] | Omit = omit,
189190
name: Optional[str] | Omit = omit,
190191
repo_connection_id: Optional[str] | Omit = omit,
191192
secrets: Optional[Dict[str, str]] | Omit = omit,
@@ -1637,7 +1638,7 @@ async def create(
16371638
file_mounts: Optional[Dict[str, str]] | Omit = omit,
16381639
launch_parameters: Optional[LaunchParameters] | Omit = omit,
16391640
metadata: Optional[Dict[str, str]] | Omit = omit,
1640-
mounts: Optional[Iterable[devbox_create_params.Mount]] | Omit = omit,
1641+
mounts: Optional[Iterable[Mount]] | Omit = omit,
16411642
name: Optional[str] | Omit = omit,
16421643
repo_connection_id: Optional[str] | Omit = omit,
16431644
secrets: Optional[Dict[str, str]] | Omit = omit,

src/runloop_api_client/types/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
from __future__ import annotations
44

55
from .shared import (
6+
Mount as Mount,
67
AfterIdle as AfterIdle,
78
RunProfile as RunProfile,
89
LaunchParameters as LaunchParameters,
910
CodeMountParameters as CodeMountParameters,
11+
AgentMountParameters as AgentMountParameters,
12+
ObjectMountParameters as ObjectMountParameters,
1013
)
1114
from .devbox_view import DevboxView as DevboxView
1215
from .object_view import ObjectView as ObjectView

src/runloop_api_client/types/devbox_create_params.py

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22

33
from __future__ import annotations
44

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

8+
from .shared_params.mount import Mount
89
from .shared_params.launch_parameters import LaunchParameters
910
from .shared_params.code_mount_parameters import CodeMountParameters
1011

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

1314

1415
class DevboxCreateParams(TypedDict, total=False):
@@ -71,33 +72,3 @@ class DevboxCreateParams(TypedDict, total=False):
7172
7273
Only one of (Snapshot ID, Blueprint ID, Blueprint name) should be specified.
7374
"""
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]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .mount import Mount as Mount
34
from .after_idle import AfterIdle as AfterIdle
45
from .run_profile import RunProfile as RunProfile
56
from .launch_parameters import LaunchParameters as LaunchParameters
67
from .code_mount_parameters import CodeMountParameters as CodeMountParameters
8+
from .agent_mount_parameters import AgentMountParameters as AgentMountParameters
9+
from .object_mount_parameters import ObjectMountParameters as ObjectMountParameters
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import Optional
4+
from typing_extensions import Literal
5+
6+
from ..._models import BaseModel
7+
8+
__all__ = ["AgentMountParameters"]
9+
10+
11+
class AgentMountParameters(BaseModel):
12+
agent_id: str
13+
"""The ID of the agent to mount."""
14+
15+
type: Literal["agent_mount"]
16+
17+
agent_path: Optional[str] = None
18+
"""Optional path to mount the agent on the Devbox.
19+
20+
Required for git and object agents. Use absolute path (e.g., /home/user/agent)
21+
"""
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import Union
4+
from typing_extensions import Annotated, TypeAlias
5+
6+
from ..._utils import PropertyInfo
7+
from .agent_mount_parameters import AgentMountParameters
8+
from .object_mount_parameters import ObjectMountParameters
9+
10+
__all__ = ["Mount"]
11+
12+
Mount: TypeAlias = Annotated[Union[ObjectMountParameters, AgentMountParameters], PropertyInfo(discriminator="type")]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing_extensions import Literal
4+
5+
from ..._models import BaseModel
6+
7+
__all__ = ["ObjectMountParameters"]
8+
9+
10+
class ObjectMountParameters(BaseModel):
11+
object_id: str
12+
"""The ID of the object to write."""
13+
14+
object_path: str
15+
"""The path to write the object on the Devbox.
16+
17+
Use absolute path of object (ie /home/user/object.txt, or directory if archive
18+
/home/user/archive_dir)
19+
"""
20+
21+
type: Literal["object_mount"]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .mount import Mount as Mount
34
from .after_idle import AfterIdle as AfterIdle
45
from .run_profile import RunProfile as RunProfile
56
from .launch_parameters import LaunchParameters as LaunchParameters
67
from .code_mount_parameters import CodeMountParameters as CodeMountParameters
8+
from .agent_mount_parameters import AgentMountParameters as AgentMountParameters
9+
from .object_mount_parameters import ObjectMountParameters as ObjectMountParameters

0 commit comments

Comments
 (0)