diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e89dae..71a918c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 with: - version: '0.9.13' + version: '0.10.2' - name: Install dependencies run: uv sync --all-extras @@ -46,7 +46,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 with: - version: '0.9.13' + version: '0.10.2' - name: Install dependencies run: uv sync --all-extras @@ -80,7 +80,7 @@ jobs: - name: Install uv uses: astral-sh/setup-uv@v5 with: - version: '0.9.13' + version: '0.10.2' - name: Bootstrap run: ./scripts/bootstrap diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1b77f50..6538ca9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.7.0" + ".": "0.8.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index ed196e5..8a91f3f 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-91a7db62ba0752b9bdccd4bac4c6d09c1d59b7b69788159fe13598b7a5def7ee.yml -openapi_spec_hash: f03a889deaf6df14d678643be1e4dbe3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-0c4039c2494856656a7a1a93f76bb7f8c1d3ca7b164e2f97579b59e1a8bdb57c.yml +openapi_spec_hash: 2eb93f6ec9c664399fef84ce3bf8c5a7 config_hash: 25c1059aa958c8c2ad60ef16c318514d diff --git a/CHANGELOG.md b/CHANGELOG.md index b831860..0328126 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 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) + +### Features + +* **api:** manual updates ([1d27527](https://github.com/warpdotdev/oz-sdk-python/commit/1d275270bac34036ba2d2f9795792f2b71fdad3f)) + + +### Chores + +* **ci:** bump uv version ([646ee4e](https://github.com/warpdotdev/oz-sdk-python/commit/646ee4e0381123a3b24e63c4829e32c7ffc3160d)) +* **docs:** add missing descriptions ([4777a8f](https://github.com/warpdotdev/oz-sdk-python/commit/4777a8fd9d5e9644a694695190d1dc6d4c1c9941)) +* **internal:** make `test_proxy_environment_variables` more resilient to env ([3c14f7a](https://github.com/warpdotdev/oz-sdk-python/commit/3c14f7ae100fbb6df1a9f7109fd77057cf10a780)) + ## 0.7.0 (2026-02-23) Full Changelog: [v0.6.2...v0.7.0](https://github.com/warpdotdev/oz-sdk-python/compare/v0.6.2...v0.7.0) diff --git a/pyproject.toml b/pyproject.toml index 7f9d305..8cdac6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "oz-agent-sdk" -version = "0.7.0" +version = "0.8.0" description = "The official Python library for the oz-api API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/oz_agent_sdk/_client.py b/src/oz_agent_sdk/_client.py index 365d491..27973c0 100644 --- a/src/oz_agent_sdk/_client.py +++ b/src/oz_agent_sdk/_client.py @@ -94,6 +94,7 @@ def __init__( @cached_property def agent(self) -> AgentResource: + """Operations for running and managing cloud agents""" from .resources.agent import AgentResource return AgentResource(self) @@ -268,6 +269,7 @@ def __init__( @cached_property def agent(self) -> AsyncAgentResource: + """Operations for running and managing cloud agents""" from .resources.agent import AsyncAgentResource return AsyncAgentResource(self) @@ -393,6 +395,7 @@ def __init__(self, client: OzAPI) -> None: @cached_property def agent(self) -> agent.AgentResourceWithRawResponse: + """Operations for running and managing cloud agents""" from .resources.agent import AgentResourceWithRawResponse return AgentResourceWithRawResponse(self._client.agent) @@ -406,6 +409,7 @@ def __init__(self, client: AsyncOzAPI) -> None: @cached_property def agent(self) -> agent.AsyncAgentResourceWithRawResponse: + """Operations for running and managing cloud agents""" from .resources.agent import AsyncAgentResourceWithRawResponse return AsyncAgentResourceWithRawResponse(self._client.agent) @@ -419,6 +423,7 @@ def __init__(self, client: OzAPI) -> None: @cached_property def agent(self) -> agent.AgentResourceWithStreamingResponse: + """Operations for running and managing cloud agents""" from .resources.agent import AgentResourceWithStreamingResponse return AgentResourceWithStreamingResponse(self._client.agent) @@ -432,6 +437,7 @@ def __init__(self, client: AsyncOzAPI) -> None: @cached_property def agent(self) -> agent.AsyncAgentResourceWithStreamingResponse: + """Operations for running and managing cloud agents""" from .resources.agent import AsyncAgentResourceWithStreamingResponse return AsyncAgentResourceWithStreamingResponse(self._client.agent) diff --git a/src/oz_agent_sdk/_version.py b/src/oz_agent_sdk/_version.py index 4f7bc92..ba4422a 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.7.0" # x-release-please-version +__version__ = "0.8.0" # x-release-please-version diff --git a/src/oz_agent_sdk/resources/agent/agent.py b/src/oz_agent_sdk/resources/agent/agent.py index 8e1ef5d..d4f0a9f 100644 --- a/src/oz_agent_sdk/resources/agent/agent.py +++ b/src/oz_agent_sdk/resources/agent/agent.py @@ -52,16 +52,21 @@ class AgentResource(SyncAPIResource): + """Operations for running and managing cloud agents""" + @cached_property def runs(self) -> RunsResource: + """Operations for running and managing cloud agents""" return RunsResource(self._client) @cached_property def schedules(self) -> SchedulesResource: + """Operations for creating and managing scheduled agents""" return SchedulesResource(self._client) @cached_property def sessions(self) -> SessionsResource: + """Operations for running and managing cloud agents""" return SessionsResource(self._client) @cached_property @@ -86,6 +91,7 @@ def with_streaming_response(self) -> AgentResourceWithStreamingResponse: def list( self, *, + include_malformed_skills: bool | Omit = omit, refresh: bool | Omit = omit, repo: str | Omit = omit, sort_by: Literal["name", "last_run"] | Omit = omit, @@ -101,6 +107,10 @@ def list( Agents are discovered from environments or a specific repository. Args: + include_malformed_skills: When true, includes skills whose SKILL.md file exists but is malformed. These + variants will have a non-empty `error` field describing the parse failure. + Defaults to false. + refresh: When true, clears the agent list cache before fetching. Use this to force a refresh of the available agents. @@ -129,6 +139,7 @@ def list( timeout=timeout, query=maybe_transform( { + "include_malformed_skills": include_malformed_skills, "refresh": refresh, "repo": repo, "sort_by": sort_by, @@ -180,6 +191,7 @@ def run( attachments: Iterable[agent_run_params.Attachment] | Omit = omit, config: AmbientAgentConfigParam | Omit = omit, conversation_id: str | Omit = omit, + interactive: bool | Omit = omit, prompt: str | Omit = omit, skill: str | Omit = omit, team: bool | Omit = omit, @@ -205,6 +217,8 @@ def run( conversation_id: Optional conversation ID to continue an existing conversation. If provided, the agent will continue from where the previous run left off. + interactive: Whether the run should be interactive. If not set, defaults to false. + prompt: The prompt/instruction for the agent to execute. Required unless a skill is specified via the skill field or config.skill_spec. @@ -236,6 +250,7 @@ def run( "attachments": attachments, "config": config, "conversation_id": conversation_id, + "interactive": interactive, "prompt": prompt, "skill": skill, "team": team, @@ -251,16 +266,21 @@ def run( class AsyncAgentResource(AsyncAPIResource): + """Operations for running and managing cloud agents""" + @cached_property def runs(self) -> AsyncRunsResource: + """Operations for running and managing cloud agents""" return AsyncRunsResource(self._client) @cached_property def schedules(self) -> AsyncSchedulesResource: + """Operations for creating and managing scheduled agents""" return AsyncSchedulesResource(self._client) @cached_property def sessions(self) -> AsyncSessionsResource: + """Operations for running and managing cloud agents""" return AsyncSessionsResource(self._client) @cached_property @@ -285,6 +305,7 @@ def with_streaming_response(self) -> AsyncAgentResourceWithStreamingResponse: async def list( self, *, + include_malformed_skills: bool | Omit = omit, refresh: bool | Omit = omit, repo: str | Omit = omit, sort_by: Literal["name", "last_run"] | Omit = omit, @@ -300,6 +321,10 @@ async def list( Agents are discovered from environments or a specific repository. Args: + include_malformed_skills: When true, includes skills whose SKILL.md file exists but is malformed. These + variants will have a non-empty `error` field describing the parse failure. + Defaults to false. + refresh: When true, clears the agent list cache before fetching. Use this to force a refresh of the available agents. @@ -328,6 +353,7 @@ async def list( timeout=timeout, query=await async_maybe_transform( { + "include_malformed_skills": include_malformed_skills, "refresh": refresh, "repo": repo, "sort_by": sort_by, @@ -379,6 +405,7 @@ async def run( attachments: Iterable[agent_run_params.Attachment] | Omit = omit, config: AmbientAgentConfigParam | Omit = omit, conversation_id: str | Omit = omit, + interactive: bool | Omit = omit, prompt: str | Omit = omit, skill: str | Omit = omit, team: bool | Omit = omit, @@ -404,6 +431,8 @@ async def run( conversation_id: Optional conversation ID to continue an existing conversation. If provided, the agent will continue from where the previous run left off. + interactive: Whether the run should be interactive. If not set, defaults to false. + prompt: The prompt/instruction for the agent to execute. Required unless a skill is specified via the skill field or config.skill_spec. @@ -435,6 +464,7 @@ async def run( "attachments": attachments, "config": config, "conversation_id": conversation_id, + "interactive": interactive, "prompt": prompt, "skill": skill, "team": team, @@ -465,14 +495,17 @@ def __init__(self, agent: AgentResource) -> None: @cached_property def runs(self) -> RunsResourceWithRawResponse: + """Operations for running and managing cloud agents""" return RunsResourceWithRawResponse(self._agent.runs) @cached_property def schedules(self) -> SchedulesResourceWithRawResponse: + """Operations for creating and managing scheduled agents""" return SchedulesResourceWithRawResponse(self._agent.schedules) @cached_property def sessions(self) -> SessionsResourceWithRawResponse: + """Operations for running and managing cloud agents""" return SessionsResourceWithRawResponse(self._agent.sessions) @@ -492,14 +525,17 @@ def __init__(self, agent: AsyncAgentResource) -> None: @cached_property def runs(self) -> AsyncRunsResourceWithRawResponse: + """Operations for running and managing cloud agents""" return AsyncRunsResourceWithRawResponse(self._agent.runs) @cached_property def schedules(self) -> AsyncSchedulesResourceWithRawResponse: + """Operations for creating and managing scheduled agents""" return AsyncSchedulesResourceWithRawResponse(self._agent.schedules) @cached_property def sessions(self) -> AsyncSessionsResourceWithRawResponse: + """Operations for running and managing cloud agents""" return AsyncSessionsResourceWithRawResponse(self._agent.sessions) @@ -519,14 +555,17 @@ def __init__(self, agent: AgentResource) -> None: @cached_property def runs(self) -> RunsResourceWithStreamingResponse: + """Operations for running and managing cloud agents""" return RunsResourceWithStreamingResponse(self._agent.runs) @cached_property def schedules(self) -> SchedulesResourceWithStreamingResponse: + """Operations for creating and managing scheduled agents""" return SchedulesResourceWithStreamingResponse(self._agent.schedules) @cached_property def sessions(self) -> SessionsResourceWithStreamingResponse: + """Operations for running and managing cloud agents""" return SessionsResourceWithStreamingResponse(self._agent.sessions) @@ -546,12 +585,15 @@ def __init__(self, agent: AsyncAgentResource) -> None: @cached_property def runs(self) -> AsyncRunsResourceWithStreamingResponse: + """Operations for running and managing cloud agents""" return AsyncRunsResourceWithStreamingResponse(self._agent.runs) @cached_property def schedules(self) -> AsyncSchedulesResourceWithStreamingResponse: + """Operations for creating and managing scheduled agents""" return AsyncSchedulesResourceWithStreamingResponse(self._agent.schedules) @cached_property def sessions(self) -> AsyncSessionsResourceWithStreamingResponse: + """Operations for running and managing cloud agents""" return AsyncSessionsResourceWithStreamingResponse(self._agent.sessions) diff --git a/src/oz_agent_sdk/resources/agent/runs.py b/src/oz_agent_sdk/resources/agent/runs.py index 561ef78..7bc08ae 100644 --- a/src/oz_agent_sdk/resources/agent/runs.py +++ b/src/oz_agent_sdk/resources/agent/runs.py @@ -29,6 +29,8 @@ class RunsResource(SyncAPIResource): + """Operations for running and managing cloud agents""" + @cached_property def with_raw_response(self) -> RunsResourceWithRawResponse: """ @@ -225,6 +227,8 @@ def cancel( class AsyncRunsResource(AsyncAPIResource): + """Operations for running and managing cloud agents""" + @cached_property def with_raw_response(self) -> AsyncRunsResourceWithRawResponse: """ diff --git a/src/oz_agent_sdk/resources/agent/schedules.py b/src/oz_agent_sdk/resources/agent/schedules.py index 0a6a3c7..ff36da2 100644 --- a/src/oz_agent_sdk/resources/agent/schedules.py +++ b/src/oz_agent_sdk/resources/agent/schedules.py @@ -25,6 +25,8 @@ class SchedulesResource(SyncAPIResource): + """Operations for creating and managing scheduled agents""" + @cached_property def with_raw_response(self) -> SchedulesResourceWithRawResponse: """ @@ -332,6 +334,8 @@ def resume( class AsyncSchedulesResource(AsyncAPIResource): + """Operations for creating and managing scheduled agents""" + @cached_property def with_raw_response(self) -> AsyncSchedulesResourceWithRawResponse: """ diff --git a/src/oz_agent_sdk/resources/agent/sessions.py b/src/oz_agent_sdk/resources/agent/sessions.py index a441a3e..0c1bd41 100644 --- a/src/oz_agent_sdk/resources/agent/sessions.py +++ b/src/oz_agent_sdk/resources/agent/sessions.py @@ -20,6 +20,8 @@ class SessionsResource(SyncAPIResource): + """Operations for running and managing cloud agents""" + @cached_property def with_raw_response(self) -> SessionsResourceWithRawResponse: """ @@ -76,6 +78,8 @@ def check_redirect( class AsyncSessionsResource(AsyncAPIResource): + """Operations for running and managing cloud agents""" + @cached_property def with_raw_response(self) -> AsyncSessionsResourceWithRawResponse: """ diff --git a/src/oz_agent_sdk/types/agent_list_params.py b/src/oz_agent_sdk/types/agent_list_params.py index 21781ff..d3157f4 100644 --- a/src/oz_agent_sdk/types/agent_list_params.py +++ b/src/oz_agent_sdk/types/agent_list_params.py @@ -8,6 +8,13 @@ class AgentListParams(TypedDict, total=False): + include_malformed_skills: bool + """When true, includes skills whose SKILL.md file exists but is malformed. + + These variants will have a non-empty `error` field describing the parse failure. + Defaults to false. + """ + refresh: bool """ When true, clears the agent list cache before fetching. Use this to force a diff --git a/src/oz_agent_sdk/types/agent_run_params.py b/src/oz_agent_sdk/types/agent_run_params.py index 7f38ea2..88ae9a6 100644 --- a/src/oz_agent_sdk/types/agent_run_params.py +++ b/src/oz_agent_sdk/types/agent_run_params.py @@ -29,6 +29,9 @@ class AgentRunParams(TypedDict, total=False): agent will continue from where the previous run left off. """ + interactive: bool + """Whether the run should be interactive. If not set, defaults to false.""" + prompt: str """ The prompt/instruction for the agent to execute. Required unless a skill is diff --git a/src/oz_agent_sdk/types/agent_skill.py b/src/oz_agent_sdk/types/agent_skill.py index 0f2c937..9b3386f 100644 --- a/src/oz_agent_sdk/types/agent_skill.py +++ b/src/oz_agent_sdk/types/agent_skill.py @@ -45,6 +45,13 @@ class Variant(BaseModel): source: VariantSource + error: Optional[str] = None + """ + Non-empty when the skill's SKILL.md file exists but is malformed. Contains a + description of the parse failure. Only present when + include_malformed_skills=true is passed to the list agents endpoint. + """ + last_run_timestamp: Optional[datetime] = None """Timestamp of the last time this skill was run (RFC3339)""" diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index 63591c6..00acc5b 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -31,6 +31,7 @@ def test_method_list(self, client: OzAPI) -> None: @parametrize def test_method_list_with_all_params(self, client: OzAPI) -> None: agent = client.agent.list( + include_malformed_skills=True, refresh=True, repo="repo", sort_by="name", @@ -138,6 +139,7 @@ def test_method_run_with_all_params(self, client: OzAPI) -> None: "worker_host": "worker_host", }, conversation_id="conversation_id", + interactive=True, prompt="Fix the bug in auth.go", skill="skill", team=True, @@ -183,6 +185,7 @@ async def test_method_list(self, async_client: AsyncOzAPI) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncOzAPI) -> None: agent = await async_client.agent.list( + include_malformed_skills=True, refresh=True, repo="repo", sort_by="name", @@ -290,6 +293,7 @@ async def test_method_run_with_all_params(self, async_client: AsyncOzAPI) -> Non "worker_host": "worker_host", }, conversation_id="conversation_id", + interactive=True, prompt="Fix the bug in auth.go", skill="skill", team=True, diff --git a/tests/test_client.py b/tests/test_client.py index 0622cd8..46b6ed3 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -943,8 +943,14 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") - # Delete in case our environment has this set + # Delete in case our environment has any proxy env vars set monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultHttpxClient() @@ -1845,8 +1851,14 @@ async def test_get_platform(self) -> None: async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") - # Delete in case our environment has this set + # Delete in case our environment has any proxy env vars set monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultAsyncHttpxClient()