a2a-sdk 1.2.3__tar.gz → 1.3.0__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.3.0/.release-please-manifest.json +3 -0
  2. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/CHANGELOG.md +34 -0
  3. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/PKG-INFO +1 -1
  4. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/docs/migrations/v1_0/README.md +1 -0
  5. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/client_factory.py +43 -17
  6. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/errors.py +8 -0
  7. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/transports/http_helpers.py +4 -0
  8. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/transports/jsonrpc.py +83 -64
  9. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/transports/rest.py +26 -12
  10. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/jsonrpc_adapter.py +43 -1
  11. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/jsonrpc_transport.py +16 -2
  12. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/model_conversions.py +5 -0
  13. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/proto_utils.py +6 -2
  14. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/rest_transport.py +16 -2
  15. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/helpers/proto_helpers.py +10 -0
  16. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/agent_execution/active_task.py +108 -20
  17. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/agent_execution/active_task_registry.py +19 -4
  18. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/request_handlers/default_request_handler.py +5 -1
  19. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/request_handlers/default_request_handler_v2.py +17 -1
  20. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/routes/jsonrpc_dispatcher.py +12 -3
  21. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/database_task_store.py +11 -2
  22. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/task_updater.py +8 -9
  23. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/errors.py +8 -0
  24. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/proto_utils.py +21 -2
  25. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/signing.py +8 -0
  26. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/uv.lock +80 -46
  27. a2a_sdk-1.2.3/.release-please-manifest.json +0 -3
  28. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.agents/skills/mistake-reflection/SKILL.md +0 -0
  29. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.gemini/config.yaml +0 -0
  30. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.git-blame-ignore-revs +0 -0
  31. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/CODEOWNERS +0 -0
  32. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
  33. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
  34. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  35. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/actions/spelling/advice.md +0 -0
  36. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/actions/spelling/allow.txt +0 -0
  37. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/actions/spelling/excludes.txt +0 -0
  38. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/actions/spelling/line_forbidden.patterns +0 -0
  39. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/actions/spelling/patterns.txt +0 -0
  40. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/conventional-commit-lint.yaml +0 -0
  41. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/dependabot.yml +0 -0
  42. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/acts-nightly.yaml +0 -0
  43. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/acts.yaml +0 -0
  44. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/auto-assign-new-issues.yaml +0 -0
  45. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/conventional-commits.yml +0 -0
  46. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/coverage-comment.yaml +0 -0
  47. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/install-smoke.yml +0 -0
  48. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/itk.yaml +0 -0
  49. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/linter.yaml +0 -0
  50. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/nightly.yaml +0 -0
  51. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/python-publish.yml +0 -0
  52. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/release-please.yml +0 -0
  53. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/release-pr-approvals.yml +0 -0
  54. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/run-tck.yaml +0 -0
  55. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/security.yaml +0 -0
  56. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/spelling.yaml +0 -0
  57. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/stale.yaml +0 -0
  58. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.github/workflows/unit-tests.yml +0 -0
  59. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.gitignore +0 -0
  60. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.jscpd.json +0 -0
  61. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.pre-commit-config.yaml +0 -0
  62. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.python-version +0 -0
  63. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.vscode/extensions.json +0 -0
  64. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.vscode/launch.json +0 -0
  65. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/.vscode/settings.json +0 -0
  66. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/AGENTS.md +0 -0
  67. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/CODE_OF_CONDUCT.md +0 -0
  68. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/CONTRIBUTING.md +0 -0
  69. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/LICENSE +0 -0
  70. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/README.md +0 -0
  71. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/SECURITY.md +0 -0
  72. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/acts/sut-behaviors.yaml +0 -0
  73. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/buf.compat.gen.yaml +0 -0
  74. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/buf.gen.yaml +0 -0
  75. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/docs/ai/coding_conventions.md +0 -0
  76. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/docs/ai/evidence_rules.md +0 -0
  77. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/docs/ai/mandatory_checks.md +0 -0
  78. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/docs/migrations/v1_0/database/README.md +0 -0
  79. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/docs/migrations/v1_0/database/simple_migration.md +0 -0
  80. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/docs/migrations/v1_0/database/zero_downtime.md +0 -0
  81. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/itk/README.md +0 -0
  82. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/itk/__init__.py +0 -0
  83. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/itk/acts_behaviors.py +0 -0
  84. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/itk/acts_client_parse.py +0 -0
  85. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/itk/main.py +0 -0
  86. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/itk/pyproject.toml +0 -0
  87. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/itk/run_itk.sh +0 -0
  88. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/pyproject.toml +0 -0
  89. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/release-please-config.json +0 -0
  90. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/samples/README.md +0 -0
  91. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/samples/__init__.py +0 -0
  92. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/samples/agent_card_signing.py +0 -0
  93. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/samples/cli.py +0 -0
  94. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/samples/clustermode/README.md +0 -0
  95. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/samples/clustermode/__init__.py +0 -0
  96. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/samples/clustermode/cluster_common.py +0 -0
  97. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/samples/clustermode/exercise.py +0 -0
  98. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/samples/clustermode/run_cluster.py +0 -0
  99. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/samples/clustermode/server.py +0 -0
  100. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/samples/hello_world_agent.py +0 -0
  101. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/scripts/docker-compose.test.yml +0 -0
  102. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/scripts/format.sh +0 -0
  103. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/scripts/gen_proto.sh +0 -0
  104. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/scripts/gen_proto_compat.sh +0 -0
  105. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/scripts/lint.sh +0 -0
  106. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/scripts/run_db_tests.sh +0 -0
  107. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/scripts/test_install_smoke.sh +0 -0
  108. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/__init__.py +0 -0
  109. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/_base.py +0 -0
  110. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/a2a_db_cli.py +0 -0
  111. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/alembic.ini +0 -0
  112. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/auth/__init__.py +0 -0
  113. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/auth/user.py +0 -0
  114. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/__init__.py +0 -0
  115. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/auth/__init__.py +0 -0
  116. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/auth/credentials.py +0 -0
  117. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/auth/interceptor.py +0 -0
  118. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/base_client.py +0 -0
  119. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/card_resolver.py +0 -0
  120. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/client.py +0 -0
  121. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/interceptors.py +0 -0
  122. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/optionals.py +0 -0
  123. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/service_parameters.py +0 -0
  124. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/transports/__init__.py +0 -0
  125. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/transports/base.py +0 -0
  126. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/transports/grpc.py +0 -0
  127. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/client/transports/tenant_decorator.py +0 -0
  128. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/__init__.py +0 -0
  129. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/README.md +0 -0
  130. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/__init__.py +0 -0
  131. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/a2a_v0_3.proto +0 -0
  132. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/a2a_v0_3_pb2.py +0 -0
  133. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/a2a_v0_3_pb2.pyi +0 -0
  134. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py +0 -0
  135. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/buf.lock +0 -0
  136. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/buf.yaml +0 -0
  137. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/context_builders.py +0 -0
  138. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/conversions.py +0 -0
  139. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/extension_headers.py +0 -0
  140. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/grpc_handler.py +0 -0
  141. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/grpc_transport.py +0 -0
  142. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/request_handler.py +0 -0
  143. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/rest_adapter.py +0 -0
  144. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/rest_handler.py +0 -0
  145. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/types.py +0 -0
  146. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/compat/v0_3/versions.py +0 -0
  147. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/extensions/__init__.py +0 -0
  148. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/extensions/common.py +0 -0
  149. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/helpers/__init__.py +0 -0
  150. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/helpers/agent_card.py +0 -0
  151. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/migrations/README.md +0 -0
  152. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/migrations/__init__.py +0 -0
  153. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/migrations/env.py +0 -0
  154. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/migrations/migration_utils.py +0 -0
  155. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/migrations/script.py.mako +0 -0
  156. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/migrations/versions/38ce57e08137_add_column_protocol_version.py +0 -0
  157. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/migrations/versions/6419d2d130f6_add_columns_owner_last_updated.py +0 -0
  158. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/migrations/versions/__init__.py +0 -0
  159. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/migrations/versions/b5e3d1c8a2f7_add_task_version_and_task_events.py +0 -0
  160. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/py.typed +0 -0
  161. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/__init__.py +0 -0
  162. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/agent_execution/__init__.py +0 -0
  163. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/agent_execution/agent_executor.py +0 -0
  164. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/agent_execution/context.py +0 -0
  165. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/agent_execution/request_context_builder.py +0 -0
  166. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/agent_execution/simple_request_context_builder.py +0 -0
  167. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/cluster/__init__.py +0 -0
  168. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/cluster/database_event_stream.py +0 -0
  169. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/cluster/database_task_store.py +0 -0
  170. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/cluster/event_stream.py +0 -0
  171. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/cluster/task_store.py +0 -0
  172. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/cluster/version.py +0 -0
  173. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/context.py +0 -0
  174. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/events/__init__.py +0 -0
  175. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/events/event_consumer.py +0 -0
  176. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/events/event_queue.py +0 -0
  177. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/events/event_queue_v2.py +0 -0
  178. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/events/in_memory_queue_manager.py +0 -0
  179. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/events/queue_manager.py +0 -0
  180. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/id_generator.py +0 -0
  181. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/jsonrpc_models.py +0 -0
  182. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/models.py +0 -0
  183. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/owner_resolver.py +0 -0
  184. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/request_handlers/__init__.py +0 -0
  185. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/request_handlers/grpc_handler.py +0 -0
  186. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/request_handlers/request_handler.py +0 -0
  187. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/request_handlers/response_helpers.py +0 -0
  188. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/routes/__init__.py +0 -0
  189. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/routes/_jsonrpc_schema.py +0 -0
  190. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/routes/_proto_schema.py +0 -0
  191. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/routes/agent_card_routes.py +0 -0
  192. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/routes/common.py +0 -0
  193. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/routes/fastapi_routes.py +0 -0
  194. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/routes/jsonrpc_routes.py +0 -0
  195. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/routes/rest_dispatcher.py +0 -0
  196. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/routes/rest_routes.py +0 -0
  197. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/__init__.py +0 -0
  198. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/base_push_notification_sender.py +0 -0
  199. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/copying_task_store.py +0 -0
  200. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/database_push_notification_config_store.py +0 -0
  201. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/inmemory_push_notification_config_store.py +0 -0
  202. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/inmemory_task_store.py +0 -0
  203. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/push_notification_config_store.py +0 -0
  204. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/push_notification_sender.py +0 -0
  205. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/result_aggregator.py +0 -0
  206. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/task_manager.py +0 -0
  207. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/server/tasks/task_store.py +0 -0
  208. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/types/__init__.py +0 -0
  209. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/types/a2a_pb2.py +0 -0
  210. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/types/a2a_pb2.pyi +0 -0
  211. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/types/a2a_pb2_grpc.py +0 -0
  212. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/__init__.py +0 -0
  213. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/_async_queue_compat.py +0 -0
  214. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/_jcs.py +0 -0
  215. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/constants.py +0 -0
  216. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/error_handlers.py +0 -0
  217. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/grpc_status.py +0 -0
  218. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/input_mode_validator.py +0 -0
  219. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/json_utils.py +0 -0
  220. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/push_url_validator.py +0 -0
  221. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/task.py +0 -0
  222. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/telemetry.py +0 -0
  223. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/src/a2a/utils/version_validator.py +0 -0
  224. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/tck/__init__.py +0 -0
  225. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/tck/sut_agent.py +0 -0
  226. {a2a_sdk-1.2.3 → a2a_sdk-1.3.0}/tck/sut_agent_with_vertex_task_store.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "1.3.0"
