a2a-handler 0.1.23__tar.gz → 0.1.24__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/PKG-INFO +1 -1
  2. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/pyproject.toml +1 -1
  3. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/server/app.py +12 -6
  4. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/LICENSE +0 -0
  5. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/README.md +0 -0
  6. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/__init__.py +0 -0
  7. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/auth.py +0 -0
  8. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/cli/__init__.py +0 -0
  9. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/cli/_helpers.py +0 -0
  10. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/cli/card.py +0 -0
  11. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/cli/mcp.py +0 -0
  12. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/cli/message.py +0 -0
  13. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/cli/schema.py +0 -0
  14. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/cli/server.py +0 -0
  15. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/cli/session.py +0 -0
  16. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/cli/task.py +0 -0
  17. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/common/__init__.py +0 -0
  18. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/common/config.py +0 -0
  19. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/common/dotenv.py +0 -0
  20. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/common/input_validation.py +0 -0
  21. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/common/logging.py +0 -0
  22. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/common/output.py +0 -0
  23. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/mcp/__init__.py +0 -0
  24. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/mcp/server.py +0 -0
  25. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/server/__init__.py +0 -0
  26. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/server/agent.py +0 -0
  27. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/server/card.py +0 -0
  28. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/server/ollama.py +0 -0
  29. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/server/tools/__init__.py +0 -0
  30. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/server/tools/a2a_docs.py +0 -0
  31. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/server/tools/handler_docs.py +0 -0
  32. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/server/tools/source.py +0 -0
  33. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/servers.py +0 -0
  34. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/service.py +0 -0
  35. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/session.py +0 -0
  36. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/__init__.py +0 -0
  37. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/app.py +0 -0
  38. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/app.tcss +0 -0
  39. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/commands/__init__.py +0 -0
  40. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/commands/palette.py +0 -0
  41. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/commands/screens.py +0 -0
  42. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/components/__init__.py +0 -0
  43. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/components/artifacts.py +0 -0
  44. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/components/auth.py +0 -0
  45. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/components/card.py +0 -0
  46. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/components/headers.py +0 -0
  47. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/components/input.py +0 -0
  48. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/components/logs.py +0 -0
  49. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/components/messages.py +0 -0
  50. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/components/tasks.py +0 -0
  51. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/server/__init__.py +0 -0
  52. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/server/save.py +0 -0
  53. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/server/session.py +0 -0
  54. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/server/tab.py +0 -0
  55. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/server/tabs.py +0 -0
  56. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/server/types.py +0 -0
  57. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/server/views.py +0 -0
  58. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/tui/server/workspace.py +0 -0
  59. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/validation.py +0 -0
  60. {a2a_handler-0.1.23 → a2a_handler-0.1.24}/src/a2a_handler/webhook.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: a2a-handler
3
- Version: 0.1.23
3
+ Version: 0.1.24
4
4
  Summary: An A2A Protocol client TUI and CLI.
5
5
  Keywords: a2a,a2a-protocol,agent,agent-to-agent,ai,cli,tui
6
6
  Author: Al Duncanson
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "a2a-handler"
3
- version = "0.1.23"
3
+ version = "0.1.24"
4
4
  description = "An A2A Protocol client TUI and CLI."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -1,7 +1,8 @@
1
1
  """A2A application setup and middleware."""
2
2
 
3
3
  import secrets
4
- from collections.abc import Awaitable, Callable
4
+ from collections.abc import AsyncIterator, Awaitable, Callable
5
+ from contextlib import asynccontextmanager
5
6
 
6
7
  import httpx
7
8
  from a2a.server.apps import A2AStarletteApplication
@@ -195,9 +196,7 @@ def create_a2a_application(
195
196
  Middleware(APIKeyAuthMiddleware, api_key=api_key) # type: ignore[arg-type]
196
197
  )
197
198
 
198
- application = Starlette(middleware=middleware)
199
-
200
- async def setup_a2a_routes() -> None:
199
+ async def setup_a2a_routes(application: Starlette) -> None:
201
200
  a2a_starlette_app = A2AStarletteApplication(
202
201
  agent_card=agent_card,
203
202
  http_handler=request_handler,
@@ -209,7 +208,14 @@ def create_a2a_application(
209
208
  await http_client.aclose()
210
209
  logger.info("HTTP client closed")
211
210
 
212
- application.add_event_handler("startup", setup_a2a_routes)
213
- application.add_event_handler("shutdown", cleanup_http_client)
211
+ @asynccontextmanager
212
+ async def lifespan(application: Starlette) -> AsyncIterator[None]:
213
+ await setup_a2a_routes(application)
214
+ try:
215
+ yield
216
+ finally:
217
+ await cleanup_http_client()
218
+
219
+ application = Starlette(middleware=middleware, lifespan=lifespan)
214
220
 
215
221
  return application
File without changes
File without changes