From eb8dbfa455854c7403fb489a555b58bf01bc956c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 16:06:14 +0000 Subject: [PATCH 01/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 917ae03..3ce9b21 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-a912e2533a6f1fbeee38d4b7739b771ed5711c648a6a7f3d8769b8b2cb4f31fb.yml -openapi_spec_hash: ef48f8fcc46a51b00893505e9b52c95d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-c098713ad7d0db50c26687968fc23fbb61b919a674a9f26bb3375af48ea816f1.yml +openapi_spec_hash: 633a8a510fd3d0eb0c17c61522de6003 config_hash: e894152aaebba5a2e65e27efaf2712e2 From d7b298d99c5dcb5e02530329fef222de92f3e9d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 18:37:12 +0000 Subject: [PATCH 02/34] feat: Use correct branch for Stainless PRs --- .stats.yml | 4 ++-- src/oz_agent_sdk/resources/agent/runs.py | 4 ++-- src/oz_agent_sdk/resources/agent/schedules.py | 10 ++++------ src/oz_agent_sdk/types/agent/run_list_params.py | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3ce9b21..2a8b99f 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-c098713ad7d0db50c26687968fc23fbb61b919a674a9f26bb3375af48ea816f1.yml -openapi_spec_hash: 633a8a510fd3d0eb0c17c61522de6003 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-29ad327e738bb7cfe141e7ddb412ac41db03891941ec2f85db6e5f31c5811e40.yml +openapi_spec_hash: bb3d0180ebd64b039787660567c2473d config_hash: e894152aaebba5a2e65e27efaf2712e2 diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index 440bdcf..ed8fff1 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -118,7 +118,7 @@ def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST) + artifact_type: Filter runs by artifact type created_after: Filter runs created after this timestamp (RFC3339 format) @@ -333,7 +333,7 @@ async def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST) + artifact_type: Filter runs by artifact type created_after: Filter runs created after this timestamp (RFC3339 format) diff --git a/src/oz_agent_sdk/resources/agent/schedules.py b/src/oz_agent_sdk/resources/agent/schedules.py index a4b5592..f9fbac0 100644 --- a/src/oz_agent_sdk/resources/agent/schedules.py +++ b/src/oz_agent_sdk/resources/agent/schedules.py @@ -275,8 +275,7 @@ def pause( ) -> ScheduledAgentItem: """Pause a scheduled agent. - The agent will not run until resumed. This sets the - enabled flag to false. + The agent will not run until resumed. Args: extra_headers: Send extra headers @@ -311,7 +310,7 @@ def resume( """Resume a paused scheduled agent. The agent will start running according to its - cron schedule. This sets the enabled flag to true. + cron schedule. Args: extra_headers: Send extra headers @@ -584,8 +583,7 @@ async def pause( ) -> ScheduledAgentItem: """Pause a scheduled agent. - The agent will not run until resumed. This sets the - enabled flag to false. + The agent will not run until resumed. Args: extra_headers: Send extra headers @@ -620,7 +618,7 @@ async def resume( """Resume a paused scheduled agent. The agent will start running according to its - cron schedule. This sets the enabled flag to true. + cron schedule. Args: extra_headers: Send extra headers 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 cb662bc..fdabfe5 100644 --- a/src/oz_agent_sdk/types/agent/run_list_params.py +++ b/src/oz_agent_sdk/types/agent/run_list_params.py @@ -15,7 +15,7 @@ class RunListParams(TypedDict, total=False): artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"] - """Filter runs by artifact type (PLAN or PULL_REQUEST)""" + """Filter runs by artifact type""" created_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """Filter runs created after this timestamp (RFC3339 format)""" From c518876f3da1129d3c351982ed4a06590fd15f2e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:23:14 +0000 Subject: [PATCH 03/34] feat(internal): implement indices array format for query and form serialization --- src/oz_agent_sdk/_qs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/oz_agent_sdk/_qs.py b/src/oz_agent_sdk/_qs.py index ada6fd3..de8c99b 100644 --- a/src/oz_agent_sdk/_qs.py +++ b/src/oz_agent_sdk/_qs.py @@ -101,7 +101,10 @@ def _stringify_item( items.extend(self._stringify_item(key, item, opts)) return items elif array_format == "indices": - raise NotImplementedError("The array indices format is not supported yet") + items = [] + for i, item in enumerate(value): + items.extend(self._stringify_item(f"{key}[{i}]", item, opts)) + return items elif array_format == "brackets": items = [] key = key + "[]" From 7fc79efe0897451670cb44cf29c0f99b06ffe821 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 01:29:05 +0000 Subject: [PATCH 04/34] feat(api): api update --- .stats.yml | 4 ++-- src/oz_agent_sdk/resources/agent/runs.py | 4 ++-- src/oz_agent_sdk/resources/agent/schedules.py | 10 ++++++---- src/oz_agent_sdk/types/agent/run_list_params.py | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2a8b99f..3ce9b21 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-29ad327e738bb7cfe141e7ddb412ac41db03891941ec2f85db6e5f31c5811e40.yml -openapi_spec_hash: bb3d0180ebd64b039787660567c2473d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-c098713ad7d0db50c26687968fc23fbb61b919a674a9f26bb3375af48ea816f1.yml +openapi_spec_hash: 633a8a510fd3d0eb0c17c61522de6003 config_hash: e894152aaebba5a2e65e27efaf2712e2 diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index ed8fff1..440bdcf 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -118,7 +118,7 @@ def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - artifact_type: Filter runs by artifact type + artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST) created_after: Filter runs created after this timestamp (RFC3339 format) @@ -333,7 +333,7 @@ async def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - artifact_type: Filter runs by artifact type + artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST) created_after: Filter runs created after this timestamp (RFC3339 format) diff --git a/src/oz_agent_sdk/resources/agent/schedules.py b/src/oz_agent_sdk/resources/agent/schedules.py index f9fbac0..a4b5592 100644 --- a/src/oz_agent_sdk/resources/agent/schedules.py +++ b/src/oz_agent_sdk/resources/agent/schedules.py @@ -275,7 +275,8 @@ def pause( ) -> ScheduledAgentItem: """Pause a scheduled agent. - The agent will not run until resumed. + The agent will not run until resumed. This sets the + enabled flag to false. Args: extra_headers: Send extra headers @@ -310,7 +311,7 @@ def resume( """Resume a paused scheduled agent. The agent will start running according to its - cron schedule. + cron schedule. This sets the enabled flag to true. Args: extra_headers: Send extra headers @@ -583,7 +584,8 @@ async def pause( ) -> ScheduledAgentItem: """Pause a scheduled agent. - The agent will not run until resumed. + The agent will not run until resumed. This sets the + enabled flag to false. Args: extra_headers: Send extra headers @@ -618,7 +620,7 @@ async def resume( """Resume a paused scheduled agent. The agent will start running according to its - cron schedule. + cron schedule. This sets the enabled flag to true. Args: extra_headers: Send extra headers 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 fdabfe5..cb662bc 100644 --- a/src/oz_agent_sdk/types/agent/run_list_params.py +++ b/src/oz_agent_sdk/types/agent/run_list_params.py @@ -15,7 +15,7 @@ class RunListParams(TypedDict, total=False): artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"] - """Filter runs by artifact type""" + """Filter runs by artifact type (PLAN or PULL_REQUEST)""" created_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """Filter runs created after this timestamp (RFC3339 format)""" From 31b5a63204a2baca1a41f0b4124408d2d2b7e6a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 19:03:41 +0000 Subject: [PATCH 05/34] feat: Add VMIdleTimeoutMinutes param to API --- .stats.yml | 4 ++-- src/oz_agent_sdk/resources/agent/runs.py | 4 ++-- src/oz_agent_sdk/resources/agent/schedules.py | 10 ++++------ src/oz_agent_sdk/types/agent/run_list_params.py | 2 +- src/oz_agent_sdk/types/ambient_agent_config.py | 13 +++++++++++++ .../types/ambient_agent_config_param.py | 13 +++++++++++++ tests/api_resources/agent/test_schedules.py | 8 ++++++++ tests/api_resources/test_agent.py | 4 ++++ 8 files changed, 47 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3ce9b21..9a254bc 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-c098713ad7d0db50c26687968fc23fbb61b919a674a9f26bb3375af48ea816f1.yml -openapi_spec_hash: 633a8a510fd3d0eb0c17c61522de6003 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-4caffe00bccb10ade46f9043bec5c13558c78c49b35fc5dfa3e0ac6258465ce2.yml +openapi_spec_hash: ed3c519d0d108a9a9da06d0ff1bad9a9 config_hash: e894152aaebba5a2e65e27efaf2712e2 diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index 440bdcf..ed8fff1 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -118,7 +118,7 @@ def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST) + artifact_type: Filter runs by artifact type created_after: Filter runs created after this timestamp (RFC3339 format) @@ -333,7 +333,7 @@ async def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST) + artifact_type: Filter runs by artifact type created_after: Filter runs created after this timestamp (RFC3339 format) diff --git a/src/oz_agent_sdk/resources/agent/schedules.py b/src/oz_agent_sdk/resources/agent/schedules.py index a4b5592..f9fbac0 100644 --- a/src/oz_agent_sdk/resources/agent/schedules.py +++ b/src/oz_agent_sdk/resources/agent/schedules.py @@ -275,8 +275,7 @@ def pause( ) -> ScheduledAgentItem: """Pause a scheduled agent. - The agent will not run until resumed. This sets the - enabled flag to false. + The agent will not run until resumed. Args: extra_headers: Send extra headers @@ -311,7 +310,7 @@ def resume( """Resume a paused scheduled agent. The agent will start running according to its - cron schedule. This sets the enabled flag to true. + cron schedule. Args: extra_headers: Send extra headers @@ -584,8 +583,7 @@ async def pause( ) -> ScheduledAgentItem: """Pause a scheduled agent. - The agent will not run until resumed. This sets the - enabled flag to false. + The agent will not run until resumed. Args: extra_headers: Send extra headers @@ -620,7 +618,7 @@ async def resume( """Resume a paused scheduled agent. The agent will start running according to its - cron schedule. This sets the enabled flag to true. + cron schedule. Args: extra_headers: Send extra headers 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 cb662bc..fdabfe5 100644 --- a/src/oz_agent_sdk/types/agent/run_list_params.py +++ b/src/oz_agent_sdk/types/agent/run_list_params.py @@ -15,7 +15,7 @@ class RunListParams(TypedDict, total=False): artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"] - """Filter runs by artifact type (PLAN or PULL_REQUEST)""" + """Filter runs by artifact type""" created_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """Filter runs created after this timestamp (RFC3339 format)""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 67667c8..b667e62 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -25,6 +25,19 @@ class AmbientAgentConfig(BaseModel): environment_id: Optional[str] = None """UID of the environment to run the agent in""" + harness: Optional[str] = None + """ + Agent harness to use for the agent run. Default (empty) uses Warp's built-in Oz + harness. + """ + + idle_timeout_minutes: Optional[int] = None + """ + Number of minutes to keep the agent environment alive after task completion. If + not set, defaults to 10 minutes. Maximum allowed value is min(60, + floor(max_instance_runtime_seconds / 60) for your billing tier). + """ + mcp_servers: Optional[Dict[str, McpServerConfig]] = None """Map of MCP server configurations by name""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 1cd17fe..4f04d52 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -25,6 +25,19 @@ class AmbientAgentConfigParam(TypedDict, total=False): environment_id: str """UID of the environment to run the agent in""" + harness: str + """ + Agent harness to use for the agent run. Default (empty) uses Warp's built-in Oz + harness. + """ + + idle_timeout_minutes: int + """ + Number of minutes to keep the agent environment alive after task completion. If + not set, defaults to 10 minutes. Maximum allowed value is min(60, + floor(max_instance_runtime_seconds / 60) for your billing tier). + """ + mcp_servers: Dict[str, McpServerConfigParam] """Map of MCP server configurations by name""" diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index e8f8a24..1a1eceb 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -40,6 +40,8 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -154,6 +156,8 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -395,6 +399,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -509,6 +515,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index 00acc5b..df58cfd 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -123,6 +123,8 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -277,6 +279,8 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], From 9fe02aad21c71cbab837f7d335e5234e1974bb90 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 20:15:48 +0000 Subject: [PATCH 06/34] feat(api): api update --- .stats.yml | 4 ++-- src/oz_agent_sdk/resources/agent/runs.py | 4 ++-- src/oz_agent_sdk/resources/agent/schedules.py | 10 ++++++---- src/oz_agent_sdk/types/agent/run_list_params.py | 2 +- src/oz_agent_sdk/types/ambient_agent_config.py | 13 ------------- .../types/ambient_agent_config_param.py | 13 ------------- tests/api_resources/agent/test_schedules.py | 8 -------- tests/api_resources/test_agent.py | 4 ---- 8 files changed, 11 insertions(+), 47 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9a254bc..3ce9b21 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-4caffe00bccb10ade46f9043bec5c13558c78c49b35fc5dfa3e0ac6258465ce2.yml -openapi_spec_hash: ed3c519d0d108a9a9da06d0ff1bad9a9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-c098713ad7d0db50c26687968fc23fbb61b919a674a9f26bb3375af48ea816f1.yml +openapi_spec_hash: 633a8a510fd3d0eb0c17c61522de6003 config_hash: e894152aaebba5a2e65e27efaf2712e2 diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index ed8fff1..440bdcf 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -118,7 +118,7 @@ def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - artifact_type: Filter runs by artifact type + artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST) created_after: Filter runs created after this timestamp (RFC3339 format) @@ -333,7 +333,7 @@ async def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - artifact_type: Filter runs by artifact type + artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST) created_after: Filter runs created after this timestamp (RFC3339 format) diff --git a/src/oz_agent_sdk/resources/agent/schedules.py b/src/oz_agent_sdk/resources/agent/schedules.py index f9fbac0..a4b5592 100644 --- a/src/oz_agent_sdk/resources/agent/schedules.py +++ b/src/oz_agent_sdk/resources/agent/schedules.py @@ -275,7 +275,8 @@ def pause( ) -> ScheduledAgentItem: """Pause a scheduled agent. - The agent will not run until resumed. + The agent will not run until resumed. This sets the + enabled flag to false. Args: extra_headers: Send extra headers @@ -310,7 +311,7 @@ def resume( """Resume a paused scheduled agent. The agent will start running according to its - cron schedule. + cron schedule. This sets the enabled flag to true. Args: extra_headers: Send extra headers @@ -583,7 +584,8 @@ async def pause( ) -> ScheduledAgentItem: """Pause a scheduled agent. - The agent will not run until resumed. + The agent will not run until resumed. This sets the + enabled flag to false. Args: extra_headers: Send extra headers @@ -618,7 +620,7 @@ async def resume( """Resume a paused scheduled agent. The agent will start running according to its - cron schedule. + cron schedule. This sets the enabled flag to true. Args: extra_headers: Send extra headers 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 fdabfe5..cb662bc 100644 --- a/src/oz_agent_sdk/types/agent/run_list_params.py +++ b/src/oz_agent_sdk/types/agent/run_list_params.py @@ -15,7 +15,7 @@ class RunListParams(TypedDict, total=False): artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"] - """Filter runs by artifact type""" + """Filter runs by artifact type (PLAN or PULL_REQUEST)""" created_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """Filter runs created after this timestamp (RFC3339 format)""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index b667e62..67667c8 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -25,19 +25,6 @@ class AmbientAgentConfig(BaseModel): environment_id: Optional[str] = None """UID of the environment to run the agent in""" - harness: Optional[str] = None - """ - Agent harness to use for the agent run. Default (empty) uses Warp's built-in Oz - harness. - """ - - idle_timeout_minutes: Optional[int] = None - """ - Number of minutes to keep the agent environment alive after task completion. If - not set, defaults to 10 minutes. Maximum allowed value is min(60, - floor(max_instance_runtime_seconds / 60) for your billing tier). - """ - mcp_servers: Optional[Dict[str, McpServerConfig]] = None """Map of MCP server configurations by name""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 4f04d52..1cd17fe 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -25,19 +25,6 @@ class AmbientAgentConfigParam(TypedDict, total=False): environment_id: str """UID of the environment to run the agent in""" - harness: str - """ - Agent harness to use for the agent run. Default (empty) uses Warp's built-in Oz - harness. - """ - - idle_timeout_minutes: int - """ - Number of minutes to keep the agent environment alive after task completion. If - not set, defaults to 10 minutes. Maximum allowed value is min(60, - floor(max_instance_runtime_seconds / 60) for your billing tier). - """ - mcp_servers: Dict[str, McpServerConfigParam] """Map of MCP server configurations by name""" diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 1a1eceb..e8f8a24 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -40,8 +40,6 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", - "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -156,8 +154,6 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", - "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -399,8 +395,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", - "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -515,8 +509,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", - "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index df58cfd..00acc5b 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -123,8 +123,6 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", - "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -279,8 +277,6 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", - "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], From 2f7198972cec56e72b802c7505fb445d10304bf4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 07:26:24 +0000 Subject: [PATCH 07/34] feat: Endpoint to upload third-party harness block snapshots --- .stats.yml | 4 ++-- src/oz_agent_sdk/resources/agent/runs.py | 4 ++-- src/oz_agent_sdk/resources/agent/schedules.py | 10 ++++------ src/oz_agent_sdk/types/agent/run_list_params.py | 2 +- src/oz_agent_sdk/types/ambient_agent_config.py | 13 +++++++++++++ .../types/ambient_agent_config_param.py | 13 +++++++++++++ tests/api_resources/agent/test_schedules.py | 8 ++++++++ tests/api_resources/test_agent.py | 4 ++++ 8 files changed, 47 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3ce9b21..49a748f 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-c098713ad7d0db50c26687968fc23fbb61b919a674a9f26bb3375af48ea816f1.yml -openapi_spec_hash: 633a8a510fd3d0eb0c17c61522de6003 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-a931490557d2c27bcec6b9d7cb0502913f6a3969a5907c810a3c2073ca2ca9e0.yml +openapi_spec_hash: 632bc51224846da7edc3996983d35ff3 config_hash: e894152aaebba5a2e65e27efaf2712e2 diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index 440bdcf..ed8fff1 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -118,7 +118,7 @@ def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST) + artifact_type: Filter runs by artifact type created_after: Filter runs created after this timestamp (RFC3339 format) @@ -333,7 +333,7 @@ async def list( to `sort_by=updated_at` and `sort_order=desc`. Args: - artifact_type: Filter runs by artifact type (PLAN or PULL_REQUEST) + artifact_type: Filter runs by artifact type created_after: Filter runs created after this timestamp (RFC3339 format) diff --git a/src/oz_agent_sdk/resources/agent/schedules.py b/src/oz_agent_sdk/resources/agent/schedules.py index a4b5592..f9fbac0 100644 --- a/src/oz_agent_sdk/resources/agent/schedules.py +++ b/src/oz_agent_sdk/resources/agent/schedules.py @@ -275,8 +275,7 @@ def pause( ) -> ScheduledAgentItem: """Pause a scheduled agent. - The agent will not run until resumed. This sets the - enabled flag to false. + The agent will not run until resumed. Args: extra_headers: Send extra headers @@ -311,7 +310,7 @@ def resume( """Resume a paused scheduled agent. The agent will start running according to its - cron schedule. This sets the enabled flag to true. + cron schedule. Args: extra_headers: Send extra headers @@ -584,8 +583,7 @@ async def pause( ) -> ScheduledAgentItem: """Pause a scheduled agent. - The agent will not run until resumed. This sets the - enabled flag to false. + The agent will not run until resumed. Args: extra_headers: Send extra headers @@ -620,7 +618,7 @@ async def resume( """Resume a paused scheduled agent. The agent will start running according to its - cron schedule. This sets the enabled flag to true. + cron schedule. Args: extra_headers: Send extra headers 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 cb662bc..fdabfe5 100644 --- a/src/oz_agent_sdk/types/agent/run_list_params.py +++ b/src/oz_agent_sdk/types/agent/run_list_params.py @@ -15,7 +15,7 @@ class RunListParams(TypedDict, total=False): artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"] - """Filter runs by artifact type (PLAN or PULL_REQUEST)""" + """Filter runs by artifact type""" created_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """Filter runs created after this timestamp (RFC3339 format)""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 67667c8..b667e62 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -25,6 +25,19 @@ class AmbientAgentConfig(BaseModel): environment_id: Optional[str] = None """UID of the environment to run the agent in""" + harness: Optional[str] = None + """ + Agent harness to use for the agent run. Default (empty) uses Warp's built-in Oz + harness. + """ + + idle_timeout_minutes: Optional[int] = None + """ + Number of minutes to keep the agent environment alive after task completion. If + not set, defaults to 10 minutes. Maximum allowed value is min(60, + floor(max_instance_runtime_seconds / 60) for your billing tier). + """ + mcp_servers: Optional[Dict[str, McpServerConfig]] = None """Map of MCP server configurations by name""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 1cd17fe..4f04d52 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -25,6 +25,19 @@ class AmbientAgentConfigParam(TypedDict, total=False): environment_id: str """UID of the environment to run the agent in""" + harness: str + """ + Agent harness to use for the agent run. Default (empty) uses Warp's built-in Oz + harness. + """ + + idle_timeout_minutes: int + """ + Number of minutes to keep the agent environment alive after task completion. If + not set, defaults to 10 minutes. Maximum allowed value is min(60, + floor(max_instance_runtime_seconds / 60) for your billing tier). + """ + mcp_servers: Dict[str, McpServerConfigParam] """Map of MCP server configurations by name""" diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index e8f8a24..1a1eceb 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -40,6 +40,8 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -154,6 +156,8 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -395,6 +399,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -509,6 +515,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index 00acc5b..df58cfd 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -123,6 +123,8 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], @@ -277,6 +279,8 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", + "harness": "harness", + "idle_timeout_minutes": 1, "mcp_servers": { "foo": { "args": ["string"], From 3ab37f7a5320bff7db77d01b5c27cc71d000d491 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 08:40:48 +0000 Subject: [PATCH 08/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 49a748f..1ef56fe 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-a931490557d2c27bcec6b9d7cb0502913f6a3969a5907c810a3c2073ca2ca9e0.yml -openapi_spec_hash: 632bc51224846da7edc3996983d35ff3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-b583752b4c74da605c23e9c6dc2a2b83eb3ea64404bf230b72f5612764b74502.yml +openapi_spec_hash: 96e215f56c3d1318b858df8105680bbf config_hash: e894152aaebba5a2e65e27efaf2712e2 From 99808a57cecd335ef4ae90c8edaac4ff333ebd9e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 12:58:12 +0000 Subject: [PATCH 09/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1ef56fe..49a748f 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-b583752b4c74da605c23e9c6dc2a2b83eb3ea64404bf230b72f5612764b74502.yml -openapi_spec_hash: 96e215f56c3d1318b858df8105680bbf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-a931490557d2c27bcec6b9d7cb0502913f6a3969a5907c810a3c2073ca2ca9e0.yml +openapi_spec_hash: 632bc51224846da7edc3996983d35ff3 config_hash: e894152aaebba5a2e65e27efaf2712e2 From 58d59e3593d27ad4bb17e340c384d9709f650806 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 14:27:07 +0000 Subject: [PATCH 10/34] feat: Address Stainless diagnostics --- .stats.yml | 6 +- README.md | 63 ++++++++++++++ api.md | 7 +- src/oz_agent_sdk/_base_client.py | 34 ++++++-- src/oz_agent_sdk/_client.py | 19 ++++- src/oz_agent_sdk/_models.py | 6 ++ src/oz_agent_sdk/_types.py | 3 +- src/oz_agent_sdk/pagination.py | 85 +++++++++++++++++++ src/oz_agent_sdk/resources/agent/agent.py | 16 ++-- src/oz_agent_sdk/resources/agent/runs.py | 24 +++--- src/oz_agent_sdk/types/__init__.py | 2 + src/oz_agent_sdk/types/agent/__init__.py | 1 - .../types/agent/run_list_response.py | 22 ----- src/oz_agent_sdk/types/aws_provider_config.py | 12 +++ .../types/cloud_environment_config.py | 28 ++---- src/oz_agent_sdk/types/gcp_provider_config.py | 18 ++++ tests/api_resources/agent/test_runs.py | 19 +++-- tests/api_resources/test_agent.py | 4 +- tests/test_client.py | 20 ++--- 19 files changed, 286 insertions(+), 103 deletions(-) create mode 100644 src/oz_agent_sdk/pagination.py delete mode 100644 src/oz_agent_sdk/types/agent/run_list_response.py create mode 100644 src/oz_agent_sdk/types/aws_provider_config.py create mode 100644 src/oz_agent_sdk/types/gcp_provider_config.py diff --git a/.stats.yml b/.stats.yml index 49a748f..a8fba9e 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-a931490557d2c27bcec6b9d7cb0502913f6a3969a5907c810a3c2073ca2ca9e0.yml -openapi_spec_hash: 632bc51224846da7edc3996983d35ff3 -config_hash: e894152aaebba5a2e65e27efaf2712e2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-d9e0c6bea8d4c2414ec2bcd18c2e748b43110079c81906aa6c79b350b408f96b.yml +openapi_spec_hash: 598927b816525740620b414c6d147184 +config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/README.md b/README.md index 9ea4d38..9aba4a6 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,69 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`. +## Pagination + +List methods in the Oz API API are paginated. + +This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually: + +```python +from oz_agent_sdk import OzAPI + +client = OzAPI() + +all_runs = [] +# Automatically fetches more pages as needed. +for run in client.agent.runs.list(): + # Do something with run here + all_runs.append(run) +print(all_runs) +``` + +Or, asynchronously: + +```python +import asyncio +from oz_agent_sdk import AsyncOzAPI + +client = AsyncOzAPI() + + +async def main() -> None: + all_runs = [] + # Iterate through items across all pages, issuing requests as needed. + async for run in client.agent.runs.list(): + all_runs.append(run) + print(all_runs) + + +asyncio.run(main()) +``` + +Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages: + +```python +first_page = await client.agent.runs.list() +if first_page.has_next_page(): + print(f"will fetch next page using these details: {first_page.next_page_info()}") + next_page = await first_page.get_next_page() + print(f"number of items we just fetched: {len(next_page.runs)}") + +# Remove `await` for non-async usage. +``` + +Or just work directly with the returned data: + +```python +first_page = await client.agent.runs.list() + +print(f"next page cursor: {first_page.page_info.next_cursor}") # => "next page cursor: ..." +for run in first_page.runs: + print(run.run_id) + +# Remove `await` for non-async usage. +``` + ## Nested params Nested parameters are dictionaries, typed using `TypedDict`, for example: diff --git a/api.md b/api.md index 19e78a3..3ef6227 100644 --- a/api.md +++ b/api.md @@ -6,9 +6,11 @@ Types: from oz_agent_sdk.types import ( AgentSkill, AmbientAgentConfig, + AwsProviderConfig, CloudEnvironmentConfig, Error, ErrorCode, + GcpProviderConfig, McpServerConfig, Scope, UserProfile, @@ -22,7 +24,7 @@ Methods: - client.agent.list(\*\*params) -> AgentListResponse - client.agent.get_artifact(artifact_uid) -> AgentGetArtifactResponse -- client.agent.run(\*\*params) -> AgentRunResponse +- client.agent.run(\*\*params) -> AgentRunResponse ## Runs @@ -34,7 +36,6 @@ from oz_agent_sdk.types.agent import ( RunItem, RunSourceType, RunState, - RunListResponse, RunCancelResponse, ) ``` @@ -42,7 +43,7 @@ from oz_agent_sdk.types.agent import ( Methods: - client.agent.runs.retrieve(run_id) -> RunItem -- client.agent.runs.list(\*\*params) -> RunListResponse +- client.agent.runs.list(\*\*params) -> SyncRunsCursorPage[RunItem] - client.agent.runs.cancel(run_id) -> str ## Schedules diff --git a/src/oz_agent_sdk/_base_client.py b/src/oz_agent_sdk/_base_client.py index d1510d4..fc8cfaf 100644 --- a/src/oz_agent_sdk/_base_client.py +++ b/src/oz_agent_sdk/_base_client.py @@ -63,7 +63,7 @@ ) from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping from ._compat import PYDANTIC_V1, model_copy, model_dump -from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type +from ._models import GenericModel, SecurityOptions, FinalRequestOptions, validate_type, construct_type from ._response import ( APIResponse, BaseAPIResponse, @@ -432,9 +432,27 @@ def _make_status_error( ) -> _exceptions.APIStatusError: raise NotImplementedError() + def _auth_headers( + self, + security: SecurityOptions, # noqa: ARG002 + ) -> dict[str, str]: + return {} + + def _auth_query( + self, + security: SecurityOptions, # noqa: ARG002 + ) -> dict[str, str]: + return {} + + def _custom_auth( + self, + security: SecurityOptions, # noqa: ARG002 + ) -> httpx.Auth | None: + return None + def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0) -> httpx.Headers: custom_headers = options.headers or {} - headers_dict = _merge_mappings(self.default_headers, custom_headers) + headers_dict = _merge_mappings({**self._auth_headers(options.security), **self.default_headers}, custom_headers) self._validate_headers(headers_dict, custom_headers) # headers are case-insensitive while dictionaries are not. @@ -506,7 +524,7 @@ def _build_request( raise RuntimeError(f"Unexpected JSON data type, {type(json_data)}, cannot merge with `extra_body`") headers = self._build_headers(options, retries_taken=retries_taken) - params = _merge_mappings(self.default_query, options.params) + params = _merge_mappings({**self._auth_query(options.security), **self.default_query}, options.params) content_type = headers.get("Content-Type") files = options.files @@ -671,7 +689,6 @@ def default_headers(self) -> dict[str, str | Omit]: "Content-Type": "application/json", "User-Agent": self.user_agent, **self.platform_headers(), - **self.auth_headers, **self._custom_headers, } @@ -990,8 +1007,9 @@ def request( self._prepare_request(request) kwargs: HttpxSendArgs = {} - if self.custom_auth is not None: - kwargs["auth"] = self.custom_auth + custom_auth = self._custom_auth(options.security) + if custom_auth is not None: + kwargs["auth"] = custom_auth if options.follow_redirects is not None: kwargs["follow_redirects"] = options.follow_redirects @@ -1952,6 +1970,7 @@ def make_request_options( idempotency_key: str | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, post_parser: PostParser | NotGiven = not_given, + security: SecurityOptions | None = None, ) -> RequestOptions: """Create a dict of type RequestOptions without keys of NotGiven values.""" options: RequestOptions = {} @@ -1977,6 +1996,9 @@ def make_request_options( # internal options["post_parser"] = post_parser # type: ignore + if security is not None: + options["security"] = security + return options diff --git a/src/oz_agent_sdk/_client.py b/src/oz_agent_sdk/_client.py index 27973c0..81603d2 100644 --- a/src/oz_agent_sdk/_client.py +++ b/src/oz_agent_sdk/_client.py @@ -21,6 +21,7 @@ ) from ._utils import is_given, get_async_library from ._compat import cached_property +from ._models import SecurityOptions from ._version import __version__ from ._streaming import Stream as Stream, AsyncStream as AsyncStream from ._exceptions import OzAPIError, APIStatusError @@ -112,9 +113,14 @@ def with_streaming_response(self) -> OzAPIWithStreamedResponse: def qs(self) -> Querystring: return Querystring(array_format="repeat") - @property @override - def auth_headers(self) -> dict[str, str]: + def _auth_headers(self, security: SecurityOptions) -> dict[str, str]: + return { + **(self._bearer_auth if security.get("bearer_auth", False) else {}), + } + + @property + def _bearer_auth(self) -> dict[str, str]: api_key = self.api_key return {"Authorization": f"Bearer {api_key}"} @@ -287,9 +293,14 @@ def with_streaming_response(self) -> AsyncOzAPIWithStreamedResponse: def qs(self) -> Querystring: return Querystring(array_format="repeat") - @property @override - def auth_headers(self) -> dict[str, str]: + def _auth_headers(self, security: SecurityOptions) -> dict[str, str]: + return { + **(self._bearer_auth if security.get("bearer_auth", False) else {}), + } + + @property + def _bearer_auth(self) -> dict[str, str]: api_key = self.api_key return {"Authorization": f"Bearer {api_key}"} diff --git a/src/oz_agent_sdk/_models.py b/src/oz_agent_sdk/_models.py index 29070e0..e22dd2a 100644 --- a/src/oz_agent_sdk/_models.py +++ b/src/oz_agent_sdk/_models.py @@ -791,6 +791,10 @@ def _create_pydantic_model(type_: _T) -> Type[RootModel[_T]]: return RootModel[type_] # type: ignore +class SecurityOptions(TypedDict, total=False): + bearer_auth: bool + + class FinalRequestOptionsInput(TypedDict, total=False): method: Required[str] url: Required[str] @@ -804,6 +808,7 @@ class FinalRequestOptionsInput(TypedDict, total=False): json_data: Body extra_json: AnyMapping follow_redirects: bool + security: SecurityOptions @final @@ -818,6 +823,7 @@ class FinalRequestOptions(pydantic.BaseModel): idempotency_key: Union[str, None] = None post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven() follow_redirects: Union[bool, None] = None + security: SecurityOptions = {"bearer_auth": True} content: Union[bytes, bytearray, IO[bytes], Iterable[bytes], AsyncIterable[bytes], None] = None # It should be noted that we cannot use `json` here as that would override diff --git a/src/oz_agent_sdk/_types.py b/src/oz_agent_sdk/_types.py index eac5f8b..cbb7d7e 100644 --- a/src/oz_agent_sdk/_types.py +++ b/src/oz_agent_sdk/_types.py @@ -36,7 +36,7 @@ from httpx import URL, Proxy, Timeout, Response, BaseTransport, AsyncBaseTransport if TYPE_CHECKING: - from ._models import BaseModel + from ._models import BaseModel, SecurityOptions from ._response import APIResponse, AsyncAPIResponse Transport = BaseTransport @@ -121,6 +121,7 @@ class RequestOptions(TypedDict, total=False): extra_json: AnyMapping idempotency_key: str follow_redirects: bool + security: SecurityOptions # Sentinel class used until PEP 0661 is accepted diff --git a/src/oz_agent_sdk/pagination.py b/src/oz_agent_sdk/pagination.py new file mode 100644 index 0000000..3f925ea --- /dev/null +++ b/src/oz_agent_sdk/pagination.py @@ -0,0 +1,85 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Generic, TypeVar, Optional +from typing_extensions import override + +from ._models import BaseModel +from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage + +__all__ = ["RunsCursorPagePageInfo", "SyncRunsCursorPage", "AsyncRunsCursorPage"] + +_T = TypeVar("_T") + + +class RunsCursorPagePageInfo(BaseModel): + has_next_page: Optional[bool] = None + + next_cursor: Optional[str] = None + + +class SyncRunsCursorPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): + runs: List[_T] + page_info: Optional[RunsCursorPagePageInfo] = None + + @override + def _get_page_items(self) -> List[_T]: + runs = self.runs + if not runs: + return [] + return runs + + @override + def has_next_page(self) -> bool: + has_next_page = None + if self.page_info is not None: + if self.page_info.has_next_page is not None: + has_next_page = self.page_info.has_next_page + if has_next_page is not None and has_next_page is False: + return False + + return super().has_next_page() + + @override + def next_page_info(self) -> Optional[PageInfo]: + next_cursor = None + if self.page_info is not None: + if self.page_info.next_cursor is not None: + next_cursor = self.page_info.next_cursor + if not next_cursor: + return None + + return PageInfo(params={"cursor": next_cursor}) + + +class AsyncRunsCursorPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): + runs: List[_T] + page_info: Optional[RunsCursorPagePageInfo] = None + + @override + def _get_page_items(self) -> List[_T]: + runs = self.runs + if not runs: + return [] + return runs + + @override + def has_next_page(self) -> bool: + has_next_page = None + if self.page_info is not None: + if self.page_info.has_next_page is not None: + has_next_page = self.page_info.has_next_page + if has_next_page is not None and has_next_page is False: + return False + + return super().has_next_page() + + @override + def next_page_info(self) -> Optional[PageInfo]: + next_cursor = None + if self.page_info is not None: + if self.page_info.next_cursor is not None: + next_cursor = self.page_info.next_cursor + if not next_cursor: + return None + + return PageInfo(params={"cursor": next_cursor}) diff --git a/src/oz_agent_sdk/resources/agent/agent.py b/src/oz_agent_sdk/resources/agent/agent.py index 4adaca9..c70be37 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -203,10 +203,10 @@ def run( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentRunResponse: - """Spawn a cloud agent with a prompt and optional configuration. + """Alias for POST /agent/run. - The agent will be - queued for execution and assigned a unique run ID. + This is the preferred endpoint for creating new agent + runs. Behavior is identical to POST /agent/run. Args: attachments: Optional file attachments to include with the prompt (max 5). Attachments are @@ -244,7 +244,7 @@ def run( timeout: Override the client-level default timeout for this request, in seconds """ return self._post( - "/agent/run", + "/agent/runs", body=maybe_transform( { "attachments": attachments, @@ -417,10 +417,10 @@ async def run( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AgentRunResponse: - """Spawn a cloud agent with a prompt and optional configuration. + """Alias for POST /agent/run. - The agent will be - queued for execution and assigned a unique run ID. + This is the preferred endpoint for creating new agent + runs. Behavior is identical to POST /agent/run. Args: attachments: Optional file attachments to include with the prompt (max 5). Attachments are @@ -458,7 +458,7 @@ async def run( timeout: Override the client-level default timeout for this request, in seconds """ return await self._post( - "/agent/run", + "/agent/runs", body=await async_maybe_transform( { "attachments": attachments, diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index ed8fff1..ec79044 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -9,7 +9,7 @@ import httpx from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import path_template, maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -18,12 +18,12 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) +from ...pagination import SyncRunsCursorPage, AsyncRunsCursorPage from ...types.agent import RunSourceType, run_list_params -from ..._base_client import make_request_options +from ..._base_client import AsyncPaginator, make_request_options from ...types.agent.run_item import RunItem from ...types.agent.run_state import RunState from ...types.agent.run_source_type import RunSourceType -from ...types.agent.run_list_response import RunListResponse __all__ = ["RunsResource", "AsyncRunsResource"] @@ -111,7 +111,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> RunListResponse: + ) -> SyncRunsCursorPage[RunItem]: """Retrieve a paginated list of agent runs with optional filtering. Results default @@ -169,8 +169,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/agent/runs", + page=SyncRunsCursorPage[RunItem], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -200,7 +201,7 @@ def list( run_list_params.RunListParams, ), ), - cast_to=RunListResponse, + model=RunItem, ) def cancel( @@ -299,7 +300,7 @@ async def retrieve( cast_to=RunItem, ) - async def list( + def list( self, *, artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"] | Omit = omit, @@ -326,7 +327,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> RunListResponse: + ) -> AsyncPaginator[RunItem, AsyncRunsCursorPage[RunItem]]: """Retrieve a paginated list of agent runs with optional filtering. Results default @@ -384,14 +385,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/agent/runs", + page=AsyncRunsCursorPage[RunItem], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "artifact_type": artifact_type, "created_after": created_after, @@ -415,7 +417,7 @@ async def list( run_list_params.RunListParams, ), ), - cast_to=RunListResponse, + model=RunItem, ) async def cancel( diff --git a/src/oz_agent_sdk/types/__init__.py b/src/oz_agent_sdk/types/__init__.py index f4d2daa..4c520a7 100644 --- a/src/oz_agent_sdk/types/__init__.py +++ b/src/oz_agent_sdk/types/__init__.py @@ -11,6 +11,8 @@ from .mcp_server_config import McpServerConfig as McpServerConfig from .agent_run_response import AgentRunResponse as AgentRunResponse from .agent_list_response import AgentListResponse as AgentListResponse +from .aws_provider_config import AwsProviderConfig as AwsProviderConfig +from .gcp_provider_config import GcpProviderConfig as GcpProviderConfig from .ambient_agent_config import AmbientAgentConfig as AmbientAgentConfig from .mcp_server_config_param import McpServerConfigParam as McpServerConfigParam from .cloud_environment_config import CloudEnvironmentConfig as CloudEnvironmentConfig diff --git a/src/oz_agent_sdk/types/agent/__init__.py b/src/oz_agent_sdk/types/agent/__init__.py index 3484850..1176974 100644 --- a/src/oz_agent_sdk/types/agent/__init__.py +++ b/src/oz_agent_sdk/types/agent/__init__.py @@ -7,7 +7,6 @@ from .artifact_item import ArtifactItem as ArtifactItem from .run_list_params import RunListParams as RunListParams from .run_source_type import RunSourceType as RunSourceType -from .run_list_response import RunListResponse as RunListResponse from .run_cancel_response import RunCancelResponse as RunCancelResponse from .scheduled_agent_item import ScheduledAgentItem as ScheduledAgentItem from .schedule_create_params import ScheduleCreateParams as ScheduleCreateParams diff --git a/src/oz_agent_sdk/types/agent/run_list_response.py b/src/oz_agent_sdk/types/agent/run_list_response.py deleted file mode 100644 index db1beb9..0000000 --- a/src/oz_agent_sdk/types/agent/run_list_response.py +++ /dev/null @@ -1,22 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from .run_item import RunItem -from ..._models import BaseModel - -__all__ = ["RunListResponse", "PageInfo"] - - -class PageInfo(BaseModel): - has_next_page: bool - """Whether there are more results available""" - - next_cursor: Optional[str] = None - """Opaque cursor for fetching the next page""" - - -class RunListResponse(BaseModel): - page_info: PageInfo - - runs: List[RunItem] diff --git a/src/oz_agent_sdk/types/aws_provider_config.py b/src/oz_agent_sdk/types/aws_provider_config.py new file mode 100644 index 0000000..61020d8 --- /dev/null +++ b/src/oz_agent_sdk/types/aws_provider_config.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .._models import BaseModel + +__all__ = ["AwsProviderConfig"] + + +class AwsProviderConfig(BaseModel): + """AWS IAM role assumption settings""" + + role_arn: str + """AWS IAM role ARN to assume""" diff --git a/src/oz_agent_sdk/types/cloud_environment_config.py b/src/oz_agent_sdk/types/cloud_environment_config.py index 30ecd79..15ef158 100644 --- a/src/oz_agent_sdk/types/cloud_environment_config.py +++ b/src/oz_agent_sdk/types/cloud_environment_config.py @@ -3,8 +3,10 @@ from typing import List, Optional from .._models import BaseModel +from .aws_provider_config import AwsProviderConfig +from .gcp_provider_config import GcpProviderConfig -__all__ = ["CloudEnvironmentConfig", "GitHubRepo", "Providers", "ProvidersAws", "ProvidersGcp"] +__all__ = ["CloudEnvironmentConfig", "GitHubRepo", "Providers"] class GitHubRepo(BaseModel): @@ -15,33 +17,13 @@ class GitHubRepo(BaseModel): """GitHub repository name""" -class ProvidersAws(BaseModel): - """AWS IAM role assumption settings""" - - role_arn: str - """AWS IAM role ARN to assume""" - - -class ProvidersGcp(BaseModel): - """GCP Workload Identity Federation settings""" - - project_number: str - """GCP project number""" - - workload_identity_federation_pool_id: str - """Workload Identity Federation pool ID""" - - workload_identity_federation_provider_id: str - """Workload Identity Federation provider ID""" - - class Providers(BaseModel): """Optional cloud provider configurations for automatic auth""" - aws: Optional[ProvidersAws] = None + aws: Optional[AwsProviderConfig] = None """AWS IAM role assumption settings""" - gcp: Optional[ProvidersGcp] = None + gcp: Optional[GcpProviderConfig] = None """GCP Workload Identity Federation settings""" diff --git a/src/oz_agent_sdk/types/gcp_provider_config.py b/src/oz_agent_sdk/types/gcp_provider_config.py new file mode 100644 index 0000000..168ab6a --- /dev/null +++ b/src/oz_agent_sdk/types/gcp_provider_config.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .._models import BaseModel + +__all__ = ["GcpProviderConfig"] + + +class GcpProviderConfig(BaseModel): + """GCP Workload Identity Federation settings""" + + project_number: str + """GCP project number""" + + workload_identity_federation_pool_id: str + """Workload Identity Federation pool ID""" + + workload_identity_federation_provider_id: str + """Workload Identity Federation provider ID""" diff --git a/tests/api_resources/agent/test_runs.py b/tests/api_resources/agent/test_runs.py index 480564c..1d98ab6 100644 --- a/tests/api_resources/agent/test_runs.py +++ b/tests/api_resources/agent/test_runs.py @@ -10,7 +10,8 @@ from tests.utils import assert_matches_type from oz_agent_sdk import OzAPI, AsyncOzAPI from oz_agent_sdk._utils import parse_datetime -from oz_agent_sdk.types.agent import RunItem, RunListResponse +from oz_agent_sdk.pagination import SyncRunsCursorPage, AsyncRunsCursorPage +from oz_agent_sdk.types.agent import RunItem base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -64,7 +65,7 @@ def test_path_params_retrieve(self, client: OzAPI) -> None: @parametrize def test_method_list(self, client: OzAPI) -> None: run = client.agent.runs.list() - assert_matches_type(RunListResponse, run, path=["response"]) + assert_matches_type(SyncRunsCursorPage[RunItem], run, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -89,7 +90,7 @@ def test_method_list_with_all_params(self, client: OzAPI) -> None: state=["QUEUED"], updated_after=parse_datetime("2019-12-27T18:11:19.117Z"), ) - assert_matches_type(RunListResponse, run, path=["response"]) + assert_matches_type(SyncRunsCursorPage[RunItem], run, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -99,7 +100,7 @@ def test_raw_response_list(self, client: OzAPI) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" run = response.parse() - assert_matches_type(RunListResponse, run, path=["response"]) + assert_matches_type(SyncRunsCursorPage[RunItem], run, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -109,7 +110,7 @@ def test_streaming_response_list(self, client: OzAPI) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" run = response.parse() - assert_matches_type(RunListResponse, run, path=["response"]) + assert_matches_type(SyncRunsCursorPage[RunItem], run, path=["response"]) assert cast(Any, response.is_closed) is True @@ -207,7 +208,7 @@ async def test_path_params_retrieve(self, async_client: AsyncOzAPI) -> None: @parametrize async def test_method_list(self, async_client: AsyncOzAPI) -> None: run = await async_client.agent.runs.list() - assert_matches_type(RunListResponse, run, path=["response"]) + assert_matches_type(AsyncRunsCursorPage[RunItem], run, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -232,7 +233,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOzAPI) -> No state=["QUEUED"], updated_after=parse_datetime("2019-12-27T18:11:19.117Z"), ) - assert_matches_type(RunListResponse, run, path=["response"]) + assert_matches_type(AsyncRunsCursorPage[RunItem], run, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -242,7 +243,7 @@ async def test_raw_response_list(self, async_client: AsyncOzAPI) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" run = await response.parse() - assert_matches_type(RunListResponse, run, path=["response"]) + assert_matches_type(AsyncRunsCursorPage[RunItem], run, path=["response"]) @pytest.mark.skip(reason="Mock server tests are disabled") @parametrize @@ -252,7 +253,7 @@ async def test_streaming_response_list(self, async_client: AsyncOzAPI) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" run = await response.parse() - assert_matches_type(RunListResponse, run, path=["response"]) + assert_matches_type(AsyncRunsCursorPage[RunItem], run, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index df58cfd..82f097a 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -142,7 +142,7 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: }, conversation_id="conversation_id", interactive=True, - prompt="Fix the bug in auth.go", + prompt="prompt", skill="skill", team=True, title="title", @@ -298,7 +298,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non }, conversation_id="conversation_id", interactive=True, - prompt="Fix the bug in auth.go", + prompt="prompt", skill="skill", team=True, title="title", diff --git a/tests/test_client.py b/tests/test_client.py index 46b6ed3..9b58870 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -849,7 +849,7 @@ def test_parse_retry_after_header( @mock.patch("oz_agent_sdk._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, client: OzAPI) -> None: - respx_mock.post("/agent/run").mock(side_effect=httpx.TimeoutException("Test timeout error")) + respx_mock.post("/agent/runs").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): client.agent.with_streaming_response.run().__enter__() @@ -859,7 +859,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, clien @mock.patch("oz_agent_sdk._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client: OzAPI) -> None: - respx_mock.post("/agent/run").mock(return_value=httpx.Response(500)) + respx_mock.post("/agent/runs").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): client.agent.with_streaming_response.run().__enter__() @@ -889,7 +889,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/agent/run").mock(side_effect=retry_handler) + respx_mock.post("/agent/runs").mock(side_effect=retry_handler) response = client.agent.with_raw_response.run() @@ -911,7 +911,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/agent/run").mock(side_effect=retry_handler) + respx_mock.post("/agent/runs").mock(side_effect=retry_handler) response = client.agent.with_raw_response.run(extra_headers={"x-stainless-retry-count": Omit()}) @@ -934,7 +934,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/agent/run").mock(side_effect=retry_handler) + respx_mock.post("/agent/runs").mock(side_effect=retry_handler) response = client.agent.with_raw_response.run(extra_headers={"x-stainless-retry-count": "42"}) @@ -1751,7 +1751,7 @@ async def test_parse_retry_after_header( @mock.patch("oz_agent_sdk._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, async_client: AsyncOzAPI) -> None: - respx_mock.post("/agent/run").mock(side_effect=httpx.TimeoutException("Test timeout error")) + respx_mock.post("/agent/runs").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): await async_client.agent.with_streaming_response.run().__aenter__() @@ -1761,7 +1761,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, @mock.patch("oz_agent_sdk._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, async_client: AsyncOzAPI) -> None: - respx_mock.post("/agent/run").mock(return_value=httpx.Response(500)) + respx_mock.post("/agent/runs").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): await async_client.agent.with_streaming_response.run().__aenter__() @@ -1791,7 +1791,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/agent/run").mock(side_effect=retry_handler) + respx_mock.post("/agent/runs").mock(side_effect=retry_handler) response = await client.agent.with_raw_response.run() @@ -1815,7 +1815,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/agent/run").mock(side_effect=retry_handler) + respx_mock.post("/agent/runs").mock(side_effect=retry_handler) response = await client.agent.with_raw_response.run(extra_headers={"x-stainless-retry-count": Omit()}) @@ -1838,7 +1838,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: return httpx.Response(500) return httpx.Response(200) - respx_mock.post("/agent/run").mock(side_effect=retry_handler) + respx_mock.post("/agent/runs").mock(side_effect=retry_handler) response = await client.agent.with_raw_response.run(extra_headers={"x-stainless-retry-count": "42"}) From aac84c585eb3b0ed5262d683e544960a82eec2a2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 19:15:39 +0000 Subject: [PATCH 11/34] feat: Create run for every local conversation and add filter --- .stats.yml | 4 ++-- src/oz_agent_sdk/resources/agent/runs.py | 8 ++++++++ src/oz_agent_sdk/types/agent/run_item.py | 8 ++++++++ src/oz_agent_sdk/types/agent/run_list_params.py | 3 +++ tests/api_resources/agent/test_runs.py | 2 ++ 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a8fba9e..8be1067 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-d9e0c6bea8d4c2414ec2bcd18c2e748b43110079c81906aa6c79b350b408f96b.yml -openapi_spec_hash: 598927b816525740620b414c6d147184 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-4d864538f582c11b4adf6bb3e3825561948c9957ab31157a7619f9af6aca04c2.yml +openapi_spec_hash: 6b7198d57dc97873da35ef9c641bfe7b config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index ec79044..e13feec 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -93,6 +93,7 @@ def list( creator: str | Omit = omit, cursor: str | Omit = omit, environment_id: str | Omit = omit, + execution_location: Literal["LOCAL", "REMOTE"] | Omit = omit, limit: int | Omit = omit, model_id: str | Omit = omit, name: str | Omit = omit, @@ -130,6 +131,8 @@ def list( environment_id: Filter runs by environment ID + execution_location: Filter by where the run executed + limit: Maximum number of runs to return model_id: Filter by model ID @@ -185,6 +188,7 @@ def list( "creator": creator, "cursor": cursor, "environment_id": environment_id, + "execution_location": execution_location, "limit": limit, "model_id": model_id, "name": name, @@ -309,6 +313,7 @@ def list( creator: str | Omit = omit, cursor: str | Omit = omit, environment_id: str | Omit = omit, + execution_location: Literal["LOCAL", "REMOTE"] | Omit = omit, limit: int | Omit = omit, model_id: str | Omit = omit, name: str | Omit = omit, @@ -346,6 +351,8 @@ def list( environment_id: Filter runs by environment ID + execution_location: Filter by where the run executed + limit: Maximum number of runs to return model_id: Filter by model ID @@ -401,6 +408,7 @@ def list( "creator": creator, "cursor": cursor, "environment_id": environment_id, + "execution_location": execution_location, "limit": limit, "model_id": model_id, "name": name, diff --git a/src/oz_agent_sdk/types/agent/run_item.py b/src/oz_agent_sdk/types/agent/run_item.py index 014ab6b..0995dd7 100644 --- a/src/oz_agent_sdk/types/agent/run_item.py +++ b/src/oz_agent_sdk/types/agent/run_item.py @@ -2,6 +2,7 @@ from typing import List, Optional from datetime import datetime +from typing_extensions import Literal from ..scope import Scope from ..._models import BaseModel @@ -160,6 +161,13 @@ class RunItem(BaseModel): creator: Optional[UserProfile] = None + execution_location: Optional[Literal["LOCAL", "REMOTE"]] = None + """Where the run executed: + + - LOCAL: Executed in the user's local Oz environment + - REMOTE: Executed by a remote/cloud worker + """ + is_sandbox_running: Optional[bool] = None """Whether the sandbox environment is currently running""" 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 fdabfe5..a1dc2af 100644 --- a/src/oz_agent_sdk/types/agent/run_list_params.py +++ b/src/oz_agent_sdk/types/agent/run_list_params.py @@ -32,6 +32,9 @@ class RunListParams(TypedDict, total=False): environment_id: str """Filter runs by environment ID""" + execution_location: Literal["LOCAL", "REMOTE"] + """Filter by where the run executed""" + limit: int """Maximum number of runs to return""" diff --git a/tests/api_resources/agent/test_runs.py b/tests/api_resources/agent/test_runs.py index 1d98ab6..bf257f8 100644 --- a/tests/api_resources/agent/test_runs.py +++ b/tests/api_resources/agent/test_runs.py @@ -77,6 +77,7 @@ def test_method_list_with_all_params(self, client: OzAPI) -> None: creator="creator", cursor="cursor", environment_id="environment_id", + execution_location="LOCAL", limit=1, model_id="model_id", name="name", @@ -220,6 +221,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOzAPI) -> No creator="creator", cursor="cursor", environment_id="environment_id", + execution_location="LOCAL", limit=1, model_id="model_id", name="name", From e63c7df0e8a710b35419d52f70c384e6225a76f2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 20:15:48 +0000 Subject: [PATCH 12/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8be1067..7345065 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-4d864538f582c11b4adf6bb3e3825561948c9957ab31157a7619f9af6aca04c2.yml -openapi_spec_hash: 6b7198d57dc97873da35ef9c641bfe7b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-1b6767b852f3064c16752433a1cfd1db8ef38aa442dcb33b136e78fcc094bc51.yml +openapi_spec_hash: 1fdcb18c88b88e4d257b7748a4896b26 config_hash: 1888db8b2f33dc16874aea51a90e78f7 From 551498004c85dd4277069b0c059c17c7504bc18b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 13:08:24 +0000 Subject: [PATCH 13/34] feat: Orchestrations V2: Public API endpoints --- .stats.yml | 4 ++-- 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, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7345065..4175832 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-1b6767b852f3064c16752433a1cfd1db8ef38aa442dcb33b136e78fcc094bc51.yml -openapi_spec_hash: 1fdcb18c88b88e4d257b7748a4896b26 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-753a2c218019502904eeefce9318e46c152ddf6fe4556e232a3a5fc6931f9b80.yml +openapi_spec_hash: 8d9a460280c5943425e79300f79296c9 config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/src/oz_agent_sdk/resources/agent/agent.py b/src/oz_agent_sdk/resources/agent/agent.py index c70be37..9024ac9 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -192,6 +192,7 @@ def run( config: AmbientAgentConfigParam | Omit = omit, conversation_id: str | Omit = omit, interactive: bool | Omit = omit, + parent_run_id: str | Omit = omit, prompt: str | Omit = omit, skill: str | Omit = omit, team: bool | Omit = omit, @@ -219,6 +220,9 @@ def run( interactive: Whether the run should be interactive. If not set, defaults to false. + parent_run_id: Optional run ID of the parent that spawned this run. Used for orchestration + hierarchies. + prompt: The prompt/instruction for the agent to execute. Required unless a skill is specified via the skill field or config.skill_spec. @@ -251,6 +255,7 @@ def run( "config": config, "conversation_id": conversation_id, "interactive": interactive, + "parent_run_id": parent_run_id, "prompt": prompt, "skill": skill, "team": team, @@ -406,6 +411,7 @@ async def run( config: AmbientAgentConfigParam | Omit = omit, conversation_id: str | Omit = omit, interactive: bool | Omit = omit, + parent_run_id: str | Omit = omit, prompt: str | Omit = omit, skill: str | Omit = omit, team: bool | Omit = omit, @@ -433,6 +439,9 @@ async def run( interactive: Whether the run should be interactive. If not set, defaults to false. + parent_run_id: Optional run ID of the parent that spawned this run. Used for orchestration + hierarchies. + prompt: The prompt/instruction for the agent to execute. Required unless a skill is specified via the skill field or config.skill_spec. @@ -465,6 +474,7 @@ async def run( "config": config, "conversation_id": conversation_id, "interactive": interactive, + "parent_run_id": parent_run_id, "prompt": prompt, "skill": skill, "team": team, diff --git a/src/oz_agent_sdk/types/agent_run_params.py b/src/oz_agent_sdk/types/agent_run_params.py index 88ae9a6..2a346ed 100644 --- a/src/oz_agent_sdk/types/agent_run_params.py +++ b/src/oz_agent_sdk/types/agent_run_params.py @@ -32,6 +32,12 @@ class AgentRunParams(TypedDict, total=False): interactive: bool """Whether the run should be interactive. If not set, defaults to false.""" + parent_run_id: str + """ + Optional run ID of the parent that spawned this run. Used for orchestration + hierarchies. + """ + prompt: str """ The prompt/instruction for the agent to execute. Required unless a skill is diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index 82f097a..b8079dd 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -142,6 +142,7 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: }, conversation_id="conversation_id", interactive=True, + parent_run_id="parent_run_id", prompt="prompt", skill="skill", team=True, @@ -298,6 +299,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non }, conversation_id="conversation_id", interactive=True, + parent_run_id="parent_run_id", prompt="prompt", skill="skill", team=True, From 71d72043f6cb8d8ae6af4c01936967059936c7b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:17:40 +0000 Subject: [PATCH 14/34] feat: Fix the harness type in the openAPI spec --- .stats.yml | 4 ++-- src/oz_agent_sdk/types/ambient_agent_config.py | 18 ++++++++++++++---- .../types/ambient_agent_config_param.py | 18 ++++++++++++++---- tests/api_resources/agent/test_schedules.py | 8 ++++---- tests/api_resources/test_agent.py | 4 ++-- 5 files changed, 36 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4175832..a1b4810 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-753a2c218019502904eeefce9318e46c152ddf6fe4556e232a3a5fc6931f9b80.yml -openapi_spec_hash: 8d9a460280c5943425e79300f79296c9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml +openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index b667e62..329aa9f 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -7,7 +7,17 @@ from .._models import BaseModel from .mcp_server_config import McpServerConfig -__all__ = ["AmbientAgentConfig"] +__all__ = ["AmbientAgentConfig", "Harness"] + + +class Harness(BaseModel): + """ + Specifies which execution harness to use for the agent run. + Default (nil/empty) uses Warp's built-in Oz harness. + """ + + type: Optional[str] = None + """The harness type identifier (e.g. "claude").""" class AmbientAgentConfig(BaseModel): @@ -25,10 +35,10 @@ class AmbientAgentConfig(BaseModel): environment_id: Optional[str] = None """UID of the environment to run the agent in""" - harness: Optional[str] = None + harness: Optional[Harness] = None """ - Agent harness to use for the agent run. Default (empty) uses Warp's built-in Oz - harness. + Specifies which execution harness to use for the agent run. Default (nil/empty) + uses Warp's built-in Oz harness. """ idle_timeout_minutes: Optional[int] = None diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 4f04d52..5c04ce7 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -7,7 +7,17 @@ from .mcp_server_config_param import McpServerConfigParam -__all__ = ["AmbientAgentConfigParam"] +__all__ = ["AmbientAgentConfigParam", "Harness"] + + +class Harness(TypedDict, total=False): + """ + Specifies which execution harness to use for the agent run. + Default (nil/empty) uses Warp's built-in Oz harness. + """ + + type: str + """The harness type identifier (e.g. "claude").""" class AmbientAgentConfigParam(TypedDict, total=False): @@ -25,10 +35,10 @@ class AmbientAgentConfigParam(TypedDict, total=False): environment_id: str """UID of the environment to run the agent in""" - harness: str + harness: Harness """ - Agent harness to use for the agent run. Default (empty) uses Warp's built-in Oz - harness. + Specifies which execution harness to use for the agent run. Default (nil/empty) + uses Warp's built-in Oz harness. """ idle_timeout_minutes: int diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 1a1eceb..ede0b94 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -156,7 +156,7 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -399,7 +399,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -515,7 +515,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index b8079dd..bf4eb23 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -123,7 +123,7 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -280,7 +280,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": "harness", + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { From c8b44e532885d53f406babf8c0463f62d86a1fbe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 18:53:58 +0000 Subject: [PATCH 15/34] feat: Add harness enum to openAPI spec --- .stats.yml | 4 ++-- src/oz_agent_sdk/types/ambient_agent_config.py | 13 +++++++++---- .../types/ambient_agent_config_param.py | 14 +++++++++----- tests/api_resources/agent/test_schedules.py | 8 ++++---- tests/api_resources/test_agent.py | 4 ++-- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index a1b4810..65c00aa 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-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml -openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-7283a1794d3c59ddc27241892d1b962ee01c1bc5c0d9a456ff716c3d5e2420a7.yml +openapi_spec_hash: b8754eda5e237d0938d6b808fe33bf9b config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 329aa9f..77516f8 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Optional +from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -13,11 +14,15 @@ class Harness(BaseModel): """ Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. + Default (nil/empty) uses Warp's built-in harness. """ - type: Optional[str] = None - """The harness type identifier (e.g. "claude").""" + type: Optional[Literal["oz", "claude"]] = None + """The harness type identifier. + + - oz: Warp's built-in harness (default) + - claude: Claude Code harness + """ class AmbientAgentConfig(BaseModel): @@ -38,7 +43,7 @@ class AmbientAgentConfig(BaseModel): harness: Optional[Harness] = None """ Specifies which execution harness to use for the agent run. Default (nil/empty) - uses Warp's built-in Oz harness. + uses Warp's built-in harness. """ idle_timeout_minutes: Optional[int] = None diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 5c04ce7..963f998 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Dict -from typing_extensions import TypedDict +from typing_extensions import Literal, TypedDict from .mcp_server_config_param import McpServerConfigParam @@ -13,11 +13,15 @@ class Harness(TypedDict, total=False): """ Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. + Default (nil/empty) uses Warp's built-in harness. """ - type: str - """The harness type identifier (e.g. "claude").""" + type: Literal["oz", "claude"] + """The harness type identifier. + + - oz: Warp's built-in harness (default) + - claude: Claude Code harness + """ class AmbientAgentConfigParam(TypedDict, total=False): @@ -38,7 +42,7 @@ class AmbientAgentConfigParam(TypedDict, total=False): harness: Harness """ Specifies which execution harness to use for the agent run. Default (nil/empty) - uses Warp's built-in Oz harness. + uses Warp's built-in harness. """ idle_timeout_minutes: int diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index ede0b94..21a81ec 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -156,7 +156,7 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -399,7 +399,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -515,7 +515,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index bf4eb23..384a6d3 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -123,7 +123,7 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -280,7 +280,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { From 4b777ebbe2483c2d882597bd0ab593128f5355d9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 19:40:20 +0000 Subject: [PATCH 16/34] feat(api): api update --- .stats.yml | 4 ++-- src/oz_agent_sdk/types/ambient_agent_config.py | 13 ++++--------- .../types/ambient_agent_config_param.py | 14 +++++--------- tests/api_resources/agent/test_schedules.py | 8 ++++---- tests/api_resources/test_agent.py | 4 ++-- 5 files changed, 17 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index 65c00aa..a1b4810 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-7283a1794d3c59ddc27241892d1b962ee01c1bc5c0d9a456ff716c3d5e2420a7.yml -openapi_spec_hash: b8754eda5e237d0938d6b808fe33bf9b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml +openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 77516f8..329aa9f 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Optional -from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -14,15 +13,11 @@ class Harness(BaseModel): """ Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in harness. + Default (nil/empty) uses Warp's built-in Oz harness. """ - type: Optional[Literal["oz", "claude"]] = None - """The harness type identifier. - - - oz: Warp's built-in harness (default) - - claude: Claude Code harness - """ + type: Optional[str] = None + """The harness type identifier (e.g. "claude").""" class AmbientAgentConfig(BaseModel): @@ -43,7 +38,7 @@ class AmbientAgentConfig(BaseModel): harness: Optional[Harness] = None """ Specifies which execution harness to use for the agent run. Default (nil/empty) - uses Warp's built-in harness. + uses Warp's built-in Oz harness. """ idle_timeout_minutes: Optional[int] = None diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 963f998..5c04ce7 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Dict -from typing_extensions import Literal, TypedDict +from typing_extensions import TypedDict from .mcp_server_config_param import McpServerConfigParam @@ -13,15 +13,11 @@ class Harness(TypedDict, total=False): """ Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in harness. + Default (nil/empty) uses Warp's built-in Oz harness. """ - type: Literal["oz", "claude"] - """The harness type identifier. - - - oz: Warp's built-in harness (default) - - claude: Claude Code harness - """ + type: str + """The harness type identifier (e.g. "claude").""" class AmbientAgentConfigParam(TypedDict, total=False): @@ -42,7 +38,7 @@ class AmbientAgentConfigParam(TypedDict, total=False): harness: Harness """ Specifies which execution harness to use for the agent run. Default (nil/empty) - uses Warp's built-in harness. + uses Warp's built-in Oz harness. """ idle_timeout_minutes: int diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 21a81ec..ede0b94 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -156,7 +156,7 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -399,7 +399,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -515,7 +515,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index 384a6d3..bf4eb23 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -123,7 +123,7 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -280,7 +280,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { From 7c92cb3c3b0b2c7e83ea05e419dff44269dd9803 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 19:52:33 +0000 Subject: [PATCH 17/34] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a1b4810..d4039ac 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-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f -config_hash: 1888db8b2f33dc16874aea51a90e78f7 +config_hash: 13082483d6856f6f89d1cf72b9ddff49 From 01721aa038bec31171c1a8f9c83f985db582e234 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 20:00:03 +0000 Subject: [PATCH 18/34] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d4039ac..a1b4810 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-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f -config_hash: 13082483d6856f6f89d1cf72b9ddff49 +config_hash: 1888db8b2f33dc16874aea51a90e78f7 From d9446da97fa9fe96480cc1e3b43b4ef7f6b734a1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 20:01:10 +0000 Subject: [PATCH 19/34] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a1b4810..d4039ac 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-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f -config_hash: 1888db8b2f33dc16874aea51a90e78f7 +config_hash: 13082483d6856f6f89d1cf72b9ddff49 From cdcbe536d7bffed306adc98951f8130f11cc6f5b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 20:07:03 +0000 Subject: [PATCH 20/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d4039ac..fa1835f 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-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml -openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-c3422495021219aa0f4a858aba0b1135c6fc44794b0e259190b62c06feb70d89.yml +openapi_spec_hash: ab45c53e88857973064eebb156687504 config_hash: 13082483d6856f6f89d1cf72b9ddff49 From f90d3fb806b786167d25616f28a28154eee6618e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 21:13:57 +0000 Subject: [PATCH 21/34] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index fa1835f..a1b4810 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-c3422495021219aa0f4a858aba0b1135c6fc44794b0e259190b62c06feb70d89.yml -openapi_spec_hash: ab45c53e88857973064eebb156687504 -config_hash: 13082483d6856f6f89d1cf72b9ddff49 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml +openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f +config_hash: 1888db8b2f33dc16874aea51a90e78f7 From 658c50b6b3937249034ad9e6993e598705d0c3c6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 21:42:18 +0000 Subject: [PATCH 22/34] feat: ian/fix_conversation_id_nameing --- .stats.yml | 4 ++-- src/oz_agent_sdk/types/ambient_agent_config.py | 13 +++++++++---- .../types/ambient_agent_config_param.py | 14 +++++++++----- tests/api_resources/agent/test_schedules.py | 8 ++++---- tests/api_resources/test_agent.py | 4 ++-- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index a1b4810..381360f 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-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml -openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-4996f9ce1b1682307f4187ea91a48a1825fe3fb0f17a56a6a9ae89e4a2c54a4b.yml +openapi_spec_hash: 7d260bed93fa08ed85190d749f09f942 config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 329aa9f..77516f8 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Optional +from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -13,11 +14,15 @@ class Harness(BaseModel): """ Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. + Default (nil/empty) uses Warp's built-in harness. """ - type: Optional[str] = None - """The harness type identifier (e.g. "claude").""" + type: Optional[Literal["oz", "claude"]] = None + """The harness type identifier. + + - oz: Warp's built-in harness (default) + - claude: Claude Code harness + """ class AmbientAgentConfig(BaseModel): @@ -38,7 +43,7 @@ class AmbientAgentConfig(BaseModel): harness: Optional[Harness] = None """ Specifies which execution harness to use for the agent run. Default (nil/empty) - uses Warp's built-in Oz harness. + uses Warp's built-in harness. """ idle_timeout_minutes: Optional[int] = None diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 5c04ce7..963f998 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Dict -from typing_extensions import TypedDict +from typing_extensions import Literal, TypedDict from .mcp_server_config_param import McpServerConfigParam @@ -13,11 +13,15 @@ class Harness(TypedDict, total=False): """ Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. + Default (nil/empty) uses Warp's built-in harness. """ - type: str - """The harness type identifier (e.g. "claude").""" + type: Literal["oz", "claude"] + """The harness type identifier. + + - oz: Warp's built-in harness (default) + - claude: Claude Code harness + """ class AmbientAgentConfigParam(TypedDict, total=False): @@ -38,7 +42,7 @@ class AmbientAgentConfigParam(TypedDict, total=False): harness: Harness """ Specifies which execution harness to use for the agent run. Default (nil/empty) - uses Warp's built-in Oz harness. + uses Warp's built-in harness. """ idle_timeout_minutes: int diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index ede0b94..21a81ec 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -156,7 +156,7 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -399,7 +399,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -515,7 +515,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index bf4eb23..384a6d3 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -123,7 +123,7 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -280,7 +280,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { From 1bcaee3d178dfcd38dc11f9f22bf2327ed0261cd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 22:05:07 +0000 Subject: [PATCH 23/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 381360f..680933a 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-4996f9ce1b1682307f4187ea91a48a1825fe3fb0f17a56a6a9ae89e4a2c54a4b.yml -openapi_spec_hash: 7d260bed93fa08ed85190d749f09f942 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-8794fad94f5d124b6c46befab0b5cb47d4ec075595c8b3520fa88ffbc50b4649.yml +openapi_spec_hash: ee42f19a2f1d1053e9f97bb4f0e745d6 config_hash: 1888db8b2f33dc16874aea51a90e78f7 From 75b1c92550babef5b0cf19689613f95131df08d7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 22:48:49 +0000 Subject: [PATCH 24/34] feat(api): api update --- .stats.yml | 4 ++-- src/oz_agent_sdk/types/ambient_agent_config.py | 13 ++++--------- .../types/ambient_agent_config_param.py | 14 +++++--------- tests/api_resources/agent/test_schedules.py | 8 ++++---- tests/api_resources/test_agent.py | 4 ++-- 5 files changed, 17 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index 680933a..a1b4810 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-8794fad94f5d124b6c46befab0b5cb47d4ec075595c8b3520fa88ffbc50b4649.yml -openapi_spec_hash: ee42f19a2f1d1053e9f97bb4f0e745d6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml +openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 77516f8..329aa9f 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -1,7 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Optional -from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -14,15 +13,11 @@ class Harness(BaseModel): """ Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in harness. + Default (nil/empty) uses Warp's built-in Oz harness. """ - type: Optional[Literal["oz", "claude"]] = None - """The harness type identifier. - - - oz: Warp's built-in harness (default) - - claude: Claude Code harness - """ + type: Optional[str] = None + """The harness type identifier (e.g. "claude").""" class AmbientAgentConfig(BaseModel): @@ -43,7 +38,7 @@ class AmbientAgentConfig(BaseModel): harness: Optional[Harness] = None """ Specifies which execution harness to use for the agent run. Default (nil/empty) - uses Warp's built-in harness. + uses Warp's built-in Oz harness. """ idle_timeout_minutes: Optional[int] = None diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 963f998..5c04ce7 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Dict -from typing_extensions import Literal, TypedDict +from typing_extensions import TypedDict from .mcp_server_config_param import McpServerConfigParam @@ -13,15 +13,11 @@ class Harness(TypedDict, total=False): """ Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in harness. + Default (nil/empty) uses Warp's built-in Oz harness. """ - type: Literal["oz", "claude"] - """The harness type identifier. - - - oz: Warp's built-in harness (default) - - claude: Claude Code harness - """ + type: str + """The harness type identifier (e.g. "claude").""" class AmbientAgentConfigParam(TypedDict, total=False): @@ -42,7 +38,7 @@ class AmbientAgentConfigParam(TypedDict, total=False): harness: Harness """ Specifies which execution harness to use for the agent run. Default (nil/empty) - uses Warp's built-in harness. + uses Warp's built-in Oz harness. """ idle_timeout_minutes: int diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 21a81ec..ede0b94 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -156,7 +156,7 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -399,7 +399,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -515,7 +515,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index 384a6d3..bf4eb23 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -123,7 +123,7 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -280,7 +280,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": {"type": "type"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { From e52643fcb1408ac9f8dd6a284b9cb818f3f468ac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 17:14:20 +0000 Subject: [PATCH 25/34] feat(api): manual updates --- .stats.yml | 2 +- api.md | 5 + src/oz_agent_sdk/types/__init__.py | 2 + src/oz_agent_sdk/types/agent/__init__.py | 4 + src/oz_agent_sdk/types/agent/agent_skill.py | 26 +++++ src/oz_agent_sdk/types/agent/request_usage.py | 17 +++ src/oz_agent_sdk/types/agent/run_item.py | 103 ++---------------- .../types/agent/run_status_message.py | 56 ++++++++++ src/oz_agent_sdk/types/agent/schedule_info.py | 20 ++++ .../types/ambient_agent_config.py | 13 +-- .../types/ambient_agent_config_param.py | 15 +-- src/oz_agent_sdk/types/harness.py | 17 +++ src/oz_agent_sdk/types/harness_param.py | 17 +++ 13 files changed, 177 insertions(+), 120 deletions(-) create mode 100644 src/oz_agent_sdk/types/agent/agent_skill.py create mode 100644 src/oz_agent_sdk/types/agent/request_usage.py create mode 100644 src/oz_agent_sdk/types/agent/run_status_message.py create mode 100644 src/oz_agent_sdk/types/agent/schedule_info.py create mode 100644 src/oz_agent_sdk/types/harness.py create mode 100644 src/oz_agent_sdk/types/harness_param.py diff --git a/.stats.yml b/.stats.yml index a1b4810..c6b73c2 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-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f -config_hash: 1888db8b2f33dc16874aea51a90e78f7 +config_hash: f505a9f31ba650e10b8b4398998fa9e8 diff --git a/api.md b/api.md index 3ef6227..bce3722 100644 --- a/api.md +++ b/api.md @@ -11,6 +11,7 @@ from oz_agent_sdk.types import ( Error, ErrorCode, GcpProviderConfig, + Harness, McpServerConfig, Scope, UserProfile, @@ -32,10 +33,14 @@ Types: ```python from oz_agent_sdk.types.agent import ( + AgentSkill, ArtifactItem, + RequestUsage, RunItem, RunSourceType, RunState, + RunStatusMessage, + ScheduleInfo, RunCancelResponse, ) ``` diff --git a/src/oz_agent_sdk/types/__init__.py b/src/oz_agent_sdk/types/__init__.py index 4c520a7..0c5ea5d 100644 --- a/src/oz_agent_sdk/types/__init__.py +++ b/src/oz_agent_sdk/types/__init__.py @@ -3,9 +3,11 @@ from __future__ import annotations from .scope import Scope as Scope +from .harness import Harness as Harness from .error_code import ErrorCode as ErrorCode from .agent_skill import AgentSkill as AgentSkill from .user_profile import UserProfile as UserProfile +from .harness_param import HarnessParam as HarnessParam from .agent_run_params import AgentRunParams as AgentRunParams from .agent_list_params import AgentListParams as AgentListParams from .mcp_server_config import McpServerConfig as McpServerConfig diff --git a/src/oz_agent_sdk/types/agent/__init__.py b/src/oz_agent_sdk/types/agent/__init__.py index 1176974..5068028 100644 --- a/src/oz_agent_sdk/types/agent/__init__.py +++ b/src/oz_agent_sdk/types/agent/__init__.py @@ -4,9 +4,13 @@ from .run_item import RunItem as RunItem from .run_state import RunState as RunState +from .agent_skill import AgentSkill as AgentSkill from .artifact_item import ArtifactItem as ArtifactItem +from .request_usage import RequestUsage as RequestUsage +from .schedule_info import ScheduleInfo as ScheduleInfo from .run_list_params import RunListParams as RunListParams from .run_source_type import RunSourceType as RunSourceType +from .run_status_message import RunStatusMessage as RunStatusMessage from .run_cancel_response import RunCancelResponse as RunCancelResponse from .scheduled_agent_item import ScheduledAgentItem as ScheduledAgentItem from .schedule_create_params import ScheduleCreateParams as ScheduleCreateParams diff --git a/src/oz_agent_sdk/types/agent/agent_skill.py b/src/oz_agent_sdk/types/agent/agent_skill.py new file mode 100644 index 0000000..c446fef --- /dev/null +++ b/src/oz_agent_sdk/types/agent/agent_skill.py @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel + +__all__ = ["AgentSkill"] + + +class AgentSkill(BaseModel): + """ + Information about the agent skill used for the run. + Either full_path or bundled_skill_id will be set, but not both. + """ + + bundled_skill_id: Optional[str] = None + """Unique identifier for bundled skills""" + + description: Optional[str] = None + """Description of the skill""" + + full_path: Optional[str] = None + """Path to the SKILL.md file (for file-based skills)""" + + name: Optional[str] = None + """Human-readable name of the skill""" diff --git a/src/oz_agent_sdk/types/agent/request_usage.py b/src/oz_agent_sdk/types/agent/request_usage.py new file mode 100644 index 0000000..6780c00 --- /dev/null +++ b/src/oz_agent_sdk/types/agent/request_usage.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__ = ["RequestUsage"] + + +class RequestUsage(BaseModel): + """Resource usage information for the run""" + + compute_cost: Optional[float] = None + """Cost of compute resources for the run""" + + inference_cost: Optional[float] = None + """Cost of LLM inference for the run""" diff --git a/src/oz_agent_sdk/types/agent/run_item.py b/src/oz_agent_sdk/types/agent/run_item.py index 0995dd7..528e2c6 100644 --- a/src/oz_agent_sdk/types/agent/run_item.py +++ b/src/oz_agent_sdk/types/agent/run_item.py @@ -7,105 +7,16 @@ from ..scope import Scope from ..._models import BaseModel from .run_state import RunState -from ..error_code import ErrorCode +from .agent_skill import AgentSkill from ..user_profile import UserProfile from .artifact_item import ArtifactItem +from .request_usage import RequestUsage +from .schedule_info import ScheduleInfo from .run_source_type import RunSourceType +from .run_status_message import RunStatusMessage from ..ambient_agent_config import AmbientAgentConfig -__all__ = ["RunItem", "AgentSkill", "RequestUsage", "Schedule", "StatusMessage"] - - -class AgentSkill(BaseModel): - """ - Information about the agent skill used for the run. - Either full_path or bundled_skill_id will be set, but not both. - """ - - bundled_skill_id: Optional[str] = None - """Unique identifier for bundled skills""" - - description: Optional[str] = None - """Description of the skill""" - - full_path: Optional[str] = None - """Path to the SKILL.md file (for file-based skills)""" - - name: Optional[str] = None - """Human-readable name of the skill""" - - -class RequestUsage(BaseModel): - """Resource usage information for the run""" - - compute_cost: Optional[float] = None - """Cost of compute resources for the run""" - - inference_cost: Optional[float] = None - """Cost of LLM inference for the run""" - - -class Schedule(BaseModel): - """ - Information about the schedule that triggered this run (only present for scheduled runs) - """ - - cron_schedule: str - """Cron expression at the time the run was created""" - - schedule_id: str - """Unique identifier for the schedule""" - - schedule_name: str - """Name of the schedule at the time the run was created""" - - -class StatusMessage(BaseModel): - """Status message for a run. - - For terminal error states, includes structured - error code and retryability info from the platform error catalog. - """ - - message: str - """Human-readable status message""" - - error_code: Optional[ErrorCode] = None - """ - Machine-readable error code identifying the problem type. Used in the `type` URI - of Error responses and in the `error_code` field of RunStatusMessage. - - User errors (run transitions to FAILED): - - - `insufficient_credits` — Team has no remaining add-on credits - - `feature_not_available` — Required feature not enabled for user's plan - - `external_authentication_required` — User hasn't authorized a required - external service - - `not_authorized` — Principal lacks permission for the requested operation - - `invalid_request` — Request is malformed or contains invalid parameters - - `resource_not_found` — Referenced resource does not exist - - `budget_exceeded` — Spending budget limit has been reached - - `integration_disabled` — Integration is disabled and must be enabled - - `integration_not_configured` — Integration setup is incomplete - - `operation_not_supported` — Requested operation not supported for this - resource/state - - `environment_setup_failed` — Client-side environment setup failed - - `content_policy_violation` — Prompt or setup commands violated content policy - - `conflict` — Request conflicts with the current state of the resource - - Warp errors (run transitions to ERROR): - - - `authentication_required` — Request lacks valid authentication credentials - - `resource_unavailable` — Transient infrastructure issue (retryable) - - `internal_error` — Unexpected server-side error (retryable) - """ - - retryable: Optional[bool] = None - """Whether the error is transient and the client may retry by submitting a new run. - - Only present on terminal error states. When false, retrying without addressing - the underlying cause will not succeed. - """ +__all__ = ["RunItem"] class RunItem(BaseModel): @@ -174,7 +85,7 @@ class RunItem(BaseModel): request_usage: Optional[RequestUsage] = None """Resource usage information for the run""" - schedule: Optional[Schedule] = None + schedule: Optional[ScheduleInfo] = None """ Information about the schedule that triggered this run (only present for scheduled runs) @@ -206,7 +117,7 @@ class RunItem(BaseModel): started_at: Optional[datetime] = None """Timestamp when the agent started working on the run (RFC3339)""" - status_message: Optional[StatusMessage] = None + status_message: Optional[RunStatusMessage] = None """Status message for a run. For terminal error states, includes structured error code and retryability info diff --git a/src/oz_agent_sdk/types/agent/run_status_message.py b/src/oz_agent_sdk/types/agent/run_status_message.py new file mode 100644 index 0000000..44a5284 --- /dev/null +++ b/src/oz_agent_sdk/types/agent/run_status_message.py @@ -0,0 +1,56 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel +from ..error_code import ErrorCode + +__all__ = ["RunStatusMessage"] + + +class RunStatusMessage(BaseModel): + """Status message for a run. + + For terminal error states, includes structured + error code and retryability info from the platform error catalog. + """ + + message: str + """Human-readable status message""" + + error_code: Optional[ErrorCode] = None + """ + Machine-readable error code identifying the problem type. Used in the `type` URI + of Error responses and in the `error_code` field of RunStatusMessage. + + User errors (run transitions to FAILED): + + - `insufficient_credits` — Team has no remaining add-on credits + - `feature_not_available` — Required feature not enabled for user's plan + - `external_authentication_required` — User hasn't authorized a required + external service + - `not_authorized` — Principal lacks permission for the requested operation + - `invalid_request` — Request is malformed or contains invalid parameters + - `resource_not_found` — Referenced resource does not exist + - `budget_exceeded` — Spending budget limit has been reached + - `integration_disabled` — Integration is disabled and must be enabled + - `integration_not_configured` — Integration setup is incomplete + - `operation_not_supported` — Requested operation not supported for this + resource/state + - `environment_setup_failed` — Client-side environment setup failed + - `content_policy_violation` — Prompt or setup commands violated content policy + - `conflict` — Request conflicts with the current state of the resource + + Warp errors (run transitions to ERROR): + + - `authentication_required` — Request lacks valid authentication credentials + - `resource_unavailable` — Transient infrastructure issue (retryable) + - `internal_error` — Unexpected server-side error (retryable) + """ + + retryable: Optional[bool] = None + """Whether the error is transient and the client may retry by submitting a new run. + + Only present on terminal error states. When false, retrying without addressing + the underlying cause will not succeed. + """ diff --git a/src/oz_agent_sdk/types/agent/schedule_info.py b/src/oz_agent_sdk/types/agent/schedule_info.py new file mode 100644 index 0000000..14e6ce1 --- /dev/null +++ b/src/oz_agent_sdk/types/agent/schedule_info.py @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from ..._models import BaseModel + +__all__ = ["ScheduleInfo"] + + +class ScheduleInfo(BaseModel): + """ + Information about the schedule that triggered this run (only present for scheduled runs) + """ + + cron_schedule: str + """Cron expression at the time the run was created""" + + schedule_id: str + """Unique identifier for the schedule""" + + schedule_name: str + """Name of the schedule at the time the run was created""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 329aa9f..63deff2 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -4,20 +4,11 @@ from pydantic import Field as FieldInfo +from .harness import Harness from .._models import BaseModel from .mcp_server_config import McpServerConfig -__all__ = ["AmbientAgentConfig", "Harness"] - - -class Harness(BaseModel): - """ - Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. - """ - - type: Optional[str] = None - """The harness type identifier (e.g. "claude").""" +__all__ = ["AmbientAgentConfig"] class AmbientAgentConfig(BaseModel): diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 5c04ce7..34a0171 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -5,19 +5,10 @@ from typing import Dict from typing_extensions import TypedDict +from .harness_param import HarnessParam from .mcp_server_config_param import McpServerConfigParam -__all__ = ["AmbientAgentConfigParam", "Harness"] - - -class Harness(TypedDict, total=False): - """ - Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. - """ - - type: str - """The harness type identifier (e.g. "claude").""" +__all__ = ["AmbientAgentConfigParam"] class AmbientAgentConfigParam(TypedDict, total=False): @@ -35,7 +26,7 @@ class AmbientAgentConfigParam(TypedDict, total=False): environment_id: str """UID of the environment to run the agent in""" - harness: Harness + harness: HarnessParam """ Specifies which execution harness to use for the agent run. Default (nil/empty) uses Warp's built-in Oz harness. diff --git a/src/oz_agent_sdk/types/harness.py b/src/oz_agent_sdk/types/harness.py new file mode 100644 index 0000000..20a4217 --- /dev/null +++ b/src/oz_agent_sdk/types/harness.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__ = ["Harness"] + + +class Harness(BaseModel): + """ + Specifies which execution harness to use for the agent run. + Default (nil/empty) uses Warp's built-in Oz harness. + """ + + type: Optional[str] = None + """The harness type identifier (e.g. "claude").""" diff --git a/src/oz_agent_sdk/types/harness_param.py b/src/oz_agent_sdk/types/harness_param.py new file mode 100644 index 0000000..ef3fd9e --- /dev/null +++ b/src/oz_agent_sdk/types/harness_param.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["HarnessParam"] + + +class HarnessParam(TypedDict, total=False): + """ + Specifies which execution harness to use for the agent run. + Default (nil/empty) uses Warp's built-in Oz harness. + """ + + type: str + """The harness type identifier (e.g. "claude").""" From 12387694506b5d0d53e527db1dcdb2ca02ae2f71 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 20:24:35 +0000 Subject: [PATCH 26/34] feat(api): api update --- .stats.yml | 2 +- api.md | 5 - src/oz_agent_sdk/types/__init__.py | 2 - src/oz_agent_sdk/types/agent/__init__.py | 4 - src/oz_agent_sdk/types/agent/agent_skill.py | 26 ----- src/oz_agent_sdk/types/agent/request_usage.py | 17 --- src/oz_agent_sdk/types/agent/run_item.py | 103 ++++++++++++++++-- .../types/agent/run_status_message.py | 56 ---------- src/oz_agent_sdk/types/agent/schedule_info.py | 20 ---- .../types/ambient_agent_config.py | 13 ++- .../types/ambient_agent_config_param.py | 15 ++- src/oz_agent_sdk/types/harness.py | 17 --- src/oz_agent_sdk/types/harness_param.py | 17 --- 13 files changed, 120 insertions(+), 177 deletions(-) delete mode 100644 src/oz_agent_sdk/types/agent/agent_skill.py delete mode 100644 src/oz_agent_sdk/types/agent/request_usage.py delete mode 100644 src/oz_agent_sdk/types/agent/run_status_message.py delete mode 100644 src/oz_agent_sdk/types/agent/schedule_info.py delete mode 100644 src/oz_agent_sdk/types/harness.py delete mode 100644 src/oz_agent_sdk/types/harness_param.py diff --git a/.stats.yml b/.stats.yml index c6b73c2..a1b4810 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-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f -config_hash: f505a9f31ba650e10b8b4398998fa9e8 +config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/api.md b/api.md index bce3722..3ef6227 100644 --- a/api.md +++ b/api.md @@ -11,7 +11,6 @@ from oz_agent_sdk.types import ( Error, ErrorCode, GcpProviderConfig, - Harness, McpServerConfig, Scope, UserProfile, @@ -33,14 +32,10 @@ Types: ```python from oz_agent_sdk.types.agent import ( - AgentSkill, ArtifactItem, - RequestUsage, RunItem, RunSourceType, RunState, - RunStatusMessage, - ScheduleInfo, RunCancelResponse, ) ``` diff --git a/src/oz_agent_sdk/types/__init__.py b/src/oz_agent_sdk/types/__init__.py index 0c5ea5d..4c520a7 100644 --- a/src/oz_agent_sdk/types/__init__.py +++ b/src/oz_agent_sdk/types/__init__.py @@ -3,11 +3,9 @@ from __future__ import annotations from .scope import Scope as Scope -from .harness import Harness as Harness from .error_code import ErrorCode as ErrorCode from .agent_skill import AgentSkill as AgentSkill from .user_profile import UserProfile as UserProfile -from .harness_param import HarnessParam as HarnessParam from .agent_run_params import AgentRunParams as AgentRunParams from .agent_list_params import AgentListParams as AgentListParams from .mcp_server_config import McpServerConfig as McpServerConfig diff --git a/src/oz_agent_sdk/types/agent/__init__.py b/src/oz_agent_sdk/types/agent/__init__.py index 5068028..1176974 100644 --- a/src/oz_agent_sdk/types/agent/__init__.py +++ b/src/oz_agent_sdk/types/agent/__init__.py @@ -4,13 +4,9 @@ from .run_item import RunItem as RunItem from .run_state import RunState as RunState -from .agent_skill import AgentSkill as AgentSkill from .artifact_item import ArtifactItem as ArtifactItem -from .request_usage import RequestUsage as RequestUsage -from .schedule_info import ScheduleInfo as ScheduleInfo from .run_list_params import RunListParams as RunListParams from .run_source_type import RunSourceType as RunSourceType -from .run_status_message import RunStatusMessage as RunStatusMessage from .run_cancel_response import RunCancelResponse as RunCancelResponse from .scheduled_agent_item import ScheduledAgentItem as ScheduledAgentItem from .schedule_create_params import ScheduleCreateParams as ScheduleCreateParams diff --git a/src/oz_agent_sdk/types/agent/agent_skill.py b/src/oz_agent_sdk/types/agent/agent_skill.py deleted file mode 100644 index c446fef..0000000 --- a/src/oz_agent_sdk/types/agent/agent_skill.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["AgentSkill"] - - -class AgentSkill(BaseModel): - """ - Information about the agent skill used for the run. - Either full_path or bundled_skill_id will be set, but not both. - """ - - bundled_skill_id: Optional[str] = None - """Unique identifier for bundled skills""" - - description: Optional[str] = None - """Description of the skill""" - - full_path: Optional[str] = None - """Path to the SKILL.md file (for file-based skills)""" - - name: Optional[str] = None - """Human-readable name of the skill""" diff --git a/src/oz_agent_sdk/types/agent/request_usage.py b/src/oz_agent_sdk/types/agent/request_usage.py deleted file mode 100644 index 6780c00..0000000 --- a/src/oz_agent_sdk/types/agent/request_usage.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["RequestUsage"] - - -class RequestUsage(BaseModel): - """Resource usage information for the run""" - - compute_cost: Optional[float] = None - """Cost of compute resources for the run""" - - inference_cost: Optional[float] = None - """Cost of LLM inference for the run""" diff --git a/src/oz_agent_sdk/types/agent/run_item.py b/src/oz_agent_sdk/types/agent/run_item.py index 528e2c6..0995dd7 100644 --- a/src/oz_agent_sdk/types/agent/run_item.py +++ b/src/oz_agent_sdk/types/agent/run_item.py @@ -7,16 +7,105 @@ from ..scope import Scope from ..._models import BaseModel from .run_state import RunState -from .agent_skill import AgentSkill +from ..error_code import ErrorCode from ..user_profile import UserProfile from .artifact_item import ArtifactItem -from .request_usage import RequestUsage -from .schedule_info import ScheduleInfo from .run_source_type import RunSourceType -from .run_status_message import RunStatusMessage from ..ambient_agent_config import AmbientAgentConfig -__all__ = ["RunItem"] +__all__ = ["RunItem", "AgentSkill", "RequestUsage", "Schedule", "StatusMessage"] + + +class AgentSkill(BaseModel): + """ + Information about the agent skill used for the run. + Either full_path or bundled_skill_id will be set, but not both. + """ + + bundled_skill_id: Optional[str] = None + """Unique identifier for bundled skills""" + + description: Optional[str] = None + """Description of the skill""" + + full_path: Optional[str] = None + """Path to the SKILL.md file (for file-based skills)""" + + name: Optional[str] = None + """Human-readable name of the skill""" + + +class RequestUsage(BaseModel): + """Resource usage information for the run""" + + compute_cost: Optional[float] = None + """Cost of compute resources for the run""" + + inference_cost: Optional[float] = None + """Cost of LLM inference for the run""" + + +class Schedule(BaseModel): + """ + Information about the schedule that triggered this run (only present for scheduled runs) + """ + + cron_schedule: str + """Cron expression at the time the run was created""" + + schedule_id: str + """Unique identifier for the schedule""" + + schedule_name: str + """Name of the schedule at the time the run was created""" + + +class StatusMessage(BaseModel): + """Status message for a run. + + For terminal error states, includes structured + error code and retryability info from the platform error catalog. + """ + + message: str + """Human-readable status message""" + + error_code: Optional[ErrorCode] = None + """ + Machine-readable error code identifying the problem type. Used in the `type` URI + of Error responses and in the `error_code` field of RunStatusMessage. + + User errors (run transitions to FAILED): + + - `insufficient_credits` — Team has no remaining add-on credits + - `feature_not_available` — Required feature not enabled for user's plan + - `external_authentication_required` — User hasn't authorized a required + external service + - `not_authorized` — Principal lacks permission for the requested operation + - `invalid_request` — Request is malformed or contains invalid parameters + - `resource_not_found` — Referenced resource does not exist + - `budget_exceeded` — Spending budget limit has been reached + - `integration_disabled` — Integration is disabled and must be enabled + - `integration_not_configured` — Integration setup is incomplete + - `operation_not_supported` — Requested operation not supported for this + resource/state + - `environment_setup_failed` — Client-side environment setup failed + - `content_policy_violation` — Prompt or setup commands violated content policy + - `conflict` — Request conflicts with the current state of the resource + + Warp errors (run transitions to ERROR): + + - `authentication_required` — Request lacks valid authentication credentials + - `resource_unavailable` — Transient infrastructure issue (retryable) + - `internal_error` — Unexpected server-side error (retryable) + """ + + retryable: Optional[bool] = None + """Whether the error is transient and the client may retry by submitting a new run. + + Only present on terminal error states. When false, retrying without addressing + the underlying cause will not succeed. + """ class RunItem(BaseModel): @@ -85,7 +174,7 @@ class RunItem(BaseModel): request_usage: Optional[RequestUsage] = None """Resource usage information for the run""" - schedule: Optional[ScheduleInfo] = None + schedule: Optional[Schedule] = None """ Information about the schedule that triggered this run (only present for scheduled runs) @@ -117,7 +206,7 @@ class RunItem(BaseModel): started_at: Optional[datetime] = None """Timestamp when the agent started working on the run (RFC3339)""" - status_message: Optional[RunStatusMessage] = None + status_message: Optional[StatusMessage] = None """Status message for a run. For terminal error states, includes structured error code and retryability info diff --git a/src/oz_agent_sdk/types/agent/run_status_message.py b/src/oz_agent_sdk/types/agent/run_status_message.py deleted file mode 100644 index 44a5284..0000000 --- a/src/oz_agent_sdk/types/agent/run_status_message.py +++ /dev/null @@ -1,56 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel -from ..error_code import ErrorCode - -__all__ = ["RunStatusMessage"] - - -class RunStatusMessage(BaseModel): - """Status message for a run. - - For terminal error states, includes structured - error code and retryability info from the platform error catalog. - """ - - message: str - """Human-readable status message""" - - error_code: Optional[ErrorCode] = None - """ - Machine-readable error code identifying the problem type. Used in the `type` URI - of Error responses and in the `error_code` field of RunStatusMessage. - - User errors (run transitions to FAILED): - - - `insufficient_credits` — Team has no remaining add-on credits - - `feature_not_available` — Required feature not enabled for user's plan - - `external_authentication_required` — User hasn't authorized a required - external service - - `not_authorized` — Principal lacks permission for the requested operation - - `invalid_request` — Request is malformed or contains invalid parameters - - `resource_not_found` — Referenced resource does not exist - - `budget_exceeded` — Spending budget limit has been reached - - `integration_disabled` — Integration is disabled and must be enabled - - `integration_not_configured` — Integration setup is incomplete - - `operation_not_supported` — Requested operation not supported for this - resource/state - - `environment_setup_failed` — Client-side environment setup failed - - `content_policy_violation` — Prompt or setup commands violated content policy - - `conflict` — Request conflicts with the current state of the resource - - Warp errors (run transitions to ERROR): - - - `authentication_required` — Request lacks valid authentication credentials - - `resource_unavailable` — Transient infrastructure issue (retryable) - - `internal_error` — Unexpected server-side error (retryable) - """ - - retryable: Optional[bool] = None - """Whether the error is transient and the client may retry by submitting a new run. - - Only present on terminal error states. When false, retrying without addressing - the underlying cause will not succeed. - """ diff --git a/src/oz_agent_sdk/types/agent/schedule_info.py b/src/oz_agent_sdk/types/agent/schedule_info.py deleted file mode 100644 index 14e6ce1..0000000 --- a/src/oz_agent_sdk/types/agent/schedule_info.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from ..._models import BaseModel - -__all__ = ["ScheduleInfo"] - - -class ScheduleInfo(BaseModel): - """ - Information about the schedule that triggered this run (only present for scheduled runs) - """ - - cron_schedule: str - """Cron expression at the time the run was created""" - - schedule_id: str - """Unique identifier for the schedule""" - - schedule_name: str - """Name of the schedule at the time the run was created""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 63deff2..329aa9f 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -4,11 +4,20 @@ from pydantic import Field as FieldInfo -from .harness import Harness from .._models import BaseModel from .mcp_server_config import McpServerConfig -__all__ = ["AmbientAgentConfig"] +__all__ = ["AmbientAgentConfig", "Harness"] + + +class Harness(BaseModel): + """ + Specifies which execution harness to use for the agent run. + Default (nil/empty) uses Warp's built-in Oz harness. + """ + + type: Optional[str] = None + """The harness type identifier (e.g. "claude").""" class AmbientAgentConfig(BaseModel): diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 34a0171..5c04ce7 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -5,10 +5,19 @@ from typing import Dict from typing_extensions import TypedDict -from .harness_param import HarnessParam from .mcp_server_config_param import McpServerConfigParam -__all__ = ["AmbientAgentConfigParam"] +__all__ = ["AmbientAgentConfigParam", "Harness"] + + +class Harness(TypedDict, total=False): + """ + Specifies which execution harness to use for the agent run. + Default (nil/empty) uses Warp's built-in Oz harness. + """ + + type: str + """The harness type identifier (e.g. "claude").""" class AmbientAgentConfigParam(TypedDict, total=False): @@ -26,7 +35,7 @@ class AmbientAgentConfigParam(TypedDict, total=False): environment_id: str """UID of the environment to run the agent in""" - harness: HarnessParam + harness: Harness """ Specifies which execution harness to use for the agent run. Default (nil/empty) uses Warp's built-in Oz harness. diff --git a/src/oz_agent_sdk/types/harness.py b/src/oz_agent_sdk/types/harness.py deleted file mode 100644 index 20a4217..0000000 --- a/src/oz_agent_sdk/types/harness.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from .._models import BaseModel - -__all__ = ["Harness"] - - -class Harness(BaseModel): - """ - Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. - """ - - type: Optional[str] = None - """The harness type identifier (e.g. "claude").""" diff --git a/src/oz_agent_sdk/types/harness_param.py b/src/oz_agent_sdk/types/harness_param.py deleted file mode 100644 index ef3fd9e..0000000 --- a/src/oz_agent_sdk/types/harness_param.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import TypedDict - -__all__ = ["HarnessParam"] - - -class HarnessParam(TypedDict, total=False): - """ - Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. - """ - - type: str - """The harness type identifier (e.g. "claude").""" From ed9f4cfa6a0db58dc3ca5564f83b09ef1a19e3a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 21:18:17 +0000 Subject: [PATCH 27/34] feat(api): manual updates --- .stats.yml | 2 +- api.md | 4 + src/oz_agent_sdk/types/__init__.py | 2 + src/oz_agent_sdk/types/agent/__init__.py | 3 + src/oz_agent_sdk/types/agent/request_usage.py | 17 ++++ src/oz_agent_sdk/types/agent/run_item.py | 83 ++----------------- .../types/agent/run_status_message.py | 56 +++++++++++++ src/oz_agent_sdk/types/agent/schedule_info.py | 20 +++++ .../types/ambient_agent_config.py | 13 +-- .../types/ambient_agent_config_param.py | 15 +--- src/oz_agent_sdk/types/harness.py | 17 ++++ src/oz_agent_sdk/types/harness_param.py | 17 ++++ 12 files changed, 148 insertions(+), 101 deletions(-) create mode 100644 src/oz_agent_sdk/types/agent/request_usage.py create mode 100644 src/oz_agent_sdk/types/agent/run_status_message.py create mode 100644 src/oz_agent_sdk/types/agent/schedule_info.py create mode 100644 src/oz_agent_sdk/types/harness.py create mode 100644 src/oz_agent_sdk/types/harness_param.py diff --git a/.stats.yml b/.stats.yml index a1b4810..008f49e 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-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f -config_hash: 1888db8b2f33dc16874aea51a90e78f7 +config_hash: 56e5336dfbbacf3f4ec7f63b41309773 diff --git a/api.md b/api.md index 3ef6227..4ac3528 100644 --- a/api.md +++ b/api.md @@ -11,6 +11,7 @@ from oz_agent_sdk.types import ( Error, ErrorCode, GcpProviderConfig, + Harness, McpServerConfig, Scope, UserProfile, @@ -33,9 +34,12 @@ Types: ```python from oz_agent_sdk.types.agent import ( ArtifactItem, + RequestUsage, RunItem, RunSourceType, RunState, + RunStatusMessage, + ScheduleInfo, RunCancelResponse, ) ``` diff --git a/src/oz_agent_sdk/types/__init__.py b/src/oz_agent_sdk/types/__init__.py index 4c520a7..0c5ea5d 100644 --- a/src/oz_agent_sdk/types/__init__.py +++ b/src/oz_agent_sdk/types/__init__.py @@ -3,9 +3,11 @@ from __future__ import annotations from .scope import Scope as Scope +from .harness import Harness as Harness from .error_code import ErrorCode as ErrorCode from .agent_skill import AgentSkill as AgentSkill from .user_profile import UserProfile as UserProfile +from .harness_param import HarnessParam as HarnessParam from .agent_run_params import AgentRunParams as AgentRunParams from .agent_list_params import AgentListParams as AgentListParams from .mcp_server_config import McpServerConfig as McpServerConfig diff --git a/src/oz_agent_sdk/types/agent/__init__.py b/src/oz_agent_sdk/types/agent/__init__.py index 1176974..b5f9fa7 100644 --- a/src/oz_agent_sdk/types/agent/__init__.py +++ b/src/oz_agent_sdk/types/agent/__init__.py @@ -5,8 +5,11 @@ from .run_item import RunItem as RunItem from .run_state import RunState as RunState from .artifact_item import ArtifactItem as ArtifactItem +from .request_usage import RequestUsage as RequestUsage +from .schedule_info import ScheduleInfo as ScheduleInfo from .run_list_params import RunListParams as RunListParams from .run_source_type import RunSourceType as RunSourceType +from .run_status_message import RunStatusMessage as RunStatusMessage from .run_cancel_response import RunCancelResponse as RunCancelResponse from .scheduled_agent_item import ScheduledAgentItem as ScheduledAgentItem from .schedule_create_params import ScheduleCreateParams as ScheduleCreateParams diff --git a/src/oz_agent_sdk/types/agent/request_usage.py b/src/oz_agent_sdk/types/agent/request_usage.py new file mode 100644 index 0000000..6780c00 --- /dev/null +++ b/src/oz_agent_sdk/types/agent/request_usage.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__ = ["RequestUsage"] + + +class RequestUsage(BaseModel): + """Resource usage information for the run""" + + compute_cost: Optional[float] = None + """Cost of compute resources for the run""" + + inference_cost: Optional[float] = None + """Cost of LLM inference for the run""" diff --git a/src/oz_agent_sdk/types/agent/run_item.py b/src/oz_agent_sdk/types/agent/run_item.py index 0995dd7..e19e99d 100644 --- a/src/oz_agent_sdk/types/agent/run_item.py +++ b/src/oz_agent_sdk/types/agent/run_item.py @@ -7,13 +7,15 @@ from ..scope import Scope from ..._models import BaseModel from .run_state import RunState -from ..error_code import ErrorCode from ..user_profile import UserProfile from .artifact_item import ArtifactItem +from .request_usage import RequestUsage +from .schedule_info import ScheduleInfo from .run_source_type import RunSourceType +from .run_status_message import RunStatusMessage from ..ambient_agent_config import AmbientAgentConfig -__all__ = ["RunItem", "AgentSkill", "RequestUsage", "Schedule", "StatusMessage"] +__all__ = ["RunItem", "AgentSkill"] class AgentSkill(BaseModel): @@ -35,79 +37,6 @@ class AgentSkill(BaseModel): """Human-readable name of the skill""" -class RequestUsage(BaseModel): - """Resource usage information for the run""" - - compute_cost: Optional[float] = None - """Cost of compute resources for the run""" - - inference_cost: Optional[float] = None - """Cost of LLM inference for the run""" - - -class Schedule(BaseModel): - """ - Information about the schedule that triggered this run (only present for scheduled runs) - """ - - cron_schedule: str - """Cron expression at the time the run was created""" - - schedule_id: str - """Unique identifier for the schedule""" - - schedule_name: str - """Name of the schedule at the time the run was created""" - - -class StatusMessage(BaseModel): - """Status message for a run. - - For terminal error states, includes structured - error code and retryability info from the platform error catalog. - """ - - message: str - """Human-readable status message""" - - error_code: Optional[ErrorCode] = None - """ - Machine-readable error code identifying the problem type. Used in the `type` URI - of Error responses and in the `error_code` field of RunStatusMessage. - - User errors (run transitions to FAILED): - - - `insufficient_credits` — Team has no remaining add-on credits - - `feature_not_available` — Required feature not enabled for user's plan - - `external_authentication_required` — User hasn't authorized a required - external service - - `not_authorized` — Principal lacks permission for the requested operation - - `invalid_request` — Request is malformed or contains invalid parameters - - `resource_not_found` — Referenced resource does not exist - - `budget_exceeded` — Spending budget limit has been reached - - `integration_disabled` — Integration is disabled and must be enabled - - `integration_not_configured` — Integration setup is incomplete - - `operation_not_supported` — Requested operation not supported for this - resource/state - - `environment_setup_failed` — Client-side environment setup failed - - `content_policy_violation` — Prompt or setup commands violated content policy - - `conflict` — Request conflicts with the current state of the resource - - Warp errors (run transitions to ERROR): - - - `authentication_required` — Request lacks valid authentication credentials - - `resource_unavailable` — Transient infrastructure issue (retryable) - - `internal_error` — Unexpected server-side error (retryable) - """ - - retryable: Optional[bool] = None - """Whether the error is transient and the client may retry by submitting a new run. - - Only present on terminal error states. When false, retrying without addressing - the underlying cause will not succeed. - """ - - class RunItem(BaseModel): created_at: datetime """Timestamp when the run was created (RFC3339)""" @@ -174,7 +103,7 @@ class RunItem(BaseModel): request_usage: Optional[RequestUsage] = None """Resource usage information for the run""" - schedule: Optional[Schedule] = None + schedule: Optional[ScheduleInfo] = None """ Information about the schedule that triggered this run (only present for scheduled runs) @@ -206,7 +135,7 @@ class RunItem(BaseModel): started_at: Optional[datetime] = None """Timestamp when the agent started working on the run (RFC3339)""" - status_message: Optional[StatusMessage] = None + status_message: Optional[RunStatusMessage] = None """Status message for a run. For terminal error states, includes structured error code and retryability info diff --git a/src/oz_agent_sdk/types/agent/run_status_message.py b/src/oz_agent_sdk/types/agent/run_status_message.py new file mode 100644 index 0000000..44a5284 --- /dev/null +++ b/src/oz_agent_sdk/types/agent/run_status_message.py @@ -0,0 +1,56 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional + +from ..._models import BaseModel +from ..error_code import ErrorCode + +__all__ = ["RunStatusMessage"] + + +class RunStatusMessage(BaseModel): + """Status message for a run. + + For terminal error states, includes structured + error code and retryability info from the platform error catalog. + """ + + message: str + """Human-readable status message""" + + error_code: Optional[ErrorCode] = None + """ + Machine-readable error code identifying the problem type. Used in the `type` URI + of Error responses and in the `error_code` field of RunStatusMessage. + + User errors (run transitions to FAILED): + + - `insufficient_credits` — Team has no remaining add-on credits + - `feature_not_available` — Required feature not enabled for user's plan + - `external_authentication_required` — User hasn't authorized a required + external service + - `not_authorized` — Principal lacks permission for the requested operation + - `invalid_request` — Request is malformed or contains invalid parameters + - `resource_not_found` — Referenced resource does not exist + - `budget_exceeded` — Spending budget limit has been reached + - `integration_disabled` — Integration is disabled and must be enabled + - `integration_not_configured` — Integration setup is incomplete + - `operation_not_supported` — Requested operation not supported for this + resource/state + - `environment_setup_failed` — Client-side environment setup failed + - `content_policy_violation` — Prompt or setup commands violated content policy + - `conflict` — Request conflicts with the current state of the resource + + Warp errors (run transitions to ERROR): + + - `authentication_required` — Request lacks valid authentication credentials + - `resource_unavailable` — Transient infrastructure issue (retryable) + - `internal_error` — Unexpected server-side error (retryable) + """ + + retryable: Optional[bool] = None + """Whether the error is transient and the client may retry by submitting a new run. + + Only present on terminal error states. When false, retrying without addressing + the underlying cause will not succeed. + """ diff --git a/src/oz_agent_sdk/types/agent/schedule_info.py b/src/oz_agent_sdk/types/agent/schedule_info.py new file mode 100644 index 0000000..14e6ce1 --- /dev/null +++ b/src/oz_agent_sdk/types/agent/schedule_info.py @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from ..._models import BaseModel + +__all__ = ["ScheduleInfo"] + + +class ScheduleInfo(BaseModel): + """ + Information about the schedule that triggered this run (only present for scheduled runs) + """ + + cron_schedule: str + """Cron expression at the time the run was created""" + + schedule_id: str + """Unique identifier for the schedule""" + + schedule_name: str + """Name of the schedule at the time the run was created""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 329aa9f..63deff2 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -4,20 +4,11 @@ from pydantic import Field as FieldInfo +from .harness import Harness from .._models import BaseModel from .mcp_server_config import McpServerConfig -__all__ = ["AmbientAgentConfig", "Harness"] - - -class Harness(BaseModel): - """ - Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. - """ - - type: Optional[str] = None - """The harness type identifier (e.g. "claude").""" +__all__ = ["AmbientAgentConfig"] class AmbientAgentConfig(BaseModel): diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 5c04ce7..34a0171 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -5,19 +5,10 @@ from typing import Dict from typing_extensions import TypedDict +from .harness_param import HarnessParam from .mcp_server_config_param import McpServerConfigParam -__all__ = ["AmbientAgentConfigParam", "Harness"] - - -class Harness(TypedDict, total=False): - """ - Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. - """ - - type: str - """The harness type identifier (e.g. "claude").""" +__all__ = ["AmbientAgentConfigParam"] class AmbientAgentConfigParam(TypedDict, total=False): @@ -35,7 +26,7 @@ class AmbientAgentConfigParam(TypedDict, total=False): environment_id: str """UID of the environment to run the agent in""" - harness: Harness + harness: HarnessParam """ Specifies which execution harness to use for the agent run. Default (nil/empty) uses Warp's built-in Oz harness. diff --git a/src/oz_agent_sdk/types/harness.py b/src/oz_agent_sdk/types/harness.py new file mode 100644 index 0000000..20a4217 --- /dev/null +++ b/src/oz_agent_sdk/types/harness.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__ = ["Harness"] + + +class Harness(BaseModel): + """ + Specifies which execution harness to use for the agent run. + Default (nil/empty) uses Warp's built-in Oz harness. + """ + + type: Optional[str] = None + """The harness type identifier (e.g. "claude").""" diff --git a/src/oz_agent_sdk/types/harness_param.py b/src/oz_agent_sdk/types/harness_param.py new file mode 100644 index 0000000..ef3fd9e --- /dev/null +++ b/src/oz_agent_sdk/types/harness_param.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["HarnessParam"] + + +class HarnessParam(TypedDict, total=False): + """ + Specifies which execution harness to use for the agent run. + Default (nil/empty) uses Warp's built-in Oz harness. + """ + + type: str + """The harness type identifier (e.g. "claude").""" From 5e2d3ee9400130c5a8dc2d51d1618ad292c051ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 23:54:56 +0000 Subject: [PATCH 28/34] feat(api): api update --- .stats.yml | 2 +- api.md | 4 - src/oz_agent_sdk/types/__init__.py | 2 - src/oz_agent_sdk/types/agent/__init__.py | 3 - src/oz_agent_sdk/types/agent/request_usage.py | 17 ---- src/oz_agent_sdk/types/agent/run_item.py | 83 +++++++++++++++++-- .../types/agent/run_status_message.py | 56 ------------- src/oz_agent_sdk/types/agent/schedule_info.py | 20 ----- .../types/ambient_agent_config.py | 13 ++- .../types/ambient_agent_config_param.py | 15 +++- src/oz_agent_sdk/types/harness.py | 17 ---- src/oz_agent_sdk/types/harness_param.py | 17 ---- 12 files changed, 101 insertions(+), 148 deletions(-) delete mode 100644 src/oz_agent_sdk/types/agent/request_usage.py delete mode 100644 src/oz_agent_sdk/types/agent/run_status_message.py delete mode 100644 src/oz_agent_sdk/types/agent/schedule_info.py delete mode 100644 src/oz_agent_sdk/types/harness.py delete mode 100644 src/oz_agent_sdk/types/harness_param.py diff --git a/.stats.yml b/.stats.yml index 008f49e..a1b4810 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-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f -config_hash: 56e5336dfbbacf3f4ec7f63b41309773 +config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/api.md b/api.md index 4ac3528..3ef6227 100644 --- a/api.md +++ b/api.md @@ -11,7 +11,6 @@ from oz_agent_sdk.types import ( Error, ErrorCode, GcpProviderConfig, - Harness, McpServerConfig, Scope, UserProfile, @@ -34,12 +33,9 @@ Types: ```python from oz_agent_sdk.types.agent import ( ArtifactItem, - RequestUsage, RunItem, RunSourceType, RunState, - RunStatusMessage, - ScheduleInfo, RunCancelResponse, ) ``` diff --git a/src/oz_agent_sdk/types/__init__.py b/src/oz_agent_sdk/types/__init__.py index 0c5ea5d..4c520a7 100644 --- a/src/oz_agent_sdk/types/__init__.py +++ b/src/oz_agent_sdk/types/__init__.py @@ -3,11 +3,9 @@ from __future__ import annotations from .scope import Scope as Scope -from .harness import Harness as Harness from .error_code import ErrorCode as ErrorCode from .agent_skill import AgentSkill as AgentSkill from .user_profile import UserProfile as UserProfile -from .harness_param import HarnessParam as HarnessParam from .agent_run_params import AgentRunParams as AgentRunParams from .agent_list_params import AgentListParams as AgentListParams from .mcp_server_config import McpServerConfig as McpServerConfig diff --git a/src/oz_agent_sdk/types/agent/__init__.py b/src/oz_agent_sdk/types/agent/__init__.py index b5f9fa7..1176974 100644 --- a/src/oz_agent_sdk/types/agent/__init__.py +++ b/src/oz_agent_sdk/types/agent/__init__.py @@ -5,11 +5,8 @@ from .run_item import RunItem as RunItem from .run_state import RunState as RunState from .artifact_item import ArtifactItem as ArtifactItem -from .request_usage import RequestUsage as RequestUsage -from .schedule_info import ScheduleInfo as ScheduleInfo from .run_list_params import RunListParams as RunListParams from .run_source_type import RunSourceType as RunSourceType -from .run_status_message import RunStatusMessage as RunStatusMessage from .run_cancel_response import RunCancelResponse as RunCancelResponse from .scheduled_agent_item import ScheduledAgentItem as ScheduledAgentItem from .schedule_create_params import ScheduleCreateParams as ScheduleCreateParams diff --git a/src/oz_agent_sdk/types/agent/request_usage.py b/src/oz_agent_sdk/types/agent/request_usage.py deleted file mode 100644 index 6780c00..0000000 --- a/src/oz_agent_sdk/types/agent/request_usage.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel - -__all__ = ["RequestUsage"] - - -class RequestUsage(BaseModel): - """Resource usage information for the run""" - - compute_cost: Optional[float] = None - """Cost of compute resources for the run""" - - inference_cost: Optional[float] = None - """Cost of LLM inference for the run""" diff --git a/src/oz_agent_sdk/types/agent/run_item.py b/src/oz_agent_sdk/types/agent/run_item.py index e19e99d..0995dd7 100644 --- a/src/oz_agent_sdk/types/agent/run_item.py +++ b/src/oz_agent_sdk/types/agent/run_item.py @@ -7,15 +7,13 @@ from ..scope import Scope from ..._models import BaseModel from .run_state import RunState +from ..error_code import ErrorCode from ..user_profile import UserProfile from .artifact_item import ArtifactItem -from .request_usage import RequestUsage -from .schedule_info import ScheduleInfo from .run_source_type import RunSourceType -from .run_status_message import RunStatusMessage from ..ambient_agent_config import AmbientAgentConfig -__all__ = ["RunItem", "AgentSkill"] +__all__ = ["RunItem", "AgentSkill", "RequestUsage", "Schedule", "StatusMessage"] class AgentSkill(BaseModel): @@ -37,6 +35,79 @@ class AgentSkill(BaseModel): """Human-readable name of the skill""" +class RequestUsage(BaseModel): + """Resource usage information for the run""" + + compute_cost: Optional[float] = None + """Cost of compute resources for the run""" + + inference_cost: Optional[float] = None + """Cost of LLM inference for the run""" + + +class Schedule(BaseModel): + """ + Information about the schedule that triggered this run (only present for scheduled runs) + """ + + cron_schedule: str + """Cron expression at the time the run was created""" + + schedule_id: str + """Unique identifier for the schedule""" + + schedule_name: str + """Name of the schedule at the time the run was created""" + + +class StatusMessage(BaseModel): + """Status message for a run. + + For terminal error states, includes structured + error code and retryability info from the platform error catalog. + """ + + message: str + """Human-readable status message""" + + error_code: Optional[ErrorCode] = None + """ + Machine-readable error code identifying the problem type. Used in the `type` URI + of Error responses and in the `error_code` field of RunStatusMessage. + + User errors (run transitions to FAILED): + + - `insufficient_credits` — Team has no remaining add-on credits + - `feature_not_available` — Required feature not enabled for user's plan + - `external_authentication_required` — User hasn't authorized a required + external service + - `not_authorized` — Principal lacks permission for the requested operation + - `invalid_request` — Request is malformed or contains invalid parameters + - `resource_not_found` — Referenced resource does not exist + - `budget_exceeded` — Spending budget limit has been reached + - `integration_disabled` — Integration is disabled and must be enabled + - `integration_not_configured` — Integration setup is incomplete + - `operation_not_supported` — Requested operation not supported for this + resource/state + - `environment_setup_failed` — Client-side environment setup failed + - `content_policy_violation` — Prompt or setup commands violated content policy + - `conflict` — Request conflicts with the current state of the resource + + Warp errors (run transitions to ERROR): + + - `authentication_required` — Request lacks valid authentication credentials + - `resource_unavailable` — Transient infrastructure issue (retryable) + - `internal_error` — Unexpected server-side error (retryable) + """ + + retryable: Optional[bool] = None + """Whether the error is transient and the client may retry by submitting a new run. + + Only present on terminal error states. When false, retrying without addressing + the underlying cause will not succeed. + """ + + class RunItem(BaseModel): created_at: datetime """Timestamp when the run was created (RFC3339)""" @@ -103,7 +174,7 @@ class RunItem(BaseModel): request_usage: Optional[RequestUsage] = None """Resource usage information for the run""" - schedule: Optional[ScheduleInfo] = None + schedule: Optional[Schedule] = None """ Information about the schedule that triggered this run (only present for scheduled runs) @@ -135,7 +206,7 @@ class RunItem(BaseModel): started_at: Optional[datetime] = None """Timestamp when the agent started working on the run (RFC3339)""" - status_message: Optional[RunStatusMessage] = None + status_message: Optional[StatusMessage] = None """Status message for a run. For terminal error states, includes structured error code and retryability info diff --git a/src/oz_agent_sdk/types/agent/run_status_message.py b/src/oz_agent_sdk/types/agent/run_status_message.py deleted file mode 100644 index 44a5284..0000000 --- a/src/oz_agent_sdk/types/agent/run_status_message.py +++ /dev/null @@ -1,56 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from ..._models import BaseModel -from ..error_code import ErrorCode - -__all__ = ["RunStatusMessage"] - - -class RunStatusMessage(BaseModel): - """Status message for a run. - - For terminal error states, includes structured - error code and retryability info from the platform error catalog. - """ - - message: str - """Human-readable status message""" - - error_code: Optional[ErrorCode] = None - """ - Machine-readable error code identifying the problem type. Used in the `type` URI - of Error responses and in the `error_code` field of RunStatusMessage. - - User errors (run transitions to FAILED): - - - `insufficient_credits` — Team has no remaining add-on credits - - `feature_not_available` — Required feature not enabled for user's plan - - `external_authentication_required` — User hasn't authorized a required - external service - - `not_authorized` — Principal lacks permission for the requested operation - - `invalid_request` — Request is malformed or contains invalid parameters - - `resource_not_found` — Referenced resource does not exist - - `budget_exceeded` — Spending budget limit has been reached - - `integration_disabled` — Integration is disabled and must be enabled - - `integration_not_configured` — Integration setup is incomplete - - `operation_not_supported` — Requested operation not supported for this - resource/state - - `environment_setup_failed` — Client-side environment setup failed - - `content_policy_violation` — Prompt or setup commands violated content policy - - `conflict` — Request conflicts with the current state of the resource - - Warp errors (run transitions to ERROR): - - - `authentication_required` — Request lacks valid authentication credentials - - `resource_unavailable` — Transient infrastructure issue (retryable) - - `internal_error` — Unexpected server-side error (retryable) - """ - - retryable: Optional[bool] = None - """Whether the error is transient and the client may retry by submitting a new run. - - Only present on terminal error states. When false, retrying without addressing - the underlying cause will not succeed. - """ diff --git a/src/oz_agent_sdk/types/agent/schedule_info.py b/src/oz_agent_sdk/types/agent/schedule_info.py deleted file mode 100644 index 14e6ce1..0000000 --- a/src/oz_agent_sdk/types/agent/schedule_info.py +++ /dev/null @@ -1,20 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from ..._models import BaseModel - -__all__ = ["ScheduleInfo"] - - -class ScheduleInfo(BaseModel): - """ - Information about the schedule that triggered this run (only present for scheduled runs) - """ - - cron_schedule: str - """Cron expression at the time the run was created""" - - schedule_id: str - """Unique identifier for the schedule""" - - schedule_name: str - """Name of the schedule at the time the run was created""" diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 63deff2..329aa9f 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -4,11 +4,20 @@ from pydantic import Field as FieldInfo -from .harness import Harness from .._models import BaseModel from .mcp_server_config import McpServerConfig -__all__ = ["AmbientAgentConfig"] +__all__ = ["AmbientAgentConfig", "Harness"] + + +class Harness(BaseModel): + """ + Specifies which execution harness to use for the agent run. + Default (nil/empty) uses Warp's built-in Oz harness. + """ + + type: Optional[str] = None + """The harness type identifier (e.g. "claude").""" class AmbientAgentConfig(BaseModel): diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 34a0171..5c04ce7 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -5,10 +5,19 @@ from typing import Dict from typing_extensions import TypedDict -from .harness_param import HarnessParam from .mcp_server_config_param import McpServerConfigParam -__all__ = ["AmbientAgentConfigParam"] +__all__ = ["AmbientAgentConfigParam", "Harness"] + + +class Harness(TypedDict, total=False): + """ + Specifies which execution harness to use for the agent run. + Default (nil/empty) uses Warp's built-in Oz harness. + """ + + type: str + """The harness type identifier (e.g. "claude").""" class AmbientAgentConfigParam(TypedDict, total=False): @@ -26,7 +35,7 @@ class AmbientAgentConfigParam(TypedDict, total=False): environment_id: str """UID of the environment to run the agent in""" - harness: HarnessParam + harness: Harness """ Specifies which execution harness to use for the agent run. Default (nil/empty) uses Warp's built-in Oz harness. diff --git a/src/oz_agent_sdk/types/harness.py b/src/oz_agent_sdk/types/harness.py deleted file mode 100644 index 20a4217..0000000 --- a/src/oz_agent_sdk/types/harness.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional - -from .._models import BaseModel - -__all__ = ["Harness"] - - -class Harness(BaseModel): - """ - Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. - """ - - type: Optional[str] = None - """The harness type identifier (e.g. "claude").""" diff --git a/src/oz_agent_sdk/types/harness_param.py b/src/oz_agent_sdk/types/harness_param.py deleted file mode 100644 index ef3fd9e..0000000 --- a/src/oz_agent_sdk/types/harness_param.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import TypedDict - -__all__ = ["HarnessParam"] - - -class HarnessParam(TypedDict, total=False): - """ - Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. - """ - - type: str - """The harness type identifier (e.g. "claude").""" From 204505c1472d5af4b9463a975fd919c5fc4dbe78 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 15:42:10 +0000 Subject: [PATCH 29/34] feat(api): api update --- .stats.yml | 4 ++-- src/oz_agent_sdk/types/ambient_agent_config.py | 13 +++++++++---- .../types/ambient_agent_config_param.py | 14 +++++++++----- tests/api_resources/agent/test_schedules.py | 8 ++++---- tests/api_resources/test_agent.py | 4 ++-- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index a1b4810..680933a 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-e281c64ee44d0db13ba9ce62d3a61e8b17fcd1fad9bffb5c3b0e3dfb2b5e66e1.yml -openapi_spec_hash: 6bd667f546147c5fac3bffe34522ba2f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-8794fad94f5d124b6c46befab0b5cb47d4ec075595c8b3520fa88ffbc50b4649.yml +openapi_spec_hash: ee42f19a2f1d1053e9f97bb4f0e745d6 config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 329aa9f..77516f8 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Dict, Optional +from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -13,11 +14,15 @@ class Harness(BaseModel): """ Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. + Default (nil/empty) uses Warp's built-in harness. """ - type: Optional[str] = None - """The harness type identifier (e.g. "claude").""" + type: Optional[Literal["oz", "claude"]] = None + """The harness type identifier. + + - oz: Warp's built-in harness (default) + - claude: Claude Code harness + """ class AmbientAgentConfig(BaseModel): @@ -38,7 +43,7 @@ class AmbientAgentConfig(BaseModel): harness: Optional[Harness] = None """ Specifies which execution harness to use for the agent run. Default (nil/empty) - uses Warp's built-in Oz harness. + uses Warp's built-in harness. """ idle_timeout_minutes: Optional[int] = None diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 5c04ce7..963f998 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Dict -from typing_extensions import TypedDict +from typing_extensions import Literal, TypedDict from .mcp_server_config_param import McpServerConfigParam @@ -13,11 +13,15 @@ class Harness(TypedDict, total=False): """ Specifies which execution harness to use for the agent run. - Default (nil/empty) uses Warp's built-in Oz harness. + Default (nil/empty) uses Warp's built-in harness. """ - type: str - """The harness type identifier (e.g. "claude").""" + type: Literal["oz", "claude"] + """The harness type identifier. + + - oz: Warp's built-in harness (default) + - claude: Claude Code harness + """ class AmbientAgentConfigParam(TypedDict, total=False): @@ -38,7 +42,7 @@ class AmbientAgentConfigParam(TypedDict, total=False): harness: Harness """ Specifies which execution harness to use for the agent run. Default (nil/empty) - uses Warp's built-in Oz harness. + uses Warp's built-in harness. """ idle_timeout_minutes: int diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index ede0b94..21a81ec 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -156,7 +156,7 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -399,7 +399,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -515,7 +515,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index bf4eb23..384a6d3 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -123,7 +123,7 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -280,7 +280,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "type"}, + "harness": {"type": "oz"}, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { From c5752fbbceffbc322cee5dd8b111aa0ce84ce615 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 16:02:27 +0000 Subject: [PATCH 30/34] feat: Add parent_run_id to retrieve/list runs API response --- .stats.yml | 4 ++-- src/oz_agent_sdk/types/agent/run_item.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 680933a..df95b4b 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-8794fad94f5d124b6c46befab0b5cb47d4ec075595c8b3520fa88ffbc50b4649.yml -openapi_spec_hash: ee42f19a2f1d1053e9f97bb4f0e745d6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-52c0dc63c0d952099b92cdf34ab5d96bfed0f7c1563df5a3ec58a49ff48bba17.yml +openapi_spec_hash: 16b32944c0606c834a41953e58b06c50 config_hash: 1888db8b2f33dc16874aea51a90e78f7 diff --git a/src/oz_agent_sdk/types/agent/run_item.py b/src/oz_agent_sdk/types/agent/run_item.py index 0995dd7..d246450 100644 --- a/src/oz_agent_sdk/types/agent/run_item.py +++ b/src/oz_agent_sdk/types/agent/run_item.py @@ -171,6 +171,9 @@ class RunItem(BaseModel): is_sandbox_running: Optional[bool] = None """Whether the sandbox environment is currently running""" + parent_run_id: Optional[str] = None + """UUID of the parent run that spawned this run""" + request_usage: Optional[RequestUsage] = None """Resource usage information for the run""" From 5da315075e053b1a6cef709439f9972f6fd0f70f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 16:08:32 +0000 Subject: [PATCH 31/34] fix(client): preserve hardcoded query params when merging with user params --- src/oz_agent_sdk/_base_client.py | 4 +++ tests/test_client.py | 48 ++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/src/oz_agent_sdk/_base_client.py b/src/oz_agent_sdk/_base_client.py index fc8cfaf..047d5bb 100644 --- a/src/oz_agent_sdk/_base_client.py +++ b/src/oz_agent_sdk/_base_client.py @@ -558,6 +558,10 @@ def _build_request( files = cast(HttpxRequestFiles, ForceMultipartDict()) prepared_url = self._prepare_url(options.url) + # preserve hard-coded query params from the url + if params and prepared_url.query: + params = {**dict(prepared_url.params.items()), **params} + prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0]) if "_" in prepared_url.host: # work around https://github.com/encode/httpx/discussions/2880 kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")} diff --git a/tests/test_client.py b/tests/test_client.py index 9b58870..988622f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -427,6 +427,30 @@ def test_default_query_option(self) -> None: client.close() + def test_hardcoded_query_params_in_url(self, client: OzAPI) -> None: + request = client._build_request(FinalRequestOptions(method="get", url="/foo?beta=true")) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true"} + + request = client._build_request( + FinalRequestOptions( + method="get", + url="/foo?beta=true", + params={"limit": "10", "page": "abc"}, + ) + ) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true", "limit": "10", "page": "abc"} + + request = client._build_request( + FinalRequestOptions( + method="get", + url="/files/a%2Fb?beta=true", + params={"limit": "10"}, + ) + ) + assert request.url.raw_path == b"/files/a%2Fb?beta=true&limit=10" + def test_request_extra_json(self, client: OzAPI) -> None: request = client._build_request( FinalRequestOptions( @@ -1316,6 +1340,30 @@ async def test_default_query_option(self) -> None: await client.close() + async def test_hardcoded_query_params_in_url(self, async_client: AsyncOzAPI) -> None: + request = async_client._build_request(FinalRequestOptions(method="get", url="/foo?beta=true")) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true"} + + request = async_client._build_request( + FinalRequestOptions( + method="get", + url="/foo?beta=true", + params={"limit": "10", "page": "abc"}, + ) + ) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true", "limit": "10", "page": "abc"} + + request = async_client._build_request( + FinalRequestOptions( + method="get", + url="/files/a%2Fb?beta=true", + params={"limit": "10"}, + ) + ) + assert request.url.raw_path == b"/files/a%2Fb?beta=true&limit=10" + def test_request_extra_json(self, client: OzAPI) -> None: request = client._build_request( FinalRequestOptions( From 5103fc2919c8ff009244bb0266bc497f5b461a8d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 21:49:44 +0000 Subject: [PATCH 32/34] codegen metadata --- .stats.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index df95b4b..4487c74 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-52c0dc63c0d952099b92cdf34ab5d96bfed0f7c1563df5a3ec58a49ff48bba17.yml -openapi_spec_hash: 16b32944c0606c834a41953e58b06c50 -config_hash: 1888db8b2f33dc16874aea51a90e78f7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-d45cb71aa9505f79b4ad42f50c3528e028508a941068c137393cbf2f54a8dd20.yml +openapi_spec_hash: 2816d2eedf7d73fdde8a3fbb7bc96336 +config_hash: 40327fb76b7cce7b97f23de9b8d48efb From 54c505b2d58246abab42cda52d79df3ddbfed083 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 23:05:13 +0000 Subject: [PATCH 33/34] feat: Define auth secrets and inject them into the environment. --- .stats.yml | 4 ++-- .../types/ambient_agent_config.py | 9 +++++++++ .../types/ambient_agent_config_param.py | 9 +++++++++ tests/api_resources/agent/test_schedules.py | 20 +++++++++++++++---- tests/api_resources/test_agent.py | 10 ++++++++-- 5 files changed, 44 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4487c74..0cbbd81 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-d45cb71aa9505f79b4ad42f50c3528e028508a941068c137393cbf2f54a8dd20.yml -openapi_spec_hash: 2816d2eedf7d73fdde8a3fbb7bc96336 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-d57dae004e23149ddae4bd26e3ba05c2378d2c1070df0f303b19e45111c780d5.yml +openapi_spec_hash: 6a15b456e6520a79981fafed3b0c94b9 config_hash: 40327fb76b7cce7b97f23de9b8d48efb diff --git a/src/oz_agent_sdk/types/ambient_agent_config.py b/src/oz_agent_sdk/types/ambient_agent_config.py index 77516f8..abd16c1 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config.py +++ b/src/oz_agent_sdk/types/ambient_agent_config.py @@ -17,6 +17,15 @@ class Harness(BaseModel): Default (nil/empty) uses Warp's built-in harness. """ + auth_secret_name: Optional[str] = None + """Name of a managed secret to use as the authentication credential for the + harness. + + The secret must exist within the caller's personal or team scope. The + environment variable injected into the agent is determined by the secret type + (e.g. ANTHROPIC_API_KEY for anthropic_api_key secrets). + """ + type: Optional[Literal["oz", "claude"]] = None """The harness type identifier. diff --git a/src/oz_agent_sdk/types/ambient_agent_config_param.py b/src/oz_agent_sdk/types/ambient_agent_config_param.py index 963f998..24da607 100644 --- a/src/oz_agent_sdk/types/ambient_agent_config_param.py +++ b/src/oz_agent_sdk/types/ambient_agent_config_param.py @@ -16,6 +16,15 @@ class Harness(TypedDict, total=False): Default (nil/empty) uses Warp's built-in harness. """ + auth_secret_name: str + """Name of a managed secret to use as the authentication credential for the + harness. + + The secret must exist within the caller's personal or team scope. The + environment variable injected into the agent is determined by the secret type + (e.g. ANTHROPIC_API_KEY for anthropic_api_key secrets). + """ + type: Literal["oz", "claude"] """The harness type identifier. diff --git a/tests/api_resources/agent/test_schedules.py b/tests/api_resources/agent/test_schedules.py index 21a81ec..9b22b45 100644 --- a/tests/api_resources/agent/test_schedules.py +++ b/tests/api_resources/agent/test_schedules.py @@ -40,7 +40,10 @@ def test_method_create_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": { + "auth_secret_name": "auth_secret_name", + "type": "oz", + }, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -156,7 +159,10 @@ def test_method_update_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": { + "auth_secret_name": "auth_secret_name", + "type": "oz", + }, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -399,7 +405,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": { + "auth_secret_name": "auth_secret_name", + "type": "oz", + }, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -515,7 +524,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncOzAPI) -> "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": { + "auth_secret_name": "auth_secret_name", + "type": "oz", + }, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index 384a6d3..b641c09 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -123,7 +123,10 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": { + "auth_secret_name": "auth_secret_name", + "type": "oz", + }, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { @@ -280,7 +283,10 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "base_prompt": "base_prompt", "computer_use_enabled": True, "environment_id": "environment_id", - "harness": {"type": "oz"}, + "harness": { + "auth_secret_name": "auth_secret_name", + "type": "oz", + }, "idle_timeout_minutes": 1, "mcp_servers": { "foo": { From 1d2007eaa692679fdcc56a6092ffdf9ad09de6ca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 03:20:24 +0000 Subject: [PATCH 34/34] feat: [Artifacts] public API file artifact downloads --- .stats.yml | 4 +- src/oz_agent_sdk/resources/agent/agent.py | 40 +++++++---- src/oz_agent_sdk/resources/agent/runs.py | 4 +- src/oz_agent_sdk/types/agent/artifact_item.py | 35 +++++++++- .../types/agent/run_list_params.py | 2 +- .../types/agent_get_artifact_response.py | 70 ++++++++++++++++--- 6 files changed, 126 insertions(+), 29 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0cbbd81..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-d57dae004e23149ddae4bd26e3ba05c2378d2c1070df0f303b19e45111c780d5.yml -openapi_spec_hash: 6a15b456e6520a79981fafed3b0c94b9 +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 9024ac9..a0240ce 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Iterable +from typing import Any, Iterable, cast from typing_extensions import Literal import httpx @@ -163,8 +163,8 @@ def get_artifact( ) -> AgentGetArtifactResponse: """Retrieve an artifact by its UUID. - For screenshot artifacts, returns a - time-limited signed download URL. + For supported downloadable artifacts, returns + a time-limited signed download URL. Args: extra_headers: Send extra headers @@ -177,12 +177,17 @@ def get_artifact( """ if not artifact_uid: raise ValueError(f"Expected a non-empty value for `artifact_uid` but received {artifact_uid!r}") - return self._get( - path_template("/agent/artifacts/{artifact_uid}", artifact_uid=artifact_uid), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + return cast( + AgentGetArtifactResponse, + self._get( + path_template("/agent/artifacts/{artifact_uid}", artifact_uid=artifact_uid), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=cast( + Any, AgentGetArtifactResponse + ), # Union types cannot be passed in as arguments in the type system ), - cast_to=AgentGetArtifactResponse, ) def run( @@ -382,8 +387,8 @@ async def get_artifact( ) -> AgentGetArtifactResponse: """Retrieve an artifact by its UUID. - For screenshot artifacts, returns a - time-limited signed download URL. + For supported downloadable artifacts, returns + a time-limited signed download URL. Args: extra_headers: Send extra headers @@ -396,12 +401,17 @@ async def get_artifact( """ if not artifact_uid: raise ValueError(f"Expected a non-empty value for `artifact_uid` but received {artifact_uid!r}") - return await self._get( - path_template("/agent/artifacts/{artifact_uid}", artifact_uid=artifact_uid), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + return cast( + AgentGetArtifactResponse, + await self._get( + path_template("/agent/artifacts/{artifact_uid}", artifact_uid=artifact_uid), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=cast( + Any, AgentGetArtifactResponse + ), # Union types cannot be passed in as arguments in the type system ), - cast_to=AgentGetArtifactResponse, ) async def run( diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index e13feec..e6e55b5 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -87,7 +87,7 @@ def retrieve( def list( self, *, - artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"] | 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, creator: str | Omit = omit, @@ -307,7 +307,7 @@ async def retrieve( def list( self, *, - artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"] | 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, creator: str | Omit = omit, diff --git a/src/oz_agent_sdk/types/agent/artifact_item.py b/src/oz_agent_sdk/types/agent/artifact_item.py index 7cbba71..299379b 100644 --- a/src/oz_agent_sdk/types/agent/artifact_item.py +++ b/src/oz_agent_sdk/types/agent/artifact_item.py @@ -15,6 +15,8 @@ "PullRequestArtifactData", "ScreenshotArtifact", "ScreenshotArtifactData", + "FileArtifact", + "FileArtifactData", ] @@ -78,6 +80,37 @@ class ScreenshotArtifact(BaseModel): data: ScreenshotArtifactData +class FileArtifactData(BaseModel): + artifact_uid: str + """Unique identifier for the file artifact""" + + filename: str + """Last path component of filepath""" + + filepath: str + """Conversation-relative filepath for the uploaded file""" + + mime_type: str + """MIME type of the uploaded file""" + + description: Optional[str] = None + """Optional description of the file""" + + size_bytes: Optional[int] = None + """Size of the uploaded file in bytes""" + + +class FileArtifact(BaseModel): + artifact_type: Literal["FILE"] + """Type of the artifact""" + + created_at: datetime + """Timestamp when the artifact was created (RFC3339)""" + + data: FileArtifactData + + ArtifactItem: TypeAlias = Annotated[ - Union[PlanArtifact, PullRequestArtifact, ScreenshotArtifact], PropertyInfo(discriminator="artifact_type") + Union[PlanArtifact, PullRequestArtifact, ScreenshotArtifact, FileArtifact], + PropertyInfo(discriminator="artifact_type"), ] 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 a1dc2af..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,7 +14,7 @@ class RunListParams(TypedDict, total=False): - artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT"] + artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT", "FILE"] """Filter runs by artifact type""" created_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/src/oz_agent_sdk/types/agent_get_artifact_response.py b/src/oz_agent_sdk/types/agent_get_artifact_response.py index 277baf3..30405bc 100644 --- a/src/oz_agent_sdk/types/agent_get_artifact_response.py +++ b/src/oz_agent_sdk/types/agent_get_artifact_response.py @@ -1,14 +1,22 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import Union, Optional from datetime import datetime +from typing_extensions import Literal, Annotated, TypeAlias +from .._utils import PropertyInfo from .._models import BaseModel -__all__ = ["AgentGetArtifactResponse", "Data"] +__all__ = [ + "AgentGetArtifactResponse", + "ScreenshotArtifactResponse", + "ScreenshotArtifactResponseData", + "FileArtifactResponse", + "FileArtifactResponseData", +] -class Data(BaseModel): +class ScreenshotArtifactResponseData(BaseModel): """Response data for a screenshot artifact, including a signed download URL.""" content_type: str @@ -24,11 +32,11 @@ class Data(BaseModel): """Optional description of the screenshot""" -class AgentGetArtifactResponse(BaseModel): - """Response for artifact retrieval. Currently supports screenshot artifacts.""" +class ScreenshotArtifactResponse(BaseModel): + """Response for retrieving a screenshot artifact.""" - artifact_type: str - """Type of the artifact (e.g., SCREENSHOT)""" + artifact_type: Literal["SCREENSHOT"] + """Type of the artifact""" artifact_uid: str """Unique identifier (UUID) for the artifact""" @@ -36,5 +44,51 @@ class AgentGetArtifactResponse(BaseModel): created_at: datetime """Timestamp when the artifact was created (RFC3339)""" - data: Data + data: ScreenshotArtifactResponseData """Response data for a screenshot artifact, including a signed download URL.""" + + +class FileArtifactResponseData(BaseModel): + """Response data for a file artifact, including a signed download URL.""" + + content_type: str + """MIME type of the uploaded file""" + + download_url: str + """Time-limited signed URL to download the file""" + + expires_at: datetime + """Timestamp when the download URL expires (RFC3339)""" + + filename: str + """Last path component of filepath""" + + filepath: str + """Conversation-relative filepath for the uploaded file""" + + description: Optional[str] = None + """Optional description of the file""" + + size_bytes: Optional[int] = None + """Size of the uploaded file in bytes""" + + +class FileArtifactResponse(BaseModel): + """Response for retrieving a file artifact.""" + + artifact_type: Literal["FILE"] + """Type of the artifact""" + + artifact_uid: str + """Unique identifier (UUID) for the artifact""" + + created_at: datetime + """Timestamp when the artifact was created (RFC3339)""" + + data: FileArtifactResponseData + """Response data for a file artifact, including a signed download URL.""" + + +AgentGetArtifactResponse: TypeAlias = Annotated[ + Union[ScreenshotArtifactResponse, FileArtifactResponse], PropertyInfo(discriminator="artifact_type") +]