Skip to content

Commit a02c15b

Browse files
feat(api): revert model additions
1 parent 1998d73 commit a02c15b

9 files changed

Lines changed: 126 additions & 111 deletions

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 45
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-d8e0ed10d4e646d74d9f7b19b57e762c1d0497c07d79b78b304ba7f6bbaff6f6.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-9ab4b375245291b8e37dd1cbc054fa65f17b7e7db28729126ea9f1289dc99214.yml
33
openapi_spec_hash: d31d828c46635cbc20165177c7187a70
4-
config_hash: a28c5bb7b4fadff7aadcf2b8e3aa4964
4+
config_hash: fb079ef7936611b032568661b8165f19

api.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@ from agentex.types import (
1515
AgentRpcRequest,
1616
AgentRpcResponse,
1717
AgentRpcResult,
18-
CancelTaskRequest,
19-
CreateTaskRequest,
2018
DataDelta,
2119
ReasoningContentDelta,
2220
ReasoningSummaryDelta,
23-
SendEventRequest,
24-
SendMessageRequest,
2521
TaskMessageContent,
2622
TaskMessageDelta,
2723
TaskMessageUpdate,

src/agentex/types/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,7 @@
6464
from .reasoning_content_param import ReasoningContentParam as ReasoningContentParam
6565
from .reasoning_summary_delta import ReasoningSummaryDelta as ReasoningSummaryDelta
6666
from .agent_rpc_by_name_params import AgentRpcByNameParams as AgentRpcByNameParams
67-
from .send_event_request_param import SendEventRequestParam as SendEventRequestParam
6867
from .task_update_by_id_params import TaskUpdateByIDParams as TaskUpdateByIDParams
69-
from .cancel_task_request_param import CancelTaskRequestParam as CancelTaskRequestParam
70-
from .create_task_request_param import CreateTaskRequestParam as CreateTaskRequestParam
71-
from .send_message_request_param import SendMessageRequestParam as SendMessageRequestParam
7268
from .task_message_content_param import TaskMessageContentParam as TaskMessageContentParam
7369
from .task_update_by_name_params import TaskUpdateByNameParams as TaskUpdateByNameParams
7470
from .tool_request_content_param import ToolRequestContentParam as ToolRequestContentParam

src/agentex/types/agent_rpc_by_name_params.py

Lines changed: 62 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22

33
from __future__ import annotations
44

5-
from typing import Union
5+
from typing import Dict, Union, Optional
66
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

8-
from .send_event_request_param import SendEventRequestParam
9-
from .cancel_task_request_param import CancelTaskRequestParam
10-
from .create_task_request_param import CreateTaskRequestParam
11-
from .send_message_request_param import SendMessageRequestParam
8+
from .task_message_content_param import TaskMessageContentParam
129

13-
__all__ = ["AgentRpcByNameParams", "Params"]
10+
__all__ = [
11+
"AgentRpcByNameParams",
12+
"Params",
13+
"ParamsCreateTaskRequest",
14+
"ParamsCancelTaskRequest",
15+
"ParamsSendMessageRequest",
16+
"ParamsSendEventRequest",
17+
]
1418

1519

1620
class AgentRpcByNameParams(TypedDict, total=False):
@@ -24,6 +28,57 @@ class AgentRpcByNameParams(TypedDict, total=False):
2428
jsonrpc: Literal["2.0"]
2529

2630

31+
class ParamsCreateTaskRequest(TypedDict, total=False):
32+
name: Optional[str]
33+
"""The name of the task to create"""
34+
35+
params: Optional[Dict[str, object]]
36+
"""The parameters for the task"""
37+
38+
task_metadata: Optional[Dict[str, object]]
39+
"""Caller-provided metadata to persist on the task row.
40+
41+
Only applied at task creation; ignored if a task with this name already exists.
42+
Forwarded to the agent inside the ACP payload for backward compatibility.
43+
"""
44+
45+
46+
class ParamsCancelTaskRequest(TypedDict, total=False):
47+
task_id: Optional[str]
48+
"""The ID of the task to cancel. Either this or task_name must be provided."""
49+
50+
task_name: Optional[str]
51+
"""The name of the task to cancel. Either this or task_id must be provided."""
52+
53+
54+
class ParamsSendMessageRequest(TypedDict, total=False):
55+
content: Required[TaskMessageContentParam]
56+
"""The message that was sent to the agent"""
57+
58+
stream: bool
59+
"""Whether to stream the response message back to the client"""
60+
61+
task_id: Optional[str]
62+
"""The ID of the task that the message was sent to"""
63+
64+
task_name: Optional[str]
65+
"""The name of the task that the message was sent to"""
66+
67+
task_params: Optional[Dict[str, object]]
68+
"""The parameters for the task (only used when creating new tasks)"""
69+
70+
71+
class ParamsSendEventRequest(TypedDict, total=False):
72+
content: Optional[TaskMessageContentParam]
73+
"""The content to send to the event"""
74+
75+
task_id: Optional[str]
76+
"""The ID of the task that the event was sent to"""
77+
78+
task_name: Optional[str]
79+
"""The name of the task that the event was sent to"""
80+
81+
2782
Params: TypeAlias = Union[
28-
CreateTaskRequestParam, CancelTaskRequestParam, SendMessageRequestParam, SendEventRequestParam
83+
ParamsCreateTaskRequest, ParamsCancelTaskRequest, ParamsSendMessageRequest, ParamsSendEventRequest
2984
]

src/agentex/types/agent_rpc_params.py

Lines changed: 62 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22

33
from __future__ import annotations
44

5-
from typing import Union
5+
from typing import Dict, Union, Optional
66
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

8-
from .send_event_request_param import SendEventRequestParam
9-
from .cancel_task_request_param import CancelTaskRequestParam
10-
from .create_task_request_param import CreateTaskRequestParam
11-
from .send_message_request_param import SendMessageRequestParam
8+
from .task_message_content_param import TaskMessageContentParam
129

13-
__all__ = ["AgentRpcParams", "Params"]
10+
__all__ = [
11+
"AgentRpcParams",
12+
"Params",
13+
"ParamsCreateTaskRequest",
14+
"ParamsCancelTaskRequest",
15+
"ParamsSendMessageRequest",
16+
"ParamsSendEventRequest",
17+
]
1418

1519

1620
class AgentRpcParams(TypedDict, total=False):
@@ -24,6 +28,57 @@ class AgentRpcParams(TypedDict, total=False):
2428
jsonrpc: Literal["2.0"]
2529

2630

31+
class ParamsCreateTaskRequest(TypedDict, total=False):
32+
name: Optional[str]
33+
"""The name of the task to create"""
34+
35+
params: Optional[Dict[str, object]]
36+
"""The parameters for the task"""
37+
38+
task_metadata: Optional[Dict[str, object]]
39+
"""Caller-provided metadata to persist on the task row.
40+
41+
Only applied at task creation; ignored if a task with this name already exists.
42+
Forwarded to the agent inside the ACP payload for backward compatibility.
43+
"""
44+
45+
46+
class ParamsCancelTaskRequest(TypedDict, total=False):
47+
task_id: Optional[str]
48+
"""The ID of the task to cancel. Either this or task_name must be provided."""
49+
50+
task_name: Optional[str]
51+
"""The name of the task to cancel. Either this or task_id must be provided."""
52+
53+
54+
class ParamsSendMessageRequest(TypedDict, total=False):
55+
content: Required[TaskMessageContentParam]
56+
"""The message that was sent to the agent"""
57+
58+
stream: bool
59+
"""Whether to stream the response message back to the client"""
60+
61+
task_id: Optional[str]
62+
"""The ID of the task that the message was sent to"""
63+
64+
task_name: Optional[str]
65+
"""The name of the task that the message was sent to"""
66+
67+
task_params: Optional[Dict[str, object]]
68+
"""The parameters for the task (only used when creating new tasks)"""
69+
70+
71+
class ParamsSendEventRequest(TypedDict, total=False):
72+
content: Optional[TaskMessageContentParam]
73+
"""The content to send to the event"""
74+
75+
task_id: Optional[str]
76+
"""The ID of the task that the event was sent to"""
77+
78+
task_name: Optional[str]
79+
"""The name of the task that the event was sent to"""
80+
81+
2782
Params: TypeAlias = Union[
28-
CreateTaskRequestParam, CancelTaskRequestParam, SendMessageRequestParam, SendEventRequestParam
83+
ParamsCreateTaskRequest, ParamsCancelTaskRequest, ParamsSendMessageRequest, ParamsSendEventRequest
2984
]

src/agentex/types/cancel_task_request_param.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/agentex/types/create_task_request_param.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/agentex/types/send_event_request_param.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/agentex/types/send_message_request_param.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)