From 88a9632507cd422bc43eeb3886ac330c2ab3ba44 Mon Sep 17 00:00:00 2001 From: sid-rl Date: Wed, 27 May 2026 12:00:37 -0700 Subject: [PATCH 01/12] fix: revert workflow actions to runloopai forks (#805) Co-authored-by: Claude Opus 4.6 --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10b9a3a85..3db832c9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/runloop-python' && 'depot-ubuntu-24.04' || 'ubuntu-slim' }} if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - - uses: actions/checkout@v6 + - uses: runloopai/checkout@main - name: Install uv uses: runloopai/setup-uv@main @@ -46,7 +46,7 @@ jobs: id-token: write runs-on: ${{ github.repository == 'stainless-sdks/runloop-python' && 'depot-ubuntu-24.04' || 'ubuntu-slim' }} steps: - - uses: actions/checkout@v6 + - uses: runloopai/checkout@main - name: Install uv uses: runloopai/setup-uv@main @@ -64,7 +64,7 @@ jobs: github.repository == 'stainless-sdks/runloop-python' && !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc - uses: actions/github-script@v8 + uses: runloopai/github-script@main with: script: core.setOutput('github_token', await core.getIDToken()); @@ -84,7 +84,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/runloop-python' && 'depot-ubuntu-24.04' || 'ubuntu-slim' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v6 + - uses: runloopai/checkout@main - name: Install uv uses: runloopai/setup-uv@main diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 7ec40f7d4..7f148e54b 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-slim steps: - - uses: actions/checkout@v6 + - uses: runloopai/checkout@main - name: Install uv uses: runloopai/setup-uv@main diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 364178039..4ec1877db 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'runloopai/api-client-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v6 + - uses: runloopai/checkout@main - name: Check release environment run: | From 2fdce8362f9b6b359636e390b1e1c142f3b77da0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 21:05:35 +0000 Subject: [PATCH 02/12] release: 1.22.0 (#804) Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: tode-rl --- .release-please-manifest.json | 2 +- .stats.yml | 6 +- CHANGELOG.md | 22 ++++++ api.md | 3 + pyproject.toml | 2 +- src/runloop_api_client/_version.py | 2 +- src/runloop_api_client/resources/agents.py | 4 +- .../resources/blueprints.py | 24 +++++-- .../resources/devboxes/devboxes.py | 18 ++--- .../resources/gateway_configs.py | 6 +- src/runloop_api_client/resources/pty.py | 72 ++++++++----------- .../resources/scenarios/scenarios.py | 12 ++-- src/runloop_api_client/types/__init__.py | 3 + .../types/agent_create_params.py | 2 +- src/runloop_api_client/types/agent_view.py | 2 +- .../types/benchmark_job_create_params.py | 28 +++----- .../types/benchmark_job_view.py | 32 +++------ .../types/blueprint_build_parameters.py | 6 +- ...blueprint_create_from_inspection_params.py | 6 +- .../types/blueprint_create_params.py | 6 +- .../types/blueprint_preview_params.py | 6 +- .../types/blueprint_view.py | 8 ++- .../types/devbox_create_params.py | 15 ++-- src/runloop_api_client/types/devbox_view.py | 32 ++++++--- .../types/gateway_config_update_params.py | 9 ++- .../types/scenario_create_params.py | 5 +- .../types/scenario_environment.py | 6 +- .../types/scenario_environment_param.py | 6 +- .../types/scenario_run_view.py | 5 +- .../types/scenario_update_params.py | 5 +- src/runloop_api_client/types/scenario_view.py | 5 +- .../types/shared/__init__.py | 3 + .../types/shared/agent_source.py | 16 ++--- .../types/shared/launch_parameters.py | 66 +++++------------ .../types/shared/lifecycle_configuration.py | 38 ++++++++++ .../types/shared/lifecycle_hooks.py | 28 ++++++++ .../types/shared/resume_triggers.py | 17 +++++ .../types/shared/run_profile.py | 6 +- .../types/shared_params/__init__.py | 3 + .../types/shared_params/agent_source.py | 16 ++--- .../types/shared_params/launch_parameters.py | 66 +++++------------ .../shared_params/lifecycle_configuration.py | 40 +++++++++++ .../types/shared_params/lifecycle_hooks.py | 31 ++++++++ .../types/shared_params/resume_triggers.py | 18 +++++ .../types/shared_params/run_profile.py | 6 +- tests/api_resources/test_benchmarks.py | 8 +++ tests/api_resources/test_blueprints.py | 24 +++++++ tests/api_resources/test_devboxes.py | 8 +++ tests/api_resources/test_scenarios.py | 24 +++++++ 49 files changed, 521 insertions(+), 257 deletions(-) create mode 100644 src/runloop_api_client/types/shared/lifecycle_configuration.py create mode 100644 src/runloop_api_client/types/shared/lifecycle_hooks.py create mode 100644 src/runloop_api_client/types/shared/resume_triggers.py create mode 100644 src/runloop_api_client/types/shared_params/lifecycle_configuration.py create mode 100644 src/runloop_api_client/types/shared_params/lifecycle_hooks.py create mode 100644 src/runloop_api_client/types/shared_params/resume_triggers.py diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ba231b076..397c4203e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.21.0" + ".": "1.22.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 75a9a5bb0..e0dbe7824 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 119 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-6ec03cfc156036a0758aebc523b469f3007de431312c536c434efe795e1892e7.yml -openapi_spec_hash: 092761a0209e0950cfd8f262a981adb1 -config_hash: 06faf3176c48bf2b258730ce50809f0f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-7235763cbdfd60834a897f356688d758b598a1dd723623330ea398dea2abea68.yml +openapi_spec_hash: 01b9dbab4b732e4b83952debd108e404 +config_hash: 444e00951b440bf92e7548b2807584a4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 07431324c..93640514e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## 1.22.0 (2026-05-27) + +Full Changelog: [v1.21.0...v1.22.0](https://github.com/runloopai/api-client-python/compare/v1.21.0...v1.22.0) + +### Features + +* add reflex initiator type, hidden param ([#9350](https://github.com/runloopai/api-client-python/issues/9350)) ([5922abf](https://github.com/runloopai/api-client-python/commit/5922abfd135589b229cb64ea23750d34fede857f)) +* **api:** expose lifecycle_hooks on LaunchParameters lifecycle ([#9115](https://github.com/runloopai/api-client-python/issues/9115)) ([c9c7c37](https://github.com/runloopai/api-client-python/commit/c9c7c37c2a38f91142b0b28d1e5cbc183b8ee53e)) +* **mux:** initial changes to enable http/2 ([#8936](https://github.com/runloopai/api-client-python/issues/8936)) ([71ce0bf](https://github.com/runloopai/api-client-python/commit/71ce0bf9ac98599b41a9cc6d16a3333c8b70e977)) + + +### Bug Fixes + +* clean up PTY and lifecycle hook OpenAPI descriptions ([#9502](https://github.com/runloopai/api-client-python/issues/9502)) ([f986282](https://github.com/runloopai/api-client-python/commit/f986282230c815acae4cf9d81685b182ca78ebfa)) +* **mux:** strip internal stub note from PTY OpenAPI descriptions ([#9315](https://github.com/runloopai/api-client-python/issues/9315)) ([214629e](https://github.com/runloopai/api-client-python/commit/214629e9281c38ff75b5769e13b4b977a346bb04)) +* revert workflow actions to runloopai forks ([#805](https://github.com/runloopai/api-client-python/issues/805)) ([88a9632](https://github.com/runloopai/api-client-python/commit/88a9632507cd422bc43eeb3886ac330c2ab3ba44)) + + +### Chores + +* Update stainless.yml, bump AGENTS.md to keep this updated ([#9268](https://github.com/runloopai/api-client-python/issues/9268)) ([5d86ef5](https://github.com/runloopai/api-client-python/commit/5d86ef5240920ba4b6de9e59456aea3c0971e3ef)) + ## 1.21.0 (2026-05-13) Full Changelog: [v1.20.3...v1.21.0](https://github.com/runloopai/api-client-python/compare/v1.20.3...v1.21.0) diff --git a/api.md b/api.md index 2f48b034e..30535e6f1 100644 --- a/api.md +++ b/api.md @@ -8,8 +8,11 @@ from runloop_api_client.types import ( BrokerMount, CodeMountParameters, LaunchParameters, + LifecycleConfiguration, + LifecycleHooks, Mount, ObjectMount, + ResumeTriggers, RunProfile, ) ``` diff --git a/pyproject.toml b/pyproject.toml index c1f57fbd6..1b48f1988 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runloop_api_client" -version = "1.21.0" +version = "1.22.0" description = "The official Python library for the runloop API" dynamic = ["readme"] license = "MIT" diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py index e94914292..27a4b2948 100644 --- a/src/runloop_api_client/_version.py +++ b/src/runloop_api_client/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "runloop_api_client" -__version__ = "1.21.0" # x-release-please-version +__version__ = "1.22.0" # x-release-please-version diff --git a/src/runloop_api_client/resources/agents.py b/src/runloop_api_client/resources/agents.py index 6ea0f6b73..cef357709 100644 --- a/src/runloop_api_client/resources/agents.py +++ b/src/runloop_api_client/resources/agents.py @@ -68,7 +68,7 @@ def create( Args: name: The name of the Agent. - source: The source configuration for the Agent. + source: Agent source configuration. version: Optional version identifier for the Agent. For npm/pip sources this is typically a semver string (e.g. '2.0.65'). For git sources it can be a branch or tag. @@ -377,7 +377,7 @@ async def create( Args: name: The name of the Agent. - source: The source configuration for the Agent. + source: Agent source configuration. version: Optional version identifier for the Agent. For npm/pip sources this is typically a semver string (e.g. '2.0.65'). For git sources it can be a branch or tag. diff --git a/src/runloop_api_client/resources/blueprints.py b/src/runloop_api_client/resources/blueprints.py index 73b15014b..79ee985a3 100644 --- a/src/runloop_api_client/resources/blueprints.py +++ b/src/runloop_api_client/resources/blueprints.py @@ -177,7 +177,9 @@ def create( file_mounts: (Optional) Map of paths and file contents to write before setup. - launch_parameters: Parameters to configure your Devbox at launch time. + launch_parameters: LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. metadata: (Optional) User defined metadata for the Blueprint. @@ -529,7 +531,9 @@ def create_from_inspection( file_mounts: (Optional) Map of paths and file contents to write before setup. - launch_parameters: Parameters to configure your Devbox at launch time. + launch_parameters: LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. metadata: (Optional) User defined metadata for the Blueprint. @@ -722,7 +726,9 @@ def preview( file_mounts: (Optional) Map of paths and file contents to write before setup. - launch_parameters: Parameters to configure your Devbox at launch time. + launch_parameters: LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. metadata: (Optional) User defined metadata for the Blueprint. @@ -858,7 +864,9 @@ async def create( file_mounts: (Optional) Map of paths and file contents to write before setup. - launch_parameters: Parameters to configure your Devbox at launch time. + launch_parameters: LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. metadata: (Optional) User defined metadata for the Blueprint. @@ -1210,7 +1218,9 @@ async def create_from_inspection( file_mounts: (Optional) Map of paths and file contents to write before setup. - launch_parameters: Parameters to configure your Devbox at launch time. + launch_parameters: LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. metadata: (Optional) User defined metadata for the Blueprint. @@ -1403,7 +1413,9 @@ async def preview( file_mounts: (Optional) Map of paths and file contents to write before setup. - launch_parameters: Parameters to configure your Devbox at launch time. + launch_parameters: LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. metadata: (Optional) User defined metadata for the Blueprint. diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index 7948b97d2..166ab97d2 100644 --- a/src/runloop_api_client/resources/devboxes/devboxes.py +++ b/src/runloop_api_client/resources/devboxes/devboxes.py @@ -216,7 +216,9 @@ def create( the real API key. Example: {'GWS_ANTHROPIC': {'gateway': 'anthropic', 'secret': 'my_claude_key'}} - launch_parameters: Parameters to configure the resources and launch time behavior of the Devbox. + launch_parameters: LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. mcp: [Beta] (Optional) MCP specifications for MCP server access. Map key is the environment variable name for the MCP token envelope. Each spec links an MCP @@ -240,9 +242,8 @@ def create( snapshot_id: Snapshot ID to use for the Devbox. Only one of (Snapshot ID, Blueprint ID, Blueprint name) should be specified. - tunnel: (Optional) Configuration for creating a V2 tunnel at Devbox launch time. When - specified, a tunnel will be automatically provisioned and the tunnel details - will be included in the Devbox response. + tunnel: Configuration for creating a V2 tunnel. When specified at Devbox creation, a + tunnel will be automatically provisioned. extra_headers: Send extra headers @@ -1877,7 +1878,9 @@ async def create( the real API key. Example: {'GWS_ANTHROPIC': {'gateway': 'anthropic', 'secret': 'my_claude_key'}} - launch_parameters: Parameters to configure the resources and launch time behavior of the Devbox. + launch_parameters: LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. mcp: [Beta] (Optional) MCP specifications for MCP server access. Map key is the environment variable name for the MCP token envelope. Each spec links an MCP @@ -1901,9 +1904,8 @@ async def create( snapshot_id: Snapshot ID to use for the Devbox. Only one of (Snapshot ID, Blueprint ID, Blueprint name) should be specified. - tunnel: (Optional) Configuration for creating a V2 tunnel at Devbox launch time. When - specified, a tunnel will be automatically provisioned and the tunnel details - will be included in the Devbox response. + tunnel: Configuration for creating a V2 tunnel. When specified at Devbox creation, a + tunnel will be automatically provisioned. extra_headers: Send extra headers diff --git a/src/runloop_api_client/resources/gateway_configs.py b/src/runloop_api_client/resources/gateway_configs.py index 7874f7a79..799e730a6 100644 --- a/src/runloop_api_client/resources/gateway_configs.py +++ b/src/runloop_api_client/resources/gateway_configs.py @@ -160,7 +160,8 @@ def update( All fields are optional. Args: - auth_mechanism: New authentication mechanism for applying credentials to proxied requests. + auth_mechanism: Defines how credentials are applied to HTTP requests when proxying through the + gateway. description: New description for this gateway configuration. @@ -440,7 +441,8 @@ async def update( All fields are optional. Args: - auth_mechanism: New authentication mechanism for applying credentials to proxied requests. + auth_mechanism: Defines how credentials are applied to HTTP requests when proxying through the + gateway. description: New description for this gateway configuration. diff --git a/src/runloop_api_client/resources/pty.py b/src/runloop_api_client/resources/pty.py index dc1a837b5..9a102025c 100644 --- a/src/runloop_api_client/resources/pty.py +++ b/src/runloop_api_client/resources/pty.py @@ -68,22 +68,18 @@ def connect( effect. The response returns a PtyConnectView containing connect_url (a server-relative path to the WebSocket data plane), idle_ttl_seconds (how long this session is retained after the last client disconnects), and the resulting - cols/rows. The interactive byte stream itself is intentionally not modeled in - OpenAPI; see the controller-level documentation for the WebSocket close-code - conventions. The single-attach contract is enforced when a client opens the - WebSocket data plane, not on this bootstrap call: bootstrap always succeeds for - a valid session_name, even if another client is currently attached. Rejection of - a second concurrent attach happens at WebSocket upgrade time. If the active - client disconnects, the session is preserved for the idle TTL so a later connect - using the same session_name resumes the same shell. After the TTL expires, after - an explicit close control action, or after the underlying Devbox lifecycle - replaces the PTY process (such as through suspend/resume), a later request with - the same session_name creates a fresh PTY session without the previous shell - state. - - Documentation note: this operation is published from mux strictly as an OpenAPI - contract stub for the PTY service control plane. It is not evidence that mux - itself serves the interactive PTY transport. + cols/rows. The interactive terminal byte stream is exchanged over the WebSocket + data plane and is not modeled in this OpenAPI contract; clients should connect + to connect_url and exchange raw binary frames for terminal I/O. The + single-attach contract is enforced when a client opens the WebSocket data plane, + not on this bootstrap call: bootstrap always succeeds for a valid session_name, + even if another client is currently attached. Rejection of a second concurrent + attach happens at WebSocket upgrade time. If the active client disconnects, the + session is preserved for the idle TTL so a later connect using the same + session_name resumes the same shell. After the TTL expires, after an explicit + close control action, or after the underlying Devbox lifecycle replaces the PTY + process (such as through suspend/resume), a later request with the same + session_name creates a fresh PTY session without the previous shell state. Args: cols: Optional initial terminal width in character cells (1..=1000). Defaults to 80 @@ -141,8 +137,8 @@ def control( """Applies a PTY control operation to an existing session. The action field selects - the operation; the other fields in PtyControlParameters are interpreted only - when they are relevant to the chosen action. + the operation; the other fields in PtyControlParams are interpreted only when + they are relevant to the chosen action. resize: cols and rows are required and must each be in 1..=1000. A 0 or out-of-range value returns 400. The new winsize is applied to the PTY master and @@ -158,10 +154,6 @@ def control( from the server's session cache. A subsequent connect with the same session_name will create a fresh PTY session. - Documentation note: this operation is published from mux strictly as an OpenAPI - contract stub for the PTY service control plane. It is not evidence that mux - itself serves the interactive PTY transport. - Args: extra_headers: Send extra headers @@ -241,22 +233,18 @@ async def connect( effect. The response returns a PtyConnectView containing connect_url (a server-relative path to the WebSocket data plane), idle_ttl_seconds (how long this session is retained after the last client disconnects), and the resulting - cols/rows. The interactive byte stream itself is intentionally not modeled in - OpenAPI; see the controller-level documentation for the WebSocket close-code - conventions. The single-attach contract is enforced when a client opens the - WebSocket data plane, not on this bootstrap call: bootstrap always succeeds for - a valid session_name, even if another client is currently attached. Rejection of - a second concurrent attach happens at WebSocket upgrade time. If the active - client disconnects, the session is preserved for the idle TTL so a later connect - using the same session_name resumes the same shell. After the TTL expires, after - an explicit close control action, or after the underlying Devbox lifecycle - replaces the PTY process (such as through suspend/resume), a later request with - the same session_name creates a fresh PTY session without the previous shell - state. - - Documentation note: this operation is published from mux strictly as an OpenAPI - contract stub for the PTY service control plane. It is not evidence that mux - itself serves the interactive PTY transport. + cols/rows. The interactive terminal byte stream is exchanged over the WebSocket + data plane and is not modeled in this OpenAPI contract; clients should connect + to connect_url and exchange raw binary frames for terminal I/O. The + single-attach contract is enforced when a client opens the WebSocket data plane, + not on this bootstrap call: bootstrap always succeeds for a valid session_name, + even if another client is currently attached. Rejection of a second concurrent + attach happens at WebSocket upgrade time. If the active client disconnects, the + session is preserved for the idle TTL so a later connect using the same + session_name resumes the same shell. After the TTL expires, after an explicit + close control action, or after the underlying Devbox lifecycle replaces the PTY + process (such as through suspend/resume), a later request with the same + session_name creates a fresh PTY session without the previous shell state. Args: cols: Optional initial terminal width in character cells (1..=1000). Defaults to 80 @@ -314,8 +302,8 @@ async def control( """Applies a PTY control operation to an existing session. The action field selects - the operation; the other fields in PtyControlParameters are interpreted only - when they are relevant to the chosen action. + the operation; the other fields in PtyControlParams are interpreted only when + they are relevant to the chosen action. resize: cols and rows are required and must each be in 1..=1000. A 0 or out-of-range value returns 400. The new winsize is applied to the PTY master and @@ -331,10 +319,6 @@ async def control( from the server's session cache. A subsequent connect with the same session_name will create a fresh PTY session. - Documentation note: this operation is published from mux strictly as an OpenAPI - contract stub for the PTY service control plane. It is not evidence that mux - itself serves the interactive PTY transport. - Args: extra_headers: Send extra headers diff --git a/src/runloop_api_client/resources/scenarios/scenarios.py b/src/runloop_api_client/resources/scenarios/scenarios.py index e3ce8c91b..084fab761 100644 --- a/src/runloop_api_client/resources/scenarios/scenarios.py +++ b/src/runloop_api_client/resources/scenarios/scenarios.py @@ -115,7 +115,8 @@ def create( scoring_contract: The scoring contract for the Scenario. - environment_parameters: The Environment in which the Scenario will run. + environment_parameters: ScenarioEnvironmentParameters specify the environment in which a Scenario will + be run. metadata: User defined metadata to attach to the scenario for organization. @@ -233,7 +234,8 @@ def update( entirely. Args: - environment_parameters: The Environment in which the Scenario will run. + environment_parameters: ScenarioEnvironmentParameters specify the environment in which a Scenario will + be run. input_context: The input context for the Scenario. @@ -637,7 +639,8 @@ async def create( scoring_contract: The scoring contract for the Scenario. - environment_parameters: The Environment in which the Scenario will run. + environment_parameters: ScenarioEnvironmentParameters specify the environment in which a Scenario will + be run. metadata: User defined metadata to attach to the scenario for organization. @@ -755,7 +758,8 @@ async def update( entirely. Args: - environment_parameters: The Environment in which the Scenario will run. + environment_parameters: ScenarioEnvironmentParameters specify the environment in which a Scenario will + be run. input_context: The input context for the Scenario. diff --git a/src/runloop_api_client/types/__init__.py b/src/runloop_api_client/types/__init__.py index b28ef2790..428a5a7a2 100644 --- a/src/runloop_api_client/types/__init__.py +++ b/src/runloop_api_client/types/__init__.py @@ -10,8 +10,11 @@ AgentSource as AgentSource, BrokerMount as BrokerMount, ObjectMount as ObjectMount, + LifecycleHooks as LifecycleHooks, + ResumeTriggers as ResumeTriggers, LaunchParameters as LaunchParameters, CodeMountParameters as CodeMountParameters, + LifecycleConfiguration as LifecycleConfiguration, ) from .axon_view import AxonView as AxonView from .agent_view import AgentView as AgentView diff --git a/src/runloop_api_client/types/agent_create_params.py b/src/runloop_api_client/types/agent_create_params.py index c1b70a046..ad97cc4f4 100644 --- a/src/runloop_api_client/types/agent_create_params.py +++ b/src/runloop_api_client/types/agent_create_params.py @@ -15,7 +15,7 @@ class AgentCreateParams(TypedDict, total=False): """The name of the Agent.""" source: Optional[AgentSource] - """The source configuration for the Agent.""" + """Agent source configuration.""" version: Optional[str] """Optional version identifier for the Agent. diff --git a/src/runloop_api_client/types/agent_view.py b/src/runloop_api_client/types/agent_view.py index d77527731..6139fd244 100644 --- a/src/runloop_api_client/types/agent_view.py +++ b/src/runloop_api_client/types/agent_view.py @@ -24,7 +24,7 @@ class AgentView(BaseModel): """The name of the Agent.""" source: Optional[AgentSource] = None - """The source configuration for the Agent.""" + """Agent source configuration.""" version: Optional[str] = None """Optional version identifier for the Agent. diff --git a/src/runloop_api_client/types/benchmark_job_create_params.py b/src/runloop_api_client/types/benchmark_job_create_params.py index 8ac3a5475..f9be11555 100644 --- a/src/runloop_api_client/types/benchmark_job_create_params.py +++ b/src/runloop_api_client/types/benchmark_job_create_params.py @@ -43,7 +43,7 @@ class SpecHarborJobSpec(TypedDict, total=False): class SpecBenchmarkDefinitionJobSpecAgentConfigAgentEnvironment(TypedDict, total=False): - """Environment configuration to use for this agent""" + """Environment configuration for an agent in a benchmark job""" environment_variables: Optional[Dict[str, str]] """Environment variables to set when launching the agent.""" @@ -64,7 +64,7 @@ class SpecBenchmarkDefinitionJobSpecAgentConfig(TypedDict, total=False): type: Required[Literal["job_agent"]] agent_environment: Optional[SpecBenchmarkDefinitionJobSpecAgentConfigAgentEnvironment] - """Environment configuration to use for this agent""" + """Environment configuration for an agent in a benchmark job""" agent_id: Optional[str] """ID of the agent to use (optional if agent exists by name)""" @@ -80,10 +80,7 @@ class SpecBenchmarkDefinitionJobSpecAgentConfig(TypedDict, total=False): class SpecBenchmarkDefinitionJobSpecOrchestratorConfig(TypedDict, total=False): - """Orchestrator configuration (optional overrides). - - If not provided, default values will be used. - """ + """Orchestrator configuration for benchmark job execution""" n_attempts: Optional[int] """Number of retry attempts on failure (default: 0). @@ -125,14 +122,11 @@ class SpecBenchmarkDefinitionJobSpec(TypedDict, total=False): type: Required[Literal["benchmark"]] orchestrator_config: Optional[SpecBenchmarkDefinitionJobSpecOrchestratorConfig] - """Orchestrator configuration (optional overrides). - - If not provided, default values will be used. - """ + """Orchestrator configuration for benchmark job execution""" class SpecScenarioDefinitionJobSpecAgentConfigAgentEnvironment(TypedDict, total=False): - """Environment configuration to use for this agent""" + """Environment configuration for an agent in a benchmark job""" environment_variables: Optional[Dict[str, str]] """Environment variables to set when launching the agent.""" @@ -153,7 +147,7 @@ class SpecScenarioDefinitionJobSpecAgentConfig(TypedDict, total=False): type: Required[Literal["job_agent"]] agent_environment: Optional[SpecScenarioDefinitionJobSpecAgentConfigAgentEnvironment] - """Environment configuration to use for this agent""" + """Environment configuration for an agent in a benchmark job""" agent_id: Optional[str] """ID of the agent to use (optional if agent exists by name)""" @@ -169,10 +163,7 @@ class SpecScenarioDefinitionJobSpecAgentConfig(TypedDict, total=False): class SpecScenarioDefinitionJobSpecOrchestratorConfig(TypedDict, total=False): - """Orchestrator configuration (optional overrides). - - If not provided, default values will be used. - """ + """Orchestrator configuration for benchmark job execution""" n_attempts: Optional[int] """Number of retry attempts on failure (default: 0). @@ -211,10 +202,7 @@ class SpecScenarioDefinitionJobSpec(TypedDict, total=False): type: Required[Literal["scenarios"]] orchestrator_config: Optional[SpecScenarioDefinitionJobSpecOrchestratorConfig] - """Orchestrator configuration (optional overrides). - - If not provided, default values will be used. - """ + """Orchestrator configuration for benchmark job execution""" Spec: TypeAlias = Union[SpecHarborJobSpec, SpecBenchmarkDefinitionJobSpec, SpecScenarioDefinitionJobSpec] diff --git a/src/runloop_api_client/types/benchmark_job_view.py b/src/runloop_api_client/types/benchmark_job_view.py index ec292432c..ac1694d5d 100644 --- a/src/runloop_api_client/types/benchmark_job_view.py +++ b/src/runloop_api_client/types/benchmark_job_view.py @@ -30,10 +30,7 @@ class BenchmarkOutcomeScenarioOutcomeFailureReason(BaseModel): - """Failure information if the scenario failed or timed out. - - Contains exception type and message. - """ + """Information about why a scenario execution failed""" exception_message: str """The exception message providing context""" @@ -60,10 +57,7 @@ class BenchmarkOutcomeScenarioOutcome(BaseModel): """Duration of the scenario execution in milliseconds.""" failure_reason: Optional[BenchmarkOutcomeScenarioOutcomeFailureReason] = None - """Failure information if the scenario failed or timed out. - - Contains exception type and message. - """ + """Information about why a scenario execution failed""" scenario_run_id: Optional[str] = None """The ID of the scenario run. @@ -121,7 +115,7 @@ class InProgressRunAgentConfigExternalAPIAgentConfig(BaseModel): class InProgressRunAgentConfigJobAgentConfigAgentEnvironment(BaseModel): - """Environment configuration to use for this agent""" + """Environment configuration for an agent in a benchmark job""" environment_variables: Optional[Dict[str, str]] = None """Environment variables to set when launching the agent.""" @@ -142,7 +136,7 @@ class InProgressRunAgentConfigJobAgentConfig(BaseModel): type: Literal["job_agent"] agent_environment: Optional[InProgressRunAgentConfigJobAgentConfigAgentEnvironment] = None - """Environment configuration to use for this agent""" + """Environment configuration for an agent in a benchmark job""" agent_id: Optional[str] = None """ID of the agent to use (optional if agent exists by name)""" @@ -225,7 +219,7 @@ class JobSourceScenariosJobSource(BaseModel): class JobSpecAgentConfigAgentEnvironment(BaseModel): - """Environment configuration to use for this agent""" + """Environment configuration for an agent in a benchmark job""" environment_variables: Optional[Dict[str, str]] = None """Environment variables to set when launching the agent.""" @@ -246,7 +240,7 @@ class JobSpecAgentConfig(BaseModel): type: Literal["job_agent"] agent_environment: Optional[JobSpecAgentConfigAgentEnvironment] = None - """Environment configuration to use for this agent""" + """Environment configuration for an agent in a benchmark job""" agent_id: Optional[str] = None """ID of the agent to use (optional if agent exists by name)""" @@ -262,7 +256,7 @@ class JobSpecAgentConfig(BaseModel): class JobSpecOrchestratorConfig(BaseModel): - """Orchestrator configuration""" + """Orchestrator configuration for benchmark job execution""" n_attempts: Optional[int] = None """Number of retry attempts on failure (default: 0). @@ -287,10 +281,7 @@ class JobSpecOrchestratorConfig(BaseModel): class JobSpec(BaseModel): - """The resolved job specification. - - Contains scenarios, agents, and orchestrator config. - """ + """Job specification describing scenarios and execution configuration""" agent_configs: List[JobSpecAgentConfig] """Agent configurations for this job""" @@ -299,7 +290,7 @@ class JobSpec(BaseModel): """List of scenario IDs to execute""" orchestrator_config: Optional[JobSpecOrchestratorConfig] = None - """Orchestrator configuration""" + """Orchestrator configuration for benchmark job execution""" class BenchmarkJobView(BaseModel): @@ -341,7 +332,4 @@ class BenchmarkJobView(BaseModel): """ job_spec: Optional[JobSpec] = None - """The resolved job specification. - - Contains scenarios, agents, and orchestrator config. - """ + """Job specification describing scenarios and execution configuration""" diff --git a/src/runloop_api_client/types/blueprint_build_parameters.py b/src/runloop_api_client/types/blueprint_build_parameters.py index b8fafb82f..007c5b96c 100644 --- a/src/runloop_api_client/types/blueprint_build_parameters.py +++ b/src/runloop_api_client/types/blueprint_build_parameters.py @@ -86,7 +86,11 @@ class BlueprintBuildParameters(BaseModel): """(Optional) Map of paths and file contents to write before setup.""" launch_parameters: Optional[LaunchParameters] = None - """Parameters to configure your Devbox at launch time.""" + """ + LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. + """ metadata: Optional[Dict[str, str]] = None """(Optional) User defined metadata for the Blueprint.""" diff --git a/src/runloop_api_client/types/blueprint_create_from_inspection_params.py b/src/runloop_api_client/types/blueprint_create_from_inspection_params.py index 278fa676a..21715b1b0 100644 --- a/src/runloop_api_client/types/blueprint_create_from_inspection_params.py +++ b/src/runloop_api_client/types/blueprint_create_from_inspection_params.py @@ -27,7 +27,11 @@ class BlueprintCreateFromInspectionParams(TypedDict, total=False): """(Optional) Map of paths and file contents to write before setup.""" launch_parameters: Optional[LaunchParameters] - """Parameters to configure your Devbox at launch time.""" + """ + LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. + """ metadata: Optional[Dict[str, str]] """(Optional) User defined metadata for the Blueprint.""" diff --git a/src/runloop_api_client/types/blueprint_create_params.py b/src/runloop_api_client/types/blueprint_create_params.py index 95c33e7dc..3da11dfdc 100644 --- a/src/runloop_api_client/types/blueprint_create_params.py +++ b/src/runloop_api_client/types/blueprint_create_params.py @@ -46,7 +46,11 @@ class BlueprintCreateParams(TypedDict, total=False): """(Optional) Map of paths and file contents to write before setup.""" launch_parameters: Optional[LaunchParameters] - """Parameters to configure your Devbox at launch time.""" + """ + LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. + """ metadata: Optional[Dict[str, str]] """(Optional) User defined metadata for the Blueprint.""" diff --git a/src/runloop_api_client/types/blueprint_preview_params.py b/src/runloop_api_client/types/blueprint_preview_params.py index b2dc1713d..29dac6039 100644 --- a/src/runloop_api_client/types/blueprint_preview_params.py +++ b/src/runloop_api_client/types/blueprint_preview_params.py @@ -46,7 +46,11 @@ class BlueprintPreviewParams(TypedDict, total=False): """(Optional) Map of paths and file contents to write before setup.""" launch_parameters: Optional[LaunchParameters] - """Parameters to configure your Devbox at launch time.""" + """ + LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. + """ metadata: Optional[Dict[str, str]] """(Optional) User defined metadata for the Blueprint.""" diff --git a/src/runloop_api_client/types/blueprint_view.py b/src/runloop_api_client/types/blueprint_view.py index c7f119144..87c1eecab 100644 --- a/src/runloop_api_client/types/blueprint_view.py +++ b/src/runloop_api_client/types/blueprint_view.py @@ -82,7 +82,13 @@ class BlueprintView(BaseModel): """Capabilities that will be available on Devbox.""" failure_reason: Optional[Literal["out_of_memory", "out_of_disk", "build_failed"]] = None - """The failure reason if the Blueprint build failed, if any.""" + """The cause of the failure of the Blueprint build. + + out_of_memory: The build has run out of memory. Contact support if this is + unexpected. out_of_disk: The build has run out of disk. Contact support if this + is unexpected. build_failed: The build has failed. Use the dashboard to look at + Blueprint build logs for more info. + """ is_public: Optional[bool] = None """Whether this Blueprint is publicly accessible to all users.""" diff --git a/src/runloop_api_client/types/devbox_create_params.py b/src/runloop_api_client/types/devbox_create_params.py index af2e8de6d..eed5230dc 100644 --- a/src/runloop_api_client/types/devbox_create_params.py +++ b/src/runloop_api_client/types/devbox_create_params.py @@ -47,7 +47,11 @@ class DevboxBaseCreateParams(TypedDict, total=False): """ launch_parameters: Optional[LaunchParameters] - """Parameters to configure the resources and launch time behavior of the Devbox.""" + """ + LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. + """ mcp: Optional[Dict[str, Mcp]] """[Beta] (Optional) MCP specifications for MCP server access. @@ -104,10 +108,9 @@ class DevboxCreateParams(DevboxBaseCreateParams, total=False): """ tunnel: Optional[Tunnel] - """(Optional) Configuration for creating a V2 tunnel at Devbox launch time. + """Configuration for creating a V2 tunnel. - When specified, a tunnel will be automatically provisioned and the tunnel - details will be included in the Devbox response. + When specified at Devbox creation, a tunnel will be automatically provisioned. """ @@ -136,9 +139,9 @@ class Mcp(TypedDict, total=False): class Tunnel(TypedDict, total=False): - """(Optional) Configuration for creating a V2 tunnel at Devbox launch time. + """Configuration for creating a V2 tunnel. - When specified, a tunnel will be automatically provisioned and the tunnel details will be included in the Devbox response. + When specified at Devbox creation, a tunnel will be automatically provisioned. """ auth_mode: Optional[Literal["open", "authenticated"]] diff --git a/src/runloop_api_client/types/devbox_view.py b/src/runloop_api_client/types/devbox_view.py index 068f180ad..48f3c6f18 100644 --- a/src/runloop_api_client/types/devbox_view.py +++ b/src/runloop_api_client/types/devbox_view.py @@ -89,7 +89,16 @@ class DevboxView(BaseModel): """ failure_reason: Optional[Literal["out_of_memory", "out_of_disk", "execution_failed", "health_check_failed"]] = None - """The failure reason if the Devbox failed, if the Devbox has a 'failure' status.""" + """The category of failure experienced by the Devbox. + + out_of_memory: The Devbox ran out of memory at runtime. Use launch parameters to + request a larger resource size. out_of_disk: The Devbox ran out of disk at + runtime. Please reach out to support for us to better support your use case. + execution_failed: The Devbox failed at runtime. Please use the dashboard to look + at the logs of the failure. health_check_failed: The Devbox failed its health + checks. This may indicate resource utilization is close to the maximum. Consider + requesting a larger resource size. + """ gateway_specs: Optional[Dict[str, GatewaySpecs]] = None """Gateway specifications configured for this devbox. @@ -100,7 +109,7 @@ class DevboxView(BaseModel): initiator_id: Optional[str] = None """The ID of the initiator that created the Devbox.""" - initiator_type: Optional[Literal["unknown", "api", "scenario", "scoring_validation"]] = None + initiator_type: Optional[Literal["unknown", "api", "scenario", "scoring_validation", "reflex"]] = None """The type of initiator that created the Devbox.""" mcp_specs: Optional[Dict[str, McpSpecs]] = None @@ -116,9 +125,12 @@ class DevboxView(BaseModel): shutdown_reason: Optional[ Literal["api_shutdown", "keep_alive_timeout", "entrypoint_exit", "idle", "ttl_expired"] ] = None - """ - The shutdown reason if the Devbox shutdown, if the Devbox has a 'shutdown' - status. + """The reason that caused the transition of the Devbox to the shutown state. + + api_shutdown: The Devbox shutdown due to API request. entrypoint_exit: The + Devbox entrypoint program completed. idle: The Devbox shutdown due to configured + action on idle configuration. ttl_expired: The Devbox shutdown due to TTL + expiration. """ snapshot_id: Optional[str] = None @@ -128,7 +140,11 @@ class DevboxView(BaseModel): """ tunnel: Optional[TunnelView] = None - """ - V2 tunnel information if a tunnel was created at launch time or via the - createTunnel API. + """A V2 tunnel provides secure HTTP access to services running on a Devbox. + + Tunnels allow external clients to reach web servers, APIs, or other HTTP + services running inside a Devbox without requiring direct network access. Each + tunnel is uniquely identified by an encrypted tunnel_key and can be configured + for either open (public) or authenticated access. Usage: + https://{port}-{tunnel_key}.tunnel.runloop.ai """ diff --git a/src/runloop_api_client/types/gateway_config_update_params.py b/src/runloop_api_client/types/gateway_config_update_params.py index cdf385702..d639f3a39 100644 --- a/src/runloop_api_client/types/gateway_config_update_params.py +++ b/src/runloop_api_client/types/gateway_config_update_params.py @@ -10,7 +10,10 @@ class GatewayConfigUpdateParams(TypedDict, total=False): auth_mechanism: Optional[AuthMechanism] - """New authentication mechanism for applying credentials to proxied requests.""" + """ + Defines how credentials are applied to HTTP requests when proxying through the + gateway. + """ description: Optional[str] """New description for this gateway configuration.""" @@ -23,7 +26,9 @@ class GatewayConfigUpdateParams(TypedDict, total=False): class AuthMechanism(TypedDict, total=False): - """New authentication mechanism for applying credentials to proxied requests.""" + """ + Defines how credentials are applied to HTTP requests when proxying through the gateway. + """ type: Required[str] """The type of authentication mechanism: 'header', 'bearer'.""" diff --git a/src/runloop_api_client/types/scenario_create_params.py b/src/runloop_api_client/types/scenario_create_params.py index 5b503a247..4249c4d0b 100644 --- a/src/runloop_api_client/types/scenario_create_params.py +++ b/src/runloop_api_client/types/scenario_create_params.py @@ -24,7 +24,10 @@ class ScenarioCreateParams(TypedDict, total=False): """The scoring contract for the Scenario.""" environment_parameters: Optional[ScenarioEnvironmentParam] - """The Environment in which the Scenario will run.""" + """ + ScenarioEnvironmentParameters specify the environment in which a Scenario will + be run. + """ metadata: Optional[Dict[str, str]] """User defined metadata to attach to the scenario for organization.""" diff --git a/src/runloop_api_client/types/scenario_environment.py b/src/runloop_api_client/types/scenario_environment.py index b6ac9b039..5df2d6fb6 100644 --- a/src/runloop_api_client/types/scenario_environment.py +++ b/src/runloop_api_client/types/scenario_environment.py @@ -17,7 +17,11 @@ class ScenarioEnvironment(BaseModel): """Use the blueprint with matching ID.""" launch_parameters: Optional[LaunchParameters] = None - """Optional launch parameters to apply to the devbox environment at launch.""" + """ + LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. + """ snapshot_id: Optional[str] = None """Use the snapshot with matching ID.""" diff --git a/src/runloop_api_client/types/scenario_environment_param.py b/src/runloop_api_client/types/scenario_environment_param.py index 6a219d250..54bb014f1 100644 --- a/src/runloop_api_client/types/scenario_environment_param.py +++ b/src/runloop_api_client/types/scenario_environment_param.py @@ -19,7 +19,11 @@ class ScenarioEnvironmentParam(TypedDict, total=False): """Use the blueprint with matching ID.""" launch_parameters: Optional[LaunchParameters] - """Optional launch parameters to apply to the devbox environment at launch.""" + """ + LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. + """ snapshot_id: Optional[str] """Use the snapshot with matching ID.""" diff --git a/src/runloop_api_client/types/scenario_run_view.py b/src/runloop_api_client/types/scenario_run_view.py index 68d4c3573..0ff41e17d 100644 --- a/src/runloop_api_client/types/scenario_run_view.py +++ b/src/runloop_api_client/types/scenario_run_view.py @@ -46,7 +46,10 @@ class ScenarioRunView(BaseModel): """Purpose of the ScenarioRun.""" scoring_contract_result: Optional[ScoringContractResultView] = None - """The scoring result of the ScenarioRun.""" + """ + A ScoringContractResultView represents the result of running all scoring + functions on a given input context. + """ secrets_provided: Optional[Dict[str, str]] = None """User secrets used to run the scenario.""" diff --git a/src/runloop_api_client/types/scenario_update_params.py b/src/runloop_api_client/types/scenario_update_params.py index c79cb1721..e10f885d2 100644 --- a/src/runloop_api_client/types/scenario_update_params.py +++ b/src/runloop_api_client/types/scenario_update_params.py @@ -15,7 +15,10 @@ class ScenarioUpdateParams(TypedDict, total=False): environment_parameters: Optional[ScenarioEnvironmentParam] - """The Environment in which the Scenario will run.""" + """ + ScenarioEnvironmentParameters specify the environment in which a Scenario will + be run. + """ input_context: Optional[InputContextUpdateParam] """The input context for the Scenario.""" diff --git a/src/runloop_api_client/types/scenario_view.py b/src/runloop_api_client/types/scenario_view.py index 3bb470708..69b51ac23 100644 --- a/src/runloop_api_client/types/scenario_view.py +++ b/src/runloop_api_client/types/scenario_view.py @@ -38,7 +38,10 @@ class ScenarioView(BaseModel): """ environment: Optional[ScenarioEnvironment] = None - """The Environment in which the Scenario is run.""" + """ + ScenarioEnvironmentParameters specify the environment in which a Scenario will + be run. + """ is_public: Optional[bool] = None """Whether this scenario is public.""" diff --git a/src/runloop_api_client/types/shared/__init__.py b/src/runloop_api_client/types/shared/__init__.py index 6f7d27818..5463ca25c 100644 --- a/src/runloop_api_client/types/shared/__init__.py +++ b/src/runloop_api_client/types/shared/__init__.py @@ -7,5 +7,8 @@ from .agent_source import AgentSource as AgentSource from .broker_mount import BrokerMount as BrokerMount from .object_mount import ObjectMount as ObjectMount +from .lifecycle_hooks import LifecycleHooks as LifecycleHooks +from .resume_triggers import ResumeTriggers as ResumeTriggers from .launch_parameters import LaunchParameters as LaunchParameters from .code_mount_parameters import CodeMountParameters as CodeMountParameters +from .lifecycle_configuration import LifecycleConfiguration as LifecycleConfiguration diff --git a/src/runloop_api_client/types/shared/agent_source.py b/src/runloop_api_client/types/shared/agent_source.py index 9282d6181..96df82cef 100644 --- a/src/runloop_api_client/types/shared/agent_source.py +++ b/src/runloop_api_client/types/shared/agent_source.py @@ -8,7 +8,7 @@ class Git(BaseModel): - """Git source configuration""" + """Git-based agent source configuration.""" repository: str """Git repository URL""" @@ -21,7 +21,7 @@ class Git(BaseModel): class Npm(BaseModel): - """NPM source configuration""" + """NPM-based agent source configuration.""" package_name: str """NPM package name""" @@ -34,7 +34,7 @@ class Npm(BaseModel): class Object(BaseModel): - """Object store source configuration""" + """Object store agent source configuration.""" object_id: str """Object ID""" @@ -44,7 +44,7 @@ class Object(BaseModel): class Pip(BaseModel): - """Pip source configuration""" + """Pip-based agent source configuration.""" package_name: str """Pip package name""" @@ -63,13 +63,13 @@ class AgentSource(BaseModel): """Source type: npm, pip, object, or git""" git: Optional[Git] = None - """Git source configuration""" + """Git-based agent source configuration.""" npm: Optional[Npm] = None - """NPM source configuration""" + """NPM-based agent source configuration.""" object: Optional[Object] = None - """Object store source configuration""" + """Object store agent source configuration.""" pip: Optional[Pip] = None - """Pip source configuration""" + """Pip-based agent source configuration.""" diff --git a/src/runloop_api_client/types/shared/launch_parameters.py b/src/runloop_api_client/types/shared/launch_parameters.py index 6e74af438..6dc7c5544 100644 --- a/src/runloop_api_client/types/shared/launch_parameters.py +++ b/src/runloop_api_client/types/shared/launch_parameters.py @@ -5,42 +5,13 @@ from ..._models import BaseModel from .after_idle import AfterIdle +from .lifecycle_configuration import LifecycleConfiguration -__all__ = ["LaunchParameters", "Lifecycle", "LifecycleResumeTriggers", "UserParameters"] - - -class LifecycleResumeTriggers(BaseModel): - """Triggers that can resume a suspended Devbox.""" - - axon_event: Optional[bool] = None - """When true, axon events targeting a suspended Devbox will trigger a resume.""" - - http: Optional[bool] = None - """When true, HTTP traffic to a suspended Devbox via tunnel will trigger a resume.""" - - -class Lifecycle(BaseModel): - """Lifecycle configuration for idle and resume behavior. - - Configure idle policy via lifecycle.after_idle (if both this and the top-level after_idle are set, they must match) and resume triggers via lifecycle.resume_triggers. - """ - - after_idle: Optional[AfterIdle] = None - """Configure Devbox lifecycle based on idle activity. - - If both this and the top-level after_idle are set, they must have the same - value. Prefer this field for new integrations. - """ - - resume_triggers: Optional[LifecycleResumeTriggers] = None - """Triggers that can resume a suspended Devbox.""" +__all__ = ["LaunchParameters", "UserParameters"] class UserParameters(BaseModel): - """Specify the user for execution on Devbox. - - If not set, default `user` will be used. - """ + """Configuration for the Linux user in the Devbox environment.""" uid: int """User ID (UID) for the Linux user. Must be a non-negative integer.""" @@ -89,12 +60,11 @@ class LaunchParameters(BaseModel): launch_commands: Optional[List[str]] = None """Set of commands to be run at launch time, before the entrypoint process is run.""" - lifecycle: Optional[Lifecycle] = None - """Lifecycle configuration for idle and resume behavior. + lifecycle: Optional[LifecycleConfiguration] = None + """Lifecycle configuration for Devbox idle and resume behavior. - Configure idle policy via lifecycle.after_idle (if both this and the top-level - after_idle are set, they must match) and resume triggers via - lifecycle.resume_triggers. + Configure idle policy via after_idle, resume triggers via resume_triggers, and + optional lifecycle hooks via lifecycle_hooks. """ network_policy_id: Optional[str] = None @@ -113,17 +83,17 @@ class LaunchParameters(BaseModel): resource_size_request: Optional[ Literal["X_SMALL", "SMALL", "MEDIUM", "LARGE", "X_LARGE", "XX_LARGE", "CUSTOM_SIZE"] ] = None - """Preset Devbox resources (vCPU, RAM in GiB, ephemeral disk in GiB). - - If not set, SMALL is used. X_SMALL: 0.5 vCPU, 1 GiB RAM, 4 GiB disk. SMALL: 1 - vCPU, 2 GiB RAM, 4 GiB disk. MEDIUM: 2 vCPU, 4 GiB RAM, 8 GiB disk. LARGE: 2 - vCPU, 8 GiB RAM, 16 GiB disk. X_LARGE: 4 vCPU, 16 GiB RAM, 16 GiB disk. - XX_LARGE: 8 vCPU, 32 GiB RAM, 16 GiB disk. CUSTOM_SIZE: set custom_cpu_cores, - custom_gb_memory, and optionally custom_disk_size. + """The size of the Devbox resources for Runloop to allocate. + + X_SMALL: 0.5 cpu x 1GiB memory x 4GiB disk SMALL: 1 cpu x 2GiB memory x 4GiB + disk MEDIUM: 2 cpu x 4GiB memory x 8GiB disk LARGE: 2 cpu x 8GiB memory x 16GiB + disk X_LARGE: 4 cpu x 16GiB memory x 16GiB disk XX_LARGE: 8 cpu x 32GiB memory x + 16GiB disk CUSTOM_SIZE: To choose a custom size, set this enum and also the + custom_cpu_cores, custom_gb_memory, and optionally custom_disk_size in launch + parameters. CPU must be 0.5, 1, or a multiple of 2 (max 16). Memory must be 1 or + a multiple of 2 (max 64GiB). Disk must be a multiple of 2 (min 2GiB, max 64GiB). + The cpu:memory ratio must be between 1:2 and 1:8 inclusive. """ user_parameters: Optional[UserParameters] = None - """Specify the user for execution on Devbox. - - If not set, default `user` will be used. - """ + """Configuration for the Linux user in the Devbox environment.""" diff --git a/src/runloop_api_client/types/shared/lifecycle_configuration.py b/src/runloop_api_client/types/shared/lifecycle_configuration.py new file mode 100644 index 000000000..c83fe42e5 --- /dev/null +++ b/src/runloop_api_client/types/shared/lifecycle_configuration.py @@ -0,0 +1,38 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel +from .after_idle import AfterIdle +from .lifecycle_hooks import LifecycleHooks +from .resume_triggers import ResumeTriggers + +__all__ = ["LifecycleConfiguration"] + + +class LifecycleConfiguration(BaseModel): + """Lifecycle configuration for Devbox idle and resume behavior. + + Configure idle policy via after_idle, resume triggers via resume_triggers, and optional lifecycle hooks via lifecycle_hooks. + """ + + after_idle: Optional[AfterIdle] = None + """Configure Devbox lifecycle based on idle activity. + + If both this and the top-level after_idle are set, they must have the same + value. Prefer this field for new integrations. + """ + + lifecycle_hooks: Optional[LifecycleHooks] = None + """Lifecycle hooks for Devbox suspend. + + suspend_commands run sequentially as the configured Devbox user before the + Devbox suspends; failures are logged but do not block suspending. The + suspend_deadline_ms budget defaults to 30000 ms, may not exceed 60000 ms, and + covers broker drain plus suspend_commands. If the deadline is exceeded, suspend + work is abandoned, the timeout is logged, and the Devbox still proceeds to + suspend. launch_commands still run on every startup, including after resume. + """ + + resume_triggers: Optional[ResumeTriggers] = None + """Triggers that can resume a suspended Devbox.""" diff --git a/src/runloop_api_client/types/shared/lifecycle_hooks.py b/src/runloop_api_client/types/shared/lifecycle_hooks.py new file mode 100644 index 000000000..a47d3b6e8 --- /dev/null +++ b/src/runloop_api_client/types/shared/lifecycle_hooks.py @@ -0,0 +1,28 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from ..._models import BaseModel + +__all__ = ["LifecycleHooks"] + + +class LifecycleHooks(BaseModel): + """Lifecycle hooks for Devbox suspend. + + suspend_commands run sequentially as the configured Devbox user before the Devbox suspends; failures are logged but do not block suspending. The suspend_deadline_ms budget defaults to 30000 ms, may not exceed 60000 ms, and covers broker drain plus suspend_commands. If the deadline is exceeded, suspend work is abandoned, the timeout is logged, and the Devbox still proceeds to suspend. launch_commands still run on every startup, including after resume. + """ + + suspend_commands: Optional[List[str]] = None + """Commands to run through the suspend path before the Devbox suspends (e.g. + + cleanup, quiesce daemons). + """ + + suspend_deadline_ms: Optional[int] = None + """Deadline in milliseconds for broker drain and suspend_commands during suspend. + + Defaults to 30000 ms and may not exceed 60000 ms. If exceeded, suspend work is + abandoned, the timeout is logged, and the Devbox still proceeds to suspend by + shutting down vmagent and killing the VM. + """ diff --git a/src/runloop_api_client/types/shared/resume_triggers.py b/src/runloop_api_client/types/shared/resume_triggers.py new file mode 100644 index 000000000..e2f3a4b3f --- /dev/null +++ b/src/runloop_api_client/types/shared/resume_triggers.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["ResumeTriggers"] + + +class ResumeTriggers(BaseModel): + """Triggers that can resume a suspended Devbox.""" + + axon_event: Optional[bool] = None + """When true, axon events targeting a suspended Devbox will trigger a resume.""" + + http: Optional[bool] = None + """When true, HTTP traffic to a suspended Devbox via tunnel will trigger a resume.""" diff --git a/src/runloop_api_client/types/shared/run_profile.py b/src/runloop_api_client/types/shared/run_profile.py index 21cf31f92..a7b1349f3 100644 --- a/src/runloop_api_client/types/shared/run_profile.py +++ b/src/runloop_api_client/types/shared/run_profile.py @@ -20,7 +20,11 @@ class RunProfile(BaseModel): """ launch_parameters: Optional[LaunchParameters] = FieldInfo(alias="launchParameters", default=None) - """Additional runtime LaunchParameters to apply after the devbox starts.""" + """ + LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. + """ mounts: Optional[List[Mount]] = None """A list of mounts to be included in the scenario run.""" diff --git a/src/runloop_api_client/types/shared_params/__init__.py b/src/runloop_api_client/types/shared_params/__init__.py index 6f7d27818..5463ca25c 100644 --- a/src/runloop_api_client/types/shared_params/__init__.py +++ b/src/runloop_api_client/types/shared_params/__init__.py @@ -7,5 +7,8 @@ from .agent_source import AgentSource as AgentSource from .broker_mount import BrokerMount as BrokerMount from .object_mount import ObjectMount as ObjectMount +from .lifecycle_hooks import LifecycleHooks as LifecycleHooks +from .resume_triggers import ResumeTriggers as ResumeTriggers from .launch_parameters import LaunchParameters as LaunchParameters from .code_mount_parameters import CodeMountParameters as CodeMountParameters +from .lifecycle_configuration import LifecycleConfiguration as LifecycleConfiguration diff --git a/src/runloop_api_client/types/shared_params/agent_source.py b/src/runloop_api_client/types/shared_params/agent_source.py index 7132414c8..14ac68ec0 100644 --- a/src/runloop_api_client/types/shared_params/agent_source.py +++ b/src/runloop_api_client/types/shared_params/agent_source.py @@ -11,7 +11,7 @@ class Git(TypedDict, total=False): - """Git source configuration""" + """Git-based agent source configuration.""" repository: Required[str] """Git repository URL""" @@ -24,7 +24,7 @@ class Git(TypedDict, total=False): class Npm(TypedDict, total=False): - """NPM source configuration""" + """NPM-based agent source configuration.""" package_name: Required[str] """NPM package name""" @@ -37,7 +37,7 @@ class Npm(TypedDict, total=False): class Object(TypedDict, total=False): - """Object store source configuration""" + """Object store agent source configuration.""" object_id: Required[str] """Object ID""" @@ -47,7 +47,7 @@ class Object(TypedDict, total=False): class Pip(TypedDict, total=False): - """Pip source configuration""" + """Pip-based agent source configuration.""" package_name: Required[str] """Pip package name""" @@ -66,13 +66,13 @@ class AgentSource(TypedDict, total=False): """Source type: npm, pip, object, or git""" git: Optional[Git] - """Git source configuration""" + """Git-based agent source configuration.""" npm: Optional[Npm] - """NPM source configuration""" + """NPM-based agent source configuration.""" object: Optional[Object] - """Object store source configuration""" + """Object store agent source configuration.""" pip: Optional[Pip] - """Pip source configuration""" + """Pip-based agent source configuration.""" diff --git a/src/runloop_api_client/types/shared_params/launch_parameters.py b/src/runloop_api_client/types/shared_params/launch_parameters.py index 44ced4761..0f53354c5 100644 --- a/src/runloop_api_client/types/shared_params/launch_parameters.py +++ b/src/runloop_api_client/types/shared_params/launch_parameters.py @@ -7,42 +7,13 @@ from ..._types import SequenceNotStr from .after_idle import AfterIdle +from .lifecycle_configuration import LifecycleConfiguration -__all__ = ["LaunchParameters", "Lifecycle", "LifecycleResumeTriggers", "UserParameters"] - - -class LifecycleResumeTriggers(TypedDict, total=False): - """Triggers that can resume a suspended Devbox.""" - - axon_event: Optional[bool] - """When true, axon events targeting a suspended Devbox will trigger a resume.""" - - http: Optional[bool] - """When true, HTTP traffic to a suspended Devbox via tunnel will trigger a resume.""" - - -class Lifecycle(TypedDict, total=False): - """Lifecycle configuration for idle and resume behavior. - - Configure idle policy via lifecycle.after_idle (if both this and the top-level after_idle are set, they must match) and resume triggers via lifecycle.resume_triggers. - """ - - after_idle: Optional[AfterIdle] - """Configure Devbox lifecycle based on idle activity. - - If both this and the top-level after_idle are set, they must have the same - value. Prefer this field for new integrations. - """ - - resume_triggers: Optional[LifecycleResumeTriggers] - """Triggers that can resume a suspended Devbox.""" +__all__ = ["LaunchParameters", "UserParameters"] class UserParameters(TypedDict, total=False): - """Specify the user for execution on Devbox. - - If not set, default `user` will be used. - """ + """Configuration for the Linux user in the Devbox environment.""" uid: Required[int] """User ID (UID) for the Linux user. Must be a non-negative integer.""" @@ -91,12 +62,11 @@ class LaunchParameters(TypedDict, total=False): launch_commands: Optional[SequenceNotStr[str]] """Set of commands to be run at launch time, before the entrypoint process is run.""" - lifecycle: Optional[Lifecycle] - """Lifecycle configuration for idle and resume behavior. + lifecycle: Optional[LifecycleConfiguration] + """Lifecycle configuration for Devbox idle and resume behavior. - Configure idle policy via lifecycle.after_idle (if both this and the top-level - after_idle are set, they must match) and resume triggers via - lifecycle.resume_triggers. + Configure idle policy via after_idle, resume triggers via resume_triggers, and + optional lifecycle hooks via lifecycle_hooks. """ network_policy_id: Optional[str] @@ -115,17 +85,17 @@ class LaunchParameters(TypedDict, total=False): resource_size_request: Optional[ Literal["X_SMALL", "SMALL", "MEDIUM", "LARGE", "X_LARGE", "XX_LARGE", "CUSTOM_SIZE"] ] - """Preset Devbox resources (vCPU, RAM in GiB, ephemeral disk in GiB). - - If not set, SMALL is used. X_SMALL: 0.5 vCPU, 1 GiB RAM, 4 GiB disk. SMALL: 1 - vCPU, 2 GiB RAM, 4 GiB disk. MEDIUM: 2 vCPU, 4 GiB RAM, 8 GiB disk. LARGE: 2 - vCPU, 8 GiB RAM, 16 GiB disk. X_LARGE: 4 vCPU, 16 GiB RAM, 16 GiB disk. - XX_LARGE: 8 vCPU, 32 GiB RAM, 16 GiB disk. CUSTOM_SIZE: set custom_cpu_cores, - custom_gb_memory, and optionally custom_disk_size. + """The size of the Devbox resources for Runloop to allocate. + + X_SMALL: 0.5 cpu x 1GiB memory x 4GiB disk SMALL: 1 cpu x 2GiB memory x 4GiB + disk MEDIUM: 2 cpu x 4GiB memory x 8GiB disk LARGE: 2 cpu x 8GiB memory x 16GiB + disk X_LARGE: 4 cpu x 16GiB memory x 16GiB disk XX_LARGE: 8 cpu x 32GiB memory x + 16GiB disk CUSTOM_SIZE: To choose a custom size, set this enum and also the + custom_cpu_cores, custom_gb_memory, and optionally custom_disk_size in launch + parameters. CPU must be 0.5, 1, or a multiple of 2 (max 16). Memory must be 1 or + a multiple of 2 (max 64GiB). Disk must be a multiple of 2 (min 2GiB, max 64GiB). + The cpu:memory ratio must be between 1:2 and 1:8 inclusive. """ user_parameters: Optional[UserParameters] - """Specify the user for execution on Devbox. - - If not set, default `user` will be used. - """ + """Configuration for the Linux user in the Devbox environment.""" diff --git a/src/runloop_api_client/types/shared_params/lifecycle_configuration.py b/src/runloop_api_client/types/shared_params/lifecycle_configuration.py new file mode 100644 index 000000000..0cc69a873 --- /dev/null +++ b/src/runloop_api_client/types/shared_params/lifecycle_configuration.py @@ -0,0 +1,40 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +from .after_idle import AfterIdle +from .lifecycle_hooks import LifecycleHooks +from .resume_triggers import ResumeTriggers + +__all__ = ["LifecycleConfiguration"] + + +class LifecycleConfiguration(TypedDict, total=False): + """Lifecycle configuration for Devbox idle and resume behavior. + + Configure idle policy via after_idle, resume triggers via resume_triggers, and optional lifecycle hooks via lifecycle_hooks. + """ + + after_idle: Optional[AfterIdle] + """Configure Devbox lifecycle based on idle activity. + + If both this and the top-level after_idle are set, they must have the same + value. Prefer this field for new integrations. + """ + + lifecycle_hooks: Optional[LifecycleHooks] + """Lifecycle hooks for Devbox suspend. + + suspend_commands run sequentially as the configured Devbox user before the + Devbox suspends; failures are logged but do not block suspending. The + suspend_deadline_ms budget defaults to 30000 ms, may not exceed 60000 ms, and + covers broker drain plus suspend_commands. If the deadline is exceeded, suspend + work is abandoned, the timeout is logged, and the Devbox still proceeds to + suspend. launch_commands still run on every startup, including after resume. + """ + + resume_triggers: Optional[ResumeTriggers] + """Triggers that can resume a suspended Devbox.""" diff --git a/src/runloop_api_client/types/shared_params/lifecycle_hooks.py b/src/runloop_api_client/types/shared_params/lifecycle_hooks.py new file mode 100644 index 000000000..f7945b6fd --- /dev/null +++ b/src/runloop_api_client/types/shared_params/lifecycle_hooks.py @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +from ..._types import SequenceNotStr + +__all__ = ["LifecycleHooks"] + + +class LifecycleHooks(TypedDict, total=False): + """Lifecycle hooks for Devbox suspend. + + suspend_commands run sequentially as the configured Devbox user before the Devbox suspends; failures are logged but do not block suspending. The suspend_deadline_ms budget defaults to 30000 ms, may not exceed 60000 ms, and covers broker drain plus suspend_commands. If the deadline is exceeded, suspend work is abandoned, the timeout is logged, and the Devbox still proceeds to suspend. launch_commands still run on every startup, including after resume. + """ + + suspend_commands: Optional[SequenceNotStr[str]] + """Commands to run through the suspend path before the Devbox suspends (e.g. + + cleanup, quiesce daemons). + """ + + suspend_deadline_ms: Optional[int] + """Deadline in milliseconds for broker drain and suspend_commands during suspend. + + Defaults to 30000 ms and may not exceed 60000 ms. If exceeded, suspend work is + abandoned, the timeout is logged, and the Devbox still proceeds to suspend by + shutting down vmagent and killing the VM. + """ diff --git a/src/runloop_api_client/types/shared_params/resume_triggers.py b/src/runloop_api_client/types/shared_params/resume_triggers.py new file mode 100644 index 000000000..02a89031a --- /dev/null +++ b/src/runloop_api_client/types/shared_params/resume_triggers.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["ResumeTriggers"] + + +class ResumeTriggers(TypedDict, total=False): + """Triggers that can resume a suspended Devbox.""" + + axon_event: Optional[bool] + """When true, axon events targeting a suspended Devbox will trigger a resume.""" + + http: Optional[bool] + """When true, HTTP traffic to a suspended Devbox via tunnel will trigger a resume.""" diff --git a/src/runloop_api_client/types/shared_params/run_profile.py b/src/runloop_api_client/types/shared_params/run_profile.py index 10f82d5f7..5c04914cf 100644 --- a/src/runloop_api_client/types/shared_params/run_profile.py +++ b/src/runloop_api_client/types/shared_params/run_profile.py @@ -21,7 +21,11 @@ class RunProfile(TypedDict, total=False): """ launch_parameters: Annotated[Optional[LaunchParameters], PropertyInfo(alias="launchParameters")] - """Additional runtime LaunchParameters to apply after the devbox starts.""" + """ + LaunchParameters enable you to customize the resources available to your Devbox + as well as the environment set up that should be completed before the Devbox is + marked as 'running'. + """ mounts: Optional[Iterable[Mount]] """A list of mounts to be included in the scenario run.""" diff --git a/tests/api_resources/test_benchmarks.py b/tests/api_resources/test_benchmarks.py index 7612b34f2..0c1dd130f 100644 --- a/tests/api_resources/test_benchmarks.py +++ b/tests/api_resources/test_benchmarks.py @@ -304,6 +304,10 @@ def test_method_start_run_with_all_params(self, client: Runloop) -> None: "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -689,6 +693,10 @@ async def test_method_start_run_with_all_params(self, async_client: AsyncRunloop "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, diff --git a/tests/api_resources/test_blueprints.py b/tests/api_resources/test_blueprints.py index dd3e19fcb..acec702ab 100644 --- a/tests/api_resources/test_blueprints.py +++ b/tests/api_resources/test_blueprints.py @@ -70,6 +70,10 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -295,6 +299,10 @@ def test_method_create_from_inspection_with_all_params(self, client: Runloop) -> "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -464,6 +472,10 @@ def test_method_preview_with_all_params(self, client: Runloop) -> None: "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -576,6 +588,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -801,6 +817,10 @@ async def test_method_create_from_inspection_with_all_params(self, async_client: "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -970,6 +990,10 @@ async def test_method_preview_with_all_params(self, async_client: AsyncRunloop) "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, diff --git a/tests/api_resources/test_devboxes.py b/tests/api_resources/test_devboxes.py index 97f51b915..dae981685 100644 --- a/tests/api_resources/test_devboxes.py +++ b/tests/api_resources/test_devboxes.py @@ -91,6 +91,10 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -1756,6 +1760,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, diff --git a/tests/api_resources/test_scenarios.py b/tests/api_resources/test_scenarios.py index 9dd8c3e63..518618462 100644 --- a/tests/api_resources/test_scenarios.py +++ b/tests/api_resources/test_scenarios.py @@ -83,6 +83,10 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -228,6 +232,10 @@ def test_method_update_with_all_params(self, client: Runloop) -> None: "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -446,6 +454,10 @@ def test_method_start_run_with_all_params(self, client: Runloop) -> None: "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -564,6 +576,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -709,6 +725,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncRunloop) - "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, @@ -927,6 +947,10 @@ async def test_method_start_run_with_all_params(self, async_client: AsyncRunloop "idle_time_seconds": 0, "on_idle": "shutdown", }, + "lifecycle_hooks": { + "suspend_commands": ["string"], + "suspend_deadline_ms": 0, + }, "resume_triggers": { "axon_event": True, "http": True, From 018cb8cfee5eb9945bc882391c59bf1601a84542 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 19:23:02 +0000 Subject: [PATCH 03/12] release: 1.22.1 (#806) Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- .stats.yml | 6 +- CHANGELOG.md | 8 ++ api.md | 12 ++ pyproject.toml | 2 +- src/runloop_api_client/_client.py | 38 +++++ src/runloop_api_client/_version.py | 2 +- src/runloop_api_client/resources/__init__.py | 14 ++ src/runloop_api_client/resources/accounts.py | 141 +++++++++++++++++++ src/runloop_api_client/types/__init__.py | 1 + src/runloop_api_client/types/account_view.py | 97 +++++++++++++ tests/api_resources/test_accounts.py | 74 ++++++++++ 12 files changed, 391 insertions(+), 6 deletions(-) create mode 100644 src/runloop_api_client/resources/accounts.py create mode 100644 src/runloop_api_client/types/account_view.py create mode 100644 tests/api_resources/test_accounts.py diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 397c4203e..efc2d51b4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.22.0" + ".": "1.22.1" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index e0dbe7824..f79cbaf49 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 119 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-7235763cbdfd60834a897f356688d758b598a1dd723623330ea398dea2abea68.yml +configured_endpoints: 120 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-96b0ac0a148db6fde2e8363ea2dcfaa63f2dc23cf35c30c5fcfffbefc222e5d1.yml openapi_spec_hash: 01b9dbab4b732e4b83952debd108e404 -config_hash: 444e00951b440bf92e7548b2807584a4 +config_hash: ed1fdd7c9f0a25647e16b602bad4ff2e diff --git a/CHANGELOG.md b/CHANGELOG.md index 93640514e..338e576e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.22.1 (2026-06-01) + +Full Changelog: [v1.22.0...v1.22.1](https://github.com/runloopai/api-client-python/compare/v1.22.0...v1.22.1) + +### Build System + +* **stainless:** map /v1/accounts/me to accounts.me in the SDK ([#9569](https://github.com/runloopai/api-client-python/issues/9569)) ([3f9cbe1](https://github.com/runloopai/api-client-python/commit/3f9cbe1e92c2eb9c1696f52cb11419bcafde6bd9)) + ## 1.22.0 (2026-05-27) Full Changelog: [v1.21.0...v1.22.0](https://github.com/runloopai/api-client-python/compare/v1.21.0...v1.22.0) diff --git a/api.md b/api.md index 30535e6f1..fbd1bc6ab 100644 --- a/api.md +++ b/api.md @@ -17,6 +17,18 @@ from runloop_api_client.types import ( ) ``` +# Accounts + +Types: + +```python +from runloop_api_client.types import AccountView +``` + +Methods: + +- client.accounts.me() -> AccountView + # Benchmarks Types: diff --git a/pyproject.toml b/pyproject.toml index 1b48f1988..2e0894a4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runloop_api_client" -version = "1.22.0" +version = "1.22.1" description = "The official Python library for the runloop API" dynamic = ["readme"] license = "MIT" diff --git a/src/runloop_api_client/_client.py b/src/runloop_api_client/_client.py index 9e422721e..ed052ec87 100644 --- a/src/runloop_api_client/_client.py +++ b/src/runloop_api_client/_client.py @@ -42,6 +42,7 @@ apikeys, objects, secrets, + accounts, devboxes, scenarios, benchmarks, @@ -58,6 +59,7 @@ from .resources.apikeys import ApikeysResource, AsyncApikeysResource from .resources.objects import ObjectsResource, AsyncObjectsResource from .resources.secrets import SecretsResource, AsyncSecretsResource + from .resources.accounts import AccountsResource, AsyncAccountsResource from .resources.benchmarks import BenchmarksResource, AsyncBenchmarksResource from .resources.blueprints import BlueprintsResource, AsyncBlueprintsResource from .resources.axons.axons import AxonsResource, AsyncAxonsResource @@ -144,6 +146,12 @@ def __init__( self._idempotency_header = "x-request-id" + @cached_property + def accounts(self) -> AccountsResource: + from .resources.accounts import AccountsResource + + return AccountsResource(self) + @cached_property def benchmarks(self) -> BenchmarksResource: from .resources.benchmarks import BenchmarksResource @@ -432,6 +440,12 @@ def __init__( self._idempotency_header = "x-request-id" + @cached_property + def accounts(self) -> AsyncAccountsResource: + from .resources.accounts import AsyncAccountsResource + + return AsyncAccountsResource(self) + @cached_property def benchmarks(self) -> AsyncBenchmarksResource: from .resources.benchmarks import AsyncBenchmarksResource @@ -655,6 +669,12 @@ class RunloopWithRawResponse: def __init__(self, client: Runloop) -> None: self._client = client + @cached_property + def accounts(self) -> accounts.AccountsResourceWithRawResponse: + from .resources.accounts import AccountsResourceWithRawResponse + + return AccountsResourceWithRawResponse(self._client.accounts) + @cached_property def benchmarks(self) -> benchmarks.BenchmarksResourceWithRawResponse: from .resources.benchmarks import BenchmarksResourceWithRawResponse @@ -758,6 +778,12 @@ class AsyncRunloopWithRawResponse: def __init__(self, client: AsyncRunloop) -> None: self._client = client + @cached_property + def accounts(self) -> accounts.AsyncAccountsResourceWithRawResponse: + from .resources.accounts import AsyncAccountsResourceWithRawResponse + + return AsyncAccountsResourceWithRawResponse(self._client.accounts) + @cached_property def benchmarks(self) -> benchmarks.AsyncBenchmarksResourceWithRawResponse: from .resources.benchmarks import AsyncBenchmarksResourceWithRawResponse @@ -861,6 +887,12 @@ class RunloopWithStreamedResponse: def __init__(self, client: Runloop) -> None: self._client = client + @cached_property + def accounts(self) -> accounts.AccountsResourceWithStreamingResponse: + from .resources.accounts import AccountsResourceWithStreamingResponse + + return AccountsResourceWithStreamingResponse(self._client.accounts) + @cached_property def benchmarks(self) -> benchmarks.BenchmarksResourceWithStreamingResponse: from .resources.benchmarks import BenchmarksResourceWithStreamingResponse @@ -964,6 +996,12 @@ class AsyncRunloopWithStreamedResponse: def __init__(self, client: AsyncRunloop) -> None: self._client = client + @cached_property + def accounts(self) -> accounts.AsyncAccountsResourceWithStreamingResponse: + from .resources.accounts import AsyncAccountsResourceWithStreamingResponse + + return AsyncAccountsResourceWithStreamingResponse(self._client.accounts) + @cached_property def benchmarks(self) -> benchmarks.AsyncBenchmarksResourceWithStreamingResponse: from .resources.benchmarks import AsyncBenchmarksResourceWithStreamingResponse diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py index 27a4b2948..8acca19a1 100644 --- a/src/runloop_api_client/_version.py +++ b/src/runloop_api_client/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "runloop_api_client" -__version__ = "1.22.0" # x-release-please-version +__version__ = "1.22.1" # x-release-please-version diff --git a/src/runloop_api_client/resources/__init__.py b/src/runloop_api_client/resources/__init__.py index e7442ab06..2e6ca5d16 100644 --- a/src/runloop_api_client/resources/__init__.py +++ b/src/runloop_api_client/resources/__init__.py @@ -48,6 +48,14 @@ SecretsResourceWithStreamingResponse, AsyncSecretsResourceWithStreamingResponse, ) +from .accounts import ( + AccountsResource, + AsyncAccountsResource, + AccountsResourceWithRawResponse, + AsyncAccountsResourceWithRawResponse, + AccountsResourceWithStreamingResponse, + AsyncAccountsResourceWithStreamingResponse, +) from .devboxes import ( DevboxesResource, AsyncDevboxesResource, @@ -130,6 +138,12 @@ ) __all__ = [ + "AccountsResource", + "AsyncAccountsResource", + "AccountsResourceWithRawResponse", + "AsyncAccountsResourceWithRawResponse", + "AccountsResourceWithStreamingResponse", + "AsyncAccountsResourceWithStreamingResponse", "BenchmarksResource", "AsyncBenchmarksResource", "BenchmarksResourceWithRawResponse", diff --git a/src/runloop_api_client/resources/accounts.py b/src/runloop_api_client/resources/accounts.py new file mode 100644 index 000000000..cc41fa591 --- /dev/null +++ b/src/runloop_api_client/resources/accounts.py @@ -0,0 +1,141 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from .._types import Body, Query, Headers, NotGiven, not_given +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from .._base_client import make_request_options +from ..types.account_view import AccountView + +__all__ = ["AccountsResource", "AsyncAccountsResource"] + + +class AccountsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> AccountsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/runloopai/api-client-python#accessing-raw-response-data-eg-headers + """ + return AccountsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AccountsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/runloopai/api-client-python#with_streaming_response + """ + return AccountsResourceWithStreamingResponse(self) + + def me( + self, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AccountView: + """ + Returns the account the API key or session is authenticated against, including + id, name, tier, and billing summary. + """ + return self._get( + "/v1/accounts/me", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=AccountView, + ) + + +class AsyncAccountsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/runloopai/api-client-python#accessing-raw-response-data-eg-headers + """ + return AsyncAccountsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncAccountsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/runloopai/api-client-python#with_streaming_response + """ + return AsyncAccountsResourceWithStreamingResponse(self) + + async def me( + self, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AccountView: + """ + Returns the account the API key or session is authenticated against, including + id, name, tier, and billing summary. + """ + return await self._get( + "/v1/accounts/me", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=AccountView, + ) + + +class AccountsResourceWithRawResponse: + def __init__(self, accounts: AccountsResource) -> None: + self._accounts = accounts + + self.me = to_raw_response_wrapper( + accounts.me, + ) + + +class AsyncAccountsResourceWithRawResponse: + def __init__(self, accounts: AsyncAccountsResource) -> None: + self._accounts = accounts + + self.me = async_to_raw_response_wrapper( + accounts.me, + ) + + +class AccountsResourceWithStreamingResponse: + def __init__(self, accounts: AccountsResource) -> None: + self._accounts = accounts + + self.me = to_streamed_response_wrapper( + accounts.me, + ) + + +class AsyncAccountsResourceWithStreamingResponse: + def __init__(self, accounts: AsyncAccountsResource) -> None: + self._accounts = accounts + + self.me = async_to_streamed_response_wrapper( + accounts.me, + ) diff --git a/src/runloop_api_client/types/__init__.py b/src/runloop_api_client/types/__init__.py index 428a5a7a2..6d23d82f3 100644 --- a/src/runloop_api_client/types/__init__.py +++ b/src/runloop_api_client/types/__init__.py @@ -22,6 +22,7 @@ from .object_view import ObjectView as ObjectView from .secret_view import SecretView as SecretView from .tunnel_view import TunnelView as TunnelView +from .account_view import AccountView as AccountView from .input_context import InputContext as InputContext from .scenario_view import ScenarioView as ScenarioView from .axon_list_view import AxonListView as AxonListView diff --git a/src/runloop_api_client/types/account_view.py b/src/runloop_api_client/types/account_view.py new file mode 100644 index 000000000..0507674c1 --- /dev/null +++ b/src/runloop_api_client/types/account_view.py @@ -0,0 +1,97 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["AccountView", "Billing", "BillingAws", "BillingStripe"] + + +class BillingAws(BaseModel): + """AWS Marketplace billing information.""" + + customer_identifier: Optional[str] = None + """The AWS account ID used for Marketplace billing (12-digit).""" + + license_arn: Optional[str] = None + """The AWS Marketplace license ARN.""" + + subscription_status: Optional[str] = None + """The AWS Marketplace subscription status.""" + + +class BillingStripe(BaseModel): + """Stripe billing information.""" + + active_subscription: Optional[str] = None + """The active Stripe subscription ID.""" + + customer_id: Optional[str] = None + """The Stripe customer ID.""" + + +class Billing(BaseModel): + """The account billing information.""" + + account_billing_type: Literal["STRIPE", "AWS_MARKETPLACE", "STRIPE_PROJECTS", "UNRECOGNIZED"] + """The account billing type.""" + + aws: Optional[BillingAws] = None + """AWS Marketplace billing information.""" + + stripe: Optional[BillingStripe] = None + """Stripe billing information.""" + + stripe_customer_id: Optional[str] = None + """Deprecated: use stripe.customer_id.""" + + +class AccountView(BaseModel): + """Account information.""" + + id: str + """The account ID.""" + + account_status: Literal[ + "ACCOUNT_STATUS_INVALID", + "ACCOUNT_STATUS_ONBOARDING", + "ACCOUNT_STATUS_ENABLED", + "ACCOUNT_STATUS_DISABLED_BY_ADMIN", + "ACCOUNT_STATUS_DISABLED_QUOTA_REACHED", + "ACCOUNT_STATUS_TRIAL_CANCELLED", + "ACCOUNT_STATUS_STRIPE_PENDING_RESOURCES", + "UNRECOGNIZED", + ] + """The account status.""" + + billing: Billing + """The account billing information.""" + + created_at: str + """The account creation timestamp.""" + + name: str + """The account name.""" + + tier: Literal[ + "ACCOUNT_TIER_INVALID", + "ACCOUNT_TIER_BASIC", + "ACCOUNT_TIER_PRO", + "ACCOUNT_TIER_ENTERPRISE", + "ACCOUNT_TIER_TRIAL", + "UNRECOGNIZED", + ] + """The account tier.""" + + account_billing_type: Optional[Literal["STRIPE", "AWS_MARKETPLACE", "STRIPE_PROJECTS", "UNRECOGNIZED"]] = None + """Deprecated: use billing.account_billing_type.""" + + active_subscription: Optional[str] = None + """Deprecated: use billing.stripe.active_subscription.""" + + external_billing_account_id: Optional[str] = None + """Deprecated: use billing.aws.customer_identifier.""" + + stripe_customer_id: Optional[str] = None + """Deprecated: use billing.stripe.customer_id.""" diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py new file mode 100644 index 000000000..6287863da --- /dev/null +++ b/tests/api_resources/test_accounts.py @@ -0,0 +1,74 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from tests.utils import assert_matches_type +from runloop_api_client import Runloop, AsyncRunloop +from runloop_api_client.types import AccountView + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestAccounts: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_me(self, client: Runloop) -> None: + account = client.accounts.me() + assert_matches_type(AccountView, account, path=["response"]) + + @parametrize + def test_raw_response_me(self, client: Runloop) -> None: + response = client.accounts.with_raw_response.me() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + account = response.parse() + assert_matches_type(AccountView, account, path=["response"]) + + @parametrize + def test_streaming_response_me(self, client: Runloop) -> None: + with client.accounts.with_streaming_response.me() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + account = response.parse() + assert_matches_type(AccountView, account, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncAccounts: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_me(self, async_client: AsyncRunloop) -> None: + account = await async_client.accounts.me() + assert_matches_type(AccountView, account, path=["response"]) + + @parametrize + async def test_raw_response_me(self, async_client: AsyncRunloop) -> None: + response = await async_client.accounts.with_raw_response.me() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + account = await response.parse() + assert_matches_type(AccountView, account, path=["response"]) + + @parametrize + async def test_streaming_response_me(self, async_client: AsyncRunloop) -> None: + async with async_client.accounts.with_streaming_response.me() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + account = await response.parse() + assert_matches_type(AccountView, account, path=["response"]) + + assert cast(Any, response.is_closed) is True From 60f82be276284447d80e83e73db44cc59269a718 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Jun 2026 17:26:53 +0000 Subject: [PATCH 04/12] release: 1.23.0 (#807) Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- .stats.yml | 4 +- CHANGELOG.md | 9 ++++ pyproject.toml | 2 +- src/runloop_api_client/_version.py | 2 +- .../resources/devboxes/devboxes.py | 28 +++++++++--- .../types/devbox_list_params.py | 10 ++++- src/runloop_api_client/types/devbox_view.py | 44 ++++++++++++++----- .../types/pty_tunnel_view.py | 8 +++- src/runloop_api_client/types/tunnel_view.py | 5 ++- tests/api_resources/test_devboxes.py | 4 +- 11 files changed, 88 insertions(+), 30 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index efc2d51b4..cdcf20eb7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.22.1" + ".": "1.23.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index f79cbaf49..ad0d55423 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 120 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-96b0ac0a148db6fde2e8363ea2dcfaa63f2dc23cf35c30c5fcfffbefc222e5d1.yml -openapi_spec_hash: 01b9dbab4b732e4b83952debd108e404 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-22ab4a80734e5e3792b7287a1281280d52eff936be4d805011521a1b64e1998d.yml +openapi_spec_hash: d109d3b797016fe7657935d55549cc31 config_hash: ed1fdd7c9f0a25647e16b602bad4ff2e diff --git a/CHANGELOG.md b/CHANGELOG.md index 338e576e6..675cadc1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 1.23.0 (2026-06-05) + +Full Changelog: [v1.22.1...v1.23.0](https://github.com/runloopai/api-client-python/compare/v1.22.1...v1.23.0) + +### Features + +* **devbox:** add SCHEDULED status to the data model ([#9654](https://github.com/runloopai/api-client-python/issues/9654)) ([8f45663](https://github.com/runloopai/api-client-python/commit/8f456631f96a56612ae9b438e9b6d2dc8d69095f)) +* **portal:** support tunnel authorization header ([#9597](https://github.com/runloopai/api-client-python/issues/9597)) ([8ca990e](https://github.com/runloopai/api-client-python/commit/8ca990e360f072adfdb9f789e37dbd2bb08e8f77)) + ## 1.22.1 (2026-06-01) Full Changelog: [v1.22.0...v1.22.1](https://github.com/runloopai/api-client-python/compare/v1.22.0...v1.22.1) diff --git a/pyproject.toml b/pyproject.toml index 2e0894a4c..8c5d5cea6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runloop_api_client" -version = "1.22.1" +version = "1.23.0" description = "The official Python library for the runloop API" dynamic = ["readme"] license = "MIT" diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py index 8acca19a1..a99d41677 100644 --- a/src/runloop_api_client/_version.py +++ b/src/runloop_api_client/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "runloop_api_client" -__version__ = "1.22.1" # x-release-please-version +__version__ = "1.23.0" # x-release-please-version diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index 166ab97d2..ec9f8eaf8 100644 --- a/src/runloop_api_client/resources/devboxes/devboxes.py +++ b/src/runloop_api_client/resources/devboxes/devboxes.py @@ -532,7 +532,15 @@ def list( limit: int | Omit = omit, starting_after: str | Omit = omit, status: Literal[ - "provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown" + "scheduled", + "provisioning", + "initializing", + "running", + "suspending", + "suspended", + "resuming", + "failure", + "shutdown", ] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -600,8 +608,8 @@ def create_pty_tunnel( Devbox. This tunnel is not persisted on the Devbox and is generated fresh on - each request. The returned auth_token must be passed as a Bearer token in the - Authorization header. + each request. The returned auth_token should be passed as a Bearer token in the + X-Runloop-Tunnel-Authorization header. Args: extra_headers: Send extra headers @@ -2195,7 +2203,15 @@ def list( limit: int | Omit = omit, starting_after: str | Omit = omit, status: Literal[ - "provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown" + "scheduled", + "provisioning", + "initializing", + "running", + "suspending", + "suspended", + "resuming", + "failure", + "shutdown", ] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -2263,8 +2279,8 @@ async def create_pty_tunnel( Devbox. This tunnel is not persisted on the Devbox and is generated fresh on - each request. The returned auth_token must be passed as a Bearer token in the - Authorization header. + each request. The returned auth_token should be passed as a Bearer token in the + X-Runloop-Tunnel-Authorization header. Args: extra_headers: Send extra headers diff --git a/src/runloop_api_client/types/devbox_list_params.py b/src/runloop_api_client/types/devbox_list_params.py index d8bae28d7..f845a53b6 100644 --- a/src/runloop_api_client/types/devbox_list_params.py +++ b/src/runloop_api_client/types/devbox_list_params.py @@ -21,6 +21,14 @@ class DevboxListParams(TypedDict, total=False): """Load the next page of data starting after the item with the given ID.""" status: Literal[ - "provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown" + "scheduled", + "provisioning", + "initializing", + "running", + "suspending", + "suspended", + "resuming", + "failure", + "shutdown", ] """Filter by status""" diff --git a/src/runloop_api_client/types/devbox_view.py b/src/runloop_api_client/types/devbox_view.py index 48f3c6f18..726f14e72 100644 --- a/src/runloop_api_client/types/devbox_view.py +++ b/src/runloop_api_client/types/devbox_view.py @@ -12,19 +12,30 @@ class StateTransition(BaseModel): status: Optional[ - Literal["provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown"] + Literal[ + "scheduled", + "provisioning", + "initializing", + "running", + "suspending", + "suspended", + "resuming", + "failure", + "shutdown", + ] ] = None """The status of the Devbox. - provisioning: Runloop is allocating and booting the necessary infrastructure - resources. initializing: Runloop defined boot scripts are running to enable the - environment for interaction. running: The Devbox is ready for interaction. - suspending: The Devbox disk is being snapshotted as part of suspension. - suspended: The Devbox disk is saved and no more active compute is being used for - the Devbox. resuming: The Devbox disk is being loaded as part of booting a - suspended Devbox. failure: The Devbox failed as part of booting or running user - requested actions. shutdown: The Devbox was successfully shutdown and no more - active compute is being used. + scheduled: The Devbox is scheduled to run but infrastructure allocation has not + started yet. provisioning: Runloop is allocating and booting the necessary + infrastructure resources. initializing: Runloop defined boot scripts are running + to enable the environment for interaction. running: The Devbox is ready for + interaction. suspending: The Devbox disk is being snapshotted as part of + suspension. suspended: The Devbox disk is saved and no more active compute is + being used for the Devbox. resuming: The Devbox disk is being loaded as part of + booting a suspended Devbox. failure: The Devbox failed as part of booting or + running user requested actions. shutdown: The Devbox was successfully shutdown + and no more active compute is being used. """ transition_time_ms: Optional[object] = None @@ -78,7 +89,15 @@ class DevboxView(BaseModel): """A list of state transitions in order with durations""" status: Literal[ - "provisioning", "initializing", "running", "suspending", "suspended", "resuming", "failure", "shutdown" + "scheduled", + "provisioning", + "initializing", + "running", + "suspending", + "suspended", + "resuming", + "failure", + "shutdown", ] """The current status of the Devbox.""" @@ -146,5 +165,6 @@ class DevboxView(BaseModel): services running inside a Devbox without requiring direct network access. Each tunnel is uniquely identified by an encrypted tunnel_key and can be configured for either open (public) or authenticated access. Usage: - https://{port}-{tunnel_key}.tunnel.runloop.ai + https://{port}-{tunnel_key}.tunnel.runloop.ai. Authenticated tunnels should pass + auth_token as X-Runloop-Tunnel-Authorization: Bearer {auth_token}. """ diff --git a/src/runloop_api_client/types/pty_tunnel_view.py b/src/runloop_api_client/types/pty_tunnel_view.py index 3012798ba..f7c228d36 100644 --- a/src/runloop_api_client/types/pty_tunnel_view.py +++ b/src/runloop_api_client/types/pty_tunnel_view.py @@ -8,11 +8,15 @@ class PtyTunnelView(BaseModel): """An ephemeral PTY tunnel providing authenticated terminal access to a Devbox. - These tunnels are not stored on the Devbox and are generated fresh on each request. Usage: https://{port}-{tunnel_key}.tunnel.runloop.ai with Authorization: Bearer {auth_token} + These tunnels are not stored on the Devbox and are generated fresh on each request. Usage: https://{port}-{tunnel_key}.tunnel.runloop.ai with X-Runloop-Tunnel-Authorization: Bearer {auth_token}. """ auth_token: str - """Bearer token for tunnel authentication. Always required for PTY tunnels.""" + """Bearer token for tunnel authentication. + + Always required for PTY tunnels. Pass as X-Runloop-Tunnel-Authorization: Bearer + {auth_token}. + """ tunnel_key: str """The encrypted tunnel key used to construct the tunnel URL. diff --git a/src/runloop_api_client/types/tunnel_view.py b/src/runloop_api_client/types/tunnel_view.py index 6188968a0..3bc3f6a1c 100644 --- a/src/runloop_api_client/types/tunnel_view.py +++ b/src/runloop_api_client/types/tunnel_view.py @@ -12,7 +12,7 @@ class TunnelView(BaseModel): """A V2 tunnel provides secure HTTP access to services running on a Devbox. Tunnels allow external clients to reach web servers, APIs, or other HTTP services running inside a Devbox without requiring direct network access. Each tunnel is uniquely identified by an encrypted tunnel_key and can be configured for either open (public) or authenticated access. - Usage: https://{port}-{tunnel_key}.tunnel.runloop.ai + Usage: https://{port}-{tunnel_key}.tunnel.runloop.ai. Authenticated tunnels should pass auth_token as X-Runloop-Tunnel-Authorization: Bearer {auth_token}. """ auth_mode: Literal["open", "authenticated"] @@ -42,5 +42,6 @@ class TunnelView(BaseModel): auth_token: Optional[str] = None """Bearer token for tunnel authentication. - Only present when auth_mode is 'authenticated'. + Only present when auth_mode is 'authenticated'. Pass as + X-Runloop-Tunnel-Authorization: Bearer {auth_token}. """ diff --git a/tests/api_resources/test_devboxes.py b/tests/api_resources/test_devboxes.py index dae981685..e755c8cd6 100644 --- a/tests/api_resources/test_devboxes.py +++ b/tests/api_resources/test_devboxes.py @@ -250,7 +250,7 @@ def test_method_list_with_all_params(self, client: Runloop) -> None: include_total_count=True, limit=0, starting_after="starting_after", - status="provisioning", + status="scheduled", ) assert_matches_type(SyncDevboxesCursorIDPage[DevboxView], devbox, path=["response"]) @@ -1919,7 +1919,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncRunloop) -> include_total_count=True, limit=0, starting_after="starting_after", - status="provisioning", + status="scheduled", ) assert_matches_type(AsyncDevboxesCursorIDPage[DevboxView], devbox, path=["response"]) From cb59e8bcb4578a8abc8c31902a80ec491949310b Mon Sep 17 00:00:00 2001 From: Rob von Behren Date: Tue, 9 Jun 2026 11:43:04 -0700 Subject: [PATCH 05/12] feat(devbox): add provisioning_tier (flex) to LaunchParameters (alpha) (#808) Co-authored-by: Reflex --- src/runloop_api_client/types/shared/launch_parameters.py | 6 ++++++ .../types/shared_params/launch_parameters.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/src/runloop_api_client/types/shared/launch_parameters.py b/src/runloop_api_client/types/shared/launch_parameters.py index 6dc7c5544..c7d8858df 100644 --- a/src/runloop_api_client/types/shared/launch_parameters.py +++ b/src/runloop_api_client/types/shared/launch_parameters.py @@ -74,6 +74,12 @@ class LaunchParameters(BaseModel): will inherit this policy unless explicitly overridden. """ + provisioning_tier: Optional[Literal["standard", "flex"]] = None + """(Optional, Alpha) standard is default and flex is lazily provisioned and may be pre-empted. + + This is an alpha feature and its behavior may change without notice. + """ + required_services: Optional[List[str]] = None """A list of ContainerizedService names to be started when a Devbox is created. diff --git a/src/runloop_api_client/types/shared_params/launch_parameters.py b/src/runloop_api_client/types/shared_params/launch_parameters.py index 0f53354c5..2d220261d 100644 --- a/src/runloop_api_client/types/shared_params/launch_parameters.py +++ b/src/runloop_api_client/types/shared_params/launch_parameters.py @@ -76,6 +76,12 @@ class LaunchParameters(TypedDict, total=False): will inherit this policy unless explicitly overridden. """ + provisioning_tier: Optional[Literal["standard", "flex"]] + """(Optional, Alpha) standard is default and flex is lazily provisioned and may be pre-empted. + + This is an alpha feature and its behavior may change without notice. + """ + required_services: Optional[SequenceNotStr[str]] """A list of ContainerizedService names to be started when a Devbox is created. From 0f68442d8d59752d72fafec85c6e947523daab3e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 11:58:15 -0700 Subject: [PATCH 06/12] release: 1.23.1 (#809) Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/runloop_api_client/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cdcf20eb7..276cb37a7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.23.0" + ".": "1.23.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 675cadc1f..c559dc2e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 1.23.1 (2026-06-09) + +Full Changelog: [v1.23.0...v1.23.1](https://github.com/runloopai/api-client-python/compare/v1.23.0...v1.23.1) + +### Features + +* **devbox:** add provisioning_tier (flex) to LaunchParameters (alpha) ([#808](https://github.com/runloopai/api-client-python/issues/808)) ([cb59e8b](https://github.com/runloopai/api-client-python/commit/cb59e8bcb4578a8abc8c31902a80ec491949310b)) + ## 1.23.0 (2026-06-05) Full Changelog: [v1.22.1...v1.23.0](https://github.com/runloopai/api-client-python/compare/v1.22.1...v1.23.0) diff --git a/pyproject.toml b/pyproject.toml index 8c5d5cea6..a2d871f4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runloop_api_client" -version = "1.23.0" +version = "1.23.1" description = "The official Python library for the runloop API" dynamic = ["readme"] license = "MIT" diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py index a99d41677..8a358d286 100644 --- a/src/runloop_api_client/_version.py +++ b/src/runloop_api_client/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "runloop_api_client" -__version__ = "1.23.0" # x-release-please-version +__version__ = "1.23.1" # x-release-please-version From ef1eb3a21a2628b0f21e4ae85ce0cc6a527feb63 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 20:19:17 +0000 Subject: [PATCH 07/12] release: 1.23.2 (#810) Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- .stats.yml | 4 ++-- CHANGELOG.md | 6 +++--- pyproject.toml | 2 +- src/runloop_api_client/_version.py | 2 +- src/runloop_api_client/types/shared/launch_parameters.py | 7 +++---- .../types/shared_params/launch_parameters.py | 7 +++---- tests/api_resources/test_benchmarks.py | 2 ++ tests/api_resources/test_blueprints.py | 6 ++++++ tests/api_resources/test_devboxes.py | 2 ++ tests/api_resources/test_scenarios.py | 6 ++++++ 11 files changed, 30 insertions(+), 16 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 276cb37a7..d9381b3d1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.23.1" + ".": "1.23.2" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index ad0d55423..ed9090410 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 120 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-22ab4a80734e5e3792b7287a1281280d52eff936be4d805011521a1b64e1998d.yml -openapi_spec_hash: d109d3b797016fe7657935d55549cc31 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-8f05915b107d49f4a50f2d83abfa1d7233a685f1d85e02465a218fa5acb55ddd.yml +openapi_spec_hash: 905fa27970b4b7201184df9c63eba3b9 config_hash: ed1fdd7c9f0a25647e16b602bad4ff2e diff --git a/CHANGELOG.md b/CHANGELOG.md index c559dc2e1..e83eeec37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,12 @@ # Changelog -## 1.23.1 (2026-06-09) +## 1.23.2 (2026-06-09) -Full Changelog: [v1.23.0...v1.23.1](https://github.com/runloopai/api-client-python/compare/v1.23.0...v1.23.1) +Full Changelog: [v1.23.1...v1.23.2](https://github.com/runloopai/api-client-python/compare/v1.23.1...v1.23.2) ### Features -* **devbox:** add provisioning_tier (flex) to LaunchParameters (alpha) ([#808](https://github.com/runloopai/api-client-python/issues/808)) ([cb59e8b](https://github.com/runloopai/api-client-python/commit/cb59e8bcb4578a8abc8c31902a80ec491949310b)) +* **devbox:** expose provisioning_tier=flex in API + SDKs (alpha) ([#9700](https://github.com/runloopai/api-client-python/issues/9700)) ([139bef6](https://github.com/runloopai/api-client-python/commit/139bef6738aef78b80c6eae23ae40774a8356edd)) ## 1.23.0 (2026-06-05) diff --git a/pyproject.toml b/pyproject.toml index a2d871f4f..7362e5b07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runloop_api_client" -version = "1.23.1" +version = "1.23.2" description = "The official Python library for the runloop API" dynamic = ["readme"] license = "MIT" diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py index 8a358d286..de8ee1975 100644 --- a/src/runloop_api_client/_version.py +++ b/src/runloop_api_client/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "runloop_api_client" -__version__ = "1.23.1" # x-release-please-version +__version__ = "1.23.2" # x-release-please-version diff --git a/src/runloop_api_client/types/shared/launch_parameters.py b/src/runloop_api_client/types/shared/launch_parameters.py index c7d8858df..c5b412720 100644 --- a/src/runloop_api_client/types/shared/launch_parameters.py +++ b/src/runloop_api_client/types/shared/launch_parameters.py @@ -75,11 +75,10 @@ class LaunchParameters(BaseModel): """ provisioning_tier: Optional[Literal["standard", "flex"]] = None - """(Optional, Alpha) standard is default and flex is lazily provisioned and may be pre-empted. - - This is an alpha feature and its behavior may change without notice. """ - + (Optional, Alpha) standard is default and flex is lazily provisioned and may be + pre-empted. This is an alpha feature and its behavior may change without notice. + """ required_services: Optional[List[str]] = None """A list of ContainerizedService names to be started when a Devbox is created. diff --git a/src/runloop_api_client/types/shared_params/launch_parameters.py b/src/runloop_api_client/types/shared_params/launch_parameters.py index 2d220261d..1fe21fe9a 100644 --- a/src/runloop_api_client/types/shared_params/launch_parameters.py +++ b/src/runloop_api_client/types/shared_params/launch_parameters.py @@ -77,11 +77,10 @@ class LaunchParameters(TypedDict, total=False): """ provisioning_tier: Optional[Literal["standard", "flex"]] - """(Optional, Alpha) standard is default and flex is lazily provisioned and may be pre-empted. - - This is an alpha feature and its behavior may change without notice. """ - + (Optional, Alpha) standard is default and flex is lazily provisioned and may be + pre-empted. This is an alpha feature and its behavior may change without notice. + """ required_services: Optional[SequenceNotStr[str]] """A list of ContainerizedService names to be started when a Devbox is created. diff --git a/tests/api_resources/test_benchmarks.py b/tests/api_resources/test_benchmarks.py index 0c1dd130f..4728cbce5 100644 --- a/tests/api_resources/test_benchmarks.py +++ b/tests/api_resources/test_benchmarks.py @@ -314,6 +314,7 @@ def test_method_start_run_with_all_params(self, client: Runloop) -> None: }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -703,6 +704,7 @@ async def test_method_start_run_with_all_params(self, async_client: AsyncRunloop }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { diff --git a/tests/api_resources/test_blueprints.py b/tests/api_resources/test_blueprints.py index acec702ab..eaa6d65c4 100644 --- a/tests/api_resources/test_blueprints.py +++ b/tests/api_resources/test_blueprints.py @@ -80,6 +80,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -309,6 +310,7 @@ def test_method_create_from_inspection_with_all_params(self, client: Runloop) -> }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -482,6 +484,7 @@ def test_method_preview_with_all_params(self, client: Runloop) -> None: }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -598,6 +601,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -827,6 +831,7 @@ async def test_method_create_from_inspection_with_all_params(self, async_client: }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -1000,6 +1005,7 @@ async def test_method_preview_with_all_params(self, async_client: AsyncRunloop) }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { diff --git a/tests/api_resources/test_devboxes.py b/tests/api_resources/test_devboxes.py index e755c8cd6..be58c7c21 100644 --- a/tests/api_resources/test_devboxes.py +++ b/tests/api_resources/test_devboxes.py @@ -101,6 +101,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -1770,6 +1771,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { diff --git a/tests/api_resources/test_scenarios.py b/tests/api_resources/test_scenarios.py index 518618462..157f6877a 100644 --- a/tests/api_resources/test_scenarios.py +++ b/tests/api_resources/test_scenarios.py @@ -93,6 +93,7 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -242,6 +243,7 @@ def test_method_update_with_all_params(self, client: Runloop) -> None: }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -464,6 +466,7 @@ def test_method_start_run_with_all_params(self, client: Runloop) -> None: }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -586,6 +589,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -735,6 +739,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncRunloop) - }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { @@ -957,6 +962,7 @@ async def test_method_start_run_with_all_params(self, async_client: AsyncRunloop }, }, "network_policy_id": "network_policy_id", + "provisioning_tier": "standard", "required_services": ["string"], "resource_size_request": "X_SMALL", "user_parameters": { From 3c483bdfd46b48afe2b0f2e68d9f4326f980414a Mon Sep 17 00:00:00 2001 From: tode-rl Date: Mon, 22 Jun 2026 15:07:17 -0700 Subject: [PATCH 08/12] docs: add agent PR guidance (#814) --- AGENTS.md | 13 +++++++++++++ CLAUDE.md | 1 + 2 files changed, 14 insertions(+) create mode 100644 AGENTS.md create mode 120000 CLAUDE.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..dc4d57f55 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,13 @@ +# Agent Guidance + +## Pull Request Hygiene + +- Use Conventional Commits format for PR titles and commit subjects. Follow https://www.conventionalcommits.org/en/v1.0.0/#summary with a lowercase type, optional scope, colon, and short imperative summary, for example `fix(devbox): remove stale helper argument`. +- Match the repository's existing release style when choosing a type and scope. Prefer `fix(scope): ...`, `feat(scope): ...`, `docs(scope): ...`, or `chore(scope): ...` as appropriate. +- When asked to create, open, or update a PR, do not hand the turn back to the user until the branch is pushed, the PR is open or updated, relevant local validation has run where practical, and GitHub CI is passing. +- If CI cannot pass because of an external service, permissions, unavailable secrets, or another blocker outside the branch changes, report the blocking check with a link and a concise explanation. + +## Generated Code + +- Most SDK code is generated. Prefer fixing generated API surfaces at the OpenAPI/Stainless source when possible. +- Keep handwritten changes small and clearly separated from generated updates so future generations can be reviewed safely. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 120000 index 000000000..47dc3e3d8 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1 @@ +AGENTS.md \ No newline at end of file From 50507eba5537386e9af72ba3e2629cfac89c2391 Mon Sep 17 00:00:00 2001 From: Rob von Behren Date: Fri, 26 Jun 2026 11:16:18 -0700 Subject: [PATCH 09/12] fix: update test script to work without lsof on CI (#798) Co-authored-by: Claude Opus 4.6 --- scripts/test | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/scripts/test b/scripts/test index a066eccc3..ddfc3036b 100755 --- a/scripts/test +++ b/scripts/test @@ -13,10 +13,43 @@ function steady_is_running() { curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1 } +find_pids_on_port_via_proc() { + # Parse /proc/net/tcp{,6} to find socket inodes listening on the port, + # then scan /proc/*/fd/ to find which pids own those sockets. + local port_hex + port_hex=$(printf '%04X' "$1") + local inodes + inodes=$(awk -v ph="$port_hex" '$2 ~ ":"ph"$" && $4 == "0A" {print $10}' /proc/net/tcp /proc/net/tcp6 2>/dev/null | sort -u) + [ -z "$inodes" ] && return + local pids="" + for inode in $inodes; do + for fd in /proc/[0-9]*/fd/*; do + if [ "$(readlink "$fd" 2>/dev/null)" = "socket:[$inode]" ]; then + local pid="${fd#/proc/}" + pid="${pid%%/fd/*}" + pids="$pids $pid" + break + fi + done + done + echo "$pids" | xargs +} + kill_server_on_port() { - pids=$(lsof -t -i tcp:"$1" || echo "") + if command -v lsof >/dev/null 2>&1; then + pids=$(lsof -t -i tcp:"$1" || echo "") + elif command -v ss >/dev/null 2>&1; then + pids=$(ss -tlnp "sport = :$1" 2>/dev/null | grep -oP 'pid=\K[0-9]+' || echo "") + elif command -v fuser >/dev/null 2>&1; then + pids=$(fuser "$1/tcp" 2>/dev/null || echo "") + elif [ -d /proc/net ]; then + pids=$(find_pids_on_port_via_proc "$1") + else + echo "Warning: no tool available to find processes on port $1" + return + fi if [ "$pids" != "" ]; then - kill "$pids" + kill $pids echo "Stopped $pids." fi } From b0cc07c35a3bd5796e9fe26df50d90981d54fec9 Mon Sep 17 00:00:00 2001 From: yoon-park-rl Date: Fri, 10 Jul 2026 12:18:42 -0700 Subject: [PATCH 10/12] fix: retry polling on HTTP/2 GOAWAY connection errors (#817) Co-authored-by: Claude Sonnet 4.6 --- src/runloop_api_client/lib/wait_for_status.py | 10 +++++----- src/runloop_api_client/resources/devboxes/devboxes.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/runloop_api_client/lib/wait_for_status.py b/src/runloop_api_client/lib/wait_for_status.py index 73df2bf95..cb7bb9193 100644 --- a/src/runloop_api_client/lib/wait_for_status.py +++ b/src/runloop_api_client/lib/wait_for_status.py @@ -14,7 +14,7 @@ from typing import List, Type, TypeVar, Callable, Optional, Awaitable from .polling import PollingConfig, PollingTimeout -from .._exceptions import APIStatusError, APITimeoutError +from .._exceptions import APIStatusError, APIConnectionError T = TypeVar("T") @@ -49,8 +49,8 @@ def wait_for_status( cast_to=cast_to, options={"max_retries": 0}, ) - except (APITimeoutError, APIStatusError) as error: - if isinstance(error, APITimeoutError) or error.response.status_code == 408: + except (APIConnectionError, APIStatusError) as error: + if isinstance(error, APIConnectionError) or error.response.status_code == 408: last_result = placeholder() else: raise @@ -89,8 +89,8 @@ async def async_wait_for_status( cast_to=cast_to, options={"max_retries": 0}, ) - except (APITimeoutError, APIStatusError) as error: - if isinstance(error, APITimeoutError) or error.response.status_code == 408: + except (APIConnectionError, APIStatusError) as error: + if isinstance(error, APIConnectionError) or error.response.status_code == 408: last_result = placeholder() else: raise diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index ec9f8eaf8..9a9ab288a 100644 --- a/src/runloop_api_client/resources/devboxes/devboxes.py +++ b/src/runloop_api_client/resources/devboxes/devboxes.py @@ -71,7 +71,7 @@ SyncDiskSnapshotsCursorIDPage, AsyncDiskSnapshotsCursorIDPage, ) -from ..._exceptions import RunloopError, APIStatusError, APITimeoutError +from ..._exceptions import RunloopError, APIStatusError, APIConnectionError from ...lib.polling import PollingConfig, poll_until from ..._base_client import AsyncPaginator, make_request_options from .disk_snapshots import ( @@ -957,7 +957,7 @@ def execute_and_await_completion( return execution def handle_timeout_error(error: Exception) -> DevboxAsyncExecutionDetailView: - if isinstance(error, APITimeoutError) or ( + if isinstance(error, APIConnectionError) or ( isinstance(error, APIStatusError) and error.response.status_code == 408 ): return execution @@ -2627,7 +2627,7 @@ async def execute_and_await_completion( return execution def handle_timeout_error(error: Exception) -> DevboxAsyncExecutionDetailView: - if isinstance(error, APITimeoutError) or ( + if isinstance(error, APIConnectionError) or ( isinstance(error, APIStatusError) and error.response.status_code == 408 ): return execution From c04f867543c8ef0f2328c3235f9a26965dda2432 Mon Sep 17 00:00:00 2001 From: Gautam Raj <156491596+gautam-rl@users.noreply.github.com> Date: Fri, 10 Jul 2026 13:55:28 -0700 Subject: [PATCH 11/12] chore(devbox): cap forwarded long-poll timeout and add client read margin (#818) Co-authored-by: Claude Opus 4.8 --- src/runloop_api_client/_constants.py | 10 +++++++ src/runloop_api_client/lib/wait_for_status.py | 25 +++++++++++++++--- .../resources/devboxes/devboxes.py | 26 ++++++++++++++++--- .../resources/devboxes/executions.py | 4 ++- 4 files changed, 57 insertions(+), 8 deletions(-) diff --git a/src/runloop_api_client/_constants.py b/src/runloop_api_client/_constants.py index 88f944ce2..83506afe3 100644 --- a/src/runloop_api_client/_constants.py +++ b/src/runloop_api_client/_constants.py @@ -13,6 +13,16 @@ INITIAL_RETRY_DELAY = 1.0 MAX_RETRY_DELAY = 60.0 +# Long-poll endpoints tell the server how long to hold the connection and expect a +# graceful 408 when that hold elapses. The per-request client read timeout must +# exceed the server hold so the server returns 408 first instead of the client +# aborting the stream (RST_STREAM) and surfacing a connection error. +LONG_POLL_CLIENT_BUFFER_SECONDS = 5.0 + +# Authoritative server-side long-poll hold clamps, mirrored from the mux controllers. +STATUS_LONG_POLL_SERVER_MAX_SECONDS = 30.0 +EXEC_LONG_POLL_SERVER_MAX_SECONDS = 25.0 + # Maximum allowed size (in bytes) for individual entries in `file_mounts` when creating Blueprints # NOTE: Empirically, ~131,000 is the maximum command length after # base64 encoding; 98,250 is the pre-encoded limit that stays within that bound. diff --git a/src/runloop_api_client/lib/wait_for_status.py b/src/runloop_api_client/lib/wait_for_status.py index cb7bb9193..ab9f28bbf 100644 --- a/src/runloop_api_client/lib/wait_for_status.py +++ b/src/runloop_api_client/lib/wait_for_status.py @@ -13,7 +13,10 @@ import time from typing import List, Type, TypeVar, Callable, Optional, Awaitable +import httpx + from .polling import PollingConfig, PollingTimeout +from .._constants import LONG_POLL_CLIENT_BUFFER_SECONDS, STATUS_LONG_POLL_SERVER_MAX_SECONDS from .._exceptions import APIStatusError, APIConnectionError T = TypeVar("T") @@ -27,6 +30,7 @@ def wait_for_status( placeholder: Callable[[], T], is_terminal: Callable[[T], bool], polling_config: Optional[PollingConfig] = None, + server_max_timeout_seconds: float = STATUS_LONG_POLL_SERVER_MAX_SECONDS, ) -> T: """Sync long-poll for a status change, retrying until *is_terminal* or timeout.""" config = polling_config or PollingConfig() @@ -42,12 +46,18 @@ def wait_for_status( if remaining <= 0: raise PollingTimeout(f"Exceeded timeout of {timeout} seconds", last_result) + # Cap the server hold at what the server honors, and give the client read + # timeout a buffer beyond it so the server returns 408 first. + server_timeout = min(remaining, server_max_timeout_seconds) try: last_result = post_fn( path, - body={"statuses": statuses, "timeout_seconds": remaining}, + body={"statuses": statuses, "timeout_seconds": server_timeout}, cast_to=cast_to, - options={"max_retries": 0}, + options={ + "max_retries": 0, + "timeout": httpx.Timeout(server_timeout + LONG_POLL_CLIENT_BUFFER_SECONDS, connect=5.0), + }, ) except (APIConnectionError, APIStatusError) as error: if isinstance(error, APIConnectionError) or error.response.status_code == 408: @@ -67,6 +77,7 @@ async def async_wait_for_status( placeholder: Callable[[], T], is_terminal: Callable[[T], bool], polling_config: Optional[PollingConfig] = None, + server_max_timeout_seconds: float = STATUS_LONG_POLL_SERVER_MAX_SECONDS, ) -> T: """Async long-poll for a status change, retrying until *is_terminal* or timeout.""" config = polling_config or PollingConfig() @@ -82,12 +93,18 @@ async def async_wait_for_status( if remaining <= 0: raise PollingTimeout(f"Exceeded timeout of {timeout} seconds", last_result) + # Cap the server hold at what the server honors, and give the client read + # timeout a buffer beyond it so the server returns 408 first. + server_timeout = min(remaining, server_max_timeout_seconds) try: last_result = await post_fn( path, - body={"statuses": statuses, "timeout_seconds": remaining}, + body={"statuses": statuses, "timeout_seconds": server_timeout}, cast_to=cast_to, - options={"max_retries": 0}, + options={ + "max_retries": 0, + "timeout": httpx.Timeout(server_timeout + LONG_POLL_CLIENT_BUFFER_SECONDS, connect=5.0), + }, ) except (APIConnectionError, APIStatusError) as error: if isinstance(error, APIConnectionError) or error.response.status_code == 408: diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index 9a9ab288a..fdbe2737f 100644 --- a/src/runloop_api_client/resources/devboxes/devboxes.py +++ b/src/runloop_api_client/resources/devboxes/devboxes.py @@ -64,7 +64,11 @@ async_to_custom_raw_response_wrapper, async_to_custom_streamed_response_wrapper, ) -from ..._constants import DEFAULT_TIMEOUT +from ..._constants import ( + DEFAULT_TIMEOUT, + LONG_POLL_CLIENT_BUFFER_SECONDS, + EXEC_LONG_POLL_SERVER_MAX_SECONDS, +) from ...pagination import ( SyncDevboxesCursorIDPage, AsyncDevboxesCursorIDPage, @@ -967,7 +971,15 @@ def is_done(result: DevboxAsyncExecutionDetailView) -> bool: return result.status == "completed" return poll_until( - lambda: self.wait_for_command(execution.execution_id, devbox_id=devbox_id, statuses=["completed"]), + # Client read timeout must exceed the server long-poll hold so the server + # returns 408 first instead of the client aborting the stream. + lambda: self.wait_for_command( + execution.execution_id, + devbox_id=devbox_id, + statuses=["completed"], + timeout_seconds=int(EXEC_LONG_POLL_SERVER_MAX_SECONDS), + timeout=httpx.Timeout(EXEC_LONG_POLL_SERVER_MAX_SECONDS + LONG_POLL_CLIENT_BUFFER_SECONDS, connect=5.0), + ), is_done, polling_config, handle_timeout_error, @@ -2637,7 +2649,15 @@ def is_done(result: DevboxAsyncExecutionDetailView) -> bool: return result.status == "completed" return await async_poll_until( - lambda: self.wait_for_command(execution.execution_id, devbox_id=devbox_id, statuses=["completed"]), + # Client read timeout must exceed the server long-poll hold so the server + # returns 408 first instead of the client aborting the stream. + lambda: self.wait_for_command( + execution.execution_id, + devbox_id=devbox_id, + statuses=["completed"], + timeout_seconds=int(EXEC_LONG_POLL_SERVER_MAX_SECONDS), + timeout=httpx.Timeout(EXEC_LONG_POLL_SERVER_MAX_SECONDS + LONG_POLL_CLIENT_BUFFER_SECONDS, connect=5.0), + ), is_done, polling_config, handle_timeout_error, diff --git a/src/runloop_api_client/resources/devboxes/executions.py b/src/runloop_api_client/resources/devboxes/executions.py index e5bfd7ed8..4b0e3d4c4 100755 --- a/src/runloop_api_client/resources/devboxes/executions.py +++ b/src/runloop_api_client/resources/devboxes/executions.py @@ -18,7 +18,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._constants import DEFAULT_TIMEOUT, RAW_RESPONSE_HEADER +from ..._constants import DEFAULT_TIMEOUT, RAW_RESPONSE_HEADER, EXEC_LONG_POLL_SERVER_MAX_SECONDS from ..._streaming import Stream, AsyncStream, ReconnectingStream, AsyncReconnectingStream from ...lib.polling import PollingConfig from ..._base_client import make_request_options @@ -149,6 +149,7 @@ def is_done(execution: DevboxAsyncExecutionDetailView) -> bool: lambda: placeholder_execution_detail_view(devbox_id, execution_id), is_done, polling_config, + EXEC_LONG_POLL_SERVER_MAX_SECONDS, ) def execute_async( @@ -680,6 +681,7 @@ def is_done(execution: DevboxAsyncExecutionDetailView) -> bool: lambda: placeholder_execution_detail_view(devbox_id, execution_id), is_done, polling_config, + EXEC_LONG_POLL_SERVER_MAX_SECONDS, ) async def execute_async( From d85117a800e64e8586e4c6e63e5a738f8f5c11b1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Jul 2026 21:59:51 +0000 Subject: [PATCH 12/12] release: 1.23.3 (#812) Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: tode-rl --- .release-please-manifest.json | 2 +- .stats.yml | 8 +- CHANGELOG.md | 21 +++ api.md | 3 - pyproject.toml | 2 +- src/runloop_api_client/_version.py | 2 +- .../resources/blueprints.py | 178 ------------------ .../resources/devboxes/devboxes.py | 12 -- src/runloop_api_client/types/__init__.py | 4 - ...blueprint_create_from_inspection_params.py | 53 ------ .../types/devbox_create_params.py | 3 - .../types/inspection_source_param.py | 18 -- .../types/scope_entry_view.py | 1 - .../types/scope_entry_view_param.py | 1 - tests/api_resources/test_blueprints.py | 170 ----------------- tests/api_resources/test_devboxes.py | 2 - 16 files changed, 28 insertions(+), 452 deletions(-) delete mode 100644 src/runloop_api_client/types/blueprint_create_from_inspection_params.py delete mode 100644 src/runloop_api_client/types/inspection_source_param.py diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d9381b3d1..75baea2d1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.23.2" + ".": "1.23.3" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index ed9090410..3b0452793 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 120 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-8f05915b107d49f4a50f2d83abfa1d7233a685f1d85e02465a218fa5acb55ddd.yml -openapi_spec_hash: 905fa27970b4b7201184df9c63eba3b9 -config_hash: ed1fdd7c9f0a25647e16b602bad4ff2e +configured_endpoints: 119 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-99b4be5cc4cd6f2e1cfd71d5a9ec5409dd9293fe6084833da76f178010bfdcab.yml +openapi_spec_hash: 4760825b37e131da53c88bf893b60937 +config_hash: 9f32651e6269089b5d6c33594b992232 diff --git a/CHANGELOG.md b/CHANGELOG.md index e83eeec37..462953953 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 1.23.3 (2026-07-10) + +Full Changelog: [v1.23.2...v1.23.3](https://github.com/runloopai/api-client-python/compare/v1.23.2...v1.23.3) + +### Bug Fixes + +* **blueprints:** remove create_from_inspection endpoint ([fa8a630](https://github.com/runloopai/api-client-python/commit/fa8a630e348147eb6c3c0a0b2f8c7fc325ad6d1f)) +* **devbox:** remove stale repo_connection_id helper arg ([#813](https://github.com/runloopai/api-client-python/issues/813)) ([4b5a933](https://github.com/runloopai/api-client-python/commit/4b5a933b2ebefcf160015ee64ab8ec9d7fd9c5e5)) +* retry polling on HTTP/2 GOAWAY connection errors ([#817](https://github.com/runloopai/api-client-python/issues/817)) ([b0cc07c](https://github.com/runloopai/api-client-python/commit/b0cc07c35a3bd5796e9fe26df50d90981d54fec9)) +* update test script to work without lsof on CI ([#798](https://github.com/runloopai/api-client-python/issues/798)) ([50507eb](https://github.com/runloopai/api-client-python/commit/50507eba5537386e9af72ba3e2629cfac89c2391)) + + +### Chores + +* **devbox:** cap forwarded long-poll timeout and add client read margin ([#818](https://github.com/runloopai/api-client-python/issues/818)) ([c04f867](https://github.com/runloopai/api-client-python/commit/c04f867543c8ef0f2328c3235f9a26965dda2432)) + + +### Documentation + +* add agent PR guidance ([#814](https://github.com/runloopai/api-client-python/issues/814)) ([3c483bd](https://github.com/runloopai/api-client-python/commit/3c483bdfd46b48afe2b0f2e68d9f4326f980414a)) + ## 1.23.2 (2026-06-09) Full Changelog: [v1.23.1...v1.23.2](https://github.com/runloopai/api-client-python/compare/v1.23.1...v1.23.2) diff --git a/api.md b/api.md index fbd1bc6ab..2f3ddb2f8 100644 --- a/api.md +++ b/api.md @@ -174,14 +174,12 @@ Types: ```python from runloop_api_client.types import ( - BlueprintBuildFromInspectionParameters, BlueprintBuildLog, BlueprintBuildLogsListView, BlueprintBuildParameters, BlueprintListView, BlueprintPreviewView, BlueprintView, - InspectionSource, ) ``` @@ -192,7 +190,6 @@ Methods: - client.blueprints.retrieve(id) -> BlueprintView - client.blueprints.list(\*\*params) -> SyncBlueprintsCursorIDPage[BlueprintView] - client.blueprints.delete(id) -> object -- client.blueprints.create_from_inspection(\*\*params) -> BlueprintView - client.blueprints.list_public(\*\*params) -> SyncBlueprintsCursorIDPage[BlueprintView] - client.blueprints.logs(id) -> BlueprintBuildLogsListView - client.blueprints.preview(\*\*params) -> BlueprintPreviewView diff --git a/pyproject.toml b/pyproject.toml index 7362e5b07..909d5e9c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runloop_api_client" -version = "1.23.2" +version = "1.23.3" description = "The official Python library for the runloop API" dynamic = ["readme"] license = "MIT" diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py index de8ee1975..6d0c2b60b 100644 --- a/src/runloop_api_client/_version.py +++ b/src/runloop_api_client/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "runloop_api_client" -__version__ = "1.23.2" # x-release-please-version +__version__ = "1.23.3" # x-release-please-version diff --git a/src/runloop_api_client/resources/blueprints.py b/src/runloop_api_client/resources/blueprints.py index 79ee985a3..66185645e 100644 --- a/src/runloop_api_client/resources/blueprints.py +++ b/src/runloop_api_client/resources/blueprints.py @@ -12,7 +12,6 @@ blueprint_create_params, blueprint_preview_params, blueprint_list_public_params, - blueprint_create_from_inspection_params, ) from .._types import NOT_GIVEN, Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given from .._utils import is_given, path_template, maybe_transform, async_maybe_transform @@ -33,7 +32,6 @@ from .._utils._validation import ValidationNotification from ..types.blueprint_view import BlueprintView from ..types.blueprint_preview_view import BlueprintPreviewView -from ..types.inspection_source_param import InspectionSourceParam from ..types.blueprint_build_logs_list_view import BlueprintBuildLogsListView from ..types.shared_params.launch_parameters import LaunchParameters from ..types.shared_params.code_mount_parameters import CodeMountParameters @@ -499,88 +497,6 @@ def delete( cast_to=object, ) - def create_from_inspection( - self, - *, - inspection_source: InspectionSourceParam, - name: str, - file_mounts: Optional[Dict[str, str]] | Omit = omit, - launch_parameters: Optional[LaunchParameters] | Omit = omit, - metadata: Optional[Dict[str, str]] | Omit = omit, - network_policy_id: Optional[str] | Omit = omit, - secrets: Optional[Dict[str, str]] | Omit = omit, - system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> BlueprintView: - """ - Starts build of custom defined container Blueprint using a RepositoryConnection - Inspection as a source container specification. - - Args: - inspection_source: (Optional) Use a RepositoryInspection a source of a Blueprint build. The - Dockerfile will be automatically created based on the RepositoryInspection - contents. - - name: Name of the Blueprint. - - file_mounts: (Optional) Map of paths and file contents to write before setup. - - launch_parameters: LaunchParameters enable you to customize the resources available to your Devbox - as well as the environment set up that should be completed before the Devbox is - marked as 'running'. - - metadata: (Optional) User defined metadata for the Blueprint. - - network_policy_id: (Optional) ID of the network policy to apply during blueprint build. This - restricts network access during the build process. - - secrets: (Optional) Map of mount IDs/environment variable names to secret names. Secrets - can be used as environment variables in system_setup_commands. Example: - {"GITHUB_TOKEN": "gh_secret"} makes 'gh_secret' available as GITHUB_TOKEN. - - system_setup_commands: A list of commands to run to set up your system. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/v1/blueprints/create_from_inspection", - body=maybe_transform( - { - "inspection_source": inspection_source, - "name": name, - "file_mounts": file_mounts, - "launch_parameters": launch_parameters, - "metadata": metadata, - "network_policy_id": network_policy_id, - "secrets": secrets, - "system_setup_commands": system_setup_commands, - }, - blueprint_create_from_inspection_params.BlueprintCreateFromInspectionParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=BlueprintView, - ) - def list_public( self, *, @@ -1186,88 +1102,6 @@ async def delete( cast_to=object, ) - async def create_from_inspection( - self, - *, - inspection_source: InspectionSourceParam, - name: str, - file_mounts: Optional[Dict[str, str]] | Omit = omit, - launch_parameters: Optional[LaunchParameters] | Omit = omit, - metadata: Optional[Dict[str, str]] | Omit = omit, - network_policy_id: Optional[str] | Omit = omit, - secrets: Optional[Dict[str, str]] | Omit = omit, - system_setup_commands: Optional[SequenceNotStr[str]] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> BlueprintView: - """ - Starts build of custom defined container Blueprint using a RepositoryConnection - Inspection as a source container specification. - - Args: - inspection_source: (Optional) Use a RepositoryInspection a source of a Blueprint build. The - Dockerfile will be automatically created based on the RepositoryInspection - contents. - - name: Name of the Blueprint. - - file_mounts: (Optional) Map of paths and file contents to write before setup. - - launch_parameters: LaunchParameters enable you to customize the resources available to your Devbox - as well as the environment set up that should be completed before the Devbox is - marked as 'running'. - - metadata: (Optional) User defined metadata for the Blueprint. - - network_policy_id: (Optional) ID of the network policy to apply during blueprint build. This - restricts network access during the build process. - - secrets: (Optional) Map of mount IDs/environment variable names to secret names. Secrets - can be used as environment variables in system_setup_commands. Example: - {"GITHUB_TOKEN": "gh_secret"} makes 'gh_secret' available as GITHUB_TOKEN. - - system_setup_commands: A list of commands to run to set up your system. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/v1/blueprints/create_from_inspection", - body=await async_maybe_transform( - { - "inspection_source": inspection_source, - "name": name, - "file_mounts": file_mounts, - "launch_parameters": launch_parameters, - "metadata": metadata, - "network_policy_id": network_policy_id, - "secrets": secrets, - "system_setup_commands": system_setup_commands, - }, - blueprint_create_from_inspection_params.BlueprintCreateFromInspectionParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=BlueprintView, - ) - def list_public( self, *, @@ -1494,9 +1328,6 @@ def __init__(self, blueprints: BlueprintsResource) -> None: self.delete = to_raw_response_wrapper( blueprints.delete, ) - self.create_from_inspection = to_raw_response_wrapper( - blueprints.create_from_inspection, - ) self.list_public = to_raw_response_wrapper( blueprints.list_public, ) @@ -1526,9 +1357,6 @@ def __init__(self, blueprints: AsyncBlueprintsResource) -> None: self.delete = async_to_raw_response_wrapper( blueprints.delete, ) - self.create_from_inspection = async_to_raw_response_wrapper( - blueprints.create_from_inspection, - ) self.list_public = async_to_raw_response_wrapper( blueprints.list_public, ) @@ -1558,9 +1386,6 @@ def __init__(self, blueprints: BlueprintsResource) -> None: self.delete = to_streamed_response_wrapper( blueprints.delete, ) - self.create_from_inspection = to_streamed_response_wrapper( - blueprints.create_from_inspection, - ) self.list_public = to_streamed_response_wrapper( blueprints.list_public, ) @@ -1590,9 +1415,6 @@ def __init__(self, blueprints: AsyncBlueprintsResource) -> None: self.delete = async_to_streamed_response_wrapper( blueprints.delete, ) - self.create_from_inspection = async_to_streamed_response_wrapper( - blueprints.create_from_inspection, - ) self.list_public = async_to_streamed_response_wrapper( blueprints.list_public, ) diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index fdbe2737f..f919a2147 100644 --- a/src/runloop_api_client/resources/devboxes/devboxes.py +++ b/src/runloop_api_client/resources/devboxes/devboxes.py @@ -175,7 +175,6 @@ def create( metadata: Optional[Dict[str, str]] | Omit = omit, mounts: Optional[Iterable[Mount]] | Omit = omit, name: Optional[str] | Omit = omit, - repo_connection_id: Optional[str] | Omit = omit, secrets: Optional[Dict[str, str]] | Omit = omit, snapshot_id: Optional[str] | Omit = omit, tunnel: Optional[devbox_create_params.Tunnel] | Omit = omit, @@ -236,8 +235,6 @@ def create( name: (Optional) A user specified name to give the Devbox. - repo_connection_id: Repository connection id the devbox should source its base image from. - secrets: (Optional) Map of environment variable names to secret names. The secret values will be securely injected as environment variables in the Devbox. Example: {"DB_PASS": "DATABASE_PASSWORD"} sets environment variable 'DB_PASS' to the @@ -275,7 +272,6 @@ def create( "metadata": metadata, "mounts": mounts, "name": name, - "repo_connection_id": repo_connection_id, "secrets": secrets, "snapshot_id": snapshot_id, "tunnel": tunnel, @@ -472,7 +468,6 @@ def create_and_await_running( mounts: Optional[Iterable[Mount]] | Omit = omit, name: Optional[str] | Omit = omit, polling_config: PollingConfig | None = None, - repo_connection_id: Optional[str] | Omit = omit, secrets: Optional[Dict[str, str]] | Omit = omit, snapshot_id: Optional[str] | Omit = omit, tunnel: Optional[devbox_create_params.Tunnel] | Omit = omit, @@ -513,7 +508,6 @@ def create_and_await_running( metadata=metadata, mounts=mounts, name=name, - repo_connection_id=repo_connection_id, secrets=secrets, snapshot_id=snapshot_id, tunnel=tunnel, @@ -1853,7 +1847,6 @@ async def create( metadata: Optional[Dict[str, str]] | Omit = omit, mounts: Optional[Iterable[Mount]] | Omit = omit, name: Optional[str] | Omit = omit, - repo_connection_id: Optional[str] | Omit = omit, secrets: Optional[Dict[str, str]] | Omit = omit, snapshot_id: Optional[str] | Omit = omit, tunnel: Optional[devbox_create_params.Tunnel] | Omit = omit, @@ -1914,8 +1907,6 @@ async def create( name: (Optional) A user specified name to give the Devbox. - repo_connection_id: Repository connection id the devbox should source its base image from. - secrets: (Optional) Map of environment variable names to secret names. The secret values will be securely injected as environment variables in the Devbox. Example: {"DB_PASS": "DATABASE_PASSWORD"} sets environment variable 'DB_PASS' to the @@ -1953,7 +1944,6 @@ async def create( "metadata": metadata, "mounts": mounts, "name": name, - "repo_connection_id": repo_connection_id, "secrets": secrets, "snapshot_id": snapshot_id, "tunnel": tunnel, @@ -2019,7 +2009,6 @@ async def create_and_await_running( mounts: Optional[Iterable[Mount]] | Omit = omit, name: Optional[str] | Omit = omit, polling_config: PollingConfig | None = None, - repo_connection_id: Optional[str] | Omit = omit, secrets: Optional[Dict[str, str]] | Omit = omit, snapshot_id: Optional[str] | Omit = omit, tunnel: Optional[devbox_create_params.Tunnel] | Omit = omit, @@ -2061,7 +2050,6 @@ async def create_and_await_running( metadata=metadata, mounts=mounts, name=name, - repo_connection_id=repo_connection_id, secrets=secrets, snapshot_id=snapshot_id, tunnel=tunnel, diff --git a/src/runloop_api_client/types/__init__.py b/src/runloop_api_client/types/__init__.py index 6d23d82f3..3f36e4cc2 100644 --- a/src/runloop_api_client/types/__init__.py +++ b/src/runloop_api_client/types/__init__.py @@ -87,7 +87,6 @@ from .benchmark_run_list_view import BenchmarkRunListView as BenchmarkRunListView from .benchmark_update_params import BenchmarkUpdateParams as BenchmarkUpdateParams from .blueprint_create_params import BlueprintCreateParams as BlueprintCreateParams -from .inspection_source_param import InspectionSourceParam as InspectionSourceParam from .pty_control_result_view import PtyControlResultView as PtyControlResultView from .agent_devbox_counts_view import AgentDevboxCountsView as AgentDevboxCountsView from .agent_list_public_params import AgentListPublicParams as AgentListPublicParams @@ -146,6 +145,3 @@ from .benchmark_run_list_scenario_runs_params import ( BenchmarkRunListScenarioRunsParams as BenchmarkRunListScenarioRunsParams, ) -from .blueprint_create_from_inspection_params import ( - BlueprintCreateFromInspectionParams as BlueprintCreateFromInspectionParams, -) diff --git a/src/runloop_api_client/types/blueprint_create_from_inspection_params.py b/src/runloop_api_client/types/blueprint_create_from_inspection_params.py deleted file mode 100644 index 21715b1b0..000000000 --- a/src/runloop_api_client/types/blueprint_create_from_inspection_params.py +++ /dev/null @@ -1,53 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Dict, Optional -from typing_extensions import Required, TypedDict - -from .._types import SequenceNotStr -from .inspection_source_param import InspectionSourceParam -from .shared_params.launch_parameters import LaunchParameters - -__all__ = ["BlueprintCreateFromInspectionParams"] - - -class BlueprintCreateFromInspectionParams(TypedDict, total=False): - inspection_source: Required[InspectionSourceParam] - """(Optional) Use a RepositoryInspection a source of a Blueprint build. - - The Dockerfile will be automatically created based on the RepositoryInspection - contents. - """ - - name: Required[str] - """Name of the Blueprint.""" - - file_mounts: Optional[Dict[str, str]] - """(Optional) Map of paths and file contents to write before setup.""" - - launch_parameters: Optional[LaunchParameters] - """ - LaunchParameters enable you to customize the resources available to your Devbox - as well as the environment set up that should be completed before the Devbox is - marked as 'running'. - """ - - metadata: Optional[Dict[str, str]] - """(Optional) User defined metadata for the Blueprint.""" - - network_policy_id: Optional[str] - """(Optional) ID of the network policy to apply during blueprint build. - - This restricts network access during the build process. - """ - - secrets: Optional[Dict[str, str]] - """(Optional) Map of mount IDs/environment variable names to secret names. - - Secrets can be used as environment variables in system_setup_commands. Example: - {"GITHUB_TOKEN": "gh_secret"} makes 'gh_secret' available as GITHUB_TOKEN. - """ - - system_setup_commands: Optional[SequenceNotStr[str]] - """A list of commands to run to set up your system.""" diff --git a/src/runloop_api_client/types/devbox_create_params.py b/src/runloop_api_client/types/devbox_create_params.py index eed5230dc..765961846 100644 --- a/src/runloop_api_client/types/devbox_create_params.py +++ b/src/runloop_api_client/types/devbox_create_params.py @@ -71,9 +71,6 @@ class DevboxBaseCreateParams(TypedDict, total=False): name: Optional[str] """(Optional) A user specified name to give the Devbox.""" - repo_connection_id: Optional[str] - """Repository connection id the devbox should source its base image from.""" - secrets: Optional[Dict[str, str]] """(Optional) Map of environment variable names to secret names. diff --git a/src/runloop_api_client/types/inspection_source_param.py b/src/runloop_api_client/types/inspection_source_param.py deleted file mode 100644 index 0d1308d8e..000000000 --- a/src/runloop_api_client/types/inspection_source_param.py +++ /dev/null @@ -1,18 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Optional -from typing_extensions import Required, TypedDict - -__all__ = ["InspectionSourceParam"] - - -class InspectionSourceParam(TypedDict, total=False): - """Use a RepositoryInspection a source of a Blueprint build.""" - - inspection_id: Required[str] - """The ID of a repository inspection.""" - - github_auth_token: Optional[str] - """GitHub authentication token for accessing private repositories.""" diff --git a/src/runloop_api_client/types/scope_entry_view.py b/src/runloop_api_client/types/scope_entry_view.py index 1a0903895..00e7f9fff 100644 --- a/src/runloop_api_client/types/scope_entry_view.py +++ b/src/runloop_api_client/types/scope_entry_view.py @@ -18,7 +18,6 @@ class ScopeEntryView(BaseModel): "RESOURCE_TYPE_SNAPSHOTS", "RESOURCE_TYPE_BENCHMARKS", "RESOURCE_TYPE_SCENARIOS", - "RESOURCE_TYPE_REPO_CONNECTIONS", "RESOURCE_TYPE_AGENTS", "RESOURCE_TYPE_OBJECTS", "RESOURCE_TYPE_ACCOUNT", diff --git a/src/runloop_api_client/types/scope_entry_view_param.py b/src/runloop_api_client/types/scope_entry_view_param.py index 5379b838a..47b6cac2d 100644 --- a/src/runloop_api_client/types/scope_entry_view_param.py +++ b/src/runloop_api_client/types/scope_entry_view_param.py @@ -16,7 +16,6 @@ class ScopeEntryViewParam(TypedDict, total=False): "RESOURCE_TYPE_SNAPSHOTS", "RESOURCE_TYPE_BENCHMARKS", "RESOURCE_TYPE_SCENARIOS", - "RESOURCE_TYPE_REPO_CONNECTIONS", "RESOURCE_TYPE_AGENTS", "RESOURCE_TYPE_OBJECTS", "RESOURCE_TYPE_ACCOUNT", diff --git a/tests/api_resources/test_blueprints.py b/tests/api_resources/test_blueprints.py index eaa6d65c4..e3ff9b7eb 100644 --- a/tests/api_resources/test_blueprints.py +++ b/tests/api_resources/test_blueprints.py @@ -266,91 +266,6 @@ def test_path_params_delete(self, client: Runloop) -> None: "", ) - @parametrize - def test_method_create_from_inspection(self, client: Runloop) -> None: - blueprint = client.blueprints.create_from_inspection( - inspection_source={"inspection_id": "inspection_id"}, - name="name", - ) - assert_matches_type(BlueprintView, blueprint, path=["response"]) - - @parametrize - def test_method_create_from_inspection_with_all_params(self, client: Runloop) -> None: - blueprint = client.blueprints.create_from_inspection( - inspection_source={ - "inspection_id": "inspection_id", - "github_auth_token": "github_auth_token", - }, - name="name", - file_mounts={"foo": "string"}, - launch_parameters={ - "after_idle": { - "idle_time_seconds": 0, - "on_idle": "shutdown", - }, - "architecture": "x86_64", - "available_ports": [0], - "custom_cpu_cores": 0, - "custom_disk_size": 0, - "custom_gb_memory": 0, - "keep_alive_time_seconds": 0, - "launch_commands": ["string"], - "lifecycle": { - "after_idle": { - "idle_time_seconds": 0, - "on_idle": "shutdown", - }, - "lifecycle_hooks": { - "suspend_commands": ["string"], - "suspend_deadline_ms": 0, - }, - "resume_triggers": { - "axon_event": True, - "http": True, - }, - }, - "network_policy_id": "network_policy_id", - "provisioning_tier": "standard", - "required_services": ["string"], - "resource_size_request": "X_SMALL", - "user_parameters": { - "uid": 0, - "username": "username", - }, - }, - metadata={"foo": "string"}, - network_policy_id="network_policy_id", - secrets={"foo": "string"}, - system_setup_commands=["string"], - ) - assert_matches_type(BlueprintView, blueprint, path=["response"]) - - @parametrize - def test_raw_response_create_from_inspection(self, client: Runloop) -> None: - response = client.blueprints.with_raw_response.create_from_inspection( - inspection_source={"inspection_id": "inspection_id"}, - name="name", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - blueprint = response.parse() - assert_matches_type(BlueprintView, blueprint, path=["response"]) - - @parametrize - def test_streaming_response_create_from_inspection(self, client: Runloop) -> None: - with client.blueprints.with_streaming_response.create_from_inspection( - inspection_source={"inspection_id": "inspection_id"}, - name="name", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - blueprint = response.parse() - assert_matches_type(BlueprintView, blueprint, path=["response"]) - - assert cast(Any, response.is_closed) is True - @parametrize def test_method_list_public(self, client: Runloop) -> None: blueprint = client.blueprints.list_public() @@ -787,91 +702,6 @@ async def test_path_params_delete(self, async_client: AsyncRunloop) -> None: "", ) - @parametrize - async def test_method_create_from_inspection(self, async_client: AsyncRunloop) -> None: - blueprint = await async_client.blueprints.create_from_inspection( - inspection_source={"inspection_id": "inspection_id"}, - name="name", - ) - assert_matches_type(BlueprintView, blueprint, path=["response"]) - - @parametrize - async def test_method_create_from_inspection_with_all_params(self, async_client: AsyncRunloop) -> None: - blueprint = await async_client.blueprints.create_from_inspection( - inspection_source={ - "inspection_id": "inspection_id", - "github_auth_token": "github_auth_token", - }, - name="name", - file_mounts={"foo": "string"}, - launch_parameters={ - "after_idle": { - "idle_time_seconds": 0, - "on_idle": "shutdown", - }, - "architecture": "x86_64", - "available_ports": [0], - "custom_cpu_cores": 0, - "custom_disk_size": 0, - "custom_gb_memory": 0, - "keep_alive_time_seconds": 0, - "launch_commands": ["string"], - "lifecycle": { - "after_idle": { - "idle_time_seconds": 0, - "on_idle": "shutdown", - }, - "lifecycle_hooks": { - "suspend_commands": ["string"], - "suspend_deadline_ms": 0, - }, - "resume_triggers": { - "axon_event": True, - "http": True, - }, - }, - "network_policy_id": "network_policy_id", - "provisioning_tier": "standard", - "required_services": ["string"], - "resource_size_request": "X_SMALL", - "user_parameters": { - "uid": 0, - "username": "username", - }, - }, - metadata={"foo": "string"}, - network_policy_id="network_policy_id", - secrets={"foo": "string"}, - system_setup_commands=["string"], - ) - assert_matches_type(BlueprintView, blueprint, path=["response"]) - - @parametrize - async def test_raw_response_create_from_inspection(self, async_client: AsyncRunloop) -> None: - response = await async_client.blueprints.with_raw_response.create_from_inspection( - inspection_source={"inspection_id": "inspection_id"}, - name="name", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - blueprint = await response.parse() - assert_matches_type(BlueprintView, blueprint, path=["response"]) - - @parametrize - async def test_streaming_response_create_from_inspection(self, async_client: AsyncRunloop) -> None: - async with async_client.blueprints.with_streaming_response.create_from_inspection( - inspection_source={"inspection_id": "inspection_id"}, - name="name", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - blueprint = await response.parse() - assert_matches_type(BlueprintView, blueprint, path=["response"]) - - assert cast(Any, response.is_closed) is True - @parametrize async def test_method_list_public(self, async_client: AsyncRunloop) -> None: blueprint = await async_client.blueprints.list_public() diff --git a/tests/api_resources/test_devboxes.py b/tests/api_resources/test_devboxes.py index be58c7c21..6c3e89c8f 100644 --- a/tests/api_resources/test_devboxes.py +++ b/tests/api_resources/test_devboxes.py @@ -124,7 +124,6 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: } ], name="name", - repo_connection_id="repo_connection_id", secrets={"foo": "string"}, snapshot_id="snapshot_id", tunnel={ @@ -1794,7 +1793,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - } ], name="name", - repo_connection_id="repo_connection_id", secrets={"foo": "string"}, snapshot_id="snapshot_id", tunnel={