Skip to content

Commit a885d8d

Browse files
feat(api): manual updates
1 parent 14881c0 commit a885d8d

File tree

14 files changed

+409
-59
lines changed

14 files changed

+409
-59
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 34
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-021b55c88964b7a5bfc9d692d32a52c6b0150445656d2407c4cb8e9dd1e5f100.yml
3-
openapi_spec_hash: ed92c0d5d6bed9cb5617f8a776ac42c9
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp%2Fagentex-sdk-1d08fb2290b5310c91801d7575d356628d372fd5434e15d3b9cead48eadb893f.yml
3+
openapi_spec_hash: c07c588fb8429fbf024189df62f20fa4
44
config_hash: 5a41a91d658dffbd60d617eb02e945f6

api.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@
33
Types:
44

55
```python
6-
from agentex.types import AcpType, Agent, AgentRpcRequest, AgentListResponse
6+
from agentex.types import (
7+
AcpType,
8+
Agent,
9+
AgentRpcRequest,
10+
AgentListResponse,
11+
AgentRpcResponse,
12+
AgentRpcByNameResponse,
13+
)
714
```
815

916
Methods:
@@ -13,8 +20,8 @@ Methods:
1320
- <code title="delete /agents/{agent_id}">client.agents.<a href="./src/agentex/resources/agents.py">delete</a>(agent_id) -> <a href="./src/agentex/types/agent.py">Agent</a></code>
1421
- <code title="delete /agents/name/{agent_name}">client.agents.<a href="./src/agentex/resources/agents.py">delete_by_name</a>(agent_name) -> <a href="./src/agentex/types/agent.py">Agent</a></code>
1522
- <code title="get /agents/name/{agent_name}">client.agents.<a href="./src/agentex/resources/agents.py">retrieve_by_name</a>(agent_name) -> <a href="./src/agentex/types/agent.py">Agent</a></code>
16-
- <code title="post /agents/{agent_id}/rpc">client.agents.<a href="./src/agentex/resources/agents.py">rpc</a>(agent_id, \*\*<a href="src/agentex/types/agent_rpc_params.py">params</a>) -> object</code>
17-
- <code title="post /agents/name/{agent_name}/rpc">client.agents.<a href="./src/agentex/resources/agents.py">rpc_by_name</a>(agent_name, \*\*<a href="src/agentex/types/agent_rpc_by_name_params.py">params</a>) -> object</code>
23+
- <code title="post /agents/{agent_id}/rpc">client.agents.<a href="./src/agentex/resources/agents.py">rpc</a>(agent_id, \*\*<a href="src/agentex/types/agent_rpc_params.py">params</a>) -> <a href="./src/agentex/types/agent_rpc_response.py">AgentRpcResponse</a></code>
24+
- <code title="post /agents/name/{agent_name}/rpc">client.agents.<a href="./src/agentex/resources/agents.py">rpc_by_name</a>(agent_name, \*\*<a href="src/agentex/types/agent_rpc_by_name_params.py">params</a>) -> <a href="./src/agentex/types/agent_rpc_by_name_response.py">AgentRpcByNameResponse</a></code>
1825

1926
# Tasks
2027

@@ -43,7 +50,6 @@ from agentex.types import (
4350
DataContent,
4451
MessageAuthor,
4552
MessageStyle,
46-
StreamingStatus,
4753
TaskMessage,
4854
TextContent,
4955
ToolRequestContent,

src/agentex/resources/agents.py

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
)
2121
from ..types.agent import Agent
2222
from .._base_client import make_request_options
23+
from ..types.agent_rpc_response import AgentRpcResponse
2324
from ..types.agent_list_response import AgentListResponse
25+
from ..types.agent_rpc_by_name_response import AgentRpcByNameResponse
2426

2527
__all__ = ["AgentsResource", "AsyncAgentsResource"]
2628

@@ -228,11 +230,13 @@ def rpc(
228230
extra_query: Query | None = None,
229231
extra_body: Body | None = None,
230232
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
231-
) -> object:
233+
) -> AgentRpcResponse:
232234
"""
233235
Handle JSON-RPC requests for an agent by its unique ID.
234236
235237
Args:
238+
params: The parameters for the agent RPC request
239+
236240
extra_headers: Send extra headers
237241
238242
extra_query: Add additional query parameters to the request
@@ -257,7 +261,7 @@ def rpc(
257261
options=make_request_options(
258262
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
259263
),
260-
cast_to=object,
264+
cast_to=AgentRpcResponse,
261265
)
262266

263267
def rpc_by_name(
@@ -274,11 +278,13 @@ def rpc_by_name(
274278
extra_query: Query | None = None,
275279
extra_body: Body | None = None,
276280
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
277-
) -> object:
281+
) -> AgentRpcByNameResponse:
278282
"""
279283
Handle JSON-RPC requests for an agent by its unique name.
280284
281285
Args:
286+
params: The parameters for the agent RPC request
287+
282288
extra_headers: Send extra headers
283289
284290
extra_query: Add additional query parameters to the request
@@ -303,7 +309,7 @@ def rpc_by_name(
303309
options=make_request_options(
304310
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
305311
),
306-
cast_to=object,
312+
cast_to=AgentRpcByNameResponse,
307313
)
308314

309315

