From 1e41fc2529c0c2616183ffcadca7a9a27f097ea9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 12 Dec 2025 19:31:57 +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 3b293f90..fbcaba61 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 35 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-6feb0601dafb255298a2f1da01d64541d40da90aeb527e2f444c49c993e8c162.yml -openapi_spec_hash: 973cd2ed3c945818d15b7deee0b25d71 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-8f9296ac9fa68bb264c4739463e55ce27cdafb31b705b27600d6656db7b0dac5.yml +openapi_spec_hash: 47f4675ac3c7198869240b5c6f33f8fd config_hash: 32eb65911c08ac84d117cecdf2759869 From 4c95c94df570277fc49281f1343cb012e8da2334 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Dec 2025 02:31:56 +0000 Subject: [PATCH 02/34] feat(api): api update --- .stats.yml | 6 +- api.md | 8 +- src/agentex/resources/agents.py | 46 +---- src/agentex/resources/messages/messages.py | 174 +----------------- src/agentex/resources/spans.py | 30 +-- src/agentex/resources/states.py | 32 ---- src/agentex/resources/tasks.py | 78 ++------ src/agentex/resources/tracker.py | 32 ---- src/agentex/types/__init__.py | 6 - src/agentex/types/acp_type.py | 2 +- src/agentex/types/agent.py | 7 +- src/agentex/types/agent_list_params.py | 12 -- .../types/message_list_paginated_params.py | 19 -- .../types/message_list_paginated_response.py | 21 --- src/agentex/types/message_list_params.py | 8 +- src/agentex/types/span_list_params.py | 8 - src/agentex/types/state_list_params.py | 12 -- src/agentex/types/task_list_params.py | 14 +- src/agentex/types/task_list_response.py | 35 +--- .../types/task_retrieve_by_name_params.py | 12 -- .../types/task_retrieve_by_name_response.py | 32 ---- src/agentex/types/task_retrieve_params.py | 12 -- src/agentex/types/task_retrieve_response.py | 32 ---- src/agentex/types/tracker_list_params.py | 12 -- tests/api_resources/test_agents.py | 8 - tests/api_resources/test_messages.py | 97 ---------- tests/api_resources/test_spans.py | 8 - tests/api_resources/test_states.py | 8 - tests/api_resources/test_tasks.py | 108 +++-------- tests/api_resources/test_tracker.py | 8 - 30 files changed, 70 insertions(+), 817 deletions(-) delete mode 100644 src/agentex/types/message_list_paginated_params.py delete mode 100644 src/agentex/types/message_list_paginated_response.py delete mode 100644 src/agentex/types/task_retrieve_by_name_params.py delete mode 100644 src/agentex/types/task_retrieve_by_name_response.py delete mode 100644 src/agentex/types/task_retrieve_params.py delete mode 100644 src/agentex/types/task_retrieve_response.py diff --git a/.stats.yml b/.stats.yml index fbcaba61..2cff198e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 35 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-8f9296ac9fa68bb264c4739463e55ce27cdafb31b705b27600d6656db7b0dac5.yml -openapi_spec_hash: 47f4675ac3c7198869240b5c6f33f8fd +configured_endpoints: 34 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 diff --git a/api.md b/api.md index f70f9b19..38dfa5b3 100644 --- a/api.md +++ b/api.md @@ -43,16 +43,16 @@ Methods: Types: ```python -from agentex.types import Task, TaskRetrieveResponse, TaskListResponse, TaskRetrieveByNameResponse +from agentex.types import Task, TaskListResponse ``` Methods: -- client.tasks.retrieve(task_id, \*\*params) -> TaskRetrieveResponse +- client.tasks.retrieve(task_id) -> Task - client.tasks.list(\*\*params) -> TaskListResponse - client.tasks.delete(task_id) -> DeleteResponse - client.tasks.delete_by_name(task_name) -> DeleteResponse -- client.tasks.retrieve_by_name(task_name, \*\*params) -> TaskRetrieveByNameResponse +- client.tasks.retrieve_by_name(task_name) -> Task - client.tasks.stream_events(task_id) -> object - client.tasks.stream_events_by_name(task_name) -> object @@ -72,7 +72,6 @@ from agentex.types import ( ToolRequestContent, ToolResponseContent, MessageListResponse, - MessageListPaginatedResponse, ) ``` @@ -82,7 +81,6 @@ Methods: - client.messages.retrieve(message_id) -> TaskMessage - client.messages.update(message_id, \*\*params) -> TaskMessage - client.messages.list(\*\*params) -> MessageListResponse -- client.messages.list_paginated(\*\*params) -> MessageListPaginatedResponse ## Batch diff --git a/src/agentex/resources/agents.py b/src/agentex/resources/agents.py index ae6821e7..8209683b 100644 --- a/src/agentex/resources/agents.py +++ b/src/agentex/resources/agents.py @@ -92,10 +92,6 @@ def retrieve( def list( self, *, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -108,14 +104,6 @@ def list( List all registered agents, optionally filtered by query parameters. Args: - limit: Limit - - order_by: Field to order by - - order_direction: Order direction (asc or desc) - - page_number: Page number - task_id: Task ID extra_headers: Send extra headers @@ -133,16 +121,7 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( - { - "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, - "task_id": task_id, - }, - agent_list_params.AgentListParams, - ), + query=maybe_transform({"task_id": task_id}, agent_list_params.AgentListParams), ), cast_to=AgentListResponse, ) @@ -660,10 +639,6 @@ async def retrieve( async def list( self, *, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -676,14 +651,6 @@ async def list( List all registered agents, optionally filtered by query parameters. Args: - limit: Limit - - order_by: Field to order by - - order_direction: Order direction (asc or desc) - - page_number: Page number - task_id: Task ID extra_headers: Send extra headers @@ -701,16 +668,7 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( - { - "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, - "task_id": task_id, - }, - agent_list_params.AgentListParams, - ), + query=await async_maybe_transform({"task_id": task_id}, agent_list_params.AgentListParams), ), cast_to=AgentListResponse, ) diff --git a/src/agentex/resources/messages/messages.py b/src/agentex/resources/messages/messages.py index e1256449..d45aa6fa 100644 --- a/src/agentex/resources/messages/messages.py +++ b/src/agentex/resources/messages/messages.py @@ -15,12 +15,7 @@ BatchResourceWithStreamingResponse, AsyncBatchResourceWithStreamingResponse, ) -from ...types import ( - message_list_params, - message_create_params, - message_update_params, - message_list_paginated_params, -) +from ...types import message_list_params, message_create_params, message_update_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 @@ -35,7 +30,6 @@ from ...types.task_message import TaskMessage from ...types.message_list_response import MessageListResponse from ...types.task_message_content_param import TaskMessageContentParam -from ...types.message_list_paginated_response import MessageListPaginatedResponse __all__ = ["MessagesResource", "AsyncMessagesResource"] @@ -186,10 +180,7 @@ def list( self, *, task_id: str, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, + limit: Optional[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, @@ -198,10 +189,7 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MessageListResponse: """ - List messages for a task with offset-based pagination. - - For cursor-based pagination with infinite scroll support, use - /messages/paginated. + List Messages Args: task_id: The task ID @@ -225,9 +213,6 @@ def list( { "task_id": task_id, "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, }, message_list_params.MessageListParams, ), @@ -235,70 +220,6 @@ def list( cast_to=MessageListResponse, ) - def list_paginated( - self, - *, - task_id: str, - cursor: Optional[str] | Omit = omit, - direction: Literal["older", "newer"] | Omit = omit, - limit: 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, - ) -> MessageListPaginatedResponse: - """ - List messages for a task with cursor-based pagination. - - This endpoint is designed for infinite scroll UIs where new messages may arrive - while paginating through older ones. - - Args: task_id: The task ID to filter messages by limit: Maximum number of - messages to return (default: 50) cursor: Opaque cursor string for pagination. - Pass the `next_cursor` from a previous response to get the next page. direction: - Pagination direction - "older" to get older messages (default), "newer" to get - newer messages. - - Returns: PaginatedMessagesResponse with: - data: List of messages (newest first - when direction="older") - next_cursor: Cursor for fetching the next page (null - if no more pages) - has_more: Whether there are more messages to fetch - - Example: First request: GET /messages/paginated?task_id=xxx&limit=50 Next page: - GET /messages/paginated?task_id=xxx&limit=50&cursor= - - Args: - task_id: The task ID - - 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( - "/messages/paginated", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "task_id": task_id, - "cursor": cursor, - "direction": direction, - "limit": limit, - }, - message_list_paginated_params.MessageListPaginatedParams, - ), - ), - cast_to=MessageListPaginatedResponse, - ) - class AsyncMessagesResource(AsyncAPIResource): @cached_property @@ -446,10 +367,7 @@ async def list( self, *, task_id: str, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, + limit: Optional[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, @@ -458,10 +376,7 @@ async def list( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MessageListResponse: """ - List messages for a task with offset-based pagination. - - For cursor-based pagination with infinite scroll support, use - /messages/paginated. + List Messages Args: task_id: The task ID @@ -485,9 +400,6 @@ async def list( { "task_id": task_id, "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, }, message_list_params.MessageListParams, ), @@ -495,70 +407,6 @@ async def list( cast_to=MessageListResponse, ) - async def list_paginated( - self, - *, - task_id: str, - cursor: Optional[str] | Omit = omit, - direction: Literal["older", "newer"] | Omit = omit, - limit: 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, - ) -> MessageListPaginatedResponse: - """ - List messages for a task with cursor-based pagination. - - This endpoint is designed for infinite scroll UIs where new messages may arrive - while paginating through older ones. - - Args: task_id: The task ID to filter messages by limit: Maximum number of - messages to return (default: 50) cursor: Opaque cursor string for pagination. - Pass the `next_cursor` from a previous response to get the next page. direction: - Pagination direction - "older" to get older messages (default), "newer" to get - newer messages. - - Returns: PaginatedMessagesResponse with: - data: List of messages (newest first - when direction="older") - next_cursor: Cursor for fetching the next page (null - if no more pages) - has_more: Whether there are more messages to fetch - - Example: First request: GET /messages/paginated?task_id=xxx&limit=50 Next page: - GET /messages/paginated?task_id=xxx&limit=50&cursor= - - Args: - task_id: The task ID - - 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( - "/messages/paginated", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - { - "task_id": task_id, - "cursor": cursor, - "direction": direction, - "limit": limit, - }, - message_list_paginated_params.MessageListPaginatedParams, - ), - ), - cast_to=MessageListPaginatedResponse, - ) - class MessagesResourceWithRawResponse: def __init__(self, messages: MessagesResource) -> None: @@ -576,9 +424,6 @@ def __init__(self, messages: MessagesResource) -> None: self.list = to_raw_response_wrapper( messages.list, ) - self.list_paginated = to_raw_response_wrapper( - messages.list_paginated, - ) @cached_property def batch(self) -> BatchResourceWithRawResponse: @@ -601,9 +446,6 @@ def __init__(self, messages: AsyncMessagesResource) -> None: self.list = async_to_raw_response_wrapper( messages.list, ) - self.list_paginated = async_to_raw_response_wrapper( - messages.list_paginated, - ) @cached_property def batch(self) -> AsyncBatchResourceWithRawResponse: @@ -626,9 +468,6 @@ def __init__(self, messages: MessagesResource) -> None: self.list = to_streamed_response_wrapper( messages.list, ) - self.list_paginated = to_streamed_response_wrapper( - messages.list_paginated, - ) @cached_property def batch(self) -> BatchResourceWithStreamingResponse: @@ -651,9 +490,6 @@ def __init__(self, messages: AsyncMessagesResource) -> None: self.list = async_to_streamed_response_wrapper( messages.list, ) - self.list_paginated = async_to_streamed_response_wrapper( - messages.list_paginated, - ) @cached_property def batch(self) -> AsyncBatchResourceWithStreamingResponse: diff --git a/src/agentex/resources/spans.py b/src/agentex/resources/spans.py index 589c2ac6..068384c3 100644 --- a/src/agentex/resources/spans.py +++ b/src/agentex/resources/spans.py @@ -222,10 +222,6 @@ def update( def list( self, *, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, trace_id: Optional[str] | 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. @@ -253,16 +249,7 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( - { - "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, - "trace_id": trace_id, - }, - span_list_params.SpanListParams, - ), + query=maybe_transform({"trace_id": trace_id}, span_list_params.SpanListParams), ), cast_to=SpanListResponse, ) @@ -465,10 +452,6 @@ async def update( async def list( self, *, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, trace_id: Optional[str] | 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. @@ -496,16 +479,7 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( - { - "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, - "trace_id": trace_id, - }, - span_list_params.SpanListParams, - ), + query=await async_maybe_transform({"trace_id": trace_id}, span_list_params.SpanListParams), ), cast_to=SpanListResponse, ) diff --git a/src/agentex/resources/states.py b/src/agentex/resources/states.py index a8f3d085..6196e4e4 100644 --- a/src/agentex/resources/states.py +++ b/src/agentex/resources/states.py @@ -166,10 +166,6 @@ def list( self, *, agent_id: Optional[str] | Omit = omit, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -184,14 +180,6 @@ def list( Args: agent_id: Agent ID - limit: Limit - - order_by: Field to order by - - order_direction: Order direction (asc or desc) - - page_number: Page number - task_id: Task ID extra_headers: Send extra headers @@ -212,10 +200,6 @@ def list( query=maybe_transform( { "agent_id": agent_id, - "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, "task_id": task_id, }, state_list_params.StateListParams, @@ -400,10 +384,6 @@ async def list( self, *, agent_id: Optional[str] | Omit = omit, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -418,14 +398,6 @@ async def list( Args: agent_id: Agent ID - limit: Limit - - order_by: Field to order by - - order_direction: Order direction (asc or desc) - - page_number: Page number - task_id: Task ID extra_headers: Send extra headers @@ -446,10 +418,6 @@ async def list( query=await async_maybe_transform( { "agent_id": agent_id, - "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, "task_id": task_id, }, state_list_params.StateListParams, diff --git a/src/agentex/resources/tasks.py b/src/agentex/resources/tasks.py index 1bf41b7b..94e7c866 100644 --- a/src/agentex/resources/tasks.py +++ b/src/agentex/resources/tasks.py @@ -2,12 +2,11 @@ from __future__ import annotations -from typing import List, Optional -from typing_extensions import Literal +from typing import Optional import httpx -from ..types import task_list_params, task_retrieve_params, task_retrieve_by_name_params +from ..types import task_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 @@ -19,11 +18,10 @@ async_to_streamed_response_wrapper, ) from .._streaming import Stream, AsyncStream +from ..types.task import Task from .._base_client import make_request_options from ..types.task_list_response import TaskListResponse from ..types.shared.delete_response import DeleteResponse -from ..types.task_retrieve_response import TaskRetrieveResponse -from ..types.task_retrieve_by_name_response import TaskRetrieveByNameResponse __all__ = ["TasksResource", "AsyncTasksResource"] @@ -52,14 +50,13 @@ def retrieve( self, task_id: str, *, - relationships: List[Literal["agents"]] | 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, - ) -> TaskRetrieveResponse: + ) -> Task: """ Get a task by its unique ID. @@ -77,13 +74,9 @@ def retrieve( return self._get( f"/tasks/{task_id}", options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform({"relationships": relationships}, task_retrieve_params.TaskRetrieveParams), + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=TaskRetrieveResponse, + cast_to=Task, ) def list( @@ -91,11 +84,6 @@ def list( *, agent_id: Optional[str] | Omit = omit, agent_name: Optional[str] | Omit = omit, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, - relationships: List[Literal["agents"]] | 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, @@ -126,11 +114,6 @@ def list( { "agent_id": agent_id, "agent_name": agent_name, - "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, - "relationships": relationships, }, task_list_params.TaskListParams, ), @@ -208,14 +191,13 @@ def retrieve_by_name( self, task_name: str, *, - relationships: List[Literal["agents"]] | 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, - ) -> TaskRetrieveByNameResponse: + ) -> Task: """ Get a task by its unique name. @@ -233,15 +215,9 @@ def retrieve_by_name( return self._get( f"/tasks/name/{task_name}", options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - {"relationships": relationships}, task_retrieve_by_name_params.TaskRetrieveByNameParams - ), + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=TaskRetrieveByNameResponse, + cast_to=Task, ) def stream_events( @@ -339,14 +315,13 @@ async def retrieve( self, task_id: str, *, - relationships: List[Literal["agents"]] | 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, - ) -> TaskRetrieveResponse: + ) -> Task: """ Get a task by its unique ID. @@ -364,15 +339,9 @@ async def retrieve( return await self._get( f"/tasks/{task_id}", options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - {"relationships": relationships}, task_retrieve_params.TaskRetrieveParams - ), + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=TaskRetrieveResponse, + cast_to=Task, ) async def list( @@ -380,11 +349,6 @@ async def list( *, agent_id: Optional[str] | Omit = omit, agent_name: Optional[str] | Omit = omit, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, - relationships: List[Literal["agents"]] | 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, @@ -415,11 +379,6 @@ async def list( { "agent_id": agent_id, "agent_name": agent_name, - "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, - "relationships": relationships, }, task_list_params.TaskListParams, ), @@ -497,14 +456,13 @@ async def retrieve_by_name( self, task_name: str, *, - relationships: List[Literal["agents"]] | 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, - ) -> TaskRetrieveByNameResponse: + ) -> Task: """ Get a task by its unique name. @@ -522,15 +480,9 @@ async def retrieve_by_name( return await self._get( f"/tasks/name/{task_name}", options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - {"relationships": relationships}, task_retrieve_by_name_params.TaskRetrieveByNameParams - ), + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), - cast_to=TaskRetrieveByNameResponse, + cast_to=Task, ) async def stream_events( diff --git a/src/agentex/resources/tracker.py b/src/agentex/resources/tracker.py index 15906b3f..089e6a62 100644 --- a/src/agentex/resources/tracker.py +++ b/src/agentex/resources/tracker.py @@ -131,10 +131,6 @@ def list( self, *, agent_id: Optional[str] | Omit = omit, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -149,14 +145,6 @@ def list( Args: agent_id: Agent ID - limit: Limit - - order_by: Field to order by - - order_direction: Order direction (asc or desc) - - page_number: Page number - task_id: Task ID extra_headers: Send extra headers @@ -177,10 +165,6 @@ def list( query=maybe_transform( { "agent_id": agent_id, - "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, "task_id": task_id, }, tracker_list_params.TrackerListParams, @@ -297,10 +281,6 @@ async def list( self, *, agent_id: Optional[str] | Omit = omit, - limit: int | Omit = omit, - order_by: Optional[str] | Omit = omit, - order_direction: str | Omit = omit, - page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -315,14 +295,6 @@ async def list( Args: agent_id: Agent ID - limit: Limit - - order_by: Field to order by - - order_direction: Order direction (asc or desc) - - page_number: Page number - task_id: Task ID extra_headers: Send extra headers @@ -343,10 +315,6 @@ async def list( query=await async_maybe_transform( { "agent_id": agent_id, - "limit": limit, - "order_by": order_by, - "order_direction": order_direction, - "page_number": page_number, "task_id": task_id, }, tracker_list_params.TrackerListParams, diff --git a/src/agentex/types/__init__.py b/src/agentex/types/__init__.py index 140acd92..3f6b75d8 100644 --- a/src/agentex/types/__init__.py +++ b/src/agentex/types/__init__.py @@ -46,7 +46,6 @@ from .tool_response_delta import ToolResponseDelta as ToolResponseDelta from .tracker_list_params import TrackerListParams as TrackerListParams from .task_message_content import TaskMessageContent as TaskMessageContent -from .task_retrieve_params import TaskRetrieveParams as TaskRetrieveParams from .tool_request_content import ToolRequestContent as ToolRequestContent from .message_create_params import MessageCreateParams as MessageCreateParams from .message_list_response import MessageListResponse as MessageListResponse @@ -54,7 +53,6 @@ from .tool_response_content import ToolResponseContent as ToolResponseContent from .tracker_list_response import TrackerListResponse as TrackerListResponse from .tracker_update_params import TrackerUpdateParams as TrackerUpdateParams -from .task_retrieve_response import TaskRetrieveResponse as TaskRetrieveResponse from .reasoning_content_delta import ReasoningContentDelta as ReasoningContentDelta from .reasoning_content_param import ReasoningContentParam as ReasoningContentParam from .reasoning_summary_delta import ReasoningSummaryDelta as ReasoningSummaryDelta @@ -62,9 +60,5 @@ from .task_message_content_param import TaskMessageContentParam as TaskMessageContentParam 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 .message_list_paginated_params import MessageListPaginatedParams as MessageListPaginatedParams from .deployment_history_list_params import DeploymentHistoryListParams as DeploymentHistoryListParams -from .task_retrieve_by_name_response import TaskRetrieveByNameResponse as TaskRetrieveByNameResponse -from .message_list_paginated_response import MessageListPaginatedResponse as MessageListPaginatedResponse from .deployment_history_list_response import DeploymentHistoryListResponse as DeploymentHistoryListResponse diff --git a/src/agentex/types/acp_type.py b/src/agentex/types/acp_type.py index 8b70a292..ec86ddf5 100644 --- a/src/agentex/types/acp_type.py +++ b/src/agentex/types/acp_type.py @@ -4,4 +4,4 @@ __all__ = ["AcpType"] -AcpType: TypeAlias = Literal["sync", "async", "agentic"] +AcpType: TypeAlias = Literal["sync", "agentic"] diff --git a/src/agentex/types/agent.py b/src/agentex/types/agent.py index 7828822c..731332ab 100644 --- a/src/agentex/types/agent.py +++ b/src/agentex/types/agent.py @@ -15,7 +15,7 @@ class Agent(BaseModel): """The unique identifier of the agent.""" acp_type: AcpType - """The type of the ACP Server (Either sync or async)""" + """The type of the ACP Server (Either sync or agentic)""" created_at: datetime """The timestamp when the agent was created""" @@ -29,16 +29,13 @@ 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", "Unhealthy"]] = None + status: Optional[Literal["Ready", "Failed", "Unknown", "Deleted"]] = 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/agent_list_params.py b/src/agentex/types/agent_list_params.py index 084fdfae..b432174a 100644 --- a/src/agentex/types/agent_list_params.py +++ b/src/agentex/types/agent_list_params.py @@ -9,17 +9,5 @@ class AgentListParams(TypedDict, total=False): - limit: int - """Limit""" - - order_by: Optional[str] - """Field to order by""" - - order_direction: str - """Order direction (asc or desc)""" - - page_number: int - """Page number""" - task_id: Optional[str] """Task ID""" diff --git a/src/agentex/types/message_list_paginated_params.py b/src/agentex/types/message_list_paginated_params.py deleted file mode 100644 index 6dfe1e7e..00000000 --- a/src/agentex/types/message_list_paginated_params.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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 Literal, Required, TypedDict - -__all__ = ["MessageListPaginatedParams"] - - -class MessageListPaginatedParams(TypedDict, total=False): - task_id: Required[str] - """The task ID""" - - cursor: Optional[str] - - direction: Literal["older", "newer"] - - limit: int diff --git a/src/agentex/types/message_list_paginated_response.py b/src/agentex/types/message_list_paginated_response.py deleted file mode 100644 index 40af0b4a..00000000 --- a/src/agentex/types/message_list_paginated_response.py +++ /dev/null @@ -1,21 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from .._models import BaseModel -from .task_message import TaskMessage - -__all__ = ["MessageListPaginatedResponse"] - - -class MessageListPaginatedResponse(BaseModel): - """Response with cursor pagination metadata.""" - - data: List[TaskMessage] - """List of messages""" - - has_more: Optional[bool] = None - """Whether there are more messages to fetch""" - - next_cursor: Optional[str] = None - """Cursor for fetching the next page of older messages""" diff --git a/src/agentex/types/message_list_params.py b/src/agentex/types/message_list_params.py index 87027eed..4911bfa9 100644 --- a/src/agentex/types/message_list_params.py +++ b/src/agentex/types/message_list_params.py @@ -12,10 +12,4 @@ class MessageListParams(TypedDict, total=False): task_id: Required[str] """The task ID""" - limit: int - - order_by: Optional[str] - - order_direction: str - - page_number: int + limit: Optional[int] diff --git a/src/agentex/types/span_list_params.py b/src/agentex/types/span_list_params.py index 40d4d651..35218965 100644 --- a/src/agentex/types/span_list_params.py +++ b/src/agentex/types/span_list_params.py @@ -9,12 +9,4 @@ class SpanListParams(TypedDict, total=False): - limit: int - - order_by: Optional[str] - - order_direction: str - - page_number: int - trace_id: Optional[str] diff --git a/src/agentex/types/state_list_params.py b/src/agentex/types/state_list_params.py index 9cb7d3dc..6034d345 100644 --- a/src/agentex/types/state_list_params.py +++ b/src/agentex/types/state_list_params.py @@ -12,17 +12,5 @@ class StateListParams(TypedDict, total=False): agent_id: Optional[str] """Agent ID""" - limit: int - """Limit""" - - order_by: Optional[str] - """Field to order by""" - - order_direction: str - """Order direction (asc or desc)""" - - page_number: int - """Page number""" - task_id: Optional[str] """Task ID""" diff --git a/src/agentex/types/task_list_params.py b/src/agentex/types/task_list_params.py index e41bf821..f8bc3364 100644 --- a/src/agentex/types/task_list_params.py +++ b/src/agentex/types/task_list_params.py @@ -2,8 +2,8 @@ from __future__ import annotations -from typing import List, Optional -from typing_extensions import Literal, TypedDict +from typing import Optional +from typing_extensions import TypedDict __all__ = ["TaskListParams"] @@ -12,13 +12,3 @@ class TaskListParams(TypedDict, total=False): agent_id: Optional[str] agent_name: Optional[str] - - limit: int - - order_by: Optional[str] - - order_direction: str - - page_number: int - - relationships: List[Literal["agents"]] diff --git a/src/agentex/types/task_list_response.py b/src/agentex/types/task_list_response.py index 85f87c0e..c9607e60 100644 --- a/src/agentex/types/task_list_response.py +++ b/src/agentex/types/task_list_response.py @@ -1,35 +1,10 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Dict, List, Optional -from datetime import datetime -from typing_extensions import Literal, TypeAlias +from typing import List +from typing_extensions import TypeAlias -from .agent import Agent -from .._models import BaseModel +from .task import Task -__all__ = ["TaskListResponse", "TaskListResponseItem"] +__all__ = ["TaskListResponse"] - -class TaskListResponseItem(BaseModel): - """Task response model with optional related data based on relationships""" - - id: str - - agents: Optional[List[Agent]] = None - - created_at: Optional[datetime] = None - - name: Optional[str] = None - - params: Optional[Dict[str, object]] = None - - status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", "RUNNING", "TERMINATED", "TIMED_OUT", "DELETED"]] = None - - status_reason: Optional[str] = None - - task_metadata: Optional[Dict[str, object]] = None - - updated_at: Optional[datetime] = None - - -TaskListResponse: TypeAlias = List[TaskListResponseItem] +TaskListResponse: TypeAlias = List[Task] diff --git a/src/agentex/types/task_retrieve_by_name_params.py b/src/agentex/types/task_retrieve_by_name_params.py deleted file mode 100644 index 98d03982..00000000 --- a/src/agentex/types/task_retrieve_by_name_params.py +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List -from typing_extensions import Literal, TypedDict - -__all__ = ["TaskRetrieveByNameParams"] - - -class TaskRetrieveByNameParams(TypedDict, total=False): - relationships: List[Literal["agents"]] diff --git a/src/agentex/types/task_retrieve_by_name_response.py b/src/agentex/types/task_retrieve_by_name_response.py deleted file mode 100644 index 1ffc6819..00000000 --- a/src/agentex/types/task_retrieve_by_name_response.py +++ /dev/null @@ -1,32 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Dict, List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .agent import Agent -from .._models import BaseModel - -__all__ = ["TaskRetrieveByNameResponse"] - - -class TaskRetrieveByNameResponse(BaseModel): - """Task response model with optional related data based on relationships""" - - id: str - - agents: Optional[List[Agent]] = None - - created_at: Optional[datetime] = None - - name: Optional[str] = None - - params: Optional[Dict[str, object]] = None - - status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", "RUNNING", "TERMINATED", "TIMED_OUT", "DELETED"]] = None - - status_reason: Optional[str] = None - - task_metadata: Optional[Dict[str, object]] = None - - updated_at: Optional[datetime] = None diff --git a/src/agentex/types/task_retrieve_params.py b/src/agentex/types/task_retrieve_params.py deleted file mode 100644 index 61748a1b..00000000 --- a/src/agentex/types/task_retrieve_params.py +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List -from typing_extensions import Literal, TypedDict - -__all__ = ["TaskRetrieveParams"] - - -class TaskRetrieveParams(TypedDict, total=False): - relationships: List[Literal["agents"]] diff --git a/src/agentex/types/task_retrieve_response.py b/src/agentex/types/task_retrieve_response.py deleted file mode 100644 index 5f262946..00000000 --- a/src/agentex/types/task_retrieve_response.py +++ /dev/null @@ -1,32 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Dict, List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .agent import Agent -from .._models import BaseModel - -__all__ = ["TaskRetrieveResponse"] - - -class TaskRetrieveResponse(BaseModel): - """Task response model with optional related data based on relationships""" - - id: str - - agents: Optional[List[Agent]] = None - - created_at: Optional[datetime] = None - - name: Optional[str] = None - - params: Optional[Dict[str, object]] = None - - status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", "RUNNING", "TERMINATED", "TIMED_OUT", "DELETED"]] = None - - status_reason: Optional[str] = None - - task_metadata: Optional[Dict[str, object]] = None - - updated_at: Optional[datetime] = None diff --git a/src/agentex/types/tracker_list_params.py b/src/agentex/types/tracker_list_params.py index 57234f4a..47b4da7b 100644 --- a/src/agentex/types/tracker_list_params.py +++ b/src/agentex/types/tracker_list_params.py @@ -12,17 +12,5 @@ class TrackerListParams(TypedDict, total=False): agent_id: Optional[str] """Agent ID""" - limit: int - """Limit""" - - order_by: Optional[str] - """Field to order by""" - - order_direction: str - """Order direction (asc or desc)""" - - page_number: int - """Page number""" - task_id: Optional[str] """Task ID""" diff --git a/tests/api_resources/test_agents.py b/tests/api_resources/test_agents.py index 2b078045..4f2c58d0 100644 --- a/tests/api_resources/test_agents.py +++ b/tests/api_resources/test_agents.py @@ -75,10 +75,6 @@ def test_method_list(self, client: Agentex) -> None: @parametrize def test_method_list_with_all_params(self, client: Agentex) -> None: agent = client.agents.list( - limit=1, - order_by="order_by", - order_direction="order_direction", - page_number=1, task_id="task_id", ) assert_matches_type(AgentListResponse, agent, path=["response"]) @@ -419,10 +415,6 @@ async def test_method_list(self, async_client: AsyncAgentex) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> None: agent = await async_client.agents.list( - limit=1, - order_by="order_by", - order_direction="order_direction", - page_number=1, task_id="task_id", ) assert_matches_type(AgentListResponse, agent, path=["response"]) diff --git a/tests/api_resources/test_messages.py b/tests/api_resources/test_messages.py index 19a51ae7..0c53d9b0 100644 --- a/tests/api_resources/test_messages.py +++ b/tests/api_resources/test_messages.py @@ -11,7 +11,6 @@ from agentex.types import ( TaskMessage, MessageListResponse, - MessageListPaginatedResponse, ) from ..utils import assert_matches_type @@ -242,9 +241,6 @@ def test_method_list_with_all_params(self, client: Agentex) -> None: message = client.messages.list( task_id="task_id", limit=0, - order_by="order_by", - order_direction="order_direction", - page_number=0, ) assert_matches_type(MessageListResponse, message, path=["response"]) @@ -274,51 +270,6 @@ def test_streaming_response_list(self, client: Agentex) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - def test_method_list_paginated(self, client: Agentex) -> None: - message = client.messages.list_paginated( - task_id="task_id", - ) - assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - def test_method_list_paginated_with_all_params(self, client: Agentex) -> None: - message = client.messages.list_paginated( - task_id="task_id", - cursor="cursor", - direction="older", - limit=0, - ) - assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - def test_raw_response_list_paginated(self, client: Agentex) -> None: - response = client.messages.with_raw_response.list_paginated( - task_id="task_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - message = response.parse() - assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - def test_streaming_response_list_paginated(self, client: Agentex) -> None: - with client.messages.with_streaming_response.list_paginated( - task_id="task_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - message = response.parse() - assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) - - assert cast(Any, response.is_closed) is True - class TestAsyncMessages: parametrize = pytest.mark.parametrize( @@ -545,9 +496,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> message = await async_client.messages.list( task_id="task_id", limit=0, - order_by="order_by", - order_direction="order_direction", - page_number=0, ) assert_matches_type(MessageListResponse, message, path=["response"]) @@ -576,48 +524,3 @@ async def test_streaming_response_list(self, async_client: AsyncAgentex) -> None assert_matches_type(MessageListResponse, message, path=["response"]) assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - async def test_method_list_paginated(self, async_client: AsyncAgentex) -> None: - message = await async_client.messages.list_paginated( - task_id="task_id", - ) - assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - async def test_method_list_paginated_with_all_params(self, async_client: AsyncAgentex) -> None: - message = await async_client.messages.list_paginated( - task_id="task_id", - cursor="cursor", - direction="older", - limit=0, - ) - assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - async def test_raw_response_list_paginated(self, async_client: AsyncAgentex) -> None: - response = await async_client.messages.with_raw_response.list_paginated( - task_id="task_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - message = await response.parse() - assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - async def test_streaming_response_list_paginated(self, async_client: AsyncAgentex) -> None: - async with async_client.messages.with_streaming_response.list_paginated( - task_id="task_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - message = await response.parse() - assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_spans.py b/tests/api_resources/test_spans.py index 8bfdb952..3617debf 100644 --- a/tests/api_resources/test_spans.py +++ b/tests/api_resources/test_spans.py @@ -185,10 +185,6 @@ def test_method_list(self, client: Agentex) -> None: @parametrize def test_method_list_with_all_params(self, client: Agentex) -> None: span = client.spans.list( - limit=0, - order_by="order_by", - order_direction="order_direction", - page_number=0, trace_id="trace_id", ) assert_matches_type(SpanListResponse, span, path=["response"]) @@ -387,10 +383,6 @@ async def test_method_list(self, async_client: AsyncAgentex) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> None: span = await async_client.spans.list( - limit=0, - order_by="order_by", - order_direction="order_direction", - page_number=0, trace_id="trace_id", ) assert_matches_type(SpanListResponse, span, path=["response"]) diff --git a/tests/api_resources/test_states.py b/tests/api_resources/test_states.py index 0b319342..a1bc41d2 100644 --- a/tests/api_resources/test_states.py +++ b/tests/api_resources/test_states.py @@ -165,10 +165,6 @@ def test_method_list(self, client: Agentex) -> None: def test_method_list_with_all_params(self, client: Agentex) -> None: state = client.states.list( agent_id="agent_id", - limit=1, - order_by="order_by", - order_direction="order_direction", - page_number=1, task_id="task_id", ) assert_matches_type(StateListResponse, state, path=["response"]) @@ -390,10 +386,6 @@ async def test_method_list(self, async_client: AsyncAgentex) -> None: async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> None: state = await async_client.states.list( agent_id="agent_id", - limit=1, - order_by="order_by", - order_direction="order_direction", - page_number=1, task_id="task_id", ) assert_matches_type(StateListResponse, state, path=["response"]) diff --git a/tests/api_resources/test_tasks.py b/tests/api_resources/test_tasks.py index ce240bad..86fe14a2 100644 --- a/tests/api_resources/test_tasks.py +++ b/tests/api_resources/test_tasks.py @@ -8,11 +8,7 @@ import pytest from agentex import Agentex, AsyncAgentex -from agentex.types import ( - TaskListResponse, - TaskRetrieveResponse, - TaskRetrieveByNameResponse, -) +from agentex.types import Task, TaskListResponse from agentex.types.shared import DeleteResponse from ..utils import assert_matches_type @@ -27,42 +23,33 @@ class TestTasks: @parametrize def test_method_retrieve(self, client: Agentex) -> None: task = client.tasks.retrieve( - task_id="task_id", - ) - assert_matches_type(TaskRetrieveResponse, task, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - def test_method_retrieve_with_all_params(self, client: Agentex) -> None: - task = client.tasks.retrieve( - task_id="task_id", - relationships=["agents"], + "task_id", ) - assert_matches_type(TaskRetrieveResponse, task, path=["response"]) + assert_matches_type(Task, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Agentex) -> None: response = client.tasks.with_raw_response.retrieve( - task_id="task_id", + "task_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = response.parse() - assert_matches_type(TaskRetrieveResponse, task, path=["response"]) + assert_matches_type(Task, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Agentex) -> None: with client.tasks.with_streaming_response.retrieve( - task_id="task_id", + "task_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = response.parse() - assert_matches_type(TaskRetrieveResponse, task, path=["response"]) + assert_matches_type(Task, task, path=["response"]) assert cast(Any, response.is_closed) is True @@ -71,7 +58,7 @@ def test_streaming_response_retrieve(self, client: Agentex) -> None: def test_path_params_retrieve(self, client: Agentex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `task_id` but received ''"): client.tasks.with_raw_response.retrieve( - task_id="", + "", ) @pytest.mark.skip(reason="Prism tests are disabled") @@ -86,11 +73,6 @@ def test_method_list_with_all_params(self, client: Agentex) -> None: task = client.tasks.list( agent_id="agent_id", agent_name="agent_name", - limit=0, - order_by="order_by", - order_direction="order_direction", - page_number=0, - relationships=["agents"], ) assert_matches_type(TaskListResponse, task, path=["response"]) @@ -204,42 +186,33 @@ def test_path_params_delete_by_name(self, client: Agentex) -> None: @parametrize def test_method_retrieve_by_name(self, client: Agentex) -> None: task = client.tasks.retrieve_by_name( - task_name="task_name", - ) - assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - def test_method_retrieve_by_name_with_all_params(self, client: Agentex) -> None: - task = client.tasks.retrieve_by_name( - task_name="task_name", - relationships=["agents"], + "task_name", ) - assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) + assert_matches_type(Task, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve_by_name(self, client: Agentex) -> None: response = client.tasks.with_raw_response.retrieve_by_name( - task_name="task_name", + "task_name", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = response.parse() - assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) + assert_matches_type(Task, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve_by_name(self, client: Agentex) -> None: with client.tasks.with_streaming_response.retrieve_by_name( - task_name="task_name", + "task_name", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = response.parse() - assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) + assert_matches_type(Task, task, path=["response"]) assert cast(Any, response.is_closed) is True @@ -248,7 +221,7 @@ def test_streaming_response_retrieve_by_name(self, client: Agentex) -> None: def test_path_params_retrieve_by_name(self, client: Agentex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `task_name` but received ''"): client.tasks.with_raw_response.retrieve_by_name( - task_name="", + "", ) @pytest.mark.skip(reason="Prism tests are disabled") @@ -343,42 +316,33 @@ class TestAsyncTasks: @parametrize async def test_method_retrieve(self, async_client: AsyncAgentex) -> None: task = await async_client.tasks.retrieve( - task_id="task_id", - ) - assert_matches_type(TaskRetrieveResponse, task, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - async def test_method_retrieve_with_all_params(self, async_client: AsyncAgentex) -> None: - task = await async_client.tasks.retrieve( - task_id="task_id", - relationships=["agents"], + "task_id", ) - assert_matches_type(TaskRetrieveResponse, task, path=["response"]) + assert_matches_type(Task, task, 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.tasks.with_raw_response.retrieve( - task_id="task_id", + "task_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = await response.parse() - assert_matches_type(TaskRetrieveResponse, task, path=["response"]) + assert_matches_type(Task, task, 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.tasks.with_streaming_response.retrieve( - task_id="task_id", + "task_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = await response.parse() - assert_matches_type(TaskRetrieveResponse, task, path=["response"]) + assert_matches_type(Task, task, path=["response"]) assert cast(Any, response.is_closed) is True @@ -387,7 +351,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncAgentex) -> async def test_path_params_retrieve(self, async_client: AsyncAgentex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `task_id` but received ''"): await async_client.tasks.with_raw_response.retrieve( - task_id="", + "", ) @pytest.mark.skip(reason="Prism tests are disabled") @@ -402,11 +366,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> task = await async_client.tasks.list( agent_id="agent_id", agent_name="agent_name", - limit=0, - order_by="order_by", - order_direction="order_direction", - page_number=0, - relationships=["agents"], ) assert_matches_type(TaskListResponse, task, path=["response"]) @@ -520,42 +479,33 @@ async def test_path_params_delete_by_name(self, async_client: AsyncAgentex) -> N @parametrize async def test_method_retrieve_by_name(self, async_client: AsyncAgentex) -> None: task = await async_client.tasks.retrieve_by_name( - task_name="task_name", - ) - assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are disabled") - @parametrize - async def test_method_retrieve_by_name_with_all_params(self, async_client: AsyncAgentex) -> None: - task = await async_client.tasks.retrieve_by_name( - task_name="task_name", - relationships=["agents"], + "task_name", ) - assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) + assert_matches_type(Task, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve_by_name(self, async_client: AsyncAgentex) -> None: response = await async_client.tasks.with_raw_response.retrieve_by_name( - task_name="task_name", + "task_name", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = await response.parse() - assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) + assert_matches_type(Task, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve_by_name(self, async_client: AsyncAgentex) -> None: async with async_client.tasks.with_streaming_response.retrieve_by_name( - task_name="task_name", + "task_name", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = await response.parse() - assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) + assert_matches_type(Task, task, path=["response"]) assert cast(Any, response.is_closed) is True @@ -564,7 +514,7 @@ async def test_streaming_response_retrieve_by_name(self, async_client: AsyncAgen async def test_path_params_retrieve_by_name(self, async_client: AsyncAgentex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `task_name` but received ''"): await async_client.tasks.with_raw_response.retrieve_by_name( - task_name="", + "", ) @pytest.mark.skip(reason="Prism tests are disabled") diff --git a/tests/api_resources/test_tracker.py b/tests/api_resources/test_tracker.py index ae4a3a91..af8a60dd 100644 --- a/tests/api_resources/test_tracker.py +++ b/tests/api_resources/test_tracker.py @@ -124,10 +124,6 @@ def test_method_list(self, client: Agentex) -> None: def test_method_list_with_all_params(self, client: Agentex) -> None: tracker = client.tracker.list( agent_id="agent_id", - limit=1, - order_by="order_by", - order_direction="order_direction", - page_number=1, task_id="task_id", ) assert_matches_type(TrackerListResponse, tracker, path=["response"]) @@ -266,10 +262,6 @@ async def test_method_list(self, async_client: AsyncAgentex) -> None: async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> None: tracker = await async_client.tracker.list( agent_id="agent_id", - limit=1, - order_by="order_by", - order_direction="order_direction", - page_number=1, task_id="task_id", ) assert_matches_type(TrackerListResponse, tracker, path=["response"]) From b5617002e4f8699462cce1ac0ad90c179b5e4099 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Dec 2025 07:32:24 +0000 Subject: [PATCH 03/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 6e9050b54eaa403a7590f8c001781289442f26c8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Dec 2025 08:32:23 +0000 Subject: [PATCH 04/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 98192fe8c47fcb98f3cb4dad9390632c30d24c60 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Dec 2025 12:32:01 +0000 Subject: [PATCH 05/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 17176503ece303ec438f9d75df69e594784e5aba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Dec 2025 15:32:13 +0000 Subject: [PATCH 06/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 4dcfcd42b1d74c271d737ae08c9149ce453e5fc6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Dec 2025 16:32:12 +0000 Subject: [PATCH 07/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 504c0b3fd1604341ce195f51768825678c96571e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Dec 2025 18:31:56 +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 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 7b227ccfa3dba0083bfcc73812bf5f93a6763288 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Dec 2025 19:32:07 +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 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 30df94390817321b14765f297f895725a314a95b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Dec 2025 23:32:07 +0000 Subject: [PATCH 10/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 2465aa277b7ecbcd7e7b3866eaa52745555f26ee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Dec 2025 02:32:25 +0000 Subject: [PATCH 11/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 2fa8d59d44da1caa457e76e48d19eca345d66524 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Dec 2025 04:32:07 +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 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 99e0516598d1e4b068839dbbc7ed949e20c7ea0f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Dec 2025 10:32:23 +0000 Subject: [PATCH 13/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 5b6d5fc7acd6e1799fb85a7c00c55b319965cda3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Dec 2025 13:32:07 +0000 Subject: [PATCH 14/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 0bc0cbcae833114f44d345b0a0266e1d5753e5a6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Dec 2025 14:32:11 +0000 Subject: [PATCH 15/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 21d6ecfb807c3916310ba0e150718dfb1406ed82 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Dec 2025 17:32:18 +0000 Subject: [PATCH 16/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 1c07bc5a12ebc7a06ace7c30ee1b2e01682365a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Dec 2025 18:32:17 +0000 Subject: [PATCH 17/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 22b202d4753c119d1df7d88dc7bae7a03bec6589 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Dec 2025 21:32:05 +0000 Subject: [PATCH 18/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 10a26a9cf15d198fcddc0169c501088b84f26d17 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Dec 2025 23:32:06 +0000 Subject: [PATCH 19/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 9882b024fc20bfb7d7c870e0fdce7310b9cb0221 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 02:32:24 +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 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 15b1331d9e5fd35aada3773e33f6255dae890120 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 03:32:22 +0000 Subject: [PATCH 21/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 3a0644d048d785f29ec7a46d4dc9d350adbd5cfb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 04:32:25 +0000 Subject: [PATCH 22/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 7cb69c33ebe6e8a280b7b466a197d5f6f948fcca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 06:32:14 +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 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From aea4d26e9c7ed8504e49e8e1b672a928bccd0b30 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 07:32:16 +0000 Subject: [PATCH 24/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 20ddd9a47f76b23c075e9bdb73d8ef3b87bc5308 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 08:32:06 +0000 Subject: [PATCH 25/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 2c063edb0e5b87b33ccbc2f62ec7ac316415478b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 09:32:10 +0000 Subject: [PATCH 26/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From dad16368a7e928454ef8a22099053b2fdbf1b5f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 10:32:12 +0000 Subject: [PATCH 27/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From c82d90f3ef3fe4804677e8384210005ff8fda82b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 11:32:18 +0000 Subject: [PATCH 28/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 4954b57fe2d4bc8c833aa5d09555a3bff6d401af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 12:32:18 +0000 Subject: [PATCH 29/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 48af281516961422c2be7be2b3e92c33338192f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 13:32:23 +0000 Subject: [PATCH 30/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 66f67502d6e56543409399b3de9af723728e4143 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 15:32:02 +0000 Subject: [PATCH 31/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cff198e..1f75b40f 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml +openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f config_hash: 32eb65911c08ac84d117cecdf2759869 From 4feda0a907d212e36b435a47ce26654c119597ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 16:32:19 +0000 Subject: [PATCH 32/34] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1f75b40f..2cff198e 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-03963937874221f124e7a52b2640b8eb69d5ad3e0dafea5d4e65dd3ebb4c06b3.yml -openapi_spec_hash: db2c598ad7459cbeb3d5dbf812b0ff6f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml +openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 config_hash: 32eb65911c08ac84d117cecdf2759869 From 86a166aba5538411ebcc0ed74291505e01a466f2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 17:32:18 +0000 Subject: [PATCH 33/34] feat(api): api update --- .stats.yml | 6 +- api.md | 8 +- src/agentex/resources/agents.py | 46 ++++- src/agentex/resources/messages/messages.py | 174 +++++++++++++++++- src/agentex/resources/spans.py | 30 ++- src/agentex/resources/states.py | 32 ++++ src/agentex/resources/tasks.py | 78 ++++++-- src/agentex/resources/tracker.py | 32 ++++ src/agentex/types/__init__.py | 6 + src/agentex/types/acp_type.py | 2 +- src/agentex/types/agent.py | 7 +- src/agentex/types/agent_list_params.py | 12 ++ .../types/message_list_paginated_params.py | 19 ++ .../types/message_list_paginated_response.py | 21 +++ src/agentex/types/message_list_params.py | 8 +- src/agentex/types/span_list_params.py | 8 + src/agentex/types/state_list_params.py | 12 ++ src/agentex/types/task_list_params.py | 14 +- src/agentex/types/task_list_response.py | 35 +++- .../types/task_retrieve_by_name_params.py | 12 ++ .../types/task_retrieve_by_name_response.py | 32 ++++ src/agentex/types/task_retrieve_params.py | 12 ++ src/agentex/types/task_retrieve_response.py | 32 ++++ src/agentex/types/tracker_list_params.py | 12 ++ tests/api_resources/test_agents.py | 8 + tests/api_resources/test_messages.py | 97 ++++++++++ tests/api_resources/test_spans.py | 8 + tests/api_resources/test_states.py | 8 + tests/api_resources/test_tasks.py | 108 ++++++++--- tests/api_resources/test_tracker.py | 8 + 30 files changed, 817 insertions(+), 70 deletions(-) create mode 100644 src/agentex/types/message_list_paginated_params.py create mode 100644 src/agentex/types/message_list_paginated_response.py create mode 100644 src/agentex/types/task_retrieve_by_name_params.py create mode 100644 src/agentex/types/task_retrieve_by_name_response.py create mode 100644 src/agentex/types/task_retrieve_params.py create mode 100644 src/agentex/types/task_retrieve_response.py diff --git a/.stats.yml b/.stats.yml index 2cff198e..fbcaba61 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-c34c0577d9716c22554633ecb41d091675248d1385e9d1cc7c19479d55b56cb1.yml -openapi_spec_hash: 3daaeab87b12b271ba2ee39e7dc166f2 +configured_endpoints: 35 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-8f9296ac9fa68bb264c4739463e55ce27cdafb31b705b27600d6656db7b0dac5.yml +openapi_spec_hash: 47f4675ac3c7198869240b5c6f33f8fd config_hash: 32eb65911c08ac84d117cecdf2759869 diff --git a/api.md b/api.md index 38dfa5b3..f70f9b19 100644 --- a/api.md +++ b/api.md @@ -43,16 +43,16 @@ Methods: Types: ```python -from agentex.types import Task, TaskListResponse +from agentex.types import Task, TaskRetrieveResponse, TaskListResponse, TaskRetrieveByNameResponse ``` Methods: -- client.tasks.retrieve(task_id) -> Task +- client.tasks.retrieve(task_id, \*\*params) -> TaskRetrieveResponse - client.tasks.list(\*\*params) -> TaskListResponse - client.tasks.delete(task_id) -> DeleteResponse - client.tasks.delete_by_name(task_name) -> DeleteResponse -- client.tasks.retrieve_by_name(task_name) -> Task +- client.tasks.retrieve_by_name(task_name, \*\*params) -> TaskRetrieveByNameResponse - client.tasks.stream_events(task_id) -> object - client.tasks.stream_events_by_name(task_name) -> object @@ -72,6 +72,7 @@ from agentex.types import ( ToolRequestContent, ToolResponseContent, MessageListResponse, + MessageListPaginatedResponse, ) ``` @@ -81,6 +82,7 @@ Methods: - client.messages.retrieve(message_id) -> TaskMessage - client.messages.update(message_id, \*\*params) -> TaskMessage - client.messages.list(\*\*params) -> MessageListResponse +- client.messages.list_paginated(\*\*params) -> MessageListPaginatedResponse ## Batch diff --git a/src/agentex/resources/agents.py b/src/agentex/resources/agents.py index 8209683b..ae6821e7 100644 --- a/src/agentex/resources/agents.py +++ b/src/agentex/resources/agents.py @@ -92,6 +92,10 @@ def retrieve( def list( self, *, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | Omit = omit, + page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -104,6 +108,14 @@ def list( List all registered agents, optionally filtered by query parameters. Args: + limit: Limit + + order_by: Field to order by + + order_direction: Order direction (asc or desc) + + page_number: Page number + task_id: Task ID extra_headers: Send extra headers @@ -121,7 +133,16 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform({"task_id": task_id}, agent_list_params.AgentListParams), + query=maybe_transform( + { + "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, + "task_id": task_id, + }, + agent_list_params.AgentListParams, + ), ), cast_to=AgentListResponse, ) @@ -639,6 +660,10 @@ async def retrieve( async def list( self, *, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | Omit = omit, + page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -651,6 +676,14 @@ async def list( List all registered agents, optionally filtered by query parameters. Args: + limit: Limit + + order_by: Field to order by + + order_direction: Order direction (asc or desc) + + page_number: Page number + task_id: Task ID extra_headers: Send extra headers @@ -668,7 +701,16 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform({"task_id": task_id}, agent_list_params.AgentListParams), + query=await async_maybe_transform( + { + "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, + "task_id": task_id, + }, + agent_list_params.AgentListParams, + ), ), cast_to=AgentListResponse, ) diff --git a/src/agentex/resources/messages/messages.py b/src/agentex/resources/messages/messages.py index d45aa6fa..e1256449 100644 --- a/src/agentex/resources/messages/messages.py +++ b/src/agentex/resources/messages/messages.py @@ -15,7 +15,12 @@ BatchResourceWithStreamingResponse, AsyncBatchResourceWithStreamingResponse, ) -from ...types import message_list_params, message_create_params, message_update_params +from ...types import ( + message_list_params, + message_create_params, + message_update_params, + message_list_paginated_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 @@ -30,6 +35,7 @@ from ...types.task_message import TaskMessage from ...types.message_list_response import MessageListResponse from ...types.task_message_content_param import TaskMessageContentParam +from ...types.message_list_paginated_response import MessageListPaginatedResponse __all__ = ["MessagesResource", "AsyncMessagesResource"] @@ -180,7 +186,10 @@ def list( self, *, task_id: str, - limit: Optional[int] | Omit = omit, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | 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, @@ -189,7 +198,10 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MessageListResponse: """ - List Messages + List messages for a task with offset-based pagination. + + For cursor-based pagination with infinite scroll support, use + /messages/paginated. Args: task_id: The task ID @@ -213,6 +225,9 @@ def list( { "task_id": task_id, "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, }, message_list_params.MessageListParams, ), @@ -220,6 +235,70 @@ def list( cast_to=MessageListResponse, ) + def list_paginated( + self, + *, + task_id: str, + cursor: Optional[str] | Omit = omit, + direction: Literal["older", "newer"] | Omit = omit, + limit: 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, + ) -> MessageListPaginatedResponse: + """ + List messages for a task with cursor-based pagination. + + This endpoint is designed for infinite scroll UIs where new messages may arrive + while paginating through older ones. + + Args: task_id: The task ID to filter messages by limit: Maximum number of + messages to return (default: 50) cursor: Opaque cursor string for pagination. + Pass the `next_cursor` from a previous response to get the next page. direction: + Pagination direction - "older" to get older messages (default), "newer" to get + newer messages. + + Returns: PaginatedMessagesResponse with: - data: List of messages (newest first + when direction="older") - next_cursor: Cursor for fetching the next page (null + if no more pages) - has_more: Whether there are more messages to fetch + + Example: First request: GET /messages/paginated?task_id=xxx&limit=50 Next page: + GET /messages/paginated?task_id=xxx&limit=50&cursor= + + Args: + task_id: The task ID + + 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( + "/messages/paginated", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "task_id": task_id, + "cursor": cursor, + "direction": direction, + "limit": limit, + }, + message_list_paginated_params.MessageListPaginatedParams, + ), + ), + cast_to=MessageListPaginatedResponse, + ) + class AsyncMessagesResource(AsyncAPIResource): @cached_property @@ -367,7 +446,10 @@ async def list( self, *, task_id: str, - limit: Optional[int] | Omit = omit, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | 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, @@ -376,7 +458,10 @@ async def list( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> MessageListResponse: """ - List Messages + List messages for a task with offset-based pagination. + + For cursor-based pagination with infinite scroll support, use + /messages/paginated. Args: task_id: The task ID @@ -400,6 +485,9 @@ async def list( { "task_id": task_id, "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, }, message_list_params.MessageListParams, ), @@ -407,6 +495,70 @@ async def list( cast_to=MessageListResponse, ) + async def list_paginated( + self, + *, + task_id: str, + cursor: Optional[str] | Omit = omit, + direction: Literal["older", "newer"] | Omit = omit, + limit: 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, + ) -> MessageListPaginatedResponse: + """ + List messages for a task with cursor-based pagination. + + This endpoint is designed for infinite scroll UIs where new messages may arrive + while paginating through older ones. + + Args: task_id: The task ID to filter messages by limit: Maximum number of + messages to return (default: 50) cursor: Opaque cursor string for pagination. + Pass the `next_cursor` from a previous response to get the next page. direction: + Pagination direction - "older" to get older messages (default), "newer" to get + newer messages. + + Returns: PaginatedMessagesResponse with: - data: List of messages (newest first + when direction="older") - next_cursor: Cursor for fetching the next page (null + if no more pages) - has_more: Whether there are more messages to fetch + + Example: First request: GET /messages/paginated?task_id=xxx&limit=50 Next page: + GET /messages/paginated?task_id=xxx&limit=50&cursor= + + Args: + task_id: The task ID + + 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( + "/messages/paginated", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + { + "task_id": task_id, + "cursor": cursor, + "direction": direction, + "limit": limit, + }, + message_list_paginated_params.MessageListPaginatedParams, + ), + ), + cast_to=MessageListPaginatedResponse, + ) + class MessagesResourceWithRawResponse: def __init__(self, messages: MessagesResource) -> None: @@ -424,6 +576,9 @@ def __init__(self, messages: MessagesResource) -> None: self.list = to_raw_response_wrapper( messages.list, ) + self.list_paginated = to_raw_response_wrapper( + messages.list_paginated, + ) @cached_property def batch(self) -> BatchResourceWithRawResponse: @@ -446,6 +601,9 @@ def __init__(self, messages: AsyncMessagesResource) -> None: self.list = async_to_raw_response_wrapper( messages.list, ) + self.list_paginated = async_to_raw_response_wrapper( + messages.list_paginated, + ) @cached_property def batch(self) -> AsyncBatchResourceWithRawResponse: @@ -468,6 +626,9 @@ def __init__(self, messages: MessagesResource) -> None: self.list = to_streamed_response_wrapper( messages.list, ) + self.list_paginated = to_streamed_response_wrapper( + messages.list_paginated, + ) @cached_property def batch(self) -> BatchResourceWithStreamingResponse: @@ -490,6 +651,9 @@ def __init__(self, messages: AsyncMessagesResource) -> None: self.list = async_to_streamed_response_wrapper( messages.list, ) + self.list_paginated = async_to_streamed_response_wrapper( + messages.list_paginated, + ) @cached_property def batch(self) -> AsyncBatchResourceWithStreamingResponse: diff --git a/src/agentex/resources/spans.py b/src/agentex/resources/spans.py index 068384c3..589c2ac6 100644 --- a/src/agentex/resources/spans.py +++ b/src/agentex/resources/spans.py @@ -222,6 +222,10 @@ def update( def list( self, *, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | Omit = omit, + page_number: int | Omit = omit, trace_id: Optional[str] | 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. @@ -249,7 +253,16 @@ def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform({"trace_id": trace_id}, span_list_params.SpanListParams), + query=maybe_transform( + { + "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, + "trace_id": trace_id, + }, + span_list_params.SpanListParams, + ), ), cast_to=SpanListResponse, ) @@ -452,6 +465,10 @@ async def update( async def list( self, *, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | Omit = omit, + page_number: int | Omit = omit, trace_id: Optional[str] | 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. @@ -479,7 +496,16 @@ async def list( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform({"trace_id": trace_id}, span_list_params.SpanListParams), + query=await async_maybe_transform( + { + "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, + "trace_id": trace_id, + }, + span_list_params.SpanListParams, + ), ), cast_to=SpanListResponse, ) diff --git a/src/agentex/resources/states.py b/src/agentex/resources/states.py index 6196e4e4..a8f3d085 100644 --- a/src/agentex/resources/states.py +++ b/src/agentex/resources/states.py @@ -166,6 +166,10 @@ def list( self, *, agent_id: Optional[str] | Omit = omit, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | Omit = omit, + page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -180,6 +184,14 @@ def list( Args: agent_id: Agent ID + limit: Limit + + order_by: Field to order by + + order_direction: Order direction (asc or desc) + + page_number: Page number + task_id: Task ID extra_headers: Send extra headers @@ -200,6 +212,10 @@ def list( query=maybe_transform( { "agent_id": agent_id, + "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, "task_id": task_id, }, state_list_params.StateListParams, @@ -384,6 +400,10 @@ async def list( self, *, agent_id: Optional[str] | Omit = omit, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | Omit = omit, + page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -398,6 +418,14 @@ async def list( Args: agent_id: Agent ID + limit: Limit + + order_by: Field to order by + + order_direction: Order direction (asc or desc) + + page_number: Page number + task_id: Task ID extra_headers: Send extra headers @@ -418,6 +446,10 @@ async def list( query=await async_maybe_transform( { "agent_id": agent_id, + "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, "task_id": task_id, }, state_list_params.StateListParams, diff --git a/src/agentex/resources/tasks.py b/src/agentex/resources/tasks.py index 94e7c866..1bf41b7b 100644 --- a/src/agentex/resources/tasks.py +++ b/src/agentex/resources/tasks.py @@ -2,11 +2,12 @@ from __future__ import annotations -from typing import Optional +from typing import List, Optional +from typing_extensions import Literal import httpx -from ..types import task_list_params +from ..types import task_list_params, task_retrieve_params, task_retrieve_by_name_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 @@ -18,10 +19,11 @@ async_to_streamed_response_wrapper, ) from .._streaming import Stream, AsyncStream -from ..types.task import Task from .._base_client import make_request_options from ..types.task_list_response import TaskListResponse from ..types.shared.delete_response import DeleteResponse +from ..types.task_retrieve_response import TaskRetrieveResponse +from ..types.task_retrieve_by_name_response import TaskRetrieveByNameResponse __all__ = ["TasksResource", "AsyncTasksResource"] @@ -50,13 +52,14 @@ def retrieve( self, task_id: str, *, + relationships: List[Literal["agents"]] | 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, - ) -> Task: + ) -> TaskRetrieveResponse: """ Get a task by its unique ID. @@ -74,9 +77,13 @@ def retrieve( return self._get( f"/tasks/{task_id}", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform({"relationships": relationships}, task_retrieve_params.TaskRetrieveParams), ), - cast_to=Task, + cast_to=TaskRetrieveResponse, ) def list( @@ -84,6 +91,11 @@ def list( *, agent_id: Optional[str] | Omit = omit, agent_name: Optional[str] | Omit = omit, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | Omit = omit, + page_number: int | Omit = omit, + relationships: List[Literal["agents"]] | 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, @@ -114,6 +126,11 @@ def list( { "agent_id": agent_id, "agent_name": agent_name, + "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, + "relationships": relationships, }, task_list_params.TaskListParams, ), @@ -191,13 +208,14 @@ def retrieve_by_name( self, task_name: str, *, + relationships: List[Literal["agents"]] | 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, - ) -> Task: + ) -> TaskRetrieveByNameResponse: """ Get a task by its unique name. @@ -215,9 +233,15 @@ def retrieve_by_name( return self._get( f"/tasks/name/{task_name}", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + {"relationships": relationships}, task_retrieve_by_name_params.TaskRetrieveByNameParams + ), ), - cast_to=Task, + cast_to=TaskRetrieveByNameResponse, ) def stream_events( @@ -315,13 +339,14 @@ async def retrieve( self, task_id: str, *, + relationships: List[Literal["agents"]] | 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, - ) -> Task: + ) -> TaskRetrieveResponse: """ Get a task by its unique ID. @@ -339,9 +364,15 @@ async def retrieve( return await self._get( f"/tasks/{task_id}", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + {"relationships": relationships}, task_retrieve_params.TaskRetrieveParams + ), ), - cast_to=Task, + cast_to=TaskRetrieveResponse, ) async def list( @@ -349,6 +380,11 @@ async def list( *, agent_id: Optional[str] | Omit = omit, agent_name: Optional[str] | Omit = omit, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | Omit = omit, + page_number: int | Omit = omit, + relationships: List[Literal["agents"]] | 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, @@ -379,6 +415,11 @@ async def list( { "agent_id": agent_id, "agent_name": agent_name, + "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, + "relationships": relationships, }, task_list_params.TaskListParams, ), @@ -456,13 +497,14 @@ async def retrieve_by_name( self, task_name: str, *, + relationships: List[Literal["agents"]] | 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, - ) -> Task: + ) -> TaskRetrieveByNameResponse: """ Get a task by its unique name. @@ -480,9 +522,15 @@ async def retrieve_by_name( return await self._get( f"/tasks/name/{task_name}", options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=await async_maybe_transform( + {"relationships": relationships}, task_retrieve_by_name_params.TaskRetrieveByNameParams + ), ), - cast_to=Task, + cast_to=TaskRetrieveByNameResponse, ) async def stream_events( diff --git a/src/agentex/resources/tracker.py b/src/agentex/resources/tracker.py index 089e6a62..15906b3f 100644 --- a/src/agentex/resources/tracker.py +++ b/src/agentex/resources/tracker.py @@ -131,6 +131,10 @@ def list( self, *, agent_id: Optional[str] | Omit = omit, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | Omit = omit, + page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -145,6 +149,14 @@ def list( Args: agent_id: Agent ID + limit: Limit + + order_by: Field to order by + + order_direction: Order direction (asc or desc) + + page_number: Page number + task_id: Task ID extra_headers: Send extra headers @@ -165,6 +177,10 @@ def list( query=maybe_transform( { "agent_id": agent_id, + "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, "task_id": task_id, }, tracker_list_params.TrackerListParams, @@ -281,6 +297,10 @@ async def list( self, *, agent_id: Optional[str] | Omit = omit, + limit: int | Omit = omit, + order_by: Optional[str] | Omit = omit, + order_direction: str | Omit = omit, + page_number: int | Omit = omit, task_id: Optional[str] | 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. @@ -295,6 +315,14 @@ async def list( Args: agent_id: Agent ID + limit: Limit + + order_by: Field to order by + + order_direction: Order direction (asc or desc) + + page_number: Page number + task_id: Task ID extra_headers: Send extra headers @@ -315,6 +343,10 @@ async def list( query=await async_maybe_transform( { "agent_id": agent_id, + "limit": limit, + "order_by": order_by, + "order_direction": order_direction, + "page_number": page_number, "task_id": task_id, }, tracker_list_params.TrackerListParams, diff --git a/src/agentex/types/__init__.py b/src/agentex/types/__init__.py index 3f6b75d8..34f5fb90 100644 --- a/src/agentex/types/__init__.py +++ b/src/agentex/types/__init__.py @@ -46,6 +46,7 @@ from .tool_response_delta import ToolResponseDelta as ToolResponseDelta from .tracker_list_params import TrackerListParams as TrackerListParams from .task_message_content import TaskMessageContent as TaskMessageContent +from .task_retrieve_params import TaskRetrieveParams as TaskRetrieveParams from .tool_request_content import ToolRequestContent as ToolRequestContent from .message_create_params import MessageCreateParams as MessageCreateParams from .message_list_response import MessageListResponse as MessageListResponse @@ -53,6 +54,7 @@ from .tool_response_content import ToolResponseContent as ToolResponseContent from .tracker_list_response import TrackerListResponse as TrackerListResponse from .tracker_update_params import TrackerUpdateParams as TrackerUpdateParams +from .task_retrieve_response import TaskRetrieveResponse as TaskRetrieveResponse from .reasoning_content_delta import ReasoningContentDelta as ReasoningContentDelta from .reasoning_content_param import ReasoningContentParam as ReasoningContentParam from .reasoning_summary_delta import ReasoningSummaryDelta as ReasoningSummaryDelta @@ -62,3 +64,7 @@ from .tool_response_content_param import ToolResponseContentParam as ToolResponseContentParam from .deployment_history_list_params import DeploymentHistoryListParams as DeploymentHistoryListParams from .deployment_history_list_response import DeploymentHistoryListResponse as DeploymentHistoryListResponse +from .task_retrieve_by_name_params import TaskRetrieveByNameParams as TaskRetrieveByNameParams +from .message_list_paginated_params import MessageListPaginatedParams as MessageListPaginatedParams +from .task_retrieve_by_name_response import TaskRetrieveByNameResponse as TaskRetrieveByNameResponse +from .message_list_paginated_response import MessageListPaginatedResponse as MessageListPaginatedResponse diff --git a/src/agentex/types/acp_type.py b/src/agentex/types/acp_type.py index ec86ddf5..8b70a292 100644 --- a/src/agentex/types/acp_type.py +++ b/src/agentex/types/acp_type.py @@ -4,4 +4,4 @@ __all__ = ["AcpType"] -AcpType: TypeAlias = Literal["sync", "agentic"] +AcpType: TypeAlias = Literal["sync", "async", "agentic"] diff --git a/src/agentex/types/agent.py b/src/agentex/types/agent.py index 731332ab..7828822c 100644 --- a/src/agentex/types/agent.py +++ b/src/agentex/types/agent.py @@ -15,7 +15,7 @@ class Agent(BaseModel): """The unique identifier of the agent.""" acp_type: AcpType - """The type of the ACP Server (Either sync or agentic)""" + """The type of the ACP Server (Either sync or async)""" created_at: datetime """The timestamp when the agent was created""" @@ -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/agent_list_params.py b/src/agentex/types/agent_list_params.py index b432174a..084fdfae 100644 --- a/src/agentex/types/agent_list_params.py +++ b/src/agentex/types/agent_list_params.py @@ -9,5 +9,17 @@ class AgentListParams(TypedDict, total=False): + limit: int + """Limit""" + + order_by: Optional[str] + """Field to order by""" + + order_direction: str + """Order direction (asc or desc)""" + + page_number: int + """Page number""" + task_id: Optional[str] """Task ID""" diff --git a/src/agentex/types/message_list_paginated_params.py b/src/agentex/types/message_list_paginated_params.py new file mode 100644 index 00000000..6dfe1e7e --- /dev/null +++ b/src/agentex/types/message_list_paginated_params.py @@ -0,0 +1,19 @@ +# 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 Literal, Required, TypedDict + +__all__ = ["MessageListPaginatedParams"] + + +class MessageListPaginatedParams(TypedDict, total=False): + task_id: Required[str] + """The task ID""" + + cursor: Optional[str] + + direction: Literal["older", "newer"] + + limit: int diff --git a/src/agentex/types/message_list_paginated_response.py b/src/agentex/types/message_list_paginated_response.py new file mode 100644 index 00000000..40af0b4a --- /dev/null +++ b/src/agentex/types/message_list_paginated_response.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from .._models import BaseModel +from .task_message import TaskMessage + +__all__ = ["MessageListPaginatedResponse"] + + +class MessageListPaginatedResponse(BaseModel): + """Response with cursor pagination metadata.""" + + data: List[TaskMessage] + """List of messages""" + + has_more: Optional[bool] = None + """Whether there are more messages to fetch""" + + next_cursor: Optional[str] = None + """Cursor for fetching the next page of older messages""" diff --git a/src/agentex/types/message_list_params.py b/src/agentex/types/message_list_params.py index 4911bfa9..87027eed 100644 --- a/src/agentex/types/message_list_params.py +++ b/src/agentex/types/message_list_params.py @@ -12,4 +12,10 @@ class MessageListParams(TypedDict, total=False): task_id: Required[str] """The task ID""" - limit: Optional[int] + limit: int + + order_by: Optional[str] + + order_direction: str + + page_number: int diff --git a/src/agentex/types/span_list_params.py b/src/agentex/types/span_list_params.py index 35218965..40d4d651 100644 --- a/src/agentex/types/span_list_params.py +++ b/src/agentex/types/span_list_params.py @@ -9,4 +9,12 @@ class SpanListParams(TypedDict, total=False): + limit: int + + order_by: Optional[str] + + order_direction: str + + page_number: int + trace_id: Optional[str] diff --git a/src/agentex/types/state_list_params.py b/src/agentex/types/state_list_params.py index 6034d345..9cb7d3dc 100644 --- a/src/agentex/types/state_list_params.py +++ b/src/agentex/types/state_list_params.py @@ -12,5 +12,17 @@ class StateListParams(TypedDict, total=False): agent_id: Optional[str] """Agent ID""" + limit: int + """Limit""" + + order_by: Optional[str] + """Field to order by""" + + order_direction: str + """Order direction (asc or desc)""" + + page_number: int + """Page number""" + task_id: Optional[str] """Task ID""" diff --git a/src/agentex/types/task_list_params.py b/src/agentex/types/task_list_params.py index f8bc3364..e41bf821 100644 --- a/src/agentex/types/task_list_params.py +++ b/src/agentex/types/task_list_params.py @@ -2,8 +2,8 @@ from __future__ import annotations -from typing import Optional -from typing_extensions import TypedDict +from typing import List, Optional +from typing_extensions import Literal, TypedDict __all__ = ["TaskListParams"] @@ -12,3 +12,13 @@ class TaskListParams(TypedDict, total=False): agent_id: Optional[str] agent_name: Optional[str] + + limit: int + + order_by: Optional[str] + + order_direction: str + + page_number: int + + relationships: List[Literal["agents"]] diff --git a/src/agentex/types/task_list_response.py b/src/agentex/types/task_list_response.py index c9607e60..85f87c0e 100644 --- a/src/agentex/types/task_list_response.py +++ b/src/agentex/types/task_list_response.py @@ -1,10 +1,35 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List -from typing_extensions import TypeAlias +from typing import Dict, List, Optional +from datetime import datetime +from typing_extensions import Literal, TypeAlias -from .task import Task +from .agent import Agent +from .._models import BaseModel -__all__ = ["TaskListResponse"] +__all__ = ["TaskListResponse", "TaskListResponseItem"] -TaskListResponse: TypeAlias = List[Task] + +class TaskListResponseItem(BaseModel): + """Task response model with optional related data based on relationships""" + + id: str + + agents: Optional[List[Agent]] = None + + created_at: Optional[datetime] = None + + name: Optional[str] = None + + params: Optional[Dict[str, object]] = None + + status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", "RUNNING", "TERMINATED", "TIMED_OUT", "DELETED"]] = None + + status_reason: Optional[str] = None + + task_metadata: Optional[Dict[str, object]] = None + + updated_at: Optional[datetime] = None + + +TaskListResponse: TypeAlias = List[TaskListResponseItem] diff --git a/src/agentex/types/task_retrieve_by_name_params.py b/src/agentex/types/task_retrieve_by_name_params.py new file mode 100644 index 00000000..98d03982 --- /dev/null +++ b/src/agentex/types/task_retrieve_by_name_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List +from typing_extensions import Literal, TypedDict + +__all__ = ["TaskRetrieveByNameParams"] + + +class TaskRetrieveByNameParams(TypedDict, total=False): + relationships: List[Literal["agents"]] diff --git a/src/agentex/types/task_retrieve_by_name_response.py b/src/agentex/types/task_retrieve_by_name_response.py new file mode 100644 index 00000000..1ffc6819 --- /dev/null +++ b/src/agentex/types/task_retrieve_by_name_response.py @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Optional +from datetime import datetime +from typing_extensions import Literal + +from .agent import Agent +from .._models import BaseModel + +__all__ = ["TaskRetrieveByNameResponse"] + + +class TaskRetrieveByNameResponse(BaseModel): + """Task response model with optional related data based on relationships""" + + id: str + + agents: Optional[List[Agent]] = None + + created_at: Optional[datetime] = None + + name: Optional[str] = None + + params: Optional[Dict[str, object]] = None + + status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", "RUNNING", "TERMINATED", "TIMED_OUT", "DELETED"]] = None + + status_reason: Optional[str] = None + + task_metadata: Optional[Dict[str, object]] = None + + updated_at: Optional[datetime] = None diff --git a/src/agentex/types/task_retrieve_params.py b/src/agentex/types/task_retrieve_params.py new file mode 100644 index 00000000..61748a1b --- /dev/null +++ b/src/agentex/types/task_retrieve_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List +from typing_extensions import Literal, TypedDict + +__all__ = ["TaskRetrieveParams"] + + +class TaskRetrieveParams(TypedDict, total=False): + relationships: List[Literal["agents"]] diff --git a/src/agentex/types/task_retrieve_response.py b/src/agentex/types/task_retrieve_response.py new file mode 100644 index 00000000..5f262946 --- /dev/null +++ b/src/agentex/types/task_retrieve_response.py @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Dict, List, Optional +from datetime import datetime +from typing_extensions import Literal + +from .agent import Agent +from .._models import BaseModel + +__all__ = ["TaskRetrieveResponse"] + + +class TaskRetrieveResponse(BaseModel): + """Task response model with optional related data based on relationships""" + + id: str + + agents: Optional[List[Agent]] = None + + created_at: Optional[datetime] = None + + name: Optional[str] = None + + params: Optional[Dict[str, object]] = None + + status: Optional[Literal["CANCELED", "COMPLETED", "FAILED", "RUNNING", "TERMINATED", "TIMED_OUT", "DELETED"]] = None + + status_reason: Optional[str] = None + + task_metadata: Optional[Dict[str, object]] = None + + updated_at: Optional[datetime] = None diff --git a/src/agentex/types/tracker_list_params.py b/src/agentex/types/tracker_list_params.py index 47b4da7b..57234f4a 100644 --- a/src/agentex/types/tracker_list_params.py +++ b/src/agentex/types/tracker_list_params.py @@ -12,5 +12,17 @@ class TrackerListParams(TypedDict, total=False): agent_id: Optional[str] """Agent ID""" + limit: int + """Limit""" + + order_by: Optional[str] + """Field to order by""" + + order_direction: str + """Order direction (asc or desc)""" + + page_number: int + """Page number""" + task_id: Optional[str] """Task ID""" diff --git a/tests/api_resources/test_agents.py b/tests/api_resources/test_agents.py index 4f2c58d0..2b078045 100644 --- a/tests/api_resources/test_agents.py +++ b/tests/api_resources/test_agents.py @@ -75,6 +75,10 @@ def test_method_list(self, client: Agentex) -> None: @parametrize def test_method_list_with_all_params(self, client: Agentex) -> None: agent = client.agents.list( + limit=1, + order_by="order_by", + order_direction="order_direction", + page_number=1, task_id="task_id", ) assert_matches_type(AgentListResponse, agent, path=["response"]) @@ -415,6 +419,10 @@ async def test_method_list(self, async_client: AsyncAgentex) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> None: agent = await async_client.agents.list( + limit=1, + order_by="order_by", + order_direction="order_direction", + page_number=1, task_id="task_id", ) assert_matches_type(AgentListResponse, agent, path=["response"]) diff --git a/tests/api_resources/test_messages.py b/tests/api_resources/test_messages.py index 0c53d9b0..19a51ae7 100644 --- a/tests/api_resources/test_messages.py +++ b/tests/api_resources/test_messages.py @@ -11,6 +11,7 @@ from agentex.types import ( TaskMessage, MessageListResponse, + MessageListPaginatedResponse, ) from ..utils import assert_matches_type @@ -241,6 +242,9 @@ def test_method_list_with_all_params(self, client: Agentex) -> None: message = client.messages.list( task_id="task_id", limit=0, + order_by="order_by", + order_direction="order_direction", + page_number=0, ) assert_matches_type(MessageListResponse, message, path=["response"]) @@ -270,6 +274,51 @@ def test_streaming_response_list(self, client: Agentex) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_list_paginated(self, client: Agentex) -> None: + message = client.messages.list_paginated( + task_id="task_id", + ) + assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_list_paginated_with_all_params(self, client: Agentex) -> None: + message = client.messages.list_paginated( + task_id="task_id", + cursor="cursor", + direction="older", + limit=0, + ) + assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_raw_response_list_paginated(self, client: Agentex) -> None: + response = client.messages.with_raw_response.list_paginated( + task_id="task_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + message = response.parse() + assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_streaming_response_list_paginated(self, client: Agentex) -> None: + with client.messages.with_streaming_response.list_paginated( + task_id="task_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + message = response.parse() + assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) + + assert cast(Any, response.is_closed) is True + class TestAsyncMessages: parametrize = pytest.mark.parametrize( @@ -496,6 +545,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> message = await async_client.messages.list( task_id="task_id", limit=0, + order_by="order_by", + order_direction="order_direction", + page_number=0, ) assert_matches_type(MessageListResponse, message, path=["response"]) @@ -524,3 +576,48 @@ async def test_streaming_response_list(self, async_client: AsyncAgentex) -> None assert_matches_type(MessageListResponse, message, path=["response"]) assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_list_paginated(self, async_client: AsyncAgentex) -> None: + message = await async_client.messages.list_paginated( + task_id="task_id", + ) + assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_list_paginated_with_all_params(self, async_client: AsyncAgentex) -> None: + message = await async_client.messages.list_paginated( + task_id="task_id", + cursor="cursor", + direction="older", + limit=0, + ) + assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_raw_response_list_paginated(self, async_client: AsyncAgentex) -> None: + response = await async_client.messages.with_raw_response.list_paginated( + task_id="task_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + message = await response.parse() + assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_streaming_response_list_paginated(self, async_client: AsyncAgentex) -> None: + async with async_client.messages.with_streaming_response.list_paginated( + task_id="task_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + message = await response.parse() + assert_matches_type(MessageListPaginatedResponse, message, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_spans.py b/tests/api_resources/test_spans.py index 3617debf..8bfdb952 100644 --- a/tests/api_resources/test_spans.py +++ b/tests/api_resources/test_spans.py @@ -185,6 +185,10 @@ def test_method_list(self, client: Agentex) -> None: @parametrize def test_method_list_with_all_params(self, client: Agentex) -> None: span = client.spans.list( + limit=0, + order_by="order_by", + order_direction="order_direction", + page_number=0, trace_id="trace_id", ) assert_matches_type(SpanListResponse, span, path=["response"]) @@ -383,6 +387,10 @@ async def test_method_list(self, async_client: AsyncAgentex) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> None: span = await async_client.spans.list( + limit=0, + order_by="order_by", + order_direction="order_direction", + page_number=0, trace_id="trace_id", ) assert_matches_type(SpanListResponse, span, path=["response"]) diff --git a/tests/api_resources/test_states.py b/tests/api_resources/test_states.py index a1bc41d2..0b319342 100644 --- a/tests/api_resources/test_states.py +++ b/tests/api_resources/test_states.py @@ -165,6 +165,10 @@ def test_method_list(self, client: Agentex) -> None: def test_method_list_with_all_params(self, client: Agentex) -> None: state = client.states.list( agent_id="agent_id", + limit=1, + order_by="order_by", + order_direction="order_direction", + page_number=1, task_id="task_id", ) assert_matches_type(StateListResponse, state, path=["response"]) @@ -386,6 +390,10 @@ async def test_method_list(self, async_client: AsyncAgentex) -> None: async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> None: state = await async_client.states.list( agent_id="agent_id", + limit=1, + order_by="order_by", + order_direction="order_direction", + page_number=1, task_id="task_id", ) assert_matches_type(StateListResponse, state, path=["response"]) diff --git a/tests/api_resources/test_tasks.py b/tests/api_resources/test_tasks.py index 86fe14a2..ce240bad 100644 --- a/tests/api_resources/test_tasks.py +++ b/tests/api_resources/test_tasks.py @@ -8,7 +8,11 @@ import pytest from agentex import Agentex, AsyncAgentex -from agentex.types import Task, TaskListResponse +from agentex.types import ( + TaskListResponse, + TaskRetrieveResponse, + TaskRetrieveByNameResponse, +) from agentex.types.shared import DeleteResponse from ..utils import assert_matches_type @@ -23,33 +27,42 @@ class TestTasks: @parametrize def test_method_retrieve(self, client: Agentex) -> None: task = client.tasks.retrieve( - "task_id", + task_id="task_id", ) - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveResponse, task, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_retrieve_with_all_params(self, client: Agentex) -> None: + task = client.tasks.retrieve( + task_id="task_id", + relationships=["agents"], + ) + assert_matches_type(TaskRetrieveResponse, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve(self, client: Agentex) -> None: response = client.tasks.with_raw_response.retrieve( - "task_id", + task_id="task_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = response.parse() - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveResponse, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve(self, client: Agentex) -> None: with client.tasks.with_streaming_response.retrieve( - "task_id", + task_id="task_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = response.parse() - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveResponse, task, path=["response"]) assert cast(Any, response.is_closed) is True @@ -58,7 +71,7 @@ def test_streaming_response_retrieve(self, client: Agentex) -> None: def test_path_params_retrieve(self, client: Agentex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `task_id` but received ''"): client.tasks.with_raw_response.retrieve( - "", + task_id="", ) @pytest.mark.skip(reason="Prism tests are disabled") @@ -73,6 +86,11 @@ def test_method_list_with_all_params(self, client: Agentex) -> None: task = client.tasks.list( agent_id="agent_id", agent_name="agent_name", + limit=0, + order_by="order_by", + order_direction="order_direction", + page_number=0, + relationships=["agents"], ) assert_matches_type(TaskListResponse, task, path=["response"]) @@ -186,33 +204,42 @@ def test_path_params_delete_by_name(self, client: Agentex) -> None: @parametrize def test_method_retrieve_by_name(self, client: Agentex) -> None: task = client.tasks.retrieve_by_name( - "task_name", + task_name="task_name", ) - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_retrieve_by_name_with_all_params(self, client: Agentex) -> None: + task = client.tasks.retrieve_by_name( + task_name="task_name", + relationships=["agents"], + ) + assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_raw_response_retrieve_by_name(self, client: Agentex) -> None: response = client.tasks.with_raw_response.retrieve_by_name( - "task_name", + task_name="task_name", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = response.parse() - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_streaming_response_retrieve_by_name(self, client: Agentex) -> None: with client.tasks.with_streaming_response.retrieve_by_name( - "task_name", + task_name="task_name", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = response.parse() - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) assert cast(Any, response.is_closed) is True @@ -221,7 +248,7 @@ def test_streaming_response_retrieve_by_name(self, client: Agentex) -> None: def test_path_params_retrieve_by_name(self, client: Agentex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `task_name` but received ''"): client.tasks.with_raw_response.retrieve_by_name( - "", + task_name="", ) @pytest.mark.skip(reason="Prism tests are disabled") @@ -316,33 +343,42 @@ class TestAsyncTasks: @parametrize async def test_method_retrieve(self, async_client: AsyncAgentex) -> None: task = await async_client.tasks.retrieve( - "task_id", + task_id="task_id", ) - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveResponse, task, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_retrieve_with_all_params(self, async_client: AsyncAgentex) -> None: + task = await async_client.tasks.retrieve( + task_id="task_id", + relationships=["agents"], + ) + assert_matches_type(TaskRetrieveResponse, task, 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.tasks.with_raw_response.retrieve( - "task_id", + task_id="task_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = await response.parse() - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveResponse, task, 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.tasks.with_streaming_response.retrieve( - "task_id", + task_id="task_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = await response.parse() - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveResponse, task, path=["response"]) assert cast(Any, response.is_closed) is True @@ -351,7 +387,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncAgentex) -> async def test_path_params_retrieve(self, async_client: AsyncAgentex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `task_id` but received ''"): await async_client.tasks.with_raw_response.retrieve( - "", + task_id="", ) @pytest.mark.skip(reason="Prism tests are disabled") @@ -366,6 +402,11 @@ async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> task = await async_client.tasks.list( agent_id="agent_id", agent_name="agent_name", + limit=0, + order_by="order_by", + order_direction="order_direction", + page_number=0, + relationships=["agents"], ) assert_matches_type(TaskListResponse, task, path=["response"]) @@ -479,33 +520,42 @@ async def test_path_params_delete_by_name(self, async_client: AsyncAgentex) -> N @parametrize async def test_method_retrieve_by_name(self, async_client: AsyncAgentex) -> None: task = await async_client.tasks.retrieve_by_name( - "task_name", + task_name="task_name", ) - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_retrieve_by_name_with_all_params(self, async_client: AsyncAgentex) -> None: + task = await async_client.tasks.retrieve_by_name( + task_name="task_name", + relationships=["agents"], + ) + assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_raw_response_retrieve_by_name(self, async_client: AsyncAgentex) -> None: response = await async_client.tasks.with_raw_response.retrieve_by_name( - "task_name", + task_name="task_name", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = await response.parse() - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_streaming_response_retrieve_by_name(self, async_client: AsyncAgentex) -> None: async with async_client.tasks.with_streaming_response.retrieve_by_name( - "task_name", + task_name="task_name", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" task = await response.parse() - assert_matches_type(Task, task, path=["response"]) + assert_matches_type(TaskRetrieveByNameResponse, task, path=["response"]) assert cast(Any, response.is_closed) is True @@ -514,7 +564,7 @@ async def test_streaming_response_retrieve_by_name(self, async_client: AsyncAgen async def test_path_params_retrieve_by_name(self, async_client: AsyncAgentex) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `task_name` but received ''"): await async_client.tasks.with_raw_response.retrieve_by_name( - "", + task_name="", ) @pytest.mark.skip(reason="Prism tests are disabled") diff --git a/tests/api_resources/test_tracker.py b/tests/api_resources/test_tracker.py index af8a60dd..ae4a3a91 100644 --- a/tests/api_resources/test_tracker.py +++ b/tests/api_resources/test_tracker.py @@ -124,6 +124,10 @@ def test_method_list(self, client: Agentex) -> None: def test_method_list_with_all_params(self, client: Agentex) -> None: tracker = client.tracker.list( agent_id="agent_id", + limit=1, + order_by="order_by", + order_direction="order_direction", + page_number=1, task_id="task_id", ) assert_matches_type(TrackerListResponse, tracker, path=["response"]) @@ -262,6 +266,10 @@ async def test_method_list(self, async_client: AsyncAgentex) -> None: async def test_method_list_with_all_params(self, async_client: AsyncAgentex) -> None: tracker = await async_client.tracker.list( agent_id="agent_id", + limit=1, + order_by="order_by", + order_direction="order_direction", + page_number=1, task_id="task_id", ) assert_matches_type(TrackerListResponse, tracker, path=["response"]) From 28d1738d3af8feb00f6f641e159221fb41c42983 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 19:22:43 +0000 Subject: [PATCH 34/34] chore(internal): add missing files argument to base client --- src/agentex/_base_client.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/agentex/_base_client.py b/src/agentex/_base_client.py index 108a8a52..2d022cda 100644 --- a/src/agentex/_base_client.py +++ b/src/agentex/_base_client.py @@ -1247,9 +1247,12 @@ def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return self.request(cast_to, opts) def put( @@ -1767,9 +1770,12 @@ async def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return await self.request(cast_to, opts) async def put(