Skip to content

Commit 0d89f21

Browse files
stainless-app[bot]Reflexcursoragent
authored
release: 1.27.0 (#823)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Reflex <reflex@runloop.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d316188 commit 0d89f21

11 files changed

Lines changed: 166 additions & 9 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.24.0"
2+
".": "1.27.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 119
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-0b7cd0c2fc193b18189cd7f44cf45ece7726b5d485fb72577f7d235266432ea0.yml
3-
openapi_spec_hash: 78c340dbfb9d3d58b24ef318fc2a657b
4-
config_hash: 218b8d25038e627faab98532392ee9a0
1+
configured_endpoints: 120
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-50686c7a06e432373c5dd7e771ab1483a6ca0531b1dd9a10fc31c0cf2833bcdf.yml
3+
openapi_spec_hash: a554b4d3815148c094778b53bfe20b21
4+
config_hash: 6d102da8b9fcc3d0deb42d7a707e78c6

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## 1.27.0 (2026-07-28)
4+
5+
Full Changelog: [v1.24.0...v1.27.0](https://github.com/runloopai/api-client-python/compare/v1.24.0...v1.27.0)
6+
7+
### Features
8+
9+
* **mux:** wait_for_eviction endpoint for flex eviction notifications ([#10325](https://github.com/runloopai/api-client-python/issues/10325)) ([7e86af9](https://github.com/runloopai/api-client-python/commit/7e86af9421218becca73ebaf0aa110c40c2a2e1a))
10+
11+
12+
### Bug Fixes
13+
14+
* isolate long-polls and file transfers on separate HTTP/2 pools ([#825](https://github.com/runloopai/api-client-python/issues/825)) ([d316188](https://github.com/runloopai/api-client-python/commit/d3161880b655904c31664975bb6f210c4df623b7))
15+
* **mux:** field-level merge on network policy egress updates ([#10338](https://github.com/runloopai/api-client-python/issues/10338)) ([366a3ee](https://github.com/runloopai/api-client-python/commit/366a3eefecb5239ccd7842c7b333c77740fbe8bc))
16+
* **mux:** move eviction-watch SSE route off the /{id} slot ([#10409](https://github.com/runloopai/api-client-python/issues/10409)) ([61f4143](https://github.com/runloopai/api-client-python/commit/61f4143ae27b6efd1d1abda4a2ceceb725a1709d))
17+
18+
19+
### Chores
20+
21+
* **stainless:** generate watch_evictions as an SSE stream ([#10404](https://github.com/runloopai/api-client-python/issues/10404)) ([cb82bca](https://github.com/runloopai/api-client-python/commit/cb82bca1fe679a72499256738b18e2d270a321f8))
22+
323
## 1.24.0 (2026-07-22)
424

525
Full Changelog: [v1.23.3...v1.24.0](https://github.com/runloopai/api-client-python/compare/v1.23.3...v1.24.0)

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ Types:
201201
```python
202202
from runloop_api_client.types import (
203203
DevboxAsyncExecutionDetailView,
204+
DevboxEvictionEventView,
204205
DevboxExecutionDetailView,
205206
DevboxKillExecutionRequest,
206207
DevboxListView,
@@ -244,6 +245,7 @@ Methods:
244245
- <code title="post /v1/devboxes/{id}/suspend">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">suspend</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
245246
- <code title="post /v1/devboxes/{id}/upload_file">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">upload_file</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_upload_file_params.py">params</a>) -> object</code>
246247
- <code title="post /v1/devboxes/{devbox_id}/executions/{execution_id}/wait_for_status">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">wait_for_command</a>(execution_id, \*, devbox_id, \*\*<a href="src/runloop_api_client/types/devbox_wait_for_command_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_async_execution_detail_view.py">DevboxAsyncExecutionDetailView</a></code>
248+
- <code title="get /v1/devboxes/evictions/watch">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">watch_evictions</a>() -> <a href="./src/runloop_api_client/types/devbox_eviction_event_view.py">DevboxEvictionEventView</a></code>
247249
- <code title="post /v1/devboxes/{id}/write_file_contents">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">write_file_contents</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_write_file_contents_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_execution_detail_view.py">DevboxExecutionDetailView</a></code>
248250

249251

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "runloop_api_client"
3-
version = "1.24.0"
3+
version = "1.27.0"
44
description = "The official Python library for the runloop API"
55
dynamic = ["readme"]
66
license = "MIT"

src/runloop_api_client/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "runloop_api_client"
4-
__version__ = "1.24.0" # x-release-please-version
4+
__version__ = "1.27.0" # x-release-please-version

src/runloop_api_client/resources/devboxes/devboxes.py

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
LONG_POLL_CLIENT_BUFFER_SECONDS,
7070
EXEC_LONG_POLL_SERVER_MAX_SECONDS,
7171
)
72+
from ..._streaming import Stream, AsyncStream
7273
from ...pagination import (
7374
SyncDevboxesCursorIDPage,
7475
AsyncDevboxesCursorIDPage,
@@ -94,6 +95,7 @@
9495
from ...types.shared_params.mount import Mount
9596
from ...types.devbox_snapshot_view import DevboxSnapshotView
9697
from ...types.shared.launch_parameters import LaunchParameters as SharedLaunchParameters
98+
from ...types.devbox_eviction_event_view import DevboxEvictionEventView
9799
from ...types.devbox_resource_usage_view import DevboxResourceUsageView
98100
from ...types.devbox_execution_detail_view import DevboxExecutionDetailView
99101
from ...types.devbox_create_ssh_key_response import DevboxCreateSSHKeyResponse
@@ -1742,6 +1744,33 @@ def wait_for_command(
17421744
cast_to=DevboxAsyncExecutionDetailView,
17431745
)
17441746

1747+
def watch_evictions(
1748+
self,
1749+
*,
1750+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1751+
# The extra values given here take precedence over values defined on the client or passed to this method.
1752+
extra_headers: Headers | None = None,
1753+
extra_query: Query | None = None,
1754+
extra_body: Body | None = None,
1755+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
1756+
) -> Stream[DevboxEvictionEventView]:
1757+
"""
1758+
Subscribe, via server-sent events, to pending infrastructure evictions for every
1759+
Devbox in the account. On connect the stream emits one event per Devbox that
1760+
currently has a pending eviction, then one event as each further eviction is
1761+
scheduled. Best-effort and advisory: a Devbox stays running until its deadline,
1762+
and delivery is not guaranteed.
1763+
"""
1764+
return self._get(
1765+
"/v1/devboxes/evictions/watch",
1766+
options=make_request_options(
1767+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
1768+
),
1769+
cast_to=DevboxEvictionEventView,
1770+
stream=True,
1771+
stream_cls=Stream[DevboxEvictionEventView],
1772+
)
1773+
17451774
def write_file_contents(
17461775
self,
17471776
id: str,
@@ -3417,6 +3446,33 @@ async def wait_for_command(
34173446
cast_to=DevboxAsyncExecutionDetailView,
34183447
)
34193448

3449+
async def watch_evictions(
3450+
self,
3451+
*,
3452+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
3453+
# The extra values given here take precedence over values defined on the client or passed to this method.
3454+
extra_headers: Headers | None = None,
3455+
extra_query: Query | None = None,
3456+
extra_body: Body | None = None,
3457+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
3458+
) -> AsyncStream[DevboxEvictionEventView]:
3459+
"""
3460+
Subscribe, via server-sent events, to pending infrastructure evictions for every
3461+
Devbox in the account. On connect the stream emits one event per Devbox that
3462+
currently has a pending eviction, then one event as each further eviction is
3463+
scheduled. Best-effort and advisory: a Devbox stays running until its deadline,
3464+
and delivery is not guaranteed.
3465+
"""
3466+
return await self._get(
3467+
"/v1/devboxes/evictions/watch",
3468+
options=make_request_options(
3469+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
3470+
),
3471+
cast_to=DevboxEvictionEventView,
3472+
stream=True,
3473+
stream_cls=AsyncStream[DevboxEvictionEventView],
3474+
)
3475+
34203476
async def write_file_contents(
34213477
self,
34223478
id: str,
@@ -3555,6 +3611,9 @@ def __init__(self, devboxes: DevboxesResource) -> None:
35553611
self.wait_for_command = to_raw_response_wrapper(
35563612
devboxes.wait_for_command,
35573613
)
3614+
self.watch_evictions = to_raw_response_wrapper(
3615+
devboxes.watch_evictions,
3616+
)
35583617
self.write_file_contents = to_raw_response_wrapper(
35593618
devboxes.write_file_contents,
35603619
)
@@ -3651,6 +3710,9 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
36513710
self.wait_for_command = async_to_raw_response_wrapper(
36523711
devboxes.wait_for_command,
36533712
)
3713+
self.watch_evictions = async_to_raw_response_wrapper(
3714+
devboxes.watch_evictions,
3715+
)
36543716
self.write_file_contents = async_to_raw_response_wrapper(
36553717
devboxes.write_file_contents,
36563718
)
@@ -3747,6 +3809,9 @@ def __init__(self, devboxes: DevboxesResource) -> None:
37473809
self.wait_for_command = to_streamed_response_wrapper(
37483810
devboxes.wait_for_command,
37493811
)
3812+
self.watch_evictions = to_streamed_response_wrapper(
3813+
devboxes.watch_evictions,
3814+
)
37503815
self.write_file_contents = to_streamed_response_wrapper(
37513816
devboxes.write_file_contents,
37523817
)
@@ -3843,6 +3908,9 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
38433908
self.wait_for_command = async_to_streamed_response_wrapper(
38443909
devboxes.wait_for_command,
38453910
)
3911+
self.watch_evictions = async_to_streamed_response_wrapper(
3912+
devboxes.watch_evictions,
3913+
)
38463914
self.write_file_contents = async_to_streamed_response_wrapper(
38473915
devboxes.write_file_contents,
38483916
)

src/runloop_api_client/resources/network_policies.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ def update(
191191
) -> NetworkPolicyView:
192192
"""Update an existing NetworkPolicy.
193193
194-
All fields are optional.
194+
All fields are optional - null fields preserve
195+
existing values, provided fields replace entirely.
195196
196197
Args:
197198
allow_agent_gateway: If true, allows devbox egress to the agent gateway.
@@ -525,7 +526,8 @@ async def update(
525526
) -> NetworkPolicyView:
526527
"""Update an existing NetworkPolicy.
527528
528-
All fields are optional.
529+
All fields are optional - null fields preserve
530+
existing values, provided fields replace entirely.
529531
530532
Args:
531533
allow_agent_gateway: If true, allows devbox egress to the agent gateway.

src/runloop_api_client/types/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
from .scenario_start_run_params import ScenarioStartRunParams as ScenarioStartRunParams
111111
from .benchmark_start_run_params import BenchmarkStartRunParams as BenchmarkStartRunParams
112112
from .blueprint_build_parameters import BlueprintBuildParameters as BlueprintBuildParameters
113+
from .devbox_eviction_event_view import DevboxEvictionEventView as DevboxEvictionEventView
113114
from .devbox_execute_sync_params import DevboxExecuteSyncParams as DevboxExecuteSyncParams
114115
from .devbox_resource_usage_view import DevboxResourceUsageView as DevboxResourceUsageView
115116
from .gateway_config_list_params import GatewayConfigListParams as GatewayConfigListParams
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__ = ["DevboxEvictionEventView"]
6+
7+
8+
class DevboxEvictionEventView(BaseModel):
9+
devbox_id: str
10+
"""The ID of the Devbox with a pending eviction."""
11+
12+
eviction_deadline_ms: int
13+
"""Unix timestamp (milliseconds) after which the Devbox will be suspended.
14+
15+
Advisory and best-effort.
16+
"""

0 commit comments

Comments
 (0)