3
+ }
@@ -1,5 +1,39 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.0](https://github.com/a2aproject/a2a-python/compare/v1.2.3...v1.3.0) (2026-10-27)
4
+
5
+
6
+ ### Features
7
+
8
+ * **server:** release parked interrupted tasks after a configurable timeout ([#1338](https://github.com/a2aproject/a2a-python/issues/1338)) ([b22a68d](https://github.com/a2aproject/a2a-python/commit/b22a68d242c32edddaa8953d0040ca82897e0b9b))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **client:** Create separate httpx per client when none configured ([#1358](https://github.com/a2aproject/a2a-python/issues/1358)) ([d316d0e](https://github.com/a2aproject/a2a-python/commit/d316d0e85e4d229df261d0cee0e9d9c0e5263207))
14
+ * **client:** raise A2A errors for malformed JSON-RPC responses ([#1375](https://github.com/a2aproject/a2a-python/issues/1375)) ([7e55413](https://github.com/a2aproject/a2a-python/commit/7e554137514b693cc952e6544a9eaf36c7d56643))
15
+ * **client:** rejections from unrecognized fields ([#1354](https://github.com/a2aproject/a2a-python/issues/1354)) ([91929cd](https://github.com/a2aproject/a2a-python/commit/91929cda989caba089584ceafa7796583f25bec4))
16
+ * **compat:** keep an unset v0.3 status message and provider as None ([#1362](https://github.com/a2aproject/a2a-python/issues/1362)) ([cdb4799](https://github.com/a2aproject/a2a-python/commit/cdb479957e81600f68f946f8ff0122667673cb35)), closes [#1361](https://github.com/a2aproject/a2a-python/issues/1361)
17
+ * **compat:** return A2A error codes from the v0.3 JSON-RPC adapter ([#1369](https://github.com/a2aproject/a2a-python/issues/1369)) ([8e32d53](https://github.com/a2aproject/a2a-python/commit/8e32d53173f8924beb7df0d3210e28a9fe9020f9))
18
+ * **compat:** set last_updated when storing a task in v0.3 format ([#1372](https://github.com/a2aproject/a2a-python/issues/1372)) ([30b6d50](https://github.com/a2aproject/a2a-python/commit/30b6d5067a9256447e3d5324163b091fc4bbad74)), closes [#1371](https://github.com/a2aproject/a2a-python/issues/1371)
19
+ * **core:** restore structured __repr__ on A2A exceptions ([#1348](https://github.com/a2aproject/a2a-python/issues/1348)) ([79a6f45](https://github.com/a2aproject/a2a-python/commit/79a6f451f49fdeaec099d723542363b5bc6dead7))
20
+ * **server:** allow recovery after status event validation fails ([#1365](https://github.com/a2aproject/a2a-python/issues/1365)) ([ca3ef0d](https://github.com/a2aproject/a2a-python/commit/ca3ef0d6c63384228db88d4984536a8189831d08))
21
+ * **server:** apply history_length to legacy streaming sends ([#1364](https://github.com/a2aproject/a2a-python/issues/1364)) ([261c074](https://github.com/a2aproject/a2a-python/commit/261c074aa4de522dfa609882666c98c5bd1a52d0))
22
+ * **server:** include legacy task states in database list filters ([#1337](https://github.com/a2aproject/a2a-python/issues/1337)) ([e12d494](https://github.com/a2aproject/a2a-python/commit/e12d494b4136351d5b5d07b5c6beae95a500fc4e))
23
+ * **server:** record executor failures through the event consumer ([#1366](https://github.com/a2aproject/a2a-python/issues/1366)) ([ad85806](https://github.com/a2aproject/a2a-python/commit/ad85806d9e43249eef5e3ad9724b0a5540cf99fb))
24
+ * **server:** reject boolean JSON-RPC request IDs ([#1350](https://github.com/a2aproject/a2a-python/issues/1350)) ([05392b3](https://github.com/a2aproject/a2a-python/commit/05392b373f70fea18349b8c66bfffb669b3b1137))
25
+ * skip malformed agent card signature headers ([#1335](https://github.com/a2aproject/a2a-python/issues/1335)) ([b21a144](https://github.com/a2aproject/a2a-python/commit/b21a1445c8e3a4dcd9edfa1d23e7e6af8382d8b7))
26
+
27
+
28
+ ### Documentation
29
+
30
+ * **helpers:** note that whole numbers in a data Part come back as floats ([#1373](https://github.com/a2aproject/a2a-python/issues/1373)) ([654774f](https://github.com/a2aproject/a2a-python/commit/654774f3d43b471e17fc2c6901998c71015ec450))
31
+
32
+
33
+ ### Miscellaneous Chores
34
+
35
+ * release 1.3.0 ([#1389](https://github.com/a2aproject/a2a-python/issues/1389)) ([fb6373f](https://github.com/a2aproject/a2a-python/commit/fb6373f2e4bad3c9e6130325dd2ba092749f8998))
36
+
3
37
  ## [1.2.3](https://github.com/a2aproject/a2a-python/compare/v1.2.2...v1.2.3) (2026-10-17)
4
38
 
5
39
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: a2a-sdk
3
- Version: 1.2.3
3
+ Version: 1.3.0
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
@@ -99,6 +99,7 @@ Constructing messages is simplified in v1.0. The old API required wrapping conte
99
99
  **Note**:
100
100
  * When using `File (bytes)` in v1.0, data serialization (via base64 encoding) is not required because A2A now uses Protobuf, which handles it automatically.
101
101
  * In v1.0, `Part.DataPart.data` is renamed to `Part.data` and is of type `google.protobuf.Value`. Use `ParseDict` to convert a Python dict into a suitable value. See the examples below for more details.
102
+ * `google.protobuf.Value` stores every number as a double, so whole numbers in a data Part are read back as floats on every transport (`4326` becomes `4326.0`). This is a fidelity loss, not a spec violation, since JSON does not distinguish the two. On the receiving side, narrow floats for fields you model as integers (for example with `float.is_integer()`) and leave other fields alone.
102
103
 
103
104
  **Before (v0.3):**
104
105
  ```python
@@ -77,6 +77,9 @@ class ClientFactory:
77
77
 
78
78
  The client can be used consistently regardless of the transport. This
79
79
  aligns the client configuration with the server's capabilities.
80
+
81
+ Each created client gets its own `httpx.AsyncClient` and closes it on
82
+ `close()`, unless `ClientConfig.httpx_client` is set.
80
83
  """
81
84
 
82
85
  def __init__(
@@ -84,16 +87,25 @@ class ClientFactory:
84
87
  config: ClientConfig | None = None,
85
88
  ):
86
89
  config = config or ClientConfig()
87
- httpx_client = config.httpx_client or httpx.AsyncClient()
88
- httpx_client.headers.setdefault(
89
- VERSION_HEADER, PROTOCOL_VERSION_CURRENT
90
- )
90
+ if config.httpx_client:
91
+ config.httpx_client.headers.setdefault(
92
+ VERSION_HEADER, PROTOCOL_VERSION_CURRENT
93
+ )
91
94
 
92
95
  self._config = config
93
- self._httpx_client = httpx_client
94
96
  self._registry: dict[str, TransportProducer] = {}
95
97
  self._register_defaults(config.supported_protocol_bindings)
96
98
 
99
+ def _resolve_http_client(self) -> tuple[httpx.AsyncClient, bool]:
100
+ """Returns an HTTP client and whether it is shared across clients."""
101
+ if self._config.httpx_client:
102
+ return self._config.httpx_client, True
103
+ httpx_client = httpx.AsyncClient()
104
+ httpx_client.headers.setdefault(
105
+ VERSION_HEADER, PROTOCOL_VERSION_CURRENT
106
+ )
107
+ return httpx_client, False
108
+
97
109
  def _register_defaults(self, supported: list[str]) -> None:
98
110
  # Empty support list implies JSON-RPC only.
99
111
 
@@ -115,21 +127,25 @@ class ClientFactory:
115
127
  else PROTOCOL_VERSION_CURRENT
116
128
  )
117
129
 
130
+ httpx_client, is_shared_httpx = self._resolve_http_client()
131
+
118
132
  if is_legacy_version(version):
119
133
  from a2a.compat.v0_3.jsonrpc_transport import ( # noqa: PLC0415
120
134
  CompatJsonRpcTransport,
121
135
  )
122
136
 
123
137
  return CompatJsonRpcTransport(
124
- self._httpx_client,
138
+ httpx_client,
125
139
  card,
126
140
  url,
141
+ is_shared_httpx=is_shared_httpx,
127
142
  )
128
143
 
129
144
  return JsonRpcTransport(
130
- self._httpx_client,
145
+ httpx_client,
131
146
  card,
132
147
  url,
148
+ is_shared_httpx=is_shared_httpx,
133
149
  )
134
150
 
135
151
  self.register(
@@ -154,21 +170,25 @@ class ClientFactory:
154
170
  else PROTOCOL_VERSION_CURRENT
155
171
  )
156
172
 
173
+ httpx_client, is_shared_httpx = self._resolve_http_client()
174
+
157
175
  if is_legacy_version(version):
158
176
  from a2a.compat.v0_3.rest_transport import ( # noqa: PLC0415
159
177
  CompatRestTransport,
160
178
  )
161
179
 
162
180
  return CompatRestTransport(
163
- self._httpx_client,
181
+ httpx_client,
164
182
  card,
165
183
  url,
184
+ is_shared_httpx=is_shared_httpx,
166
185
  )
167
186
 
168
187
  return RestTransport(
169
- self._httpx_client,
188
+ httpx_client,
170
189
  card,
171
190
  url,
191
+ is_shared_httpx=is_shared_httpx,
172
192
  )
173
193
 
174
194
  self.register(
@@ -273,8 +293,9 @@ class ClientFactory:
273
293
  ) -> Client:
274
294
  """Create a `Client` by resolving an `AgentCard` from a URL.
275
295
 
276
- Resolves the agent card from the given URL using the factory's
277
- configured httpx client, then creates a client via `create`.
296
+ Resolves the agent card from the given URL, then creates a client
297
+ via `create`. The card is fetched with `ClientConfig.httpx_client`
298
+ when one is set, otherwise with a temporary client.
278
299
 
279
300
  If the agent card is already available, use `create` directly
280
301
  instead.
@@ -295,12 +316,17 @@ class ClientFactory:
295
316
  Returns:
296
317
  A `Client` object.
297
318
  """
298
- resolver = A2ACardResolver(self._httpx_client, url)
299
- card = await resolver.get_agent_card(
300
- relative_card_path=relative_card_path,
301
- http_kwargs=resolver_http_kwargs,
302
- signature_verifier=signature_verifier,
303
- )
319
+ httpx_client, is_shared_httpx = self._resolve_http_client()
320
+ try:
321
+ resolver = A2ACardResolver(httpx_client, url)
322
+ card = await resolver.get_agent_card(
323
+ relative_card_path=relative_card_path,
324
+ http_kwargs=resolver_http_kwargs,
325
+ signature_verifier=signature_verifier,
326
+ )
327
+ finally:
328
+ if not is_shared_httpx:
329
+ await httpx_client.aclose()
304
330
  return self.create(card, interceptors)
305
331
 
306
332
  def register(self, label: str, generator: TransportProducer) -> None:
@@ -14,6 +14,14 @@ class AgentCardResolutionError(A2AClientError):
14
14
  super().__init__(message)
15
15
  self.status_code = status_code
16
16
 
17
+ def __repr__(self) -> str:
18
+ """Return a developer-friendly representation exposing the status code."""
19
+ return (
20
+ f'{self.__class__.__name__}('
21
+ f'status_code={self.status_code!r}, '
22
+ f'message={self.message!r})'
23
+ )
24
+
17
25
 
18
26
  class A2AClientTimeoutError(A2AClientError):
19
27
  """Exception for timeout errors during a request."""
@@ -57,6 +57,8 @@ async def send_http_request(
57
57
  | None = None,
58
58
  ) -> dict[str, Any]:
59
59
  """Sends an HTTP request and parses the JSON response, handling common exceptions."""
60
+ if httpx_client.is_closed:
61
+ raise A2AClientError('HTTP client is closed')
60
62
  with handle_http_exceptions(status_error_handler):
61
63
  response = await httpx_client.send(request)
62
64
  response.raise_for_status()
@@ -125,6 +127,8 @@ async def send_http_stream_request(
125
127
  Should raise an appropriate domain-specific exception.
126
128
  **kwargs: Additional keyword arguments forwarded to ``aconnect_sse``.
127
129
  """
130
+ if httpx_client.is_closed:
131
+ raise A2AClientError('HTTP client is closed')
128
132
  with handle_http_exceptions(status_error_handler):
129
133
  async with _SSEEventSource(
130
134
  httpx_client, method, url, **kwargs
@@ -1,3 +1,4 @@
1
+ import json
1
2
  import logging
2
3
 
3
4
  from collections.abc import AsyncGenerator
@@ -7,7 +8,7 @@ from uuid import uuid4
7
8
  import httpx
8
9
 
9
10
  from google.protobuf import json_format
10
- from jsonrpc.jsonrpc2 import JSONRPC20Request, JSONRPC20Response
11
+ from jsonrpc.jsonrpc2 import JSONRPC20Request
11
12
 
12
13
  from a2a.client.client import ClientCallContext
13
14
  from a2a.client.errors import A2AClientError
@@ -36,6 +37,7 @@ from a2a.types.a2a_pb2 import (
36
37
  TaskPushNotificationConfig,
37
38
  )
38
39
  from a2a.utils.errors import JSON_RPC_ERROR_CODE_MAP
40
+ from a2a.utils.proto_utils import parse_lenient
39
41
  from a2a.utils.telemetry import SpanKind, trace_class
40
42
 
41
43
 
@@ -56,11 +58,13 @@ class JsonRpcTransport(ClientTransport):
56
58
  httpx_client: httpx.AsyncClient,
57
59
  agent_card: AgentCard,
58
60
  url: str,
61
+ is_shared_httpx: bool = False,
59
62
  ):
60
63
  """Initializes the JsonRpcTransport."""
61
64
  self.url = url
62
65
  self.httpx_client = httpx_client
63
66
  self.agent_card = agent_card
67
+ self.is_shared_httpx = is_shared_httpx
64
68
 
65
69
  async def send_message(
66
70
  self,
@@ -77,11 +81,8 @@ class JsonRpcTransport(ClientTransport):
77
81
  response_data = await self._send_request(
78
82
  dict(rpc_request.data), context
79
83
  )
80
- json_rpc_response = JSONRPC20Response(**response_data)
81
- if json_rpc_response.error:
82
- raise self._create_jsonrpc_error(json_rpc_response.error)
83
- response: SendMessageResponse = json_format.ParseDict(
84
- json_rpc_response.result, SendMessageResponse()
84
+ response: SendMessageResponse = parse_lenient(
85
+ response_data['result'], SendMessageResponse()
85
86
  )
86
87
  return response
87
88
 
@@ -118,10 +119,7 @@ class JsonRpcTransport(ClientTransport):
118
119
  response_data = await self._send_request(
119
120
  dict(rpc_request.data), context
120
121
  )
121
- json_rpc_response = JSONRPC20Response(**response_data)
122
- if json_rpc_response.error:
123
- raise self._create_jsonrpc_error(json_rpc_response.error)
124
- response: Task = json_format.ParseDict(json_rpc_response.result, Task())
122
+ response: Task = parse_lenient(response_data['result'], Task())
125
123
  return response
126
124
 
127
125
  async def list_tasks(
@@ -139,11 +137,8 @@ class JsonRpcTransport(ClientTransport):
139
137
  response_data = await self._send_request(
140
138
  dict(rpc_request.data), context
141
139
  )
142
- json_rpc_response = JSONRPC20Response(**response_data)
143
- if json_rpc_response.error:
144
- raise self._create_jsonrpc_error(json_rpc_response.error)
145
- response: ListTasksResponse = json_format.ParseDict(
146
- json_rpc_response.result, ListTasksResponse()
140
+ response: ListTasksResponse = parse_lenient(
141
+ response_data['result'], ListTasksResponse()
147
142
  )
148
143
  return response
149
144
 
@@ -162,10 +157,7 @@ class JsonRpcTransport(ClientTransport):
162
157
  response_data = await self._send_request(
163
158
  dict(rpc_request.data), context
164
159
  )
165
- json_rpc_response = JSONRPC20Response(**response_data)
166
- if json_rpc_response.error:
167
- raise self._create_jsonrpc_error(json_rpc_response.error)
168
- response: Task = json_format.ParseDict(json_rpc_response.result, Task())
160
+ response: Task = parse_lenient(response_data['result'], Task())
169
161
  return response
170
162
 
171
163
  async def create_task_push_notification_config(
@@ -183,11 +175,8 @@ class JsonRpcTransport(ClientTransport):
183
175
  response_data = await self._send_request(
184
176
  dict(rpc_request.data), context
185
177
  )
186
- json_rpc_response = JSONRPC20Response(**response_data)
187
- if json_rpc_response.error:
188
- raise self._create_jsonrpc_error(json_rpc_response.error)
189
- response: TaskPushNotificationConfig = json_format.ParseDict(
190
- json_rpc_response.result, TaskPushNotificationConfig()
178
+ response: TaskPushNotificationConfig = parse_lenient(
179
+ response_data['result'], TaskPushNotificationConfig()
191
180
  )
192
181
  return response
193
182
 
@@ -206,11 +195,8 @@ class JsonRpcTransport(ClientTransport):
206
195
  response_data = await self._send_request(
207
196
  dict(rpc_request.data), context
208
197
  )
209
- json_rpc_response = JSONRPC20Response(**response_data)
210
- if json_rpc_response.error:
211
- raise self._create_jsonrpc_error(json_rpc_response.error)
212
- response: TaskPushNotificationConfig = json_format.ParseDict(
213
- json_rpc_response.result, TaskPushNotificationConfig()
198
+ response: TaskPushNotificationConfig = parse_lenient(
199
+ response_data['result'], TaskPushNotificationConfig()
214
200
  )
215
201
  return response
216
202
 
@@ -229,14 +215,8 @@ class JsonRpcTransport(ClientTransport):
229
215
  response_data = await self._send_request(
230
216
  dict(rpc_request.data), context
231
217
  )
232
- json_rpc_response = JSONRPC20Response(**response_data)
233
- if json_rpc_response.error:
234
- raise self._create_jsonrpc_error(json_rpc_response.error)
235
- response: ListTaskPushNotificationConfigsResponse = (
236
- json_format.ParseDict(
237
- json_rpc_response.result,
238
- ListTaskPushNotificationConfigsResponse(),
239
- )
218
+ response: ListTaskPushNotificationConfigsResponse = parse_lenient(
219
+ response_data['result'], ListTaskPushNotificationConfigsResponse()
240
220
  )
241
221
  return response
242
222
 
@@ -252,12 +232,7 @@ class JsonRpcTransport(ClientTransport):
252
232
  params=json_format.MessageToDict(request),
253
233
  _id=str(uuid4()),
254
234
  )
255
- response_data = await self._send_request(
256
- dict(rpc_request.data), context
257
- )
258
- json_rpc_response = JSONRPC20Response(**response_data)
259
- if json_rpc_response.error:
260
- raise self._create_jsonrpc_error(json_rpc_response.error)
235
+ await self._send_request(dict(rpc_request.data), context)
261
236
 
262
237
  async def subscribe(
263
238
  self,
@@ -297,23 +272,28 @@ class JsonRpcTransport(ClientTransport):
297
272
  dict(rpc_request.data),
298
273
  context,
299
274
  )
300
- json_rpc_response = JSONRPC20Response(**response_data)
301
- if json_rpc_response.error:
302
- raise self._create_jsonrpc_error(json_rpc_response.error)
275
+ result = response_data['result']
303
276
  # Validate type of the response
304
- if not isinstance(json_rpc_response.result, dict):
305
- raise A2AClientError(
306
- f'Invalid response type: {type(json_rpc_response.result)}'
307
- )
308
- response: AgentCard = json_format.ParseDict(
309
- json_rpc_response.result, AgentCard()
310
- )
277
+ if not isinstance(result, dict):
278
+ raise A2AClientError(f'Invalid response type: {type(result)}')
279
+ response: AgentCard = parse_lenient(result, AgentCard())
311
280
 
312
281
  return response
313
282
 
314
283
  async def close(self) -> None:
315
- """Closes the httpx client."""
316
- await self.httpx_client.aclose()
284
+ """Closes the httpx client unless it is shared."""
285
+ if self.is_shared_httpx:
286
+ logger.debug(
287
+ 'Cannot close a shared httpx client; only the provider '
288
+ 'that supplied it via ClientConfig.httpx_client can close it.'
289
+ )
290
+ return
291
+ if self.httpx_client.is_closed:
292
+ raise A2AClientError('HTTP client is already closed')
293
+ try:
294
+ await self.httpx_client.aclose()
295
+ except Exception as e:
296
+ raise A2AClientError(f'Failed to close HTTP client: {e}') from e
317
297
 
318
298
  def _create_jsonrpc_error(self, error_dict: dict[str, Any]) -> Exception:
319
299
  """Creates the appropriate A2AError from a JSON-RPC error dictionary."""
@@ -346,7 +326,37 @@ class JsonRpcTransport(ClientTransport):
346
326
  request = self.httpx_client.build_request(
347
327
  'POST', self.url, json=payload, **(http_kwargs or {})
348
328
  )
349
- return await send_http_request(self.httpx_client, request)
329
+ response_data = await send_http_request(self.httpx_client, request)
330
+ return self._check_jsonrpc_response(response_data)
331
+
332
+ def _check_jsonrpc_response(self, response_data: Any) -> dict[str, Any]:
333
+ """Returns a JSON-RPC success response, raising for anything else.
334
+
335
+ An error response raises the A2A error mapped from its code, even when
336
+ the error object lacks a ``message`` or carries extra members. A body
337
+ that is not a JSON-RPC 2.0 response object (a list, a string, an object
338
+ with neither ``result`` nor ``error``, or an ``error`` that is not an
339
+ object) raises ``A2AClientError`` instead of leaking a ``TypeError`` or
340
+ ``ValueError`` from the ``json-rpc`` package.
341
+ """
342
+ if not isinstance(response_data, dict):
343
+ raise A2AClientError(
344
+ 'Invalid JSON-RPC response: expected an object, got '
345
+ f'{type(response_data).__name__}'
346
+ )
347
+ error = response_data.get('error')
348
+ if error:
349
+ if not isinstance(error, dict):
350
+ raise A2AClientError(
351
+ f'Invalid JSON-RPC response: error is not an object: '
352
+ f'{error!r}'
353
+ )
354
+ raise self._create_jsonrpc_error(error)
355
+ if 'result' not in response_data:
356
+ raise A2AClientError(
357
+ "Invalid JSON-RPC response: it has neither 'result' nor 'error'"
358
+ )
359
+ return response_data
350
360
 
351
361
  async def _send_stream_request(
352
362
  self,
@@ -364,17 +374,26 @@ class JsonRpcTransport(ClientTransport):
364
374
  json=rpc_request_payload,
365
375
  **http_kwargs,
366
376
  ):
367
- json_rpc_response = JSONRPC20Response.from_json(sse_data)
368
- if json_rpc_response.error:
369
- raise self._create_jsonrpc_error(json_rpc_response.error)
370
- response: StreamResponse = json_format.ParseDict(
371
- json_rpc_response.result, StreamResponse()
377
+ try:
378
+ response_data = json.loads(sse_data)
379
+ except json.JSONDecodeError as e:
380
+ raise A2AClientError(
381
+ f'Invalid JSON-RPC response in SSE stream: {e}'
382
+ ) from e
383
+ response_data = self._check_jsonrpc_response(response_data)
384
+ response: StreamResponse = parse_lenient(
385
+ response_data['result'], StreamResponse()
372
386
  )
373
387
  yield response
374
388
 
375
389
  def _handle_sse_error(self, sse_data: str) -> NoReturn:
376
390
  """Handles SSE error events by parsing JSON-RPC error payload and raising the appropriate domain error."""
377
- json_rpc_response = JSONRPC20Response.from_json(sse_data)
378
- if json_rpc_response.error:
379
- raise self._create_jsonrpc_error(json_rpc_response.error)
391
+ try:
392
+ response_data = json.loads(sse_data)
393
+ except json.JSONDecodeError:
394
+ response_data = None
395
+ if isinstance(response_data, dict) and isinstance(
396
+ response_data.get('error'), dict
397
+ ):
398
+ raise self._create_jsonrpc_error(response_data['error'])
380
399
  raise A2AClientError(f'SSE stream error: {sse_data}')
@@ -6,7 +6,7 @@ from typing import Any, NoReturn
6
6
 
7
7
  import httpx
8
8
 
9
- from google.protobuf.json_format import MessageToDict, Parse, ParseDict
9
+ from google.protobuf.json_format import MessageToDict
10
10
 
11
11
  from a2a.client.client import ClientCallContext
12
12
  from a2a.client.errors import A2AClientError
@@ -35,6 +35,7 @@ from a2a.types.a2a_pb2 import (
35
35
  TaskPushNotificationConfig,
36
36
  )
37
37
  from a2a.utils.errors import A2A_REASON_TO_ERROR, MethodNotFoundError
38
+ from a2a.utils.proto_utils import parse_lenient
38
39
  from a2a.utils.telemetry import SpanKind, trace_class
39
40
 
40
41
 
@@ -97,11 +98,13 @@ class RestTransport(ClientTransport):
97
98
  httpx_client: httpx.AsyncClient,
98
99
  agent_card: AgentCard,
99
100
  url: str,
101
+ is_shared_httpx: bool = False,
100
102
  ):
101
103
  """Initializes the RestTransport."""
102
104
  self.url = url.removesuffix('/')
103
105
  self.httpx_client = httpx_client
104
106
  self.agent_card = agent_card
107
+ self.is_shared_httpx = is_shared_httpx
105
108
 
106
109
  async def send_message(
107
110
  self,
@@ -117,7 +120,7 @@ class RestTransport(ClientTransport):
117
120
  context=context,
118
121
  json=MessageToDict(request),
119
122
  )
120
- response: SendMessageResponse = ParseDict(
123
+ response: SendMessageResponse = parse_lenient(
121
124
  response_data, SendMessageResponse()
122
125
  )
123
126
  return response
@@ -160,7 +163,7 @@ class RestTransport(ClientTransport):
160
163
  context=context,
161
164
  params=params,
162
165
  )
163
- response: Task = ParseDict(response_data, Task())
166
+ response: Task = parse_lenient(response_data, Task())
164
167
  return response
165
168
 
166
169
  async def list_tasks(
@@ -181,7 +184,7 @@ class RestTransport(ClientTransport):
181
184
  context=context,
182
185
  params=params,
183
186
  )
184
- response: ListTasksResponse = ParseDict(
187
+ response: ListTasksResponse = parse_lenient(
185
188
  response_data, ListTasksResponse()
186
189
  )
187
190
  return response
@@ -200,7 +203,7 @@ class RestTransport(ClientTransport):
200
203
  context=context,
201
204
  json=MessageToDict(request),
202
205
  )
203
- response: Task = ParseDict(response_data, Task())
206
+ response: Task = parse_lenient(response_data, Task())
204
207
  return response
205
208
 
206
209
  async def create_task_push_notification_config(
@@ -217,7 +220,7 @@ class RestTransport(ClientTransport):
217
220
  context=context,
218
221
  json=MessageToDict(request),
219
222
  )
220
- response: TaskPushNotificationConfig = ParseDict(
223
+ response: TaskPushNotificationConfig = parse_lenient(
221
224
  response_data, TaskPushNotificationConfig()
222
225
  )
223
226
  return response
@@ -244,7 +247,7 @@ class RestTransport(ClientTransport):
244
247
  context=context,
245
248
  params=params,
246
249
  )
247
- response: TaskPushNotificationConfig = ParseDict(
250
+ response: TaskPushNotificationConfig = parse_lenient(
248
251
  response_data, TaskPushNotificationConfig()
249
252
  )
250
253
  return response
@@ -269,7 +272,7 @@ class RestTransport(ClientTransport):
269
272
  context=context,
270
273
  params=params,
271
274
  )
272
- response: ListTaskPushNotificationConfigsResponse = ParseDict(
275
+ response: ListTaskPushNotificationConfigsResponse = parse_lenient(
273
276
  response_data, ListTaskPushNotificationConfigsResponse()
274
277
  )
275
278
  return response
@@ -327,11 +330,22 @@ class RestTransport(ClientTransport):
327
330
  'GET', '/extendedAgentCard', request.tenant, context=context
328
331
  )
329
332
 
330
- return ParseDict(response_data, AgentCard())
333
+ return parse_lenient(response_data, AgentCard())
331
334
 
332
335
  async def close(self) -> None:
333
- """Closes the httpx client."""
334
- await self.httpx_client.aclose()
336
+ """Closes the httpx client unless it is shared."""
337
+ if self.is_shared_httpx:
338
+ logger.debug(
339
+ 'Cannot close a shared httpx client; only the provider '
340
+ 'that supplied it via ClientConfig.httpx_client can close it.'
341
+ )
342
+ return
343
+ if self.httpx_client.is_closed:
344
+ raise A2AClientError('HTTP client is already closed')
345
+ try:
346
+ await self.httpx_client.aclose()
347
+ except Exception as e:
348
+ raise A2AClientError(f'Failed to close HTTP client: {e}') from e
335
349
 
336
350
  def _get_path(self, base_path: str, tenant: str) -> str:
337
351
  """Returns the full path, prepending the tenant if provided."""
@@ -384,7 +398,7 @@ class RestTransport(ClientTransport):
384
398
  json=json,
385
399
  **http_kwargs,
386
400
  ):
387
- event: StreamResponse = Parse(sse_data, StreamResponse())
401
+ event: StreamResponse = parse_lenient(sse_data, StreamResponse())
388
402
  yield event
389
403
 
390
404
  async def _send_request(self, request: httpx.Request) -> dict[str, Any]: