File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
src/a2a/server/apps/jsonrpc Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1717 AGENT_CARD_WELL_KNOWN_PATH ,
1818 DEFAULT_RPC_URL ,
1919 EXTENDED_AGENT_CARD_PATH ,
20+ PREV_AGENT_CARD_WELL_KNOWN_PATH ,
2021)
2122
2223
@@ -102,6 +103,12 @@ def add_routes_to_app(
102103 )(self ._handle_requests )
103104 app .get (agent_card_url )(self ._handle_get_agent_card )
104105
106+ if agent_card_url == AGENT_CARD_WELL_KNOWN_PATH :
107+ # For backward compatibility, serve the agent card at the deprecated path as well.
108+ app .get (PREV_AGENT_CARD_WELL_KNOWN_PATH )(
109+ self ._handle_get_agent_card
110+ )
111+
105112 if self .agent_card .supports_authenticated_extended_card :
106113 app .get (extended_agent_card_url )(
107114 self ._handle_get_authenticated_extended_agent_card
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ async def test_get_agent_card_with_modifier(
210210 """Test GetAgentCard call with a card_modifier."""
211211
212212 def modifier (card : types .AgentCard ) -> types .AgentCard :
213- modified_card = card .model_copy ()
213+ modified_card = card .model_copy (deep = True )
214214 modified_card .name = 'Modified gRPC Agent'
215215 return modified_card
216216
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ def test_authenticated_extended_agent_card_endpoint_supported_with_specific_exte
228228 agent_card .supports_authenticated_extended_card = (
229229 True # Main card must support it
230230 )
231- print ( agent_card )
231+
232232 app_instance = A2AStarletteApplication (
233233 agent_card , handler , extended_agent_card = extended_agent_card_fixture
234234 )
You can’t perform that action at this time.
0 commit comments