Skip to content

Commit 90a49c6

Browse files
committed
add @validate_version(constants.PROTOCOL_VERSION_1_0) to handler in handle_authenticated_agent_card
1 parent 21667bd commit 90a49c6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/a2a/server/routes/jsonrpc_dispatcher.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,10 @@ async def handle_requests(self, request: Request) -> Response: # noqa: PLR0911,
374374
call_context.state['method'] = method
375375
call_context.state['request_id'] = request_id
376376

377+
# Route streaming requests by method name
377378
handler_result: (
378379
AsyncGenerator[dict[str, Any], None] | dict[str, Any]
379380
)
380-
381-
# Route streaming requests by method name
382381
if method in ('SendStreamingMessage', 'SubscribeToTask'):
383382
handler_result = await self._process_streaming_request(
384383
request_id, specific_request, call_context

src/a2a/server/routes/rest_dispatcher.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ async def handle_authenticated_agent_card(
334334
) -> Response:
335335
"""Handles the 'agentCard' REST method."""
336336

337+
@validate_version(constants.PROTOCOL_VERSION_1_0)
337338
async def _handler(
338339
context: ServerCallContext,
339340
) -> a2a_pb2.AgentCard:

0 commit comments

Comments
 (0)