solace-agent-mesh 1.0.9__py3-none-any.whl → 1.3.0__py3-none-any.whl

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.

Potentially problematic release.


This version of solace-agent-mesh might be problematic. Click here for more details.

Files changed (220) hide show
  1. solace_agent_mesh/agent/adk/adk_llm.txt +182 -42
  2. solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +171 -0
  3. solace_agent_mesh/agent/adk/callbacks.py +165 -104
  4. solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +0 -18
  5. solace_agent_mesh/agent/adk/models/models_llm.txt +104 -55
  6. solace_agent_mesh/agent/adk/runner.py +25 -17
  7. solace_agent_mesh/agent/adk/services.py +3 -3
  8. solace_agent_mesh/agent/adk/setup.py +11 -0
  9. solace_agent_mesh/agent/adk/stream_parser.py +8 -1
  10. solace_agent_mesh/agent/adk/tool_wrapper.py +10 -3
  11. solace_agent_mesh/agent/agent_llm.txt +355 -18
  12. solace_agent_mesh/agent/protocol/event_handlers.py +460 -317
  13. solace_agent_mesh/agent/protocol/protocol_llm.txt +54 -7
  14. solace_agent_mesh/agent/sac/app.py +2 -2
  15. solace_agent_mesh/agent/sac/component.py +211 -517
  16. solace_agent_mesh/agent/sac/sac_llm.txt +133 -63
  17. solace_agent_mesh/agent/testing/testing_llm.txt +25 -58
  18. solace_agent_mesh/agent/tools/peer_agent_tool.py +15 -11
  19. solace_agent_mesh/agent/tools/tools_llm.txt +234 -69
  20. solace_agent_mesh/agent/utils/artifact_helpers.py +35 -1
  21. solace_agent_mesh/agent/utils/utils_llm.txt +90 -105
  22. solace_agent_mesh/assets/docs/404.html +3 -3
  23. solace_agent_mesh/assets/docs/assets/js/6e0db977.39a79ca9.js +1 -0
  24. solace_agent_mesh/assets/docs/assets/js/{75384d09.ccd480c4.js → 75384d09.bf78fbdb.js} +1 -1
  25. solace_agent_mesh/assets/docs/assets/js/90dd9cf6.88f385ea.js +1 -0
  26. solace_agent_mesh/assets/docs/assets/js/f284c35a.fb68323a.js +1 -0
  27. solace_agent_mesh/assets/docs/assets/js/main.08d30374.js +2 -0
  28. solace_agent_mesh/assets/docs/assets/js/runtime~main.458efb1d.js +1 -0
  29. solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +4 -4
  30. solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +4 -4
  31. solace_agent_mesh/assets/docs/docs/documentation/concepts/cli/index.html +4 -4
  32. solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +4 -4
  33. solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +4 -4
  34. solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +4 -4
  35. solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +4 -4
  36. solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +4 -4
  37. solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +4 -4
  38. solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +4 -4
  39. solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/index.html +4 -4
  40. solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +4 -4
  41. solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +4 -4
  42. solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +4 -4
  43. solace_agent_mesh/assets/docs/docs/documentation/migration-guides/a2a-upgrade-to-0.3.0/a2a-gateway-upgrade-to-0.3.0/index.html +105 -0
  44. solace_agent_mesh/assets/docs/docs/documentation/migration-guides/a2a-upgrade-to-0.3.0/a2a-technical-migration-map/index.html +53 -0
  45. solace_agent_mesh/assets/docs/docs/documentation/tutorials/bedrock-agents/index.html +4 -4
  46. solace_agent_mesh/assets/docs/docs/documentation/tutorials/custom-agent/index.html +4 -4
  47. solace_agent_mesh/assets/docs/docs/documentation/tutorials/event-mesh-gateway/index.html +4 -4
  48. solace_agent_mesh/assets/docs/docs/documentation/tutorials/mcp-integration/index.html +4 -4
  49. solace_agent_mesh/assets/docs/docs/documentation/tutorials/mongodb-integration/index.html +4 -4
  50. solace_agent_mesh/assets/docs/docs/documentation/tutorials/rag-integration/index.html +4 -4
  51. solace_agent_mesh/assets/docs/docs/documentation/tutorials/rest-gateway/index.html +4 -4
  52. solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +4 -4
  53. solace_agent_mesh/assets/docs/docs/documentation/tutorials/sql-database/index.html +4 -4
  54. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/artifact-management/index.html +4 -4
  55. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/audio-tools/index.html +4 -4
  56. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/data-analysis-tools/index.html +4 -4
  57. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/embeds/index.html +4 -4
  58. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/index.html +4 -4
  59. solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-agents/index.html +4 -4
  60. solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-gateways/index.html +4 -4
  61. solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +4 -4
  62. solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +4 -4
  63. solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +4 -4
  64. solace_agent_mesh/assets/docs/lunr-index-1757433031159.json +1 -0
  65. solace_agent_mesh/assets/docs/lunr-index.json +1 -1
  66. solace_agent_mesh/assets/docs/search-doc-1757433031159.json +1 -0
  67. solace_agent_mesh/assets/docs/search-doc.json +1 -1
  68. solace_agent_mesh/assets/docs/sitemap.xml +1 -1
  69. solace_agent_mesh/cli/__init__.py +1 -1
  70. solace_agent_mesh/cli/commands/add_cmd/agent_cmd.py +125 -48
  71. solace_agent_mesh/cli/commands/eval_cmd.py +14 -0
  72. solace_agent_mesh/cli/commands/init_cmd/__init__.py +53 -31
  73. solace_agent_mesh/cli/commands/init_cmd/database_step.py +91 -0
  74. solace_agent_mesh/cli/commands/init_cmd/env_step.py +19 -8
  75. solace_agent_mesh/cli/commands/init_cmd/orchestrator_step.py +80 -25
  76. solace_agent_mesh/cli/commands/init_cmd/web_init_step.py +32 -10
  77. solace_agent_mesh/cli/commands/init_cmd/webui_gateway_step.py +74 -15
  78. solace_agent_mesh/cli/commands/plugin_cmd/create_cmd.py +0 -2
  79. solace_agent_mesh/cli/commands/run_cmd.py +5 -3
  80. solace_agent_mesh/cli/utils.py +68 -12
  81. solace_agent_mesh/client/webui/frontend/static/assets/authCallback-vY5eu2lI.js +1 -0
  82. solace_agent_mesh/client/webui/frontend/static/assets/client-BeBkzgWW.js +25 -0
  83. solace_agent_mesh/client/webui/frontend/static/assets/main-Bjys1KQs.js +339 -0
  84. solace_agent_mesh/client/webui/frontend/static/assets/main-C03yrETa.css +1 -0
  85. solace_agent_mesh/client/webui/frontend/static/assets/vendor-CE0AeXyK.js +395 -0
  86. solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -2
  87. solace_agent_mesh/client/webui/frontend/static/index.html +4 -3
  88. solace_agent_mesh/common/a2a/__init__.py +213 -0
  89. solace_agent_mesh/common/a2a/a2a_llm.txt +182 -0
  90. solace_agent_mesh/common/a2a/artifact.py +328 -0
  91. solace_agent_mesh/common/a2a/events.py +183 -0
  92. solace_agent_mesh/common/a2a/message.py +307 -0
  93. solace_agent_mesh/common/a2a/protocol.py +513 -0
  94. solace_agent_mesh/common/a2a/task.py +127 -0
  95. solace_agent_mesh/common/a2a/translation.py +653 -0
  96. solace_agent_mesh/common/a2a/types.py +54 -0
  97. solace_agent_mesh/common/a2a_spec/a2a.json +2576 -0
  98. solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +407 -0
  99. solace_agent_mesh/common/a2a_spec/schemas/agent_progress_update.json +18 -0
  100. solace_agent_mesh/common/a2a_spec/schemas/artifact_creation_progress.json +31 -0
  101. solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json +18 -0
  102. solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +235 -0
  103. solace_agent_mesh/common/a2a_spec/schemas/tool_invocation_start.json +26 -0
  104. solace_agent_mesh/common/a2a_spec/schemas/tool_result.json +25 -0
  105. solace_agent_mesh/common/agent_registry.py +1 -1
  106. solace_agent_mesh/common/common_llm.txt +192 -70
  107. solace_agent_mesh/common/data_parts.py +99 -0
  108. solace_agent_mesh/common/middleware/middleware_llm.txt +17 -17
  109. solace_agent_mesh/common/sac/__init__.py +0 -0
  110. solace_agent_mesh/common/sac/sac_llm.txt +71 -0
  111. solace_agent_mesh/common/sac/sam_component_base.py +252 -0
  112. solace_agent_mesh/common/services/providers/providers_llm.txt +51 -84
  113. solace_agent_mesh/common/services/services_llm.txt +206 -26
  114. solace_agent_mesh/common/utils/artifact_utils.py +29 -0
  115. solace_agent_mesh/common/utils/embeds/embeds_llm.txt +176 -80
  116. solace_agent_mesh/common/utils/embeds/resolver.py +1 -0
  117. solace_agent_mesh/common/utils/utils_llm.txt +323 -42
  118. solace_agent_mesh/config_portal/backend/common.py +2 -2
  119. solace_agent_mesh/config_portal/backend/plugin_catalog/constants.py +1 -1
  120. solace_agent_mesh/config_portal/frontend/static/client/assets/_index-bFMKlzKf.js +98 -0
  121. solace_agent_mesh/config_portal/frontend/static/client/assets/{manifest-d845808d.js → manifest-89db7c30.js} +1 -1
  122. solace_agent_mesh/config_portal/frontend/static/client/index.html +1 -1
  123. solace_agent_mesh/core_a2a/core_a2a_llm.txt +10 -8
  124. solace_agent_mesh/core_a2a/service.py +20 -44
  125. solace_agent_mesh/evaluation/message_organizer.py +35 -56
  126. solace_agent_mesh/evaluation/run.py +26 -5
  127. solace_agent_mesh/evaluation/subscriber.py +35 -10
  128. solace_agent_mesh/evaluation/summary_builder.py +27 -34
  129. solace_agent_mesh/gateway/base/app.py +27 -1
  130. solace_agent_mesh/gateway/base/base_llm.txt +177 -72
  131. solace_agent_mesh/gateway/base/component.py +294 -523
  132. solace_agent_mesh/gateway/gateway_llm.txt +299 -58
  133. solace_agent_mesh/gateway/http_sse/ARCHITECTURE_GUIDE.md +676 -0
  134. solace_agent_mesh/gateway/http_sse/alembic/env.py +85 -0
  135. solace_agent_mesh/gateway/http_sse/alembic/script.py.mako +28 -0
  136. solace_agent_mesh/gateway/http_sse/alembic/versions/b1c2d3e4f5g6_add_database_indexes.py +83 -0
  137. solace_agent_mesh/gateway/http_sse/alembic/versions/d5b3f8f2e9a0_create_initial_database.py +58 -0
  138. solace_agent_mesh/gateway/http_sse/alembic.ini +147 -0
  139. solace_agent_mesh/gateway/http_sse/api/__init__.py +11 -0
  140. solace_agent_mesh/gateway/http_sse/api/controllers/__init__.py +9 -0
  141. solace_agent_mesh/gateway/http_sse/api/controllers/session_controller.py +355 -0
  142. solace_agent_mesh/gateway/http_sse/api/controllers/task_controller.py +279 -0
  143. solace_agent_mesh/gateway/http_sse/api/controllers/user_controller.py +35 -0
  144. solace_agent_mesh/gateway/http_sse/api/dto/__init__.py +10 -0
  145. solace_agent_mesh/gateway/http_sse/api/dto/requests/__init__.py +37 -0
  146. solace_agent_mesh/gateway/http_sse/api/dto/requests/session_requests.py +49 -0
  147. solace_agent_mesh/gateway/http_sse/api/dto/requests/task_requests.py +66 -0
  148. solace_agent_mesh/gateway/http_sse/api/dto/responses/__init__.py +43 -0
  149. solace_agent_mesh/gateway/http_sse/api/dto/responses/session_responses.py +68 -0
  150. solace_agent_mesh/gateway/http_sse/api/dto/responses/task_responses.py +74 -0
  151. solace_agent_mesh/gateway/http_sse/app.py +31 -1
  152. solace_agent_mesh/gateway/http_sse/application/__init__.py +3 -0
  153. solace_agent_mesh/gateway/http_sse/application/services/__init__.py +3 -0
  154. solace_agent_mesh/gateway/http_sse/application/services/session_service.py +135 -0
  155. solace_agent_mesh/gateway/http_sse/component.py +371 -236
  156. solace_agent_mesh/gateway/http_sse/components/components_llm.txt +29 -29
  157. solace_agent_mesh/gateway/http_sse/dependencies.py +142 -39
  158. solace_agent_mesh/gateway/http_sse/domain/entities/__init__.py +3 -0
  159. solace_agent_mesh/gateway/http_sse/domain/entities/session.py +90 -0
  160. solace_agent_mesh/gateway/http_sse/domain/repositories/__init__.py +3 -0
  161. solace_agent_mesh/gateway/http_sse/domain/repositories/session_repository.py +54 -0
  162. solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +272 -36
  163. solace_agent_mesh/gateway/http_sse/infrastructure/__init__.py +4 -0
  164. solace_agent_mesh/gateway/http_sse/infrastructure/dependency_injection/__init__.py +3 -0
  165. solace_agent_mesh/gateway/http_sse/infrastructure/dependency_injection/container.py +123 -0
  166. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/__init__.py +4 -0
  167. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/database_persistence_service.py +16 -0
  168. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/database_service.py +119 -0
  169. solace_agent_mesh/gateway/http_sse/infrastructure/persistence/models.py +31 -0
  170. solace_agent_mesh/gateway/http_sse/infrastructure/persistence_service.py +12 -0
  171. solace_agent_mesh/gateway/http_sse/infrastructure/repositories/__init__.py +3 -0
  172. solace_agent_mesh/gateway/http_sse/infrastructure/repositories/session_repository.py +174 -0
  173. solace_agent_mesh/gateway/http_sse/main.py +293 -91
  174. solace_agent_mesh/gateway/http_sse/routers/agents.py +1 -1
  175. solace_agent_mesh/gateway/http_sse/routers/artifacts.py +137 -56
  176. solace_agent_mesh/gateway/http_sse/routers/config.py +3 -1
  177. solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +231 -5
  178. solace_agent_mesh/gateway/http_sse/routers/tasks.py +199 -171
  179. solace_agent_mesh/gateway/http_sse/routers/visualization.py +7 -7
  180. solace_agent_mesh/gateway/http_sse/services/agent_service.py +1 -1
  181. solace_agent_mesh/gateway/http_sse/services/services_llm.txt +89 -135
  182. solace_agent_mesh/gateway/http_sse/services/task_service.py +2 -5
  183. solace_agent_mesh/gateway/http_sse/session_manager.py +64 -30
  184. solace_agent_mesh/gateway/http_sse/shared/__init__.py +9 -0
  185. solace_agent_mesh/gateway/http_sse/shared/auth_utils.py +29 -0
  186. solace_agent_mesh/gateway/http_sse/shared/enums.py +45 -0
  187. solace_agent_mesh/gateway/http_sse/shared/types.py +45 -0
  188. solace_agent_mesh/solace_agent_mesh_llm.txt +362 -0
  189. solace_agent_mesh/templates/gateway_component_template.py +149 -98
  190. solace_agent_mesh/templates/shared_config.yaml +4 -5
  191. solace_agent_mesh/templates/webui.yaml +8 -10
  192. {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/METADATA +9 -6
  193. {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/RECORD +197 -141
  194. solace_agent_mesh/assets/docs/assets/js/f284c35a.731836ad.js +0 -1
  195. solace_agent_mesh/assets/docs/assets/js/main.3d0e7879.js +0 -2
  196. solace_agent_mesh/assets/docs/assets/js/runtime~main.05d19492.js +0 -1
  197. solace_agent_mesh/assets/docs/lunr-index-1757091012487.json +0 -1
  198. solace_agent_mesh/assets/docs/search-doc-1757091012487.json +0 -1
  199. solace_agent_mesh/client/webui/frontend/static/assets/authCallback-BmF2l6vg.js +0 -1
  200. solace_agent_mesh/client/webui/frontend/static/assets/client-D881Dttc.js +0 -49
  201. solace_agent_mesh/client/webui/frontend/static/assets/main-D0FnP_W4.css +0 -1
  202. solace_agent_mesh/client/webui/frontend/static/assets/main-Do32sFPX.js +0 -708
  203. solace_agent_mesh/common/a2a_protocol.py +0 -564
  204. solace_agent_mesh/common/client/__init__.py +0 -4
  205. solace_agent_mesh/common/client/card_resolver.py +0 -21
  206. solace_agent_mesh/common/client/client.py +0 -85
  207. solace_agent_mesh/common/client/client_llm.txt +0 -133
  208. solace_agent_mesh/common/server/__init__.py +0 -4
  209. solace_agent_mesh/common/server/server.py +0 -122
  210. solace_agent_mesh/common/server/server_llm.txt +0 -169
  211. solace_agent_mesh/common/server/task_manager.py +0 -291
  212. solace_agent_mesh/common/server/utils.py +0 -28
  213. solace_agent_mesh/common/types.py +0 -411
  214. solace_agent_mesh/config_portal/frontend/static/client/assets/_index-Bym6YkMd.js +0 -98
  215. solace_agent_mesh/gateway/http_sse/routers/sessions.py +0 -80
  216. solace_agent_mesh/gateway/http_sse/routers/users.py +0 -59
  217. /solace_agent_mesh/assets/docs/assets/js/{main.3d0e7879.js.LICENSE.txt → main.08d30374.js.LICENSE.txt} +0 -0
  218. {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/WHEEL +0 -0
  219. {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/entry_points.txt +0 -0
  220. {solace_agent_mesh-1.0.9.dist-info → solace_agent_mesh-1.3.0.dist-info}/licenses/LICENSE +0 -0
@@ -5,8 +5,9 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/assets/favicon-BLgzUch9.ico" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Solace Agent Mesh</title>
8
- <script type="module" crossorigin src="/assets/authCallback-BmF2l6vg.js"></script>
9
- <link rel="modulepreload" crossorigin href="/assets/client-D881Dttc.js">
8
+ <script type="module" crossorigin src="/assets/authCallback-vY5eu2lI.js"></script>
9
+ <link rel="modulepreload" crossorigin href="/assets/vendor-CE0AeXyK.js">
10
+ <link rel="modulepreload" crossorigin href="/assets/client-BeBkzgWW.js">
10
11
  </head>
11
12
  <body>
12
13
  <div id="root"></div>
@@ -5,9 +5,10 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/assets/favicon-BLgzUch9.ico" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Solace Agent Mesh</title>
8
- <script type="module" crossorigin src="/assets/main-Do32sFPX.js"></script>
9
- <link rel="modulepreload" crossorigin href="/assets/client-D881Dttc.js">
10
- <link rel="stylesheet" crossorigin href="/assets/main-D0FnP_W4.css">
8
+ <script type="module" crossorigin src="/assets/main-Bjys1KQs.js"></script>
9
+ <link rel="modulepreload" crossorigin href="/assets/vendor-CE0AeXyK.js">
10
+ <link rel="modulepreload" crossorigin href="/assets/client-BeBkzgWW.js">
11
+ <link rel="stylesheet" crossorigin href="/assets/main-C03yrETa.css">
11
12
  </head>
12
13
  <body>
13
14
  <div id="root"></div>
@@ -0,0 +1,213 @@
1
+ """
2
+ A2A Helper Abstraction Layer.
3
+
4
+ This package provides a facade for interacting with A2A protocol objects,
5
+ insulating the application from the specifics of the a2a-sdk.
6
+
7
+ This __init__.py file exposes the most commonly used helpers for easy access.
8
+ """
9
+
10
+ from .types import ContentPart
11
+ from .artifact import (
12
+ create_data_artifact,
13
+ create_text_artifact,
14
+ get_artifact_id,
15
+ get_artifact_name,
16
+ get_parts_from_artifact,
17
+ update_artifact_parts,
18
+ prepare_file_part_for_publishing,
19
+ resolve_file_part_uri,
20
+ )
21
+ from .events import (
22
+ create_artifact_update,
23
+ create_data_signal_event,
24
+ create_status_update,
25
+ get_artifact_from_artifact_update,
26
+ get_data_parts_from_status_update,
27
+ get_message_from_status_update,
28
+ )
29
+ from .message import (
30
+ create_agent_data_message,
31
+ create_agent_parts_message,
32
+ create_agent_text_message,
33
+ create_data_part,
34
+ create_file_part_from_bytes,
35
+ create_file_part_from_uri,
36
+ create_text_part,
37
+ create_user_message,
38
+ update_message_parts,
39
+ get_bytes_from_file_part,
40
+ get_context_id,
41
+ get_data_from_data_part,
42
+ get_data_parts_from_message,
43
+ get_file_from_file_part,
44
+ get_filename_from_file_part,
45
+ get_file_parts_from_message,
46
+ get_message_id,
47
+ get_metadata_from_part,
48
+ get_mimetype_from_file_part,
49
+ get_parts_from_message,
50
+ get_task_id as get_task_id_from_message, # Alias to avoid name clash
51
+ get_text_from_message,
52
+ get_text_from_text_part,
53
+ get_uri_from_file_part,
54
+ )
55
+ from .protocol import (
56
+ create_cancel_task_request,
57
+ create_error_response,
58
+ create_generic_success_response,
59
+ create_internal_error,
60
+ create_internal_error_response,
61
+ create_invalid_request_error,
62
+ create_invalid_request_error_response,
63
+ create_send_message_request,
64
+ create_send_message_success_response,
65
+ create_send_streaming_message_request,
66
+ create_send_streaming_message_success_response,
67
+ create_success_response,
68
+ get_a2a_base_topic,
69
+ get_agent_request_topic,
70
+ get_agent_response_subscription_topic,
71
+ get_agent_response_topic,
72
+ get_agent_status_subscription_topic,
73
+ get_client_response_topic,
74
+ get_client_status_subscription_topic,
75
+ get_client_status_topic,
76
+ get_discovery_topic,
77
+ get_gateway_response_subscription_topic,
78
+ get_gateway_response_topic,
79
+ get_gateway_status_subscription_topic,
80
+ get_gateway_status_topic,
81
+ get_message_from_send_request,
82
+ get_peer_agent_status_topic,
83
+ get_request_id,
84
+ get_request_method,
85
+ get_response_error,
86
+ get_error_code,
87
+ get_error_data,
88
+ get_error_message,
89
+ get_response_id,
90
+ get_response_result,
91
+ get_task_id_from_cancel_request,
92
+ extract_task_id_from_topic,
93
+ subscription_to_regex,
94
+ topic_matches_subscription,
95
+ )
96
+ from .task import (
97
+ create_final_task,
98
+ create_initial_task,
99
+ create_task_status,
100
+ get_task_artifacts,
101
+ get_task_context_id,
102
+ get_task_history,
103
+ get_task_id,
104
+ get_task_metadata,
105
+ get_task_status,
106
+ )
107
+ from .translation import (
108
+ format_adk_event_as_a2a,
109
+ translate_a2a_to_adk_content,
110
+ translate_adk_function_response_to_a2a_parts,
111
+ translate_adk_part_to_a2a_filepart,
112
+ )
113
+
114
+ __all__ = [
115
+ # types.py
116
+ "ContentPart",
117
+ # artifact.py
118
+ "create_data_artifact",
119
+ "create_text_artifact",
120
+ "get_artifact_id",
121
+ "get_artifact_name",
122
+ "get_parts_from_artifact",
123
+ "update_artifact_parts",
124
+ "prepare_file_part_for_publishing",
125
+ "resolve_file_part_uri",
126
+ # events.py
127
+ "create_artifact_update",
128
+ "create_data_signal_event",
129
+ "create_status_update",
130
+ "get_artifact_from_artifact_update",
131
+ "get_data_parts_from_status_update",
132
+ "get_message_from_status_update",
133
+ # message.py
134
+ "create_agent_data_message",
135
+ "create_agent_parts_message",
136
+ "create_agent_text_message",
137
+ "create_data_part",
138
+ "create_file_part_from_bytes",
139
+ "create_file_part_from_uri",
140
+ "create_text_part",
141
+ "create_user_message",
142
+ "update_message_parts",
143
+ "get_bytes_from_file_part",
144
+ "get_context_id",
145
+ "get_data_from_data_part",
146
+ "get_data_parts_from_message",
147
+ "get_filename_from_file_part",
148
+ "get_file_parts_from_message",
149
+ "get_message_id",
150
+ "get_metadata_from_part",
151
+ "get_mimetype_from_file_part",
152
+ "get_file_from_file_part",
153
+ "get_parts_from_message",
154
+ "get_task_id_from_message",
155
+ "get_text_from_message",
156
+ "get_uri_from_file_part",
157
+ "get_text_from_text_part",
158
+ # protocol.py
159
+ "create_cancel_task_request",
160
+ "create_error_response",
161
+ "create_generic_success_response",
162
+ "create_internal_error",
163
+ "create_internal_error_response",
164
+ "create_invalid_request_error",
165
+ "create_invalid_request_error_response",
166
+ "create_send_message_request",
167
+ "create_send_message_success_response",
168
+ "create_send_streaming_message_request",
169
+ "create_send_streaming_message_success_response",
170
+ "create_success_response",
171
+ "get_a2a_base_topic",
172
+ "get_agent_request_topic",
173
+ "get_agent_response_subscription_topic",
174
+ "get_agent_response_topic",
175
+ "get_agent_status_subscription_topic",
176
+ "get_client_response_topic",
177
+ "get_client_status_subscription_topic",
178
+ "get_client_status_topic",
179
+ "get_discovery_topic",
180
+ "get_gateway_response_subscription_topic",
181
+ "get_gateway_response_topic",
182
+ "get_gateway_status_subscription_topic",
183
+ "get_gateway_status_topic",
184
+ "get_message_from_send_request",
185
+ "get_peer_agent_status_topic",
186
+ "get_request_id",
187
+ "get_request_method",
188
+ "get_response_error",
189
+ "get_error_code",
190
+ "get_error_data",
191
+ "get_error_message",
192
+ "get_response_id",
193
+ "get_response_result",
194
+ "get_task_id_from_cancel_request",
195
+ "extract_task_id_from_topic",
196
+ "subscription_to_regex",
197
+ "topic_matches_subscription",
198
+ # task.py
199
+ "create_final_task",
200
+ "create_initial_task",
201
+ "create_task_status",
202
+ "get_task_artifacts",
203
+ "get_task_context_id",
204
+ "get_task_history",
205
+ "get_task_id",
206
+ "get_task_metadata",
207
+ "get_task_status",
208
+ # translation.py
209
+ "format_adk_event_as_a2a",
210
+ "translate_a2a_to_adk_content",
211
+ "translate_adk_function_response_to_a2a_parts",
212
+ "translate_adk_part_to_a2a_filepart",
213
+ ]
@@ -0,0 +1,182 @@
1
+ # DEVELOPER GUIDE: a2a
2
+
3
+ ## Quick Summary
4
+ The `a2a` directory provides a comprehensive abstraction layer for the A2A (Agent-to-Agent) protocol, offering helper functions for creating, consuming, and translating A2A protocol objects. It acts as a facade that insulates applications from the specifics of the underlying a2a-sdk, providing simplified interfaces for messages, artifacts, tasks, events, and protocol-level operations.
5
+
6
+ ## Files Overview
7
+ - `__init__.py` - Main entry point exposing all commonly used A2A helpers
8
+ - `artifact.py` - Helpers for creating and consuming A2A Artifact objects
9
+ - `events.py` - Helpers for creating and consuming A2A asynchronous event objects
10
+ - `message.py` - Helpers for creating and consuming A2A Message and Part objects
11
+ - `protocol.py` - Helpers for A2A protocol-level concerns like topic construction and JSON-RPC
12
+ - `task.py` - Helpers for creating and consuming A2A Task objects
13
+ - `translation.py` - Helpers for translating between A2A protocol objects and other domains
14
+ - `types.py` - Custom type aliases and models for the A2A helper layer
15
+
16
+ ## Developer API Reference
17
+
18
+ ### __init__.py
19
+ **Purpose:** Main entry point that exposes all commonly used A2A helpers for easy access
20
+ **Import:** `from solace_agent_mesh.common.a2a import *`
21
+
22
+ This file re-exports all public functions from the other modules, allowing developers to import everything from the main package.
23
+
24
+ ### artifact.py
25
+ **Purpose:** Provides helpers for creating and consuming A2A Artifact objects
26
+ **Import:** `from solace_agent_mesh.common.a2a.artifact import create_text_artifact, create_data_artifact, get_artifact_id`
27
+
28
+ **Functions:**
29
+ - `create_text_artifact(name: str, text: str, description: str = "", artifact_id: Optional[str] = None) -> Artifact` - Creates a new Artifact containing a single TextPart
30
+ - `create_data_artifact(name: str, data: dict[str, Any], description: str = "", artifact_id: Optional[str] = None) -> Artifact` - Creates a new Artifact containing a single DataPart
31
+ - `update_artifact_parts(artifact: Artifact, new_parts: List[ContentPart]) -> Artifact` - Returns a new Artifact with replaced parts
32
+ - `prepare_file_part_for_publishing(part: FilePart, mode: str, artifact_service: "BaseArtifactService", user_id: str, session_id: str, target_agent_name: str, log_identifier: str) -> Optional[FilePart]` - Prepares a FilePart for publishing based on the artifact handling mode
33
+ - `resolve_file_part_uri(part: FilePart, artifact_service: "BaseArtifactService", log_identifier: str) -> FilePart` - Resolves an artifact URI within a FilePart into embedded bytes
34
+ - `get_artifact_id(artifact: Artifact) -> str` - Safely retrieves the ID from an Artifact
35
+ - `get_artifact_name(artifact: Artifact) -> Optional[str]` - Safely retrieves the name from an Artifact
36
+ - `get_parts_from_artifact(artifact: Artifact) -> List[ContentPart]` - Extracts unwrapped content parts from an Artifact
37
+
38
+ **Usage Examples:**
39
+ ```python
40
+ from solace_agent_mesh.common.a2a.artifact import create_text_artifact, get_artifact_id
41
+
42
+ # Create a text artifact
43
+ artifact = create_text_artifact(
44
+ name="My Document",
45
+ text="This is the content of my document",
46
+ description="A sample text document"
47
+ )
48
+
49
+ # Get artifact ID
50
+ artifact_id = get_artifact_id(artifact)
51
+ ```
52
+
53
+ ### events.py
54
+ **Purpose:** Provides helpers for creating and consuming A2A asynchronous event objects
55
+ **Import:** `from solace_agent_mesh.common.a2a.events import create_status_update, create_artifact_update`
56
+
57
+ **Functions:**
58
+ - `create_data_signal_event(task_id: str, context_id: str, signal_data: SignalData, agent_name: str, part_metadata: Optional[Dict[str, Any]] = None) -> TaskStatusUpdateEvent` - Creates a TaskStatusUpdateEvent from signal data
59
+ - `create_status_update(task_id: str, context_id: str, message: Message, is_final: bool = False, metadata: Optional[Dict[str, Any]] = None) -> TaskStatusUpdateEvent` - Creates a new TaskStatusUpdateEvent
60
+ - `create_artifact_update(task_id: str, context_id: str, artifact: Artifact, append: bool = False, last_chunk: bool = False, metadata: Optional[Dict[str, Any]] = None) -> TaskArtifactUpdateEvent` - Creates a new TaskArtifactUpdateEvent
61
+ - `get_message_from_status_update(event: TaskStatusUpdateEvent) -> Optional[Message]` - Extracts Message from TaskStatusUpdateEvent
62
+ - `get_data_parts_from_status_update(event: TaskStatusUpdateEvent) -> List[DataPart]` - Extracts DataPart objects from status update
63
+ - `get_artifact_from_artifact_update(event: TaskArtifactUpdateEvent) -> Optional[Artifact]` - Extracts Artifact from TaskArtifactUpdateEvent
64
+
65
+ **Usage Examples:**
66
+ ```python
67
+ from solace_agent_mesh.common.a2a.events import create_status_update
68
+ from solace_agent_mesh.common.a2a.message import create_agent_text_message
69
+
70
+ # Create a status update event
71
+ message = create_agent_text_message("Processing your request...")
72
+ status_event = create_status_update(
73
+ task_id="task-123",
74
+ context_id="context-456",
75
+ message=message,
76
+ is_final=False
77
+ )
78
+ ```
79
+
80
+ ### message.py
81
+ **Purpose:** Provides helpers for creating and consuming A2A Message and Part objects
82
+ **Import:** `from solace_agent_mesh.common.a2a.message import create_agent_text_message, create_text_part, get_text_from_message`
83
+
84
+ **Functions:**
85
+ - `create_agent_text_message(text: str, task_id: Optional[str] = None, context_id: Optional[str] = None, message_id: Optional[str] = None) -> Message` - Creates agent message with TextPart
86
+ - `create_agent_data_message(data: dict[str, Any], task_id: Optional[str] = None, context_id: Optional[str] = None, message_id: Optional[str] = None, part_metadata: Optional[Dict[str, Any]] = None) -> Message` - Creates agent message with DataPart
87
+ - `create_agent_parts_message(parts: List[ContentPart], task_id: Optional[str] = None, context_id: Optional[str] = None, message_id: Optional[str] = None, metadata: Optional[Dict[str, Any]] = None) -> Message` - Creates agent message with multiple parts
88
+ - `create_user_message(parts: List[ContentPart], task_id: Optional[str] = None, context_id: Optional[str] = None, message_id: Optional[str] = None, metadata: Optional[Dict[str, Any]] = None) -> Message` - Creates user message with multiple parts
89
+ - `create_text_part(text: str, metadata: Optional[Dict[str, Any]] = None) -> TextPart` - Creates a TextPart object
90
+ - `create_file_part_from_uri(uri: str, name: Optional[str] = None, mime_type: Optional[str] = None, metadata: Optional[Dict[str, Any]] = None) -> FilePart` - Creates FilePart from URI
91
+ - `create_file_part_from_bytes(content_bytes: bytes, name: Optional[str] = None, mime_type: Optional[str] = None, metadata: Optional[Dict[str, Any]] = None) -> FilePart` - Creates FilePart from bytes
92
+ - `create_data_part(data: Dict[str, Any], metadata: Optional[Dict[str, Any]] = None) -> DataPart` - Creates a DataPart object
93
+ - `update_message_parts(message: Message, new_parts: List[ContentPart]) -> Message` - Returns a new Message with replaced parts
94
+ - `get_text_from_message(message: Message, delimiter: str = "\n") -> str` - Extracts and joins all text content from Message
95
+ - `get_data_parts_from_message(message: Message) -> List[DataPart]` - Extracts DataPart objects from Message
96
+ - `get_file_parts_from_message(message: Message) -> List[FilePart]` - Extracts FilePart objects from Message
97
+ - `get_message_id(message: Message) -> str` - Gets message ID
98
+ - `get_context_id(message: Message) -> Optional[str]` - Gets context ID
99
+ - `get_task_id(message: Message) -> Optional[str]` - Gets task ID
100
+ - `get_parts_from_message(message: Message) -> List[ContentPart]` - Extracts unwrapped content parts from Message
101
+ - `get_text_from_text_part(part: TextPart) -> str` - Gets text from TextPart
102
+ - `get_data_from_data_part(part: DataPart) -> Dict[str, Any]` - Gets data from DataPart
103
+ - `get_metadata_from_part(part: ContentPart) -> Optional[Dict[str, Any]]` - Gets metadata from any Part
104
+ - `get_file_from_file_part(part: FilePart) -> Optional[Union[FileWithUri, FileWithBytes]]` - Gets File object from FilePart
105
+ - `get_uri_from_file_part(part: FilePart) -> Optional[str]` - Gets URI from FilePart
106
+ - `get_bytes_from_file_part(part: FilePart) -> Optional[bytes]` - Gets decoded bytes from FilePart
107
+ - `get_filename_from_file_part(part: FilePart) -> Optional[str]` - Gets filename from FilePart
108
+ - `get_mimetype_from_file_part(part: FilePart) -> Optional[str]` - Gets MIME type from FilePart
109
+
110
+ **Usage Examples:**
111
+ ```python
112
+ from solace_agent_mesh.common.a2a.message import create_agent_text_message, create_text_part, create_user_message
113
+
114
+ # Create a simple text message
115
+ message = create_agent_text_message(
116
+ text="Hello, how can I help you?",
117
+ task_id="task-123",
118
+ context_id="context-456"
119
+ )
120
+
121
+ # Create a user message with multiple parts
122
+ text_part = create_text_part("Please analyze this data:")
123
+ data_part = create_data_part({"values": [1, 2, 3, 4, 5]})
124
+ user_message = create_user_message(
125
+ parts=[text_part, data_part],
126
+ task_id="task-123"
127
+ )
128
+ ```
129
+
130
+ ### protocol.py
131
+ **Purpose:** Provides helpers for A2A protocol-level concerns like topic construction and JSON-RPC
132
+ **Import:** `from solace_agent_mesh.common.a2a.protocol import get_agent_request_topic, create_send_message_request`
133
+
134
+ **Constants/Variables:**
135
+ - `A2A_VERSION: str` - Current A2A protocol version ("v1")
136
+ - `A2A_BASE_PATH: str` - Base path for A2A topics ("a2a/v1")
137
+
138
+ **Functions:**
139
+ - `get_a2a_base_topic(namespace: str) -> str` - Returns base topic prefix for A2A communication
140
+ - `get_discovery_topic(namespace: str) -> str` - Returns topic for agent card discovery
141
+ - `get_agent_request_topic(namespace: str, agent_name: str) -> str` - Returns topic for sending requests to specific agent
142
+ - `get_gateway_status_topic(namespace: str, gateway_id: str, task_id: str) -> str` - Returns topic for publishing status updates to gateway
143
+ - `get_gateway_response_topic(namespace: str, gateway_id: str, task_id: str) -> str` - Returns topic for publishing final response to gateway
144
+ - `get_gateway_status_subscription_topic(namespace: str, self_gateway_id: str) -> str` - Returns wildcard topic for gateway to receive status updates
145
+ - `get_gateway_response_subscription_topic(namespace: str, self_gateway_id: str) -> str` - Returns wildcard topic for gateway to receive responses
146
+ - `get_peer_agent_status_topic(namespace: str, delegating_agent_name: str, sub_task_id: str) -> str` - Returns topic for publishing status to delegating agent
147
+ - `get_agent_response_topic(namespace: str, delegating_agent_name: str, sub_task_id: str) -> str` - Returns topic for publishing response to delegating agent
148
+ - `get_agent_response_subscription_topic(namespace: str, self_agent_name: str) -> str` - Returns wildcard topic for agent to receive responses
149
+ - `get_agent_status_subscription_topic(namespace: str, self_agent_name: str) -> str` - Returns wildcard topic for agent to receive status updates
150
+ - `get_client_response_topic(namespace: str, client_id: str) -> str` - Returns topic for publishing response to client
151
+ - `get_client_status_topic(namespace: str, client_id: str, task_id: str) -> str` - Returns topic for publishing status to client
152
+ - `get_client_status_subscription_topic(namespace: str, client_id: str) -> str` - Returns wildcard topic for client to receive status
153
+ - `create_send_message_request(message: Message, task_id: str, metadata: Optional[Dict[str, Any]] = None) -> SendMessageRequest` - Creates SendMessageRequest object
154
+ - `create_send_streaming_message_request(message: Message, task_id: str, metadata: Optional[Dict[str, Any]] = None) -> SendStreamingMessageRequest` - Creates SendStreamingMessageRequest object
155
+ - `create_success_response(result: Any, request_id: Optional[Union[str, int]]) -> JSONRPCResponse` - Creates successful JSON-RPC response
156
+ - `create_internal_error_response(message: str, request_id: Optional[Union[str, int]], data: Optional[Dict[str, Any]] = None) -> JSONRPCResponse` - Creates internal error response
157
+ - `create_invalid_request_error_response(message: str, request_id: Optional[Union[str, int]], data: Optional[Any] = None) -> JSONRPCResponse` - Creates invalid request error response
158
+ - `create_cancel_task_request(task_id: str) -> CancelTaskRequest` - Creates CancelTaskRequest object
159
+ - `get_request_id(request: A2ARequest) -> str | int` - Gets JSON-RPC request ID
160
+ - `get_request_method(request: A2ARequest) -> str` - Gets JSON-RPC method name
161
+ - `get_message_from_send_request(request: A2ARequest) -> Optional[Message]` - Gets Message from send request
162
+ - `get_task_id_from_cancel_request(request: A2ARequest) -> Optional[str]` - Gets task ID from cancel request
163
+ - `get_response_id(response: JSONRPCResponse) -> Optional[Union[str, int]]` - Gets response ID
164
+ - `get_response_result(response: JSONRPCResponse) -> Optional[Any]` - Gets response result
165
+ - `get_response_error(response: JSONRPCResponse) -> Optional[JSONRPCError]` - Gets response error
166
+ - `topic_matches_subscription(topic: str, subscription: str) -> bool` - Checks if topic matches Solace subscription pattern
167
+ - `subscription_to_regex(subscription: str) -> str` - Converts Solace subscription to regex
168
+ - `extract_task_id_from_topic(topic: str, subscription_pattern: str, log_identifier: str) -> Optional[str]` - Extracts task ID from topic
169
+
170
+ **Usage Examples:**
171
+ ```python
172
+ from solace_agent_mesh.common.a2a.protocol import get_agent_request_topic, create_send_message_request
173
+ from solace_agent_mesh.common.a2a.message import create_agent_text_message
174
+
175
+ # Get topic for sending request to an agent
176
+ topic = get_agent_request_topic("my-namespace", "my-agent")
177
+
178
+ # Create a send message request
179
+ message = create_agent_text_message("Hello agent!")
180
+ request = create_sen
181
+
182
+ # content_hash: b894ad5028b63e8ee25dcae4edbefa55a29be08dbece2fd4666ab2f0f0b7d740