File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/a2a/server/apps/jsonrpc Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,21 @@ class JSONRPCApplication(ABC):
156156 """
157157
158158 # Method-to-model mapping for centralized routing
159- METHOD_TO_MODEL = {
159+ # Define the union type for all supported request models
160+ A2ARequestModel = (
161+ SendMessageRequest
162+ | SendStreamingMessageRequest
163+ | GetTaskRequest
164+ | CancelTaskRequest
165+ | SetTaskPushNotificationConfigRequest
166+ | GetTaskPushNotificationConfigRequest
167+ | ListTaskPushNotificationConfigRequest
168+ | DeleteTaskPushNotificationConfigRequest
169+ | TaskResubscriptionRequest
170+ | GetAuthenticatedExtendedCardRequest
171+ )
172+
173+ METHOD_TO_MODEL : dict [str , type [A2ARequestModel ]] = {
160174 'message/send' : SendMessageRequest ,
161175 'message/stream' : SendStreamingMessageRequest ,
162176 'tasks/get' : GetTaskRequest ,
You can’t perform that action at this time.
0 commit comments