solace-agent-mesh 1.11.2__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.
Files changed (624) hide show
  1. solace_agent_mesh/__init__.py +0 -0
  2. solace_agent_mesh/agent/__init__.py +0 -0
  3. solace_agent_mesh/agent/adk/__init__.py +0 -0
  4. solace_agent_mesh/agent/adk/adk_llm.txt +226 -0
  5. solace_agent_mesh/agent/adk/adk_llm_detail.txt +566 -0
  6. solace_agent_mesh/agent/adk/alembic/README +74 -0
  7. solace_agent_mesh/agent/adk/alembic/env.py +77 -0
  8. solace_agent_mesh/agent/adk/alembic/script.py.mako +28 -0
  9. solace_agent_mesh/agent/adk/alembic/versions/e2902798564d_adk_session_db_upgrade.py +52 -0
  10. solace_agent_mesh/agent/adk/alembic.ini +112 -0
  11. solace_agent_mesh/agent/adk/app_llm_agent.py +52 -0
  12. solace_agent_mesh/agent/adk/artifacts/__init__.py +1 -0
  13. solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +171 -0
  14. solace_agent_mesh/agent/adk/artifacts/filesystem_artifact_service.py +545 -0
  15. solace_agent_mesh/agent/adk/artifacts/s3_artifact_service.py +609 -0
  16. solace_agent_mesh/agent/adk/callbacks.py +2318 -0
  17. solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +406 -0
  18. solace_agent_mesh/agent/adk/intelligent_mcp_callbacks.py +415 -0
  19. solace_agent_mesh/agent/adk/mcp_content_processor.py +666 -0
  20. solace_agent_mesh/agent/adk/models/lite_llm.py +1026 -0
  21. solace_agent_mesh/agent/adk/models/models_llm.txt +189 -0
  22. solace_agent_mesh/agent/adk/models/oauth2_token_manager.py +132 -0
  23. solace_agent_mesh/agent/adk/runner.py +390 -0
  24. solace_agent_mesh/agent/adk/schema_migration.py +88 -0
  25. solace_agent_mesh/agent/adk/services.py +468 -0
  26. solace_agent_mesh/agent/adk/setup.py +1325 -0
  27. solace_agent_mesh/agent/adk/stream_parser.py +415 -0
  28. solace_agent_mesh/agent/adk/tool_wrapper.py +165 -0
  29. solace_agent_mesh/agent/agent_llm.txt +369 -0
  30. solace_agent_mesh/agent/agent_llm_detail.txt +1702 -0
  31. solace_agent_mesh/agent/protocol/__init__.py +0 -0
  32. solace_agent_mesh/agent/protocol/event_handlers.py +2041 -0
  33. solace_agent_mesh/agent/protocol/protocol_llm.txt +81 -0
  34. solace_agent_mesh/agent/protocol/protocol_llm_detail.txt +92 -0
  35. solace_agent_mesh/agent/proxies/__init__.py +0 -0
  36. solace_agent_mesh/agent/proxies/a2a/__init__.py +3 -0
  37. solace_agent_mesh/agent/proxies/a2a/a2a_llm.txt +190 -0
  38. solace_agent_mesh/agent/proxies/a2a/app.py +56 -0
  39. solace_agent_mesh/agent/proxies/a2a/component.py +1585 -0
  40. solace_agent_mesh/agent/proxies/a2a/config.py +216 -0
  41. solace_agent_mesh/agent/proxies/a2a/oauth_token_cache.py +104 -0
  42. solace_agent_mesh/agent/proxies/base/__init__.py +3 -0
  43. solace_agent_mesh/agent/proxies/base/app.py +100 -0
  44. solace_agent_mesh/agent/proxies/base/base_llm.txt +148 -0
  45. solace_agent_mesh/agent/proxies/base/component.py +816 -0
  46. solace_agent_mesh/agent/proxies/base/config.py +85 -0
  47. solace_agent_mesh/agent/proxies/base/proxy_task_context.py +19 -0
  48. solace_agent_mesh/agent/proxies/proxies_llm.txt +283 -0
  49. solace_agent_mesh/agent/sac/__init__.py +0 -0
  50. solace_agent_mesh/agent/sac/app.py +595 -0
  51. solace_agent_mesh/agent/sac/component.py +3668 -0
  52. solace_agent_mesh/agent/sac/patch_adk.py +103 -0
  53. solace_agent_mesh/agent/sac/sac_llm.txt +189 -0
  54. solace_agent_mesh/agent/sac/sac_llm_detail.txt +200 -0
  55. solace_agent_mesh/agent/sac/task_execution_context.py +415 -0
  56. solace_agent_mesh/agent/testing/__init__.py +3 -0
  57. solace_agent_mesh/agent/testing/debug_utils.py +135 -0
  58. solace_agent_mesh/agent/testing/testing_llm.txt +58 -0
  59. solace_agent_mesh/agent/testing/testing_llm_detail.txt +68 -0
  60. solace_agent_mesh/agent/tools/__init__.py +16 -0
  61. solace_agent_mesh/agent/tools/audio_tools.py +1740 -0
  62. solace_agent_mesh/agent/tools/builtin_artifact_tools.py +2500 -0
  63. solace_agent_mesh/agent/tools/builtin_data_analysis_tools.py +244 -0
  64. solace_agent_mesh/agent/tools/dynamic_tool.py +396 -0
  65. solace_agent_mesh/agent/tools/general_agent_tools.py +572 -0
  66. solace_agent_mesh/agent/tools/image_tools.py +1185 -0
  67. solace_agent_mesh/agent/tools/peer_agent_tool.py +363 -0
  68. solace_agent_mesh/agent/tools/registry.py +38 -0
  69. solace_agent_mesh/agent/tools/test_tools.py +136 -0
  70. solace_agent_mesh/agent/tools/time_tools.py +126 -0
  71. solace_agent_mesh/agent/tools/tool_config_types.py +93 -0
  72. solace_agent_mesh/agent/tools/tool_definition.py +53 -0
  73. solace_agent_mesh/agent/tools/tools_llm.txt +276 -0
  74. solace_agent_mesh/agent/tools/tools_llm_detail.txt +275 -0
  75. solace_agent_mesh/agent/tools/web_tools.py +392 -0
  76. solace_agent_mesh/agent/utils/__init__.py +0 -0
  77. solace_agent_mesh/agent/utils/artifact_helpers.py +1353 -0
  78. solace_agent_mesh/agent/utils/config_parser.py +49 -0
  79. solace_agent_mesh/agent/utils/context_helpers.py +77 -0
  80. solace_agent_mesh/agent/utils/utils_llm.txt +152 -0
  81. solace_agent_mesh/agent/utils/utils_llm_detail.txt +149 -0
  82. solace_agent_mesh/assets/docs/404.html +16 -0
  83. solace_agent_mesh/assets/docs/assets/css/styles.8162edfb.css +1 -0
  84. solace_agent_mesh/assets/docs/assets/images/Solace_AI_Framework_With_Broker-85f0a306a9bcdd20b390b7a949f6d862.png +0 -0
  85. solace_agent_mesh/assets/docs/assets/images/sam-enterprise-credentials-b269f095349473118b2b33bdfcc40122.png +0 -0
  86. solace_agent_mesh/assets/docs/assets/js/032c2d61.f3d37824.js +1 -0
  87. solace_agent_mesh/assets/docs/assets/js/05749d90.19ac4f35.js +1 -0
  88. solace_agent_mesh/assets/docs/assets/js/0bcf40b7.c019ad46.js +1 -0
  89. solace_agent_mesh/assets/docs/assets/js/1001.0182a8bd.js +1 -0
  90. solace_agent_mesh/assets/docs/assets/js/1039.0bd46aa1.js +1 -0
  91. solace_agent_mesh/assets/docs/assets/js/149.b797a808.js +1 -0
  92. solace_agent_mesh/assets/docs/assets/js/15ba94aa.92fea363.js +1 -0
  93. solace_agent_mesh/assets/docs/assets/js/15e40e79.434bb30f.js +1 -0
  94. solace_agent_mesh/assets/docs/assets/js/165.6a39807d.js +2 -0
  95. solace_agent_mesh/assets/docs/assets/js/165.6a39807d.js.LICENSE.txt +9 -0
  96. solace_agent_mesh/assets/docs/assets/js/17896441.e612dfb4.js +1 -0
  97. solace_agent_mesh/assets/docs/assets/js/2130.ab9fd314.js +1 -0
  98. solace_agent_mesh/assets/docs/assets/js/2131ec11.5c7a1f6e.js +1 -0
  99. solace_agent_mesh/assets/docs/assets/js/2237.5e477fc6.js +1 -0
  100. solace_agent_mesh/assets/docs/assets/js/2279.550aa580.js +2 -0
  101. solace_agent_mesh/assets/docs/assets/js/2279.550aa580.js.LICENSE.txt +13 -0
  102. solace_agent_mesh/assets/docs/assets/js/2334.1cf50a20.js +1 -0
  103. solace_agent_mesh/assets/docs/assets/js/240a0364.9ad94d1b.js +1 -0
  104. solace_agent_mesh/assets/docs/assets/js/2987107d.a80604f9.js +1 -0
  105. solace_agent_mesh/assets/docs/assets/js/2e32b5e0.33f5d75b.js +1 -0
  106. solace_agent_mesh/assets/docs/assets/js/3219.adc1d663.js +1 -0
  107. solace_agent_mesh/assets/docs/assets/js/341393d4.0fac2613.js +1 -0
  108. solace_agent_mesh/assets/docs/assets/js/3624.0eaa1fd0.js +1 -0
  109. solace_agent_mesh/assets/docs/assets/js/375.708d48db.js +1 -0
  110. solace_agent_mesh/assets/docs/assets/js/3834.b6cd790e.js +1 -0
  111. solace_agent_mesh/assets/docs/assets/js/3a6c6137.f5940cfa.js +1 -0
  112. solace_agent_mesh/assets/docs/assets/js/3ac1795d.28b7c67b.js +1 -0
  113. solace_agent_mesh/assets/docs/assets/js/3ff0015d.2ddc75c0.js +1 -0
  114. solace_agent_mesh/assets/docs/assets/js/41adc471.48b12a4e.js +1 -0
  115. solace_agent_mesh/assets/docs/assets/js/4250.95455b28.js +1 -0
  116. solace_agent_mesh/assets/docs/assets/js/4356.d169ab5b.js +1 -0
  117. solace_agent_mesh/assets/docs/assets/js/4458.518e66fa.js +1 -0
  118. solace_agent_mesh/assets/docs/assets/js/4488.c7cc3442.js +1 -0
  119. solace_agent_mesh/assets/docs/assets/js/4494.6ee23046.js +1 -0
  120. solace_agent_mesh/assets/docs/assets/js/4855.fc4444b6.js +1 -0
  121. solace_agent_mesh/assets/docs/assets/js/4866.22daefc0.js +1 -0
  122. solace_agent_mesh/assets/docs/assets/js/4950.ca4caeda.js +1 -0
  123. solace_agent_mesh/assets/docs/assets/js/509e993c.a1fbf45a.js +1 -0
  124. solace_agent_mesh/assets/docs/assets/js/5388.7a136447.js +1 -0
  125. solace_agent_mesh/assets/docs/assets/js/547e15cc.2f7790c1.js +1 -0
  126. solace_agent_mesh/assets/docs/assets/js/55b7b518.29d6e75d.js +1 -0
  127. solace_agent_mesh/assets/docs/assets/js/5607.081356f8.js +1 -0
  128. solace_agent_mesh/assets/docs/assets/js/5864.b0d0e9de.js +1 -0
  129. solace_agent_mesh/assets/docs/assets/js/5c2bd65f.90a87880.js +1 -0
  130. solace_agent_mesh/assets/docs/assets/js/5e95c892.558d5167.js +1 -0
  131. solace_agent_mesh/assets/docs/assets/js/6063ff4c.ef84f702.js +1 -0
  132. solace_agent_mesh/assets/docs/assets/js/60702c0e.a8bdd79b.js +1 -0
  133. solace_agent_mesh/assets/docs/assets/js/6143.0a1464c9.js +1 -0
  134. solace_agent_mesh/assets/docs/assets/js/631738c7.fa471607.js +1 -0
  135. solace_agent_mesh/assets/docs/assets/js/6395.e9c73649.js +1 -0
  136. solace_agent_mesh/assets/docs/assets/js/64195356.c498c4d0.js +1 -0
  137. solace_agent_mesh/assets/docs/assets/js/66d4869e.b77431fc.js +1 -0
  138. solace_agent_mesh/assets/docs/assets/js/6796.51d2c9b7.js +1 -0
  139. solace_agent_mesh/assets/docs/assets/js/6976.379be23b.js +1 -0
  140. solace_agent_mesh/assets/docs/assets/js/6978.ee0b945c.js +1 -0
  141. solace_agent_mesh/assets/docs/assets/js/6a520c9d.b6e3f2ce.js +1 -0
  142. solace_agent_mesh/assets/docs/assets/js/6aaedf65.7253541d.js +1 -0
  143. solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.a5b36a60.js +1 -0
  144. solace_agent_mesh/assets/docs/assets/js/6d84eae0.fd23ba4a.js +1 -0
  145. solace_agent_mesh/assets/docs/assets/js/6fdfefc7.99de744e.js +1 -0
  146. solace_agent_mesh/assets/docs/assets/js/7040.cb436723.js +1 -0
  147. solace_agent_mesh/assets/docs/assets/js/7195.412f418a.js +1 -0
  148. solace_agent_mesh/assets/docs/assets/js/71da7b71.374b9d54.js +1 -0
  149. solace_agent_mesh/assets/docs/assets/js/722f809d.965da774.js +1 -0
  150. solace_agent_mesh/assets/docs/assets/js/7280.3fb73bdb.js +1 -0
  151. solace_agent_mesh/assets/docs/assets/js/742f027b.46c07808.js +1 -0
  152. solace_agent_mesh/assets/docs/assets/js/77cf947d.48cb18a2.js +1 -0
  153. solace_agent_mesh/assets/docs/assets/js/7845.e33e7c4c.js +1 -0
  154. solace_agent_mesh/assets/docs/assets/js/7900.69516146.js +1 -0
  155. solace_agent_mesh/assets/docs/assets/js/8024126c.fa0e7186.js +1 -0
  156. solace_agent_mesh/assets/docs/assets/js/81a99df0.2484b8d9.js +1 -0
  157. solace_agent_mesh/assets/docs/assets/js/82fbfb93.161823a5.js +1 -0
  158. solace_agent_mesh/assets/docs/assets/js/8356.8a379c04.js +1 -0
  159. solace_agent_mesh/assets/docs/assets/js/8567.4732c6b7.js +1 -0
  160. solace_agent_mesh/assets/docs/assets/js/8573.cb04eda5.js +1 -0
  161. solace_agent_mesh/assets/docs/assets/js/8577.1d54e766.js +1 -0
  162. solace_agent_mesh/assets/docs/assets/js/8591.5d015485.js +2 -0
  163. solace_agent_mesh/assets/docs/assets/js/8591.5d015485.js.LICENSE.txt +61 -0
  164. solace_agent_mesh/assets/docs/assets/js/8709.7ecd4047.js +1 -0
  165. solace_agent_mesh/assets/docs/assets/js/8731.6c1dbf0c.js +1 -0
  166. solace_agent_mesh/assets/docs/assets/js/8908.f9d1b506.js +1 -0
  167. solace_agent_mesh/assets/docs/assets/js/8b032486.91a91afc.js +1 -0
  168. solace_agent_mesh/assets/docs/assets/js/9157.b4093d07.js +1 -0
  169. solace_agent_mesh/assets/docs/assets/js/924ffdeb.975e428a.js +1 -0
  170. solace_agent_mesh/assets/docs/assets/js/9278.a4fd875d.js +1 -0
  171. solace_agent_mesh/assets/docs/assets/js/945fb41e.6f4cdffd.js +1 -0
  172. solace_agent_mesh/assets/docs/assets/js/94e8668d.16083b3f.js +1 -0
  173. solace_agent_mesh/assets/docs/assets/js/9616.b75c2f6d.js +1 -0
  174. solace_agent_mesh/assets/docs/assets/js/9793.c6d16376.js +1 -0
  175. solace_agent_mesh/assets/docs/assets/js/9bb13469.b2333011.js +1 -0
  176. solace_agent_mesh/assets/docs/assets/js/9e9d0a82.570c057b.js +1 -0
  177. solace_agent_mesh/assets/docs/assets/js/a7bd4aaa.2204d2f7.js +1 -0
  178. solace_agent_mesh/assets/docs/assets/js/a94703ab.3e5fbcb3.js +1 -0
  179. solace_agent_mesh/assets/docs/assets/js/ab9708a8.245ae0ef.js +1 -0
  180. solace_agent_mesh/assets/docs/assets/js/aba21aa0.c42a534c.js +1 -0
  181. solace_agent_mesh/assets/docs/assets/js/ad71b5ed.af3ecfd1.js +1 -0
  182. solace_agent_mesh/assets/docs/assets/js/ad87452a.9d73dad6.js +1 -0
  183. solace_agent_mesh/assets/docs/assets/js/c198a0dc.8f31f867.js +1 -0
  184. solace_agent_mesh/assets/docs/assets/js/c93cbaa0.0e0d8baf.js +1 -0
  185. solace_agent_mesh/assets/docs/assets/js/cab03b5b.6a073091.js +1 -0
  186. solace_agent_mesh/assets/docs/assets/js/cbe2e9ea.07e170dd.js +1 -0
  187. solace_agent_mesh/assets/docs/assets/js/ceb2a7a6.5d92d7d0.js +1 -0
  188. solace_agent_mesh/assets/docs/assets/js/da0b5bad.b62f7b08.js +1 -0
  189. solace_agent_mesh/assets/docs/assets/js/db5d6442.3daf1696.js +1 -0
  190. solace_agent_mesh/assets/docs/assets/js/db924877.e98d12a1.js +1 -0
  191. solace_agent_mesh/assets/docs/assets/js/dd817ffc.c37a755e.js +1 -0
  192. solace_agent_mesh/assets/docs/assets/js/dd81e2b8.b682e9c2.js +1 -0
  193. solace_agent_mesh/assets/docs/assets/js/de5f4c65.e8241890.js +1 -0
  194. solace_agent_mesh/assets/docs/assets/js/de915948.44a432bc.js +1 -0
  195. solace_agent_mesh/assets/docs/assets/js/e04b235d.52cb25ed.js +1 -0
  196. solace_agent_mesh/assets/docs/assets/js/e1b6eeb4.b1068f9b.js +1 -0
  197. solace_agent_mesh/assets/docs/assets/js/e3d9abda.1476f570.js +1 -0
  198. solace_agent_mesh/assets/docs/assets/js/e6f9706b.4488e34c.js +1 -0
  199. solace_agent_mesh/assets/docs/assets/js/e92d0134.3bda61dd.js +1 -0
  200. solace_agent_mesh/assets/docs/assets/js/f284c35a.250993bf.js +1 -0
  201. solace_agent_mesh/assets/docs/assets/js/ff4d71f2.74710fc1.js +1 -0
  202. solace_agent_mesh/assets/docs/assets/js/main.7acf7ace.js +2 -0
  203. solace_agent_mesh/assets/docs/assets/js/main.7acf7ace.js.LICENSE.txt +81 -0
  204. solace_agent_mesh/assets/docs/assets/js/runtime~main.9e0813a2.js +1 -0
  205. solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +154 -0
  206. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/artifact-management/index.html +99 -0
  207. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/audio-tools/index.html +90 -0
  208. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/data-analysis-tools/index.html +107 -0
  209. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/embeds/index.html +166 -0
  210. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/index.html +101 -0
  211. solace_agent_mesh/assets/docs/docs/documentation/components/cli/index.html +219 -0
  212. solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +92 -0
  213. solace_agent_mesh/assets/docs/docs/documentation/components/index.html +29 -0
  214. solace_agent_mesh/assets/docs/docs/documentation/components/orchestrator/index.html +55 -0
  215. solace_agent_mesh/assets/docs/docs/documentation/components/plugins/index.html +110 -0
  216. solace_agent_mesh/assets/docs/docs/documentation/components/projects/index.html +182 -0
  217. solace_agent_mesh/assets/docs/docs/documentation/components/prompts/index.html +147 -0
  218. solace_agent_mesh/assets/docs/docs/documentation/components/proxies/index.html +345 -0
  219. solace_agent_mesh/assets/docs/docs/documentation/components/speech/index.html +52 -0
  220. solace_agent_mesh/assets/docs/docs/documentation/deploying/debugging/index.html +83 -0
  221. solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +84 -0
  222. solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +25 -0
  223. solace_agent_mesh/assets/docs/docs/documentation/deploying/kubernetes-deployment/index.html +47 -0
  224. solace_agent_mesh/assets/docs/docs/documentation/deploying/logging/index.html +85 -0
  225. solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +60 -0
  226. solace_agent_mesh/assets/docs/docs/documentation/deploying/proxy_configuration/index.html +49 -0
  227. solace_agent_mesh/assets/docs/docs/documentation/developing/create-agents/index.html +144 -0
  228. solace_agent_mesh/assets/docs/docs/documentation/developing/create-gateways/index.html +191 -0
  229. solace_agent_mesh/assets/docs/docs/documentation/developing/creating-python-tools/index.html +128 -0
  230. solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +54 -0
  231. solace_agent_mesh/assets/docs/docs/documentation/developing/evaluations/index.html +135 -0
  232. solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +34 -0
  233. solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +55 -0
  234. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/bedrock-agents/index.html +267 -0
  235. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/custom-agent/index.html +142 -0
  236. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/event-mesh-gateway/index.html +116 -0
  237. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mcp-integration/index.html +86 -0
  238. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mongodb-integration/index.html +164 -0
  239. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rag-integration/index.html +140 -0
  240. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rest-gateway/index.html +57 -0
  241. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +72 -0
  242. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/sql-database/index.html +102 -0
  243. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/teams-integration/index.html +115 -0
  244. solace_agent_mesh/assets/docs/docs/documentation/enterprise/agent-builder/index.html +86 -0
  245. solace_agent_mesh/assets/docs/docs/documentation/enterprise/connectors/index.html +67 -0
  246. solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +37 -0
  247. solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +86 -0
  248. solace_agent_mesh/assets/docs/docs/documentation/enterprise/openapi-tools/index.html +324 -0
  249. solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +247 -0
  250. solace_agent_mesh/assets/docs/docs/documentation/enterprise/secure-user-delegated-access/index.html +440 -0
  251. solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +184 -0
  252. solace_agent_mesh/assets/docs/docs/documentation/enterprise/wheel-installation/index.html +62 -0
  253. solace_agent_mesh/assets/docs/docs/documentation/getting-started/architecture/index.html +75 -0
  254. solace_agent_mesh/assets/docs/docs/documentation/getting-started/index.html +54 -0
  255. solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +85 -0
  256. solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +41 -0
  257. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/artifact-storage/index.html +290 -0
  258. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/configurations/index.html +78 -0
  259. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/index.html +25 -0
  260. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/installation/index.html +78 -0
  261. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +160 -0
  262. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +142 -0
  263. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/session-storage/index.html +251 -0
  264. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/user-feedback/index.html +88 -0
  265. solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0/index.html +100 -0
  266. solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-technical-migration-map/index.html +52 -0
  267. solace_agent_mesh/assets/docs/img/Solace_AI_Framework_With_Broker.png +0 -0
  268. solace_agent_mesh/assets/docs/img/logo.png +0 -0
  269. solace_agent_mesh/assets/docs/img/sac-flows.png +0 -0
  270. solace_agent_mesh/assets/docs/img/sac_parts_of_a_component.png +0 -0
  271. solace_agent_mesh/assets/docs/img/sam-enterprise-credentials.png +0 -0
  272. solace_agent_mesh/assets/docs/img/solace-logo-text.svg +18 -0
  273. solace_agent_mesh/assets/docs/img/solace-logo.png +0 -0
  274. solace_agent_mesh/assets/docs/lunr-index-1765810064709.json +1 -0
  275. solace_agent_mesh/assets/docs/lunr-index.json +1 -0
  276. solace_agent_mesh/assets/docs/search-doc-1765810064709.json +1 -0
  277. solace_agent_mesh/assets/docs/search-doc.json +1 -0
  278. solace_agent_mesh/assets/docs/sitemap.xml +1 -0
  279. solace_agent_mesh/cli/__init__.py +1 -0
  280. solace_agent_mesh/cli/commands/__init__.py +0 -0
  281. solace_agent_mesh/cli/commands/add_cmd/__init__.py +15 -0
  282. solace_agent_mesh/cli/commands/add_cmd/add_cmd_llm.txt +250 -0
  283. solace_agent_mesh/cli/commands/add_cmd/agent_cmd.py +729 -0
  284. solace_agent_mesh/cli/commands/add_cmd/gateway_cmd.py +322 -0
  285. solace_agent_mesh/cli/commands/add_cmd/web_add_agent_step.py +102 -0
  286. solace_agent_mesh/cli/commands/add_cmd/web_add_gateway_step.py +114 -0
  287. solace_agent_mesh/cli/commands/docs_cmd.py +60 -0
  288. solace_agent_mesh/cli/commands/eval_cmd.py +46 -0
  289. solace_agent_mesh/cli/commands/init_cmd/__init__.py +439 -0
  290. solace_agent_mesh/cli/commands/init_cmd/broker_step.py +201 -0
  291. solace_agent_mesh/cli/commands/init_cmd/database_step.py +91 -0
  292. solace_agent_mesh/cli/commands/init_cmd/directory_step.py +28 -0
  293. solace_agent_mesh/cli/commands/init_cmd/env_step.py +238 -0
  294. solace_agent_mesh/cli/commands/init_cmd/init_cmd_llm.txt +365 -0
  295. solace_agent_mesh/cli/commands/init_cmd/orchestrator_step.py +464 -0
  296. solace_agent_mesh/cli/commands/init_cmd/project_files_step.py +38 -0
  297. solace_agent_mesh/cli/commands/init_cmd/web_init_step.py +119 -0
  298. solace_agent_mesh/cli/commands/init_cmd/webui_gateway_step.py +215 -0
  299. solace_agent_mesh/cli/commands/plugin_cmd/__init__.py +20 -0
  300. solace_agent_mesh/cli/commands/plugin_cmd/add_cmd.py +137 -0
  301. solace_agent_mesh/cli/commands/plugin_cmd/build_cmd.py +86 -0
  302. solace_agent_mesh/cli/commands/plugin_cmd/catalog_cmd.py +144 -0
  303. solace_agent_mesh/cli/commands/plugin_cmd/create_cmd.py +306 -0
  304. solace_agent_mesh/cli/commands/plugin_cmd/install_cmd.py +283 -0
  305. solace_agent_mesh/cli/commands/plugin_cmd/official_registry.py +175 -0
  306. solace_agent_mesh/cli/commands/plugin_cmd/plugin_cmd_llm.txt +305 -0
  307. solace_agent_mesh/cli/commands/run_cmd.py +215 -0
  308. solace_agent_mesh/cli/main.py +52 -0
  309. solace_agent_mesh/cli/utils.py +262 -0
  310. solace_agent_mesh/client/webui/frontend/static/assets/authCallback-Dj3JtK42.js +1 -0
  311. solace_agent_mesh/client/webui/frontend/static/assets/client-ZKk9kEJ5.js +25 -0
  312. solace_agent_mesh/client/webui/frontend/static/assets/favicon-BLgzUch9.ico +0 -0
  313. solace_agent_mesh/client/webui/frontend/static/assets/main-BcUaNZ-Q.css +1 -0
  314. solace_agent_mesh/client/webui/frontend/static/assets/main-vjch4RYc.js +435 -0
  315. solace_agent_mesh/client/webui/frontend/static/assets/vendor-BNV4kZN0.js +535 -0
  316. solace_agent_mesh/client/webui/frontend/static/auth-callback.html +15 -0
  317. solace_agent_mesh/client/webui/frontend/static/index.html +16 -0
  318. solace_agent_mesh/client/webui/frontend/static/mockServiceWorker.js +336 -0
  319. solace_agent_mesh/client/webui/frontend/static/ui-version.json +6 -0
  320. solace_agent_mesh/common/__init__.py +1 -0
  321. solace_agent_mesh/common/a2a/__init__.py +241 -0
  322. solace_agent_mesh/common/a2a/a2a_llm.txt +175 -0
  323. solace_agent_mesh/common/a2a/a2a_llm_detail.txt +193 -0
  324. solace_agent_mesh/common/a2a/artifact.py +368 -0
  325. solace_agent_mesh/common/a2a/events.py +213 -0
  326. solace_agent_mesh/common/a2a/message.py +375 -0
  327. solace_agent_mesh/common/a2a/protocol.py +689 -0
  328. solace_agent_mesh/common/a2a/task.py +127 -0
  329. solace_agent_mesh/common/a2a/translation.py +655 -0
  330. solace_agent_mesh/common/a2a/types.py +55 -0
  331. solace_agent_mesh/common/a2a_spec/a2a.json +2576 -0
  332. solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +445 -0
  333. solace_agent_mesh/common/a2a_spec/a2a_spec_llm_detail.txt +736 -0
  334. solace_agent_mesh/common/a2a_spec/schemas/agent_progress_update.json +18 -0
  335. solace_agent_mesh/common/a2a_spec/schemas/artifact_creation_progress.json +48 -0
  336. solace_agent_mesh/common/a2a_spec/schemas/feedback_event.json +51 -0
  337. solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json +41 -0
  338. solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +330 -0
  339. solace_agent_mesh/common/a2a_spec/schemas/tool_invocation_start.json +26 -0
  340. solace_agent_mesh/common/a2a_spec/schemas/tool_result.json +48 -0
  341. solace_agent_mesh/common/agent_registry.py +122 -0
  342. solace_agent_mesh/common/common_llm.txt +230 -0
  343. solace_agent_mesh/common/common_llm_detail.txt +2562 -0
  344. solace_agent_mesh/common/constants.py +6 -0
  345. solace_agent_mesh/common/data_parts.py +150 -0
  346. solace_agent_mesh/common/exceptions.py +49 -0
  347. solace_agent_mesh/common/middleware/__init__.py +12 -0
  348. solace_agent_mesh/common/middleware/config_resolver.py +132 -0
  349. solace_agent_mesh/common/middleware/middleware_llm.txt +174 -0
  350. solace_agent_mesh/common/middleware/middleware_llm_detail.txt +185 -0
  351. solace_agent_mesh/common/middleware/registry.py +127 -0
  352. solace_agent_mesh/common/oauth/__init__.py +17 -0
  353. solace_agent_mesh/common/oauth/oauth_client.py +408 -0
  354. solace_agent_mesh/common/oauth/utils.py +50 -0
  355. solace_agent_mesh/common/sac/__init__.py +0 -0
  356. solace_agent_mesh/common/sac/sac_llm.txt +71 -0
  357. solace_agent_mesh/common/sac/sac_llm_detail.txt +82 -0
  358. solace_agent_mesh/common/sac/sam_component_base.py +730 -0
  359. solace_agent_mesh/common/sam_events/__init__.py +9 -0
  360. solace_agent_mesh/common/sam_events/event_service.py +208 -0
  361. solace_agent_mesh/common/sam_events/sam_events_llm.txt +104 -0
  362. solace_agent_mesh/common/sam_events/sam_events_llm_detail.txt +115 -0
  363. solace_agent_mesh/common/services/__init__.py +4 -0
  364. solace_agent_mesh/common/services/employee_service.py +164 -0
  365. solace_agent_mesh/common/services/identity_service.py +134 -0
  366. solace_agent_mesh/common/services/providers/__init__.py +4 -0
  367. solace_agent_mesh/common/services/providers/local_file_identity_service.py +151 -0
  368. solace_agent_mesh/common/services/providers/providers_llm.txt +81 -0
  369. solace_agent_mesh/common/services/services_llm.txt +368 -0
  370. solace_agent_mesh/common/services/services_llm_detail.txt +459 -0
  371. solace_agent_mesh/common/utils/__init__.py +7 -0
  372. solace_agent_mesh/common/utils/artifact_utils.py +31 -0
  373. solace_agent_mesh/common/utils/asyncio_macos_fix.py +88 -0
  374. solace_agent_mesh/common/utils/embeds/__init__.py +33 -0
  375. solace_agent_mesh/common/utils/embeds/constants.py +56 -0
  376. solace_agent_mesh/common/utils/embeds/converter.py +447 -0
  377. solace_agent_mesh/common/utils/embeds/embeds_llm.txt +220 -0
  378. solace_agent_mesh/common/utils/embeds/evaluators.py +395 -0
  379. solace_agent_mesh/common/utils/embeds/modifiers.py +793 -0
  380. solace_agent_mesh/common/utils/embeds/resolver.py +967 -0
  381. solace_agent_mesh/common/utils/embeds/types.py +23 -0
  382. solace_agent_mesh/common/utils/in_memory_cache.py +108 -0
  383. solace_agent_mesh/common/utils/initializer.py +52 -0
  384. solace_agent_mesh/common/utils/log_formatters.py +64 -0
  385. solace_agent_mesh/common/utils/message_utils.py +80 -0
  386. solace_agent_mesh/common/utils/mime_helpers.py +172 -0
  387. solace_agent_mesh/common/utils/push_notification_auth.py +135 -0
  388. solace_agent_mesh/common/utils/pydantic_utils.py +159 -0
  389. solace_agent_mesh/common/utils/rbac_utils.py +69 -0
  390. solace_agent_mesh/common/utils/templates/__init__.py +8 -0
  391. solace_agent_mesh/common/utils/templates/liquid_renderer.py +210 -0
  392. solace_agent_mesh/common/utils/templates/template_resolver.py +161 -0
  393. solace_agent_mesh/common/utils/type_utils.py +28 -0
  394. solace_agent_mesh/common/utils/utils_llm.txt +335 -0
  395. solace_agent_mesh/common/utils/utils_llm_detail.txt +572 -0
  396. solace_agent_mesh/config_portal/__init__.py +0 -0
  397. solace_agent_mesh/config_portal/backend/__init__.py +0 -0
  398. solace_agent_mesh/config_portal/backend/common.py +77 -0
  399. solace_agent_mesh/config_portal/backend/plugin_catalog/__init__.py +0 -0
  400. solace_agent_mesh/config_portal/backend/plugin_catalog/constants.py +24 -0
  401. solace_agent_mesh/config_portal/backend/plugin_catalog/models.py +49 -0
  402. solace_agent_mesh/config_portal/backend/plugin_catalog/registry_manager.py +166 -0
  403. solace_agent_mesh/config_portal/backend/plugin_catalog/scraper.py +521 -0
  404. solace_agent_mesh/config_portal/backend/plugin_catalog_server.py +217 -0
  405. solace_agent_mesh/config_portal/backend/server.py +644 -0
  406. solace_agent_mesh/config_portal/frontend/static/client/Solace_community_logo.png +0 -0
  407. solace_agent_mesh/config_portal/frontend/static/client/assets/_index-DiOiAjzL.js +103 -0
  408. solace_agent_mesh/config_portal/frontend/static/client/assets/components-Rk0n-9cK.js +140 -0
  409. solace_agent_mesh/config_portal/frontend/static/client/assets/entry.client-mvZjNKiz.js +19 -0
  410. solace_agent_mesh/config_portal/frontend/static/client/assets/index-DzNKzXrc.js +68 -0
  411. solace_agent_mesh/config_portal/frontend/static/client/assets/manifest-ba77705e.js +1 -0
  412. solace_agent_mesh/config_portal/frontend/static/client/assets/root-B17tZKK7.css +1 -0
  413. solace_agent_mesh/config_portal/frontend/static/client/assets/root-V2BeTIUc.js +10 -0
  414. solace_agent_mesh/config_portal/frontend/static/client/favicon.ico +0 -0
  415. solace_agent_mesh/config_portal/frontend/static/client/index.html +7 -0
  416. solace_agent_mesh/core_a2a/__init__.py +1 -0
  417. solace_agent_mesh/core_a2a/core_a2a_llm.txt +90 -0
  418. solace_agent_mesh/core_a2a/core_a2a_llm_detail.txt +101 -0
  419. solace_agent_mesh/core_a2a/service.py +307 -0
  420. solace_agent_mesh/evaluation/__init__.py +0 -0
  421. solace_agent_mesh/evaluation/evaluator.py +691 -0
  422. solace_agent_mesh/evaluation/message_organizer.py +553 -0
  423. solace_agent_mesh/evaluation/report/benchmark_info.html +35 -0
  424. solace_agent_mesh/evaluation/report/chart_section.html +141 -0
  425. solace_agent_mesh/evaluation/report/detailed_breakdown.html +28 -0
  426. solace_agent_mesh/evaluation/report/modal.html +59 -0
  427. solace_agent_mesh/evaluation/report/modal_chart_functions.js +411 -0
  428. solace_agent_mesh/evaluation/report/modal_script.js +296 -0
  429. solace_agent_mesh/evaluation/report/modal_styles.css +340 -0
  430. solace_agent_mesh/evaluation/report/performance_metrics_styles.css +93 -0
  431. solace_agent_mesh/evaluation/report/templates/footer.html +2 -0
  432. solace_agent_mesh/evaluation/report/templates/header.html +340 -0
  433. solace_agent_mesh/evaluation/report_data_processor.py +970 -0
  434. solace_agent_mesh/evaluation/report_generator.py +607 -0
  435. solace_agent_mesh/evaluation/run.py +954 -0
  436. solace_agent_mesh/evaluation/shared/__init__.py +92 -0
  437. solace_agent_mesh/evaluation/shared/constants.py +47 -0
  438. solace_agent_mesh/evaluation/shared/exceptions.py +50 -0
  439. solace_agent_mesh/evaluation/shared/helpers.py +35 -0
  440. solace_agent_mesh/evaluation/shared/test_case_loader.py +167 -0
  441. solace_agent_mesh/evaluation/shared/test_suite_loader.py +280 -0
  442. solace_agent_mesh/evaluation/subscriber.py +776 -0
  443. solace_agent_mesh/evaluation/summary_builder.py +880 -0
  444. solace_agent_mesh/gateway/__init__.py +0 -0
  445. solace_agent_mesh/gateway/adapter/__init__.py +1 -0
  446. solace_agent_mesh/gateway/adapter/base.py +143 -0
  447. solace_agent_mesh/gateway/adapter/types.py +221 -0
  448. solace_agent_mesh/gateway/base/__init__.py +1 -0
  449. solace_agent_mesh/gateway/base/app.py +345 -0
  450. solace_agent_mesh/gateway/base/base_llm.txt +226 -0
  451. solace_agent_mesh/gateway/base/base_llm_detail.txt +235 -0
  452. solace_agent_mesh/gateway/base/component.py +2030 -0
  453. solace_agent_mesh/gateway/base/task_context.py +75 -0
  454. solace_agent_mesh/gateway/gateway_llm.txt +369 -0
  455. solace_agent_mesh/gateway/gateway_llm_detail.txt +3885 -0
  456. solace_agent_mesh/gateway/generic/__init__.py +1 -0
  457. solace_agent_mesh/gateway/generic/app.py +50 -0
  458. solace_agent_mesh/gateway/generic/component.py +727 -0
  459. solace_agent_mesh/gateway/http_sse/__init__.py +0 -0
  460. solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +345 -0
  461. solace_agent_mesh/gateway/http_sse/alembic/env.py +87 -0
  462. solace_agent_mesh/gateway/http_sse/alembic/script.py.mako +28 -0
  463. solace_agent_mesh/gateway/http_sse/alembic/versions/20250910_d5b3f8f2e9a0_create_initial_database.py +58 -0
  464. solace_agent_mesh/gateway/http_sse/alembic/versions/20250911_b1c2d3e4f5g6_add_database_indexes.py +83 -0
  465. solace_agent_mesh/gateway/http_sse/alembic/versions/20250916_f6e7d8c9b0a1_convert_timestamps_to_epoch_and_align_columns.py +412 -0
  466. solace_agent_mesh/gateway/http_sse/alembic/versions/20251006_98882922fa59_add_tasks_events_feedback_chat_tasks.py +190 -0
  467. solace_agent_mesh/gateway/http_sse/alembic/versions/20251015_add_session_performance_indexes.py +70 -0
  468. solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_project_users_table.py +72 -0
  469. solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_soft_delete_and_search.py +109 -0
  470. solace_agent_mesh/gateway/http_sse/alembic/versions/20251024_add_default_agent_to_projects.py +26 -0
  471. solace_agent_mesh/gateway/http_sse/alembic/versions/20251024_add_projects_table.py +135 -0
  472. solace_agent_mesh/gateway/http_sse/alembic/versions/20251108_create_prompt_tables_with_sharing.py +154 -0
  473. solace_agent_mesh/gateway/http_sse/alembic/versions/20251115_add_parent_task_id.py +32 -0
  474. solace_agent_mesh/gateway/http_sse/alembic/versions/20251126_add_background_task_fields.py +47 -0
  475. solace_agent_mesh/gateway/http_sse/alembic/versions/20251202_add_versioned_fields_to_prompts.py +52 -0
  476. solace_agent_mesh/gateway/http_sse/alembic/versions/versions_llm.txt +161 -0
  477. solace_agent_mesh/gateway/http_sse/alembic.ini +109 -0
  478. solace_agent_mesh/gateway/http_sse/app.py +351 -0
  479. solace_agent_mesh/gateway/http_sse/component.py +2360 -0
  480. solace_agent_mesh/gateway/http_sse/components/__init__.py +7 -0
  481. solace_agent_mesh/gateway/http_sse/components/components_llm.txt +105 -0
  482. solace_agent_mesh/gateway/http_sse/components/task_logger_forwarder.py +109 -0
  483. solace_agent_mesh/gateway/http_sse/components/visualization_forwarder_component.py +110 -0
  484. solace_agent_mesh/gateway/http_sse/dependencies.py +653 -0
  485. solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +299 -0
  486. solace_agent_mesh/gateway/http_sse/http_sse_llm_detail.txt +3278 -0
  487. solace_agent_mesh/gateway/http_sse/main.py +789 -0
  488. solace_agent_mesh/gateway/http_sse/repository/__init__.py +46 -0
  489. solace_agent_mesh/gateway/http_sse/repository/chat_task_repository.py +102 -0
  490. solace_agent_mesh/gateway/http_sse/repository/entities/__init__.py +11 -0
  491. solace_agent_mesh/gateway/http_sse/repository/entities/chat_task.py +75 -0
  492. solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +221 -0
  493. solace_agent_mesh/gateway/http_sse/repository/entities/feedback.py +20 -0
  494. solace_agent_mesh/gateway/http_sse/repository/entities/project.py +81 -0
  495. solace_agent_mesh/gateway/http_sse/repository/entities/project_user.py +47 -0
  496. solace_agent_mesh/gateway/http_sse/repository/entities/session.py +66 -0
  497. solace_agent_mesh/gateway/http_sse/repository/entities/session_history.py +0 -0
  498. solace_agent_mesh/gateway/http_sse/repository/entities/task.py +32 -0
  499. solace_agent_mesh/gateway/http_sse/repository/entities/task_event.py +21 -0
  500. solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +125 -0
  501. solace_agent_mesh/gateway/http_sse/repository/interfaces.py +239 -0
  502. solace_agent_mesh/gateway/http_sse/repository/models/__init__.py +34 -0
  503. solace_agent_mesh/gateway/http_sse/repository/models/base.py +7 -0
  504. solace_agent_mesh/gateway/http_sse/repository/models/chat_task_model.py +31 -0
  505. solace_agent_mesh/gateway/http_sse/repository/models/feedback_model.py +21 -0
  506. solace_agent_mesh/gateway/http_sse/repository/models/models_llm.txt +257 -0
  507. solace_agent_mesh/gateway/http_sse/repository/models/project_model.py +51 -0
  508. solace_agent_mesh/gateway/http_sse/repository/models/project_user_model.py +75 -0
  509. solace_agent_mesh/gateway/http_sse/repository/models/prompt_model.py +159 -0
  510. solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +53 -0
  511. solace_agent_mesh/gateway/http_sse/repository/models/task_event_model.py +25 -0
  512. solace_agent_mesh/gateway/http_sse/repository/models/task_model.py +39 -0
  513. solace_agent_mesh/gateway/http_sse/repository/project_repository.py +172 -0
  514. solace_agent_mesh/gateway/http_sse/repository/project_user_repository.py +186 -0
  515. solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +308 -0
  516. solace_agent_mesh/gateway/http_sse/repository/session_repository.py +268 -0
  517. solace_agent_mesh/gateway/http_sse/repository/task_repository.py +248 -0
  518. solace_agent_mesh/gateway/http_sse/routers/__init__.py +4 -0
  519. solace_agent_mesh/gateway/http_sse/routers/agent_cards.py +74 -0
  520. solace_agent_mesh/gateway/http_sse/routers/artifacts.py +1137 -0
  521. solace_agent_mesh/gateway/http_sse/routers/auth.py +311 -0
  522. solace_agent_mesh/gateway/http_sse/routers/config.py +371 -0
  523. solace_agent_mesh/gateway/http_sse/routers/dto/__init__.py +10 -0
  524. solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +450 -0
  525. solace_agent_mesh/gateway/http_sse/routers/dto/project_dto.py +69 -0
  526. solace_agent_mesh/gateway/http_sse/routers/dto/prompt_dto.py +255 -0
  527. solace_agent_mesh/gateway/http_sse/routers/dto/requests/__init__.py +15 -0
  528. solace_agent_mesh/gateway/http_sse/routers/dto/requests/project_requests.py +48 -0
  529. solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +133 -0
  530. solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +33 -0
  531. solace_agent_mesh/gateway/http_sse/routers/dto/requests/task_requests.py +58 -0
  532. solace_agent_mesh/gateway/http_sse/routers/dto/responses/__init__.py +18 -0
  533. solace_agent_mesh/gateway/http_sse/routers/dto/responses/base_responses.py +42 -0
  534. solace_agent_mesh/gateway/http_sse/routers/dto/responses/project_responses.py +31 -0
  535. solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +123 -0
  536. solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +33 -0
  537. solace_agent_mesh/gateway/http_sse/routers/dto/responses/task_responses.py +30 -0
  538. solace_agent_mesh/gateway/http_sse/routers/dto/responses/version_responses.py +31 -0
  539. solace_agent_mesh/gateway/http_sse/routers/feedback.py +168 -0
  540. solace_agent_mesh/gateway/http_sse/routers/people.py +38 -0
  541. solace_agent_mesh/gateway/http_sse/routers/projects.py +767 -0
  542. solace_agent_mesh/gateway/http_sse/routers/prompts.py +1415 -0
  543. solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +312 -0
  544. solace_agent_mesh/gateway/http_sse/routers/sessions.py +634 -0
  545. solace_agent_mesh/gateway/http_sse/routers/speech.py +355 -0
  546. solace_agent_mesh/gateway/http_sse/routers/sse.py +230 -0
  547. solace_agent_mesh/gateway/http_sse/routers/tasks.py +1089 -0
  548. solace_agent_mesh/gateway/http_sse/routers/users.py +83 -0
  549. solace_agent_mesh/gateway/http_sse/routers/version.py +343 -0
  550. solace_agent_mesh/gateway/http_sse/routers/visualization.py +1220 -0
  551. solace_agent_mesh/gateway/http_sse/services/__init__.py +4 -0
  552. solace_agent_mesh/gateway/http_sse/services/agent_card_service.py +71 -0
  553. solace_agent_mesh/gateway/http_sse/services/audio_service.py +1227 -0
  554. solace_agent_mesh/gateway/http_sse/services/background_task_monitor.py +186 -0
  555. solace_agent_mesh/gateway/http_sse/services/data_retention_service.py +273 -0
  556. solace_agent_mesh/gateway/http_sse/services/feedback_service.py +250 -0
  557. solace_agent_mesh/gateway/http_sse/services/people_service.py +78 -0
  558. solace_agent_mesh/gateway/http_sse/services/project_service.py +930 -0
  559. solace_agent_mesh/gateway/http_sse/services/prompt_builder_assistant.py +303 -0
  560. solace_agent_mesh/gateway/http_sse/services/services_llm.txt +303 -0
  561. solace_agent_mesh/gateway/http_sse/services/session_service.py +702 -0
  562. solace_agent_mesh/gateway/http_sse/services/task_logger_service.py +593 -0
  563. solace_agent_mesh/gateway/http_sse/services/task_service.py +119 -0
  564. solace_agent_mesh/gateway/http_sse/session_manager.py +219 -0
  565. solace_agent_mesh/gateway/http_sse/shared/__init__.py +146 -0
  566. solace_agent_mesh/gateway/http_sse/shared/auth_utils.py +29 -0
  567. solace_agent_mesh/gateway/http_sse/shared/base_repository.py +252 -0
  568. solace_agent_mesh/gateway/http_sse/shared/database_exceptions.py +274 -0
  569. solace_agent_mesh/gateway/http_sse/shared/database_helpers.py +43 -0
  570. solace_agent_mesh/gateway/http_sse/shared/enums.py +40 -0
  571. solace_agent_mesh/gateway/http_sse/shared/error_dto.py +107 -0
  572. solace_agent_mesh/gateway/http_sse/shared/exception_handlers.py +217 -0
  573. solace_agent_mesh/gateway/http_sse/shared/exceptions.py +192 -0
  574. solace_agent_mesh/gateway/http_sse/shared/pagination.py +138 -0
  575. solace_agent_mesh/gateway/http_sse/shared/response_utils.py +134 -0
  576. solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +319 -0
  577. solace_agent_mesh/gateway/http_sse/shared/timestamp_utils.py +97 -0
  578. solace_agent_mesh/gateway/http_sse/shared/types.py +50 -0
  579. solace_agent_mesh/gateway/http_sse/shared/utils.py +22 -0
  580. solace_agent_mesh/gateway/http_sse/sse_event_buffer.py +88 -0
  581. solace_agent_mesh/gateway/http_sse/sse_manager.py +491 -0
  582. solace_agent_mesh/gateway/http_sse/utils/__init__.py +1 -0
  583. solace_agent_mesh/gateway/http_sse/utils/artifact_copy_utils.py +370 -0
  584. solace_agent_mesh/gateway/http_sse/utils/stim_utils.py +72 -0
  585. solace_agent_mesh/gateway/http_sse/utils/utils_llm.txt +47 -0
  586. solace_agent_mesh/llm.txt +228 -0
  587. solace_agent_mesh/llm_detail.txt +2835 -0
  588. solace_agent_mesh/services/__init__.py +0 -0
  589. solace_agent_mesh/services/platform/__init__.py +18 -0
  590. solace_agent_mesh/services/platform/alembic/env.py +85 -0
  591. solace_agent_mesh/services/platform/alembic/script.py.mako +28 -0
  592. solace_agent_mesh/services/platform/alembic.ini +109 -0
  593. solace_agent_mesh/services/platform/api/__init__.py +3 -0
  594. solace_agent_mesh/services/platform/api/dependencies.py +147 -0
  595. solace_agent_mesh/services/platform/api/main.py +280 -0
  596. solace_agent_mesh/services/platform/api/middleware.py +51 -0
  597. solace_agent_mesh/services/platform/api/routers/__init__.py +24 -0
  598. solace_agent_mesh/services/platform/app.py +114 -0
  599. solace_agent_mesh/services/platform/component.py +235 -0
  600. solace_agent_mesh/solace_agent_mesh_llm.txt +362 -0
  601. solace_agent_mesh/solace_agent_mesh_llm_detail.txt +8599 -0
  602. solace_agent_mesh/templates/agent_template.yaml +53 -0
  603. solace_agent_mesh/templates/eval_backend_template.yaml +54 -0
  604. solace_agent_mesh/templates/gateway_app_template.py +75 -0
  605. solace_agent_mesh/templates/gateway_component_template.py +484 -0
  606. solace_agent_mesh/templates/gateway_config_template.yaml +38 -0
  607. solace_agent_mesh/templates/logging_config_template.yaml +48 -0
  608. solace_agent_mesh/templates/main_orchestrator.yaml +66 -0
  609. solace_agent_mesh/templates/plugin_agent_config_template.yaml +122 -0
  610. solace_agent_mesh/templates/plugin_custom_config_template.yaml +27 -0
  611. solace_agent_mesh/templates/plugin_custom_template.py +10 -0
  612. solace_agent_mesh/templates/plugin_gateway_config_template.yaml +60 -0
  613. solace_agent_mesh/templates/plugin_pyproject_template.toml +32 -0
  614. solace_agent_mesh/templates/plugin_readme_template.md +12 -0
  615. solace_agent_mesh/templates/plugin_tool_config_template.yaml +109 -0
  616. solace_agent_mesh/templates/plugin_tools_template.py +224 -0
  617. solace_agent_mesh/templates/shared_config.yaml +112 -0
  618. solace_agent_mesh/templates/templates_llm.txt +147 -0
  619. solace_agent_mesh/templates/webui.yaml +177 -0
  620. solace_agent_mesh-1.11.2.dist-info/METADATA +504 -0
  621. solace_agent_mesh-1.11.2.dist-info/RECORD +624 -0
  622. solace_agent_mesh-1.11.2.dist-info/WHEEL +4 -0
  623. solace_agent_mesh-1.11.2.dist-info/entry_points.txt +3 -0
  624. solace_agent_mesh-1.11.2.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Wait for document loaded before starting the execution
