a2a-sdk 1.2.2__tar.gz → 1.2.3__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 (226) hide show
  1. a2a_sdk-1.2.3/.release-please-manifest.json +3 -0
  2. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/CHANGELOG.md +18 -0
  3. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/PKG-INFO +1 -1
  4. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/card_resolver.py +8 -3
  5. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/client_factory.py +15 -7
  6. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/conversions.py +4 -2
  7. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/proto_utils.py +3 -1
  8. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/agent_execution/active_task.py +51 -10
  9. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/request_handlers/default_request_handler.py +19 -1
  10. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/request_handlers/default_request_handler_v2.py +9 -0
  11. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/request_handlers/response_helpers.py +4 -0
  12. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/routes/agent_card_routes.py +5 -0
  13. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/base_push_notification_sender.py +32 -7
  14. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/push_notification_sender.py +6 -1
  15. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/_jcs.py +8 -3
  16. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/proto_utils.py +44 -0
  17. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/push_url_validator.py +18 -9
  18. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/signing.py +8 -3
  19. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/telemetry.py +17 -2
  20. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/uv.lock +3 -3
  21. a2a_sdk-1.2.2/.release-please-manifest.json +0 -3
  22. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.agents/skills/mistake-reflection/SKILL.md +0 -0
  23. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.gemini/config.yaml +0 -0
  24. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.git-blame-ignore-revs +0 -0
  25. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/CODEOWNERS +0 -0
  26. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
  27. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
  28. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  29. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/actions/spelling/advice.md +0 -0
  30. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/actions/spelling/allow.txt +0 -0
  31. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/actions/spelling/excludes.txt +0 -0
  32. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/actions/spelling/line_forbidden.patterns +0 -0
  33. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/actions/spelling/patterns.txt +0 -0
  34. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/conventional-commit-lint.yaml +0 -0
  35. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/dependabot.yml +0 -0
  36. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/acts-nightly.yaml +0 -0
  37. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/acts.yaml +0 -0
  38. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/auto-assign-new-issues.yaml +0 -0
  39. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/conventional-commits.yml +0 -0
  40. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/coverage-comment.yaml +0 -0
  41. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/install-smoke.yml +0 -0
  42. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/itk.yaml +0 -0
  43. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/linter.yaml +0 -0
  44. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/nightly.yaml +0 -0
  45. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/python-publish.yml +0 -0
  46. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/release-please.yml +0 -0
  47. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/release-pr-approvals.yml +0 -0
  48. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/run-tck.yaml +0 -0
  49. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/security.yaml +0 -0
  50. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/spelling.yaml +0 -0
  51. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/stale.yaml +0 -0
  52. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.github/workflows/unit-tests.yml +0 -0
  53. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.gitignore +0 -0
  54. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.jscpd.json +0 -0
  55. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.pre-commit-config.yaml +0 -0
  56. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.python-version +0 -0
  57. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.vscode/extensions.json +0 -0
  58. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.vscode/launch.json +0 -0
  59. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/.vscode/settings.json +0 -0
  60. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/AGENTS.md +0 -0
  61. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/CODE_OF_CONDUCT.md +0 -0
  62. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/CONTRIBUTING.md +0 -0
  63. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/LICENSE +0 -0
  64. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/README.md +0 -0
  65. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/SECURITY.md +0 -0
  66. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/acts/sut-behaviors.yaml +0 -0
  67. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/buf.compat.gen.yaml +0 -0
  68. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/buf.gen.yaml +0 -0
  69. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/docs/ai/coding_conventions.md +0 -0
  70. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/docs/ai/evidence_rules.md +0 -0
  71. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/docs/ai/mandatory_checks.md +0 -0
  72. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/docs/migrations/v1_0/README.md +0 -0
  73. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/docs/migrations/v1_0/database/README.md +0 -0
  74. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/docs/migrations/v1_0/database/simple_migration.md +0 -0
  75. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/docs/migrations/v1_0/database/zero_downtime.md +0 -0
  76. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/itk/README.md +0 -0
  77. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/itk/__init__.py +0 -0
  78. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/itk/acts_behaviors.py +0 -0
  79. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/itk/acts_client_parse.py +0 -0
  80. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/itk/main.py +0 -0
  81. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/itk/pyproject.toml +0 -0
  82. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/itk/run_itk.sh +0 -0
  83. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/pyproject.toml +0 -0
  84. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/release-please-config.json +0 -0
  85. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/samples/README.md +0 -0
  86. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/samples/__init__.py +0 -0
  87. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/samples/agent_card_signing.py +0 -0
  88. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/samples/cli.py +0 -0
  89. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/samples/clustermode/README.md +0 -0
  90. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/samples/clustermode/__init__.py +0 -0
  91. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/samples/clustermode/cluster_common.py +0 -0
  92. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/samples/clustermode/exercise.py +0 -0
  93. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/samples/clustermode/run_cluster.py +0 -0
  94. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/samples/clustermode/server.py +0 -0
  95. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/samples/hello_world_agent.py +0 -0
  96. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/scripts/docker-compose.test.yml +0 -0
  97. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/scripts/format.sh +0 -0
  98. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/scripts/gen_proto.sh +0 -0
  99. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/scripts/gen_proto_compat.sh +0 -0
  100. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/scripts/lint.sh +0 -0
  101. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/scripts/run_db_tests.sh +0 -0
  102. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/scripts/test_install_smoke.sh +0 -0
  103. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/__init__.py +0 -0
  104. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/_base.py +0 -0
  105. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/a2a_db_cli.py +0 -0
  106. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/alembic.ini +0 -0
  107. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/auth/__init__.py +0 -0
  108. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/auth/user.py +0 -0
  109. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/__init__.py +0 -0
  110. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/auth/__init__.py +0 -0
  111. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/auth/credentials.py +0 -0
  112. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/auth/interceptor.py +0 -0
  113. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/base_client.py +0 -0
  114. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/client.py +0 -0
  115. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/errors.py +0 -0
  116. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/interceptors.py +0 -0
  117. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/optionals.py +0 -0
  118. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/service_parameters.py +0 -0
  119. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/transports/__init__.py +0 -0
  120. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/transports/base.py +0 -0
  121. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/transports/grpc.py +0 -0
  122. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/transports/http_helpers.py +0 -0
  123. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/transports/jsonrpc.py +0 -0
  124. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/transports/rest.py +0 -0
  125. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/client/transports/tenant_decorator.py +0 -0
  126. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/__init__.py +0 -0
  127. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/README.md +0 -0
  128. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/__init__.py +0 -0
  129. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/a2a_v0_3.proto +0 -0
  130. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/a2a_v0_3_pb2.py +0 -0
  131. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/a2a_v0_3_pb2.pyi +0 -0
  132. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py +0 -0
  133. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/buf.lock +0 -0
  134. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/buf.yaml +0 -0
  135. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/context_builders.py +0 -0
  136. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/extension_headers.py +0 -0
  137. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/grpc_handler.py +0 -0
  138. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/grpc_transport.py +0 -0
  139. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/jsonrpc_adapter.py +0 -0
  140. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/jsonrpc_transport.py +0 -0
  141. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/model_conversions.py +0 -0
  142. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/request_handler.py +0 -0
  143. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/rest_adapter.py +0 -0
  144. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/rest_handler.py +0 -0
  145. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/rest_transport.py +0 -0
  146. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/types.py +0 -0
  147. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/compat/v0_3/versions.py +0 -0
  148. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/extensions/__init__.py +0 -0
  149. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/extensions/common.py +0 -0
  150. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/helpers/__init__.py +0 -0
  151. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/helpers/agent_card.py +0 -0
  152. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/helpers/proto_helpers.py +0 -0
  153. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/migrations/README.md +0 -0
  154. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/migrations/__init__.py +0 -0
  155. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/migrations/env.py +0 -0
  156. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/migrations/migration_utils.py +0 -0
  157. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/migrations/script.py.mako +0 -0
  158. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/migrations/versions/38ce57e08137_add_column_protocol_version.py +0 -0
  159. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/migrations/versions/6419d2d130f6_add_columns_owner_last_updated.py +0 -0
  160. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/migrations/versions/__init__.py +0 -0
  161. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/migrations/versions/b5e3d1c8a2f7_add_task_version_and_task_events.py +0 -0
  162. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/py.typed +0 -0
  163. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/__init__.py +0 -0
  164. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/agent_execution/__init__.py +0 -0
  165. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/agent_execution/active_task_registry.py +0 -0
  166. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/agent_execution/agent_executor.py +0 -0
  167. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/agent_execution/context.py +0 -0
  168. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/agent_execution/request_context_builder.py +0 -0
  169. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/agent_execution/simple_request_context_builder.py +0 -0
  170. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/cluster/__init__.py +0 -0
  171. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/cluster/database_event_stream.py +0 -0
  172. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/cluster/database_task_store.py +0 -0
  173. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/cluster/event_stream.py +0 -0
  174. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/cluster/task_store.py +0 -0
  175. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/cluster/version.py +0 -0
  176. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/context.py +0 -0
  177. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/events/__init__.py +0 -0
  178. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/events/event_consumer.py +0 -0
  179. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/events/event_queue.py +0 -0
  180. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/events/event_queue_v2.py +0 -0
  181. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/events/in_memory_queue_manager.py +0 -0
  182. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/events/queue_manager.py +0 -0
  183. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/id_generator.py +0 -0
  184. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/jsonrpc_models.py +0 -0
  185. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/models.py +0 -0
  186. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/owner_resolver.py +0 -0
  187. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/request_handlers/__init__.py +0 -0
  188. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/request_handlers/grpc_handler.py +0 -0
  189. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/request_handlers/request_handler.py +0 -0
  190. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/routes/__init__.py +0 -0
  191. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/routes/_jsonrpc_schema.py +0 -0
  192. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/routes/_proto_schema.py +0 -0
  193. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/routes/common.py +0 -0
  194. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/routes/fastapi_routes.py +0 -0
  195. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/routes/jsonrpc_dispatcher.py +0 -0
  196. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/routes/jsonrpc_routes.py +0 -0
  197. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/routes/rest_dispatcher.py +0 -0
  198. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/routes/rest_routes.py +0 -0
  199. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/__init__.py +0 -0
  200. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/copying_task_store.py +0 -0
  201. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/database_push_notification_config_store.py +0 -0
  202. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/database_task_store.py +0 -0
  203. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/inmemory_push_notification_config_store.py +0 -0
  204. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/inmemory_task_store.py +0 -0
  205. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/push_notification_config_store.py +0 -0
  206. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/result_aggregator.py +0 -0
  207. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/task_manager.py +0 -0
  208. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/task_store.py +0 -0
  209. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/server/tasks/task_updater.py +0 -0
  210. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/types/__init__.py +0 -0
  211. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/types/a2a_pb2.py +0 -0
  212. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/types/a2a_pb2.pyi +0 -0
  213. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/types/a2a_pb2_grpc.py +0 -0
  214. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/__init__.py +0 -0
  215. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/_async_queue_compat.py +0 -0
  216. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/constants.py +0 -0
  217. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/error_handlers.py +0 -0
  218. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/errors.py +0 -0
  219. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/grpc_status.py +0 -0
  220. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/input_mode_validator.py +0 -0
  221. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/json_utils.py +0 -0
  222. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/task.py +0 -0
  223. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/src/a2a/utils/version_validator.py +0 -0
  224. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/tck/__init__.py +0 -0
  225. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/tck/sut_agent.py +0 -0
  226. {a2a_sdk-1.2.2 → a2a_sdk-1.2.3}/tck/sut_agent_with_vertex_task_store.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.2.3"
