diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fdce87245..3cb6257ce 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.62.0" + ".": "0.63.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 32058a67e..bd6f2f508 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 92 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-f1d928f705d6771a22fe701dfb8c0c66aabbd0dd6d17e3fa09b8eb3a48259a84.yml -openapi_spec_hash: 12dc18a4da3f084fee3d2c5f428e1df3 -config_hash: f9f7bc60c36f103c77333d9149cd3e46 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-6b65a42b74406a77acb03ddb582288396d7af64df16eebf887c77246d3a54470.yml +openapi_spec_hash: aeb9f595d53412926ef507174f33a1a1 +config_hash: f008c82c6ae5099c9a4b8e1fce1e15f1 diff --git a/CHANGELOG.md b/CHANGELOG.md index cc1f0550e..7ba984a0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.63.0 (2025-10-02) + +Full Changelog: [v0.62.0...v0.63.0](https://github.com/runloopai/api-client-python/compare/v0.62.0...v0.63.0) + +### Features + +* **api:** api update ([dbf7a2e](https://github.com/runloopai/api-client-python/commit/dbf7a2ea929d3832faec4241f8b8831c97c1755a)) +* **api:** api update ([fff1e21](https://github.com/runloopai/api-client-python/commit/fff1e210bf02f2a8be0cb7fc6d2fe0b04e28bf03)) + ## 0.62.0 (2025-10-01) Full Changelog: [v0.61.0...v0.62.0](https://github.com/runloopai/api-client-python/compare/v0.61.0...v0.62.0) diff --git a/api.md b/api.md index ac46b0558..d0fe270b3 100644 --- a/api.md +++ b/api.md @@ -1,7 +1,15 @@ # Shared Types ```python -from runloop_api_client.types import AfterIdle, CodeMountParameters, LaunchParameters, RunProfile +from runloop_api_client.types import ( + AfterIdle, + AgentMountParameters, + CodeMountParameters, + LaunchParameters, + Mount, + ObjectMountParameters, + RunProfile, +) ``` # Benchmarks diff --git a/pyproject.toml b/pyproject.toml index a1dea4bcb..0aafc3020 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "runloop_api_client" -version = "0.62.0" +version = "0.63.0" description = "The official Python library for the runloop API" dynamic = ["readme"] license = "MIT" @@ -9,7 +9,7 @@ authors = [ ] dependencies = [ "httpx>=0.23.0, <1", - "pydantic>=1.9.0, <2.11", + "pydantic>=1.9.0, <3", "typing-extensions>=4.10, <5", "anyio>=3.5.0, <5", "distro>=1.7.0, <2", diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py index 628c89ebc..5c8f372d6 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__ = "0.62.0" # x-release-please-version +__version__ = "0.63.0" # x-release-please-version diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py index 78d15b510..407d0e22b 100644 --- a/src/runloop_api_client/resources/devboxes/devboxes.py +++ b/src/runloop_api_client/resources/devboxes/devboxes.py @@ -100,6 +100,7 @@ from ...lib.polling_async import async_poll_until from ...types.devbox_view import DevboxView from ...types.devbox_tunnel_view import DevboxTunnelView +from ...types.shared_params.mount import Mount from ...types.devbox_snapshot_view import DevboxSnapshotView from ...types.shared.launch_parameters import LaunchParameters as SharedLaunchParameters from ...types.devbox_execution_detail_view import DevboxExecutionDetailView @@ -185,6 +186,7 @@ def create( file_mounts: Optional[Dict[str, str]] | Omit = omit, launch_parameters: Optional[LaunchParameters] | Omit = omit, metadata: Optional[Dict[str, str]] | Omit = omit, + mounts: Optional[Iterable[Mount]] | Omit = omit, name: Optional[str] | Omit = omit, repo_connection_id: Optional[str] | Omit = omit, secrets: Optional[Dict[str, str]] | Omit = omit, @@ -228,6 +230,8 @@ def create( metadata: User defined metadata to attach to the devbox for organization. + mounts: A list of file system mounts to be included in the Devbox. + name: (Optional) A user specified name to give the Devbox. repo_connection_id: Repository connection id the devbox should source its base image from. @@ -262,6 +266,7 @@ def create( "file_mounts": file_mounts, "launch_parameters": launch_parameters, "metadata": metadata, + "mounts": mounts, "name": name, "repo_connection_id": repo_connection_id, "secrets": secrets, @@ -740,7 +745,7 @@ def execute( specified the command is run from the directory based on the recent state of the persistent shell. - command_id: The command ID for idempotency and tracking + command_id: The command ID in UUIDv7 string format for idempotency and tracking optimistic_timeout: Timeout in seconds to wait for command completion. Operation is not killed. Max is 600 seconds. @@ -1633,6 +1638,7 @@ async def create( file_mounts: Optional[Dict[str, str]] | Omit = omit, launch_parameters: Optional[LaunchParameters] | Omit = omit, metadata: Optional[Dict[str, str]] | Omit = omit, + mounts: Optional[Iterable[Mount]] | Omit = omit, name: Optional[str] | Omit = omit, repo_connection_id: Optional[str] | Omit = omit, secrets: Optional[Dict[str, str]] | Omit = omit, @@ -1676,6 +1682,8 @@ async def create( metadata: User defined metadata to attach to the devbox for organization. + mounts: A list of file system mounts to be included in the Devbox. + name: (Optional) A user specified name to give the Devbox. repo_connection_id: Repository connection id the devbox should source its base image from. @@ -1710,6 +1718,7 @@ async def create( "file_mounts": file_mounts, "launch_parameters": launch_parameters, "metadata": metadata, + "mounts": mounts, "name": name, "repo_connection_id": repo_connection_id, "secrets": secrets, @@ -2187,7 +2196,7 @@ async def execute( specified the command is run from the directory based on the recent state of the persistent shell. - command_id: The command ID for idempotency and tracking + command_id: The command ID in UUIDv7 string format for idempotency and tracking optimistic_timeout: Timeout in seconds to wait for command completion. Operation is not killed. Max is 600 seconds. diff --git a/src/runloop_api_client/resources/repositories.py b/src/runloop_api_client/resources/repositories.py index d11c7e800..49e3fb9a2 100644 --- a/src/runloop_api_client/resources/repositories.py +++ b/src/runloop_api_client/resources/repositories.py @@ -244,7 +244,6 @@ def inspect( self, id: str, *, - blueprint_id: Optional[str] | Omit = omit, github_auth_token: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -259,8 +258,6 @@ def inspect( repo's technical stack and developer environment requirements. Args: - blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint. - github_auth_token: GitHub authentication token for accessing private repositories. extra_headers: Send extra headers @@ -278,11 +275,7 @@ def inspect( return self._post( f"/v1/repositories/{id}/inspect", body=maybe_transform( - { - "blueprint_id": blueprint_id, - "github_auth_token": github_auth_token, - }, - repository_inspect_params.RepositoryInspectParams, + {"github_auth_token": github_auth_token}, repository_inspect_params.RepositoryInspectParams ), options=make_request_options( extra_headers=extra_headers, @@ -596,7 +589,6 @@ async def inspect( self, id: str, *, - blueprint_id: Optional[str] | Omit = omit, github_auth_token: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -611,8 +603,6 @@ async def inspect( repo's technical stack and developer environment requirements. Args: - blueprint_id: ID of blueprint to use as base for resulting RepositoryVersion blueprint. - github_auth_token: GitHub authentication token for accessing private repositories. extra_headers: Send extra headers @@ -630,11 +620,7 @@ async def inspect( return await self._post( f"/v1/repositories/{id}/inspect", body=await async_maybe_transform( - { - "blueprint_id": blueprint_id, - "github_auth_token": github_auth_token, - }, - repository_inspect_params.RepositoryInspectParams, + {"github_auth_token": github_auth_token}, repository_inspect_params.RepositoryInspectParams ), options=make_request_options( extra_headers=extra_headers, diff --git a/src/runloop_api_client/types/__init__.py b/src/runloop_api_client/types/__init__.py index efffa52f1..0fbcf8275 100644 --- a/src/runloop_api_client/types/__init__.py +++ b/src/runloop_api_client/types/__init__.py @@ -3,10 +3,13 @@ from __future__ import annotations from .shared import ( + Mount as Mount, AfterIdle as AfterIdle, RunProfile as RunProfile, LaunchParameters as LaunchParameters, CodeMountParameters as CodeMountParameters, + AgentMountParameters as AgentMountParameters, + ObjectMountParameters as ObjectMountParameters, ) from .devbox_view import DevboxView as DevboxView from .object_view import ObjectView as ObjectView diff --git a/src/runloop_api_client/types/devbox_create_params.py b/src/runloop_api_client/types/devbox_create_params.py index 6efea2b79..c93dcca81 100644 --- a/src/runloop_api_client/types/devbox_create_params.py +++ b/src/runloop_api_client/types/devbox_create_params.py @@ -5,6 +5,7 @@ from typing import Dict, Iterable, Optional from typing_extensions import TypedDict +from .shared_params.mount import Mount from .shared_params.launch_parameters import LaunchParameters from .shared_params.code_mount_parameters import CodeMountParameters @@ -49,6 +50,9 @@ class DevboxCreateParams(TypedDict, total=False): metadata: Optional[Dict[str, str]] """User defined metadata to attach to the devbox for organization.""" + mounts: Optional[Iterable[Mount]] + """A list of file system mounts to be included in the Devbox.""" + name: Optional[str] """(Optional) A user specified name to give the Devbox.""" diff --git a/src/runloop_api_client/types/devbox_execute_params.py b/src/runloop_api_client/types/devbox_execute_params.py index 8ddea07c2..30defa616 100644 --- a/src/runloop_api_client/types/devbox_execute_params.py +++ b/src/runloop_api_client/types/devbox_execute_params.py @@ -18,7 +18,7 @@ class DevboxExecuteParams(TypedDict, total=False): """ command_id: Required[str] - """The command ID for idempotency and tracking""" + """The command ID in UUIDv7 string format for idempotency and tracking""" optimistic_timeout: Optional[int] """Timeout in seconds to wait for command completion. diff --git a/src/runloop_api_client/types/repository_inspect_params.py b/src/runloop_api_client/types/repository_inspect_params.py index c68b4b830..c42103dab 100644 --- a/src/runloop_api_client/types/repository_inspect_params.py +++ b/src/runloop_api_client/types/repository_inspect_params.py @@ -9,8 +9,5 @@ class RepositoryInspectParams(TypedDict, total=False): - blueprint_id: Optional[str] - """ID of blueprint to use as base for resulting RepositoryVersion blueprint.""" - github_auth_token: Optional[str] """GitHub authentication token for accessing private repositories.""" diff --git a/src/runloop_api_client/types/shared/__init__.py b/src/runloop_api_client/types/shared/__init__.py index 356cc4022..39a3b079e 100644 --- a/src/runloop_api_client/types/shared/__init__.py +++ b/src/runloop_api_client/types/shared/__init__.py @@ -1,6 +1,9 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from .mount import Mount as Mount from .after_idle import AfterIdle as AfterIdle from .run_profile import RunProfile as RunProfile from .launch_parameters import LaunchParameters as LaunchParameters from .code_mount_parameters import CodeMountParameters as CodeMountParameters +from .agent_mount_parameters import AgentMountParameters as AgentMountParameters +from .object_mount_parameters import ObjectMountParameters as ObjectMountParameters diff --git a/src/runloop_api_client/types/shared/agent_mount_parameters.py b/src/runloop_api_client/types/shared/agent_mount_parameters.py new file mode 100644 index 000000000..5e92a0641 --- /dev/null +++ b/src/runloop_api_client/types/shared/agent_mount_parameters.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["AgentMountParameters"] + + +class AgentMountParameters(BaseModel): + agent_id: str + """The ID of the agent to mount.""" + + type: Literal["agent_mount"] + + agent_path: Optional[str] = None + """Optional path to mount the agent on the Devbox. + + Required for git and object agents. Use absolute path (e.g., /home/user/agent) + """ diff --git a/src/runloop_api_client/types/shared/mount.py b/src/runloop_api_client/types/shared/mount.py new file mode 100644 index 000000000..7fb68f24a --- /dev/null +++ b/src/runloop_api_client/types/shared/mount.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Union +from typing_extensions import Annotated, TypeAlias + +from ..._utils import PropertyInfo +from .agent_mount_parameters import AgentMountParameters +from .object_mount_parameters import ObjectMountParameters + +__all__ = ["Mount"] + +Mount: TypeAlias = Annotated[Union[ObjectMountParameters, AgentMountParameters], PropertyInfo(discriminator="type")] diff --git a/src/runloop_api_client/types/shared/object_mount_parameters.py b/src/runloop_api_client/types/shared/object_mount_parameters.py new file mode 100644 index 000000000..3413d0e1d --- /dev/null +++ b/src/runloop_api_client/types/shared/object_mount_parameters.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["ObjectMountParameters"] + + +class ObjectMountParameters(BaseModel): + object_id: str + """The ID of the object to write.""" + + object_path: str + """The path to write the object on the Devbox. + + Use absolute path of object (ie /home/user/object.txt, or directory if archive + /home/user/archive_dir) + """ + + type: Literal["object_mount"] diff --git a/src/runloop_api_client/types/shared_params/__init__.py b/src/runloop_api_client/types/shared_params/__init__.py index 356cc4022..39a3b079e 100644 --- a/src/runloop_api_client/types/shared_params/__init__.py +++ b/src/runloop_api_client/types/shared_params/__init__.py @@ -1,6 +1,9 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from .mount import Mount as Mount from .after_idle import AfterIdle as AfterIdle from .run_profile import RunProfile as RunProfile from .launch_parameters import LaunchParameters as LaunchParameters from .code_mount_parameters import CodeMountParameters as CodeMountParameters +from .agent_mount_parameters import AgentMountParameters as AgentMountParameters +from .object_mount_parameters import ObjectMountParameters as ObjectMountParameters diff --git a/src/runloop_api_client/types/shared_params/agent_mount_parameters.py b/src/runloop_api_client/types/shared_params/agent_mount_parameters.py new file mode 100644 index 000000000..eca7e8cf1 --- /dev/null +++ b/src/runloop_api_client/types/shared_params/agent_mount_parameters.py @@ -0,0 +1,21 @@ +# 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 Literal, Required, TypedDict + +__all__ = ["AgentMountParameters"] + + +class AgentMountParameters(TypedDict, total=False): + agent_id: Required[str] + """The ID of the agent to mount.""" + + type: Required[Literal["agent_mount"]] + + agent_path: Optional[str] + """Optional path to mount the agent on the Devbox. + + Required for git and object agents. Use absolute path (e.g., /home/user/agent) + """ diff --git a/src/runloop_api_client/types/shared_params/mount.py b/src/runloop_api_client/types/shared_params/mount.py new file mode 100644 index 000000000..fb7e05ba7 --- /dev/null +++ b/src/runloop_api_client/types/shared_params/mount.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from typing_extensions import TypeAlias + +from .agent_mount_parameters import AgentMountParameters +from .object_mount_parameters import ObjectMountParameters + +__all__ = ["Mount"] + +Mount: TypeAlias = Union[ObjectMountParameters, AgentMountParameters] diff --git a/src/runloop_api_client/types/shared_params/object_mount_parameters.py b/src/runloop_api_client/types/shared_params/object_mount_parameters.py new file mode 100644 index 000000000..8b22ebf74 --- /dev/null +++ b/src/runloop_api_client/types/shared_params/object_mount_parameters.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ObjectMountParameters"] + + +class ObjectMountParameters(TypedDict, total=False): + object_id: Required[str] + """The ID of the object to write.""" + + object_path: Required[str] + """The path to write the object on the Devbox. + + Use absolute path of object (ie /home/user/object.txt, or directory if archive + /home/user/archive_dir) + """ + + type: Required[Literal["object_mount"]] diff --git a/tests/api_resources/test_devboxes.py b/tests/api_resources/test_devboxes.py index 9d9de9f77..22643a1ee 100644 --- a/tests/api_resources/test_devboxes.py +++ b/tests/api_resources/test_devboxes.py @@ -85,6 +85,13 @@ def test_method_create_with_all_params(self, client: Runloop) -> None: }, }, metadata={"foo": "string"}, + mounts=[ + { + "object_id": "object_id", + "object_path": "object_path", + "type": "object_mount", + } + ], name="name", repo_connection_id="repo_connection_id", secrets={"foo": "string"}, @@ -1432,6 +1439,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncRunloop) - }, }, metadata={"foo": "string"}, + mounts=[ + { + "object_id": "object_id", + "object_path": "object_path", + "type": "object_mount", + } + ], name="name", repo_connection_id="repo_connection_id", secrets={"foo": "string"}, diff --git a/tests/api_resources/test_repositories.py b/tests/api_resources/test_repositories.py index 8e31ed986..c07d16b35 100644 --- a/tests/api_resources/test_repositories.py +++ b/tests/api_resources/test_repositories.py @@ -188,7 +188,6 @@ def test_method_inspect(self, client: Runloop) -> None: def test_method_inspect_with_all_params(self, client: Runloop) -> None: repository = client.repositories.inspect( id="id", - blueprint_id="blueprint_id", github_auth_token="github_auth_token", ) assert_matches_type(RepositoryInspectionDetails, repository, path=["response"]) @@ -481,7 +480,6 @@ async def test_method_inspect(self, async_client: AsyncRunloop) -> None: async def test_method_inspect_with_all_params(self, async_client: AsyncRunloop) -> None: repository = await async_client.repositories.inspect( id="id", - blueprint_id="blueprint_id", github_auth_token="github_auth_token", ) assert_matches_type(RepositoryInspectionDetails, repository, path=["response"]) diff --git a/uv.lock b/uv.lock index b4280554f..0ce01ebe9 100644 --- a/uv.lock +++ b/uv.lock @@ -1088,7 +1088,7 @@ requires-dist = [ { name = "distro", specifier = ">=1.7.0,<2" }, { name = "httpx", specifier = ">=0.23.0,<1" }, { name = "httpx-aiohttp", marker = "extra == 'aiohttp'", specifier = ">=0.1.8" }, - { name = "pydantic", specifier = ">=1.9.0,<2.11" }, + { name = "pydantic", specifier = ">=1.9.0,<3" }, { name = "sniffio" }, { name = "typing-extensions", specifier = ">=4.10,<5" }, { name = "uuid-utils", specifier = ">=0.11.0" },