Skip to content

Commit 91854d5

Browse files
feat(devbox): remove this one
1 parent d6c2200 commit 91854d5

14 files changed

Lines changed: 74 additions & 21 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 98
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-5271153bd2f82579803953bd2fa1b9ea6466c979118804f64379fb14e9a9c436.yml
3-
openapi_spec_hash: 95ac224a4b0f10e9ba6129a86746c9d4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8ebd9dbfacb180ec9c980f5e46a814b0c8a3cb6063136db18780271d33a8dfa6.yml
3+
openapi_spec_hash: 12d4edec72b722945bade9419636d63e
44
config_hash: cb8534d20a68a49b92726bedd50f8bb1

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ def create(
189189
metadata: Optional[Dict[str, str]] | Omit = omit,
190190
mounts: Optional[Iterable[Mount]] | Omit = omit,
191191
name: Optional[str] | Omit = omit,
192+
network_policy_id: Optional[str] | Omit = omit,
192193
repo_connection_id: Optional[str] | Omit = omit,
193194
secrets: Optional[Dict[str, str]] | Omit = omit,
194195
snapshot_id: Optional[str] | Omit = omit,
@@ -235,6 +236,9 @@ def create(
235236
236237
name: (Optional) A user specified name to give the Devbox.
237238
239+
network_policy_id: (Optional) ID of the network policy to apply to this Devbox. If not specified,
240+
the default network policy will be used.
241+
238242
repo_connection_id: Repository connection id the devbox should source its base image from.
239243
240244
secrets: (Optional) Map of environment variable names to secret names. The secret values
@@ -269,6 +273,7 @@ def create(
269273
"metadata": metadata,
270274
"mounts": mounts,
271275
"name": name,
276+
"network_policy_id": network_policy_id,
272277
"repo_connection_id": repo_connection_id,
273278
"secrets": secrets,
274279
"snapshot_id": snapshot_id,
@@ -799,8 +804,8 @@ def execute(
799804
800805
last_n: Last n lines of standard error / standard out to return (default: 100)
801806
802-
optimistic_timeout: Timeout in seconds to wait for command completion. Operation is not killed. Max
803-
is 600 seconds.
807+
optimistic_timeout: Timeout in seconds to wait for command completion, up to 25 seconds. Defaults to
808+
25 seconds. Operation is not killed.
804809
805810
shell_name: The name of the persistent shell to create or use if already created. When using
806811
a persistent shell, the command will run from the directory at the end of the
@@ -1569,7 +1574,7 @@ def wait_for_command(
15691574
) -> DevboxAsyncExecutionDetailView:
15701575
"""
15711576
Polls the asynchronous execution's status until it reaches one of the desired
1572-
statuses or times out. Defaults to 60 seconds.
1577+
statuses or times out. Max is 25 seconds.
15731578
15741579
Args:
15751580
statuses: The command execution statuses to wait for. At least one status must be
@@ -1578,8 +1583,8 @@ def wait_for_command(
15781583
15791584
last_n: Last n lines of standard error / standard out to return (default: 100)
15801585
1581-
timeout_seconds: (Optional) Timeout in seconds to wait for the status, up to 60 seconds. Defaults
1582-
to 60 seconds.
1586+
timeout_seconds: (Optional) Timeout in seconds to wait for the status, up to 25 seconds. Defaults
1587+
to 25 seconds.
15831588
15841589
extra_headers: Send extra headers
15851590
@@ -1727,6 +1732,7 @@ async def create(
17271732
metadata: Optional[Dict[str, str]] | Omit = omit,
17281733
mounts: Optional[Iterable[Mount]] | Omit = omit,
17291734
name: Optional[str] | Omit = omit,
1735+
network_policy_id: Optional[str] | Omit = omit,
17301736
repo_connection_id: Optional[str] | Omit = omit,
17311737
secrets: Optional[Dict[str, str]] | Omit = omit,
17321738
snapshot_id: Optional[str] | Omit = omit,
@@ -1773,6 +1779,9 @@ async def create(
17731779
17741780
name: (Optional) A user specified name to give the Devbox.
17751781
1782+
network_policy_id: (Optional) ID of the network policy to apply to this Devbox. If not specified,
1783+
the default network policy will be used.
1784+
17761785
repo_connection_id: Repository connection id the devbox should source its base image from.
17771786
17781787
secrets: (Optional) Map of environment variable names to secret names. The secret values
@@ -1807,6 +1816,7 @@ async def create(
18071816
"metadata": metadata,
18081817
"mounts": mounts,
18091818
"name": name,
1819+
"network_policy_id": network_policy_id,
18101820
"repo_connection_id": repo_connection_id,
18111821
"secrets": secrets,
18121822
"snapshot_id": snapshot_id,
@@ -2334,8 +2344,8 @@ async def execute(
23342344
23352345
last_n: Last n lines of standard error / standard out to return (default: 100)
23362346
2337-
optimistic_timeout: Timeout in seconds to wait for command completion. Operation is not killed. Max
2338-
is 600 seconds.
2347+
optimistic_timeout: Timeout in seconds to wait for command completion, up to 25 seconds. Defaults to
2348+
25 seconds. Operation is not killed.
23392349
23402350
shell_name: The name of the persistent shell to create or use if already created. When using
23412351
a persistent shell, the command will run from the directory at the end of the
@@ -3105,7 +3115,7 @@ async def wait_for_command(
31053115
) -> DevboxAsyncExecutionDetailView:
31063116
"""
31073117
Polls the asynchronous execution's status until it reaches one of the desired
3108-
statuses or times out. Defaults to 60 seconds.
3118+
statuses or times out. Max is 25 seconds.
31093119
31103120
Args:
31113121
statuses: The command execution statuses to wait for. At least one status must be
@@ -3114,8 +3124,8 @@ async def wait_for_command(
31143124
31153125
last_n: Last n lines of standard error / standard out to return (default: 100)
31163126
3117-
timeout_seconds: (Optional) Timeout in seconds to wait for the status, up to 60 seconds. Defaults
3118-
to 60 seconds.
3127+
timeout_seconds: (Optional) Timeout in seconds to wait for the status, up to 25 seconds. Defaults
3128+
to 25 seconds.
31193129
31203130
extra_headers: Send extra headers
31213131

src/runloop_api_client/types/benchmark_run_view.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010

1111
class BenchmarkRunView(BaseModel):
1212
"""
13-
A BenchmarkRunView represents a run of a complete set of Scenarios, organized under a Benchmark.
13+
A BenchmarkRunView represents a run of a complete set of Scenarios, organized under a Benchmark or created by a BenchmarkJob.
1414
"""
1515

1616
id: str
1717
"""The ID of the BenchmarkRun."""
1818

19-
benchmark_id: str
20-
"""The ID of the Benchmark."""
21-
2219
metadata: Dict[str, str]
2320
"""User defined metadata to attach to the benchmark run for organization."""
2421

@@ -28,6 +25,12 @@ class BenchmarkRunView(BaseModel):
2825
state: Literal["running", "canceled", "completed"]
2926
"""The state of the BenchmarkRun."""
3027

28+
benchmark_id: Optional[str] = None
29+
"""The ID of the Benchmark definition.
30+
31+
Present if run was created from a benchmark definition.
32+
"""
33+
3134
duration_ms: Optional[int] = None
3235
"""The duration for the BenchmarkRun to complete."""
3336

src/runloop_api_client/types/devbox_create_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ class DevboxBaseCreateParams(TypedDict, total=False):
4949
name: Optional[str]
5050
"""(Optional) A user specified name to give the Devbox."""
5151

52+
network_policy_id: Optional[str]
53+
"""(Optional) ID of the network policy to apply to this Devbox.
54+
55+
If not specified, the default network policy will be used.
56+
"""
57+
5258
repo_connection_id: Optional[str]
5359
"""Repository connection id the devbox should source its base image from."""
5460

src/runloop_api_client/types/devbox_execute_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ class DevboxExecuteParams(TypedDict, total=False):
2424
"""Last n lines of standard error / standard out to return (default: 100)"""
2525

2626
optimistic_timeout: Optional[int]
27-
"""Timeout in seconds to wait for command completion.
27+
"""Timeout in seconds to wait for command completion, up to 25 seconds.
2828
29-
Operation is not killed. Max is 600 seconds.
29+
Defaults to 25 seconds. Operation is not killed.
3030
"""
3131

3232
shell_name: Optional[str]

src/runloop_api_client/types/devbox_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class DevboxView(BaseModel):
8181
initiator_id: Optional[str] = None
8282
"""The ID of the initiator that created the Devbox."""
8383

84-
initiator_type: Optional[Literal["unknown", "api", "scenario"]] = None
84+
initiator_type: Optional[Literal["unknown", "api", "scenario", "scoring_validation"]] = None
8585
"""The type of initiator that created the Devbox."""
8686

8787
name: Optional[str] = None

src/runloop_api_client/types/devbox_wait_for_command_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DevboxWaitForCommandParams(TypedDict, total=False):
2222
"""Last n lines of standard error / standard out to return (default: 100)"""
2323

2424
timeout_seconds: Optional[int]
25-
"""(Optional) Timeout in seconds to wait for the status, up to 60 seconds.
25+
"""(Optional) Timeout in seconds to wait for the status, up to 25 seconds.
2626
27-
Defaults to 60 seconds.
27+
Defaults to 25 seconds.
2828
"""

src/runloop_api_client/types/shared/launch_parameters.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ class LaunchParameters(BaseModel):
7070
launch_commands: Optional[List[str]] = None
7171
"""Set of commands to be run at launch time, before the entrypoint process is run."""
7272

73+
network_policy_id: Optional[str] = None
74+
"""
75+
(Optional) ID of the network policy to apply to Devboxes launched with these
76+
parameters. When set on a Blueprint launch parameters, Devboxes created from it
77+
will inherit this policy unless explicitly overridden.
78+
"""
79+
7380
required_services: Optional[List[str]] = None
7481
"""A list of ContainerizedService names to be started when a Devbox is created.
7582

src/runloop_api_client/types/shared_params/launch_parameters.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ class LaunchParameters(TypedDict, total=False):
7272
launch_commands: Optional[SequenceNotStr[str]]
7373
"""Set of commands to be run at launch time, before the entrypoint process is run."""
7474

75+
network_policy_id: Optional[str]
76+
"""
77+
(Optional) ID of the network policy to apply to Devboxes launched with these
78+
parameters. When set on a Blueprint launch parameters, Devboxes created from it
79+
will inherit this policy unless explicitly overridden.
80+
"""
81+
7582
required_services: Optional[SequenceNotStr[str]]
7683
"""A list of ContainerizedService names to be started when a Devbox is created.
7784

tests/api_resources/scenarios/test_scorers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ def test_method_validate_with_all_params(self, client: Runloop) -> None:
202202
"custom_gb_memory": 0,
203203
"keep_alive_time_seconds": 0,
204204
"launch_commands": ["string"],
205+
"network_policy_id": "network_policy_id",
205206
"required_services": ["string"],
206207
"resource_size_request": "X_SMALL",
207208
"user_parameters": {
@@ -433,6 +434,7 @@ async def test_method_validate_with_all_params(self, async_client: AsyncRunloop)
433434
"custom_gb_memory": 0,
434435
"keep_alive_time_seconds": 0,
435436
"launch_commands": ["string"],
437+
"network_policy_id": "network_policy_id",
436438
"required_services": ["string"],
437439
"resource_size_request": "X_SMALL",
438440
"user_parameters": {

0 commit comments

Comments
 (0)