3
+ }
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.2.3](https://github.com/a2aproject/a2a-python/compare/v1.2.2...v1.2.3) (2026-10-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **client:** ignore the patch version when preferring a 1.0 interface ([#1304](https://github.com/a2aproject/a2a-python/issues/1304)) ([cbb2d84](https://github.com/a2aproject/a2a-python/commit/cbb2d8418df26567b4ed4ed9e160071dd04904d8))
9
+ * **client:** normalize malformed agent card parsing errors ([#1307](https://github.com/a2aproject/a2a-python/issues/1307)) ([486f0f6](https://github.com/a2aproject/a2a-python/commit/486f0f65b753077f401f2428490e26ca0eedc092))
10
+ * **compat:** block on a v0.3 gRPC and REST send without configuration ([#1334](https://github.com/a2aproject/a2a-python/issues/1334)) ([8160310](https://github.com/a2aproject/a2a-python/commit/8160310dd36e55ae33879d95692e2535e1cfdab8)), closes [#1321](https://github.com/a2aproject/a2a-python/issues/1321)
11
+ * **compat:** treat a v0.3 history_length of 0 as unlimited in JSON-RPC and REST ([#1312](https://github.com/a2aproject/a2a-python/issues/1312)) ([e86695c](https://github.com/a2aproject/a2a-python/commit/e86695cb2076874950f36f53d49771c8e09e185e))
12
+ * **jcs:** count open containers for the nesting bound, so an empty container leaf is refused ([#1294](https://github.com/a2aproject/a2a-python/issues/1294)) ([5653daf](https://github.com/a2aproject/a2a-python/commit/5653daf8315ab58c8dacc53be720c4ed632ee7ce))
13
+ * **server:** isolate push notification failures from the task lifecycle ([#1329](https://github.com/a2aproject/a2a-python/issues/1329)) ([0ee47d7](https://github.com/a2aproject/a2a-python/commit/0ee47d7baa47a706e33934a4e4c3d46bad16298f))
14
+ * **server:** mark internal lifecycle events done so a cancelled stream frees its producer ([#1336](https://github.com/a2aproject/a2a-python/issues/1336)) ([a4c4fc9](https://github.com/a2aproject/a2a-python/commit/a4c4fc91a22778f3d805e5e592bf690915a33033))
15
+ * **server:** reject push URLs in shared address space ([#1326](https://github.com/a2aproject/a2a-python/issues/1326)) ([01da00b](https://github.com/a2aproject/a2a-python/commit/01da00b0951ba6201af860d17b4c088be7902d43))
16
+ * **server:** release the ActiveTask after a direct Message response ([#1297](https://github.com/a2aproject/a2a-python/issues/1297)) ([49ebce6](https://github.com/a2aproject/a2a-python/commit/49ebce66389171dce38b74ebefb31ae4ad042e7e))
17
+ * **server:** run follow-up messages in the sender's contextvars ([#1317](https://github.com/a2aproject/a2a-python/issues/1317)) ([a016002](https://github.com/a2aproject/a2a-python/commit/a0160025d6d211b0be1762cb829e7a47c147191a))
18
+ * **server:** warn when an AgentCard is missing required fields ([#1279](https://github.com/a2aproject/a2a-python/issues/1279)) ([4f4101c](https://github.com/a2aproject/a2a-python/commit/4f4101cefd5e636a932c8017a8b3b11634be1d67))
19
+ * **telemetry:** let trace_function alone decide a span's status ([#1309](https://github.com/a2aproject/a2a-python/issues/1309)) ([59dcbfb](https://github.com/a2aproject/a2a-python/commit/59dcbfb16f73c7c596e6d60cb700ed71193c5cce))
20
+
3
21
  ## [1.2.2](https://github.com/a2aproject/a2a-python/compare/v1.2.1...v1.2.2) (2026-10-03)
4
22
 
5
23
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: a2a-sdk
3
- Version: 1.2.2
3
+ Version: 1.2.3
4
4
  Summary: A2A Python SDK
5
5
  Project-URL: homepage, https://a2a-protocol.org/
6
6
  Project-URL: repository, https://github.com/a2aproject/a2a-python
@@ -20,9 +20,14 @@ logger = logging.getLogger(__name__)
20
20
 
21
21
  def parse_agent_card(agent_card_data: dict[str, Any]) -> AgentCard:
22
22
  """Parse AgentCard JSON dictionary and handle backward compatibility."""
23
- _handle_extended_card_compatibility(agent_card_data)
24
- _handle_connection_fields_compatibility(agent_card_data)
25
- _handle_security_compatibility(agent_card_data)
23
+ if not isinstance(agent_card_data, dict):
24
+ raise ParseError('Agent card must be a JSON object')
25
+ try:
26
+ _handle_extended_card_compatibility(agent_card_data)
27
+ _handle_connection_fields_compatibility(agent_card_data)
28
+ _handle_security_compatibility(agent_card_data)
29
+ except (TypeError, AttributeError) as e:
30
+ raise ParseError(f'Invalid agent card structure: {e}') from e
26
31
 
27
32
  return ParseDict(agent_card_data, AgentCard(), ignore_unknown_fields=True)
28
33
 
@@ -55,6 +55,12 @@ TransportProducer = Callable[
55
55
  ]
56
56
 
57
57
 
58
+ def major_minor(version: str) -> tuple[int, int]:
59
+ """Returns the `Major.Minor` release of a protocol version."""
60
+ v = Version(version)
61
+ return (v.major, v.minor)
62
+
63
+
58
64
  class ClientFactory:
59
65
  """Factory for creating clients that communicate with A2A agents.
60
66
 
@@ -229,10 +235,10 @@ class ClientFactory:
229
235
  if not candidates:
230
236
  return None
231
237
 
232
- # Prefer interface with version 1.0
233
- for i in candidates:
234
- if i.protocol_version == PROTOCOL_VERSION_1_0:
235
- return i
238
+ # Prefer interface with version 1.0. Patch versions must not affect
239
+ # negotiation, so '1.0.0' counts as '1.0'.
240
+ v1_0 = major_minor(PROTOCOL_VERSION_1_0)
241
+ v0_3 = major_minor(PROTOCOL_VERSION_0_3)
236
242
 
237
243
  best_gt_1_0 = None
238
244
  best_ge_0_3 = None
@@ -245,10 +251,12 @@ class ClientFactory:
245
251
  continue
246
252
 
247
253
  try:
248
- v = Version(i.protocol_version)
249
- if best_gt_1_0 is None and v > Version(PROTOCOL_VERSION_1_0):
254
+ v = major_minor(i.protocol_version)
255
+ if v == v1_0:
256
+ return i
257
+ if best_gt_1_0 is None and v > v1_0:
250
258
  best_gt_1_0 = i
251
- if best_ge_0_3 is None and v >= Version(PROTOCOL_VERSION_0_3):
259
+ if best_ge_0_3 is None and v >= v0_3:
252
260
  best_ge_0_3 = i
253
261
  except InvalidVersion:
254
262
  pass
@@ -317,7 +317,8 @@ def to_core_send_message_configuration(
317
317
  compat_config.push_notification_config
318
318
  )
319
319
  )
320
- if compat_config.history_length is not None:
320
+ # v0.3 treats 0 as unlimited, so leave it unset.
321
+ if compat_config.history_length:
321
322
  core_config.history_length = compat_config.history_length
322
323
  if compat_config.blocking is not None:
323
324
  core_config.return_immediately = not compat_config.blocking
@@ -1074,7 +1075,8 @@ def to_core_get_task_request(
1074
1075
  """Convert get task request to v1.0 core type."""
1075
1076
  core_req = pb2_v10.GetTaskRequest()
1076
1077
  core_req.id = compat_req.params.id
1077
- if compat_req.params.history_length is not None:
1078
+ # v0.3 treats 0 as unlimited, so leave it unset.
1079
+ if compat_req.params.history_length:
1078
1080
  core_req.history_length = compat_req.params.history_length
1079
1081
  return core_req
1080
1082
 
@@ -804,7 +804,9 @@ class FromProto:
804
804
  cls, request: a2a_pb2.SendMessageRequest
805
805
  ) -> types.MessageSendParams:
806
806
  return types.MessageSendParams(
807
- configuration=cls.message_send_configuration(request.configuration),
807
+ configuration=cls.message_send_configuration(request.configuration)
808
+ if request.HasField('configuration')
809
+ else None,
808
810
  message=cls.message(request.request),
809
811
  metadata=cls.metadata(request.metadata),
810
812
  )
@@ -36,6 +36,7 @@ Data Flow and Event Handling:
36
36
  from __future__ import annotations
37
37
 
38
38
  import asyncio
39
+ import contextvars
39
40
  import logging
40
41
  import uuid
41
42
 
@@ -237,6 +238,18 @@ class EventConsumer:
237
238
 
238
239
  await self._enqueue_to_subscribers(event, updated_task)
239
240
 
241
+ if isinstance(event, Message):
242
+ self._handle_message_completion()
243
+
244
+ def _handle_message_completion(self) -> None:
245
+ # A direct Message has no task to continue, so finish like a terminal state.
246
+ logger.debug(
247
+ 'Consumer[%s]: Message response, finishing',
248
+ self.active_task._task_id,
249
+ )
250
+ self.active_task._is_finished.set()
251
+ self.active_task._request_queue.shutdown(immediate=True)
252
+
240
253
  def _handle_message_event(self, event: Message) -> None:
241
254
  if self.task_mode is True:
242
255
  raise InvalidAgentResponseError(
@@ -345,9 +358,21 @@ class EventConsumer:
345
358
  'Consumer[%s]: Sending push notification',
346
359
  self.active_task._task_id,
347
360
  )
348
- await self.active_task._push_sender.send_notification(
349
- self.active_task._task_id, event
350
- )
361
+ try:
362
+ await self.active_task._push_sender.send_notification(
363
+ self.active_task._task_id, event
364
+ )
365
+ except Exception:
366
+ # Push delivery is best-effort: a sender failure must not
367
+ # fail the task or disturb the event stream. This guard is
368
+ # defense-in-depth on top of the boundary inside
369
+ # BasePushNotificationSender, and also protects against
370
+ # custom PushNotificationSender implementations.
371
+ logger.exception(
372
+ 'Consumer[%s]: Push notification sender raised; '
373
+ 'ignoring the failure.',
374
+ self.active_task._task_id,
375
+ )
351
376
 
352
377
  async def _handle_terminal_state(self, updated_task: Task) -> None:
353
378
  logger.debug(
@@ -468,9 +493,9 @@ class ActiveTask:
468
493
  self._reference_count = 0
469
494
 
470
495
  # Queue for incoming requests
471
- self._request_queue: AsyncQueue[tuple[RequestContext, uuid.UUID]] = (
472
- create_async_queue()
473
- )
496
+ self._request_queue: AsyncQueue[
497
+ tuple[RequestContext, uuid.UUID, contextvars.Context]
498
+ ] = create_async_queue()
474
499
 
475
500
  @property
476
501
  def task_id(self) -> str:
@@ -480,9 +505,16 @@ class ActiveTask:
480
505
  async def enqueue_request(
481
506
  self, request_context: RequestContext
482
507
  ) -> uuid.UUID:
483
- """Enqueues a request for the active task to process."""
508
+ """Enqueues a request for the active task to process.
509
+
510
+ The caller's contextvars are captured so the producer runs
511
+ `AgentExecutor.execute` in the context of the request that sent the
512
+ message, not the request that started the producer.
513
+ """
484
514
  request_id = uuid.uuid4()
485
- await self._request_queue.put((request_context, request_id))
515
+ await self._request_queue.put(
516
+ (request_context, request_id, contextvars.copy_context())
517
+ )
486
518
  return request_id
487
519
 
488
520
  async def start(
@@ -573,6 +605,7 @@ class ActiveTask:
573
605
  (
574
606
  request_context,
575
607
  request_id,
608
+ sender_context,
576
609
  ) = await self._request_queue.get()
577
610
  await self._request_lock.acquire()
578
611
  # TODO: Should we create task manager every time?
@@ -607,8 +640,12 @@ class ActiveTask:
607
640
  _RequestStarted(request_id, request_context),
608
641
  )
609
642
  )
610
- await self._agent_executor.execute(
611
- request_context, self._event_queue_agent
643
+ # Awaiting the child task propagates producer cancellation.
644
+ await sender_context.run(
645
+ asyncio.create_task,
646
+ self._agent_executor.execute(
647
+ request_context, self._event_queue_agent
648
+ ),
612
649
  )
613
650
  logger.debug(
614
651
  'Producer[%s]: Execution finished successfully',
@@ -736,6 +773,7 @@ class ActiveTask:
736
773
  self._task_id,
737
774
  event,
738
775
  )
776
+ tapped_queue.task_done()
739
777
  raise event
740
778
 
741
779
  if replace_status_update_with_task and isinstance(
@@ -747,6 +785,9 @@ class ActiveTask:
747
785
  updated_task,
748
786
  )
749
787
  event = updated_task
788
+ # Acknowledge internal lifecycle events before skipping them.
789
+ if isinstance(event, _RequestStarted | _RequestCompleted):
790
+ tapped_queue.task_done()
750
791
  if isinstance(event, _RequestCompleted):
751
792
  if (
752
793
  request_id is not None
@@ -63,6 +63,7 @@ from a2a.utils.errors import (
63
63
  UnsupportedOperationError,
64
64
  )
65
65
  from a2a.utils.input_mode_validator import validate_input_modes
66
+ from a2a.utils.proto_utils import warn_on_missing_required_fields
66
67
  from a2a.utils.task import (
67
68
  apply_history_length,
68
69
  validate_history_length,
@@ -146,6 +147,14 @@ class LegacyRequestHandler(RequestHandler):
146
147
  self._validate_input_modes = validate_input_modes
147
148
  self.extended_agent_card = extended_agent_card
148
149
  self.extended_card_modifier = extended_card_modifier
150
+ warn_on_missing_required_fields(
151
+ agent_card, 'agent_card passed to DefaultRequestHandler:'
152
+ )
153
+ if extended_agent_card is not None:
154
+ warn_on_missing_required_fields(
155
+ extended_agent_card,
156
+ 'extended_agent_card passed to DefaultRequestHandler:',
157
+ )
149
158
  self._request_context_builder = (
150
159
  request_context_builder
151
160
  or SimpleRequestContextBuilder(
@@ -373,7 +382,16 @@ class LegacyRequestHandler(RequestHandler):
373
382
  and task_id
374
383
  and isinstance(event, PushNotificationEvent)
375
384
  ):
376
- await self._push_sender.send_notification(task_id, event)
385
+ try:
386
+ await self._push_sender.send_notification(task_id, event)
387
+ except Exception:
388
+ # Push delivery is best-effort: a sender failure must not
389
+ # fail the task or disturb the event stream.
390
+ logger.exception(
391
+ 'Push notification sender raised for task_id=%s; '
392
+ 'ignoring the failure.',
393
+ task_id,
394
+ )
377
395
 
378
396
  @validate_request_params
379
397
  async def on_message_send(
@@ -61,6 +61,7 @@ from a2a.utils.errors import (
61
61
  UnsupportedOperationError,
62
62
  )
63
63
  from a2a.utils.input_mode_validator import validate_input_modes
64
+ from a2a.utils.proto_utils import warn_on_missing_required_fields
64
65
  from a2a.utils.task import (
65
66
  apply_history_length,
66
67
  validate_history_length,
@@ -151,6 +152,14 @@ class DefaultRequestHandlerV2(RequestHandler):
151
152
  )
152
153
  warnings.warn(message, stacklevel=2)
153
154
  logger.warning(message)
155
+ warn_on_missing_required_fields(
156
+ agent_card, 'agent_card passed to DefaultRequestHandlerV2:'
157
+ )
158
+ if extended_agent_card is not None:
159
+ warn_on_missing_required_fields(
160
+ extended_agent_card,
161
+ 'extended_agent_card passed to DefaultRequestHandlerV2:',
162
+ )
154
163
  self._request_context_builder = (
155
164
  request_context_builder
156
165
  or SimpleRequestContextBuilder(
@@ -44,6 +44,7 @@ from a2a.utils.errors import (
44
44
  UnsupportedOperationError,
45
45
  VersionNotSupportedError,
46
46
  )
47
+ from a2a.utils.proto_utils import warn_on_missing_required_fields
47
48
 
48
49
 
49
50
  EXCEPTION_MAP: dict[type[A2AError], type[JSONRPCError]] = {
@@ -86,6 +87,9 @@ EventTypes = (
86
87
 
87
88
  def agent_card_to_dict(card: AgentCard) -> dict[str, Any]:
88
89
  """Convert AgentCard to dict and inject backward compatibility fields."""
90
+ warn_on_missing_required_fields(
91
+ card, 'agent_card passed to agent_card_to_dict:'
92
+ )
89
93
  result = MessageToDict(card)
90
94
 
91
95
  try:
@@ -29,6 +29,7 @@ else:
29
29
  from a2a.server.request_handlers.response_helpers import agent_card_to_dict
30
30
  from a2a.types.a2a_pb2 import AgentCard
31
31
  from a2a.utils.constants import AGENT_CARD_WELL_KNOWN_PATH
32
+ from a2a.utils.proto_utils import warn_on_missing_required_fields
32
33
 
33
34
 
34
35
  def _etag_for(card_dict: dict[str, Any]) -> str:
@@ -96,6 +97,10 @@ def create_agent_card_routes(
96
97
  'It can be installed as part of `a2a-sdk` optional dependencies, `a2a-sdk[http-server]`.'
97
98
  )
98
99
 
100
+ warn_on_missing_required_fields(
101
+ agent_card, 'agent_card passed to create_agent_card_routes:'
102
+ )
103
+
99
104
  async def _get_agent_card(request: Request) -> Response:
100
105
  """Returns the public AgentCard describing this agent's capabilities, supported transports, and skills."""
101
106
  card_to_serve = agent_card
@@ -68,8 +68,25 @@ class BasePushNotificationSender(PushNotificationSender):
68
68
  async def send_notification(
69
69
  self, task_id: str, event: PushNotificationEvent
70
70
  ) -> None:
71
- """Sends a push notification for an event if configuration exists."""
72
- push_configs = await self._config_store.get_info_for_dispatch(task_id)
71
+ """Sends a push notification for an event if configuration exists.
72
+
73
+ Best-effort by design: failures to read the configuration store or
74
+ to deliver a notification are logged and do not raise.
75
+ """
76
+ try:
77
+ push_configs = await self._config_store.get_info_for_dispatch(
78
+ task_id
79
+ )
80
+ except Exception:
81
+ # Push delivery is best-effort: an infrastructure failure while
82
+ # reading the config store must not propagate into the task
83
+ # lifecycle.
84
+ logger.exception(
85
+ 'Failed to read push notification configs for task_id=%s; '
86
+ 'skipping push notification delivery.',
87
+ task_id,
88
+ )
89
+ return
73
90
  if not push_configs:
74
91
  return
75
92
 
@@ -91,11 +108,19 @@ class BasePushNotificationSender(PushNotificationSender):
91
108
  task_id: str,
92
109
  ) -> bool:
93
110
  url = push_info.url
94
- if (
95
- self._push_url_validator is not None
96
- and not await self._push_url_validator(url)
97
- ):
98
- return False
111
+ if self._push_url_validator is not None:
112
+ try:
113
+ accepted = await self._push_url_validator(url)
114
+ except Exception:
115
+ logger.exception(
116
+ 'Push URL validator raised for task_id=%s, URL: %s. '
117
+ 'Failing closed and treating the URL as rejected.',
118
+ task_id,
119
+ url,
120
+ )
121
+ return False
122
+ if not accepted:
123
+ return False
99
124
  try:
100
125
  headers: dict[str, str] = {}
101
126
  if push_info.token:
@@ -17,4 +17,9 @@ class PushNotificationSender(ABC):
17
17
  async def send_notification(
18
18
  self, task_id: str, event: PushNotificationEvent
19
19
  ) -> None:
20
- """Sends a push notification containing the latest task state."""
20
+ """Sends a push notification containing the latest task state.
21
+
22
+ Implementations are treated as best-effort: the framework catches
23
+ and logs any exception raised here, so a failure never affects the
24
+ task lifecycle or the event stream.
25
+ """
@@ -81,7 +81,7 @@ def canonicalize(obj: Any) -> str:
81
81
  than `MAX_DEPTH`.
82
82
  """
83
83
  out: list[str] = []
84
- _write(obj, out, 0)
84
+ _write(obj, out, 1)
85
85
  canonical = ''.join(out)
86
86
  try:
87
87
  # RFC 8785 canonical output is UTF-8. Round-tripping here rejects
@@ -96,8 +96,13 @@ def canonicalize(obj: Any) -> str:
96
96
 
97
97
 
98
98
  def _write(obj: Any, out: list[str], depth: int) -> None:
99
- """Appends the canonical form of `obj` to `out`."""
100
- if depth > MAX_DEPTH:
99
+ """Appends the canonical form of `obj` to `out`.
100
+
101
+ `depth` is the number of open containers on the path to `obj`, the
102
+ outermost at 1. Only containers are recursed into, so only containers
103
+ carry a depth worth checking; a scalar's depth is never read.
104
+ """
105
+ if isinstance(obj, (list, tuple, dict)) and depth > MAX_DEPTH:
101
106
  raise CanonicalizationError(
102
107
  f'nesting exceeds the maximum depth of {MAX_DEPTH}'
103
108
  )
@@ -17,6 +17,8 @@
17
17
  This module provides helper functions for common proto type operations.
18
18
  """
19
19
 
20
+ import logging
21
+
20
22
  from typing import TYPE_CHECKING, Any, TypedDict, cast
21
23
 
22
24
  from google.api.field_behavior_pb2 import FieldBehavior, field_behavior
@@ -45,6 +47,9 @@ from a2a.types.a2a_pb2 import (
45
47
  )
46
48
 
47
49
 
50
+ logger = logging.getLogger(__name__)
51
+
52
+
48
53
  # Define Event type locally to avoid circular imports
49
54
  Event = Message | Task | TaskStatusUpdateEvent | TaskArtifactUpdateEvent
50
55
 
@@ -316,6 +321,45 @@ def validate_proto_required_fields(msg: ProtobufMessage) -> None:
316
321
  )
317
322
 
318
323
 
324
+ _SPEC_FIELD_PRESENCE_URL = (
325
+ 'https://a2a-protocol.org/latest/specification/'
326
+ '#57-field-presence-and-optionality'
327
+ )
328
+
329
+
330
+ def warn_on_missing_required_fields(msg: ProtobufMessage, source: str) -> bool:
331
+ """Log a warning if fields marked as REQUIRED are missing or empty.
332
+
333
+ Unlike `validate_proto_required_fields`, this never raises, so it can
334
+ surface spec violations without breaking callers that currently rely on
335
+ non-compliant messages.
336
+
337
+ Args:
338
+ msg: The Protobuf message to check.
339
+ source: Where the message was passed in, used in the log message.
340
+
341
+ Returns:
342
+ True if every REQUIRED field is set, False otherwise. Objects that
343
+ are not Protobuf messages (for example test doubles) are not checked.
344
+ """
345
+ if not isinstance(msg, ProtobufMessage):
346
+ return True
347
+ errors = _validate_proto_required_fields_internal(msg)
348
+ if not errors:
349
+ return True
350
+ logger.warning(
351
+ '%s %s is not spec-compliant - REQUIRED fields missing or empty: '
352
+ '%s. This is allowed and does not raise, but it may not verify or '
353
+ 'interoperate across SDKs and could be rejected in a future major '
354
+ 'release. See %s',
355
+ source,
356
+ msg.DESCRIPTOR.name,
357
+ ', '.join(err['field'] for err in errors),
358
+ _SPEC_FIELD_PRESENCE_URL,
359
+ )
360
+ return False
361
+
362
+
319
363
  def validation_errors_to_bad_request(
320
364
  errors: list[ValidationDetail],
321
365
  ) -> error_details_pb2.BadRequest:
@@ -11,13 +11,22 @@ logger = logging.getLogger(__name__)
11
11
 
12
12
 
13
13
  def _ip_is_blocked(ip_str: str) -> bool:
14
- """Whether an address is not a public unicast destination."""
14
+ """Whether an address is not a public unicast destination.
15
+
16
+ RFC 6598 shared address space (100.64.0.0/10) is not public.
17
+ ``ipaddress`` leaves ``is_private`` false for it and ``is_global``
18
+ false as well, so ``not is_global`` still rejects it. An IPv4-mapped
19
+ IPv6 address is judged as the IPv4 address inside it.
20
+ """
15
21
  try:
16
22
  addr = ipaddress.ip_address(ip_str.split('%', maxsplit=1)[0])
17
23
  except ValueError:
18
24
  return True
25
+ mapped = getattr(addr, 'ipv4_mapped', None)
26
+ if mapped is not None:
27
+ addr = mapped
19
28
  return (
20
- addr.is_private
29
+ not addr.is_global
21
30
  or addr.is_loopback
22
31
  or addr.is_link_local
23
32
  or addr.is_multicast
@@ -30,14 +39,14 @@ async def validate_push_notification_url(url: str) -> bool:
30
39
  """Return True if a push-notification URL is safe to fetch.
31
40
 
32
41
  Blocks non-HTTP(S) schemes and hosts that resolve to loopback,
33
- link-local, private, reserved, multicast, or unspecified addresses
34
- (e.g. 169.254.169.254 cloud metadata, internal services). A host
35
- that cannot be resolved is rejected: the POST would fail anyway,
36
- and failing closed avoids treating resolution errors as a bypass.
42
+ link-local, private, shared (100.64.0.0/10), reserved, multicast,
43
+ or unspecified addresses (e.g. 169.254.169.254 cloud metadata,
44
+ internal services). A host that cannot be resolved is rejected:
45
+ the POST would fail anyway, and failing closed avoids treating
46
+ resolution errors as a bypass.
37
47
 
38
- IPv4-mapped IPv6 forms are covered: ``ipaddress`` maps them to the
39
- underlying IPv4 address, so the ``is_private``/``is_loopback``
40
- checks apply to the mapped value.
48
+ IPv4-mapped IPv6 forms are judged as the IPv4 address they carry,
49
+ so the private, shared, and loopback checks apply to that address.
41
50
 
42
51
  Uses the running event-loop resolver so request handlers and the
43
52
  sender stay non-blocking. Deployments can pass this function as
@@ -22,6 +22,7 @@ except ImportError as e:
22
22
 
23
23
  from a2a.types import AgentCard, AgentCardSignature
24
24
  from a2a.utils._jcs import MAX_DEPTH, CanonicalizationError, canonicalize
25
+ from a2a.utils.proto_utils import warn_on_missing_required_fields
25
26
 
26
27
 
27
28
  class SignatureVerificationError(Exception):
@@ -164,15 +165,16 @@ def create_signature_verifier(
164
165
  return signature_verifier
165
166
 
166
167
 
167
- def _clean_empty(d: Any, depth: int = 0) -> Any:
168
+ def _clean_empty(d: Any, depth: int = 1) -> Any:
168
169
  """Recursively remove empty strings, lists and dicts from a dictionary.
169
170
 
170
171
  Depth is bounded for the same reason canonicalization is: nesting reaches
171
172
  this function from `AgentExtension.params`, and without the bound a deeply
172
173
  nested card exhausts the interpreter stack here, before the canonicalizer
173
- ever gets the chance to reject it.
174
+ ever gets the chance to reject it. `depth` counts open containers on the
175
+ path to `d`, the outermost at 1, and matches `_jcs.MAX_DEPTH`'s rule.
174
176
  """
175
- if depth > MAX_DEPTH:
177
+ if isinstance(d, (dict, list)) and depth > MAX_DEPTH:
176
178
  raise CanonicalizationError(
177
179
  f'nesting exceeds the maximum depth of {MAX_DEPTH}'
178
180
  )
@@ -197,6 +199,9 @@ def _clean_empty(d: Any, depth: int = 0) -> Any:
197
199
 
198
200
  def _canonicalize_agent_card(agent_card: AgentCard) -> str:
199
201
  """Canonicalizes the Agent Card JSON according to RFC 8785 (JCS)."""
202
+ warn_on_missing_required_fields(
203
+ agent_card, 'agent_card passed to _canonicalize_agent_card:'
204
+ )
200
205
  card_dict = MessageToDict(
201
206
  agent_card,
202
207
  )
@@ -229,7 +229,15 @@ def trace_function( # noqa: PLR0915
229
229
  tracer = trace.get_tracer(
230
230
  INSTRUMENTING_MODULE_NAME, INSTRUMENTING_MODULE_VERSION
231
231
  )
232
- with tracer.start_as_current_span(actual_span_name, kind=kind) as span:
232
+ # The wrapper records exceptions and sets the span status itself, so
233
+ # OTel must not do it again: it would mark non-error exceptions
234
+ # (e.g. `QueueShutDown`) as ERROR and record every exception twice.
235
+ with tracer.start_as_current_span(
236
+ actual_span_name,
237
+ kind=kind,
238
+ record_exception=False,
239
+ set_status_on_exception=False,
240
+ ) as span:
233
241
  if attributes:
234
242
  for k, v in attributes.items():
235
243
  span.set_attribute(k, v)
@@ -272,7 +280,14 @@ def trace_function( # noqa: PLR0915
272
280
  def sync_wrapper(*args, **kwargs) -> Any:
273
281
  """Sync Wrapper for the decorator."""
274
282
  tracer = trace.get_tracer(INSTRUMENTING_MODULE_NAME)
275
- with tracer.start_as_current_span(actual_span_name, kind=kind) as span:
283
+ # The wrapper records exceptions and sets the span status itself;
284
+ # letting OTel do it too would record every exception twice.
285
+ with tracer.start_as_current_span(
286
+ actual_span_name,
287
+ kind=kind,
288
+ record_exception=False,
289
+ set_status_on_exception=False,
290
+ ) as span:
276
291
  if attributes:
277
292
  for k, v in attributes.items():
278
293
  span.set_attribute(k, v)
@@ -1632,14 +1632,14 @@ wheels = [
1632
1632
 
1633
1633
  [[package]]
1634
1634
  name = "pyjwt"
1635
- version = "2.15.0"
1635
+ version = "2.15.1"
1636
1636
  source = { registry = "https://pypi.org/simple" }
1637
1637
  dependencies = [
1638
1638
  { name = "typing-extensions", marker = "python_full_version < '3.11'" },
1639
1639
  ]
1640
- sdist = { url = "https://files.pythonhosted.org/packages/02/a5/5197bfd06417837ac079921c66fa6393f1dea3557272a263cebfef69e432/pyjwt-2.15.0.tar.gz", hash = "sha256:b11c5f9791d7bf51c2b39a81ed669f6b2dbbd669df2942f6c60167e9e3d1abe4", size = 120513, upload-time = "2026-09-23T16:56:00.689Z" }
1640
+ sdist = { url = "https://files.pythonhosted.org/packages/43/ea/5194e52748b0da83d71e082d75496eaec6e58f419f5e184786ded517e6a9/pyjwt-2.15.1.tar.gz", hash = "sha256:4f259e80cdfb6b3fc18a7de51fd1ef9ec79652f25019bae68975ca2468a34df8", size = 121252, upload-time = "2026-09-28T18:40:42.598Z" }
1641
1641
  wheels = [
1642
- { url = "https://files.pythonhosted.org/packages/e8/55/40e45bf052ee8ee12a4dfd785519660f8effa7b065442b91646ec6828619/pyjwt-2.15.0-py3-none-any.whl", hash = "sha256:7a3742debf6b879e912dbb9819ceec1594be812452b78c5f2e2dfc56564954f8", size = 33680, upload-time = "2026-09-23T16:55:59.241Z" },
1642
+ { url = "https://files.pythonhosted.org/packages/50/ca/44de4e75f8aadc457f0634be3b542815078ded46dca30efb960edeecad6e/pyjwt-2.15.1-py3-none-any.whl", hash = "sha256:42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193", size = 33860, upload-time = "2026-09-28T18:40:41.429Z" },
1643
1643
  ]
1644
1644
 
1645
1645
  [[package]]