@@ -510,11 +516,13 @@ async def rpc(
510516
extra_query: Query | None = None,
511517
extra_body: Body | None = None,
512518
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
513-
) -> object:
519+
) -> AgentRpcResponse:
514520
"""
515521
Handle JSON-RPC requests for an agent by its unique ID.
516522
517523
Args:
524+
params: The parameters for the agent RPC request
525+
518526
extra_headers: Send extra headers
519527
520528
extra_query: Add additional query parameters to the request
@@ -539,7 +547,7 @@ async def rpc(
539547
options=make_request_options(
540548
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
541549
),
542-
cast_to=object,
550+
cast_to=AgentRpcResponse,
543551
)
544552

545553
async def rpc_by_name(
@@ -556,11 +564,13 @@ async def rpc_by_name(
556564
extra_query: Query | None = None,
557565
extra_body: Body | None = None,
558566
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
559-
) -> object:
567+
) -> AgentRpcByNameResponse:
560568
"""
561569
Handle JSON-RPC requests for an agent by its unique name.
562570
563571
Args:
572+
params: The parameters for the agent RPC request
573+
564574
extra_headers: Send extra headers
565575
566576
extra_query: Add additional query parameters to the request
@@ -585,7 +595,7 @@ async def rpc_by_name(
585595
options=make_request_options(
586596
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
587597
),
588-
cast_to=object,
598+
cast_to=AgentRpcByNameResponse,
589599
)
590600

591601

src/agentex/resources/messages/messages.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from typing import Optional
6+
from typing_extensions import Literal
67

78
import httpx
89

@@ -14,7 +15,7 @@
1415
BatchResourceWithStreamingResponse,
1516
AsyncBatchResourceWithStreamingResponse,
1617
)
17-
from ...types import StreamingStatus, message_list_params, message_create_params, message_update_params
18+
from ...types import message_list_params, message_create_params, message_update_params
1819
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1920
from ..._utils import maybe_transform, async_maybe_transform
2021
from ..._compat import cached_property
@@ -27,7 +28,6 @@
2728
)
2829
from ..._base_client import make_request_options
2930
from ...types.task_message import TaskMessage
30-
from ...types.streaming_status import StreamingStatus
3131
from ...types.message_list_response import MessageListResponse
3232

3333
__all__ = ["MessagesResource", "AsyncMessagesResource"]
@@ -62,7 +62,7 @@ def create(
6262
*,
6363
content: message_create_params.Content,
6464
task_id: str,
65-
streaming_status: Optional[StreamingStatus] | NotGiven = NOT_GIVEN,
65+
streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]] | NotGiven = NOT_GIVEN,
6666
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6767
# The extra values given here take precedence over values defined on the client or passed to this method.
6868
extra_headers: Headers | None = None,
@@ -137,7 +137,7 @@ def update(
137137
*,
138138
content: message_update_params.Content,
139139
task_id: str,
140-
streaming_status: Optional[StreamingStatus] | NotGiven = NOT_GIVEN,
140+
streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]] | NotGiven = NOT_GIVEN,
141141
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
142142
# The extra values given here take precedence over values defined on the client or passed to this method.
143143
extra_headers: Headers | None = None,
@@ -247,7 +247,7 @@ async def create(
247247
*,
248248
content: message_create_params.Content,
249249
task_id: str,
250-
streaming_status: Optional[StreamingStatus] | NotGiven = NOT_GIVEN,
250+
streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]] | NotGiven = NOT_GIVEN,
251251
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
252252
# The extra values given here take precedence over values defined on the client or passed to this method.
253253
extra_headers: Headers | None = None,
@@ -322,7 +322,7 @@ async def update(
322322
*,
323323
content: message_update_params.Content,
324324
task_id: str,
325-
streaming_status: Optional[StreamingStatus] | NotGiven = NOT_GIVEN,
325+
streaming_status: Optional[Literal["IN_PROGRESS", "DONE"]] | NotGiven = NOT_GIVEN,
326326
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
327327
# The extra values given here take precedence over values defined on the client or passed to this method.
328328
extra_headers: Headers | None = None,

src/agentex/types/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
from .message_author import MessageAuthor as MessageAuthor
1616
from .agent_rpc_params import AgentRpcParams as AgentRpcParams
1717
from .span_list_params import SpanListParams as SpanListParams
18-
from .streaming_status import StreamingStatus as StreamingStatus
1918
from .agent_list_params import AgentListParams as AgentListParams
2019
from .event_list_params import EventListParams as EventListParams
2120
from .state_list_params import StateListParams as StateListParams
21+
from .agent_rpc_response import AgentRpcResponse as AgentRpcResponse
2222
from .agent_task_tracker import AgentTaskTracker as AgentTaskTracker
2323
from .data_content_param import DataContentParam as DataContentParam
2424
from .span_create_params import SpanCreateParams as SpanCreateParams
@@ -41,5 +41,6 @@
4141
from .tracker_list_response import TrackerListResponse as TrackerListResponse
4242
from .tracker_update_params import TrackerUpdateParams as TrackerUpdateParams
4343
from .agent_rpc_by_name_params import AgentRpcByNameParams as AgentRpcByNameParams
44+
from .agent_rpc_by_name_response import AgentRpcByNameResponse as AgentRpcByNameResponse
4445
from .tool_request_content_param import ToolRequestContentParam as ToolRequestContentParam
4546
from .tool_response_content_param import ToolResponseContentParam as ToolResponseContentParam

src/agentex/types/agent_rpc_by_name_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class AgentRpcByNameParams(TypedDict, total=False):
2626
method: Required[Literal["event/send", "task/create", "message/send", "task/cancel"]]
2727

2828
params: Required[Params]
29+
"""The parameters for the agent RPC request"""
2930

3031
id: Union[int, str, None]
3132

0 commit comments

Comments
 (0)