Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.11.0"
".": "0.12.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-8f9c749573846b07a55a3131b66456f0a592838c6bfc986ab30948df66cd6f11.yml
openapi_spec_hash: 59f1ac98ad6cf13b12c59196bcecffd7
config_hash: 60052b2c1c0862014416821aba875574
configured_endpoints: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-ae49b84ec5627699ad71bfbbf01d6ce76587b7cfbbfa10f124b397d0c59b0b82.yml
openapi_spec_hash: b965b21aa3f92e8b9111e50c1b9a8bf0
config_hash: 253e4b5ca01236d448980a78491c17c5
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## 0.12.0 (2026-04-14)

Full Changelog: [v0.11.0...v0.12.0](https://github.com/warpdotdev/oz-sdk-python/compare/v0.11.0...v0.12.0)

### Features

* Add parent_run_id filter to List runs endpoint ([33cf04c](https://github.com/warpdotdev/oz-sdk-python/commit/33cf04c0777d53059f8a3c73b925b468276aba2a))
* Add system prompt to resolve-prompt for harnesses. ([2b7afab](https://github.com/warpdotdev/oz-sdk-python/commit/2b7afabf4a54764ab162ac32f4dbe7fe4274ba72))
* Add trigger URL to task source. ([9662dbe](https://github.com/warpdotdev/oz-sdk-python/commit/9662dbe10cc5392271b3e56c35cb8ef95ec80eed))
* **api:** api update ([1ffc53b](https://github.com/warpdotdev/oz-sdk-python/commit/1ffc53b4d69eeb8060faac1903f1ba25f7a4c443))
* **api:** api update ([cf28804](https://github.com/warpdotdev/oz-sdk-python/commit/cf288045d369ed927db45ac5e5ebd994ccebb547))
* **api:** api update ([a6d82f1](https://github.com/warpdotdev/oz-sdk-python/commit/a6d82f1a71ad8e0ff5f10c43cc81938babc1444e))
* **api:** api update ([b9872f2](https://github.com/warpdotdev/oz-sdk-python/commit/b9872f2642191ef6e1d4d5d3542a08f9e2784b9e))
* **api:** api update ([0ef9c8f](https://github.com/warpdotdev/oz-sdk-python/commit/0ef9c8f483269d203a3edc7b5805f48f4263eb2f))
* Inject auth secrets via ambient agent config. ([6032a0c](https://github.com/warpdotdev/oz-sdk-python/commit/6032a0ccfe2ce669ce1f815ad853b912d4ca575e))


### Bug Fixes

* ensure file data are only sent as 1 parameter ([6720ea9](https://github.com/warpdotdev/oz-sdk-python/commit/6720ea9331a945cf2d030e20b8851a223697aab3))

## 0.11.0 (2026-04-09)

Full Changelog: [v0.10.1...v0.11.0](https://github.com/warpdotdev/oz-sdk-python/compare/v0.10.1...v0.11.0)
Expand Down
3 changes: 3 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ from oz_agent_sdk.types import (
AgentSkill,
AmbientAgentConfig,
AwsProviderConfig,
CloudEnvironment,
CloudEnvironmentConfig,
Error,
ErrorCode,
Expand All @@ -16,6 +17,7 @@ from oz_agent_sdk.types import (
UserProfile,
AgentListResponse,
AgentGetArtifactResponse,
AgentListEnvironmentsResponse,
AgentRunResponse,
)
```
Expand All @@ -24,6 +26,7 @@ Methods:

- <code title="get /agent">client.agent.<a href="./src/oz_agent_sdk/resources/agent/agent.py">list</a>(\*\*<a href="src/oz_agent_sdk/types/agent_list_params.py">params</a>) -> <a href="./src/oz_agent_sdk/types/agent_list_response.py">AgentListResponse</a></code>
- <code title="get /agent/artifacts/{artifactUid}">client.agent.<a href="./src/oz_agent_sdk/resources/agent/agent.py">get_artifact</a>(artifact_uid) -> <a href="./src/oz_agent_sdk/types/agent_get_artifact_response.py">AgentGetArtifactResponse</a></code>
- <code title="get /agent/environments">client.agent.<a href="./src/oz_agent_sdk/resources/agent/agent.py">list_environments</a>(\*\*<a href="src/oz_agent_sdk/types/agent_list_environments_params.py">params</a>) -> <a href="./src/oz_agent_sdk/types/agent_list_environments_response.py">AgentListEnvironmentsResponse</a></code>
- <code title="post /agent/runs">client.agent.<a href="./src/oz_agent_sdk/resources/agent/agent.py">run</a>(\*\*<a href="src/oz_agent_sdk/types/agent_run_params.py">params</a>) -> <a href="./src/oz_agent_sdk/types/agent_run_response.py">AgentRunResponse</a></code>

## Runs
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "oz-agent-sdk"
version = "0.11.0"
version = "0.12.0"
description = "The official Python library for the oz-api API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
5 changes: 3 additions & 2 deletions src/oz_agent_sdk/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ def _extract_items(
index += 1
if is_dict(obj):
try:
# We are at the last entry in the path so we must remove the field
if (len(path)) == index:
# Remove the field if there are no more dict keys in the path,
# only "<array>" traversal markers or end.
if all(p == "<array>" for p in path[index:]):
item = obj.pop(key)
else:
item = obj[key]
Expand Down
2 changes: 1 addition & 1 deletion src/oz_agent_sdk/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "oz_agent_sdk"
__version__ = "0.11.0" # x-release-please-version
__version__ = "0.12.0" # x-release-please-version
103 changes: 102 additions & 1 deletion src/oz_agent_sdk/resources/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
RunsResourceWithStreamingResponse,
AsyncRunsResourceWithStreamingResponse,
)
from ...types import agent_run_params, agent_list_params
from ...types import agent_run_params, agent_list_params, agent_list_environments_params
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import path_template, maybe_transform, async_maybe_transform
from .sessions import (
Expand Down Expand Up @@ -47,6 +47,7 @@
from ...types.agent_list_response import AgentListResponse
from ...types.ambient_agent_config_param import AmbientAgentConfigParam
from ...types.agent_get_artifact_response import AgentGetArtifactResponse
from ...types.agent_list_environments_response import AgentListEnvironmentsResponse

__all__ = ["AgentResource", "AsyncAgentResource"]

Expand Down Expand Up @@ -190,6 +191,49 @@ def get_artifact(
),
)

def list_environments(
self,
*,
sort_by: Literal["name", "last_updated"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AgentListEnvironmentsResponse:
"""Retrieve cloud environments accessible to the authenticated principal.

Returns
environments the caller owns, has been granted guest access to, or has accessed
via link sharing.

Args:
sort_by: Sort order for the returned environments.

- `name`: alphabetical by environment name
- `last_updated`: most recently updated first (default)

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return self._get(
"/agent/environments",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=maybe_transform({"sort_by": sort_by}, agent_list_environments_params.AgentListEnvironmentsParams),
),
cast_to=AgentListEnvironmentsResponse,
)

def run(
self,
*,
Expand Down Expand Up @@ -419,6 +463,51 @@ async def get_artifact(
),
)

async def list_environments(
self,
*,
sort_by: Literal["name", "last_updated"] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AgentListEnvironmentsResponse:
"""Retrieve cloud environments accessible to the authenticated principal.

Returns
environments the caller owns, has been granted guest access to, or has accessed
via link sharing.

Args:
sort_by: Sort order for the returned environments.

- `name`: alphabetical by environment name
- `last_updated`: most recently updated first (default)

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
return await self._get(
"/agent/environments",
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
query=await async_maybe_transform(
{"sort_by": sort_by}, agent_list_environments_params.AgentListEnvironmentsParams
),
),
cast_to=AgentListEnvironmentsResponse,
)

async def run(
self,
*,
Expand Down Expand Up @@ -519,6 +608,9 @@ def __init__(self, agent: AgentResource) -> None:
self.get_artifact = to_raw_response_wrapper(
agent.get_artifact,
)
self.list_environments = to_raw_response_wrapper(
agent.list_environments,
)
self.run = to_raw_response_wrapper(
agent.run,
)
Expand Down Expand Up @@ -549,6 +641,9 @@ def __init__(self, agent: AsyncAgentResource) -> None:
self.get_artifact = async_to_raw_response_wrapper(
agent.get_artifact,
)
self.list_environments = async_to_raw_response_wrapper(
agent.list_environments,
)
self.run = async_to_raw_response_wrapper(
agent.run,
)
Expand Down Expand Up @@ -579,6 +674,9 @@ def __init__(self, agent: AgentResource) -> None:
self.get_artifact = to_streamed_response_wrapper(
agent.get_artifact,
)
self.list_environments = to_streamed_response_wrapper(
agent.list_environments,
)
self.run = to_streamed_response_wrapper(
agent.run,
)
Expand Down Expand Up @@ -609,6 +707,9 @@ def __init__(self, agent: AsyncAgentResource) -> None:
self.get_artifact = async_to_streamed_response_wrapper(
agent.get_artifact,
)
self.list_environments = async_to_streamed_response_wrapper(
agent.list_environments,
)
self.run = async_to_streamed_response_wrapper(
agent.run,
)
Expand Down
10 changes: 10 additions & 0 deletions src/oz_agent_sdk/resources/agent/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def retrieve(
def list(
self,
*,
ancestor_run_id: str | Omit = omit,
artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT", "FILE"] | Omit = omit,
created_after: Union[str, datetime] | Omit = omit,
created_before: Union[str, datetime] | Omit = omit,
Expand Down Expand Up @@ -119,6 +120,9 @@ def list(
to `sort_by=updated_at` and `sort_order=desc`.

Args:
ancestor_run_id: Filter runs by ancestor run ID. The referenced run must exist and be accessible
to the caller.

artifact_type: Filter runs by artifact type

created_after: Filter runs created after this timestamp (RFC3339 format)
Expand Down Expand Up @@ -182,6 +186,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"ancestor_run_id": ancestor_run_id,
"artifact_type": artifact_type,
"created_after": created_after,
"created_before": created_before,
Expand Down Expand Up @@ -307,6 +312,7 @@ async def retrieve(
def list(
self,
*,
ancestor_run_id: str | Omit = omit,
artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT", "FILE"] | Omit = omit,
created_after: Union[str, datetime] | Omit = omit,
created_before: Union[str, datetime] | Omit = omit,
Expand Down Expand Up @@ -339,6 +345,9 @@ def list(
to `sort_by=updated_at` and `sort_order=desc`.

Args:
ancestor_run_id: Filter runs by ancestor run ID. The referenced run must exist and be accessible
to the caller.

artifact_type: Filter runs by artifact type

created_after: Filter runs created after this timestamp (RFC3339 format)
Expand Down Expand Up @@ -402,6 +411,7 @@ def list(
timeout=timeout,
query=maybe_transform(
{
"ancestor_run_id": ancestor_run_id,
"artifact_type": artifact_type,
"created_after": created_after,
"created_before": created_before,
Expand Down
3 changes: 3 additions & 0 deletions src/oz_agent_sdk/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from .user_profile import UserProfile as UserProfile
from .agent_run_params import AgentRunParams as AgentRunParams
from .agent_list_params import AgentListParams as AgentListParams
from .cloud_environment import CloudEnvironment as CloudEnvironment
from .mcp_server_config import McpServerConfig as McpServerConfig
from .agent_run_response import AgentRunResponse as AgentRunResponse
from .agent_list_response import AgentListResponse as AgentListResponse
Expand All @@ -18,3 +19,5 @@
from .cloud_environment_config import CloudEnvironmentConfig as CloudEnvironmentConfig
from .ambient_agent_config_param import AmbientAgentConfigParam as AmbientAgentConfigParam
from .agent_get_artifact_response import AgentGetArtifactResponse as AgentGetArtifactResponse
from .agent_list_environments_params import AgentListEnvironmentsParams as AgentListEnvironmentsParams
from .agent_list_environments_response import AgentListEnvironmentsResponse as AgentListEnvironmentsResponse
3 changes: 3 additions & 0 deletions src/oz_agent_sdk/types/agent/run_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,6 @@ class RunItem(BaseModel):
For terminal error states, includes structured error code and retryability info
from the platform error catalog.
"""

trigger_url: Optional[str] = None
"""URL to the run trigger (e.g. Slack thread, Linear issue, schedule)"""
6 changes: 6 additions & 0 deletions src/oz_agent_sdk/types/agent/run_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@


class RunListParams(TypedDict, total=False):
ancestor_run_id: str
"""Filter runs by ancestor run ID.

The referenced run must exist and be accessible to the caller.
"""

artifact_type: Literal["PLAN", "PULL_REQUEST", "SCREENSHOT", "FILE"]
"""Filter runs by artifact type"""

Expand Down
16 changes: 16 additions & 0 deletions src/oz_agent_sdk/types/agent_list_environments_params.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import Literal, TypedDict

__all__ = ["AgentListEnvironmentsParams"]


class AgentListEnvironmentsParams(TypedDict, total=False):
sort_by: Literal["name", "last_updated"]
"""Sort order for the returned environments.

- `name`: alphabetical by environment name
- `last_updated`: most recently updated first (default)
"""
13 changes: 13 additions & 0 deletions src/oz_agent_sdk/types/agent_list_environments_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List

from .._models import BaseModel
from .cloud_environment import CloudEnvironment

__all__ = ["AgentListEnvironmentsResponse"]


class AgentListEnvironmentsResponse(BaseModel):
environments: List[CloudEnvironment]
"""List of accessible cloud environments"""
Loading
Loading