From de2e1707de516cfe5d98351bb1b4830e2dd6c7f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 23:52:37 +0000 Subject: [PATCH 01/10] ci: pin GitHub Actions to commit SHAs Pin all GitHub Actions referenced in generated workflows (both first-party `actions/*` and third-party) to immutable commit SHAs. Updating pinned actions is now a deliberate codegen-side bump rather than implicit on every workflow run. --- .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..4e110b6be 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: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - 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: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - 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: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 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: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv uses: runloopai/setup-uv@main diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 7ec40f7d4..189e8027e 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: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Install uv uses: runloopai/setup-uv@main diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 364178039..0e5a99b97 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: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Check release environment run: | From c9c7c37c2a38f91142b0b28d1e5cbc183b8ee53e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 21:48:10 +0000 Subject: [PATCH 02/10] feat(api): expose lifecycle_hooks on LaunchParameters lifecycle (#9115) --- .stats.yml | 4 +- .../types/shared/launch_parameters.py | 37 +++++++++++++++++-- .../types/shared_params/launch_parameters.py | 37 +++++++++++++++++-- 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 ++++++++++++ 7 files changed, 132 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 75a9a5bb0..57d7d43d1 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 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-d4505c10f86f4ad122bfbc2a82a519278d626ac399c9ef3780496d5d7d1b99b9.yml +openapi_spec_hash: b29dfd448505a0a3a6686202f606b8f7 config_hash: 06faf3176c48bf2b258730ce50809f0f diff --git a/src/runloop_api_client/types/shared/launch_parameters.py b/src/runloop_api_client/types/shared/launch_parameters.py index 6e74af438..3479a5421 100644 --- a/src/runloop_api_client/types/shared/launch_parameters.py +++ b/src/runloop_api_client/types/shared/launch_parameters.py @@ -6,7 +6,28 @@ from ..._models import BaseModel from .after_idle import AfterIdle -__all__ = ["LaunchParameters", "Lifecycle", "LifecycleResumeTriggers", "UserParameters"] +__all__ = ["LaunchParameters", "Lifecycle", "LifecycleLifecycleHooks", "LifecycleResumeTriggers", "UserParameters"] + + +class LifecycleLifecycleHooks(BaseModel): + """Optional lifecycle hooks. + + suspend_commands run through the suspend path before the Devbox suspends; see launch_commands for work on every startup. + """ + + 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. + """ class LifecycleResumeTriggers(BaseModel): @@ -22,7 +43,7 @@ class LifecycleResumeTriggers(BaseModel): 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. + Configure idle policy via lifecycle.after_idle (if both this and the top-level after_idle are set, they must match), resume triggers via lifecycle.resume_triggers, and optional lifecycle hooks via lifecycle.lifecycle_hooks. """ after_idle: Optional[AfterIdle] = None @@ -32,6 +53,13 @@ class Lifecycle(BaseModel): value. Prefer this field for new integrations. """ + lifecycle_hooks: Optional[LifecycleLifecycleHooks] = None + """Optional lifecycle hooks. + + suspend_commands run through the suspend path before the Devbox suspends; see + launch_commands for work on every startup. + """ + resume_triggers: Optional[LifecycleResumeTriggers] = None """Triggers that can resume a suspended Devbox.""" @@ -93,8 +121,9 @@ class LaunchParameters(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 are set, they must match), resume triggers via + lifecycle.resume_triggers, and optional lifecycle hooks via + lifecycle.lifecycle_hooks. """ network_policy_id: Optional[str] = None 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..2f853eceb 100644 --- a/src/runloop_api_client/types/shared_params/launch_parameters.py +++ b/src/runloop_api_client/types/shared_params/launch_parameters.py @@ -8,7 +8,28 @@ from ..._types import SequenceNotStr from .after_idle import AfterIdle -__all__ = ["LaunchParameters", "Lifecycle", "LifecycleResumeTriggers", "UserParameters"] +__all__ = ["LaunchParameters", "Lifecycle", "LifecycleLifecycleHooks", "LifecycleResumeTriggers", "UserParameters"] + + +class LifecycleLifecycleHooks(TypedDict, total=False): + """Optional lifecycle hooks. + + suspend_commands run through the suspend path before the Devbox suspends; see launch_commands for work on every startup. + """ + + 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. + """ class LifecycleResumeTriggers(TypedDict, total=False): @@ -24,7 +45,7 @@ class LifecycleResumeTriggers(TypedDict, total=False): 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. + Configure idle policy via lifecycle.after_idle (if both this and the top-level after_idle are set, they must match), resume triggers via lifecycle.resume_triggers, and optional lifecycle hooks via lifecycle.lifecycle_hooks. """ after_idle: Optional[AfterIdle] @@ -34,6 +55,13 @@ class Lifecycle(TypedDict, total=False): value. Prefer this field for new integrations. """ + lifecycle_hooks: Optional[LifecycleLifecycleHooks] + """Optional lifecycle hooks. + + suspend_commands run through the suspend path before the Devbox suspends; see + launch_commands for work on every startup. + """ + resume_triggers: Optional[LifecycleResumeTriggers] """Triggers that can resume a suspended Devbox.""" @@ -95,8 +123,9 @@ class LaunchParameters(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 are set, they must match), resume triggers via + lifecycle.resume_triggers, and optional lifecycle hooks via + lifecycle.lifecycle_hooks. """ network_policy_id: Optional[str] 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 5d86ef5240920ba4b6de9e59456aea3c0971e3ef Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 May 2026 22:16:50 +0000 Subject: [PATCH 03/10] chore: Update stainless.yml, bump AGENTS.md to keep this updated (#9268) --- .stats.yml | 4 +- api.md | 3 + src/runloop_api_client/types/__init__.py | 3 + .../types/shared/__init__.py | 3 + .../types/shared/launch_parameters.py | 60 +------------------ .../types/shared/lifecycle_configuration.py | 34 +++++++++++ .../types/shared/lifecycle_hooks.py | 28 +++++++++ .../types/shared/resume_triggers.py | 17 ++++++ .../types/shared_params/__init__.py | 3 + .../types/shared_params/launch_parameters.py | 60 +------------------ .../shared_params/lifecycle_configuration.py | 36 +++++++++++ .../types/shared_params/lifecycle_hooks.py | 31 ++++++++++ .../types/shared_params/resume_triggers.py | 18 ++++++ 13 files changed, 184 insertions(+), 116 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/.stats.yml b/.stats.yml index 57d7d43d1..add3b32d7 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-d4505c10f86f4ad122bfbc2a82a519278d626ac399c9ef3780496d5d7d1b99b9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-70af693bc68f1ed5f2678a59d9ad3bb8a9e9bf8356fac4c3080cbd1a117819f8.yml openapi_spec_hash: b29dfd448505a0a3a6686202f606b8f7 -config_hash: 06faf3176c48bf2b258730ce50809f0f +config_hash: 444e00951b440bf92e7548b2807584a4 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/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/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/launch_parameters.py b/src/runloop_api_client/types/shared/launch_parameters.py index 3479a5421..0f9b1a896 100644 --- a/src/runloop_api_client/types/shared/launch_parameters.py +++ b/src/runloop_api_client/types/shared/launch_parameters.py @@ -5,63 +5,9 @@ from ..._models import BaseModel from .after_idle import AfterIdle +from .lifecycle_configuration import LifecycleConfiguration -__all__ = ["LaunchParameters", "Lifecycle", "LifecycleLifecycleHooks", "LifecycleResumeTriggers", "UserParameters"] - - -class LifecycleLifecycleHooks(BaseModel): - """Optional lifecycle hooks. - - suspend_commands run through the suspend path before the Devbox suspends; see launch_commands for work on every startup. - """ - - 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. - """ - - -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), resume triggers via lifecycle.resume_triggers, and optional lifecycle hooks via lifecycle.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[LifecycleLifecycleHooks] = None - """Optional lifecycle hooks. - - suspend_commands run through the suspend path before the Devbox suspends; see - launch_commands for work on every startup. - """ - - resume_triggers: Optional[LifecycleResumeTriggers] = None - """Triggers that can resume a suspended Devbox.""" +__all__ = ["LaunchParameters", "UserParameters"] class UserParameters(BaseModel): @@ -117,7 +63,7 @@ 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: Optional[LifecycleConfiguration] = None """Lifecycle configuration for idle and resume behavior. Configure idle policy via lifecycle.after_idle (if both this and the top-level 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..4cbbb302f --- /dev/null +++ b/src/runloop_api_client/types/shared/lifecycle_configuration.py @@ -0,0 +1,34 @@ +# 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 + """Optional lifecycle hooks. + + suspend_commands run through the suspend path before the Devbox suspends; see + launch_commands for work on every startup. + """ + + 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..4a2a049c1 --- /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 through the rage/vmagent suspend path 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 by shutting down vmagent and killing the VM. Resume hooks and resume deadline settings are persistence/internal only and hidden from the public API reference. 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_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/launch_parameters.py b/src/runloop_api_client/types/shared_params/launch_parameters.py index 2f853eceb..2a371c83b 100644 --- a/src/runloop_api_client/types/shared_params/launch_parameters.py +++ b/src/runloop_api_client/types/shared_params/launch_parameters.py @@ -7,63 +7,9 @@ from ..._types import SequenceNotStr from .after_idle import AfterIdle +from .lifecycle_configuration import LifecycleConfiguration -__all__ = ["LaunchParameters", "Lifecycle", "LifecycleLifecycleHooks", "LifecycleResumeTriggers", "UserParameters"] - - -class LifecycleLifecycleHooks(TypedDict, total=False): - """Optional lifecycle hooks. - - suspend_commands run through the suspend path before the Devbox suspends; see launch_commands for work on every startup. - """ - - 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. - """ - - -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), resume triggers via lifecycle.resume_triggers, and optional lifecycle hooks via lifecycle.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[LifecycleLifecycleHooks] - """Optional lifecycle hooks. - - suspend_commands run through the suspend path before the Devbox suspends; see - launch_commands for work on every startup. - """ - - resume_triggers: Optional[LifecycleResumeTriggers] - """Triggers that can resume a suspended Devbox.""" +__all__ = ["LaunchParameters", "UserParameters"] class UserParameters(TypedDict, total=False): @@ -119,7 +65,7 @@ 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: Optional[LifecycleConfiguration] """Lifecycle configuration for idle and resume behavior. Configure idle policy via lifecycle.after_idle (if both this and the top-level 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..0b53cfbcc --- /dev/null +++ b/src/runloop_api_client/types/shared_params/lifecycle_configuration.py @@ -0,0 +1,36 @@ +# 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] + """Optional lifecycle hooks. + + suspend_commands run through the suspend path before the Devbox suspends; see + launch_commands for work on every startup. + """ + + 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..28b172e6f --- /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 through the rage/vmagent suspend path 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 by shutting down vmagent and killing the VM. Resume hooks and resume deadline settings are persistence/internal only and hidden from the public API reference. 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.""" From 214629e9281c38ff75b5769e13b4b977a346bb04 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 May 2026 04:23:52 +0000 Subject: [PATCH 04/10] fix(mux): strip internal stub note from PTY OpenAPI descriptions (#9315) --- .stats.yml | 4 +- src/runloop_api_client/resources/pty.py | 64 ++++++++++--------------- 2 files changed, 26 insertions(+), 42 deletions(-) diff --git a/.stats.yml b/.stats.yml index add3b32d7..a96cfe31f 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-70af693bc68f1ed5f2678a59d9ad3bb8a9e9bf8356fac4c3080cbd1a117819f8.yml -openapi_spec_hash: b29dfd448505a0a3a6686202f606b8f7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-a248dcb8ee40eb7c0446077413996aa6a67b543a1f2a47272378641fa8791e7f.yml +openapi_spec_hash: 0636ec3e6ef760052c346ecaa8a4107d config_hash: 444e00951b440bf92e7548b2807584a4 diff --git a/src/runloop_api_client/resources/pty.py b/src/runloop_api_client/resources/pty.py index dc1a837b5..09158e0cc 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 @@ -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 @@ -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 From 5922abfd135589b229cb64ea23750d34fede857f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 13:58:42 +0000 Subject: [PATCH 05/10] feat: add reflex initiator type, hidden param (#9350) --- .stats.yml | 4 ++-- src/runloop_api_client/types/devbox_view.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index a96cfe31f..fe2d09b74 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-a248dcb8ee40eb7c0446077413996aa6a67b543a1f2a47272378641fa8791e7f.yml -openapi_spec_hash: 0636ec3e6ef760052c346ecaa8a4107d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-2c6498f804f6a88977521c2b4b8700d8992235a01ffc965193d87acf8021683b.yml +openapi_spec_hash: cf32b83c81c8aa76f03dda8123b228b5 config_hash: 444e00951b440bf92e7548b2807584a4 diff --git a/src/runloop_api_client/types/devbox_view.py b/src/runloop_api_client/types/devbox_view.py index 068f180ad..83ffa8bec 100644 --- a/src/runloop_api_client/types/devbox_view.py +++ b/src/runloop_api_client/types/devbox_view.py @@ -100,7 +100,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 From 6601bd61991877a37f57a3fe61a4fcc28e4af24a Mon Sep 17 00:00:00 2001 From: tode-rl Date: Wed, 20 May 2026 09:56:22 -0700 Subject: [PATCH 06/10] Bridge integrated merge-conflict branch into next (#119) * ci: use Runloop GitHub action wrappers Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> --- .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 4e110b6be..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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - 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@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 + 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - 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 189e8027e..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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - 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 0e5a99b97..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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: runloopai/checkout@main - name: Check release environment run: | From cc449659b7b2740325f0689d9784e94060c905d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 02:00:44 +0000 Subject: [PATCH 07/10] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index fe2d09b74..ad47c5adc 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-2c6498f804f6a88977521c2b4b8700d8992235a01ffc965193d87acf8021683b.yml -openapi_spec_hash: cf32b83c81c8aa76f03dda8123b228b5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-50d17fb0253accc4643a285686d99f3d7eb5eb715c6814a9c9625c15575a91de.yml +openapi_spec_hash: 84a07dce1d08bb779058b3f282a78e8b config_hash: 444e00951b440bf92e7548b2807584a4 From 71ce0bf9ac98599b41a9cc6d16a3333c8b70e977 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 19:01:13 +0000 Subject: [PATCH 08/10] feat(mux): initial changes to enable http/2 (#8936) --- .stats.yml | 4 +-- src/runloop_api_client/resources/agents.py | 4 +-- .../resources/blueprints.py | 24 +++++++++---- .../resources/devboxes/devboxes.py | 18 +++++----- .../resources/gateway_configs.py | 6 ++-- .../resources/scenarios/scenarios.py | 12 ++++--- .../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 | 30 ++++++++++++---- .../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/agent_source.py | 16 ++++----- .../types/shared/launch_parameters.py | 35 ++++++++----------- .../types/shared/lifecycle_configuration.py | 15 +++++--- .../types/shared/run_profile.py | 6 +++- .../types/shared_params/agent_source.py | 16 ++++----- .../types/shared_params/launch_parameters.py | 35 ++++++++----------- .../shared_params/lifecycle_configuration.py | 15 +++++--- .../types/shared_params/run_profile.py | 6 +++- 32 files changed, 234 insertions(+), 160 deletions(-) diff --git a/.stats.yml b/.stats.yml index ad47c5adc..0fffe599e 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-50d17fb0253accc4643a285686d99f3d7eb5eb715c6814a9c9625c15575a91de.yml -openapi_spec_hash: 84a07dce1d08bb779058b3f282a78e8b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai/runloop-3ed5d8482ad69c2c52b9387f0c16e9a5053115b6e4c64ff59a32a0ab3498d7e2.yml +openapi_spec_hash: b48f3fb201ee657d669d937ca92c55bf config_hash: 444e00951b440bf92e7548b2807584a4 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/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/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 83ffa8bec..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. @@ -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/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 0f9b1a896..6dc7c5544 100644 --- a/src/runloop_api_client/types/shared/launch_parameters.py +++ b/src/runloop_api_client/types/shared/launch_parameters.py @@ -11,10 +11,7 @@ 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.""" @@ -64,12 +61,10 @@ class LaunchParameters(BaseModel): """Set of commands to be run at launch time, before the entrypoint process is run.""" lifecycle: Optional[LifecycleConfiguration] = None - """Lifecycle configuration for idle and resume behavior. + """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), resume triggers via - lifecycle.resume_triggers, and optional lifecycle hooks via - lifecycle.lifecycle_hooks. + Configure idle policy via after_idle, resume triggers via resume_triggers, and + optional lifecycle hooks via lifecycle_hooks. """ network_policy_id: Optional[str] = None @@ -88,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 index 4cbbb302f..ecbdcedfe 100644 --- a/src/runloop_api_client/types/shared/lifecycle_configuration.py +++ b/src/runloop_api_client/types/shared/lifecycle_configuration.py @@ -24,10 +24,17 @@ class LifecycleConfiguration(BaseModel): """ lifecycle_hooks: Optional[LifecycleHooks] = None - """Optional lifecycle hooks. - - suspend_commands run through the suspend path before the Devbox suspends; see - launch_commands for work on every startup. + """Lifecycle hooks for Devbox suspend. + + suspend_commands run sequentially as the configured Devbox user through the + rage/vmagent suspend path 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 by shutting down vmagent and killing the VM. + Resume hooks and resume deadline settings are persistence/internal only and + hidden from the public API reference. launch_commands still run on every + startup, including after resume. """ resume_triggers: Optional[ResumeTriggers] = None 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/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 2a371c83b..0f53354c5 100644 --- a/src/runloop_api_client/types/shared_params/launch_parameters.py +++ b/src/runloop_api_client/types/shared_params/launch_parameters.py @@ -13,10 +13,7 @@ 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.""" @@ -66,12 +63,10 @@ class LaunchParameters(TypedDict, total=False): """Set of commands to be run at launch time, before the entrypoint process is run.""" lifecycle: Optional[LifecycleConfiguration] - """Lifecycle configuration for idle and resume behavior. + """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), resume triggers via - lifecycle.resume_triggers, and optional lifecycle hooks via - lifecycle.lifecycle_hooks. + Configure idle policy via after_idle, resume triggers via resume_triggers, and + optional lifecycle hooks via lifecycle_hooks. """ network_policy_id: Optional[str] @@ -90,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 index 0b53cfbcc..9d79a1d07 100644 --- a/src/runloop_api_client/types/shared_params/lifecycle_configuration.py +++ b/src/runloop_api_client/types/shared_params/lifecycle_configuration.py @@ -26,10 +26,17 @@ class LifecycleConfiguration(TypedDict, total=False): """ lifecycle_hooks: Optional[LifecycleHooks] - """Optional lifecycle hooks. - - suspend_commands run through the suspend path before the Devbox suspends; see - launch_commands for work on every startup. + """Lifecycle hooks for Devbox suspend. + + suspend_commands run sequentially as the configured Devbox user through the + rage/vmagent suspend path 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 by shutting down vmagent and killing the VM. + Resume hooks and resume deadline settings are persistence/internal only and + hidden from the public API reference. launch_commands still run on every + startup, including after resume. """ resume_triggers: Optional[ResumeTriggers] 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.""" From f986282230c815acae4cf9d81685b182ca78ebfa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 20:57:09 +0000 Subject: [PATCH 09/10] fix: clean up PTY and lifecycle hook OpenAPI descriptions (#9502) --- .stats.yml | 4 ++-- src/runloop_api_client/resources/pty.py | 8 ++++---- .../types/shared/lifecycle_configuration.py | 15 ++++++--------- .../types/shared/lifecycle_hooks.py | 2 +- .../shared_params/lifecycle_configuration.py | 15 ++++++--------- .../types/shared_params/lifecycle_hooks.py | 2 +- 6 files changed, 20 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0fffe599e..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-3ed5d8482ad69c2c52b9387f0c16e9a5053115b6e4c64ff59a32a0ab3498d7e2.yml -openapi_spec_hash: b48f3fb201ee657d669d937ca92c55bf +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/src/runloop_api_client/resources/pty.py b/src/runloop_api_client/resources/pty.py index 09158e0cc..9a102025c 100644 --- a/src/runloop_api_client/resources/pty.py +++ b/src/runloop_api_client/resources/pty.py @@ -137,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 @@ -302,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 diff --git a/src/runloop_api_client/types/shared/lifecycle_configuration.py b/src/runloop_api_client/types/shared/lifecycle_configuration.py index ecbdcedfe..c83fe42e5 100644 --- a/src/runloop_api_client/types/shared/lifecycle_configuration.py +++ b/src/runloop_api_client/types/shared/lifecycle_configuration.py @@ -26,15 +26,12 @@ class LifecycleConfiguration(BaseModel): lifecycle_hooks: Optional[LifecycleHooks] = None """Lifecycle hooks for Devbox suspend. - suspend_commands run sequentially as the configured Devbox user through the - rage/vmagent suspend path 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 by shutting down vmagent and killing the VM. - Resume hooks and resume deadline settings are persistence/internal only and - hidden from the public API reference. launch_commands still run on every - startup, including after resume. + 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 diff --git a/src/runloop_api_client/types/shared/lifecycle_hooks.py b/src/runloop_api_client/types/shared/lifecycle_hooks.py index 4a2a049c1..a47d3b6e8 100644 --- a/src/runloop_api_client/types/shared/lifecycle_hooks.py +++ b/src/runloop_api_client/types/shared/lifecycle_hooks.py @@ -10,7 +10,7 @@ class LifecycleHooks(BaseModel): """Lifecycle hooks for Devbox suspend. - suspend_commands run sequentially as the configured Devbox user through the rage/vmagent suspend path 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 by shutting down vmagent and killing the VM. Resume hooks and resume deadline settings are persistence/internal only and hidden from the public API reference. launch_commands still run on every startup, including after resume. + 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 diff --git a/src/runloop_api_client/types/shared_params/lifecycle_configuration.py b/src/runloop_api_client/types/shared_params/lifecycle_configuration.py index 9d79a1d07..0cc69a873 100644 --- a/src/runloop_api_client/types/shared_params/lifecycle_configuration.py +++ b/src/runloop_api_client/types/shared_params/lifecycle_configuration.py @@ -28,15 +28,12 @@ class LifecycleConfiguration(TypedDict, total=False): lifecycle_hooks: Optional[LifecycleHooks] """Lifecycle hooks for Devbox suspend. - suspend_commands run sequentially as the configured Devbox user through the - rage/vmagent suspend path 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 by shutting down vmagent and killing the VM. - Resume hooks and resume deadline settings are persistence/internal only and - hidden from the public API reference. launch_commands still run on every - startup, including after resume. + 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] diff --git a/src/runloop_api_client/types/shared_params/lifecycle_hooks.py b/src/runloop_api_client/types/shared_params/lifecycle_hooks.py index 28b172e6f..f7945b6fd 100644 --- a/src/runloop_api_client/types/shared_params/lifecycle_hooks.py +++ b/src/runloop_api_client/types/shared_params/lifecycle_hooks.py @@ -13,7 +13,7 @@ class LifecycleHooks(TypedDict, total=False): """Lifecycle hooks for Devbox suspend. - suspend_commands run sequentially as the configured Devbox user through the rage/vmagent suspend path 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 by shutting down vmagent and killing the VM. Resume hooks and resume deadline settings are persistence/internal only and hidden from the public API reference. launch_commands still run on every startup, including after resume. + 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]] From 198e250e5de6d678079800d37b229c4474f6ad9a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 20:57:40 +0000 Subject: [PATCH 10/10] release: 1.22.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 22 ++++++++++++++++++++++ pyproject.toml | 2 +- src/runloop_api_client/_version.py | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) 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/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/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