3
+ */
4
+
5
+ /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
6
+
7
+ /*! Bundled license information:
8
+
9
+ js-yaml/dist/js-yaml.mjs:
10
+ (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
11
+ */
12
+
13
+ /*! Check if previously processed */
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[2334],{2334:(e,n,t)=>{t.d(n,{Zp:()=>Rn});var r=t(8058),o=t(8894),i=0;const u=function(e){var n=++i;return(0,o.A)(e)+n};var a=t(9142),s=t(4098),d=t(4722),c=Math.ceil,h=Math.max;const f=function(e,n,t,r){for(var o=-1,i=h(c((n-e)/(t||1)),0),u=Array(i);i--;)u[r?i:++o]=e,e+=t;return u};var v=t(6832),l=t(4342);const g=function(e){return function(n,t,r){return r&&"number"!=typeof r&&(0,v.A)(n,t,r)&&(t=r=void 0),n=(0,l.A)(n),void 0===t?(t=n,n=0):t=(0,l.A)(t),r=void 0===r?n<t?1:-1:(0,l.A)(r),f(n,t,r,e)}}();var p=t(697);class A{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,n=e._prev;if(n!==e)return w(n),n}enqueue(e){var n=this._sentinel;e._prev&&e._next&&w(e),e._next=n._next,n._next._prev=e,n._next=e,e._prev=n}toString(){for(var e=[],n=this._sentinel,t=n._prev;t!==n;)e.push(JSON.stringify(t,b)),t=t._prev;return"["+e.join(", ")+"]"}}function w(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function b(e,n){if("_next"!==e&&"_prev"!==e)return n}var m=a.A(1);function y(e,n){if(e.nodeCount()<=1)return[];var t=function(e,n){var t=new p.T,o=0,i=0;r.A(e.nodes(),(function(e){t.setNode(e,{v:e,in:0,out:0})})),r.A(e.edges(),(function(e){var r=t.edge(e.v,e.w)||0,u=n(e),a=r+u;t.setEdge(e.v,e.w,a),i=Math.max(i,t.node(e.v).out+=u),o=Math.max(o,t.node(e.w).in+=u)}));var u=g(i+o+3).map((function(){return new A})),a=o+1;return r.A(t.nodes(),(function(e){E(u,a,t.node(e))})),{graph:t,buckets:u,zeroIdx:a}}(e,n||m),o=function(e,n,t){var r,o=[],i=n[n.length-1],u=n[0];for(;e.nodeCount();){for(;r=u.dequeue();)_(e,n,t,r);for(;r=i.dequeue();)_(e,n,t,r);if(e.nodeCount())for(var a=n.length-2;a>0;--a)if(r=n[a].dequeue()){o=o.concat(_(e,n,t,r,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return s.A(d.A(o,(function(n){return e.outEdges(n.v,n.w)})))}function _(e,n,t,o,i){var u=i?[]:void 0;return r.A(e.inEdges(o.v),(function(r){var o=e.edge(r),a=e.node(r.v);i&&u.push({v:r.v,w:r.w}),a.out-=o,E(n,t,a)})),r.A(e.outEdges(o.v),(function(r){var o=e.edge(r),i=r.w,u=e.node(i);u.in-=o,E(n,t,u)})),e.removeNode(o.v),u}function E(e,n,t){t.out?t.in?e[t.out-t.in+n].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}function x(e){var n="greedy"===e.graph().acyclicer?y(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],t={},o={};function i(u){Object.prototype.hasOwnProperty.call(o,u)||(o[u]=!0,t[u]=!0,r.A(e.outEdges(u),(function(e){Object.prototype.hasOwnProperty.call(t,e.w)?n.push(e):i(e.w)})),delete t[u])}return r.A(e.nodes(),i),n}(e);r.A(n,(function(n){var t=e.edge(n);e.removeEdge(n),t.forwardName=n.name,t.reversed=!0,e.setEdge(n.w,n.v,t,u("rev"))}))}var O=t(2837),k=t(9354),N=t(9188);const P=function(e,n){return(0,k.A)(e,n,(function(n,t){return(0,N.A)(e,t)}))};var j=t(6875),C=t(7525);const I=function(e){return(0,C.A)((0,j.A)(e,void 0,s.A),e+"")}((function(e,n){return null==e?{}:P(e,n)}));var L=t(3068),T=t(2559);const M=function(e,n){return e>n};var R=t(9008);const F=function(e){return e&&e.length?(0,T.A)(e,R.A,M):void 0};var D=t(6666),S=t(2528),G=t(9841),V=t(3958);const B=function(e,n){var t={};return n=(0,V.A)(n,3),(0,G.A)(e,(function(e,r,o){(0,S.A)(t,r,n(e,r,o))})),t};var q=t(9592),Y=t(6452),z=t(8585),$=t(1917);const J=function(){return $.A.Date.now()};function Z(e,n,t,r){var o;do{o=u(r)}while(e.hasNode(o));return t.dummy=n,e.setNode(o,t),o}function H(e){var n=new p.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.A(e.nodes(),(function(t){e.children(t).length||n.setNode(t,e.node(t))})),r.A(e.edges(),(function(t){n.setEdge(t,e.edge(t))})),n}function K(e,n){var t,r,o=e.x,i=e.y,u=n.x-o,a=n.y-i,s=e.width/2,d=e.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*s>Math.abs(u)*d?(a<0&&(d=-d),t=d*u/a,r=d):(u<0&&(s=-s),t=s,r=s*a/u),{x:o+t,y:i+r}}function Q(e){var n=d.A(g(W(e)+1),(function(){return[]}));return r.A(e.nodes(),(function(t){var r=e.node(t),o=r.rank;q.A(o)||(n[o][r.order]=t)})),n}function U(e,n,t,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=r),Z(e,"border",o,n)}function W(e){return F(d.A(e.nodes(),(function(n){var t=e.node(n).rank;if(!q.A(t))return t})))}function X(e,n){var t=J();try{return n()}finally{console.log(e+" time: "+(J()-t)+"ms")}}function ee(e,n){return n()}function ne(e,n,t,r,o,i){var u={width:0,height:0,rank:i,borderType:n},a=o[n][i-1],s=Z(e,"border",u,t);o[n][i]=s,e.setParent(s,r),a&&e.setEdge(a,s,{weight:1})}function te(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){r.A(e.nodes(),(function(n){ie(e.node(n))})),r.A(e.edges(),(function(n){var t=e.edge(n);r.A(t.points,ie),Object.prototype.hasOwnProperty.call(t,"y")&&ie(t)}))}(e),"lr"!==n&&"rl"!==n||(!function(e){r.A(e.nodes(),(function(n){ue(e.node(n))})),r.A(e.edges(),(function(n){var t=e.edge(n);r.A(t.points,ue),Object.prototype.hasOwnProperty.call(t,"x")&&ue(t)}))}(e),re(e))}function re(e){r.A(e.nodes(),(function(n){oe(e.node(n))})),r.A(e.edges(),(function(n){oe(e.edge(n))}))}function oe(e){var n=e.width;e.width=e.height,e.height=n}function ie(e){e.y=-e.y}function ue(e){var n=e.x;e.x=e.y,e.y=n}function ae(e){e.graph().dummyChains=[],r.A(e.edges(),(function(n){!function(e,n){var t=n.v,r=e.node(t).rank,o=n.w,i=e.node(o).rank,u=n.name,a=e.edge(n),s=a.labelRank;if(i===r+1)return;e.removeEdge(n);var d,c,h=void 0;for(c=0,++r;r<i;++c,++r)a.points=[],d=Z(e,"edge",h={width:0,height:0,edgeLabel:a,edgeObj:n,rank:r},"_d"),r===s&&(h.width=a.width,h.height=a.height,h.dummy="edge-label",h.labelpos=a.labelpos),e.setEdge(t,d,{weight:a.weight},u),0===c&&e.graph().dummyChains.push(d),t=d;e.setEdge(t,o,{weight:a.weight},u)}(e,n)}))}var se=t(6224);const de=function(e,n){return e&&e.length?(0,T.A)(e,(0,V.A)(n,2),se.A):void 0};function ce(e){var n={};r.A(e.sources(),(function t(r){var o=e.node(r);if(Object.prototype.hasOwnProperty.call(n,r))return o.rank;n[r]=!0;var i=Y.A(d.A(e.outEdges(r),(function(n){return t(n.w)-e.edge(n).minlen})));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),o.rank=i}))}function he(e,n){return e.node(n.w).rank-e.node(n.v).rank-e.edge(n).minlen}function fe(e){var n,t,r=new p.T({directed:!1}),o=e.nodes()[0],i=e.nodeCount();for(r.setNode(o,{});ve(r,e)<i;)n=le(r,e),t=r.hasNode(n.v)?he(e,n):-he(e,n),ge(r,e,t);return r}function ve(e,n){return r.A(e.nodes(),(function t(o){r.A(n.nodeEdges(o),(function(r){var i=r.v,u=o===i?r.w:i;e.hasNode(u)||he(n,r)||(e.setNode(u,{}),e.setEdge(o,u,{}),t(u))}))})),e.nodeCount()}function le(e,n){return de(n.edges(),(function(t){if(e.hasNode(t.v)!==e.hasNode(t.w))return he(n,t)}))}function ge(e,n,t){r.A(e.nodes(),(function(e){n.node(e).rank+=t}))}var pe=t(6145),Ae=t(4092);a.A(1);a.A(1);t(1852),t(9779),t(8446),t(9703);(0,t(805).A)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var we="\\ud800-\\udfff",be="["+we+"]",me="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ye="\\ud83c[\\udffb-\\udfff]",_e="[^"+we+"]",Ee="(?:\\ud83c[\\udde6-\\uddff]){2}",xe="[\\ud800-\\udbff][\\udc00-\\udfff]",Oe="(?:"+me+"|"+ye+")"+"?",ke="[\\ufe0e\\ufe0f]?",Ne=ke+Oe+("(?:\\u200d(?:"+[_e,Ee,xe].join("|")+")"+ke+Oe+")*"),Pe="(?:"+[_e+me+"?",me,Ee,xe,be].join("|")+")";RegExp(ye+"(?="+ye+")|"+Pe+Ne,"g");function je(){}je.prototype=new Error;var Ce=t(2049);function Ie(e,n,t){Ce.A(n)||(n=[n]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],u={};return r.A(n,(function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);Le(e,n,"post"===t,u,o,i)})),i}function Le(e,n,t,o,i,u){Object.prototype.hasOwnProperty.call(o,n)||(o[n]=!0,t||u.push(n),r.A(i(n),(function(n){Le(e,n,t,o,i,u)})),t&&u.push(n))}t(7981);function Te(e){e=function(e){var n=(new p.T).setGraph(e.graph());return r.A(e.nodes(),(function(t){n.setNode(t,e.node(t))})),r.A(e.edges(),(function(t){var r=n.edge(t.v,t.w)||{weight:0,minlen:1},o=e.edge(t);n.setEdge(t.v,t.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),n}(e),ce(e);var n,t=fe(e);for(Fe(t),Me(t,e);n=Se(t);)Ve(t,e,n,Ge(t,e,n))}function Me(e,n){var t=function(e,n){return Ie(e,n,"post")}(e,e.nodes());t=t.slice(0,t.length-1),r.A(t,(function(t){!function(e,n,t){var r=e.node(t),o=r.parent;e.edge(t,o).cutvalue=Re(e,n,t)}(e,n,t)}))}function Re(e,n,t){var o=e.node(t).parent,i=!0,u=n.edge(t,o),a=0;return u||(i=!1,u=n.edge(o,t)),a=u.weight,r.A(n.nodeEdges(t),(function(r){var u,s,d=r.v===t,c=d?r.w:r.v;if(c!==o){var h=d===i,f=n.edge(r).weight;if(a+=h?f:-f,u=t,s=c,e.hasEdge(u,s)){var v=e.edge(t,c).cutvalue;a+=h?-v:v}}})),a}function Fe(e,n){arguments.length<2&&(n=e.nodes()[0]),De(e,{},1,n)}function De(e,n,t,o,i){var u=t,a=e.node(o);return n[o]=!0,r.A(e.neighbors(o),(function(r){Object.prototype.hasOwnProperty.call(n,r)||(t=De(e,n,t,r,o))})),a.low=u,a.lim=t++,i?a.parent=i:delete a.parent,t}function Se(e){return pe.A(e.edges(),(function(n){return e.edge(n).cutvalue<0}))}function Ge(e,n,t){var r=t.v,o=t.w;n.hasEdge(r,o)||(r=t.w,o=t.v);var i=e.node(r),u=e.node(o),a=i,s=!1;i.lim>u.lim&&(a=u,s=!0);var d=Ae.A(n.edges(),(function(n){return s===Be(e,e.node(n.v),a)&&s!==Be(e,e.node(n.w),a)}));return de(d,(function(e){return he(n,e)}))}function Ve(e,n,t,o){var i=t.v,u=t.w;e.removeEdge(i,u),e.setEdge(o.v,o.w,{}),Fe(e),Me(e,n),function(e,n){var t=pe.A(e.nodes(),(function(e){return!n.node(e).parent})),o=function(e,n){return Ie(e,n,"pre")}(e,t);o=o.slice(1),r.A(o,(function(t){var r=e.node(t).parent,o=n.edge(t,r),i=!1;o||(o=n.edge(r,t),i=!0),n.node(t).rank=n.node(r).rank+(i?o.minlen:-o.minlen)}))}(e,n)}function Be(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}function qe(e){switch(e.graph().ranker){case"network-simplex":default:ze(e);break;case"tight-tree":!function(e){ce(e),fe(e)}(e);break;case"longest-path":Ye(e)}}Te.initLowLimValues=Fe,Te.initCutValues=Me,Te.calcCutValue=Re,Te.leaveEdge=Se,Te.enterEdge=Ge,Te.exchangeEdges=Ve;var Ye=ce;function ze(e){Te(e)}var $e=t(8207),Je=t(9463);function Ze(e){var n=Z(e,"root",{},"_root"),t=function(e){var n={};function t(o,i){var u=e.children(o);u&&u.length&&r.A(u,(function(e){t(e,i+1)})),n[o]=i}return r.A(e.children(),(function(e){t(e,1)})),n}(e),o=F($e.A(t))-1,i=2*o+1;e.graph().nestingRoot=n,r.A(e.edges(),(function(n){e.edge(n).minlen*=i}));var u=function(e){return Je.A(e.edges(),(function(n,t){return n+e.edge(t).weight}),0)}(e)+1;r.A(e.children(),(function(r){He(e,n,i,u,o,t,r)})),e.graph().nodeRankFactor=i}function He(e,n,t,o,i,u,a){var s=e.children(a);if(s.length){var d=U(e,"_bt"),c=U(e,"_bb"),h=e.node(a);e.setParent(d,a),h.borderTop=d,e.setParent(c,a),h.borderBottom=c,r.A(s,(function(r){He(e,n,t,o,i,u,r);var s=e.node(r),h=s.borderTop?s.borderTop:r,f=s.borderBottom?s.borderBottom:r,v=s.borderTop?o:2*o,l=h!==f?1:i-u[a]+1;e.setEdge(d,h,{weight:v,minlen:l,nestingEdge:!0}),e.setEdge(f,c,{weight:v,minlen:l,nestingEdge:!0})})),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+u[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:t})}var Ke=t(8675);const Qe=function(e){return(0,Ke.A)(e,5)};function Ue(e,n,t){var o=function(e){var n;for(;e.hasNode(n=u("_root")););return n}(e),i=new p.T({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(n){return e.node(n)}));return r.A(e.nodes(),(function(u){var a=e.node(u),s=e.parent(u);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(u),i.setParent(u,s||o),r.A(e[t](u),(function(n){var t=n.v===u?n.w:n.v,r=i.edge(t,u),o=q.A(r)?0:r.weight;i.setEdge(t,u,{weight:e.edge(n).weight+o})})),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(u,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))})),i}var We=t(2851);const Xe=function(e,n,t){for(var r=-1,o=e.length,i=n.length,u={};++r<o;){var a=r<i?n[r]:void 0;t(u,e[r],a)}return u};const en=function(e,n){return Xe(e||[],n||[],We.A)};var nn=t(3588),tn=t(5572),rn=t(6318),on=t(2568);const un=function(e,n){var t=e.length;for(e.sort(n);t--;)e[t]=e[t].value;return e};var an=t(2789),sn=t(1882);const dn=function(e,n){if(e!==n){var t=void 0!==e,r=null===e,o=e==e,i=(0,sn.A)(e),u=void 0!==n,a=null===n,s=n==n,d=(0,sn.A)(n);if(!a&&!d&&!i&&e>n||i&&u&&s&&!a&&!d||r&&u&&s||!t&&s||!o)return 1;if(!r&&!i&&!d&&e<n||d&&t&&o&&!r&&!i||a&&t&&o||!u&&o||!s)return-1}return 0};const cn=function(e,n,t){for(var r=-1,o=e.criteria,i=n.criteria,u=o.length,a=t.length;++r<u;){var s=dn(o[r],i[r]);if(s)return r>=a?s:s*("desc"==t[r]?-1:1)}return e.index-n.index};const hn=function(e,n,t){n=n.length?(0,tn.A)(n,(function(e){return(0,Ce.A)(e)?function(n){return(0,rn.A)(n,1===e.length?e[0]:e)}:e})):[R.A];var r=-1;n=(0,tn.A)(n,(0,an.A)(V.A));var o=(0,on.A)(e,(function(e,t,o){return{criteria:(0,tn.A)(n,(function(n){return n(e)})),index:++r,value:e}}));return un(o,(function(e,n){return cn(e,n,t)}))};const fn=(0,t(4326).A)((function(e,n){if(null==e)return[];var t=n.length;return t>1&&(0,v.A)(e,n[0],n[1])?n=[]:t>2&&(0,v.A)(n[0],n[1],n[2])&&(n=[n[0]]),hn(e,(0,nn.A)(n,1),[])}));function vn(e,n){for(var t=0,r=1;r<n.length;++r)t+=ln(e,n[r-1],n[r]);return t}function ln(e,n,t){for(var o=en(t,d.A(t,(function(e,n){return n}))),i=s.A(d.A(n,(function(n){return fn(d.A(e.outEdges(n),(function(n){return{pos:o[n.w],weight:e.edge(n).weight}})),"pos")}))),u=1;u<t.length;)u<<=1;var a=2*u-1;u-=1;var c=d.A(new Array(a),(function(){return 0})),h=0;return r.A(i.forEach((function(e){var n=e.pos+u;c[n]+=e.weight;for(var t=0;n>0;)n%2&&(t+=c[n+1]),c[n=n-1>>1]+=e.weight;h+=e.weight*t}))),h}function gn(e,n){var t={};return r.A(e,(function(e,n){var r=t[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};q.A(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)})),r.A(n.edges(),(function(e){var n=t[e.v],r=t[e.w];q.A(n)||q.A(r)||(r.indegree++,n.out.push(t[e.w]))})),function(e){var n=[];function t(e){return function(n){n.merged||(q.A(n.barycenter)||q.A(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var t=0,r=0;e.weight&&(t+=e.barycenter*e.weight,r+=e.weight);n.weight&&(t+=n.barycenter*n.weight,r+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=t/r,e.weight=r,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function o(n){return function(t){t.in.push(n),0==--t.indegree&&e.push(t)}}for(;e.length;){var i=e.pop();n.push(i),r.A(i.in.reverse(),t(i)),r.A(i.out,o(i))}return d.A(Ae.A(n,(function(e){return!e.merged})),(function(e){return I(e,["vs","i","barycenter","weight"])}))}(Ae.A(t,(function(e){return!e.indegree})))}function pn(e,n){var t,o=function(e,n){var t={lhs:[],rhs:[]};return r.A(e,(function(e){n(e)?t.lhs.push(e):t.rhs.push(e)})),t}(e,(function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})),i=o.lhs,u=fn(o.rhs,(function(e){return-e.i})),a=[],d=0,c=0,h=0;i.sort((t=!!n,function(e,n){return e.barycenter<n.barycenter?-1:e.barycenter>n.barycenter?1:t?n.i-e.i:e.i-n.i})),h=An(a,u,h),r.A(i,(function(e){h+=e.vs.length,a.push(e.vs),d+=e.barycenter*e.weight,c+=e.weight,h=An(a,u,h)}));var f={vs:s.A(a)};return c&&(f.barycenter=d/c,f.weight=c),f}function An(e,n,t){for(var r;n.length&&(r=D.A(n)).i<=t;)n.pop(),e.push(r.vs),t++;return t}function wn(e,n,t,o){var i=e.children(n),u=e.node(n),a=u?u.borderLeft:void 0,c=u?u.borderRight:void 0,h={};a&&(i=Ae.A(i,(function(e){return e!==a&&e!==c})));var f=function(e,n){return d.A(n,(function(n){var t=e.inEdges(n);if(t.length){var r=Je.A(t,(function(n,t){var r=e.edge(t),o=e.node(t.v);return{sum:n.sum+r.weight*o.order,weight:n.weight+r.weight}}),{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}return{v:n}}))}(e,i);r.A(f,(function(n){if(e.children(n.v).length){var r=wn(e,n.v,t,o);h[n.v]=r,Object.prototype.hasOwnProperty.call(r,"barycenter")&&(i=n,u=r,q.A(i.barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u}));var v=gn(f,t);!function(e,n){r.A(e,(function(e){e.vs=s.A(e.vs.map((function(e){return n[e]?n[e].vs:e})))}))}(v,h);var l=pn(v,o);if(a&&(l.vs=s.A([a,l.vs,c]),e.predecessors(a).length)){var g=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+g.order+p.order)/(l.weight+2),l.weight+=2}return l}function bn(e){var n=W(e),t=mn(e,g(1,n+1),"inEdges"),o=mn(e,g(n-1,-1,-1),"outEdges"),i=function(e){var n={},t=Ae.A(e.nodes(),(function(n){return!e.children(n).length})),o=F(d.A(t,(function(n){return e.node(n).rank}))),i=d.A(g(o+1),(function(){return[]})),u=fn(t,(function(n){return e.node(n).rank}));return r.A(u,(function t(o){if(!z.A(n,o)){n[o]=!0;var u=e.node(o);i[u.rank].push(o),r.A(e.successors(o),t)}})),i}(e);_n(e,i);for(var u,a=Number.POSITIVE_INFINITY,s=0,c=0;c<4;++s,++c){yn(s%2?t:o,s%4>=2);var h=vn(e,i=Q(e));h<a&&(c=0,u=Qe(i),a=h)}_n(e,u)}function mn(e,n,t){return d.A(n,(function(n){return Ue(e,n,t)}))}function yn(e,n){var t=new p.T;r.A(e,(function(e){var o=e.graph().root,i=wn(e,o,t,n);r.A(i.vs,(function(n,t){e.node(n).order=t})),function(e,n,t){var o,i={};r.A(t,(function(t){for(var r,u,a=e.parent(t);a;){if((r=e.parent(a))?(u=i[r],i[r]=a):(u=o,o=a),u&&u!==a)return void n.setEdge(u,a);a=r}}))}(e,t,i.vs)}))}function _n(e,n){r.A(n,(function(n){r.A(n,(function(n,t){e.node(n).order=t}))}))}function En(e){var n=function(e){var n={},t=0;function o(i){var u=t;r.A(e.children(i),o),n[i]={low:u,lim:t++}}return r.A(e.children(),o),n}(e);r.A(e.graph().dummyChains,(function(t){for(var r=e.node(t),o=r.edgeObj,i=function(e,n,t,r){var o,i,u=[],a=[],s=Math.min(n[t].low,n[r].low),d=Math.max(n[t].lim,n[r].lim);o=t;do{o=e.parent(o),u.push(o)}while(o&&(n[o].low>s||d>n[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(e,n,o.v,o.w),u=i.path,a=i.lca,s=0,d=u[s],c=!0;t!==o.w;){if(r=e.node(t),c){for(;(d=u[s])!==a&&e.node(d).maxRank<r.rank;)s++;d===a&&(c=!1)}if(!c){for(;s<u.length-1&&e.node(d=u[s+1]).minRank<=r.rank;)s++;d=u[s]}e.setParent(t,d),t=e.successors(t)[0]}}))}var xn=t(9922);const On=function(e,n){return e&&(0,G.A)(e,(0,xn.A)(n))};var kn=t(4574),Nn=t(5615);const Pn=function(e,n){return null==e?e:(0,kn.A)(e,(0,xn.A)(n),Nn.A)};function jn(e,n){var t={};return Je.A(n,(function(n,o){var i=0,u=0,a=n.length,s=D.A(o);return r.A(o,(function(n,d){var c=function(e,n){if(e.node(n).dummy)return pe.A(e.predecessors(n),(function(n){return e.node(n).dummy}))}(e,n),h=c?e.node(c).order:a;(c||n===s)&&(r.A(o.slice(u,d+1),(function(n){r.A(e.predecessors(n),(function(r){var o=e.node(r),u=o.order;!(u<i||h<u)||o.dummy&&e.node(n).dummy||Cn(t,r,n)}))})),u=d+1,i=h)})),o})),t}function Cn(e,n,t){if(n>t){var r=n;n=t,t=r}var o=e[n];o||(e[n]=o={}),o[t]=!0}function In(e,n,t){if(n>t){var r=n;n=t,t=r}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],t)}function Ln(e,n,t,o,i){var u={},a=function(e,n,t,o){var i=new p.T,u=e.graph(),a=function(e,n,t){return function(r,o,i){var u,a=r.node(o),s=r.node(i),d=0;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2}if(u&&(d+=t?u:-u),u=0,d+=(a.dummy?n:e)/2,d+=(s.dummy?n:e)/2,d+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2}return u&&(d+=t?u:-u),u=0,d}}(u.nodesep,u.edgesep,o);return r.A(n,(function(n){var o;r.A(n,(function(n){var r=t[n];if(i.setNode(r),o){var u=t[o],s=i.edge(u,r);i.setEdge(u,r,Math.max(a(e,n,o),s||0))}o=n}))})),i}(e,n,t,i),s=i?"borderLeft":"borderRight";function d(e,n){for(var t=a.nodes(),r=t.pop(),o={};r;)o[r]?e(r):(o[r]=!0,t.push(r),t=t.concat(n(r))),r=t.pop()}return d((function(e){u[e]=a.inEdges(e).reduce((function(e,n){return Math.max(e,u[n.v]+a.edge(n))}),0)}),a.predecessors.bind(a)),d((function(n){var t=a.outEdges(n).reduce((function(e,n){return Math.min(e,u[n.w]-a.edge(n))}),Number.POSITIVE_INFINITY),r=e.node(n);t!==Number.POSITIVE_INFINITY&&r.borderType!==s&&(u[n]=Math.max(u[n],t))}),a.successors.bind(a)),r.A(o,(function(e){u[e]=u[t[e]]})),u}function Tn(e){var n,t=Q(e),o=O.A(jn(e,t),function(e,n){var t={};function o(n,o,i,u,a){var s;r.A(g(o,i),(function(o){s=n[o],e.node(s).dummy&&r.A(e.predecessors(s),(function(n){var r=e.node(n);r.dummy&&(r.order<u||r.order>a)&&Cn(t,n,s)}))}))}return Je.A(n,(function(n,t){var i,u=-1,a=0;return r.A(t,(function(r,s){if("border"===e.node(r).dummy){var d=e.predecessors(r);d.length&&(i=e.node(d[0]).order,o(t,a,s,u,i),a=s,u=i)}o(t,a,t.length,i,n.length)})),t})),t}(e,t)),i={};r.A(["u","d"],(function(u){n="u"===u?t:$e.A(t).reverse(),r.A(["l","r"],(function(t){"r"===t&&(n=d.A(n,(function(e){return $e.A(e).reverse()})));var a=("u"===u?e.predecessors:e.successors).bind(e),s=function(e,n,t,o){var i={},u={},a={};return r.A(n,(function(e){r.A(e,(function(e,n){i[e]=e,u[e]=e,a[e]=n}))})),r.A(n,(function(e){var n=-1;r.A(e,(function(e){var r=o(e);if(r.length){r=fn(r,(function(e){return a[e]}));for(var s=(r.length-1)/2,d=Math.floor(s),c=Math.ceil(s);d<=c;++d){var h=r[d];u[e]===e&&n<a[h]&&!In(t,e,h)&&(u[h]=e,u[e]=i[e]=i[h],n=a[h])}}}))})),{root:i,align:u}}(0,n,o,a),c=Ln(e,n,s.root,s.align,"r"===t);"r"===t&&(c=B(c,(function(e){return-e}))),i[u+t]=c}))}));var u=function(e,n){return de($e.A(n),(function(n){var t=Number.NEGATIVE_INFINITY,r=Number.POSITIVE_INFINITY;return Pn(n,(function(n,o){var i=function(e,n){return e.node(n).width}(e,o)/2;t=Math.max(n+i,t),r=Math.min(n-i,r)})),t-r}))}(e,i);return function(e,n){var t=$e.A(n),o=Y.A(t),i=F(t);r.A(["u","d"],(function(t){r.A(["l","r"],(function(r){var u,a=t+r,s=e[a];if(s!==n){var d=$e.A(s);(u="l"===r?o-Y.A(d):i-F(d))&&(e[a]=B(s,(function(e){return e+u})))}}))}))}(i,u),function(e,n){return B(e.ul,(function(t,r){if(n)return e[n.toLowerCase()][r];var o=fn(d.A(e,r));return(o[1]+o[2])/2}))}(i,e.graph().align)}function Mn(e){(function(e){var n=Q(e),t=e.graph().ranksep,o=0;r.A(n,(function(n){var i=F(d.A(n,(function(n){return e.node(n).height})));r.A(n,(function(n){e.node(n).y=o+i/2})),o+=i+t}))})(e=H(e)),On(Tn(e),(function(n,t){e.node(t).x=n}))}function Rn(e,n){var t=n&&n.debugTiming?X:ee;t("layout",(()=>{var n=t(" buildLayoutGraph",(()=>function(e){var n=new p.T({multigraph:!0,compound:!0}),t=$n(e.graph());return n.setGraph(O.A({},Dn,zn(t,Fn),I(t,Sn))),r.A(e.nodes(),(function(t){var r=$n(e.node(t));n.setNode(t,L.A(zn(r,Gn),Vn)),n.setParent(t,e.parent(t))})),r.A(e.edges(),(function(t){var r=$n(e.edge(t));n.setEdge(t,O.A({},qn,zn(r,Bn),I(r,Yn)))})),n}(e)));t(" runLayout",(()=>function(e,n){n(" makeSpaceForEdgeLabels",(()=>function(e){var n=e.graph();n.ranksep/=2,r.A(e.edges(),(function(t){var r=e.edge(t);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e))),n(" removeSelfEdges",(()=>function(e){r.A(e.edges(),(function(n){if(n.v===n.w){var t=e.node(n.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}}))}(e))),n(" acyclic",(()=>x(e))),n(" nestingGraph.run",(()=>Ze(e))),n(" rank",(()=>qe(H(e)))),n(" injectEdgeLabelProxies",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);if(t.width&&t.height){var r=e.node(n.v),o={rank:(e.node(n.w).rank-r.rank)/2+r.rank,e:n};Z(e,"edge-proxy",o,"_ep")}}))}(e))),n(" removeEmptyRanks",(()=>function(e){var n=Y.A(d.A(e.nodes(),(function(n){return e.node(n).rank}))),t=[];r.A(e.nodes(),(function(r){var o=e.node(r).rank-n;t[o]||(t[o]=[]),t[o].push(r)}));var o=0,i=e.graph().nodeRankFactor;r.A(t,(function(n,t){q.A(n)&&t%i!=0?--o:o&&r.A(n,(function(n){e.node(n).rank+=o}))}))}(e))),n(" nestingGraph.cleanup",(()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,r.A(e.edges(),(function(n){e.edge(n).nestingEdge&&e.removeEdge(n)}))}(e))),n(" normalizeRanks",(()=>function(e){var n=Y.A(d.A(e.nodes(),(function(n){return e.node(n).rank})));r.A(e.nodes(),(function(t){var r=e.node(t);z.A(r,"rank")&&(r.rank-=n)}))}(e))),n(" assignRankMinMax",(()=>function(e){var n=0;r.A(e.nodes(),(function(t){var r=e.node(t);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,n=F(n,r.maxRank))})),e.graph().maxRank=n}(e))),n(" removeEdgeLabelProxies",(()=>function(e){r.A(e.nodes(),(function(n){var t=e.node(n);"edge-proxy"===t.dummy&&(e.edge(t.e).labelRank=t.rank,e.removeNode(n))}))}(e))),n(" normalize.run",(()=>ae(e))),n(" parentDummyChains",(()=>En(e))),n(" addBorderSegments",(()=>function(e){r.A(e.children(),(function n(t){var o=e.children(t),i=e.node(t);if(o.length&&r.A(o,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var u=i.minRank,a=i.maxRank+1;u<a;++u)ne(e,"borderLeft","_bl",t,i,u),ne(e,"borderRight","_br",t,i,u)}}))}(e))),n(" order",(()=>bn(e))),n(" insertSelfEdges",(()=>function(e){var n=Q(e);r.A(n,(function(n){var t=0;r.A(n,(function(n,o){var i=e.node(n);i.order=o+t,r.A(i.selfEdges,(function(n){Z(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++t,e:n.e,label:n.label},"_se")})),delete i.selfEdges}))}))}(e))),n(" adjustCoordinateSystem",(()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||re(e)}(e))),n(" position",(()=>Mn(e))),n(" positionSelfEdges",(()=>function(e){r.A(e.nodes(),(function(n){var t=e.node(n);if("selfedge"===t.dummy){var r=e.node(t.e.v),o=r.x+r.width/2,i=r.y,u=t.x-o,a=r.height/2;e.setEdge(t.e,t.label),e.removeNode(n),t.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],t.label.x=t.x,t.label.y=t.y}}))}(e))),n(" removeBorderNodes",(()=>function(e){r.A(e.nodes(),(function(n){if(e.children(n).length){var t=e.node(n),r=e.node(t.borderTop),o=e.node(t.borderBottom),i=e.node(D.A(t.borderLeft)),u=e.node(D.A(t.borderRight));t.width=Math.abs(u.x-i.x),t.height=Math.abs(o.y-r.y),t.x=i.x+t.width/2,t.y=r.y+t.height/2}})),r.A(e.nodes(),(function(n){"border"===e.node(n).dummy&&e.removeNode(n)}))}(e))),n(" normalize.undo",(()=>function(e){r.A(e.graph().dummyChains,(function(n){var t,r=e.node(n),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)t=e.successors(n)[0],e.removeNode(n),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),n=t,r=e.node(n)}))}(e))),n(" fixupEdgeLabelCoords",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);if(Object.prototype.hasOwnProperty.call(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}}))}(e))),n(" undoCoordinateSystem",(()=>te(e))),n(" translateGraph",(()=>function(e){var n=Number.POSITIVE_INFINITY,t=0,o=Number.POSITIVE_INFINITY,i=0,u=e.graph(),a=u.marginx||0,s=u.marginy||0;function d(e){var r=e.x,u=e.y,a=e.width,s=e.height;n=Math.min(n,r-a/2),t=Math.max(t,r+a/2),o=Math.min(o,u-s/2),i=Math.max(i,u+s/2)}r.A(e.nodes(),(function(n){d(e.node(n))})),r.A(e.edges(),(function(n){var t=e.edge(n);Object.prototype.hasOwnProperty.call(t,"x")&&d(t)})),n-=a,o-=s,r.A(e.nodes(),(function(t){var r=e.node(t);r.x-=n,r.y-=o})),r.A(e.edges(),(function(t){var i=e.edge(t);r.A(i.points,(function(e){e.x-=n,e.y-=o})),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=o)})),u.width=t-n+a,u.height=i-o+s}(e))),n(" assignNodeIntersects",(()=>function(e){r.A(e.edges(),(function(n){var t,r,o=e.edge(n),i=e.node(n.v),u=e.node(n.w);o.points?(t=o.points[0],r=o.points[o.points.length-1]):(o.points=[],t=u,r=i),o.points.unshift(K(i,t)),o.points.push(K(u,r))}))}(e))),n(" reversePoints",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);t.reversed&&t.points.reverse()}))}(e))),n(" acyclic.undo",(()=>function(e){r.A(e.edges(),(function(n){var t=e.edge(n);if(t.reversed){e.removeEdge(n);var r=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(n.w,n.v,t,r)}}))}(e)))}(n,t))),t(" updateInputGraph",(()=>function(e,n){r.A(e.nodes(),(function(t){var r=e.node(t),o=n.node(t);r&&(r.x=o.x,r.y=o.y,n.children(t).length&&(r.width=o.width,r.height=o.height))})),r.A(e.edges(),(function(t){var r=e.edge(t),o=n.edge(t);r.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(r.x=o.x,r.y=o.y)})),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n)))}))}var Fn=["nodesep","edgesep","ranksep","marginx","marginy"],Dn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Sn=["acyclicer","ranker","rankdir","align"],Gn=["width","height"],Vn={width:0,height:0},Bn=["minlen","weight","width","height","labeloffset"],qn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Yn=["labelpos"];function zn(e,n){return B(I(e,n),Number)}function $n(e){var n={};return r.A(e,(function(e,t){n[t.toLowerCase()]=e})),n}},7981:(e,n,t)=>{t.d(n,{T:()=>w});var r=t(9142),o=t(9610),i=t(7422),u=t(4092),a=t(6401),s=t(8058),d=t(9592),c=t(3588),h=t(4326),f=t(9902),v=t(3533);const l=(0,h.A)((function(e){return(0,f.A)((0,c.A)(e,1,v.A,!0))}));var g=t(8207),p=t(9463),A="\0";class w{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.A(void 0),this._defaultEdgeLabelFn=r.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[A]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return o.A(e)||(e=r.A(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return i.A(this._nodes)}sources(){var e=this;return u.A(this.nodes(),(function(n){return a.A(e._in[n])}))}sinks(){var e=this;return u.A(this.nodes(),(function(n){return a.A(e._out[n])}))}setNodes(e,n){var t=arguments,r=this;return s.A(e,(function(e){t.length>1?r.setNode(e,n):r.setNode(e)})),this}setNode(e,n){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=n),this):(this._nodes[e]=arguments.length>1?n:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=A,this._children[e]={},this._children[A][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var n=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],s.A(this.children(e),(e=>{this.setParent(e)})),delete this._children[e]),s.A(i.A(this._in[e]),n),delete this._in[e],delete this._preds[e],s.A(i.A(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(d.A(n))n=A;else{for(var t=n+="";!d.A(t);t=this.parent(t))if(t===e)throw new Error("Setting "+n+" as parent of "+e+" would create a cycle");this.setNode(n)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=n,this._children[n][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var n=this._parent[e];if(n!==A)return n}}children(e){if(d.A(e)&&(e=A),this._isCompound){var n=this._children[e];if(n)return i.A(n)}else{if(e===A)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var n=this._preds[e];if(n)return i.A(n)}successors(e){var n=this._sucs[e];if(n)return i.A(n)}neighbors(e){var n=this.predecessors(e);if(n)return l(n,this.successors(e))}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var t=this;s.A(this._nodes,(function(t,r){e(r)&&n.setNode(r,t)})),s.A(this._edgeObjs,(function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,t.edge(e))}));var r={};function o(e){var i=t.parent(e);return void 0===i||n.hasNode(i)?(r[e]=i,i):i in r?r[i]:o(i)}return this._isCompound&&s.A(n.nodes(),(function(e){n.setParent(e,o(e))})),n}setDefaultEdgeLabel(e){return o.A(e)||(e=r.A(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return g.A(this._edgeObjs)}setPath(e,n){var t=this,r=arguments;return p.A(e,(function(e,o){return r.length>1?t.setEdge(e,o,n):t.setEdge(e,o),o})),this}setEdge(){var e,n,t,r,o=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(e=i.v,n=i.w,t=i.name,2===arguments.length&&(r=arguments[1],o=!0)):(e=i,n=arguments[1],t=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),e=""+e,n=""+n,d.A(t)||(t=""+t);var u=y(this._isDirected,e,n,t);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,u))return o&&(this._edgeLabels[u]=r),this;if(!d.A(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(n),this._edgeLabels[u]=o?r:this._defaultEdgeLabelFn(e,n,t);var a=function(e,n,t,r){var o=""+n,i=""+t;if(!e&&o>i){var u=o;o=i,i=u}var a={v:o,w:i};r&&(a.name=r);return a}(this._isDirected,e,n,t);return e=a.v,n=a.w,Object.freeze(a),this._edgeObjs[u]=a,b(this._preds[n],e),b(this._sucs[e],n),this._in[n][u]=a,this._out[e][u]=a,this._edgeCount++,this}edge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t);return this._edgeLabels[r]}hasEdge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t),o=this._edgeObjs[r];return o&&(e=o.v,n=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],m(this._preds[n],e),m(this._sucs[e],n),delete this._in[n][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,n){var t=this._in[e];if(t){var r=g.A(t);return n?u.A(r,(function(e){return e.v===n})):r}}outEdges(e,n){var t=this._out[e];if(t){var r=g.A(t);return n?u.A(r,(function(e){return e.w===n})):r}}nodeEdges(e,n){var t=this.inEdges(e,n);if(t)return t.concat(this.outEdges(e,n))}}function b(e,n){e[n]?e[n]++:e[n]=1}function m(e,n){--e[n]||delete e[n]}function y(e,n,t,r){var o=""+n,i=""+t;if(!e&&o>i){var u=o;o=i,i=u}return o+"\x01"+i+"\x01"+(d.A(r)?"\0":r)}function _(e,n){return y(e,n.v,n.w,n.name)}w.prototype._nodeCount=0,w.prototype._edgeCount=0},697:(e,n,t)=>{t.d(n,{T:()=>r.T});var r=t(7981)},2559:(e,n,t)=>{t.d(n,{A:()=>o});var r=t(1882);const o=function(e,n,t){for(var o=-1,i=e.length;++o<i;){var u=e[o],a=n(u);if(null!=a&&(void 0===s?a==a&&!(0,r.A)(a):t(a,s)))var s=a,d=u}return d}},6224:(e,n,t)=>{t.d(n,{A:()=>r});const r=function(e,n){return e<n}},2568:(e,n,t)=>{t.d(n,{A:()=>i});var r=t(6240),o=t(8446);const i=function(e,n){var t=-1,i=(0,o.A)(e)?Array(e.length):[];return(0,r.A)(e,(function(e,r,o){i[++t]=n(e,r,o)})),i}},9354:(e,n,t)=>{t.d(n,{A:()=>c});var r=t(6318),o=t(2851),i=t(7819),u=t(5353),a=t(3149),s=t(901);const d=function(e,n,t,r){if(!(0,a.A)(e))return e;for(var d=-1,c=(n=(0,i.A)(n,e)).length,h=c-1,f=e;null!=f&&++d<c;){var v=(0,s.A)(n[d]),l=t;if("__proto__"===v||"constructor"===v||"prototype"===v)return e;if(d!=h){var g=f[v];void 0===(l=r?r(g,v,f):void 0)&&(l=(0,a.A)(g)?g:(0,u.A)(n[d+1])?[]:{})}(0,o.A)(f,v,l),f=f[v]}return e};const c=function(e,n,t){for(var o=-1,u=n.length,a={};++o<u;){var s=n[o],c=(0,r.A)(e,s);t(c,s)&&d(a,(0,i.A)(s,e),c)}return a}},3068:(e,n,t)=>{t.d(n,{A:()=>d});var r=t(4326),o=t(6984),i=t(6832),u=t(5615),a=Object.prototype,s=a.hasOwnProperty;const d=(0,r.A)((function(e,n){e=Object(e);var t=-1,r=n.length,d=r>2?n[2]:void 0;for(d&&(0,i.A)(n[0],n[1],d)&&(r=1);++t<r;)for(var c=n[t],h=(0,u.A)(c),f=-1,v=h.length;++f<v;){var l=h[f],g=e[l];(void 0===g||(0,o.A)(g,a[l])&&!s.call(e,l))&&(e[l]=c[l])}return e}))},6145:(e,n,t)=>{t.d(n,{A:()=>c});var r=t(3958),o=t(8446),i=t(7422);const u=function(e){return function(n,t,u){var a=Object(n);if(!(0,o.A)(n)){var s=(0,r.A)(t,3);n=(0,i.A)(n),t=function(e){return s(a[e],e,a)}}var d=e(n,t,u);return d>-1?a[s?n[d]:d]:void 0}};var a=t(5707),s=t(8593),d=Math.max;const c=u((function(e,n,t){var o=null==e?0:e.length;if(!o)return-1;var i=null==t?0:(0,s.A)(t);return i<0&&(i=d(o+i,0)),(0,a.A)(e,(0,r.A)(n,3),i)}))},4098:(e,n,t)=>{t.d(n,{A:()=>o});var r=t(3588);const o=function(e){return(null==e?0:e.length)?(0,r.A)(e,1):[]}},8585:(e,n,t)=>{t.d(n,{A:()=>u});var r=Object.prototype.hasOwnProperty;const o=function(e,n){return null!=e&&r.call(e,n)};var i=t(5054);const u=function(e,n){return null!=e&&(0,i.A)(e,n,o)}},9703:(e,n,t)=>{t.d(n,{A:()=>u});var r=t(8496),o=t(2049),i=t(3098);const u=function(e){return"string"==typeof e||!(0,o.A)(e)&&(0,i.A)(e)&&"[object String]"==(0,r.A)(e)}},6666:(e,n,t)=>{t.d(n,{A:()=>r});const r=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0}},4722:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(5572),o=t(3958),i=t(2568),u=t(2049);const a=function(e,n){return((0,u.A)(e)?r.A:i.A)(e,(0,o.A)(n,3))}},6452:(e,n,t)=>{t.d(n,{A:()=>u});var r=t(2559),o=t(6224),i=t(9008);const u=function(e){return e&&e.length?(0,r.A)(e,i.A,o.A):void 0}},4342:(e,n,t)=>{t.d(n,{A:()=>g});var r=/\s/;const o=function(e){for(var n=e.length;n--&&r.test(e.charAt(n)););return n};var i=/^\s+/;const u=function(e){return e?e.slice(0,o(e)+1).replace(i,""):e};var a=t(3149),s=t(1882),d=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,h=/^0o[0-7]+$/i,f=parseInt;const v=function(e){if("number"==typeof e)return e;if((0,s.A)(e))return NaN;if((0,a.A)(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.A)(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=u(e);var t=c.test(e);return t||h.test(e)?f(e.slice(2),t?2:8):d.test(e)?NaN:+e};var l=1/0;const g=function(e){return e?(e=v(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8593:(e,n,t)=>{t.d(n,{A:()=>o});var r=t(4342);const o=function(e){var n=(0,r.A)(e),t=n%1;return n==n?t?n-t:n:0}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[8249],{1049:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0","title":"Migration Guide: Upgrading to the A2A SDK","description":"This guide is for developers who have built or are maintaining a custom Agent Mesh gateway. A recent architectural update has aligned Agent Mesh with the official Agent-to-Agent (A2A) protocol specification by adopting the a2a-sdk. This migration requires some changes to your gateway code to ensure compatibility.","source":"@site/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0.md","sourceDirName":"documentation/migrations/a2a-upgrade","slug":"/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0","permalink":"/solace-agent-mesh/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0.md","tags":[],"version":"current","sidebarPosition":10,"frontMatter":{"title":"Migration Guide: Upgrading to the A2A SDK","sidebar_position":10},"sidebar":"docSidebar","previous":{"title":"Proxy Configuration","permalink":"/solace-agent-mesh/docs/documentation/deploying/proxy_configuration"},"next":{"title":"A2A Technical Migration Map","permalink":"/solace-agent-mesh/docs/documentation/migrations/a2a-upgrade/a2a-technical-migration-map"}}');var a=n(4848),r=n(8453);const i={title:"Migration Guide: Upgrading to the A2A SDK",sidebar_position:10},o=void 0,l={},c=[{value:"Why the Change?",id:"why-the-change",level:2},{value:"Core Conceptual Changes",id:"core-conceptual-changes",level:2},{value:"The <code>a2a</code> Helper Layer: The New Best Practice",id:"the-a2a-helper-layer-the-new-best-practice",level:3},{value:"Type System Migration",id:"type-system-migration",level:3},{value:"Accessing Object Properties",id:"accessing-object-properties",level:3},{value:"Changes to <code>BaseGatewayComponent</code>",id:"changes-to-basegatewaycomponent",level:3},{value:"Migration Checklist",id:"migration-checklist",level:2},{value:"Code Examples: Before &amp; After",id:"code-examples-before--after",level:2},{value:"Example 1: Translating External Input",id:"example-1-translating-external-input",level:3},{value:"Example 2: Sending a Final Response",id:"example-2-sending-a-final-response",level:3}];function d(e){const t={code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components},{Details:n}=t;return n||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.p,{children:["This guide is for developers who have built or are maintaining a custom Agent Mesh gateway. A recent architectural update has aligned Agent Mesh with the official Agent-to-Agent (A2A) protocol specification by adopting the ",(0,a.jsx)(t.code,{children:"a2a-sdk"}),". This migration requires some changes to your gateway code to ensure compatibility."]}),"\n",(0,a.jsx)(t.p,{children:"This document provides a high-level overview of the conceptual changes and a practical checklist to guide you through the upgrade process."}),"\n",(0,a.jsx)(t.h2,{id:"why-the-change",children:"Why the Change?"}),"\n",(0,a.jsxs)(t.p,{children:["The migration from our legacy A2A implementation to the official ",(0,a.jsx)(t.code,{children:"a2a-sdk"})," is a foundational improvement with several key benefits:"]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Protocol Compliance:"})," Ensures your gateway is fully interoperable with any A2A-compliant agent or system."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Standardization:"})," Replaces bespoke code with a community-supported standard, reducing technical debt."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Improved Maintainability:"})," Insulates your gateway from future A2A specification changes. The ",(0,a.jsx)(t.code,{children:"a2a-sdk"})," will be updated, not your core logic."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Future-Proofing:"})," Positions your gateway to easily adopt new features as the A2A protocol evolves."]}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"core-conceptual-changes",children:"Core Conceptual Changes"}),"\n",(0,a.jsx)(t.p,{children:"The upgrade introduces a few key changes in how you interact with A2A objects."}),"\n",(0,a.jsxs)(t.h3,{id:"the-a2a-helper-layer-the-new-best-practice",children:["The ",(0,a.jsx)(t.code,{children:"a2a"})," Helper Layer: The New Best Practice"]}),"\n",(0,a.jsxs)(t.p,{children:["The most significant change is the introduction of a new abstraction layer located at ",(0,a.jsx)(t.code,{children:"solace_agent_mesh.common.a2a"}),"."]}),"\n",(0,a.jsxs)(t.p,{children:["You should ",(0,a.jsxs)(t.strong,{children:["no longer instantiate ",(0,a.jsx)(t.code,{children:"a2a.types"})," models directly"]})," or access their properties by hand. Instead, use the provided helper functions. This layer is designed to simplify development and protect your code from future SDK changes."]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Example:"})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:'\n# BEFORE: Direct instantiation and property access\nfrom solace_agent_mesh.common.types import TextPart, Task\nmy_part = TextPart(text="Hello")\ntask_id = my_task.id\n\n# AFTER: Using the a2a helper layer\nfrom solace_agent_mesh.common import a2a\nmy_part = a2a.create_text_part(text="Hello")\ntask_id = a2a.get_task_id(my_task)\n\n'})}),"\n",(0,a.jsx)(t.h3,{id:"type-system-migration",children:"Type System Migration"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["The legacy types in ",(0,a.jsx)(t.code,{children:"solace_agent_mesh.common.types"})," (like ",(0,a.jsx)(t.code,{children:"A2APart"}),", ",(0,a.jsx)(t.code,{children:"FileContent"}),") are deprecated."]}),"\n",(0,a.jsxs)(t.li,{children:["All A2A models now come from the ",(0,a.jsx)(t.code,{children:"a2a.types"})," library."]}),"\n",(0,a.jsxs)(t.li,{children:["The type hint for a list of message parts has changed from ",(0,a.jsx)(t.code,{children:"List[A2APart]"})," to ",(0,a.jsx)(t.code,{children:"List[ContentPart]"}),". ",(0,a.jsx)(t.code,{children:"ContentPart"})," is a simple alias for the union of ",(0,a.jsx)(t.code,{children:"TextPart"}),", ",(0,a.jsx)(t.code,{children:"DataPart"}),", and ",(0,a.jsx)(t.code,{children:"FilePart"}),"."]}),"\n"]}),"\n",(0,a.jsx)(t.h3,{id:"accessing-object-properties",children:"Accessing Object Properties"}),"\n",(0,a.jsxs)(t.p,{children:["Field names on many A2A objects have changed. Always use the ",(0,a.jsx)(t.code,{children:"a2a"})," helper functions for safe and future-proof access."]}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"Action"}),(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"Old Pattern"}),(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"New Pattern (Recommended)"})]})}),(0,a.jsxs)(t.tbody,{children:[(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Task ID"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"task.id"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_task_id(task)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Task Status"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"task.status.state"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_task_status(task)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Event's Task ID"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"event.id"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"event.task_id"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Message Parts"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"message.parts"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_parts_from_message(message)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Error Message"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"error.message"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_error_message(error)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Error Code"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"error.code"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_error_code(error)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Error Data"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"error.data"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_error_data(error)"})})]})]})]}),"\n",(0,a.jsxs)(t.h3,{id:"changes-to-basegatewaycomponent",children:["Changes to ",(0,a.jsx)(t.code,{children:"BaseGatewayComponent"})]}),"\n",(0,a.jsxs)(t.p,{children:["The ",(0,a.jsx)(t.code,{children:"BaseGatewayComponent"})," has been significantly improved. It now handles more of the A2A protocol complexity, simplifying gateway implementations."]}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Artifact Handling:"})," The base class can now automatically handle artifact URIs, converting them to embedded bytes before sending them to your gateway's ",(0,a.jsx)(t.code,{children:"_send_..."})," methods. This is controlled by the ",(0,a.jsx)(t.code,{children:"resolve_artifact_uris_in_gateway"})," parameter in the constructor."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Message Publishing:"})," The base class now manages the details of preparing and publishing the A2A request message in ",(0,a.jsx)(t.code,{children:"submit_a2a_task"}),"."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Asynchronous Model:"})," The underlying threading model has been removed in favor of a more direct ",(0,a.jsx)(t.code,{children:"asyncio"})," implementation, simplifying the component lifecycle."]}),"\n"]}),"\n",(0,a.jsxs)(t.p,{children:["It is highly recommended to review the latest ",(0,a.jsx)(t.code,{children:"BaseGatewayComponent"})," and re-base your custom gateway on it to inherit these benefits and reduce boilerplate code."]}),"\n",(0,a.jsx)(t.h2,{id:"migration-checklist",children:"Migration Checklist"}),"\n",(0,a.jsx)(t.p,{children:"Follow these steps to update your gateway code."}),"\n",(0,a.jsxs)(t.ol,{children:["\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Update Imports:"})}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["Remove imports from ",(0,a.jsx)(t.code,{children:"solace_agent_mesh.common.types"}),"."]}),"\n",(0,a.jsxs)(t.li,{children:["Add imports from ",(0,a.jsx)(t.code,{children:"a2a.types"})," for specific models if needed."]}),"\n",(0,a.jsxs)(t.li,{children:["Add ",(0,a.jsx)(t.code,{children:"from solace_agent_mesh.common import a2a"}),"."]}),"\n",(0,a.jsxs)(t.li,{children:["Add ",(0,a.jsx)(t.code,{children:"from solace_agent_mesh.common.a2a import ContentPart"}),"."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Update Type Hints:"})}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["Find all instances of ",(0,a.jsx)(t.code,{children:"List[A2APart]"})," and change them to ",(0,a.jsx)(t.code,{children:"List[ContentPart]"}),"."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Refactor Object Creation:"})}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["Replace direct model instantiation like ",(0,a.jsx)(t.code,{children:"TextPart(...)"})," or ",(0,a.jsx)(t.code,{children:"FilePart(...)"})," with their corresponding helper functions: ",(0,a.jsx)(t.code,{children:"a2a.create_text_part(...)"}),", ",(0,a.jsx)(t.code,{children:"a2a.create_file_part_from_uri(...)"}),", etc."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Refactor Property Access:"})}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["Replace direct property access (",(0,a.jsx)(t.code,{children:"task.id"}),", ",(0,a.jsx)(t.code,{children:"error.message"}),") with calls to the ",(0,a.jsx)(t.code,{children:"a2a"})," helper functions (",(0,a.jsx)(t.code,{children:"a2a.get_task_id(task)"}),", ",(0,a.jsx)(t.code,{children:"a2a.get_error_message(error)"}),")."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Review Base Class Integration:"})}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["If you have a custom gateway, compare it against the latest ",(0,a.jsx)(t.code,{children:"BaseGatewayComponent"}),". Consider refactoring to delegate more responsibility (like artifact handling and message submission) to the base class."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(t.li,{children:["\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Test Thoroughly:"})}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:"Once refactored, run your integration tests to ensure the gateway correctly translates inputs and processes outputs in the new format."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"code-examples-before--after",children:"Code Examples: Before & After"}),"\n",(0,a.jsx)(t.p,{children:"Here are some common patterns you will encounter during the migration."}),"\n",(0,a.jsx)(t.h3,{id:"example-1-translating-external-input",children:"Example 1: Translating External Input"}),"\n",(0,a.jsx)(t.p,{children:"This example shows how to create A2A parts from an external event."}),"\n",(0,a.jsxs)(n,{children:[(0,a.jsx)("summary",{children:(0,a.jsx)("strong",{children:"_translate_external_input"})}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Before:"})}),(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:'from solace_agent_mesh.common.types import Part as A2APart, TextPart, FilePart, FileContent\n\nasync def _translate_external_input(self, external_event: Any) -> Tuple[str, List[A2APart], Dict[str, Any]]:\n # ...\n a2a_parts: List[A2APart] = []\n\n # Create a file part with a URI\n uri = "artifact://..."\n a2a_parts.append(\n FilePart(\n file=FileContent(name="report.pdf", uri=uri)\n )\n )\n\n # Create a text part\n prompt = "Summarize the attached file."\n a2a_parts.append(TextPart(text=prompt))\n\n return "summary_agent", a2a_parts, {}\n'})}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"After:"})}),(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:'from solace_agent_mesh.common import a2a\nfrom solace_agent_mesh.common.a2a import ContentPart\n\nasync def _translate_external_input(self, external_event: Any) -> Tuple[str, List[ContentPart], Dict[str, Any]]:\n # ...\n a2a_parts: List[ContentPart] = []\n\n # Create a file part with a URI using the helper\n uri = "artifact://..."\n file_part = a2a.create_file_part_from_uri(uri=uri, name="report.pdf")\n a2a_parts.append(file_part)\n\n # Create a text part using the helper\n prompt = "Summarize the attached file."\n text_part = a2a.create_text_part(text=prompt)\n a2a_parts.append(text_part)\n\n return "summary_agent", a2a_parts, {}\n'})})]}),"\n",(0,a.jsx)(t.h3,{id:"example-2-sending-a-final-response",children:"Example 2: Sending a Final Response"}),"\n",(0,a.jsxs)(t.p,{children:["This example shows how to process a final ",(0,a.jsx)(t.code,{children:"Task"})," object."]}),"\n",(0,a.jsxs)(n,{children:[(0,a.jsx)("summary",{children:(0,a.jsx)("strong",{children:"_send_final_response_to_external"})}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Before:"})}),(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:'from solace_agent_mesh.common.types import Task, TaskState, TextPart\n\nasync def _send_final_response_to_external(self, context: Dict, task_data: Task) -> None:\n task_id = task_data.id\n final_status_text = ":checkered_flag: Task complete."\n\n if task_data.status.state == TaskState.FAILED:\n error_message_text = ""\n if task_data.status.message and task_data.status.message.parts:\n for part in task_data.status.message.parts:\n if isinstance(part, TextPart):\n error_message_text = part.text\n break\n final_status_text = f":x: Error: Task failed. {error_message_text}".strip()\n\n # ... use final_status_text and task_id\n'})}),(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"After:"})}),(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:'from solace_agent_mesh.common import a2a\nfrom a2a.types import Task, TaskState\n\nasync def _send_final_response_to_external(self, context: Dict, task_data: Task) -> None:\n # Use helpers to safely access properties\n task_id = a2a.get_task_id(task_data)\n task_status = a2a.get_task_status(task_data)\n\n final_status_text = ":checkered_flag: Task complete."\n\n if task_status == TaskState.failed:\n error_message_text = ""\n if task_data.status and task_data.status.message:\n # Use helper to extract all text from the message\n error_message_text = a2a.get_text_from_message(task_data.status.message)\n final_status_text = f":x: Error: Task failed. {error_message_text}".strip()\n\n # ... use final_status_text and task_id\n'})})]})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>o});var s=n(6540);const a={},r=s.createContext(a);function i(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[9057],{927:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>r,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"documentation/enterprise/wheel-installation","title":"Running from Wheel File","description":"You can run Agent Mesh Enterprise directly from a Python wheel file without using Docker containers. This approach gives you direct control over your Python environment and integrates with existing Python-based deployments.","source":"@site/docs/documentation/enterprise/wheel-installation.md","sourceDirName":"documentation/enterprise","slug":"/documentation/enterprise/wheel-installation","permalink":"/solace-agent-mesh/docs/documentation/enterprise/wheel-installation","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/enterprise/wheel-installation.md","tags":[],"version":"current","sidebarPosition":6,"frontMatter":{"title":"Running from Wheel File","sidebar_position":6},"sidebar":"docSidebar","previous":{"title":"Installing Agent Mesh Enterprise","permalink":"/solace-agent-mesh/docs/documentation/enterprise/installation"},"next":{"title":"Agent Builder","permalink":"/solace-agent-mesh/docs/documentation/enterprise/agent-builder"}}');var s=t(4848),o=t(8453);const r={title:"Running from Wheel File",sidebar_position:6},a="Running Agent Mesh Enterprise from Wheel File",l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Step 1: Download the Wheel File",id:"step-1-download-the-wheel-file",level:2},{value:"Step 2: Install the Wheel File",id:"step-2-install-the-wheel-file",level:2},{value:"Step 3: Prepare Your Configuration",id:"step-3-prepare-your-configuration",level:2},{value:"Step 4: Run Agent Mesh Enterprise",id:"step-4-run-agent-mesh-enterprise",level:2},{value:"Running Specific Components",id:"running-specific-components",level:3},{value:"Using the Short Alias",id:"using-the-short-alias",level:3},{value:"Limitations",id:"limitations",level:2},{value:"No Dynamic Agent Deployment",id:"no-dynamic-agent-deployment",level:3},{value:"Custom Agent Code",id:"custom-agent-code",level:3},{value:"Accessing the Web UI",id:"accessing-the-web-ui",level:2},{value:"Next Steps",id:"next-steps",level:2}];function h(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"running-agent-mesh-enterprise-from-wheel-file",children:"Running Agent Mesh Enterprise from Wheel File"})}),"\n",(0,s.jsx)(n.p,{children:"You can run Agent Mesh Enterprise directly from a Python wheel file without using Docker containers. This approach gives you direct control over your Python environment and integrates with existing Python-based deployments."}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsx)(n.p,{children:"To run Agent Mesh Enterprise from a wheel file, you need:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Python 3.10.16 or later"}),"\n",(0,s.jsx)(n.li,{children:"pip or uv package manager"}),"\n",(0,s.jsxs)(n.li,{children:["Access to the ",(0,s.jsx)(n.a,{href:"https://products.solace.com/prods/Agent_Mesh/Enterprise/",children:"Solace Product Portal"})]}),"\n",(0,s.jsx)(n.li,{children:"An LLM service API key and endpoint"}),"\n",(0,s.jsx)(n.li,{children:"For production deployments, Solace broker credentials"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"step-1-download-the-wheel-file",children:"Step 1: Download the Wheel File"}),"\n",(0,s.jsxs)(n.p,{children:["Download the Agent Mesh Enterprise wheel file from the ",(0,s.jsx)(n.a,{href:"https://products.solace.com/prods/Agent_Mesh/Enterprise/",children:"Solace Product Portal"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"The wheel file follows the naming pattern:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"solace_agent_mesh_enterprise-<version>-py3-none-any.whl\n"})}),"\n",(0,s.jsx)(n.h2,{id:"step-2-install-the-wheel-file",children:"Step 2: Install the Wheel File"}),"\n",(0,s.jsx)(n.p,{children:"You can install the wheel file with either pip or uv."}),"\n",(0,s.jsx)(n.p,{children:"If you use pip, run:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"pip install solace_agent_mesh_enterprise-<version>-py3-none-any.whl\n"})}),"\n",(0,s.jsx)(n.p,{children:"If you use uv, run:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"uv pip install solace_agent_mesh_enterprise-<version>-py3-none-any.whl\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This installation provides the ",(0,s.jsx)(n.code,{children:"solace-agent-mesh"})," CLI tool and the Agent Mesh Enterprise framework."]}),"\n",(0,s.jsx)(n.h2,{id:"step-3-prepare-your-configuration",children:"Step 3: Prepare Your Configuration"}),"\n",(0,s.jsxs)(n.p,{children:["Agent Mesh Enterprise requires configuration files that define your agents, gateways, and system settings. The ",(0,s.jsx)(n.code,{children:"solace-agent-mesh init"})," command creates the project directory structure, environment variables, and configuration files you need."]}),"\n",(0,s.jsxs)(n.p,{children:["Follow the project setup steps in the ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/installing-and-configuring/run-project#create-your-project",children:"Creating and Running an Agent Mesh Project"})," guide to initialize your configuration. You can use the web-based interface or command-line options to configure your project settings."]}),"\n",(0,s.jsxs)(n.p,{children:["After initialization, your project directory contains the necessary ",(0,s.jsx)(n.code,{children:"configs/"})," directory with agent and gateway configurations, plus a ",(0,s.jsx)(n.code,{children:".env"})," file with your credentials."]}),"\n",(0,s.jsx)(n.h2,{id:"step-4-run-agent-mesh-enterprise",children:"Step 4: Run Agent Mesh Enterprise"}),"\n",(0,s.jsxs)(n.p,{children:["Start Agent Mesh Enterprise using the ",(0,s.jsx)(n.code,{children:"solace-agent-mesh run"})," command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"solace-agent-mesh run\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This command loads environment variables from your ",(0,s.jsx)(n.code,{children:".env"})," file, starts all agents and gateways defined in your ",(0,s.jsx)(n.code,{children:"configs/"})," directory, and launches the web UI if you configured one."]}),"\n",(0,s.jsx)(n.h3,{id:"running-specific-components",children:"Running Specific Components"}),"\n",(0,s.jsx)(n.p,{children:"To run only specific agents or gateways, provide the configuration files as arguments:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"solace-agent-mesh run configs/agents/orchestrator.yaml configs/gateways/webui.yaml\n"})}),"\n",(0,s.jsx)(n.h3,{id:"using-the-short-alias",children:"Using the Short Alias"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"sam"})," alias provides a shorter alternative to the full command name:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sam run\n"})}),"\n",(0,s.jsx)(n.h2,{id:"limitations",children:"Limitations"}),"\n",(0,s.jsx)(n.p,{children:"When running from a wheel file, certain features have limitations compared to the Docker-based deployment."}),"\n",(0,s.jsx)(n.h3,{id:"no-dynamic-agent-deployment",children:"No Dynamic Agent Deployment"}),"\n",(0,s.jsx)(n.p,{children:"Dynamic agent deployment through the UI or API is not supported when running from a wheel file. You cannot deploy new agents at runtime through the web interface, upload agent configurations through the API, or dynamically add or remove agents without restarting. All agents must be defined in configuration files before you start the application."}),"\n",(0,s.jsx)(n.h3,{id:"custom-agent-code",children:"Custom Agent Code"}),"\n",(0,s.jsxs)(n.p,{children:["To create custom agents with Python tools and lifecycle functions, follow the standard agent creation process. For detailed instructions on creating agents with custom code, see ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/developing/create-agents",children:"Creating Agents"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"accessing-the-web-ui",children:"Accessing the Web UI"}),"\n",(0,s.jsxs)(n.p,{children:["After starting Agent Mesh Enterprise, access the web interface at the configured port (default: ",(0,s.jsx)(n.code,{children:"http://localhost:8000"}),")."]}),"\n",(0,s.jsx)(n.p,{children:"If you specified a different port in your gateway configuration, use that port instead."}),"\n",(0,s.jsx)(n.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,s.jsxs)(n.p,{children:["After running Agent Mesh Enterprise from the wheel file, you can configure authentication and authorization for your deployment. For information about setting up authentication, see ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/enterprise/single-sign-on",children:"Single Sign-On"}),". For information about configuring authorization, see ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/enterprise/rbac-setup-guide",children:"Role-Based Access Control"}),". For production deployment considerations, see ",(0,s.jsx)(n.a,{href:"/solace-agent-mesh/docs/documentation/deploying/deployment-options",children:"deployment options"}),"."]})]})}function d(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(6540);const s={},o=i.createContext(s);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[1947],{3239:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>r,contentTitle:()=>c,default:()=>h,frontMatter:()=>l,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"documentation/components/builtin-tools/audio-tools","title":"Audio Tools","description":"This guide provides technical documentation for the text-to-speech (TTS) tools available in Agent Mesh.","source":"@site/docs/documentation/components/builtin-tools/audio-tools.md","sourceDirName":"documentation/components/builtin-tools","slug":"/documentation/components/builtin-tools/audio-tools","permalink":"/solace-agent-mesh/docs/documentation/components/builtin-tools/audio-tools","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/components/builtin-tools/audio-tools.md","tags":[],"version":"current","sidebarPosition":30,"frontMatter":{"title":"Audio Tools","sidebar_position":30},"sidebar":"docSidebar","previous":{"title":"Data Analysis Tools","permalink":"/solace-agent-mesh/docs/documentation/components/builtin-tools/data-analysis-tools"},"next":{"title":"Dynamic Embeds","permalink":"/solace-agent-mesh/docs/documentation/components/builtin-tools/embeds"}}');var o=i(4848),s=i(8453);const l={title:"Audio Tools",sidebar_position:30},c="Using Text-to-Speech (TTS) Tools",r={},d=[{value:"Overview",id:"overview",level:2},{value:"Setup and Configuration",id:"setup-and-configuration",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Basic Configuration",id:"basic-configuration",level:3},{value:"Advanced Configuration",id:"advanced-configuration",level:2},{value:"<code>text_to_speech</code> Configuration",id:"text_to_speech-configuration",level:3},{value:"<code>multi_speaker_text_to_speech</code> Configuration",id:"multi_speaker_text_to_speech-configuration",level:3},{value:"Features",id:"features",level:2},{value:"Intelligent Tone Selection",id:"intelligent-tone-selection",level:3},{value:"Multi-Language Support",id:"multi-language-support",level:3},{value:"Usage Examples",id:"usage-examples",level:2},{value:"Single-Voice Text-to-Speech (<code>text_to_speech</code>)",id:"single-voice-text-to-speech-text_to_speech",level:3},{value:"Multi-Speaker Text-to-Speech (<code>multi_speaker_text_to_speech</code>)",id:"multi-speaker-text-to-speech-multi_speaker_text_to_speech",level:3},{value:"Tool Reference",id:"tool-reference",level:2},{value:"<code>text_to_speech</code>",id:"text_to_speech",level:3},{value:"<code>multi_speaker_text_to_speech</code>",id:"multi_speaker_text_to_speech",level:3},{value:"Output and Metadata",id:"output-and-metadata",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2}];function a(e){const n={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"using-text-to-speech-tts-tools",children:"Using Text-to-Speech (TTS) Tools"})}),"\n",(0,o.jsx)(n.p,{children:"This guide provides technical documentation for the text-to-speech (TTS) tools available in Agent Mesh."}),"\n",(0,o.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"audio"})," tool group provides two primary TTS tools for generating high-quality audio artifacts:"]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"text_to_speech"})}),": Converts a string of text to speech using a single voice, featuring intelligent tone selection."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"multi_speaker_text_to_speech"})}),": Converts a conversational script, delineated by speaker, into a multi-speaker audio file."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"setup-and-configuration",children:"Setup and Configuration"}),"\n",(0,o.jsx)(n.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"API Key"}),": A valid Google Gemini API key with access to the TTS model is required."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Dependencies"}),": The ",(0,o.jsx)(n.code,{children:"pydub"})," library is necessary for audio processing and format conversion. It can be installed via ",(0,o.jsx)(n.code,{children:"pip install pydub"}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"basic-configuration",children:"Basic Configuration"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Environment Variable"}),": The Gemini API key must be set as an environment variable.","\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'export GEMINI_API_KEY="your_gemini_api_key_here"\n'})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Enablement"}),": The ",(0,o.jsx)(n.code,{children:"audio"})," tool group must be enabled in the agent's ",(0,o.jsx)(n.code,{children:"app_config.yml"}),".","\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-yaml",children:'tools:\n - tool_type: builtin-group\n group_name: "audio"\n'})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"advanced-configuration",children:"Advanced Configuration"}),"\n",(0,o.jsxs)(n.p,{children:["You can exercise more granular control over the TTS tools by providing a ",(0,o.jsx)(n.code,{children:"tool_config"})," block for each tool in your ",(0,o.jsx)(n.code,{children:"app_config.yml"}),"."]}),"\n",(0,o.jsxs)(n.h3,{id:"text_to_speech-configuration",children:[(0,o.jsx)(n.code,{children:"text_to_speech"})," Configuration"]}),"\n",(0,o.jsx)(n.p,{children:"This example shows how to set a default voice and define the mapping between tones and specific voice models."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-yaml",children:'- tool_type: builtin\n tool_name: "text_to_speech"\n tool_config:\n gemini_api_key: ${GEMINI_API_KEY}\n model: "gemini-2.5-flash-preview-tts"\n voice_name: "Kore" # Default voice if no tone is matched\n language: "en-US" # Default language\n output_format: "mp3"\n # Voice selection by tone mapping\n voice_tone_mapping:\n bright: ["Zephyr", "Autonoe"]\n upbeat: ["Puck", "Laomedeia"]\n informative: ["Charon", "Rasalgethi"]\n firm: ["Kore", "Orus", "Alnilam"]\n friendly: ["Achird"]\n casual: ["Zubenelgenubi"]\n warm: ["Sulafar"]\n'})}),"\n",(0,o.jsxs)(n.h3,{id:"multi_speaker_text_to_speech-configuration",children:[(0,o.jsx)(n.code,{children:"multi_speaker_text_to_speech"})," Configuration"]}),"\n",(0,o.jsx)(n.p,{children:"This example defines default voice configurations for up to five speakers."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-yaml",children:'- tool_type: builtin\n tool_name: "multi_speaker_text_to_speech"\n tool_config:\n gemini_api_key: ${GEMINI_API_KEY}\n model: "gemini-2.5-flash-preview-tts"\n language: "en-US"\n output_format: "mp3"\n # Default speaker voice configurations\n default_speakers:\n - { name: "Speaker1", voice: "Kore", tone: "firm" }\n - { name: "Speaker2", voice: "Puck", tone: "upbeat" }\n - { name: "Speaker3", voice: "Charon", tone: "informative" }\n - { name: "Speaker4", voice: "Achird", tone: "friendly" }\n - { name: "Speaker5", voice: "Sulafar", tone: "warm" }\n # The voice_tone_mapping can also be included here\n'})}),"\n",(0,o.jsx)(n.h2,{id:"features",children:"Features"}),"\n",(0,o.jsx)(n.h3,{id:"intelligent-tone-selection",children:"Intelligent Tone Selection"}),"\n",(0,o.jsx)(n.p,{children:"The system supports tone-based voice selection, allowing for dynamic voice choice based on desired emotional or stylistic output, rather than explicit voice names."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Available Tones"}),":\n",(0,o.jsx)(n.code,{children:"bright"}),", ",(0,o.jsx)(n.code,{children:"upbeat"}),", ",(0,o.jsx)(n.code,{children:"informative"}),", ",(0,o.jsx)(n.code,{children:"firm"}),", ",(0,o.jsx)(n.code,{children:"excitable"}),", ",(0,o.jsx)(n.code,{children:"youthful"}),", ",(0,o.jsx)(n.code,{children:"breezy"}),", ",(0,o.jsx)(n.code,{children:"easy-going"}),", ",(0,o.jsx)(n.code,{children:"breathy"}),", ",(0,o.jsx)(n.code,{children:"clear"}),", ",(0,o.jsx)(n.code,{children:"smooth"}),", ",(0,o.jsx)(n.code,{children:"gravelly"}),", ",(0,o.jsx)(n.code,{children:"soft"}),", ",(0,o.jsx)(n.code,{children:"even"}),", ",(0,o.jsx)(n.code,{children:"mature"}),", ",(0,o.jsx)(n.code,{children:"forward"}),", ",(0,o.jsx)(n.code,{children:"friendly"}),", ",(0,o.jsx)(n.code,{children:"casual"}),", ",(0,o.jsx)(n.code,{children:"gentle"}),", ",(0,o.jsx)(n.code,{children:"lively"}),", ",(0,o.jsx)(n.code,{children:"knowledgeable"}),", ",(0,o.jsx)(n.code,{children:"warm"})]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Tone Aliases"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"professional"})," \u2192 ",(0,o.jsx)(n.code,{children:"firm"})]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"cheerful"})," \u2192 ",(0,o.jsx)(n.code,{children:"upbeat"})]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"calm"})," \u2192 ",(0,o.jsx)(n.code,{children:"soft"})]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"conversational"})," \u2192 ",(0,o.jsx)(n.code,{children:"casual"})]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"multi-language-support",children:"Multi-Language Support"}),"\n",(0,o.jsxs)(n.p,{children:["The tools support over 25 languages, specified via BCP-47 language codes (for example, ",(0,o.jsx)(n.code,{children:"en-US"}),", ",(0,o.jsx)(n.code,{children:"fr-FR"}),", ",(0,o.jsx)(n.code,{children:"es-US"}),", ",(0,o.jsx)(n.code,{children:"ja-JP"}),")."]}),"\n",(0,o.jsx)(n.h2,{id:"usage-examples",children:"Usage Examples"}),"\n",(0,o.jsxs)(n.h3,{id:"single-voice-text-to-speech-text_to_speech",children:["Single-Voice Text-to-Speech (",(0,o.jsx)(n.code,{children:"text_to_speech"}),")"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Basic Usage"})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'Convert the following text to speech: "Welcome to the technical briefing on artificial intelligence."\n'})}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"With Tone Selection"})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'Convert this text to speech with a professional tone: "Thank you for joining today\'s technical review."\n'})}),"\n",(0,o.jsxs)(n.h3,{id:"multi-speaker-text-to-speech-multi_speaker_text_to_speech",children:["Multi-Speaker Text-to-Speech (",(0,o.jsx)(n.code,{children:"multi_speaker_text_to_speech"}),")"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Basic Conversation"})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"Convert this conversation to speech:\nSpeaker1: Welcome to the podcast.\nSpeaker2: Thank you for having me.\n"})}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"With Custom Speaker Tones"})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"Convert this conversation using specific tones for each speaker:\n- Speaker1 should sound professional\n- Speaker2 should sound friendly\n\nConversation:\nSpeaker1: Good morning, this is the daily security briefing.\nSpeaker2: Hi everyone, let's review the agenda for today's session.\n"})}),"\n",(0,o.jsx)(n.h2,{id:"tool-reference",children:"Tool Reference"}),"\n",(0,o.jsx)(n.h3,{id:"text_to_speech",children:(0,o.jsx)(n.code,{children:"text_to_speech"})}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Parameter"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"text"})}),(0,o.jsx)(n.td,{children:"string"}),(0,o.jsx)(n.td,{children:"The text to be synthesized."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"output_filename"})}),(0,o.jsx)(n.td,{children:"string"}),(0,o.jsx)(n.td,{children:"(Optional) A custom MP3 filename."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"voice_name"})}),(0,o.jsx)(n.td,{children:"string"}),(0,o.jsx)(n.td,{children:"(Optional) A specific voice name to use."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"tone"})}),(0,o.jsx)(n.td,{children:"string"}),(0,o.jsx)(n.td,{children:"(Optional) The desired voice tone."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"language"})}),(0,o.jsx)(n.td,{children:"string"}),(0,o.jsx)(n.td,{children:"(Optional) The BCP-47 language code."})]})]})]}),"\n",(0,o.jsx)(n.h3,{id:"multi_speaker_text_to_speech",children:(0,o.jsx)(n.code,{children:"multi_speaker_text_to_speech"})}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Parameter"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"conversation_text"})}),(0,o.jsx)(n.td,{children:"string"}),(0,o.jsxs)(n.td,{children:["A string of text with speaker labels (for example, ",(0,o.jsx)(n.code,{children:"S1: ..."}),")."]})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"output_filename"})}),(0,o.jsx)(n.td,{children:"string"}),(0,o.jsx)(n.td,{children:"(Optional) A custom MP3 filename."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"speaker_configs"})}),(0,o.jsx)(n.td,{children:"array"}),(0,o.jsx)(n.td,{children:"(Optional) An array to configure tones for specific speakers."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"language"})}),(0,o.jsx)(n.td,{children:"string"}),(0,o.jsx)(n.td,{children:"(Optional) The BCP-47 language code."})]})]})]}),"\n",(0,o.jsx)(n.h2,{id:"output-and-metadata",children:"Output and Metadata"}),"\n",(0,o.jsx)(n.p,{children:"Both tools generate an MP3 audio artifact that includes a rich set of metadata:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"The source text (or a truncated version for long inputs)"}),"\n",(0,o.jsx)(n.li,{children:"The voice(s) and language used for synthesis"}),"\n",(0,o.jsx)(n.li,{children:"The generation timestamp and the specific tool invoked"}),"\n",(0,o.jsx)(n.li,{children:"The requested tone and any speaker-specific configurations"}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"Error: GEMINI_API_KEY is required"})}),": This indicates that the ",(0,o.jsx)(n.code,{children:"GEMINI_API_KEY"})," environment variable has not been set correctly."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"Warning: Unknown tone 'xyz'"})}),": The specified tone is not recognized. Refer to the list of supported tones. The system will fall back to a default voice."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:(0,o.jsx)(n.code,{children:"Error: Failed to convert WAV to MP3"})}),": This typically indicates that ",(0,o.jsx)(n.code,{children:"pydub"})," is not installed or that the underlying system is missing necessary audio codecs (for example, ",(0,o.jsx)(n.code,{children:"ffmpeg"}),")."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>l,x:()=>c});var t=i(6540);const o={},s=t.createContext(o);function l(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:l(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[3219],{5937:(t,e,s)=>{s.d(e,{A:()=>r});var i=s(2453),n=s(4886);const r=(t,e)=>i.A.lang.round(n.A.parse(t)[e])},4540:(t,e,s)=>{s.d(e,{A:()=>r});var i=s(1750),n=s(451),r=(0,i.K2)(((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)}),"getDiagramElement")},8833:(t,e,s)=>{s.d(e,{P:()=>n});var i=s(1750),n=(0,i.K2)(((t,e,s,n)=>{t.attr("class",s);const{width:c,height:o,x:l,y:h}=r(t,e);(0,i.a$)(t,o,c,n);const u=a(l,h,c,o,e);t.attr("viewBox",u),i.Rm.debug(`viewBox configured: ${u} with padding: ${e}`)}),"setupViewPortForSVG"),r=(0,i.K2)(((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}}),"calculateDimensionsWithPadding"),a=(0,i.K2)(((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`),"createViewBox")},8457:(t,e,s)=>{s.d(e,{diagram:()=>m});var i=s(4540),n=s(8833),r=s(6912),a=(s(4895),s(70),s(6896),s(8823),s(5683),s(8506),s(6792)),c=s(1750),o=s(451),l=s(5937),h=s(5582),u=function(){var t=(0,c.K2)((function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s}),"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],s=[1,10],i=[1,11],n=[1,12],r=[1,13],a=[1,20],o=[1,21],l=[1,22],h=[1,23],u=[1,24],y=[1,19],d=[1,25],p=[1,26],_=[1,18],g=[1,33],b=[1,34],m=[1,35],f=[1,36],E=[1,37],k=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],S=[1,42],O=[1,43],T=[1,52],A=[40,50,68,69],R=[1,63],N=[1,61],I=[1,58],C=[1,62],x=[1,64],v=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],D=[63,64,65,66,67],$=[1,81],w=[1,80],K=[1,78],L=[1,79],M=[6,10,42,47],B=[6,10,13,41,42,47,48,49],F=[1,89],P=[1,88],Y=[1,87],G=[19,56],z=[1,98],U=[1,97],Z=[19,56,58,60],j={trace:(0,c.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:(0,c.K2)((function(t,e,s,i,n,r,a){var c=r.length-1;switch(n){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:r[c-1].push(r[c]),this.$=r[c-1];break;case 4:case 5:case 55:case 78:case 62:case 63:case 66:this.$=r[c];break;case 8:i.addEntity(r[c-4]),i.addEntity(r[c-2]),i.addRelationship(r[c-4],r[c],r[c-2],r[c-3]);break;case 9:i.addEntity(r[c-8]),i.addEntity(r[c-4]),i.addRelationship(r[c-8],r[c],r[c-4],r[c-5]),i.setClass([r[c-8]],r[c-6]),i.setClass([r[c-4]],r[c-2]);break;case 10:i.addEntity(r[c-6]),i.addEntity(r[c-2]),i.addRelationship(r[c-6],r[c],r[c-2],r[c-3]),i.setClass([r[c-6]],r[c-4]);break;case 11:i.addEntity(r[c-6]),i.addEntity(r[c-4]),i.addRelationship(r[c-6],r[c],r[c-4],r[c-5]),i.setClass([r[c-4]],r[c-2]);break;case 12:i.addEntity(r[c-3]),i.addAttributes(r[c-3],r[c-1]);break;case 13:i.addEntity(r[c-5]),i.addAttributes(r[c-5],r[c-1]),i.setClass([r[c-5]],r[c-3]);break;case 14:i.addEntity(r[c-2]);break;case 15:i.addEntity(r[c-4]),i.setClass([r[c-4]],r[c-2]);break;case 16:i.addEntity(r[c]);break;case 17:i.addEntity(r[c-2]),i.setClass([r[c-2]],r[c]);break;case 18:i.addEntity(r[c-6],r[c-4]),i.addAttributes(r[c-6],r[c-1]);break;case 19:i.addEntity(r[c-8],r[c-6]),i.addAttributes(r[c-8],r[c-1]),i.setClass([r[c-8]],r[c-3]);break;case 20:i.addEntity(r[c-5],r[c-3]);break;case 21:i.addEntity(r[c-7],r[c-5]),i.setClass([r[c-7]],r[c-2]);break;case 22:i.addEntity(r[c-3],r[c-1]);break;case 23:i.addEntity(r[c-5],r[c-3]),i.setClass([r[c-5]],r[c]);break;case 24:case 25:this.$=r[c].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=r[c].trim(),i.setAccDescription(this.$);break;case 32:i.setDirection("TB");break;case 33:i.setDirection("BT");break;case 34:i.setDirection("RL");break;case 35:i.setDirection("LR");break;case 36:this.$=r[c-3],i.addClass(r[c-2],r[c-1]);break;case 37:case 38:case 56:case 64:case 43:this.$=[r[c]];break;case 39:case 40:this.$=r[c-2].concat([r[c]]);break;case 41:this.$=r[c-2],i.setClass(r[c-1],r[c]);break;case 42:this.$=r[c-3],i.addCssStyles(r[c-2],r[c-1]);break;case 44:case 65:r[c-2].push(r[c]),this.$=r[c-2];break;case 46:this.$=r[c-1]+r[c];break;case 54:case 76:case 77:case 67:this.$=r[c].replace(/"/g,"");break;case 57:r[c].push(r[c-1]),this.$=r[c];break;case 58:this.$={type:r[c-1],name:r[c]};break;case 59:this.$={type:r[c-2],name:r[c-1],keys:r[c]};break;case 60:this.$={type:r[c-2],name:r[c-1],comment:r[c]};break;case 61:this.$={type:r[c-3],name:r[c-2],keys:r[c-1],comment:r[c]};break;case 68:this.$={cardA:r[c],relType:r[c-1],cardB:r[c-2]};break;case 69:this.$=i.Cardinality.ZERO_OR_ONE;break;case 70:this.$=i.Cardinality.ZERO_OR_MORE;break;case 71:this.$=i.Cardinality.ONE_OR_MORE;break;case 72:this.$=i.Cardinality.ONLY_ONE;break;case 73:this.$=i.Cardinality.MD_PARENT;break;case 74:this.$=i.Identification.NON_IDENTIFYING;break;case 75:this.$=i.Identification.IDENTIFYING}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:s,24:i,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:o,35:l,36:h,37:u,40:y,43:d,44:p,50:_},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:s,24:i,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:o,35:l,36:h,37:u,40:y,43:d,44:p,50:_},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:g,64:b,65:m,66:f,67:E}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(k,[2,54]),t(k,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:S,41:O},{16:44,40:S,41:O},{16:45,40:S,41:O},t(e,[2,4]),{11:46,40:y,50:_},{16:47,40:S,41:O},{18:48,19:[1,49],51:50,52:51,56:T},{11:53,40:y,50:_},{62:54,68:[1,55],69:[1,56]},t(A,[2,69]),t(A,[2,70]),t(A,[2,71]),t(A,[2,72]),t(A,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:R,38:57,41:N,42:I,45:59,46:60,48:C,49:x},t(v,[2,37]),t(v,[2,38]),{16:65,40:S,41:O,42:I},{13:R,38:66,41:N,42:I,45:59,46:60,48:C,49:x},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:I,63:g,64:b,65:m,66:f,67:E}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:T},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:g,64:b,65:m,66:f,67:E},t(D,[2,74]),t(D,[2,75]),{6:$,10:w,39:77,42:K,47:L},{40:[1,82],41:[1,83]},t(M,[2,43],{46:84,13:R,41:N,48:C,49:x}),t(B,[2,45]),t(B,[2,50]),t(B,[2,51]),t(B,[2,52]),t(B,[2,53]),t(e,[2,41],{42:I}),{6:$,10:w,39:85,42:K,47:L},{14:86,40:F,50:P,70:Y},{16:90,40:S,41:O},{11:91,40:y,50:_},{18:92,19:[1,93],51:50,52:51,56:T},t(e,[2,12]),{19:[2,57]},t(G,[2,58],{54:94,55:95,57:96,59:z,60:U}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:R,41:N,45:101,46:60,48:C,49:x},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(v,[2,39]),t(v,[2,40]),t(B,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:I},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(G,[2,59],{55:106,58:[1,107],60:U}),t(G,[2,60]),t(Z,[2,64]),t(G,[2,67]),t(Z,[2,66]),{18:108,19:[1,109],51:50,52:51,56:T},{16:110,40:S,41:O},t(M,[2,44],{46:84,13:R,41:N,48:C,49:x}),{14:111,40:F,50:P,70:Y},{16:112,40:S,41:O},{14:113,40:F,50:P,70:Y},t(e,[2,13]),t(G,[2,61]),{57:114,59:z},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:I}),t(e,[2,11]),{13:[1,117],42:I},t(e,[2,10]),t(Z,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:T},{14:120,40:F,50:P,70:Y},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:(0,c.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,c.K2)((function(t){var e=this,s=[0],i=[],n=[null],r=[],a=this.table,o="",l=0,h=0,u=0,y=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var b=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||d.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)((function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t}),"popStack"),(0,c.K2)(m,"lex");for(var f,E,k,S,O,T,A,R,N,I={};;){if(k=s[s.length-1],this.defaultActions[k]?S=this.defaultActions[k]:(null==f&&(f=m()),S=a[k]&&a[k][f]),void 0===S||!S.length||!S[0]){var C="";for(T in N=[],a[k])this.terminals_[T]&&T>2&&N.push("'"+this.terminals_[T]+"'");C=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+N.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:g,expected:N})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+f);switch(S[0]){case 1:s.push(f),n.push(d.yytext),r.push(d.yylloc),s.push(S[1]),f=null,E?(f=E,E=null):(h=d.yyleng,o=d.yytext,l=d.yylineno,g=d.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[S[1]][1],I.$=n[n.length-A],I._$={first_line:r[r.length-(A||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(A||1)].first_column,last_column:r[r.length-1].last_column},b&&(I._$.range=[r[r.length-(A||1)].range[0],r[r.length-1].range[1]]),void 0!==(O=this.performAction.apply(I,[o,h,l,p.yy,S[1],n,r].concat(y))))return O;A&&(s=s.slice(0,-1*A*2),n=n.slice(0,-1*A),r=r.slice(0,-1*A)),s.push(this.productions_[S[1]][0]),n.push(I.$),r.push(I._$),R=a[s[s.length-2]][s[s.length-1]],s.push(R);break;case 3:return!0}}return!0}),"parse")},W=function(){return{EOF:1,parseError:(0,c.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,c.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,c.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,c.K2)((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,c.K2)((function(){return this._more=!0,this}),"more"),reject:(0,c.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,c.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,c.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,c.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,c.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,c.K2)((function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1}),"test_match"),next:(0,c.K2)((function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,c.K2)((function(){var t=this.next();return t||this.lex()}),"lex"),begin:(0,c.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,c.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,c.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,c.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,c.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,c.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)((function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 59;case 25:case 26:return 56;case 27:return 60;case 29:return this.popState(),19;case 30:case 73:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 59:return 63;case 42:case 43:case 44:case 52:case 54:case 61:return 65;case 47:case 48:case 49:case 50:case 51:case 53:case 60:return 64;case 55:case 56:case 57:case 58:return 66;case 62:return 67;case 63:case 66:case 67:case 68:return 68;case 64:case 65:return 69;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 74:return 6}}),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}}}();function X(){this.yy={}}return j.lexer=W,(0,c.K2)(X,"Parser"),X.prototype=j,j.Parser=X,new X}();u.parser=u;var y=u,d=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=c.SV,this.getAccTitle=c.iN,this.setAccDescription=c.EI,this.getAccDescription=c.m7,this.setDiagramTitle=c.ke,this.getDiagramTitle=c.ab,this.getConfig=(0,c.K2)((()=>(0,c.D7)().er),"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,c.K2)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,c.Rm.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,c.D7)().look??"default",cssClasses:"default",cssStyles:[]}),c.Rm.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){const s=this.addEntity(t);let i;for(i=e.length-1;i>=0;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),c.Rm.debug("Added attribute ",e[i].name)}addRelationship(t,e,s,i){const n=this.entities.get(t),r=this.entities.get(s);if(!n||!r)return;const a={entityA:n.id,roleA:e,entityB:r.id,relSpec:i};this.relationships.push(a),c.Rm.debug("Added new relationship :",a)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map((t=>t.trim()))),t?.textStyles&&(e=[...e,...t.textStyles??[]].map((t=>t.trim())))}return e}addCssStyles(t,e){for(const s of t){const t=this.entities.get(s);if(!e||!t)return;for(const s of e)t.cssStyles.push(s)}}addClass(t,e){t.forEach((t=>{let s=this.classes.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},this.classes.set(t,s)),e&&e.forEach((function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");s.textStyles.push(e)}s.styles.push(t)}))}))}setClass(t,e){for(const s of t){const t=this.entities.get(s);if(t)for(const s of e)t.cssClasses+=" "+s}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,c.IU)()}getData(){const t=[],e=[],s=(0,c.D7)();for(const n of this.entities.keys()){const e=this.entities.get(n);e&&(e.cssCompiledStyles=this.getCompiledStyles(e.cssClasses.split(" ")),t.push(e))}let i=0;for(const n of this.relationships){const t={id:(0,a.rY)(n.entityA,n.entityB,{prefix:"id",counter:i++}),type:"normal",curve:"basis",start:n.entityA,end:n.entityB,label:n.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:n.relSpec.cardB.toLowerCase(),arrowTypeEnd:n.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==n.relSpec.relType?"solid":"dashed",look:s.look};e.push(t)}return{nodes:t,edges:e,other:{},config:s,direction:"TB"}}},p={};(0,c.VA)(p,{draw:()=>_});var _=(0,c.K2)((async function(t,e,s,l){c.Rm.info("REF0:"),c.Rm.info("Drawing er diagram (unified)",e);const{securityLevel:h,er:u,layout:y}=(0,c.D7)(),d=l.db.getData(),p=(0,i.A)(e,h);d.type=l.type,d.layoutAlgorithm=(0,r.q7)(y),d.config.flowchart.nodeSpacing=u?.nodeSpacing||140,d.config.flowchart.rankSpacing=u?.rankSpacing||80,d.direction=l.db.getDirection(),d.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],d.diagramId=e,await(0,r.XX)(d,p),"elk"===d.layoutAlgorithm&&p.select(".edges").lower();const _=p.selectAll('[id*="-background"]');Array.from(_).length>0&&_.each((function(){const t=(0,o.Ltv)(this),e=t.attr("id").replace("-background",""),s=p.select(`#${CSS.escape(e)}`);if(!s.empty()){const e=s.attr("transform");t.attr("transform",e)}}));a._K.insertTitle(p,"erDiagramTitleText",u?.titleTopMargin??25,l.db.getDiagramTitle()),(0,n.P)(p,8,"erDiagram",u?.useMaxWidth??!0)}),"draw"),g=(0,c.K2)(((t,e)=>{const s=l.A,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return h.A(i,n,r,e)}),"fade"),b=(0,c.K2)((t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${g(t.tertiaryColor,.5)};\n }\n\n .edgeLabel .label {\n fill: ${t.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .edge-pattern-dashed {\n stroke-dasharray: 8,8;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon\n {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n`),"getStyles"),m={parser:y,get db(){return new d},renderer:p,styles:b}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[1862],{1133:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>x,frontMatter:()=>l,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"documentation/migrations/a2a-upgrade/a2a-technical-migration-map","title":"A2A Technical Migration Map","description":"This document provides a comprehensive, technical mapping for migrating Agent Mesh components from the legacy A2A implementation to the new a2a-sdk-based protocol. It is designed to be used as a reference for automated or semi-automated code refactoring.","source":"@site/docs/documentation/migrations/a2a-upgrade/a2a-technical-migration-map.md","sourceDirName":"documentation/migrations/a2a-upgrade","slug":"/documentation/migrations/a2a-upgrade/a2a-technical-migration-map","permalink":"/solace-agent-mesh/docs/documentation/migrations/a2a-upgrade/a2a-technical-migration-map","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/migrations/a2a-upgrade/a2a-technical-migration-map.md","tags":[],"version":"current","sidebarPosition":20,"frontMatter":{"title":"A2A Technical Migration Map","sidebar_position":20},"sidebar":"docSidebar","previous":{"title":"Migration Guide: Upgrading to the A2A SDK","permalink":"/solace-agent-mesh/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0"},"next":{"title":"Agent Mesh Enterprise","permalink":"/solace-agent-mesh/docs/documentation/enterprise/"}}');var a=s(4848),r=s(8453);const l={title:"A2A Technical Migration Map",sidebar_position:20},i=void 0,d={},c=[{value:"Core Concept Changes",id:"core-concept-changes",level:2},{value:"Import and Type Mapping",id:"import-and-type-mapping",level:2},{value:"Import Paths",id:"import-paths",level:3},{value:"Type Hints",id:"type-hints",level:3},{value:"Object Creation and Property Access Mapping",id:"object-creation-and-property-access-mapping",level:2},{value:"Full Method Examples",id:"full-method-examples",level:2},{value:"Example 1: <code>_translate_external_input</code>",id:"example-1-_translate_external_input",level:3},{value:"Example 2: <code>_send_update_to_external</code>",id:"example-2-_send_update_to_external",level:3},{value:"Example 3: <code>_send_final_response_to_external</code>",id:"example-3-_send_final_response_to_external",level:3},{value:"Example 4: <code>_send_error_to_external</code>",id:"example-4-_send_error_to_external",level:3}];function o(e){const t={code:"code",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.p,{children:["This document provides a comprehensive, technical mapping for migrating Agent Mesh components from the legacy A2A implementation to the new ",(0,a.jsx)(t.code,{children:"a2a-sdk"}),"-based protocol. It is designed to be used as a reference for automated or semi-automated code refactoring."]}),"\n",(0,a.jsx)(t.h2,{id:"core-concept-changes",children:"Core Concept Changes"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Session vs. Context:"})," The concept of a session, previously ",(0,a.jsx)(t.code,{children:"Task.sessionId"}),", is now attached to the ",(0,a.jsx)(t.code,{children:"Message"})," via ",(0,a.jsx)(t.code,{children:"Message.contextId"}),". The ",(0,a.jsx)(t.code,{children:"Task"})," also has a ",(0,a.jsx)(t.code,{children:"contextId"}),", but it's primarily for grouping. Code that relied on ",(0,a.jsx)(t.code,{children:"Task.sessionId"})," for conversation history must now use ",(0,a.jsx)(t.code,{children:"Message.contextId"}),"."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Request/Response Structure:"})," The structure of JSON-RPC requests and responses is now strictly defined by the SDK's Pydantic models (e.g., ",(0,a.jsx)(t.code,{children:"SendMessageRequest"}),", ",(0,a.jsx)(t.code,{children:"JSONRPCResponse"})," as a discriminated union). Direct dictionary manipulation is replaced by model instantiation and validation."]}),"\n",(0,a.jsxs)(t.li,{children:[(0,a.jsx)(t.strong,{children:"Status Signaling:"})," The practice of embedding custom status signals (e.g., ",(0,a.jsx)(t.code,{children:"tool_invocation_start"}),") in the ",(0,a.jsx)(t.code,{children:"metadata"})," field of a message is deprecated. The new standard is to use a dedicated, structured ",(0,a.jsx)(t.code,{children:"DataPart"})," within a multi-part ",(0,a.jsx)(t.code,{children:"Message"}),"."]}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"import-and-type-mapping",children:"Import and Type Mapping"}),"\n",(0,a.jsx)(t.h3,{id:"import-paths",children:"Import Paths"}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"Old Import Path"}),(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"New Import Path(s)"}),(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"Notes"})]})}),(0,a.jsxs)(t.tbody,{children:[(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"solace_agent_mesh.common.types"})}),(0,a.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,a.jsx)(t.code,{children:"a2a.types"}),", ",(0,a.jsx)(t.code,{children:"solace_agent_mesh.common.a2a"}),", ",(0,a.jsx)(t.code,{children:"solace_agent_mesh.common.a2a.types"})]}),(0,a.jsxs)(t.td,{style:{textAlign:"left"},children:["Legacy types are removed. Use SDK types and the ",(0,a.jsx)(t.code,{children:"a2a"})," helper layer."]})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"solace_agent_mesh.common.a2a_protocol"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"solace_agent_mesh.common.a2a"})}),(0,a.jsxs)(t.td,{style:{textAlign:"left"},children:["Protocol helpers (topic builders, etc.) are now in the main ",(0,a.jsx)(t.code,{children:"a2a"})," helper package."]})]})]})]}),"\n",(0,a.jsx)(t.h3,{id:"type-hints",children:"Type Hints"}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"Old Type Hint"}),(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"New Type Hint"}),(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"Notes"})]})}),(0,a.jsxs)(t.tbody,{children:[(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"A2APart"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"ContentPart"})}),(0,a.jsxs)(t.td,{style:{textAlign:"left"},children:[(0,a.jsx)(t.code,{children:"ContentPart"})," is an alias for ",(0,a.jsx)(t.code,{children:"Union[TextPart, DataPart, FilePart]"}),"."]})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"List[A2APart]"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"List[ContentPart]"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Standard type hint for a list of message parts."})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"FileContent"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"Union[FileWithBytes, FileWithUri]"})}),(0,a.jsxs)(t.td,{style:{textAlign:"left"},children:["The ",(0,a.jsx)(t.code,{children:"file"})," attribute of a ",(0,a.jsx)(t.code,{children:"FilePart"})," is now a discriminated union."]})]})]})]}),"\n",(0,a.jsx)(t.h2,{id:"object-creation-and-property-access-mapping",children:"Object Creation and Property Access Mapping"}),"\n",(0,a.jsxs)(t.p,{children:["This table maps common legacy patterns to their new equivalents using the ",(0,a.jsx)(t.code,{children:"a2a"})," helper layer."]}),"\n",(0,a.jsxs)(t.table,{children:[(0,a.jsx)(t.thead,{children:(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"Action"}),(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"Old Pattern (Legacy)"}),(0,a.jsx)(t.th,{style:{textAlign:"left"},children:"New Pattern (a2a-sdk + Helpers)"})]})}),(0,a.jsxs)(t.tbody,{children:[(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.strong,{children:"Part Creation"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"}}),(0,a.jsx)(t.td,{style:{textAlign:"left"}})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Create Text Part"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"TextPart(text=...)"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.create_text_part(text=...)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Create File Part (URI)"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"FilePart(file=FileContent(name=..., uri=...))"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.create_file_part_from_uri(uri=..., name=...)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Create File Part (Bytes)"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"FilePart(file=FileContent(bytes=...))"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.create_file_part_from_bytes(content_bytes=...)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Create Data Part"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"DataPart(data=...)"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.create_data_part(data=...)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.strong,{children:"Task/Event Access"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"}}),(0,a.jsx)(t.td,{style:{textAlign:"left"}})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Task ID"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"task.id"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_task_id(task)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Task Status"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"task.status.state"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_task_status(task)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Task Context ID"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"task.sessionId"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_task_context_id(task)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Event's Task ID"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"event.id"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"event.task_id"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.strong,{children:"Message Access"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"}}),(0,a.jsx)(t.td,{style:{textAlign:"left"}})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Message Parts"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"message.parts"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_parts_from_message(message)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Text from Message"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"(manual loop over parts)"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_text_from_message(message)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Data Parts"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"(manual loop over parts)"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_data_parts_from_message(message)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.strong,{children:"Error Access"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"}}),(0,a.jsx)(t.td,{style:{textAlign:"left"}})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Error Message"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"error.message"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_error_message(error)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Error Code"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"error.code"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_error_code(error)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Get Error Data"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"error.data"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.get_error_data(error)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.strong,{children:"Protocol/RPC"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"}}),(0,a.jsx)(t.td,{style:{textAlign:"left"}})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Create RPC Success"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"JSONRPCResponse(id=..., result=...)"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.create_success_response(result=..., request_id=...)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Create RPC Error"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"JSONRPCResponse(id=..., error=...)"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.create_error_response(error=..., request_id=...)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Validate RPC Payload"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"JSONRPCResponse(**payload)"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"JSONRPCResponse.model_validate(payload)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Topic Matching"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"_topic_matches_subscription(...)"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.topic_matches_subscription(...)"})})]}),(0,a.jsxs)(t.tr,{children:[(0,a.jsx)(t.td,{style:{textAlign:"left"},children:"Extract Task ID from Topic"}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"_extract_task_id_from_topic(...)"})}),(0,a.jsx)(t.td,{style:{textAlign:"left"},children:(0,a.jsx)(t.code,{children:"a2a.extract_task_id_from_topic(...)"})})]})]})]}),"\n",(0,a.jsx)(t.h2,{id:"full-method-examples",children:"Full Method Examples"}),"\n",(0,a.jsx)(t.p,{children:'These examples provide larger, "before and after" contexts for the refactoring patterns.'}),"\n",(0,a.jsxs)(t.h3,{id:"example-1-_translate_external_input",children:["Example 1: ",(0,a.jsx)(t.code,{children:"_translate_external_input"})]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Before:"})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:'from solace_agent_mesh.common.types import Part as A2APart, TextPart, FilePart, FileContent\n\nasync def _translate_external_input(self, external_event: Any) -> Tuple[str, List[A2APart], Dict[str, Any]]:\n # ...\n a2a_parts: List[A2APart] = []\n # ...\n artifact_uri = f"artifact://{self.gateway_id}/{user_id}/{a2a_session_id}/{filename}?version={version}"\n file_content_a2a = FileContent(name=filename, mimeType=mime_type, uri=artifact_uri)\n a2a_parts.append(FilePart(file=file_content_a2a))\n # ...\n a2a_parts.append(TextPart(text=processed_text_for_a2a))\n return "agent_name", a2a_parts, {}\n'})}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"After:"})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:'from solace_agent_mesh.common import a2a\nfrom solace_agent_mesh.common.a2a import ContentPart\n\nasync def _translate_external_input(self, external_event: Any) -> Tuple[str, List[ContentPart], Dict[str, Any]]:\n # ...\n a2a_parts: List[ContentPart] = []\n # ...\n artifact_uri = f"artifact://{self.gateway_id}/{user_id}/{a2a_session_id}/{filename}?version={version}"\n file_part = a2a.create_file_part_from_uri(uri=artifact_uri, name=filename, mime_type=mime_type)\n a2a_parts.append(file_part)\n # ...\n text_part = a2a.create_text_part(text=processed_text_for_a2a)\n a2a_parts.append(text_part)\n return "agent_name", a2a_parts, {}\n'})}),"\n",(0,a.jsxs)(t.h3,{id:"example-2-_send_update_to_external",children:["Example 2: ",(0,a.jsx)(t.code,{children:"_send_update_to_external"})]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Before:"})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:"from solace_agent_mesh.common.types import TaskStatusUpdateEvent, TextPart, DataPart\n\nasync def _send_update_to_external(self, context: Dict, event_data: TaskStatusUpdateEvent, is_final: bool) -> None:\n task_id = event_data.id\n # ...\n if event_data.status and event_data.status.message and event_data.status.message.parts:\n for part in event_data.status.message.parts:\n if isinstance(part, TextPart):\n # process part.text\n elif isinstance(part, DataPart):\n # process part.data\n"})}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"After:"})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:"from a2a.types import TaskStatusUpdateEvent, TextPart, DataPart\nfrom solace_agent_mesh.common import a2a\n\nasync def _send_update_to_external(self, context: Dict, event_data: TaskStatusUpdateEvent, is_final: bool) -> None:\n task_id = event_data.task_id\n # ...\n message = a2a.get_message_from_status_update(event_data)\n if message:\n parts = a2a.get_parts_from_message(message)\n for part in parts:\n if isinstance(part, TextPart):\n # process part.text\n elif isinstance(part, DataPart):\n # process part.data\n"})}),"\n",(0,a.jsxs)(t.h3,{id:"example-3-_send_final_response_to_external",children:["Example 3: ",(0,a.jsx)(t.code,{children:"_send_final_response_to_external"})]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Before:"})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:"from solace_agent_mesh.common.types import Task, TaskState\n\nasync def _send_final_response_to_external(self, context: Dict, task_data: Task) -> None:\n task_id = task_data.id\n if task_data.status.state == TaskState.FAILED:\n # ...\n"})}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"After:"})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:"from a2a.types import Task, TaskState\nfrom solace_agent_mesh.common import a2a\n\nasync def _send_final_response_to_external(self, context: Dict, task_data: Task) -> None:\n task_id = a2a.get_task_id(task_data)\n task_status = a2a.get_task_status(task_data)\n if task_status == TaskState.failed:\n # ...\n"})}),"\n",(0,a.jsxs)(t.h3,{id:"example-4-_send_error_to_external",children:["Example 4: ",(0,a.jsx)(t.code,{children:"_send_error_to_external"})]}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"Before:"})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:'from solace_agent_mesh.common.types import JSONRPCError\n\nasync def _send_error_to_external(self, context: Dict, error_data: JSONRPCError) -> None:\n error_text = f"Error: {error_data.message} (Code: {error_data.code})"\n if error_data.data:\n # process error_data.data\n'})}),"\n",(0,a.jsx)(t.p,{children:(0,a.jsx)(t.strong,{children:"After:"})}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:'from a2a.types import JSONRPCError\nfrom solace_agent_mesh.common import a2a\n\nasync def _send_error_to_external(self, context: Dict, error_data: JSONRPCError) -> None:\n error_message = a2a.get_error_message(error_data)\n error_code = a2a.get_error_code(error_data)\n error_details = a2a.get_error_data(error_data)\n error_text = f"Error: {error_message} (Code: {error_code})"\n if error_details:\n # process error_details\n'})})]})}function x(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(o,{...e})}):o(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>l,x:()=>i});var n=s(6540);const a={},r=n.createContext(a);function l(e){const t=n.useContext(r);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:l(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[3624],{2062:(t,n,r)=>{r.d(n,{A:()=>a});var e=r(9471);const o=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const c=function(t){return this.__data__.has(t)};function u(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e.A;++n<r;)this.add(t[n])}u.prototype.add=u.prototype.push=o,u.prototype.has=c;const a=u},2641:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t,n){for(var r=-1,e=null==t?0:t.length;++r<e&&!1!==n(t[r],r,t););return t}},2634:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t,n){for(var r=-1,e=null==t?0:t.length,o=0,c=[];++r<e;){var u=t[r];n(u,r,t)&&(c[o++]=u)}return c}},5530:(t,n,r)=>{r.d(n,{A:()=>o});var e=r(818);const o=function(t,n){return!!(null==t?0:t.length)&&(0,e.A)(t,n,0)>-1}},7809:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t,n,r){for(var e=-1,o=null==t?0:t.length;++e<o;)if(r(n,t[e]))return!0;return!1}},5572:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t,n){for(var r=-1,e=null==t?0:t.length,o=Array(e);++r<e;)o[r]=n(t[r],r,t);return o}},4531:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t,n){for(var r=-1,e=n.length,o=t.length;++r<e;)t[o+r]=n[r];return t}},3736:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t,n){for(var r=-1,e=null==t?0:t.length;++r<e;)if(n(t[r],r,t))return!0;return!1}},8675:(t,n,r)=>{r.d(n,{A:()=>Q});var e=r(1754),o=r(2641),c=r(2851),u=r(2031),a=r(7422);const i=function(t,n){return t&&(0,u.A)(n,(0,a.A)(n),t)};var f=r(5615);const A=function(t,n){return t&&(0,u.A)(n,(0,f.A)(n),t)};var s=r(154),v=r(9759),l=r(2411);const b=function(t,n){return(0,u.A)(t,(0,l.A)(t),n)};var d=r(3511);const j=function(t,n){return(0,u.A)(t,(0,d.A)(t),n)};var h=r(9042),p=r(3973),y=r(9779),g=Object.prototype.hasOwnProperty;const w=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&g.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var _=r(565);const O=function(t,n){var r=n?(0,_.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)};var m=/\w*$/;const S=function(t){var n=new t.constructor(t.source,m.exec(t));return n.lastIndex=t.lastIndex,n};var k=r(241),E=k.A?k.A.prototype:void 0,x=E?E.valueOf:void 0;const I=function(t){return x?Object(x.call(t)):{}};var U=r(1801);const B=function(t,n,r){var e=t.constructor;switch(n){case"[object ArrayBuffer]":return(0,_.A)(t);case"[object Boolean]":case"[object Date]":return new e(+t);case"[object DataView]":return O(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,U.A)(t,r);case"[object Map]":case"[object Set]":return new e;case"[object Number]":case"[object String]":return new e(t);case"[object RegExp]":return S(t);case"[object Symbol]":return I(t)}};var C=r(8598),D=r(2049),F=r(9912),M=r(3098);const z=function(t){return(0,M.A)(t)&&"[object Map]"==(0,y.A)(t)};var L=r(2789),P=r(4841),$=P.A&&P.A.isMap;const N=$?(0,L.A)($):z;var R=r(3149);const V=function(t){return(0,M.A)(t)&&"[object Set]"==(0,y.A)(t)};var G=P.A&&P.A.isSet;const W=G?(0,L.A)(G):V;var q="[object Arguments]",H="[object Function]",J="[object Object]",K={};K[q]=K["[object Array]"]=K["[object ArrayBuffer]"]=K["[object DataView]"]=K["[object Boolean]"]=K["[object Date]"]=K["[object Float32Array]"]=K["[object Float64Array]"]=K["[object Int8Array]"]=K["[object Int16Array]"]=K["[object Int32Array]"]=K["[object Map]"]=K["[object Number]"]=K[J]=K["[object RegExp]"]=K["[object Set]"]=K["[object String]"]=K["[object Symbol]"]=K["[object Uint8Array]"]=K["[object Uint8ClampedArray]"]=K["[object Uint16Array]"]=K["[object Uint32Array]"]=!0,K["[object Error]"]=K[H]=K["[object WeakMap]"]=!1;const Q=function t(n,r,u,l,d,g){var _,O=1&r,m=2&r,S=4&r;if(u&&(_=d?u(n,l,d,g):u(n)),void 0!==_)return _;if(!(0,R.A)(n))return n;var k=(0,D.A)(n);if(k){if(_=w(n),!O)return(0,v.A)(n,_)}else{var E=(0,y.A)(n),x=E==H||"[object GeneratorFunction]"==E;if((0,F.A)(n))return(0,s.A)(n,O);if(E==J||E==q||x&&!d){if(_=m||x?{}:(0,C.A)(n),!O)return m?j(n,A(_,n)):b(n,i(_,n))}else{if(!K[E])return d?n:{};_=B(n,E,O)}}g||(g=new e.A);var I=g.get(n);if(I)return I;g.set(n,_),W(n)?n.forEach((function(e){_.add(t(e,r,u,e,n,g))})):N(n)&&n.forEach((function(e,o){_.set(o,t(e,r,u,o,n,g))}));var U=S?m?p.A:h.A:m?f.A:a.A,M=k?void 0:U(n);return(0,o.A)(M||n,(function(e,o){M&&(e=n[o=e]),(0,c.A)(_,o,t(e,r,u,o,n,g))})),_}},6240:(t,n,r)=>{r.d(n,{A:()=>c});var e=r(9841),o=r(8446);const c=function(t,n){return function(r,e){if(null==r)return r;if(!(0,o.A)(r))return t(r,e);for(var c=r.length,u=n?c:-1,a=Object(r);(n?u--:++u<c)&&!1!==e(a[u],u,a););return r}}(e.A)},1790:(t,n,r)=>{r.d(n,{A:()=>o});var e=r(6240);const o=function(t,n){var r=[];return(0,e.A)(t,(function(t,e,o){n(t,e,o)&&r.push(t)})),r}},5707:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t,n,r,e){for(var o=t.length,c=r+(e?1:-1);e?c--:++c<o;)if(n(t[c],c,t))return c;return-1}},3588:(t,n,r)=>{r.d(n,{A:()=>f});var e=r(4531),o=r(241),c=r(2274),u=r(2049),a=o.A?o.A.isConcatSpreadable:void 0;const i=function(t){return(0,u.A)(t)||(0,c.A)(t)||!!(a&&t&&t[a])};const f=function t(n,r,o,c,u){var a=-1,f=n.length;for(o||(o=i),u||(u=[]);++a<f;){var A=n[a];r>0&&o(A)?r>1?t(A,r-1,o,c,u):(0,e.A)(u,A):c||(u[u.length]=A)}return u}},9841:(t,n,r)=>{r.d(n,{A:()=>c});var e=r(4574),o=r(7422);const c=function(t,n){return t&&(0,e.A)(t,n,o.A)}},6318:(t,n,r)=>{r.d(n,{A:()=>c});var e=r(7819),o=r(901);const c=function(t,n){for(var r=0,c=(n=(0,e.A)(n,t)).length;null!=t&&r<c;)t=t[(0,o.A)(n[r++])];return r&&r==c?t:void 0}},3831:(t,n,r)=>{r.d(n,{A:()=>c});var e=r(4531),o=r(2049);const c=function(t,n,r){var c=n(t);return(0,o.A)(t)?c:(0,e.A)(c,r(t))}},818:(t,n,r)=>{r.d(n,{A:()=>u});var e=r(5707);const o=function(t){return t!=t};const c=function(t,n,r){for(var e=r-1,o=t.length;++e<o;)if(t[e]===n)return e;return-1};const u=function(t,n,r){return n==n?c(t,n,r):(0,e.A)(t,o,r)}},3958:(t,n,r)=>{r.d(n,{A:()=>J});var e=r(1754),o=r(2062),c=r(3736),u=r(4099);const a=function(t,n,r,e,a,i){var f=1&r,A=t.length,s=n.length;if(A!=s&&!(f&&s>A))return!1;var v=i.get(t),l=i.get(n);if(v&&l)return v==n&&l==t;var b=-1,d=!0,j=2&r?new o.A:void 0;for(i.set(t,n),i.set(n,t);++b<A;){var h=t[b],p=n[b];if(e)var y=f?e(p,h,b,n,t,i):e(h,p,b,t,n,i);if(void 0!==y){if(y)continue;d=!1;break}if(j){if(!(0,c.A)(n,(function(t,n){if(!(0,u.A)(j,n)&&(h===t||a(h,t,r,e,i)))return j.push(n)}))){d=!1;break}}else if(h!==p&&!a(h,p,r,e,i)){d=!1;break}}return i.delete(t),i.delete(n),d};var i=r(241),f=r(3988),A=r(6984);const s=function(t){var n=-1,r=Array(t.size);return t.forEach((function(t,e){r[++n]=[e,t]})),r};var v=r(9959),l=i.A?i.A.prototype:void 0,b=l?l.valueOf:void 0;const d=function(t,n,r,e,o,c,u){switch(r){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=n.byteLength||!c(new f.A(t),new f.A(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,A.A)(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var i=s;case"[object Set]":var l=1&e;if(i||(i=v.A),t.size!=n.size&&!l)return!1;var d=u.get(t);if(d)return d==n;e|=2,u.set(t,n);var j=a(i(t),i(n),e,o,c,u);return u.delete(t),j;case"[object Symbol]":if(b)return b.call(t)==b.call(n)}return!1};var j=r(9042),h=Object.prototype.hasOwnProperty;const p=function(t,n,r,e,o,c){var u=1&r,a=(0,j.A)(t),i=a.length;if(i!=(0,j.A)(n).length&&!u)return!1;for(var f=i;f--;){var A=a[f];if(!(u?A in n:h.call(n,A)))return!1}var s=c.get(t),v=c.get(n);if(s&&v)return s==n&&v==t;var l=!0;c.set(t,n),c.set(n,t);for(var b=u;++f<i;){var d=t[A=a[f]],p=n[A];if(e)var y=u?e(p,d,A,n,t,c):e(d,p,A,t,n,c);if(!(void 0===y?d===p||o(d,p,r,e,c):y)){l=!1;break}b||(b="constructor"==A)}if(l&&!b){var g=t.constructor,w=n.constructor;g==w||!("constructor"in t)||!("constructor"in n)||"function"==typeof g&&g instanceof g&&"function"==typeof w&&w instanceof w||(l=!1)}return c.delete(t),c.delete(n),l};var y=r(9779),g=r(2049),w=r(9912),_=r(3858),O="[object Arguments]",m="[object Array]",S="[object Object]",k=Object.prototype.hasOwnProperty;const E=function(t,n,r,o,c,u){var i=(0,g.A)(t),f=(0,g.A)(n),A=i?m:(0,y.A)(t),s=f?m:(0,y.A)(n),v=(A=A==O?S:A)==S,l=(s=s==O?S:s)==S,b=A==s;if(b&&(0,w.A)(t)){if(!(0,w.A)(n))return!1;i=!0,v=!1}if(b&&!v)return u||(u=new e.A),i||(0,_.A)(t)?a(t,n,r,o,c,u):d(t,n,A,r,o,c,u);if(!(1&r)){var j=v&&k.call(t,"__wrapped__"),h=l&&k.call(n,"__wrapped__");if(j||h){var E=j?t.value():t,x=h?n.value():n;return u||(u=new e.A),c(E,x,r,o,u)}}return!!b&&(u||(u=new e.A),p(t,n,r,o,c,u))};var x=r(3098);const I=function t(n,r,e,o,c){return n===r||(null==n||null==r||!(0,x.A)(n)&&!(0,x.A)(r)?n!=n&&r!=r:E(n,r,e,o,t,c))};const U=function(t,n,r,o){var c=r.length,u=c,a=!o;if(null==t)return!u;for(t=Object(t);c--;){var i=r[c];if(a&&i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++c<u;){var f=(i=r[c])[0],A=t[f],s=i[1];if(a&&i[2]){if(void 0===A&&!(f in t))return!1}else{var v=new e.A;if(o)var l=o(A,s,f,t,n,v);if(!(void 0===l?I(s,A,3,o,v):l))return!1}}return!0};var B=r(3149);const C=function(t){return t==t&&!(0,B.A)(t)};var D=r(7422);const F=function(t){for(var n=(0,D.A)(t),r=n.length;r--;){var e=n[r],o=t[e];n[r]=[e,o,C(o)]}return n};const M=function(t,n){return function(r){return null!=r&&(r[t]===n&&(void 0!==n||t in Object(r)))}};const z=function(t){var n=F(t);return 1==n.length&&n[0][2]?M(n[0][0],n[0][1]):function(r){return r===t||U(r,t,n)}};var L=r(6318);const P=function(t,n,r){var e=null==t?void 0:(0,L.A)(t,n);return void 0===e?r:e};var $=r(9188),N=r(6586),R=r(901);const V=function(t,n){return(0,N.A)(t)&&C(n)?M((0,R.A)(t),n):function(r){var e=P(r,t);return void 0===e&&e===n?(0,$.A)(r,t):I(n,e,3)}};var G=r(9008),W=r(805);const q=function(t){return function(n){return(0,L.A)(n,t)}};const H=function(t){return(0,N.A)(t)?(0,W.A)((0,R.A)(t)):q(t)};const J=function(t){return"function"==typeof t?t:null==t?G.A:"object"==typeof t?(0,g.A)(t)?V(t[0],t[1]):z(t):H(t)}},805:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t){return function(n){return null==n?void 0:n[t]}}},9902:(t,n,r)=>{r.d(n,{A:()=>s});var e=r(2062),o=r(5530),c=r(7809),u=r(4099),a=r(9857),i=r(2302),f=r(9959);const A=a.A&&1/(0,f.A)(new a.A([,-0]))[1]==1/0?function(t){return new a.A(t)}:i.A;const s=function(t,n,r){var a=-1,i=o.A,s=t.length,v=!0,l=[],b=l;if(r)v=!1,i=c.A;else if(s>=200){var d=n?null:A(t);if(d)return(0,f.A)(d);v=!1,i=u.A,b=new e.A}else b=n?[]:l;t:for(;++a<s;){var j=t[a],h=n?n(j):j;if(j=r||0!==j?j:0,v&&h==h){for(var p=b.length;p--;)if(b[p]===h)continue t;n&&b.push(h),l.push(j)}else i(b,h,r)||(b!==l&&b.push(h),l.push(j))}return l}},4099:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t,n){return t.has(n)}},9922:(t,n,r)=>{r.d(n,{A:()=>o});var e=r(9008);const o=function(t){return"function"==typeof t?t:e.A}},7819:(t,n,r)=>{r.d(n,{A:()=>A});var e=r(2049),o=r(6586),c=r(6632);var u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const i=function(t){var n=(0,c.A)(t,(function(t){return 500===r.size&&r.clear(),t})),r=n.cache;return n}((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(u,(function(t,r,e,o){n.push(e?o.replace(a,"$1"):r||t)})),n}));var f=r(8894);const A=function(t,n){return(0,e.A)(t)?t:(0,o.A)(t,n)?[t]:i((0,f.A)(t))}},9042:(t,n,r)=>{r.d(n,{A:()=>u});var e=r(3831),o=r(2411),c=r(7422);const u=function(t){return(0,e.A)(t,c.A,o.A)}},3973:(t,n,r)=>{r.d(n,{A:()=>u});var e=r(3831),o=r(3511),c=r(5615);const u=function(t){return(0,e.A)(t,c.A,o.A)}},2411:(t,n,r)=>{r.d(n,{A:()=>a});var e=r(2634),o=r(3153),c=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols;const a=u?function(t){return null==t?[]:(t=Object(t),(0,e.A)(u(t),(function(n){return c.call(t,n)})))}:o.A},3511:(t,n,r)=>{r.d(n,{A:()=>a});var e=r(4531),o=r(5647),c=r(2411),u=r(3153);const a=Object.getOwnPropertySymbols?function(t){for(var n=[];t;)(0,e.A)(n,(0,c.A)(t)),t=(0,o.A)(t);return n}:u.A},5054:(t,n,r)=>{r.d(n,{A:()=>f});var e=r(7819),o=r(2274),c=r(2049),u=r(5353),a=r(5254),i=r(901);const f=function(t,n,r){for(var f=-1,A=(n=(0,e.A)(n,t)).length,s=!1;++f<A;){var v=(0,i.A)(n[f]);if(!(s=null!=t&&r(t,v)))break;t=t[v]}return s||++f!=A?s:!!(A=null==t?0:t.length)&&(0,a.A)(A)&&(0,u.A)(v,A)&&((0,c.A)(t)||(0,o.A)(t))}},6586:(t,n,r)=>{r.d(n,{A:()=>a});var e=r(2049),o=r(1882),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;const a=function(t,n){if((0,e.A)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!(0,o.A)(t))||(u.test(t)||!c.test(t)||null!=n&&t in Object(n))}},9959:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t){var n=-1,r=Array(t.size);return t.forEach((function(t){r[++n]=t})),r}},901:(t,n,r)=>{r.d(n,{A:()=>o});var e=r(1882);const o=function(t){if("string"==typeof t||(0,e.A)(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},4092:(t,n,r)=>{r.d(n,{A:()=>a});var e=r(2634),o=r(1790),c=r(3958),u=r(2049);const a=function(t,n){return((0,u.A)(t)?e.A:o.A)(t,(0,c.A)(n,3))}},8058:(t,n,r)=>{r.d(n,{A:()=>a});var e=r(2641),o=r(6240),c=r(9922),u=r(2049);const a=function(t,n){return((0,u.A)(t)?e.A:o.A)(t,(0,c.A)(n))}},9188:(t,n,r)=>{r.d(n,{A:()=>c});const e=function(t,n){return null!=t&&n in Object(t)};var o=r(5054);const c=function(t,n){return null!=t&&(0,o.A)(t,n,e)}},1882:(t,n,r)=>{r.d(n,{A:()=>c});var e=r(8496),o=r(3098);const c=function(t){return"symbol"==typeof t||(0,o.A)(t)&&"[object Symbol]"==(0,e.A)(t)}},9592:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(t){return void 0===t}},7422:(t,n,r)=>{r.d(n,{A:()=>u});var e=r(3607),o=r(1852),c=r(8446);const u=function(t){return(0,c.A)(t)?(0,e.A)(t):(0,o.A)(t)}},2302:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(){}},9463:(t,n,r)=>{r.d(n,{A:()=>i});const e=function(t,n,r,e){var o=-1,c=null==t?0:t.length;for(e&&c&&(r=t[++o]);++o<c;)r=n(r,t[o],o,t);return r};var o=r(6240),c=r(3958);const u=function(t,n,r,e,o){return o(t,(function(t,o,c){r=e?(e=!1,t):n(r,t,o,c)})),r};var a=r(2049);const i=function(t,n,r){var i=(0,a.A)(t)?e:u,f=arguments.length<3;return i(t,(0,c.A)(n,4),r,f,o.A)}},3153:(t,n,r)=>{r.d(n,{A:()=>e});const e=function(){return[]}},8894:(t,n,r)=>{r.d(n,{A:()=>A});var e=r(241),o=r(5572),c=r(2049),u=r(1882),a=e.A?e.A.prototype:void 0,i=a?a.toString:void 0;const f=function t(n){if("string"==typeof n)return n;if((0,c.A)(n))return(0,o.A)(n,t)+"";if((0,u.A)(n))return i?i.call(n):"";var r=n+"";return"0"==r&&1/n==-1/0?"-0":r};const A=function(t){return null==t?"":f(t)}},8207:(t,n,r)=>{r.d(n,{A:()=>u});var e=r(5572);const o=function(t,n){return(0,e.A)(n,(function(n){return t[n]}))};var c=r(7422);const u=function(t){return null==t?[]:o(t,(0,c.A)(t))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[375],{487:(t,e,a)=>{function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(1750).K2)(r,"populateCommonDb")},375:(t,e,a)=>{a.d(e,{diagram:()=>m});var r=a(487),o=a(6792),n=a(4505),l=a(1750),i=a(8731),s={packet:[]},c=structuredClone(s),d=l.UI.packet,b=(0,l.K2)((()=>{const t=(0,o.$t)({...d,...(0,l.zj)().packet});return t.showBits&&(t.paddingY+=10),t}),"getConfig"),k=(0,l.K2)((()=>c.packet),"getPacket"),p={pushWord:(0,l.K2)((t=>{t.length>0&&c.packet.push(t)}),"pushWord"),getPacket:k,getConfig:b,clear:(0,l.K2)((()=>{(0,l.IU)(),c=structuredClone(s)}),"clear"),setAccTitle:l.SV,getAccTitle:l.iN,setDiagramTitle:l.ke,getDiagramTitle:l.ab,getAccDescription:l.m7,setAccDescription:l.EI},h=(0,l.K2)((t=>{(0,r.S)(t,p);let e=-1,a=[],o=1;const{bitsPerRow:n}=p.getConfig();for(let{start:r,end:i,bits:s,label:c}of t.blocks){if(void 0!==r&&void 0!==i&&i<r)throw new Error(`Packet block ${r} - ${i} is invalid. End must be greater than start.`);if(r??=e+1,r!==e+1)throw new Error(`Packet block ${r} - ${i??r} is not contiguous. It should start from ${e+1}.`);if(0===s)throw new Error(`Packet block ${r} is invalid. Cannot have a zero bit field.`);for(i??=r+(s??1)-1,s??=i-r+1,e=i,l.Rm.debug(`Packet block ${r} - ${e} with label ${c}`);a.length<=n+1&&p.getPacket().length<1e4;){const[t,e]=g({start:r,end:i,bits:s,label:c},o,n);if(a.push(t),t.end+1===o*n&&(p.pushWord(a),a=[],o++),!e)break;({start:r,end:i,bits:s,label:c}=e)}}p.pushWord(a)}),"populate"),g=(0,l.K2)(((t,e,a)=>{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*a)return[t,void 0];const r=e*a-1,o=e*a;return[{start:t.start,end:r,label:t.label,bits:r-t.start},{start:o,end:t.end,label:t.label,bits:t.end-o}]}),"getNextFittingBlock"),f={parse:(0,l.K2)((async t=>{const e=await(0,i.qg)("packet",t);l.Rm.debug(e),h(e)}),"parse")},u=(0,l.K2)(((t,e,a,r)=>{const o=r.db,i=o.getConfig(),{rowHeight:s,paddingY:c,bitWidth:d,bitsPerRow:b}=i,k=o.getPacket(),p=o.getDiagramTitle(),h=s+c,g=h*(k.length+1)-(p?0:s),f=d*b+2,u=(0,n.D)(e);u.attr("viewbox",`0 0 ${f} ${g}`),(0,l.a$)(u,g,f,i.useMaxWidth);for(const[n,l]of k.entries())w(u,l,n,i);u.append("text").text(p).attr("x",f/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")}),"draw"),w=(0,l.K2)(((t,e,a,{rowHeight:r,paddingX:o,paddingY:n,bitWidth:l,bitsPerRow:i,showBits:s})=>{const c=t.append("g"),d=a*(r+n)+n;for(const b of e){const t=b.start%i*l+1,e=(b.end-b.start+1)*l-o;if(c.append("rect").attr("x",t).attr("y",d).attr("width",e).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",t+e/2).attr("y",d+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(b.label),!s)continue;const a=b.end===b.start,n=d-2;c.append("text").attr("x",t+(a?e/2:0)).attr("y",n).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",a?"middle":"start").text(b.start),a||c.append("text").attr("x",t+e).attr("y",n).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(b.end)}}),"drawWord"),$={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},m={parser:f,db:p,renderer:{draw:u},styles:(0,l.K2)((({packet:t}={})=>{const e=(0,o.$t)($,t);return`\n\t.packetByte {\n\t\tfont-size: ${e.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${e.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${e.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${e.labelColor};\n\t\tfont-size: ${e.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${e.titleColor};\n\t\tfont-size: ${e.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${e.blockStrokeColor};\n\t\tstroke-width: ${e.blockStrokeWidth};\n\t\tfill: ${e.blockFillColor};\n\t}\n\t`}),"styles")}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[3834],{3834:(e,c,s)=>{s.d(c,{createPacketServices:()=>a.$});var a=s(8569);s(9089)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[1387],{1493:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>l});const o=JSON.parse('{"id":"documentation/components/components","title":"Components","description":"Agent Mesh provides a comprehensive set of components that work together to create a distributed AI agent ecosystem. Each component serves a specific purpose, from managing the command-line interface to orchestrating complex multi-agent workflows.","source":"@site/docs/documentation/components/components.md","sourceDirName":"documentation/components","slug":"/documentation/components/","permalink":"/solace-agent-mesh/docs/documentation/components/","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/components/components.md","tags":[],"version":"current","sidebarPosition":200,"frontMatter":{"title":"Components","sidebar_position":200},"sidebar":"docSidebar","previous":{"title":"Architecture Overview","permalink":"/solace-agent-mesh/docs/documentation/getting-started/architecture"},"next":{"title":"Agents","permalink":"/solace-agent-mesh/docs/documentation/components/agents"}}');var s=n(4848),a=n(8453);const i={title:"Components",sidebar_position:200},r=void 0,c={},l=[{value:"Agents",id:"agents",level:2},{value:"Gateways",id:"gateways",level:2},{value:"Orchestrator",id:"orchestrator",level:2},{value:"Plugins",id:"plugins",level:2},{value:"Built-in Tools",id:"built-in-tools",level:2},{value:"Command Line Interface",id:"command-line-interface",level:2}];function d(e){const t={a:"a",h2:"h2",p:"p",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.p,{children:"Agent Mesh provides a comprehensive set of components that work together to create a distributed AI agent ecosystem. Each component serves a specific purpose, from managing the command-line interface to orchestrating complex multi-agent workflows."}),"\n",(0,s.jsx)(t.p,{children:"This section introduces you to the key components and tools that make up the system. You'll find detailed documentation for each component, along with configuration examples and best practices for implementation."}),"\n",(0,s.jsx)(t.h2,{id:"agents",children:"Agents"}),"\n",(0,s.jsxs)(t.p,{children:["Agents are the intelligent processing units that perform tasks within the mesh. Each agent combines the Google Agent Development Kit (ADK) with specialized instructions, LLM configurations, and toolsets to create focused AI capabilities. Agents can work independently or collaborate with other agents to solve complex problems. You can configure agents with different personalities, expertise areas, and access permissions to match your specific use cases. For comprehensive agent configuration and development guidance, see ",(0,s.jsx)(t.a,{href:"/solace-agent-mesh/docs/documentation/components/agents",children:"Agents"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"gateways",children:"Gateways"}),"\n",(0,s.jsxs)(t.p,{children:["Gateways serve as the entry and exit points for your agent mesh, translating between external protocols and the internal A2A communication standard. Whether you need REST APIs, webhooks, WebSocket connections, or integrations with platforms like Slack, gateways handle the protocol conversion and session management. They also manage authentication and authorization, ensuring that user permissions are properly enforced throughout the system. For gateway development and configuration details, see ",(0,s.jsx)(t.a,{href:"/solace-agent-mesh/docs/documentation/components/gateways",children:"Gateways"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"orchestrator",children:"Orchestrator"}),"\n",(0,s.jsxs)(t.p,{children:["The orchestrator is a specialized agent that manages complex workflows by breaking down requests into smaller tasks and coordinating their execution across multiple agents. It understands dependencies between tasks, manages parallel execution, and aggregates results to provide comprehensive responses. The orchestrator is particularly valuable for scenarios that require multiple specialized agents to work together toward a common goal. For orchestrator configuration and workflow design patterns, see ",(0,s.jsx)(t.a,{href:"/solace-agent-mesh/docs/documentation/components/orchestrator",children:"Orchestrator"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"plugins",children:"Plugins"}),"\n",(0,s.jsxs)(t.p,{children:["Plugins extend the capabilities of Agent Mesh by providing custom tools, integrations, and functionality. You can develop plugins to connect with proprietary systems, add domain-specific tools, or integrate with external services that aren't covered by the built-in toolset. The plugin system provides a standardized way to package and distribute custom functionality across your organization. For plugin development guidelines and examples, see ",(0,s.jsx)(t.a,{href:"/solace-agent-mesh/docs/documentation/components/plugins",children:"Plugins"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"built-in-tools",children:"Built-in Tools"}),"\n",(0,s.jsxs)(t.p,{children:["Agent Mesh includes a comprehensive set of built-in tools that provide essential capabilities for most AI agent scenarios. These tools handle common tasks like artifact management, data analysis, web interactions, and inter-agent communication. The built-in tools are designed to work seamlessly with the A2A protocol and provide consistent behavior across all agents in your mesh. For detailed documentation of available tools and their usage, see ",(0,s.jsx)(t.a,{href:"/solace-agent-mesh/docs/documentation/components/builtin-tools/",children:"Built-in Tools"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"command-line-interface",children:"Command Line Interface"}),"\n",(0,s.jsxs)(t.p,{children:["The CLI provides the primary interface for managing your Agent Mesh deployment. You can use it to start agents, configure gateways, monitor system health, and perform administrative tasks. The CLI simplifies complex operations and provides helpful feedback during development and deployment. For complete CLI documentation and command reference, see ",(0,s.jsx)(t.a,{href:"/solace-agent-mesh/docs/documentation/components/cli",children:"CLI"}),"."]})]})}function m(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>r});var o=n(6540);const s={},a=o.createContext(s);function i(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunksolace_agenitc_mesh_docs=self.webpackChunksolace_agenitc_mesh_docs||[]).push([[3556],{2084:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"documentation/components/builtin-tools/embeds","title":"Dynamic Embeds","description":"Dynamic Embeds","source":"@site/docs/documentation/components/builtin-tools/embeds.md","sourceDirName":"documentation/components/builtin-tools","slug":"/documentation/components/builtin-tools/embeds","permalink":"/solace-agent-mesh/docs/documentation/components/builtin-tools/embeds","draft":false,"unlisted":false,"editUrl":"https://github.com/SolaceLabs/solace-agent-mesh/edit/main/docs/docs/documentation/components/builtin-tools/embeds.md","tags":[],"version":"current","sidebarPosition":40,"frontMatter":{"title":"Dynamic Embeds","sidebar_position":40},"sidebar":"docSidebar","previous":{"title":"Audio Tools","permalink":"/solace-agent-mesh/docs/documentation/components/builtin-tools/audio-tools"},"next":{"title":"Prompt Library","permalink":"/solace-agent-mesh/docs/documentation/components/prompts"}}');var i=n(4848),r=n(8453);const a={title:"Dynamic Embeds",sidebar_position:40},d=void 0,l={},c=[{value:"Dynamic Embeds",id:"dynamic-embeds",level:2},{value:"Overview",id:"overview",level:3},{value:"Syntax",id:"syntax",level:3},{value:"Simple Syntax",id:"simple-syntax",level:4},{value:"Chain Syntax",id:"chain-syntax",level:4},{value:"Available Embed Types",id:"available-embed-types",level:3},{value:"General Purpose Embeds",id:"general-purpose-embeds",level:4},{value:"Artifact-Related Embeds",id:"artifact-related-embeds",level:4},{value:"<code>artifact_meta</code>",id:"artifact_meta",level:5},{value:"<code>artifact_return</code>",id:"artifact_return",level:5},{value:"<code>artifact_content</code>",id:"artifact_content",level:5},{value:"Technical Details",id:"technical-details",level:3},{value:"Resolution Stages",id:"resolution-stages",level:4},{value:"Configuration",id:"configuration",level:4},{value:"Error Handling",id:"error-handling",level:3},{value:"Templates",id:"templates",level:2},{value:"Using Templates for Formatted Output",id:"using-templates-for-formatted-output",level:3},{value:"The Templating Workflow",id:"the-templating-workflow",level:3},{value:"Step 1: Create a Mustache Template",id:"step-1-create-a-mustache-template",level:4},{value:"Step 2: Store the Template as an Artifact",id:"step-2-store-the-template-as-an-artifact",level:4},{value:"Step 3: Render the Template with an Embed",id:"step-3-render-the-template-with-an-embed",level:4},{value:"Error Handling",id:"error-handling-1",level:3}];function o(e){const t={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",h5:"h5",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h2,{id:"dynamic-embeds",children:"Dynamic Embeds"}),"\n",(0,i.jsxs)(t.p,{children:["Dynamic embeds provide a mechanism for agents to insert context-dependent information into their text responses or tool parameters using a specialized ",(0,i.jsx)(t.code,{children:"\xab...\xbb"})," syntax. This feature allows for the dynamic retrieval and formatting of data without requiring explicit tool calls for simple data retrieval or calculations."]}),"\n",(0,i.jsx)(t.h3,{id:"overview",children:"Overview"}),"\n",(0,i.jsx)(t.p,{children:"Dynamic embeds allow an agent to defer the inclusion of data until it is needed, resolving the value just before the final response is sent to the user."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Standard Approach"}),': "The current time is [call ',(0,i.jsx)(t.code,{children:"get_time"}),' tool]."']}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"With Dynamic Embeds"}),': "The current time is ',(0,i.jsx)(t.code,{children:"\xabdatetime:%H:%M\xbb"}),'."']}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:'The system resolves the embed directive, a dynamic placeholder for data that gets computed at runtime, replacing it with the evaluated result (for example, "The current time is 10:45.").'}),"\n",(0,i.jsx)(t.h3,{id:"syntax",children:"Syntax"}),"\n",(0,i.jsx)(t.p,{children:"There are two primary syntaxes for embed directives."}),"\n",(0,i.jsx)(t.h4,{id:"simple-syntax",children:"Simple Syntax"}),"\n",(0,i.jsx)(t.p,{children:"This syntax is used for most general-purpose embeds."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"\xabtype:expression | format_spec\xbb\n"})}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"type"})}),": A keyword indicating the type of information to embed (for example, ",(0,i.jsx)(t.code,{children:"state"}),", ",(0,i.jsx)(t.code,{children:"math"}),", ",(0,i.jsx)(t.code,{children:"datetime"}),")."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"expression"})}),": The specific data to retrieve or the expression to evaluate."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"format_spec"})}),": (Optional) A specifier for formatting the output value (for example, a number precision ",(0,i.jsx)(t.code,{children:".2f"})," or a ",(0,i.jsx)(t.code,{children:"strftime"})," string ",(0,i.jsx)(t.code,{children:"%Y-%m-%d"}),")."]}),"\n"]}),"\n",(0,i.jsx)(t.h4,{id:"chain-syntax",children:"Chain Syntax"}),"\n",(0,i.jsxs)(t.p,{children:["This syntax is used exclusively for the ",(0,i.jsx)(t.code,{children:"artifact_content"})," embed type to apply a sequence of transformations."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"\xabartifact_content:spec >>> modifier1 >>> modifier2 >>> format:output_format\xbb\n"})}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"artifact_spec"})}),": The artifact identifier (",(0,i.jsx)(t.code,{children:"filename[:version]"}),")."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:">>>"})}),": The chain delimiter, separating transformation steps."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"modifier"})}),": A transformation to apply to the data (for example, ",(0,i.jsx)(t.code,{children:"jsonpath"}),", ",(0,i.jsx)(t.code,{children:"grep"}),", ",(0,i.jsx)(t.code,{children:"slice_lines"}),")."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"format"})}),": A ",(0,i.jsx)(t.strong,{children:"required"})," final step that specifies the output format (for example, ",(0,i.jsx)(t.code,{children:"text"}),", ",(0,i.jsx)(t.code,{children:"json"}),", ",(0,i.jsx)(t.code,{children:"datauri"}),")."]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"available-embed-types",children:"Available Embed Types"}),"\n",(0,i.jsx)(t.h4,{id:"general-purpose-embeds",children:"General Purpose Embeds"}),"\n",(0,i.jsx)(t.p,{children:"These are typically resolved by the agent host during execution."}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Type"}),(0,i.jsx)(t.th,{children:"Description"}),(0,i.jsx)(t.th,{children:"Example"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"state"})})}),(0,i.jsx)(t.td,{children:"Accesses a session state variable."}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"\xabstate:user_name\xbb"})})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"math"})})}),(0,i.jsx)(t.td,{children:"Evaluates a mathematical expression."}),(0,i.jsxs)(t.td,{children:[(0,i.jsx)(t.code,{children:"\xabmath:100 * 0.05 | .2f\xbb"})," (Result: ",(0,i.jsx)(t.code,{children:"5.00"}),")"]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"datetime"})})}),(0,i.jsx)(t.td,{children:"Inserts the current date and/or time."}),(0,i.jsxs)(t.td,{children:[(0,i.jsx)(t.code,{children:"\xabdatetime:%Y-%m-%d\xbb"})," (Result: ",(0,i.jsx)(t.code,{children:"2023-10-27"}),")"]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"uuid"})})}),(0,i.jsx)(t.td,{children:"Inserts a random Version 4 UUID."}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"\xabuuid:\xbb"})})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"status_update"})})}),(0,i.jsx)(t.td,{children:"Signals a temporary status update to the UI."}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"\xabstatus_update:Searching knowledge base...\xbb"})})]})]})]}),"\n",(0,i.jsx)(t.h4,{id:"artifact-related-embeds",children:"Artifact-Related Embeds"}),"\n",(0,i.jsx)(t.h5,{id:"artifact_meta",children:(0,i.jsx)(t.code,{children:"artifact_meta"})}),"\n",(0,i.jsx)(t.p,{children:"Retrieves a JSON string containing the full metadata of a specified artifact."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Syntax"}),": ",(0,i.jsx)(t.code,{children:"\xabartifact_meta:filename[:version]\xbb"})]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Example"}),": ",(0,i.jsx)(t.code,{children:"\xabartifact_meta:report.csv\xbb"})]}),"\n"]}),"\n",(0,i.jsx)(t.h5,{id:"artifact_return",children:(0,i.jsx)(t.code,{children:"artifact_return"})}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"This is the primary way to return an artifact to the user."})," It attaches the specified artifact to the message as a file attachment. The embed itself is removed from the text during gateway processing."]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Syntax"}),": ",(0,i.jsx)(t.code,{children:"\xabartifact_return:filename[:version]\xbb"})]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Resolution"}),": Late-stage (processed by gateway before sending to user)"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Examples"}),":","\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"\xabartifact_return:report.pdf\xbb"})," - Returns the latest version of report.pdf"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"\xabartifact_return:data.csv:3\xbb"})," - Returns version 3 of data.csv"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Note"}),": ",(0,i.jsx)(t.code,{children:"artifact_return"})," is not necessary if the artifact was just created in the same response, since newly created artifacts are automatically attached to messages."]}),"\n"]}),"\n",(0,i.jsx)(t.h5,{id:"artifact_content",children:(0,i.jsx)(t.code,{children:"artifact_content"})}),"\n",(0,i.jsx)(t.p,{children:"Embeds the content of an artifact, with support for a chain of transformations. This is the most advanced embed type."}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Note"}),": If this embed resolves to binary content (like an image), it will be automatically converted into an attached file, similar to ",(0,i.jsx)(t.code,{children:"artifact_return"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Modifiers (Data Transformations)"}),"\nModifiers are applied sequentially to transform the data."]}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Modifier"}),(0,i.jsx)(t.th,{children:"Description"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"jsonpath:<expr>"})}),(0,i.jsx)(t.td,{children:"Applies a JSONPath query to JSON data."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"select_cols:<c1,c2>"})}),(0,i.jsx)(t.td,{children:"Selects specific columns from CSV data."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"filter_rows_eq:<col>:<val>"})}),(0,i.jsx)(t.td,{children:"Filters CSV rows where a column's value equals the specified value."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"slice_rows:<start>:<end>"})}),(0,i.jsx)(t.td,{children:"Selects a slice of rows from CSV data."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"slice_lines:<start>:<end>"})}),(0,i.jsx)(t.td,{children:"Selects a slice of lines from text data."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"grep:<pattern>"})}),(0,i.jsx)(t.td,{children:"Filters lines matching a regular expression in text data."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsxs)(t.td,{children:[(0,i.jsx)(t.code,{children:"head:<N>"})," / ",(0,i.jsx)(t.code,{children:"tail:<N>"})]}),(0,i.jsx)(t.td,{children:"Returns the first or last N lines of text data."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"select_fields:<f1,f2>"})}),(0,i.jsx)(t.td,{children:"Selects specific fields from a list of dictionaries."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"apply_to_template:<file>"})}),(0,i.jsxs)(t.td,{children:["Renders data using a Mustache template artifact. See the ",(0,i.jsx)(t.a,{href:"#templates",children:"Templates Guide"}),"."]})]})]})]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Formatters (Final Output)"}),"\nThis is the ",(0,i.jsx)(t.strong,{children:"required"})," final step in an ",(0,i.jsx)(t.code,{children:"artifact_content"})," chain, defining the output format."]}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Formatter"}),(0,i.jsx)(t.th,{children:"Description"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"text"})}),(0,i.jsx)(t.td,{children:"Plain text, decoded as UTF-8."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsxs)(t.td,{children:[(0,i.jsx)(t.code,{children:"json"})," / ",(0,i.jsx)(t.code,{children:"json_pretty"})]}),(0,i.jsx)(t.td,{children:"A compact or indented JSON string."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"csv"})}),(0,i.jsx)(t.td,{children:"A CSV formatted string."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"datauri"})}),(0,i.jsxs)(t.td,{children:["A Base64-encoded data URI, typically for images (",(0,i.jsx)(t.code,{children:"data:image/png;base64,..."}),")."]})]})]})]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsxs)(t.strong,{children:[(0,i.jsx)(t.code,{children:"artifact_content"})," Examples:"]})}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["To embed an image for display in a UI:\n",(0,i.jsx)(t.code,{children:"\xabartifact_content:logo.png >>> format:datauri\xbb"})]}),"\n",(0,i.jsxs)(t.li,{children:["To extract and format specific data from a JSON file:\n",(0,i.jsx)(t.code,{children:"\xabartifact_content:results.json >>> jsonpath:$.data[*].name >>> format:json\xbb"})]}),"\n",(0,i.jsxs)(t.li,{children:["To get the last 10 lines of a log file:\n",(0,i.jsx)(t.code,{children:"\xabartifact_content:debug.log >>> tail:10 >>> format:text\xbb"})]}),"\n",(0,i.jsxs)(t.li,{children:["To filter a CSV file and render it using an HTML template:\n",(0,i.jsx)(t.code,{children:"\xabartifact_content:users.csv >>> filter_rows_eq:Status:Active >>> apply_to_template:active_users.html >>> format:text\xbb"})]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"technical-details",children:"Technical Details"}),"\n",(0,i.jsx)(t.h4,{id:"resolution-stages",children:"Resolution Stages"}),"\n",(0,i.jsx)(t.p,{children:"Embeds are resolved in two distinct stages, depending on where the required data is available:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Early Stage (Agent Host)"}),": Resolved by the agent runtime itself. This stage handles simple, context-local embeds like ",(0,i.jsx)(t.code,{children:"state"}),", ",(0,i.jsx)(t.code,{children:"math"}),", and ",(0,i.jsx)(t.code,{children:"datetime"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Late Stage (Gateway)"}),": Resolved by the Gateway component before the final message is sent to the client. This is necessary for ",(0,i.jsx)(t.code,{children:"artifact_content"})," embeds, which may involve large files or transformations that are too resource-intensive for the agent host."]}),"\n"]}),"\n",(0,i.jsx)(t.h4,{id:"configuration",children:"Configuration"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Enabling/Disabling"}),": Embed resolution is enabled by default. It can be disabled in the ",(0,i.jsx)(t.code,{children:"app_config"})," of the agent host or gateway by setting ",(0,i.jsx)(t.code,{children:"enable_embed_resolution: false"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Resource Limits"}),": The gateway enforces configurable limits to prevent abuse, including ",(0,i.jsx)(t.code,{children:"gateway_artifact_content_limit_bytes"})," (default: 32KB) and ",(0,i.jsx)(t.code,{children:"gateway_recursive_embed_depth"})," (default: 3)."]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"error-handling",children:"Error Handling"}),"\n",(0,i.jsx)(t.p,{children:"If an embed directive fails during parsing or evaluation, it is replaced with a descriptive error message in the final output."}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Parsing Error"}),": ",(0,i.jsx)(t.code,{children:"[Error: Invalid modifier format: 'badmodifier']"})]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Evaluation Error"}),": ",(0,i.jsx)(t.code,{children:"[Error: State variable 'user_id' not found]"})]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Limit Exceeded"}),": ",(0,i.jsx)(t.code,{children:"[Error: Artifact 'large_file.zip' exceeds size limit]"})]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"templates",children:"Templates"}),"\n",(0,i.jsx)(t.h3,{id:"using-templates-for-formatted-output",children:"Using Templates for Formatted Output"}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.code,{children:"apply_to_template"})," modifier, used within an ",(0,i.jsx)(t.code,{children:"\xabartifact_content:...\xbb"})," embed directive, enables an agent to render structured data using a ",(0,i.jsx)(t.strong,{children:"Mustache template"}),". This mechanism allows for the separation of data and presentation, enabling the agent to control the output format (for example, HTML, Markdown) without generating the formatting markup itself."]}),"\n",(0,i.jsx)(t.h3,{id:"the-templating-workflow",children:"The Templating Workflow"}),"\n",(0,i.jsx)(t.p,{children:"The process involves three distinct steps:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Template Creation"}),": Author a Mustache template file that defines the desired output structure."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Artifact Storage"}),": Persist the template file as an artifact in the agent's artifact storage using the ",(0,i.jsx)(t.code,{children:"create_artifact"})," tool."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Template Rendering"}),": Utilize an ",(0,i.jsx)(t.code,{children:"\xabartifact_content:...\xbb"})," embed chain to process a data artifact and then apply the stored template to the result."]}),"\n"]}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsx)(t.h4,{id:"step-1-create-a-mustache-template",children:"Step 1: Create a Mustache Template"}),"\n",(0,i.jsxs)(t.p,{children:["Mustache is a logic-less template syntax. Templates are created as text files (for example, ",(0,i.jsx)(t.code,{children:"user_table.html.mustache"}),") containing placeholders for data injection."]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Key Mustache Syntax"}),":"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"{{variable}}"})}),": A variable placeholder. It is replaced with the corresponding value from the data context."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"{{#section}}...{{/section}}"})}),": A section tag. The enclosed block is rendered for each item in a list or if the section variable is a non-empty object or truthy value."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"{{^section}}...{{/section}}"})}),": An inverted section tag. The enclosed block is rendered only if the section variable is false, null, or an empty list."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:(0,i.jsx)(t.code,{children:"{{! comment }}"})}),": A comment tag. The content is ignored during rendering."]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsxs)(t.strong,{children:["Example: ",(0,i.jsx)(t.code,{children:"user_table.html.mustache"})]}),"\nThis template generates an HTML table from a list of user objects."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-html",children:"<h2>User List</h2>\n{{#items}}\n<table>\n <thead>\n <tr>\n <th>Name</th>\n <th>Status</th>\n </tr>\n </thead>\n <tbody>\n {{#.}}\n <tr>\n <td>{{name}}</td>\n <td>{{status}}</td>\n </tr>\n {{/.}}\n </tbody>\n</table>\n{{/items}}\n{{^items}}\n<p>No users found.</p>\n{{/items}}\n"})}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsx)(t.h4,{id:"step-2-store-the-template-as-an-artifact",children:"Step 2: Store the Template as an Artifact"}),"\n",(0,i.jsxs)(t.p,{children:["The template must be stored as an artifact to be accessible by the Gateway during the late-stage embed resolution process. This is accomplished using the ",(0,i.jsx)(t.code,{children:"create_artifact"})," tool."]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Example Agent Interaction"}),":"]}),"\n",(0,i.jsxs)(t.blockquote,{children:["\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"User"}),': "Please create an HTML template to display a list of users."\n',(0,i.jsx)(t.strong,{children:"Agent"}),': "Acknowledged. I will create the template artifact ',(0,i.jsx)(t.code,{children:"user_table.html.mustache"}),'."\n',(0,i.jsxs)(t.em,{children:["(The agent then invokes the ",(0,i.jsx)(t.code,{children:"create_artifact"})," tool with the specified filename and the HTML content from Step 1.)"]})]}),"\n"]}),"\n",(0,i.jsx)(t.hr,{}),"\n",(0,i.jsx)(t.h4,{id:"step-3-render-the-template-with-an-embed",children:"Step 3: Render the Template with an Embed"}),"\n",(0,i.jsxs)(t.p,{children:["With the data and template artifacts stored, the agent can construct an ",(0,i.jsx)(t.code,{children:"artifact_content"})," embed chain to perform the rendering."]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Syntax"}),": ",(0,i.jsx)(t.code,{children:"... >>> apply_to_template:template_filename[:version] >>> ..."})]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Data Context"}),": The data provided to the template engine is the output of the preceding modifier in the chain.","\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["If the data is a ",(0,i.jsx)(t.strong,{children:"list"}),", it is automatically wrapped in a dictionary of the form ",(0,i.jsx)(t.code,{children:"{'items': your_list}"}),". The template should use ",(0,i.jsx)(t.code,{children:"{{#items}}"})," to iterate over this list."]}),"\n",(0,i.jsxs)(t.li,{children:["If the data is a ",(0,i.jsx)(t.strong,{children:"dictionary"}),", it is used directly as the rendering context."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Output Format"}),": It is ",(0,i.jsx)(t.strong,{children:"mandatory"})," to terminate the chain with a ",(0,i.jsx)(t.code,{children:"format:"})," step (for example, ",(0,i.jsx)(t.code,{children:"format:text"}),") to specify the MIME type of the final rendered output."]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Complete Example"}),":\nThe following embed chain processes a JSON file and renders its content using the HTML template created in Step 1."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"\xabartifact_content:user_data.json >>> jsonpath:$.users[*] >>> select_fields:name,status >>> apply_to_template:user_table.html.mustache >>> format:text\xbb\n"})}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.strong,{children:"Execution Flow"}),":"]}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"artifact_content:user_data.json"}),": Loads the raw data from the ",(0,i.jsx)(t.code,{children:"user_data.json"})," artifact."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"jsonpath:$.users[*]"}),": Applies a JSONPath expression to extract the list of user objects."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"select_fields:name,status"}),": Filters each object in the list to retain only the ",(0,i.jsx)(t.code,{children:"name"})," and ",(0,i.jsx)(t.code,{children:"status"})," fields."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"apply_to_template:user_table.html.mustache"}),": Renders the resulting list of users using the specified Mustache template."]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"error-handling-1",children:"Error Handling"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Template Not Found"}),": If the specified template artifact does not exist, the embed resolves to ",(0,i.jsx)(t.code,{children:"[Error: Template artifact '...' not found]"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.strong,{children:"Rendering Error"}),": If the data structure is incompatible with the template's expectations, the embed resolves to ",(0,i.jsx)(t.code,{children:"[Error: Error rendering template '...']"}),"."]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>d});var s=n(6540);const i={},r=s.createContext(i);function a(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]);