From 0ef9c8f483269d203a3edc7b5805f48f4263eb2f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 00:54:59 +0000 Subject: [PATCH 1/6] feat(api): api update --- .stats.yml | 6 +++--- src/oz_agent_sdk/resources/agent/agent.py | 10 ---------- src/oz_agent_sdk/types/agent_run_params.py | 6 ------ tests/api_resources/test_agent.py | 2 -- 4 files changed, 3 insertions(+), 21 deletions(-) diff --git a/.stats.yml b/.stats.yml index 51b5464..11ad6be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 14 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-8f9c749573846b07a55a3131b66456f0a592838c6bfc986ab30948df66cd6f11.yml -openapi_spec_hash: 59f1ac98ad6cf13b12c59196bcecffd7 -config_hash: 60052b2c1c0862014416821aba875574 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-a29592b2ba26cba9d89b95969d66506f49c08e140b76ce4aea4189e5c1dccc06.yml +openapi_spec_hash: 27a5de1f891104d5e47904ad8e4b4bd1 +config_hash: 40327fb76b7cce7b97f23de9b8d48efb diff --git a/src/oz_agent_sdk/resources/agent/agent.py b/src/oz_agent_sdk/resources/agent/agent.py index b720375..a0240ce 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -193,7 +193,6 @@ def get_artifact( def run( self, *, - agent_identity_uid: str | Omit = omit, attachments: Iterable[agent_run_params.Attachment] | Omit = omit, config: AmbientAgentConfigParam | Omit = omit, conversation_id: str | Omit = omit, @@ -216,9 +215,6 @@ def run( runs. Behavior is identical to POST /agent/run. Args: - agent_identity_uid: Optional agent identity UID to use as the execution principal for the run. This - is only valid for runs that are team owned. - attachments: Optional file attachments to include with the prompt (max 5). Attachments are uploaded to cloud storage and made available to the agent. @@ -260,7 +256,6 @@ def run( "/agent/runs", body=maybe_transform( { - "agent_identity_uid": agent_identity_uid, "attachments": attachments, "config": config, "conversation_id": conversation_id, @@ -422,7 +417,6 @@ async def get_artifact( async def run( self, *, - agent_identity_uid: str | Omit = omit, attachments: Iterable[agent_run_params.Attachment] | Omit = omit, config: AmbientAgentConfigParam | Omit = omit, conversation_id: str | Omit = omit, @@ -445,9 +439,6 @@ async def run( runs. Behavior is identical to POST /agent/run. Args: - agent_identity_uid: Optional agent identity UID to use as the execution principal for the run. This - is only valid for runs that are team owned. - attachments: Optional file attachments to include with the prompt (max 5). Attachments are uploaded to cloud storage and made available to the agent. @@ -489,7 +480,6 @@ async def run( "/agent/runs", body=await async_maybe_transform( { - "agent_identity_uid": agent_identity_uid, "attachments": attachments, "config": config, "conversation_id": conversation_id, diff --git a/src/oz_agent_sdk/types/agent_run_params.py b/src/oz_agent_sdk/types/agent_run_params.py index 5d185a5..2a346ed 100644 --- a/src/oz_agent_sdk/types/agent_run_params.py +++ b/src/oz_agent_sdk/types/agent_run_params.py @@ -14,12 +14,6 @@ class AgentRunParams(TypedDict, total=False): - agent_identity_uid: str - """ - Optional agent identity UID to use as the execution principal for the run. This - is only valid for runs that are team owned. - """ - attachments: Iterable[Attachment] """ Optional file attachments to include with the prompt (max 5). Attachments are diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index 70c07fb..b641c09 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -112,7 +112,6 @@ def test_method_run(self, client: OzAPI) -> None: @parametrize def test_method_run_with_all_params(self, client: OzAPI) -> None: agent = client.agent.run( - agent_identity_uid="agent_identity_uid", attachments=[ { "data": "U3RhaW5sZXNzIHJvY2tz", @@ -273,7 +272,6 @@ async def test_method_run(self, async_client: AsyncOzAPI) -> None: @parametrize async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> None: agent = await async_client.agent.run( - agent_identity_uid="agent_identity_uid", attachments=[ { "data": "U3RhaW5sZXNzIHJvY2tz", From 6720ea9331a945cf2d030e20b8851a223697aab3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:53:43 +0000 Subject: [PATCH 2/6] fix: ensure file data are only sent as 1 parameter --- src/oz_agent_sdk/_utils/_utils.py | 5 +++-- tests/test_extract_files.py | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/oz_agent_sdk/_utils/_utils.py b/src/oz_agent_sdk/_utils/_utils.py index eec7f4a..63b8cd6 100644 --- a/src/oz_agent_sdk/_utils/_utils.py +++ b/src/oz_agent_sdk/_utils/_utils.py @@ -86,8 +86,9 @@ def _extract_items( index += 1 if is_dict(obj): try: - # We are at the last entry in the path so we must remove the field - if (len(path)) == index: + # Remove the field if there are no more dict keys in the path, + # only "" traversal markers or end. + if all(p == "" for p in path[index:]): item = obj.pop(key) else: item = obj[key] diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py index 95b71bd..f014004 100644 --- a/tests/test_extract_files.py +++ b/tests/test_extract_files.py @@ -35,6 +35,15 @@ def test_multiple_files() -> None: assert query == {"documents": [{}, {}]} +def test_top_level_file_array() -> None: + query = {"files": [b"file one", b"file two"], "title": "hello"} + assert extract_files(query, paths=[["files", ""]]) == [ + ("files[]", b"file one"), + ("files[]", b"file two"), + ] + assert query == {"title": "hello"} + + @pytest.mark.parametrize( "query,paths,expected", [ From 33cf04c0777d53059f8a3c73b925b468276aba2a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 20:19:07 +0000 Subject: [PATCH 3/6] feat: Add parent_run_id filter to List runs endpoint --- .stats.yml | 6 +++--- src/oz_agent_sdk/resources/agent/agent.py | 10 ++++++++++ src/oz_agent_sdk/resources/agent/runs.py | 10 ++++++++++ src/oz_agent_sdk/types/agent/run_list_params.py | 6 ++++++ src/oz_agent_sdk/types/agent_run_params.py | 6 ++++++ tests/api_resources/agent/test_runs.py | 2 ++ tests/api_resources/test_agent.py | 2 ++ 7 files changed, 39 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 11ad6be..874109f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 14 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-a29592b2ba26cba9d89b95969d66506f49c08e140b76ce4aea4189e5c1dccc06.yml -openapi_spec_hash: 27a5de1f891104d5e47904ad8e4b4bd1 -config_hash: 40327fb76b7cce7b97f23de9b8d48efb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-96b15c5805e3554bc9eba7055a9b018fc3304f9b149f2c1f27e4cf4d6a1996d7.yml +openapi_spec_hash: b99e78f4bfe7de8864c15a803bb0bb0b +config_hash: 60052b2c1c0862014416821aba875574 diff --git a/src/oz_agent_sdk/resources/agent/agent.py b/src/oz_agent_sdk/resources/agent/agent.py index a0240ce..b720375 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -193,6 +193,7 @@ def get_artifact( def run( self, *, + agent_identity_uid: str | Omit = omit, attachments: Iterable[agent_run_params.Attachment] | Omit = omit, config: AmbientAgentConfigParam | Omit = omit, conversation_id: str | Omit = omit, @@ -215,6 +216,9 @@ def run( runs. Behavior is identical to POST /agent/run. Args: + agent_identity_uid: Optional agent identity UID to use as the execution principal for the run. This + is only valid for runs that are team owned. + attachments: Optional file attachments to include with the prompt (max 5). Attachments are uploaded to cloud storage and made available to the agent. @@ -256,6 +260,7 @@ def run( "/agent/runs", body=maybe_transform( { + "agent_identity_uid": agent_identity_uid, "attachments": attachments, "config": config, "conversation_id": conversation_id, @@ -417,6 +422,7 @@ async def get_artifact( async def run( self, *, + agent_identity_uid: str | Omit = omit, attachments: Iterable[agent_run_params.Attachment] | Omit = omit, config: AmbientAgentConfigParam | Omit = omit, conversation_id: str | Omit = omit, @@ -439,6 +445,9 @@ async def run( runs. Behavior is identical to POST /agent/run. Args: + agent_identity_uid: Optional agent identity UID to use as the execution principal for the run. This + is only valid for runs that are team owned. + attachments: Optional file attachments to include with the prompt (max 5). Attachments are uploaded to cloud storage and made available to the agent. @@ -480,6 +489,7 @@ async def run( "/agent/runs", body=await async_maybe_transform( { + "agent_identity_uid": agent_identity_uid, "attachments": attachments, "config": config, "conversation_id": conversation_id, diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index e6e55b5..00c3f49 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -87,6 +87,7 @@ def retrieve( def list( self, *, + ancestor_run_id: str | Omit = omit, artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT", "FILE"] | Omit = omit, created_after: Union[str, datetime] | Omit = omit, created_before: Union[str, datetime] | Omit = omit, @@ -119,6 +120,9 @@ def list( to `sort_by=updated_at` and `sort_order=desc`. Args: + ancestor_run_id: Filter runs by ancestor run ID. The referenced run must exist and be accessible + to the caller. + artifact_type: Filter runs by artifact type created_after: Filter runs created after this timestamp (RFC3339 format) @@ -182,6 +186,7 @@ def list( timeout=timeout, query=maybe_transform( { + "ancestor_run_id": ancestor_run_id, "artifact_type": artifact_type, "created_after": created_after, "created_before": created_before, @@ -307,6 +312,7 @@ async def retrieve( def list( self, *, + ancestor_run_id: str | Omit = omit, artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT", "FILE"] | Omit = omit, created_after: Union[str, datetime] | Omit = omit, created_before: Union[str, datetime] | Omit = omit, @@ -339,6 +345,9 @@ def list( to `sort_by=updated_at` and `sort_order=desc`. Args: + ancestor_run_id: Filter runs by ancestor run ID. The referenced run must exist and be accessible + to the caller. + artifact_type: Filter runs by artifact type created_after: Filter runs created after this timestamp (RFC3339 format) @@ -402,6 +411,7 @@ def list( timeout=timeout, query=maybe_transform( { + "ancestor_run_id": ancestor_run_id, "artifact_type": artifact_type, "created_after": created_after, "created_before": created_before, diff --git a/src/oz_agent_sdk/types/agent/run_list_params.py b/src/oz_agent_sdk/types/agent/run_list_params.py index 0b4e389..b53a299 100644 --- a/src/oz_agent_sdk/types/agent/run_list_params.py +++ b/src/oz_agent_sdk/types/agent/run_list_params.py @@ -14,6 +14,12 @@ class RunListParams(TypedDict, total=False): + ancestor_run_id: str + """Filter runs by ancestor run ID. + + The referenced run must exist and be accessible to the caller. + """ + artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT", "FILE"] """Filter runs by artifact type""" diff --git a/src/oz_agent_sdk/types/agent_run_params.py b/src/oz_agent_sdk/types/agent_run_params.py index 2a346ed..5d185a5 100644 --- a/src/oz_agent_sdk/types/agent_run_params.py +++ b/src/oz_agent_sdk/types/agent_run_params.py @@ -14,6 +14,12 @@ class AgentRunParams(TypedDict, total=False): + agent_identity_uid: str + """ + Optional agent identity UID to use as the execution principal for the run. This + is only valid for runs that are team owned. + """ + attachments: Iterable[Attachment] """ Optional file attachments to include with the prompt (max 5). Attachments are diff --git a/tests/api_resources/agent/test_runs.py b/tests/api_resources/agent/test_runs.py index bf257f8..cf95a65 100644 --- a/tests/api_resources/agent/test_runs.py +++ b/tests/api_resources/agent/test_runs.py @@ -71,6 +71,7 @@ def test_method_list(self, client: OzAPI) -> None: @parametrize def test_method_list_with_all_params(self, client: OzAPI) -> None: run = client.agent.runs.list( + ancestor_run_id="ancestor_run_id", artifact_type="PLAN", created_after=parse_datetime("2019-12-27T18:11:19.117Z"), created_before=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -215,6 +216,7 @@ async def test_method_list(self, async_client: AsyncOzAPI) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOzAPI) -> None: run = await async_client.agent.runs.list( + ancestor_run_id="ancestor_run_id", artifact_type="PLAN", created_after=parse_datetime("2019-12-27T18:11:19.117Z"), created_before=parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index b641c09..70c07fb 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -112,6 +112,7 @@ def test_method_run(self, client: OzAPI) -> None: @parametrize def test_method_run_with_all_params(self, client: OzAPI) -> None: agent = client.agent.run( + agent_identity_uid="agent_identity_uid", attachments=[ { "data": "U3RhaW5sZXNzIHJvY2tz", @@ -272,6 +273,7 @@ async def test_method_run(self, async_client: AsyncOzAPI) -> None: @parametrize async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> None: agent = await async_client.agent.run( + agent_identity_uid="agent_identity_uid", attachments=[ { "data": "U3RhaW5sZXNzIHJvY2tz", From b9872f2642191ef6e1d4d5d3542a08f9e2784b9e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 21:45:08 +0000 Subject: [PATCH 4/6] feat(api): api update --- .stats.yml | 8 +- api.md | 3 + src/oz_agent_sdk/resources/agent/agent.py | 103 +++++++++++++++++- src/oz_agent_sdk/types/__init__.py | 3 + .../types/agent_list_environments_params.py | 16 +++ .../types/agent_list_environments_response.py | 13 +++ src/oz_agent_sdk/types/cloud_environment.py | 74 +++++++++++++ tests/api_resources/test_agent.py | 73 +++++++++++++ 8 files changed, 288 insertions(+), 5 deletions(-) create mode 100644 src/oz_agent_sdk/types/agent_list_environments_params.py create mode 100644 src/oz_agent_sdk/types/agent_list_environments_response.py create mode 100644 src/oz_agent_sdk/types/cloud_environment.py diff --git a/.stats.yml b/.stats.yml index 874109f..4aeb8c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 14 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-96b15c5805e3554bc9eba7055a9b018fc3304f9b149f2c1f27e4cf4d6a1996d7.yml -openapi_spec_hash: b99e78f4bfe7de8864c15a803bb0bb0b -config_hash: 60052b2c1c0862014416821aba875574 +configured_endpoints: 15 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-f0355372540013156ff6e59d0c3789492855d5438b4672cf7812025a41ed15be.yml +openapi_spec_hash: e7c9330454695ffbef5704cfba5acac6 +config_hash: 253e4b5ca01236d448980a78491c17c5 diff --git a/api.md b/api.md index 3ef6227..065cedb 100644 --- a/api.md +++ b/api.md @@ -7,6 +7,7 @@ from oz_agent_sdk.types import ( AgentSkill, AmbientAgentConfig, AwsProviderConfig, + CloudEnvironment, CloudEnvironmentConfig, Error, ErrorCode, @@ -16,6 +17,7 @@ from oz_agent_sdk.types import ( UserProfile, AgentListResponse, AgentGetArtifactResponse, + AgentListEnvironmentsResponse, AgentRunResponse, ) ``` @@ -24,6 +26,7 @@ Methods: - client.agent.list(\*\*params) -> AgentListResponse - client.agent.get_artifact(artifact_uid) -> AgentGetArtifactResponse +- client.agent.list_environments(\*\*params) -> AgentListEnvironmentsResponse - client.agent.run(\*\*params) -> AgentRunResponse ## Runs diff --git a/src/oz_agent_sdk/resources/agent/agent.py b/src/oz_agent_sdk/resources/agent/agent.py index b720375..b28ef9a 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -15,7 +15,7 @@ RunsResourceWithStreamingResponse, AsyncRunsResourceWithStreamingResponse, ) -from ...types import agent_run_params, agent_list_params +from ...types import agent_run_params, agent_list_params, agent_list_environments_params from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import path_template, maybe_transform, async_maybe_transform from .sessions import ( @@ -47,6 +47,7 @@ from ...types.agent_list_response import AgentListResponse from ...types.ambient_agent_config_param import AmbientAgentConfigParam from ...types.agent_get_artifact_response import AgentGetArtifactResponse +from ...types.agent_list_environments_response import AgentListEnvironmentsResponse __all__ = ["AgentResource", "AsyncAgentResource"] @@ -190,6 +191,49 @@ def get_artifact( ), ) + def list_environments( + self, + *, + sort_by: Literal["name", "last_updated"] | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AgentListEnvironmentsResponse: + """Retrieve cloud environments accessible to the authenticated principal. + + Returns + environments the caller owns, has been granted guest access to, or has accessed + via link sharing. + + Args: + sort_by: Sort order for the returned environments. + + - `name`: alphabetical by environment name + - `last_updated`: most recently updated first (default) + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/agent/environments", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"sort_by": sort_by}, agent_list_environments_params.AgentListEnvironmentsParams), + ), + cast_to=AgentListEnvironmentsResponse, + ) + def run( self, *, @@ -419,6 +463,51 @@ async def get_artifact( ), ) + async def list_environments( + self, + *, + sort_by: Literal["name", "last_updated"] | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AgentListEnvironmentsResponse: + """Retrieve cloud environments accessible to the authenticated principal. + + Returns + environments the caller owns, has been granted guest access to, or has accessed + via link sharing. + + Args: + sort_by: Sort order for the returned environments. + + - `name`: alphabetical by environment name + - `last_updated`: most recently updated first (default) + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._get( + "/agent/environments", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + {"sort_by": sort_by}, agent_list_environments_params.AgentListEnvironmentsParams + ), + ), + cast_to=AgentListEnvironmentsResponse, + ) + async def run( self, *, @@ -519,6 +608,9 @@ def __init__(self, agent: AgentResource) -> None: self.get_artifact = to_raw_response_wrapper( agent.get_artifact, ) + self.list_environments = to_raw_response_wrapper( + agent.list_environments, + ) self.run = to_raw_response_wrapper( agent.run, ) @@ -549,6 +641,9 @@ def __init__(self, agent: AsyncAgentResource) -> None: self.get_artifact = async_to_raw_response_wrapper( agent.get_artifact, ) + self.list_environments = async_to_raw_response_wrapper( + agent.list_environments, + ) self.run = async_to_raw_response_wrapper( agent.run, ) @@ -579,6 +674,9 @@ def __init__(self, agent: AgentResource) -> None: self.get_artifact = to_streamed_response_wrapper( agent.get_artifact, ) + self.list_environments = to_streamed_response_wrapper( + agent.list_environments, + ) self.run = to_streamed_response_wrapper( agent.run, ) @@ -609,6 +707,9 @@ def __init__(self, agent: AsyncAgentResource) -> None: self.get_artifact = async_to_streamed_response_wrapper( agent.get_artifact, ) + self.list_environments = async_to_streamed_response_wrapper( + agent.list_environments, + ) self.run = async_to_streamed_response_wrapper( agent.run, ) diff --git a/src/oz_agent_sdk/types/__init__.py b/src/oz_agent_sdk/types/__init__.py index 4c520a7..e27ca02 100644 --- a/src/oz_agent_sdk/types/__init__.py +++ b/src/oz_agent_sdk/types/__init__.py @@ -8,6 +8,7 @@ from .user_profile import UserProfile as UserProfile from .agent_run_params import AgentRunParams as AgentRunParams from .agent_list_params import AgentListParams as AgentListParams +from .cloud_environment import CloudEnvironment as CloudEnvironment from .mcp_server_config import McpServerConfig as McpServerConfig from .agent_run_response import AgentRunResponse as AgentRunResponse from .agent_list_response import AgentListResponse as AgentListResponse @@ -18,3 +19,5 @@ from .cloud_environment_config import CloudEnvironmentConfig as CloudEnvironmentConfig from .ambient_agent_config_param import AmbientAgentConfigParam as AmbientAgentConfigParam from .agent_get_artifact_response import AgentGetArtifactResponse as AgentGetArtifactResponse +from .agent_list_environments_params import AgentListEnvironmentsParams as AgentListEnvironmentsParams +from .agent_list_environments_response import AgentListEnvironmentsResponse as AgentListEnvironmentsResponse diff --git a/src/oz_agent_sdk/types/agent_list_environments_params.py b/src/oz_agent_sdk/types/agent_list_environments_params.py new file mode 100644 index 0000000..481c31d --- /dev/null +++ b/src/oz_agent_sdk/types/agent_list_environments_params.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["AgentListEnvironmentsParams"] + + +class AgentListEnvironmentsParams(TypedDict, total=False): + sort_by: Literal["name", "last_updated"] + """Sort order for the returned environments. + + - `name`: alphabetical by environment name + - `last_updated`: most recently updated first (default) + """ diff --git a/src/oz_agent_sdk/types/agent_list_environments_response.py b/src/oz_agent_sdk/types/agent_list_environments_response.py new file mode 100644 index 0000000..103845a --- /dev/null +++ b/src/oz_agent_sdk/types/agent_list_environments_response.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List + +from .._models import BaseModel +from .cloud_environment import CloudEnvironment + +__all__ = ["AgentListEnvironmentsResponse"] + + +class AgentListEnvironmentsResponse(BaseModel): + environments: List[CloudEnvironment] + """List of accessible cloud environments""" diff --git a/src/oz_agent_sdk/types/cloud_environment.py b/src/oz_agent_sdk/types/cloud_environment.py new file mode 100644 index 0000000..4bde98c --- /dev/null +++ b/src/oz_agent_sdk/types/cloud_environment.py @@ -0,0 +1,74 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from .scope import Scope +from .._models import BaseModel +from .user_profile import UserProfile +from .agent.run_state import RunState +from .cloud_environment_config import CloudEnvironmentConfig + +__all__ = ["CloudEnvironment", "LastTaskCreated"] + + +class LastTaskCreated(BaseModel): + """Summary of the most recently created task for an environment""" + + id: str + """Unique identifier of the task""" + + created_at: datetime + """When the task was created (RFC3339)""" + + state: RunState + """Current state of the run: + + - QUEUED: Run is waiting to be picked up + - PENDING: Run is being prepared + - CLAIMED: Run has been claimed by a worker + - INPROGRESS: Run is actively being executed + - SUCCEEDED: Run completed successfully + - FAILED: Run failed + - BLOCKED: Run is blocked (e.g., awaiting user input or approval) + - ERROR: Run encountered an error + - CANCELLED: Run was cancelled by user + """ + + title: str + """Title of the task""" + + updated_at: datetime + """When the task was last updated (RFC3339)""" + + started_at: Optional[datetime] = None + """When the task started running (RFC3339), null if not yet started""" + + +class CloudEnvironment(BaseModel): + """A cloud environment for running agents""" + + config: CloudEnvironmentConfig + """Configuration for a cloud environment used by scheduled agents""" + + last_updated: datetime + """Timestamp when the environment was last updated (RFC3339)""" + + setup_failed: bool + """True when the most recent task failed during setup before it started running""" + + uid: str + """Unique identifier for the environment""" + + creator: Optional[UserProfile] = None + + last_editor: Optional[UserProfile] = None + + last_task_created: Optional[LastTaskCreated] = None + """Summary of the most recently created task for an environment""" + + last_task_run_timestamp: Optional[datetime] = None + """Timestamp of the most recent task run in this environment (RFC3339)""" + + scope: Optional[Scope] = None + """Ownership scope for a resource (team or personal)""" diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index 70c07fb..bb24171 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -13,6 +13,7 @@ AgentRunResponse, AgentListResponse, AgentGetArtifactResponse, + AgentListEnvironmentsResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -102,6 +103,42 @@ def test_path_params_get_artifact(self, client: OzAPI) -> None: "", ) + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list_environments(self, client: OzAPI) -> None: + agent = client.agent.list_environments() + assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_method_list_environments_with_all_params(self, client: OzAPI) -> None: + agent = client.agent.list_environments( + sort_by="name", + ) + assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_raw_response_list_environments(self, client: OzAPI) -> None: + response = client.agent.with_raw_response.list_environments() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + agent = response.parse() + assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + def test_streaming_response_list_environments(self, client: OzAPI) -> None: + with client.agent.with_streaming_response.list_environments() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + agent = response.parse() + assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_run(self, client: OzAPI) -> None: @@ -263,6 +300,42 @@ async def test_path_params_get_artifact(self, async_client: AsyncOzAPI) -> None: "", ) + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list_environments(self, async_client: AsyncOzAPI) -> None: + agent = await async_client.agent.list_environments() + assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_method_list_environments_with_all_params(self, async_client: AsyncOzAPI) -> None: + agent = await async_client.agent.list_environments( + sort_by="name", + ) + assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_raw_response_list_environments(self, async_client: AsyncOzAPI) -> None: + response = await async_client.agent.with_raw_response.list_environments() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + agent = await response.parse() + assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) + + @pytest.mark.skip(reason="Mock server tests are disabled") + @parametrize + async def test_streaming_response_list_environments(self, async_client: AsyncOzAPI) -> None: + async with async_client.agent.with_streaming_response.list_environments() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + agent = await response.parse() + assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_run(self, async_client: AsyncOzAPI) -> None: From a6d82f1a71ad8e0ff5f10c43cc81938babc1444e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 22:12:55 +0000 Subject: [PATCH 5/6] feat(api): api update --- .stats.yml | 8 +- api.md | 3 - src/oz_agent_sdk/resources/agent/agent.py | 103 +----------------- src/oz_agent_sdk/resources/agent/runs.py | 10 -- src/oz_agent_sdk/types/__init__.py | 3 - .../types/agent/run_list_params.py | 6 - .../types/agent_list_environments_params.py | 16 --- .../types/agent_list_environments_response.py | 13 --- src/oz_agent_sdk/types/cloud_environment.py | 74 ------------- tests/api_resources/agent/test_runs.py | 2 - tests/api_resources/test_agent.py | 73 ------------- 11 files changed, 5 insertions(+), 306 deletions(-) delete mode 100644 src/oz_agent_sdk/types/agent_list_environments_params.py delete mode 100644 src/oz_agent_sdk/types/agent_list_environments_response.py delete mode 100644 src/oz_agent_sdk/types/cloud_environment.py diff --git a/.stats.yml b/.stats.yml index 4aeb8c7..51b5464 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-f0355372540013156ff6e59d0c3789492855d5438b4672cf7812025a41ed15be.yml -openapi_spec_hash: e7c9330454695ffbef5704cfba5acac6 -config_hash: 253e4b5ca01236d448980a78491c17c5 +configured_endpoints: 14 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-8f9c749573846b07a55a3131b66456f0a592838c6bfc986ab30948df66cd6f11.yml +openapi_spec_hash: 59f1ac98ad6cf13b12c59196bcecffd7 +config_hash: 60052b2c1c0862014416821aba875574 diff --git a/api.md b/api.md index 065cedb..3ef6227 100644 --- a/api.md +++ b/api.md @@ -7,7 +7,6 @@ from oz_agent_sdk.types import ( AgentSkill, AmbientAgentConfig, AwsProviderConfig, - CloudEnvironment, CloudEnvironmentConfig, Error, ErrorCode, @@ -17,7 +16,6 @@ from oz_agent_sdk.types import ( UserProfile, AgentListResponse, AgentGetArtifactResponse, - AgentListEnvironmentsResponse, AgentRunResponse, ) ``` @@ -26,7 +24,6 @@ Methods: - client.agent.list(\*\*params) -> AgentListResponse - client.agent.get_artifact(artifact_uid) -> AgentGetArtifactResponse -- client.agent.list_environments(\*\*params) -> AgentListEnvironmentsResponse - client.agent.run(\*\*params) -> AgentRunResponse ## Runs diff --git a/src/oz_agent_sdk/resources/agent/agent.py b/src/oz_agent_sdk/resources/agent/agent.py index b28ef9a..b720375 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -15,7 +15,7 @@ RunsResourceWithStreamingResponse, AsyncRunsResourceWithStreamingResponse, ) -from ...types import agent_run_params, agent_list_params, agent_list_environments_params +from ...types import agent_run_params, agent_list_params from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import path_template, maybe_transform, async_maybe_transform from .sessions import ( @@ -47,7 +47,6 @@ from ...types.agent_list_response import AgentListResponse from ...types.ambient_agent_config_param import AmbientAgentConfigParam from ...types.agent_get_artifact_response import AgentGetArtifactResponse -from ...types.agent_list_environments_response import AgentListEnvironmentsResponse __all__ = ["AgentResource", "AsyncAgentResource"] @@ -191,49 +190,6 @@ def get_artifact( ), ) - def list_environments( - self, - *, - sort_by: Literal["name", "last_updated"] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AgentListEnvironmentsResponse: - """Retrieve cloud environments accessible to the authenticated principal. - - Returns - environments the caller owns, has been granted guest access to, or has accessed - via link sharing. - - Args: - sort_by: Sort order for the returned environments. - - - `name`: alphabetical by environment name - - `last_updated`: most recently updated first (default) - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get( - "/agent/environments", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform({"sort_by": sort_by}, agent_list_environments_params.AgentListEnvironmentsParams), - ), - cast_to=AgentListEnvironmentsResponse, - ) - def run( self, *, @@ -463,51 +419,6 @@ async def get_artifact( ), ) - async def list_environments( - self, - *, - sort_by: Literal["name", "last_updated"] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AgentListEnvironmentsResponse: - """Retrieve cloud environments accessible to the authenticated principal. - - Returns - environments the caller owns, has been granted guest access to, or has accessed - via link sharing. - - Args: - sort_by: Sort order for the returned environments. - - - `name`: alphabetical by environment name - - `last_updated`: most recently updated first (default) - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return await self._get( - "/agent/environments", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - {"sort_by": sort_by}, agent_list_environments_params.AgentListEnvironmentsParams - ), - ), - cast_to=AgentListEnvironmentsResponse, - ) - async def run( self, *, @@ -608,9 +519,6 @@ def __init__(self, agent: AgentResource) -> None: self.get_artifact = to_raw_response_wrapper( agent.get_artifact, ) - self.list_environments = to_raw_response_wrapper( - agent.list_environments, - ) self.run = to_raw_response_wrapper( agent.run, ) @@ -641,9 +549,6 @@ def __init__(self, agent: AsyncAgentResource) -> None: self.get_artifact = async_to_raw_response_wrapper( agent.get_artifact, ) - self.list_environments = async_to_raw_response_wrapper( - agent.list_environments, - ) self.run = async_to_raw_response_wrapper( agent.run, ) @@ -674,9 +579,6 @@ def __init__(self, agent: AgentResource) -> None: self.get_artifact = to_streamed_response_wrapper( agent.get_artifact, ) - self.list_environments = to_streamed_response_wrapper( - agent.list_environments, - ) self.run = to_streamed_response_wrapper( agent.run, ) @@ -707,9 +609,6 @@ def __init__(self, agent: AsyncAgentResource) -> None: self.get_artifact = async_to_streamed_response_wrapper( agent.get_artifact, ) - self.list_environments = async_to_streamed_response_wrapper( - agent.list_environments, - ) self.run = async_to_streamed_response_wrapper( agent.run, ) diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index 00c3f49..e6e55b5 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -87,7 +87,6 @@ def retrieve( def list( self, *, - ancestor_run_id: str | Omit = omit, artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT", "FILE"] | Omit = omit, created_after: Union[str, datetime] | Omit = omit, created_before: Union[str, datetime] | Omit = omit, @@ -120,9 +119,6 @@ def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - ancestor_run_id: Filter runs by ancestor run ID. The referenced run must exist and be accessible - to the caller. - artifact_type: Filter runs by artifact type created_after: Filter runs created after this timestamp (RFC3339 format) @@ -186,7 +182,6 @@ def list( timeout=timeout, query=maybe_transform( { - "ancestor_run_id": ancestor_run_id, "artifact_type": artifact_type, "created_after": created_after, "created_before": created_before, @@ -312,7 +307,6 @@ async def retrieve( def list( self, *, - ancestor_run_id: str | Omit = omit, artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT", "FILE"] | Omit = omit, created_after: Union[str, datetime] | Omit = omit, created_before: Union[str, datetime] | Omit = omit, @@ -345,9 +339,6 @@ def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - ancestor_run_id: Filter runs by ancestor run ID. The referenced run must exist and be accessible - to the caller. - artifact_type: Filter runs by artifact type created_after: Filter runs created after this timestamp (RFC3339 format) @@ -411,7 +402,6 @@ def list( timeout=timeout, query=maybe_transform( { - "ancestor_run_id": ancestor_run_id, "artifact_type": artifact_type, "created_after": created_after, "created_before": created_before, diff --git a/src/oz_agent_sdk/types/__init__.py b/src/oz_agent_sdk/types/__init__.py index e27ca02..4c520a7 100644 --- a/src/oz_agent_sdk/types/__init__.py +++ b/src/oz_agent_sdk/types/__init__.py @@ -8,7 +8,6 @@ from .user_profile import UserProfile as UserProfile from .agent_run_params import AgentRunParams as AgentRunParams from .agent_list_params import AgentListParams as AgentListParams -from .cloud_environment import CloudEnvironment as CloudEnvironment from .mcp_server_config import McpServerConfig as McpServerConfig from .agent_run_response import AgentRunResponse as AgentRunResponse from .agent_list_response import AgentListResponse as AgentListResponse @@ -19,5 +18,3 @@ from .cloud_environment_config import CloudEnvironmentConfig as CloudEnvironmentConfig from .ambient_agent_config_param import AmbientAgentConfigParam as AmbientAgentConfigParam from .agent_get_artifact_response import AgentGetArtifactResponse as AgentGetArtifactResponse -from .agent_list_environments_params import AgentListEnvironmentsParams as AgentListEnvironmentsParams -from .agent_list_environments_response import AgentListEnvironmentsResponse as AgentListEnvironmentsResponse diff --git a/src/oz_agent_sdk/types/agent/run_list_params.py b/src/oz_agent_sdk/types/agent/run_list_params.py index b53a299..0b4e389 100644 --- a/src/oz_agent_sdk/types/agent/run_list_params.py +++ b/src/oz_agent_sdk/types/agent/run_list_params.py @@ -14,12 +14,6 @@ class RunListParams(TypedDict, total=False): - ancestor_run_id: str - """Filter runs by ancestor run ID. - - The referenced run must exist and be accessible to the caller. - """ - artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT", "FILE"] """Filter runs by artifact type""" diff --git a/src/oz_agent_sdk/types/agent_list_environments_params.py b/src/oz_agent_sdk/types/agent_list_environments_params.py deleted file mode 100644 index 481c31d..0000000 --- a/src/oz_agent_sdk/types/agent_list_environments_params.py +++ /dev/null @@ -1,16 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, TypedDict - -__all__ = ["AgentListEnvironmentsParams"] - - -class AgentListEnvironmentsParams(TypedDict, total=False): - sort_by: Literal["name", "last_updated"] - """Sort order for the returned environments. - - - `name`: alphabetical by environment name - - `last_updated`: most recently updated first (default) - """ diff --git a/src/oz_agent_sdk/types/agent_list_environments_response.py b/src/oz_agent_sdk/types/agent_list_environments_response.py deleted file mode 100644 index 103845a..0000000 --- a/src/oz_agent_sdk/types/agent_list_environments_response.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List - -from .._models import BaseModel -from .cloud_environment import CloudEnvironment - -__all__ = ["AgentListEnvironmentsResponse"] - - -class AgentListEnvironmentsResponse(BaseModel): - environments: List[CloudEnvironment] - """List of accessible cloud environments""" diff --git a/src/oz_agent_sdk/types/cloud_environment.py b/src/oz_agent_sdk/types/cloud_environment.py deleted file mode 100644 index 4bde98c..0000000 --- a/src/oz_agent_sdk/types/cloud_environment.py +++ /dev/null @@ -1,74 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime - -from .scope import Scope -from .._models import BaseModel -from .user_profile import UserProfile -from .agent.run_state import RunState -from .cloud_environment_config import CloudEnvironmentConfig - -__all__ = ["CloudEnvironment", "LastTaskCreated"] - - -class LastTaskCreated(BaseModel): - """Summary of the most recently created task for an environment""" - - id: str - """Unique identifier of the task""" - - created_at: datetime - """When the task was created (RFC3339)""" - - state: RunState - """Current state of the run: - - - QUEUED: Run is waiting to be picked up - - PENDING: Run is being prepared - - CLAIMED: Run has been claimed by a worker - - INPROGRESS: Run is actively being executed - - SUCCEEDED: Run completed successfully - - FAILED: Run failed - - BLOCKED: Run is blocked (e.g., awaiting user input or approval) - - ERROR: Run encountered an error - - CANCELLED: Run was cancelled by user - """ - - title: str - """Title of the task""" - - updated_at: datetime - """When the task was last updated (RFC3339)""" - - started_at: Optional[datetime] = None - """When the task started running (RFC3339), null if not yet started""" - - -class CloudEnvironment(BaseModel): - """A cloud environment for running agents""" - - config: CloudEnvironmentConfig - """Configuration for a cloud environment used by scheduled agents""" - - last_updated: datetime - """Timestamp when the environment was last updated (RFC3339)""" - - setup_failed: bool - """True when the most recent task failed during setup before it started running""" - - uid: str - """Unique identifier for the environment""" - - creator: Optional[UserProfile] = None - - last_editor: Optional[UserProfile] = None - - last_task_created: Optional[LastTaskCreated] = None - """Summary of the most recently created task for an environment""" - - last_task_run_timestamp: Optional[datetime] = None - """Timestamp of the most recent task run in this environment (RFC3339)""" - - scope: Optional[Scope] = None - """Ownership scope for a resource (team or personal)""" diff --git a/tests/api_resources/agent/test_runs.py b/tests/api_resources/agent/test_runs.py index cf95a65..bf257f8 100644 --- a/tests/api_resources/agent/test_runs.py +++ b/tests/api_resources/agent/test_runs.py @@ -71,7 +71,6 @@ def test_method_list(self, client: OzAPI) -> None: @parametrize def test_method_list_with_all_params(self, client: OzAPI) -> None: run = client.agent.runs.list( - ancestor_run_id="ancestor_run_id", artifact_type="PLAN", created_after=parse_datetime("2019-12-27T18:11:19.117Z"), created_before=parse_datetime("2019-12-27T18:11:19.117Z"), @@ -216,7 +215,6 @@ async def test_method_list(self, async_client: AsyncOzAPI) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOzAPI) -> None: run = await async_client.agent.runs.list( - ancestor_run_id="ancestor_run_id", artifact_type="PLAN", created_after=parse_datetime("2019-12-27T18:11:19.117Z"), created_before=parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index bb24171..70c07fb 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -13,7 +13,6 @@ AgentRunResponse, AgentListResponse, AgentGetArtifactResponse, - AgentListEnvironmentsResponse, ) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -103,42 +102,6 @@ def test_path_params_get_artifact(self, client: OzAPI) -> None: "", ) - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_method_list_environments(self, client: OzAPI) -> None: - agent = client.agent.list_environments() - assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_method_list_environments_with_all_params(self, client: OzAPI) -> None: - agent = client.agent.list_environments( - sort_by="name", - ) - assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_raw_response_list_environments(self, client: OzAPI) -> None: - response = client.agent.with_raw_response.list_environments() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - agent = response.parse() - assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - def test_streaming_response_list_environments(self, client: OzAPI) -> None: - with client.agent.with_streaming_response.list_environments() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - agent = response.parse() - assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) - - assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize def test_method_run(self, client: OzAPI) -> None: @@ -300,42 +263,6 @@ async def test_path_params_get_artifact(self, async_client: AsyncOzAPI) -> None: "", ) - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_method_list_environments(self, async_client: AsyncOzAPI) -> None: - agent = await async_client.agent.list_environments() - assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_method_list_environments_with_all_params(self, async_client: AsyncOzAPI) -> None: - agent = await async_client.agent.list_environments( - sort_by="name", - ) - assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_raw_response_list_environments(self, async_client: AsyncOzAPI) -> None: - response = await async_client.agent.with_raw_response.list_environments() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - agent = await response.parse() - assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) - - @pytest.mark.skip(reason="Mock server tests are disabled") - @parametrize - async def test_streaming_response_list_environments(self, async_client: AsyncOzAPI) -> None: - async with async_client.agent.with_streaming_response.list_environments() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - agent = await response.parse() - assert_matches_type(AgentListEnvironmentsResponse, agent, path=["response"]) - - assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize async def test_method_run(self, async_client: AsyncOzAPI) -> None: From 552a8b101fcd17520cb448de51afa0023318b692 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 22:13:15 +0000 Subject: [PATCH 6/6] release: 0.12.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 16 ++++++++++++++++ pyproject.toml | 2 +- src/oz_agent_sdk/_version.py | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f7014c3..a713055 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.11.0" + ".": "0.12.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 543cbc1..e1ea514 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## 0.12.0 (2026-04-10) + +Full Changelog: [v0.11.0...v0.12.0](https://github.com/warpdotdev/oz-sdk-python/compare/v0.11.0...v0.12.0) + +### Features + +* Add parent_run_id filter to List runs endpoint ([33cf04c](https://github.com/warpdotdev/oz-sdk-python/commit/33cf04c0777d53059f8a3c73b925b468276aba2a)) +* **api:** api update ([a6d82f1](https://github.com/warpdotdev/oz-sdk-python/commit/a6d82f1a71ad8e0ff5f10c43cc81938babc1444e)) +* **api:** api update ([b9872f2](https://github.com/warpdotdev/oz-sdk-python/commit/b9872f2642191ef6e1d4d5d3542a08f9e2784b9e)) +* **api:** api update ([0ef9c8f](https://github.com/warpdotdev/oz-sdk-python/commit/0ef9c8f483269d203a3edc7b5805f48f4263eb2f)) + + +### Bug Fixes + +* ensure file data are only sent as 1 parameter ([6720ea9](https://github.com/warpdotdev/oz-sdk-python/commit/6720ea9331a945cf2d030e20b8851a223697aab3)) + ## 0.11.0 (2026-04-09) Full Changelog: [v0.10.1...v0.11.0](https://github.com/warpdotdev/oz-sdk-python/compare/v0.10.1...v0.11.0) diff --git a/pyproject.toml b/pyproject.toml index 01da747..6b28584 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "oz-agent-sdk" -version = "0.11.0" +version = "0.12.0" description = "The official Python library for the oz-api API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/oz_agent_sdk/_version.py b/src/oz_agent_sdk/_version.py index 113b87a..b96fedf 100644 --- a/src/oz_agent_sdk/_version.py +++ b/src/oz_agent_sdk/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "oz_agent_sdk" -__version__ = "0.11.0" # x-release-please-version +__version__ = "0.12.0" # x-release-please-version