File tree Expand file tree Collapse file tree
src/lightspeed_agent/api/a2a Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ async def before_run_callback(
5050 logger .info (
5151 "Agent run started (invocation_id=%s, agent=%s)" ,
5252 invocation_context .invocation_id ,
53- invocation_context .agent_name , # type: ignore[attr-defined]
53+ invocation_context .agent . name ,
5454 )
5555 return None
5656
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ def plugin(self):
4444 async def test_before_run_logs_info (self , plugin , caplog ):
4545 ctx = MagicMock ()
4646 ctx .invocation_id = "inv-123"
47- ctx .agent_name = "test_agent"
47+ ctx .agent = MagicMock ( name = "test_agent" )
4848
4949 with caplog .at_level (logging .INFO ):
5050 result = await plugin .before_run_callback (invocation_context = ctx )
@@ -270,7 +270,7 @@ def plugin(self):
270270 async def test_all_callbacks_return_none (self , plugin ):
271271 ctx = MagicMock ()
272272 ctx .invocation_id = "inv-1"
273- ctx .agent_name = "agent"
273+ ctx .agent = MagicMock ( name = "agent" )
274274
275275 tool = MagicMock ()
276276 tool .name = "test_tool"
You can’t perform that action at this time.
0 commit comments