Close StreamManager and cleanup.
(self)
| 371 | return self._app_host |
| 372 | |
| 373 | async def close(self) -> None: |
| 374 | """Close StreamManager and cleanup.""" |
| 375 | if self._app_host is not None: |
| 376 | try: |
| 377 | await self._app_host.close_all() |
| 378 | except Exception as e: |
| 379 | logger.warning(f"Error closing app host: {e}") |
| 380 | |
| 381 | if self.stream_manager: |
| 382 | try: |
| 383 | await self.stream_manager.close() |
| 384 | except Exception as e: |
| 385 | logger.warning(f"Error closing stream_manager: {e}") |
| 386 | |
| 387 | # ================================================================ |
| 388 | # Tool Access (with ToolInfo conversion) |