22from collections .abc import AsyncGenerator , Callable
33from types import TracebackType
44
5- from typing_extensions import Self
65from google .protobuf .message import Message
6+ from typing_extensions import Self
77
88from a2a .client .middleware import ClientCallContext
99from a2a .types .a2a_pb2 import (
@@ -179,7 +179,7 @@ def update_tenant(self, request: Message) -> str | None:
179179 return current_tenant
180180
181181 if self ._tenant and hasattr (request , 'tenant' ):
182- request . tenant = self ._tenant
182+ setattr ( request , ' tenant' , self ._tenant )
183183 return self ._tenant
184184 return None
185185
@@ -249,7 +249,7 @@ async def cancel_task(
249249 request , context = context , extensions = extensions
250250 )
251251
252- async def set_task_callback (
252+ async def create_task_push_notification_config (
253253 self ,
254254 request : CreateTaskPushNotificationConfigRequest ,
255255 * ,
@@ -258,11 +258,11 @@ async def set_task_callback(
258258 ) -> TaskPushNotificationConfig :
259259 """Sets or updates the push notification configuration for a specific task."""
260260 self .update_tenant (request )
261- return await self ._base .set_task_callback (
261+ return await self ._base .create_task_push_notification_config (
262262 request , context = context , extensions = extensions
263263 )
264264
265- async def get_task_callback (
265+ async def get_task_push_notification_config (
266266 self ,
267267 request : GetTaskPushNotificationConfigRequest ,
268268 * ,
@@ -271,11 +271,11 @@ async def get_task_callback(
271271 ) -> TaskPushNotificationConfig :
272272 """Retrieves the push notification configuration for a specific task."""
273273 self .update_tenant (request )
274- return await self ._base .get_task_callback (
274+ return await self ._base .get_task_push_notification_config (
275275 request , context = context , extensions = extensions
276276 )
277277
278- async def list_task_callback (
278+ async def list_task_push_notification_configs (
279279 self ,
280280 request : ListTaskPushNotificationConfigsRequest ,
281281 * ,
@@ -284,11 +284,11 @@ async def list_task_callback(
284284 ) -> ListTaskPushNotificationConfigsResponse :
285285 """Lists push notification configurations for a specific task."""
286286 self .update_tenant (request )
287- return await self ._base .list_task_callback (
287+ return await self ._base .list_task_push_notification_configs (
288288 request , context = context , extensions = extensions
289289 )
290290
291- async def delete_task_callback (
291+ async def delete_task_push_notification_config (
292292 self ,
293293 request : DeleteTaskPushNotificationConfigRequest ,
294294 * ,
@@ -297,7 +297,7 @@ async def delete_task_callback(
297297 ) -> None :
298298 """Deletes the push notification configuration for a specific task."""
299299 self .update_tenant (request )
300- await self ._base .delete_task_callback (
300+ await self ._base .delete_task_push_notification_config (
301301 request , context = context , extensions = extensions
302302 )
303303
0 commit comments