From 56e750de02acdd4349cf75841be87e59904e7508 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 21:55:21 +0000 Subject: [PATCH 1/4] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8a91f3f..5649828 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-0c4039c2494856656a7a1a93f76bb7f8c1d3ca7b164e2f97579b59e1a8bdb57c.yml -openapi_spec_hash: 2eb93f6ec9c664399fef84ce3bf8c5a7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-d3d485104a1c344076e6268935d0a5371036c95885b3fa6200c635f1351d2e25.yml +openapi_spec_hash: 34c237455d4b5b60f9db14068d1a9999 config_hash: 25c1059aa958c8c2ad60ef16c318514d From 1f89eca19e244721d77837d5aafbf0e1de20aee7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 21:59:29 +0000 Subject: [PATCH 2/4] feat(api): manual updates --- .stats.yml | 2 +- api.md | 2 ++ src/oz_agent_sdk/types/__init__.py | 1 + src/oz_agent_sdk/types/agent/__init__.py | 1 + src/oz_agent_sdk/types/agent/run_item.py | 14 ++-------- .../agent/scheduled_agent_history_item.py | 18 +++++++++++++ .../types/agent/scheduled_agent_item.py | 27 +++---------------- src/oz_agent_sdk/types/scope.py | 18 +++++++++++++ 8 files changed, 47 insertions(+), 36 deletions(-) create mode 100644 src/oz_agent_sdk/types/agent/scheduled_agent_history_item.py create mode 100644 src/oz_agent_sdk/types/scope.py diff --git a/.stats.yml b/.stats.yml index 5649828..a41ceee 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-d3d485104a1c344076e6268935d0a5371036c95885b3fa6200c635f1351d2e25.yml openapi_spec_hash: 34c237455d4b5b60f9db14068d1a9999 -config_hash: 25c1059aa958c8c2ad60ef16c318514d +config_hash: 0884847870200ee9d34bb00ce94aaa8e diff --git a/api.md b/api.md index 6f5ccdd..a28b73a 100644 --- a/api.md +++ b/api.md @@ -8,6 +8,7 @@ from oz_agent_sdk.types import ( AmbientAgentConfig, CloudEnvironmentConfig, McpServerConfig, + Scope, UserProfile, AgentListResponse, AgentGetArtifactResponse, @@ -48,6 +49,7 @@ Types: ```python from oz_agent_sdk.types.agent import ( + ScheduledAgentHistoryItem, ScheduledAgentItem, ScheduleListResponse, ScheduleDeleteResponse, diff --git a/src/oz_agent_sdk/types/__init__.py b/src/oz_agent_sdk/types/__init__.py index 829402d..5398f2d 100644 --- a/src/oz_agent_sdk/types/__init__.py +++ b/src/oz_agent_sdk/types/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .scope import Scope as Scope from .agent_skill import AgentSkill as AgentSkill from .user_profile import UserProfile as UserProfile from .agent_run_params import AgentRunParams as AgentRunParams diff --git a/src/oz_agent_sdk/types/agent/__init__.py b/src/oz_agent_sdk/types/agent/__init__.py index 87712e7..3484850 100644 --- a/src/oz_agent_sdk/types/agent/__init__.py +++ b/src/oz_agent_sdk/types/agent/__init__.py @@ -14,4 +14,5 @@ from .schedule_list_response import ScheduleListResponse as ScheduleListResponse from .schedule_update_params import ScheduleUpdateParams as ScheduleUpdateParams from .schedule_delete_response import ScheduleDeleteResponse as ScheduleDeleteResponse +from .scheduled_agent_history_item import ScheduledAgentHistoryItem as ScheduledAgentHistoryItem from .session_check_redirect_response import SessionCheckRedirectResponse as SessionCheckRedirectResponse diff --git a/src/oz_agent_sdk/types/agent/run_item.py b/src/oz_agent_sdk/types/agent/run_item.py index d7a2507..eae44c3 100644 --- a/src/oz_agent_sdk/types/agent/run_item.py +++ b/src/oz_agent_sdk/types/agent/run_item.py @@ -2,8 +2,8 @@ from typing import List, Optional from datetime import datetime -from typing_extensions import Literal +from ..scope import Scope from ..._models import BaseModel from .run_state import RunState from ..user_profile import UserProfile @@ -11,7 +11,7 @@ from .run_source_type import RunSourceType from ..ambient_agent_config import AmbientAgentConfig -__all__ = ["RunItem", "AgentSkill", "RequestUsage", "Schedule", "Scope", "StatusMessage"] +__all__ = ["RunItem", "AgentSkill", "RequestUsage", "Schedule", "StatusMessage"] class AgentSkill(BaseModel): @@ -58,16 +58,6 @@ class Schedule(BaseModel): """Name of the schedule at the time the run was created""" -class Scope(BaseModel): - """Ownership scope for a resource (team or personal)""" - - type: Literal["User", "Team"] - """Type of ownership ("User" for personal, "Team" for team-owned)""" - - uid: Optional[str] = None - """UID of the owning user or team""" - - class StatusMessage(BaseModel): message: Optional[str] = None """Human-readable status message""" diff --git a/src/oz_agent_sdk/types/agent/scheduled_agent_history_item.py b/src/oz_agent_sdk/types/agent/scheduled_agent_history_item.py new file mode 100644 index 0000000..d8ad5f7 --- /dev/null +++ b/src/oz_agent_sdk/types/agent/scheduled_agent_history_item.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime + +from ..._models import BaseModel + +__all__ = ["ScheduledAgentHistoryItem"] + + +class ScheduledAgentHistoryItem(BaseModel): + """Scheduler-derived history metadata for a scheduled agent""" + + last_ran: Optional[datetime] = None + """Timestamp of the last successful run (RFC3339)""" + + next_run: Optional[datetime] = None + """Timestamp of the next scheduled run (RFC3339)""" diff --git a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py index 86716d7..d66ddfa 100644 --- a/src/oz_agent_sdk/types/agent/scheduled_agent_item.py +++ b/src/oz_agent_sdk/types/agent/scheduled_agent_item.py @@ -2,34 +2,15 @@ from typing import Optional from datetime import datetime -from typing_extensions import Literal +from ..scope import Scope from ..._models import BaseModel from ..user_profile import UserProfile from ..ambient_agent_config import AmbientAgentConfig from ..cloud_environment_config import CloudEnvironmentConfig +from .scheduled_agent_history_item import ScheduledAgentHistoryItem -__all__ = ["ScheduledAgentItem", "History", "Scope"] - - -class History(BaseModel): - """Scheduler-derived history metadata for a scheduled agent""" - - last_ran: Optional[datetime] = None - """Timestamp of the last successful run (RFC3339)""" - - next_run: Optional[datetime] = None - """Timestamp of the next scheduled run (RFC3339)""" - - -class Scope(BaseModel): - """Ownership scope for a resource (team or personal)""" - - type: Literal["User", "Team"] - """Type of ownership ("User" for personal, "Team" for team-owned)""" - - uid: Optional[str] = None - """UID of the owning user or team""" +__all__ = ["ScheduledAgentItem"] class ScheduledAgentItem(BaseModel): @@ -65,7 +46,7 @@ class ScheduledAgentItem(BaseModel): environment: Optional[CloudEnvironmentConfig] = None """Configuration for a cloud environment used by scheduled agents""" - history: Optional[History] = None + history: Optional[ScheduledAgentHistoryItem] = None """Scheduler-derived history metadata for a scheduled agent""" last_spawn_error: Optional[str] = None diff --git a/src/oz_agent_sdk/types/scope.py b/src/oz_agent_sdk/types/scope.py new file mode 100644 index 0000000..ac765e3 --- /dev/null +++ b/src/oz_agent_sdk/types/scope.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["Scope"] + + +class Scope(BaseModel): + """Ownership scope for a resource (team or personal)""" + + type: Literal["User", "Team"] + """Type of ownership ("User" for personal, "Team" for team-owned)""" + + uid: Optional[str] = None + """UID of the owning user or team""" From 26fc0852ddd9352fe7564cba64f34203d940ac57 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 22:35:23 +0000 Subject: [PATCH 3/4] feat(api): manual updates adding platform error codes --- .stats.yml | 4 +- src/oz_agent_sdk/resources/agent/runs.py | 12 +++- src/oz_agent_sdk/types/agent/run_item.py | 70 +++++++++++++++++++++++- 3 files changed, 81 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index a41ceee..26fe290 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-d3d485104a1c344076e6268935d0a5371036c95885b3fa6200c635f1351d2e25.yml -openapi_spec_hash: 34c237455d4b5b60f9db14068d1a9999 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-39e18bbb8b0af73eca7a880f56afbdecd69e3e5bab82a04c4d6429c32d7e6727.yml +openapi_spec_hash: 7a0de988bb37416d6e80f4a4bbe9d0d0 config_hash: 0884847870200ee9d34bb00ce94aaa8e diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index 7bc08ae..3b4d1d2 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -204,7 +204,11 @@ def cancel( """Cancel an agent run that is currently queued or in progress. Once cancelled, the - run will transition to a failed state. + run will transition to a cancelled state. + + Not all runs can be cancelled. Runs that are in a terminal state (SUCCEEDED, + FAILED, ERROR, BLOCKED, CANCELLED) return 400. Runs in PENDING state return 409 + (retry after a moment). Self-hosted, local, and GitHub Action runs return 422. Args: extra_headers: Send extra headers @@ -402,7 +406,11 @@ async def cancel( """Cancel an agent run that is currently queued or in progress. Once cancelled, the - run will transition to a failed state. + run will transition to a cancelled state. + + Not all runs can be cancelled. Runs that are in a terminal state (SUCCEEDED, + FAILED, ERROR, BLOCKED, CANCELLED) return 400. Runs in PENDING state return 409 + (retry after a moment). Self-hosted, local, and GitHub Action runs return 422. Args: extra_headers: Send extra headers diff --git a/src/oz_agent_sdk/types/agent/run_item.py b/src/oz_agent_sdk/types/agent/run_item.py index eae44c3..b486acf 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 @@ -59,9 +60,71 @@ class Schedule(BaseModel): class StatusMessage(BaseModel): - message: Optional[str] = None + """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[ + Literal[ + "insufficient_credits", + "feature_not_available", + "external_authentication_required", + "not_authorized", + "invalid_request", + "resource_not_found", + "budget_exceeded", + "integration_disabled", + "integration_not_configured", + "operation_not_supported", + "environment_setup_failed", + "content_policy_violation", + "conflict", + "authentication_required", + "resource_unavailable", + "internal_error", + ] + ] = 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 @@ -155,3 +218,8 @@ class RunItem(BaseModel): """Timestamp when the agent started working on the run (RFC3339)""" status_message: Optional[StatusMessage] = None + """Status message for a run. + + For terminal error states, includes structured error code and retryability info + from the platform error catalog. + """ From 97a1169a600ebaafb67f5ab04e3f127f1e0d3539 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 22:35:41 +0000 Subject: [PATCH 4/4] release: 0.9.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 9 +++++++++ pyproject.toml | 2 +- src/oz_agent_sdk/_version.py | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6538ca9..6d78745 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.8.0" + ".": "0.9.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0328126..bd2fe52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.9.0 (2026-03-03) + +Full Changelog: [v0.8.0...v0.9.0](https://github.com/warpdotdev/oz-sdk-python/compare/v0.8.0...v0.9.0) + +### Features + +* **api:** manual updates ([26fc085](https://github.com/warpdotdev/oz-sdk-python/commit/26fc0852ddd9352fe7564cba64f34203d940ac57)) +* **api:** manual updates ([1f89eca](https://github.com/warpdotdev/oz-sdk-python/commit/1f89eca19e244721d77837d5aafbf0e1de20aee7)) + ## 0.8.0 (2026-03-03) Full Changelog: [v0.7.0...v0.8.0](https://github.com/warpdotdev/oz-sdk-python/compare/v0.7.0...v0.8.0) diff --git a/pyproject.toml b/pyproject.toml index 8cdac6a..add485e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "oz-agent-sdk" -version = "0.8.0" +version = "0.9.0" description = "The official Python library for the oz-api API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/oz_agent_sdk/_version.py b/src/oz_agent_sdk/_version.py index ba4422a..39f67b8 100644 --- a/src/oz_agent_sdk/_version.py +++ b/src/oz_agent_sdk/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "oz_agent_sdk" -__version__ = "0.8.0" # x-release-please-version +__version__ = "0.9.0" # x-release-please-version