From bec379980606633f10689ab4d010263e1392a68e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 06:22:43 +0000 Subject: [PATCH 1/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index da7496f1..cf398e1e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 34 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-17022011bf153e3ac9e20d23c5dca8a3072b0e735b47bb391b6e35b00348d5a5.yml -openapi_spec_hash: 0927cdce49a6e6915d6060c2ab43b0d0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-b5b567ef5b14f4b23f01e69b75d282ba3cf0ce6e8f5d57c859e844fbbf99eed6.yml +openapi_spec_hash: 2ddd1cbab48974dbf6357c2c10ee4701 config_hash: 0197f86ba1a4b1b5ce813d0e62138588 From 010d1636a2867020d66e5851938b25940bc04f57 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 07:22:45 +0000 Subject: [PATCH 2/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cf398e1e..da7496f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 34 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-b5b567ef5b14f4b23f01e69b75d282ba3cf0ce6e8f5d57c859e844fbbf99eed6.yml -openapi_spec_hash: 2ddd1cbab48974dbf6357c2c10ee4701 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-17022011bf153e3ac9e20d23c5dca8a3072b0e735b47bb391b6e35b00348d5a5.yml +openapi_spec_hash: 0927cdce49a6e6915d6060c2ab43b0d0 config_hash: 0197f86ba1a4b1b5ce813d0e62138588 From dfade4b01f1f516395fd6c653c0302d8df1c38cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 10:22:45 +0000 Subject: [PATCH 3/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index da7496f1..cf398e1e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 34 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-17022011bf153e3ac9e20d23c5dca8a3072b0e735b47bb391b6e35b00348d5a5.yml -openapi_spec_hash: 0927cdce49a6e6915d6060c2ab43b0d0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-b5b567ef5b14f4b23f01e69b75d282ba3cf0ce6e8f5d57c859e844fbbf99eed6.yml +openapi_spec_hash: 2ddd1cbab48974dbf6357c2c10ee4701 config_hash: 0197f86ba1a4b1b5ce813d0e62138588 From a660b5140a2708aa351f20bbfec13dcda93c0f76 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 12:22:42 +0000 Subject: [PATCH 4/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cf398e1e..da7496f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 34 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-b5b567ef5b14f4b23f01e69b75d282ba3cf0ce6e8f5d57c859e844fbbf99eed6.yml -openapi_spec_hash: 2ddd1cbab48974dbf6357c2c10ee4701 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-17022011bf153e3ac9e20d23c5dca8a3072b0e735b47bb391b6e35b00348d5a5.yml +openapi_spec_hash: 0927cdce49a6e6915d6060c2ab43b0d0 config_hash: 0197f86ba1a4b1b5ce813d0e62138588 From 3c875559a38a8845d15f09bc09e96f3b5cb7fcec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 14:22:37 +0000 Subject: [PATCH 5/9] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index da7496f1..cf398e1e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 34 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-17022011bf153e3ac9e20d23c5dca8a3072b0e735b47bb391b6e35b00348d5a5.yml -openapi_spec_hash: 0927cdce49a6e6915d6060c2ab43b0d0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-b5b567ef5b14f4b23f01e69b75d282ba3cf0ce6e8f5d57c859e844fbbf99eed6.yml +openapi_spec_hash: 2ddd1cbab48974dbf6357c2c10ee4701 config_hash: 0197f86ba1a4b1b5ce813d0e62138588 From b732dfac50cacc90c84a751fd6c75d18fa5b43ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 15:20:43 +0000 Subject: [PATCH 6/9] feat(api): update via SDK Studio --- .stats.yml | 8 +- api.md | 13 + src/agentex/_client.py | 16 +- src/agentex/resources/__init__.py | 14 + src/agentex/resources/deployment_history.py | 272 ++++++++++++++++++ src/agentex/types/__init__.py | 3 + src/agentex/types/agent.py | 5 +- src/agentex/types/deployment_history.py | 33 +++ .../types/deployment_history_list_params.py | 18 ++ .../types/deployment_history_list_response.py | 10 + .../api_resources/test_deployment_history.py | 186 ++++++++++++ 11 files changed, 572 insertions(+), 6 deletions(-) create mode 100644 src/agentex/resources/deployment_history.py create mode 100644 src/agentex/types/deployment_history.py create mode 100644 src/agentex/types/deployment_history_list_params.py create mode 100644 src/agentex/types/deployment_history_list_response.py create mode 100644 tests/api_resources/test_deployment_history.py diff --git a/.stats.yml b/.stats.yml index bfd09cb6..b5e58ac5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 34 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c1368f8609bf74b5f5f6439d2e34e5f52aa9a391c2f46fdb36682a2960daaf25.yml -openapi_spec_hash: c7a8cab4aab71cb7e2414111350519e7 -config_hash: 0197f86ba1a4b1b5ce813d0e62138588 +configured_endpoints: 36 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-b5b567ef5b14f4b23f01e69b75d282ba3cf0ce6e8f5d57c859e844fbbf99eed6.yml +openapi_spec_hash: 2ddd1cbab48974dbf6357c2c10ee4701 +config_hash: 758ca2ffe20517da913adf250c924c8a diff --git a/api.md b/api.md index 2b397d0c..cefce8cd 100644 --- a/api.md +++ b/api.md @@ -152,3 +152,16 @@ Methods: - client.tracker.retrieve(tracker_id) -> AgentTaskTracker - client.tracker.update(tracker_id, \*\*params) -> AgentTaskTracker - client.tracker.list(\*\*params) -> TrackerListResponse + +# DeploymentHistory + +Types: + +```python +from agentex.types import DeploymentHistory, DeploymentHistoryListResponse +``` + +Methods: + +- client.deployment_history.retrieve(deployment_id) -> DeploymentHistory +- client.deployment_history.list(\*\*params) -> DeploymentHistoryListResponse diff --git a/src/agentex/_client.py b/src/agentex/_client.py index a87f6cbf..170ea0ef 100644 --- a/src/agentex/_client.py +++ b/src/agentex/_client.py @@ -21,7 +21,7 @@ ) from ._utils import is_given, get_async_library from ._version import __version__ -from .resources import spans, tasks, agents, events, states, tracker +from .resources import spans, tasks, agents, events, states, tracker, deployment_history from ._streaming import Stream as Stream, AsyncStream as AsyncStream from ._exceptions import APIStatusError from ._base_client import ( @@ -57,6 +57,7 @@ class Agentex(SyncAPIClient): states: states.StatesResource events: events.EventsResource tracker: tracker.TrackerResource + deployment_history: deployment_history.DeploymentHistoryResource with_raw_response: AgentexWithRawResponse with_streaming_response: AgentexWithStreamedResponse @@ -141,6 +142,7 @@ def __init__( self.states = states.StatesResource(self) self.events = events.EventsResource(self) self.tracker = tracker.TrackerResource(self) + self.deployment_history = deployment_history.DeploymentHistoryResource(self) self.with_raw_response = AgentexWithRawResponse(self) self.with_streaming_response = AgentexWithStreamedResponse(self) @@ -261,6 +263,7 @@ class AsyncAgentex(AsyncAPIClient): states: states.AsyncStatesResource events: events.AsyncEventsResource tracker: tracker.AsyncTrackerResource + deployment_history: deployment_history.AsyncDeploymentHistoryResource with_raw_response: AsyncAgentexWithRawResponse with_streaming_response: AsyncAgentexWithStreamedResponse @@ -345,6 +348,7 @@ def __init__( self.states = states.AsyncStatesResource(self) self.events = events.AsyncEventsResource(self) self.tracker = tracker.AsyncTrackerResource(self) + self.deployment_history = deployment_history.AsyncDeploymentHistoryResource(self) self.with_raw_response = AsyncAgentexWithRawResponse(self) self.with_streaming_response = AsyncAgentexWithStreamedResponse(self) @@ -466,6 +470,7 @@ def __init__(self, client: Agentex) -> None: self.states = states.StatesResourceWithRawResponse(client.states) self.events = events.EventsResourceWithRawResponse(client.events) self.tracker = tracker.TrackerResourceWithRawResponse(client.tracker) + self.deployment_history = deployment_history.DeploymentHistoryResourceWithRawResponse(client.deployment_history) class AsyncAgentexWithRawResponse: @@ -477,6 +482,9 @@ def __init__(self, client: AsyncAgentex) -> None: self.states = states.AsyncStatesResourceWithRawResponse(client.states) self.events = events.AsyncEventsResourceWithRawResponse(client.events) self.tracker = tracker.AsyncTrackerResourceWithRawResponse(client.tracker) + self.deployment_history = deployment_history.AsyncDeploymentHistoryResourceWithRawResponse( + client.deployment_history + ) class AgentexWithStreamedResponse: @@ -488,6 +496,9 @@ def __init__(self, client: Agentex) -> None: self.states = states.StatesResourceWithStreamingResponse(client.states) self.events = events.EventsResourceWithStreamingResponse(client.events) self.tracker = tracker.TrackerResourceWithStreamingResponse(client.tracker) + self.deployment_history = deployment_history.DeploymentHistoryResourceWithStreamingResponse( + client.deployment_history + ) class AsyncAgentexWithStreamedResponse: @@ -499,6 +510,9 @@ def __init__(self, client: AsyncAgentex) -> None: self.states = states.AsyncStatesResourceWithStreamingResponse(client.states) self.events = events.AsyncEventsResourceWithStreamingResponse(client.events) self.tracker = tracker.AsyncTrackerResourceWithStreamingResponse(client.tracker) + self.deployment_history = deployment_history.AsyncDeploymentHistoryResourceWithStreamingResponse( + client.deployment_history + ) Client = Agentex diff --git a/src/agentex/resources/__init__.py b/src/agentex/resources/__init__.py index cbf2ff6e..d0ccdc80 100644 --- a/src/agentex/resources/__init__.py +++ b/src/agentex/resources/__init__.py @@ -56,6 +56,14 @@ MessagesResourceWithStreamingResponse, AsyncMessagesResourceWithStreamingResponse, ) +from .deployment_history import ( + DeploymentHistoryResource, + AsyncDeploymentHistoryResource, + DeploymentHistoryResourceWithRawResponse, + AsyncDeploymentHistoryResourceWithRawResponse, + DeploymentHistoryResourceWithStreamingResponse, + AsyncDeploymentHistoryResourceWithStreamingResponse, +) __all__ = [ "AgentsResource", @@ -100,4 +108,10 @@ "AsyncTrackerResourceWithRawResponse", "TrackerResourceWithStreamingResponse", "AsyncTrackerResourceWithStreamingResponse", + "DeploymentHistoryResource", + "AsyncDeploymentHistoryResource", + "DeploymentHistoryResourceWithRawResponse", + "AsyncDeploymentHistoryResourceWithRawResponse", + "DeploymentHistoryResourceWithStreamingResponse", + "AsyncDeploymentHistoryResourceWithStreamingResponse", ] diff --git a/src/agentex/resources/deployment_history.py b/src/agentex/resources/deployment_history.py new file mode 100644 index 00000000..4f3638cf --- /dev/null +++ b/src/agentex/resources/deployment_history.py @@ -0,0 +1,272 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional + +import httpx + +from ..types import deployment_history_list_params +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from .._utils import maybe_transform, async_maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from .._base_client import make_request_options +from ..types.deployment_history import DeploymentHistory +from ..types.deployment_history_list_response import DeploymentHistoryListResponse + +__all__ = ["DeploymentHistoryResource", "AsyncDeploymentHistoryResource"] + + +class DeploymentHistoryResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> DeploymentHistoryResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/scaleapi/scale-agentex-python#accessing-raw-response-data-eg-headers + """ + return DeploymentHistoryResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> DeploymentHistoryResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/scaleapi/scale-agentex-python#with_streaming_response + """ + return DeploymentHistoryResourceWithStreamingResponse(self) + + def retrieve( + self, + deployment_id: str, + *, + # 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, + ) -> DeploymentHistory: + """ + Get a deployment record by its unique ID. + + Args: + 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 + """ + if not deployment_id: + raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}") + return self._get( + f"/deployment-history/{deployment_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=DeploymentHistory, + ) + + def list( + self, + *, + agent_id: Optional[str] | Omit = omit, + agent_name: Optional[str] | Omit = omit, + limit: int | Omit = omit, + page_number: int | 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, + ) -> DeploymentHistoryListResponse: + """ + List deployment history for an agent. + + Args: + 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( + "/deployment-history", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "agent_id": agent_id, + "agent_name": agent_name, + "limit": limit, + "page_number": page_number, + }, + deployment_history_list_params.DeploymentHistoryListParams, + ), + ), + cast_to=DeploymentHistoryListResponse, + ) + + +class AsyncDeploymentHistoryResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncDeploymentHistoryResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/scaleapi/scale-agentex-python#accessing-raw-response-data-eg-headers + """ + return AsyncDeploymentHistoryResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncDeploymentHistoryResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/scaleapi/scale-agentex-python#with_streaming_response + """ + return AsyncDeploymentHistoryResourceWithStreamingResponse(self) + + async def retrieve( + self, + deployment_id: str, + *, + # 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, + ) -> DeploymentHistory: + """ + Get a deployment record by its unique ID. + + Args: + 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 + """ + if not deployment_id: + raise ValueError(f"Expected a non-empty value for `deployment_id` but received {deployment_id!r}") + return await self._get( + f"/deployment-history/{deployment_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=DeploymentHistory, + ) + + async def list( + self, + *, + agent_id: Optional[str] | Omit = omit, + agent_name: Optional[str] | Omit = omit, + limit: int | Omit = omit, + page_number: int | 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, + ) -> DeploymentHistoryListResponse: + """ + List deployment history for an agent. + + Args: + 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( + "/deployment-history", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "agent_id": agent_id, + "agent_name": agent_name, + "limit": limit, + "page_number": page_number, + }, + deployment_history_list_params.DeploymentHistoryListParams, + ), + ), + cast_to=DeploymentHistoryListResponse, + ) + + +class DeploymentHistoryResourceWithRawResponse: + def __init__(self, deployment_history: DeploymentHistoryResource) -> None: + self._deployment_history = deployment_history + + self.retrieve = to_raw_response_wrapper( + deployment_history.retrieve, + ) + self.list = to_raw_response_wrapper( + deployment_history.list, + ) + + +class AsyncDeploymentHistoryResourceWithRawResponse: + def __init__(self, deployment_history: AsyncDeploymentHistoryResource) -> None: + self._deployment_history = deployment_history + + self.retrieve = async_to_raw_response_wrapper( + deployment_history.retrieve, + ) + self.list = async_to_raw_response_wrapper( + deployment_history.list, + ) + + +class DeploymentHistoryResourceWithStreamingResponse: + def __init__(self, deployment_history: DeploymentHistoryResource) -> None: + self._deployment_history = deployment_history + + self.retrieve = to_streamed_response_wrapper( + deployment_history.retrieve, + ) + self.list = to_streamed_response_wrapper( + deployment_history.list, + ) + + +class AsyncDeploymentHistoryResourceWithStreamingResponse: + def __init__(self, deployment_history: AsyncDeploymentHistoryResource) -> None: + self._deployment_history = deployment_history + + self.retrieve = async_to_streamed_response_wrapper( + deployment_history.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + deployment_history.list, + ) diff --git a/src/agentex/types/__init__.py b/src/agentex/types/__init__.py index 47e148bb..218239d8 100644 --- a/src/agentex/types/__init__.py +++ b/src/agentex/types/__init__.py @@ -28,6 +28,7 @@ from .agent_rpc_response import AgentRpcResponse as AgentRpcResponse from .agent_task_tracker import AgentTaskTracker as AgentTaskTracker from .data_content_param import DataContentParam as DataContentParam +from .deployment_history import DeploymentHistory as DeploymentHistory from .span_create_params import SpanCreateParams as SpanCreateParams from .span_list_response import SpanListResponse as SpanListResponse from .span_update_params import SpanUpdateParams as SpanUpdateParams @@ -62,4 +63,6 @@ from .tool_request_content_param import ToolRequestContentParam as ToolRequestContentParam from .tool_response_content_param import ToolResponseContentParam as ToolResponseContentParam from .task_retrieve_by_name_params import TaskRetrieveByNameParams as TaskRetrieveByNameParams +from .deployment_history_list_params import DeploymentHistoryListParams as DeploymentHistoryListParams from .task_retrieve_by_name_response import TaskRetrieveByNameResponse as TaskRetrieveByNameResponse +from .deployment_history_list_response import DeploymentHistoryListResponse as DeploymentHistoryListResponse diff --git a/src/agentex/types/agent.py b/src/agentex/types/agent.py index 19633b61..7828822c 100644 --- a/src/agentex/types/agent.py +++ b/src/agentex/types/agent.py @@ -29,13 +29,16 @@ class Agent(BaseModel): updated_at: datetime """The timestamp when the agent was last updated""" + agent_input_type: Optional[Literal["text", "json"]] = None + """The type of input the agent expects.""" + registered_at: Optional[datetime] = None """The timestamp when the agent was last registered""" registration_metadata: Optional[Dict[str, object]] = None """The metadata for the agent's registration.""" - status: Optional[Literal["Ready", "Failed", "Unknown", "Deleted"]] = None + status: Optional[Literal["Ready", "Failed", "Unknown", "Deleted", "Unhealthy"]] = None """The status of the action, indicating if it's building, ready, failed, etc.""" status_reason: Optional[str] = None diff --git a/src/agentex/types/deployment_history.py b/src/agentex/types/deployment_history.py new file mode 100644 index 00000000..f9e3ce51 --- /dev/null +++ b/src/agentex/types/deployment_history.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from datetime import datetime + +from .._models import BaseModel + +__all__ = ["DeploymentHistory"] + + +class DeploymentHistory(BaseModel): + id: str + """The unique identifier of the deployment record""" + + agent_id: str + """The ID of the agent this deployment belongs to""" + + author_email: str + """Email of the commit author""" + + author_name: str + """Name of the commit author""" + + branch_name: str + """Name of the branch""" + + build_timestamp: datetime + """When the build was created""" + + commit_hash: str + """Git commit hash for this deployment""" + + deployment_timestamp: datetime + """When this deployment was first seen in the system""" diff --git a/src/agentex/types/deployment_history_list_params.py b/src/agentex/types/deployment_history_list_params.py new file mode 100644 index 00000000..b26b2462 --- /dev/null +++ b/src/agentex/types/deployment_history_list_params.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Optional +from typing_extensions import TypedDict + +__all__ = ["DeploymentHistoryListParams"] + + +class DeploymentHistoryListParams(TypedDict, total=False): + agent_id: Optional[str] + + agent_name: Optional[str] + + limit: int + + page_number: int diff --git a/src/agentex/types/deployment_history_list_response.py b/src/agentex/types/deployment_history_list_response.py new file mode 100644 index 00000000..c71a8f03 --- /dev/null +++ b/src/agentex/types/deployment_history_list_response.py @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List +from typing_extensions import TypeAlias + +from .deployment_history import DeploymentHistory + +__all__ = ["DeploymentHistoryListResponse"] + +DeploymentHistoryListResponse: TypeAlias = List[DeploymentHistory] diff --git a/tests/api_resources/test_deployment_history.py b/tests/api_resources/test_deployment_history.py new file mode 100644 index 00000000..cd5471af --- /dev/null +++ b/tests/api_resources/test_deployment_history.py @@ -0,0 +1,186 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from agentex import Agentex, AsyncAgentex +from tests.utils import assert_matches_type +from agentex.types import DeploymentHistory, DeploymentHistoryListResponse + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestDeploymentHistory: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_retrieve(self, client: Agentex) -> None: + deployment_history = client.deployment_history.retrieve( + "deployment_id", + ) + assert_matches_type(DeploymentHistory, deployment_history, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_raw_response_retrieve(self, client: Agentex) -> None: + response = client.deployment_history.with_raw_response.retrieve( + "deployment_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment_history = response.parse() + assert_matches_type(DeploymentHistory, deployment_history, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_streaming_response_retrieve(self, client: Agentex) -> None: + with client.deployment_history.with_streaming_response.retrieve( + "deployment_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment_history = response.parse() + assert_matches_type(DeploymentHistory, deployment_history, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_path_params_retrieve(self, client: Agentex) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): + client.deployment_history.with_raw_response.retrieve( + "", + ) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_list(self, client: Agentex) -> None: + deployment_history = client.deployment_history.list() + assert_matches_type(DeploymentHistoryListResponse, deployment_history, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_list_with_all_params(self, client: Agentex) -> None: + deployment_history = client.deployment_history.list( + agent_id="agent_id", + agent_name="agent_name", + limit=0, + page_number=0, + ) + assert_matches_type(DeploymentHistoryListResponse, deployment_history, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_raw_response_list(self, client: Agentex) -> None: + response = client.deployment_history.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment_history = response.parse() + assert_matches_type(DeploymentHistoryListResponse, deployment_history, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_streaming_response_list(self, client: Agentex) -> None: + with client.deployment_history.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment_history = response.parse() + assert_matches_type(DeploymentHistoryListResponse, deployment_history, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncDeploymentHistory: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_retrieve(self, async_client: AsyncAgentex) -> None: + deployment_history = await async_client.deployment_history.retrieve( + "deployment_id", + ) + assert_matches_type(DeploymentHistory, deployment_history, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncAgentex) -> None: + response = await async_client.deployment_history.with_raw_response.retrieve( + "deployment_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment_history = await response.parse() + assert_matches_type(DeploymentHistory, deployment_history, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncAgentex) -> None: + async with async_client.deployment_history.with_streaming_response.retrieve( + "deployment_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment_history = await response.parse() + assert_matches_type(DeploymentHistory, deployment_history, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncAgentex) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `deployment_id` but received ''"): + await async_client.deployment_history.with_raw_response.retrieve( + "", + ) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_list(self, async_client: AsyncAgentex) -> None: + deployment_history = await async_client.deployment_history.list() + assert_matches_type(DeploymentHistoryListResponse, deployment_history, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> None: + deployment_history = await async_client.deployment_history.list( + agent_id="agent_id", + agent_name="agent_name", + limit=0, + page_number=0, + ) + assert_matches_type(DeploymentHistoryListResponse, deployment_history, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_raw_response_list(self, async_client: AsyncAgentex) -> None: + response = await async_client.deployment_history.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + deployment_history = await response.parse() + assert_matches_type(DeploymentHistoryListResponse, deployment_history, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_streaming_response_list(self, async_client: AsyncAgentex) -> None: + async with async_client.deployment_history.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + deployment_history = await response.parse() + assert_matches_type(DeploymentHistoryListResponse, deployment_history, path=["response"]) + + assert cast(Any, response.is_closed) is True From 90a1cef7f370ac3bebc95408dbc764f1a17ea25c Mon Sep 17 00:00:00 2001 From: Declan Brady Date: Wed, 5 Nov 2025 10:29:06 -0500 Subject: [PATCH 7/9] Correct utils path --- tests/api_resources/test_deployment_history.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/api_resources/test_deployment_history.py b/tests/api_resources/test_deployment_history.py index cd5471af..b487bfc3 100644 --- a/tests/api_resources/test_deployment_history.py +++ b/tests/api_resources/test_deployment_history.py @@ -8,7 +8,7 @@ import pytest from agentex import Agentex, AsyncAgentex -from tests.utils import assert_matches_type +from ..utils import assert_matches_type from agentex.types import DeploymentHistory, DeploymentHistoryListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") From 77beeb1850ad4e012cba5aae13c63bd3b59e2f4e Mon Sep 17 00:00:00 2001 From: Declan Brady Date: Wed, 5 Nov 2025 10:32:01 -0500 Subject: [PATCH 8/9] Run lint --- tests/api_resources/test_deployment_history.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/api_resources/test_deployment_history.py b/tests/api_resources/test_deployment_history.py index b487bfc3..89012bf9 100644 --- a/tests/api_resources/test_deployment_history.py +++ b/tests/api_resources/test_deployment_history.py @@ -8,9 +8,10 @@ import pytest from agentex import Agentex, AsyncAgentex -from ..utils import assert_matches_type from agentex.types import DeploymentHistory, DeploymentHistoryListResponse +from ..utils import assert_matches_type + base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") From 9aea652feee69216b40686d05c14505ff0f21014 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 15:58:49 +0000 Subject: [PATCH 9/9] release: 0.6.2 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/agentex/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ac031714..e3778b2c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.6.1" + ".": "0.6.2" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 11b7996c..22fd8166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.6.2 (2025-11-05) + +Full Changelog: [v0.6.1...v0.6.2](https://github.com/scaleapi/scale-agentex-python/compare/v0.6.1...v0.6.2) + +### Features + +* **api:** update via SDK Studio ([b732dfa](https://github.com/scaleapi/scale-agentex-python/commit/b732dfac50cacc90c84a751fd6c75d18fa5b43ed)) + ## 0.6.1 (2025-11-05) Full Changelog: [v0.6.0...v0.6.1](https://github.com/scaleapi/scale-agentex-python/compare/v0.6.0...v0.6.1) diff --git a/pyproject.toml b/pyproject.toml index d3643f6c..a2c7bd0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "agentex-sdk" -version = "0.6.1" +version = "0.6.2" description = "The official Python library for the agentex API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/agentex/_version.py b/src/agentex/_version.py index c772a2ab..4caa2ac3 100644 --- a/src/agentex/_version.py +++ b/src/agentex/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "agentex" -__version__ = "0.6.1" # x-release-please-version +__version__ = "0.6.2" # x-release-please-version