Factory function to create A2A runner with proper closure.
(captured_app_name: str)
| 683 | if base_path.exists() and base_path.is_dir(): |
| 684 | |
| 685 | def create_a2a_runner_loader(captured_app_name: str): |
| 686 | """Factory function to create A2A runner with proper closure.""" |
| 687 | |
| 688 | async def _get_a2a_runner_async() -> Runner: |
| 689 | return await adk_web_server.get_runner_async(captured_app_name) |
| 690 | |
| 691 | return _get_a2a_runner_async |
| 692 | |
| 693 | for p in base_path.iterdir(): |
| 694 | # only folders with an agent.json file representing agent card are valid |