solace-agent-mesh 1.6.3__py3-none-any.whl → 1.7.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (244) hide show
  1. solace_agent_mesh/agent/adk/adk_llm.txt +12 -18
  2. solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +1 -1
  3. solace_agent_mesh/agent/adk/callbacks.py +138 -20
  4. solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +2 -0
  5. solace_agent_mesh/agent/adk/models/lite_llm.py +38 -5
  6. solace_agent_mesh/agent/adk/models/models_llm.txt +82 -35
  7. solace_agent_mesh/agent/adk/runner.py +9 -0
  8. solace_agent_mesh/agent/adk/stream_parser.py +6 -1
  9. solace_agent_mesh/agent/adk/tool_wrapper.py +3 -0
  10. solace_agent_mesh/agent/agent_llm.txt +61 -70
  11. solace_agent_mesh/agent/protocol/event_handlers.py +29 -1
  12. solace_agent_mesh/agent/protocol/protocol_llm.txt +1 -1
  13. solace_agent_mesh/agent/proxies/a2a/a2a_llm.txt +190 -0
  14. solace_agent_mesh/agent/proxies/base/base_llm.txt +148 -0
  15. solace_agent_mesh/agent/proxies/proxies_llm.txt +283 -0
  16. solace_agent_mesh/agent/sac/app.py +22 -0
  17. solace_agent_mesh/agent/sac/component.py +76 -40
  18. solace_agent_mesh/agent/sac/sac_llm.txt +1 -1
  19. solace_agent_mesh/agent/sac/task_execution_context.py +21 -0
  20. solace_agent_mesh/agent/testing/testing_llm.txt +2 -1
  21. solace_agent_mesh/agent/tools/builtin_artifact_tools.py +13 -148
  22. solace_agent_mesh/agent/tools/dynamic_tool.py +2 -0
  23. solace_agent_mesh/agent/tools/tools_llm.txt +93 -80
  24. solace_agent_mesh/agent/tools/tools_llm_detail.txt +3 -2
  25. solace_agent_mesh/agent/utils/artifact_helpers.py +4 -0
  26. solace_agent_mesh/agent/utils/utils_llm.txt +16 -2
  27. solace_agent_mesh/assets/docs/404.html +3 -3
  28. solace_agent_mesh/assets/docs/assets/js/05749d90.c70b2be9.js +1 -0
  29. solace_agent_mesh/assets/docs/assets/js/15ba94aa.92fea363.js +1 -0
  30. solace_agent_mesh/assets/docs/assets/js/15e40e79.36003774.js +1 -0
  31. solace_agent_mesh/assets/docs/assets/js/2987107d.a80604f9.js +1 -0
  32. solace_agent_mesh/assets/docs/assets/js/3ac1795d.e4870a49.js +1 -0
  33. solace_agent_mesh/assets/docs/assets/js/3ff0015d.b63ee53a.js +1 -0
  34. solace_agent_mesh/assets/docs/assets/js/547e15cc.2f7790c1.js +1 -0
  35. solace_agent_mesh/assets/docs/assets/js/5c2bd65f.45b32c2b.js +1 -0
  36. solace_agent_mesh/assets/docs/assets/js/631738c7.fa471607.js +1 -0
  37. solace_agent_mesh/assets/docs/assets/js/64195356.c498c4d0.js +1 -0
  38. solace_agent_mesh/assets/docs/assets/js/6a520c9d.b6e3f2ce.js +1 -0
  39. solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.a5b36a60.js +1 -0
  40. solace_agent_mesh/assets/docs/assets/js/71da7b71.374b9d54.js +1 -0
  41. solace_agent_mesh/assets/docs/assets/js/8024126c.fa0e7186.js +1 -0
  42. solace_agent_mesh/assets/docs/assets/js/8b032486.91a91afc.js +1 -0
  43. solace_agent_mesh/assets/docs/assets/js/94e8668d.09ed9234.js +1 -0
  44. solace_agent_mesh/assets/docs/assets/js/{ab9708a8.3e6dd091.js → ab9708a8.245ae0ef.js} +1 -1
  45. solace_agent_mesh/assets/docs/assets/js/ad87452a.9d73dad6.js +1 -0
  46. solace_agent_mesh/assets/docs/assets/js/cbe2e9ea.f902fad8.js +1 -0
  47. solace_agent_mesh/assets/docs/assets/js/da0b5bad.b62f7b08.js +1 -0
  48. solace_agent_mesh/assets/docs/assets/js/db5d6442.3daf1696.js +1 -0
  49. solace_agent_mesh/assets/docs/assets/js/dd817ffc.c37a755e.js +1 -0
  50. solace_agent_mesh/assets/docs/assets/js/dd81e2b8.b682e9c2.js +1 -0
  51. solace_agent_mesh/assets/docs/assets/js/de915948.44a432bc.js +1 -0
  52. solace_agent_mesh/assets/docs/assets/js/e04b235d.c9c50c7b.js +1 -0
  53. solace_agent_mesh/assets/docs/assets/js/e3d9abda.d11c67a7.js +1 -0
  54. solace_agent_mesh/assets/docs/assets/js/{e6f9706b.e74a984d.js → e6f9706b.045d0fa1.js} +1 -1
  55. solace_agent_mesh/assets/docs/assets/js/e92d0134.3bda61dd.js +1 -0
  56. solace_agent_mesh/assets/docs/assets/js/f284c35a.5099c51e.js +1 -0
  57. solace_agent_mesh/assets/docs/assets/js/ff4d71f2.74710fc1.js +1 -0
  58. solace_agent_mesh/assets/docs/assets/js/main.f213fe0c.js +2 -0
  59. solace_agent_mesh/assets/docs/assets/js/runtime~main.d9606d6a.js +1 -0
  60. solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +4 -4
  61. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/artifact-management/index.html +4 -4
  62. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/audio-tools/index.html +4 -4
  63. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/data-analysis-tools/index.html +4 -4
  64. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/embeds/index.html +18 -4
  65. solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/index.html +4 -4
  66. solace_agent_mesh/assets/docs/docs/documentation/components/cli/index.html +4 -4
  67. solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +5 -5
  68. solace_agent_mesh/assets/docs/docs/documentation/components/index.html +4 -4
  69. solace_agent_mesh/assets/docs/docs/documentation/components/orchestrator/index.html +4 -4
  70. solace_agent_mesh/assets/docs/docs/documentation/components/plugins/index.html +4 -4
  71. solace_agent_mesh/assets/docs/docs/documentation/components/projects/index.html +196 -0
  72. solace_agent_mesh/assets/docs/docs/documentation/components/proxies/index.html +4 -4
  73. solace_agent_mesh/assets/docs/docs/documentation/deploying/debugging/index.html +5 -5
  74. solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +6 -7
  75. solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +4 -4
  76. solace_agent_mesh/assets/docs/docs/documentation/deploying/kubernetes-deployment/index.html +47 -0
  77. solace_agent_mesh/assets/docs/docs/documentation/deploying/logging/index.html +4 -4
  78. solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +4 -4
  79. solace_agent_mesh/assets/docs/docs/documentation/developing/create-agents/index.html +4 -4
  80. solace_agent_mesh/assets/docs/docs/documentation/developing/create-gateways/index.html +160 -169
  81. solace_agent_mesh/assets/docs/docs/documentation/developing/creating-python-tools/index.html +4 -4
  82. solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +4 -4
  83. solace_agent_mesh/assets/docs/docs/documentation/developing/evaluations/index.html +4 -4
  84. solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +4 -4
  85. solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +4 -4
  86. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/bedrock-agents/index.html +4 -4
  87. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/custom-agent/index.html +5 -5
  88. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/event-mesh-gateway/index.html +4 -4
  89. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mcp-integration/index.html +4 -4
  90. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mongodb-integration/index.html +4 -4
  91. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rag-integration/index.html +4 -4
  92. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rest-gateway/index.html +4 -4
  93. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +4 -4
  94. solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/sql-database/index.html +4 -4
  95. solace_agent_mesh/assets/docs/docs/documentation/enterprise/agent-builder/index.html +59 -0
  96. solace_agent_mesh/assets/docs/docs/documentation/enterprise/connectors/index.html +62 -0
  97. solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +10 -6
  98. solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +4 -4
  99. solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +4 -4
  100. solace_agent_mesh/assets/docs/docs/documentation/enterprise/secure-user-delegated-access/index.html +440 -0
  101. solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +27 -4
  102. solace_agent_mesh/assets/docs/docs/documentation/enterprise/wheel-installation/index.html +62 -0
  103. solace_agent_mesh/assets/docs/docs/documentation/getting-started/architecture/index.html +4 -4
  104. solace_agent_mesh/assets/docs/docs/documentation/getting-started/index.html +5 -4
  105. solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +3 -3
  106. solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +3 -3
  107. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/artifact-storage/index.html +290 -0
  108. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/configurations/index.html +9 -9
  109. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/index.html +4 -4
  110. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/installation/index.html +4 -4
  111. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +4 -4
  112. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +4 -4
  113. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/session-storage/index.html +251 -0
  114. solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/user-feedback/index.html +88 -0
  115. solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0/index.html +3 -3
  116. solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-technical-migration-map/index.html +3 -3
  117. solace_agent_mesh/assets/docs/lunr-index-1762283454666.json +1 -0
  118. solace_agent_mesh/assets/docs/lunr-index.json +1 -1
  119. solace_agent_mesh/assets/docs/search-doc-1762283454666.json +1 -0
  120. solace_agent_mesh/assets/docs/search-doc.json +1 -1
  121. solace_agent_mesh/assets/docs/sitemap.xml +1 -1
  122. solace_agent_mesh/cli/__init__.py +1 -1
  123. solace_agent_mesh/cli/commands/docs_cmd.py +4 -1
  124. solace_agent_mesh/cli/commands/init_cmd/orchestrator_step.py +1 -1
  125. solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-D4_RMYRh.js → authCallback-tcIFZLis.js} +1 -1
  126. solace_agent_mesh/client/webui/frontend/static/assets/{client-UZ3qU6Bq.js → client-CRYdKo2Q.js} +3 -3
  127. solace_agent_mesh/client/webui/frontend/static/assets/main-CojeY_1w.css +1 -0
  128. solace_agent_mesh/client/webui/frontend/static/assets/main-ILja9MCG.js +353 -0
  129. solace_agent_mesh/client/webui/frontend/static/assets/vendor-CINwxvwV.js +470 -0
  130. solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -3
  131. solace_agent_mesh/client/webui/frontend/static/index.html +4 -4
  132. solace_agent_mesh/common/a2a/a2a_llm.txt +13 -20
  133. solace_agent_mesh/common/a2a/protocol.py +5 -0
  134. solace_agent_mesh/common/a2a/types.py +1 -0
  135. solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +49 -11
  136. solace_agent_mesh/common/a2a_spec/schemas/artifact_creation_progress.json +23 -6
  137. solace_agent_mesh/common/a2a_spec/schemas/feedback_event.json +51 -0
  138. solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +26 -9
  139. solace_agent_mesh/common/common_llm.txt +13 -34
  140. solace_agent_mesh/common/data_parts.py +20 -4
  141. solace_agent_mesh/common/middleware/middleware_llm.txt +1 -1
  142. solace_agent_mesh/common/sac/sac_llm.txt +1 -1
  143. solace_agent_mesh/common/sam_events/sam_events_llm.txt +1 -1
  144. solace_agent_mesh/common/services/employee_service.py +1 -1
  145. solace_agent_mesh/common/services/providers/providers_llm.txt +3 -2
  146. solace_agent_mesh/common/services/services_llm.txt +9 -4
  147. solace_agent_mesh/common/utils/embeds/constants.py +1 -0
  148. solace_agent_mesh/common/utils/embeds/embeds_llm.txt +1 -1
  149. solace_agent_mesh/common/utils/embeds/modifiers.py +2 -1
  150. solace_agent_mesh/common/utils/embeds/resolver.py +58 -6
  151. solace_agent_mesh/common/utils/embeds/types.py +8 -0
  152. solace_agent_mesh/common/utils/utils_llm.txt +5 -6
  153. solace_agent_mesh/core_a2a/core_a2a_llm.txt +1 -1
  154. solace_agent_mesh/gateway/adapter/__init__.py +1 -0
  155. solace_agent_mesh/gateway/adapter/base.py +143 -0
  156. solace_agent_mesh/gateway/adapter/types.py +221 -0
  157. solace_agent_mesh/gateway/base/app.py +29 -2
  158. solace_agent_mesh/gateway/base/base_llm.txt +10 -8
  159. solace_agent_mesh/gateway/base/component.py +573 -142
  160. solace_agent_mesh/gateway/gateway_llm.txt +55 -59
  161. solace_agent_mesh/gateway/generic/__init__.py +1 -0
  162. solace_agent_mesh/gateway/generic/app.py +50 -0
  163. solace_agent_mesh/gateway/generic/component.py +650 -0
  164. solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +99 -49
  165. solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_fulltext_search_indexes.py +92 -0
  166. solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_project_users_table.py +72 -0
  167. solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_soft_delete_and_search.py +150 -0
  168. solace_agent_mesh/gateway/http_sse/alembic/versions/20251024_add_default_agent_to_projects.py +26 -0
  169. solace_agent_mesh/gateway/http_sse/alembic/versions/20251024_add_projects_table.py +135 -0
  170. solace_agent_mesh/gateway/http_sse/alembic/versions/versions_llm.txt +26 -20
  171. solace_agent_mesh/gateway/http_sse/app.py +0 -14
  172. solace_agent_mesh/gateway/http_sse/component.py +17 -56
  173. solace_agent_mesh/gateway/http_sse/components/components_llm.txt +1 -1
  174. solace_agent_mesh/gateway/http_sse/dependencies.py +21 -3
  175. solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +8 -8
  176. solace_agent_mesh/gateway/http_sse/main.py +23 -5
  177. solace_agent_mesh/gateway/http_sse/repository/__init__.py +19 -1
  178. solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +56 -98
  179. solace_agent_mesh/gateway/http_sse/repository/entities/project.py +81 -0
  180. solace_agent_mesh/gateway/http_sse/repository/entities/project_user.py +47 -0
  181. solace_agent_mesh/gateway/http_sse/repository/entities/session.py +23 -1
  182. solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +47 -0
  183. solace_agent_mesh/gateway/http_sse/repository/interfaces.py +112 -4
  184. solace_agent_mesh/gateway/http_sse/repository/models/__init__.py +9 -1
  185. solace_agent_mesh/gateway/http_sse/repository/models/models_llm.txt +51 -60
  186. solace_agent_mesh/gateway/http_sse/repository/models/project_model.py +51 -0
  187. solace_agent_mesh/gateway/http_sse/repository/models/project_user_model.py +75 -0
  188. solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +7 -1
  189. solace_agent_mesh/gateway/http_sse/repository/project_repository.py +172 -0
  190. solace_agent_mesh/gateway/http_sse/repository/project_user_repository.py +186 -0
  191. solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +125 -157
  192. solace_agent_mesh/gateway/http_sse/repository/session_repository.py +269 -8
  193. solace_agent_mesh/gateway/http_sse/routers/artifacts.py +143 -51
  194. solace_agent_mesh/gateway/http_sse/routers/config.py +69 -0
  195. solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +198 -94
  196. solace_agent_mesh/gateway/http_sse/routers/dto/requests/project_requests.py +48 -0
  197. solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +68 -18
  198. solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +13 -0
  199. solace_agent_mesh/gateway/http_sse/routers/dto/responses/project_responses.py +30 -0
  200. solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +51 -35
  201. solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +2 -0
  202. solace_agent_mesh/gateway/http_sse/routers/feedback.py +133 -2
  203. solace_agent_mesh/gateway/http_sse/routers/projects.py +542 -0
  204. solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +9 -11
  205. solace_agent_mesh/gateway/http_sse/routers/sessions.py +154 -3
  206. solace_agent_mesh/gateway/http_sse/routers/tasks.py +296 -4
  207. solace_agent_mesh/gateway/http_sse/services/project_service.py +403 -0
  208. solace_agent_mesh/gateway/http_sse/services/services_llm.txt +16 -10
  209. solace_agent_mesh/gateway/http_sse/services/session_service.py +178 -6
  210. solace_agent_mesh/gateway/http_sse/shared/exception_handlers.py +2 -3
  211. solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +48 -14
  212. solace_agent_mesh/solace_agent_mesh_llm.txt +1 -1
  213. {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.1.dist-info}/METADATA +3 -5
  214. {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.1.dist-info}/RECORD +218 -175
  215. solace_agent_mesh/assets/docs/assets/js/15ba94aa.932dd2db.js +0 -1
  216. solace_agent_mesh/assets/docs/assets/js/3ac1795d.76654dd9.js +0 -1
  217. solace_agent_mesh/assets/docs/assets/js/3ff0015d.2be20244.js +0 -1
  218. solace_agent_mesh/assets/docs/assets/js/547e15cc.2cbb060a.js +0 -1
  219. solace_agent_mesh/assets/docs/assets/js/5c2bd65f.eda4bcb2.js +0 -1
  220. solace_agent_mesh/assets/docs/assets/js/631738c7.7c4594c9.js +0 -1
  221. solace_agent_mesh/assets/docs/assets/js/6a520c9d.ba015d81.js +0 -1
  222. solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.f4b15f3b.js +0 -1
  223. solace_agent_mesh/assets/docs/assets/js/71da7b71.ddbdfbe2.js +0 -1
  224. solace_agent_mesh/assets/docs/assets/js/8024126c.56e59919.js +0 -1
  225. solace_agent_mesh/assets/docs/assets/js/94e8668d.3b883666.js +0 -1
  226. solace_agent_mesh/assets/docs/assets/js/da0b5bad.d08a9466.js +0 -1
  227. solace_agent_mesh/assets/docs/assets/js/dd817ffc.0aa9630a.js +0 -1
  228. solace_agent_mesh/assets/docs/assets/js/dd81e2b8.d590bc9e.js +0 -1
  229. solace_agent_mesh/assets/docs/assets/js/de915948.27d6b065.js +0 -1
  230. solace_agent_mesh/assets/docs/assets/js/e3d9abda.6b9493d0.js +0 -1
  231. solace_agent_mesh/assets/docs/assets/js/e92d0134.4f395c6b.js +0 -1
  232. solace_agent_mesh/assets/docs/assets/js/f284c35a.720d2ef2.js +0 -1
  233. solace_agent_mesh/assets/docs/assets/js/ff4d71f2.15b02f97.js +0 -1
  234. solace_agent_mesh/assets/docs/assets/js/main.ed05b14d.js +0 -2
  235. solace_agent_mesh/assets/docs/assets/js/runtime~main.a8a75e0b.js +0 -1
  236. solace_agent_mesh/assets/docs/lunr-index-1761744323675.json +0 -1
  237. solace_agent_mesh/assets/docs/search-doc-1761744323675.json +0 -1
  238. solace_agent_mesh/client/webui/frontend/static/assets/main--3yJYl7S.css +0 -1
  239. solace_agent_mesh/client/webui/frontend/static/assets/main-DojKHS49.js +0 -342
  240. solace_agent_mesh/client/webui/frontend/static/assets/vendor-DSqhjwq_.js +0 -405
  241. /solace_agent_mesh/assets/docs/assets/js/{main.ed05b14d.js.LICENSE.txt → main.f213fe0c.js.LICENSE.txt} +0 -0
  242. {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.1.dist-info}/WHEEL +0 -0
  243. {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.1.dist-info}/entry_points.txt +0 -0
  244. {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,13 +1,13 @@
1
1
  # DEVELOPER GUIDE: dto
2
2
 
3
3
  ## Quick Summary
4
- The `dto` directory contains Data Transfer Objects (DTOs) for API contract definition and validation in the HTTP SSE gateway. It's organized into two main subdirectories: `requests` for incoming API request validation using Pydantic models, and `responses` for structured API response formatting with automatic timestamp conversion. The DTOs primarily focus on session management operations and provide type-safe interfaces for API endpoints.
4
+ The `dto` directory contains Data Transfer Objects (DTOs) for API contract definition and validation in the HTTP SSE gateway. It's organized into two main subdirectories: `requests` for incoming API request validation using Pydantic models, and `responses` for structured API response formatting with automatic timestamp conversion. The DTOs primarily focus on session management and task operations, providing type-safe interfaces for API endpoints with field aliasing and validation.
5
5
 
6
6
  ## Files and Subdirectories Overview
7
7
  - **Direct files:**
8
8
  - `__init__.py` - Main module exports for requests and responses submodules
9
9
  - **Subdirectories:**
10
- - `requests/` - Request DTOs for API endpoint validation (session CRUD operations)
10
+ - `requests/` - Request DTOs for API endpoint validation (session and task CRUD operations)
11
11
  - `responses/` - Response DTOs with automatic timestamp serialization and field aliasing
12
12
 
13
13
  ## Developer API Reference
@@ -25,26 +25,27 @@ The `dto` directory contains Data Transfer Objects (DTOs) for API contract defin
25
25
  ### Subdirectory APIs
26
26
 
27
27
  #### requests/
28
- **Purpose:** Provides Pydantic models for validating incoming API requests, specifically for session management operations
29
- **Key Exports:** GetSessionsRequest, GetSessionRequest, GetSessionHistoryRequest, UpdateSessionRequest, DeleteSessionRequest
28
+ **Purpose:** Provides Pydantic models for validating incoming API requests for session management and task operations
29
+ **Key Exports:** GetSessionRequest, UpdateSessionRequest, SaveTaskRequest
30
30
  **Import Examples:**
31
31
  ```python
32
32
  from solace_agent_mesh.gateway.http_sse.routers.dto.requests import (
33
33
  GetSessionRequest,
34
- GetSessionHistoryRequest,
35
- UpdateSessionRequest
34
+ UpdateSessionRequest,
35
+ SaveTaskRequest
36
36
  )
37
37
  ```
38
38
 
39
39
  #### responses/
40
40
  **Purpose:** Provides structured response DTOs with automatic timestamp conversion and field aliasing for API consistency
41
- **Key Exports:** MessageResponse, SessionResponse, SessionListResponse, BaseTimestampResponse
41
+ **Key Exports:** SessionResponse, SessionListResponse, TaskResponse, TaskListResponse, BaseTimestampResponse
42
42
  **Import Examples:**
43
43
  ```python
44
44
  from solace_agent_mesh.gateway.http_sse.routers.dto.responses import (
45
- MessageResponse,
46
45
  SessionResponse,
47
- SessionListResponse
46
+ SessionListResponse,
47
+ TaskResponse,
48
+ TaskListResponse
48
49
  )
49
50
  ```
50
51
 
@@ -59,22 +60,22 @@ from solace_agent_mesh.gateway.http_sse.routers.dto import requests, responses
59
60
  # Or import specific DTOs directly
60
61
  from solace_agent_mesh.gateway.http_sse.routers.dto.requests import (
61
62
  GetSessionRequest,
62
- GetSessionHistoryRequest,
63
- UpdateSessionRequest
63
+ UpdateSessionRequest,
64
+ SaveTaskRequest
64
65
  )
65
66
  from solace_agent_mesh.gateway.http_sse.routers.dto.responses import (
66
67
  SessionResponse,
67
- MessageResponse,
68
- SessionListResponse
68
+ SessionListResponse,
69
+ TaskResponse,
70
+ TaskListResponse
69
71
  )
70
72
  ```
71
73
 
72
- ### 2. Working with Request DTOs
74
+ ### 2. Working with Session Request DTOs
73
75
 
74
76
  ```python
75
77
  from solace_agent_mesh.gateway.http_sse.routers.dto.requests import (
76
78
  GetSessionRequest,
77
- GetSessionHistoryRequest,
78
79
  UpdateSessionRequest
79
80
  )
80
81
  from pydantic import ValidationError
@@ -91,42 +92,64 @@ def get_session(session_id: str, user_id: str):
91
92
  print(f"Invalid request parameters: {e}")
92
93
  return None
93
94
 
94
- # Create a request to get session history with pagination
95
- def get_session_history(session_id: str, user_id: str, page: int = 1, size: int = 20):
95
+ # Create a request to update session name
96
+ def update_session_name(session_id: str, user_id: str, new_name: str):
96
97
  try:
97
- request = GetSessionHistoryRequest(
98
+ request = UpdateSessionRequest(
98
99
  session_id=session_id,
99
100
  user_id=user_id,
100
- pagination={"page": page, "size": size}
101
+ name=new_name # Automatically validated (1-255 characters)
101
102
  )
102
103
  return request
103
104
  except ValidationError as e:
104
105
  print(f"Validation failed: {e}")
105
106
  return None
107
+ ```
106
108
 
107
- # Create a request to update session name
108
- def update_session_name(session_id: str, user_id: str, new_name: str):
109
+ ### 3. Working with Task Request DTOs
110
+
111
+ ```python
112
+ from solace_agent_mesh.gateway.http_sse.routers.dto.requests import SaveTaskRequest
113
+ from pydantic import ValidationError
114
+ import json
115
+
116
+ # Create a save task request with camelCase field names (API style)
117
+ def save_task_with_validation(task_id: str, message_bubbles: list, user_message: str = None, metadata: dict = None):
109
118
  try:
110
- request = UpdateSessionRequest(
111
- session_id=session_id,
112
- user_id=user_id,
113
- name=new_name # Automatically validated (1-255 characters)
119
+ # Convert data to JSON strings as required
120
+ bubbles_json = json.dumps(message_bubbles)
121
+ metadata_json = json.dumps(metadata) if metadata else None
122
+
123
+ request = SaveTaskRequest(
124
+ task_id=task_id,
125
+ user_message=user_message,
126
+ message_bubbles=bubbles_json,
127
+ task_metadata=metadata_json
114
128
  )
115
129
  return request
116
130
  except ValidationError as e:
117
- print(f"Validation failed: {e}")
131
+ print(f"Task validation failed: {e}")
118
132
  return None
133
+
134
+ # Example usage
135
+ task_request = save_task_with_validation(
136
+ task_id="task_123",
137
+ message_bubbles=[
138
+ {"type": "user", "content": "Hello"},
139
+ {"type": "assistant", "content": "Hi there!"}
140
+ ],
141
+ user_message="Please analyze this data",
142
+ metadata={"priority": "high", "category": "analysis"}
143
+ )
119
144
  ```
120
145
 
121
- ### 3. Working with Response DTOs
146
+ ### 4. Working with Session Response DTOs
122
147
 
123
148
  ```python
124
149
  from solace_agent_mesh.gateway.http_sse.routers.dto.responses import (
125
150
  SessionResponse,
126
- MessageResponse,
127
151
  SessionListResponse
128
152
  )
129
- from solace_agent_mesh.gateway.http_sse.shared.enums import MessageType, SenderType
130
153
  import time
131
154
 
132
155
  # Create session responses
@@ -140,18 +163,6 @@ def create_session_response(session_data: dict) -> SessionResponse:
140
163
  updated_time=session_data.get("updated_time")
141
164
  )
142
165
 
143
- # Create message responses
144
- def create_message_response(message_data: dict) -> MessageResponse:
145
- return MessageResponse(
146
- id=message_data["id"],
147
- session_id=message_data["session_id"],
148
- message=message_data["message"],
149
- sender_type=SenderType.USER,
150
- sender_name=message_data["sender_name"],
151
- message_type=MessageType.TEXT,
152
- created_time=int(time.time() * 1000)
153
- )
154
-
155
166
  # Create paginated session list responses
156
167
  def create_session_list_response(sessions: list, total: int) -> SessionListResponse:
157
168
  session_responses = [create_session_response(session) for session in sessions]
@@ -162,19 +173,47 @@ def create_session_list_response(sessions: list, total: int) -> SessionListRespo
162
173
  )
163
174
  ```
164
175
 
165
- ### 4. Complete API Endpoint Example
176
+ ### 5. Working with Task Response DTOs
177
+
178
+ ```python
179
+ from solace_agent_mesh.gateway.http_sse.routers.dto.responses import (
180
+ TaskResponse,
181
+ TaskListResponse
182
+ )
183
+ import json
184
+ import time
185
+
186
+ # Create task responses
187
+ def create_task_response(task_data: dict) -> TaskResponse:
188
+ return TaskResponse(
189
+ task_id=task_data["task_id"],
190
+ session_id=task_data["session_id"],
191
+ user_message=task_data.get("user_message"),
192
+ message_bubbles=json.dumps(task_data["message_bubbles"]),
193
+ task_metadata=json.dumps(task_data["metadata"]) if task_data.get("metadata") else None,
194
+ created_time=int(time.time() * 1000),
195
+ updated_time=task_data.get("updated_time")
196
+ )
197
+
198
+ # Create task list responses
199
+ def create_task_list_response(tasks: list) -> TaskListResponse:
200
+ task_responses = [create_task_response(task) for task in tasks]
201
+ return TaskListResponse(tasks=task_responses)
202
+ ```
203
+
204
+ ### 6. Complete API Endpoint Examples
166
205
 
167
206
  ```python
168
207
  from fastapi import APIRouter, HTTPException
169
208
  from solace_agent_mesh.gateway.http_sse.routers.dto.requests import (
170
209
  GetSessionRequest,
171
- GetSessionHistoryRequest,
172
- UpdateSessionRequest
210
+ UpdateSessionRequest,
211
+ SaveTaskRequest
173
212
  )
174
213
  from solace_agent_mesh.gateway.http_sse.routers.dto.responses import (
175
214
  SessionResponse,
176
- MessageResponse,
177
- SessionListResponse
215
+ SessionListResponse,
216
+ TaskResponse
178
217
  )
179
218
 
180
219
  router = APIRouter()
@@ -200,39 +239,6 @@ async def get_session(session_id: str, user_id: str) -> SessionResponse:
200
239
  created_time=session_data["created_time"]
201
240
  )
202
241
 
203
- @router.get("/sessions/{session_id}/history")
204
- async def get_session_history(
205
- session_id: str,
206
- user_id: str,
207
- page: int = 1,
208
- size: int = 20
209
- ) -> list[MessageResponse]:
210
- """Get session message history"""
211
-
212
- # Validate request using DTO
213
- request = GetSessionHistoryRequest(
214
- session_id=session_id,
215
- user_id=user_id,
216
- pagination={"page": page, "size": size}
217
- )
218
-
219
- # Fetch messages (mock implementation)
220
- messages_data = fetch_session_messages(request)
221
-
222
- # Return response DTOs with automatic field aliasing
223
- return [
224
- MessageResponse(
225
- id=msg["id"],
226
- session_id=msg["session_id"],
227
- message=msg["message"],
228
- sender_type=msg["sender_type"],
229
- sender_name=msg["sender_name"],
230
- message_type=msg["message_type"],
231
- created_time=msg["created_time"]
232
- )
233
- for msg in messages_data
234
- ]
235
-
236
242
  @router.put("/sessions/{session_id}")
237
243
  async def update_session(
238
244
  session_id: str,
@@ -262,13 +268,45 @@ async def update_session(
262
268
  created_time=updated_session["created_time"],
263
269
  updated_time=updated_session["updated_time"]
264
270
  )
271
+
272
+ @router.post("/tasks")
273
+ async def save_task(
274
+ task_id: str,
275
+ message_bubbles: str,
276
+ user_message: str = None,
277
+ task_metadata: str = None
278
+ ) -> TaskResponse:
279
+ """Save a new task"""
280
+
281
+ # Validate request using DTO
282
+ try:
283
+ request = SaveTaskRequest(
284
+ task_id=task_id,
285
+ user_message=user_message,
286
+ message_bubbles=message_bubbles,
287
+ task_metadata=task_metadata
288
+ )
289
+ except ValidationError as e:
290
+ raise HTTPException(status_code=400, detail=str(e))
291
+
292
+ # Save task (mock implementation)
293
+ saved_task = save_task_to_db(request)
294
+
295
+ # Return response DTO
296
+ return TaskResponse(
297
+ task_id=saved_task["task_id"],
298
+ session_id=saved_task["session_id"],
299
+ user_message=saved_task["user_message"],
300
+ message_bubbles=saved_task["message_bubbles"],
301
+ task_metadata=saved_task["task_metadata"],
302
+ created_time=saved_task["created_time"]
303
+ )
265
304
  ```
266
305
 
267
- ### 5. JSON Serialization with Automatic Timestamp Conversion
306
+ ### 7. JSON Serialization with Automatic Timestamp Conversion
268
307
 
269
308
  ```python
270
- from solace_agent_mesh.gateway.http_sse.routers.dto.responses import SessionResponse, MessageResponse
271
- from solace_agent_mesh.gateway.http_sse.shared.enums import MessageType, SenderType
309
+ from solace_agent_mesh.gateway.http_sse.routers.dto.responses import SessionResponse, TaskResponse
272
310
  import json
273
311
 
274
312
  # Create a session response
@@ -291,25 +329,24 @@ print(json_output)
291
329
  # "updatedTime": "2022-01-01T00:01:00Z"
292
330
  # }
293
331
 
294
- # Create a message response with field aliasing
295
- message = MessageResponse(
296
- id="msg_789",
332
+ # Create a task response with field aliasing
333
+ task = TaskResponse(
334
+ task_id="task_789",
297
335
  session_id="sess_123",
298
- message="Hello world",
299
- sender_type=SenderType.USER,
300
- sender_name="John Doe",
301
- message_type=MessageType.TEXT,
336
+ user_message="Process this data",
337
+ message_bubbles='[{"type": "text", "content": "Processing..."}]',
338
+ task_metadata='{"priority": "high"}',
302
339
  created_time=1640995200000
303
340
  )
304
341
 
305
342
  # Get dict with converted timestamps and aliased fields
306
- dict_output = message.model_dump()
343
+ dict_output = task.model_dump()
344
+ print(dict_output["taskId"]) # "task_789" (camelCase alias)
307
345
  print(dict_output["sessionId"]) # "sess_123" (camelCase alias)
308
- print(dict_output["senderType"]) # SenderType.USER (camelCase alias)
309
346
  print(dict_output["createdTime"]) # "2022-01-01T00:00:00Z" (converted timestamp)
310
347
  ```
311
348
 
312
- ### 6. Custom Response Classes Using Base
349
+ ### 8. Custom Response Classes Using Base
313
350
 
314
351
  ```python
315
352
  from solace_agent_mesh.gateway.http_sse.routers.dto.responses.base_responses import BaseTimestampResponse
@@ -341,6 +378,73 @@ json_data = custom_response.model_dump_json()
341
378
  # Fields like created_time become ISO strings automatically
342
379
  ```
343
380
 
344
- This comprehensive guide shows how the `dto` directory provides a complete type-safe API contract system with automatic validation for requests and structured responses with timestamp conversion for the HTTP SSE gateway.
381
+ ### 9. Working with Both Requests and Responses Together
382
+
383
+ ```python
384
+ from solace_agent_mesh.gateway.http_sse.routers.dto.requests import UpdateSessionRequest, SaveTaskRequest
385
+ from solace_agent_mesh.gateway.http_sse.routers.dto.responses import SessionResponse, TaskResponse
386
+ from pydantic import ValidationError
387
+ import json
388
+
389
+ async def complete_session_workflow():
390
+ """Example showing complete request/response workflow"""
391
+
392
+ # 1. Validate incoming request data
393
+ try:
394
+ update_request = UpdateSessionRequest(
395
+ session_id="sess_123",
396
+ user_id="user_456",
397
+ name="Updated Session Name"
398
+ )
399
+ except ValidationError as e:
400
+ return {"error": f"Invalid session update request: {e}"}
401
+
402
+ # 2. Process the request (mock database operation)
403
+ updated_session_data = {
404
+ "id": update_request.session_id,
405
+ "user_id": update_request.user_id,
406
+ "name": update_request.name,
407
+ "created_time": 1640995200000,
408
+ "updated_time": 1640995260000
409
+ }
410
+
411
+ # 3. Create structured response
412
+ session_response = SessionResponse(**updated_session_data)
413
+
414
+ # 4. Save a related task
415
+ try:
416
+ task_request = SaveTaskRequest(
417
+ task_id="task_456",
418
+ user_message="Session updated successfully",
419
+ message_bubbles=json.dumps([
420
+ {"type": "system", "content": "Session name updated"}
421
+ ]),
422
+ task_metadata=json.dumps({"action": "session_update"})
423
+ )
424
+ except ValidationError as e:
425
+ return {"error": f"Invalid task request: {e}"}
426
+
427
+ # 5. Create task response
428
+ task_response = TaskResponse(
429
+ task_id=task_request.task_id,
430
+ session_id=update_request.session_id,
431
+ user_message=task_request.user_message,
432
+ message_bubbles=task_request.message_bubbles,
433
+ task_metadata=task_request.task_metadata,
434
+ created_time=1640995300000
435
+ )
436
+
437
+ # 6. Return both responses with automatic field aliasing and timestamp conversion
438
+ return {
439
+ "session": session_response.model_dump(),
440
+ "task": task_response.model_dump()
441
+ }
442
+
443
+ # Usage
444
+ result = await complete_session_workflow()
445
+ print(json.dumps(result, indent=2))
446
+ ```
447
+
448
+ This comprehensive guide shows how the `dto` directory provides a complete type-safe API contract system with automatic validation for requests and structured responses with timestamp conversion and field aliasing for both session management and task operations in the HTTP SSE gateway.
345
449
 
346
- # content_hash: 3bb29d4c46b962221fc3034560b7e0da75b5a41f7f8f4d4f25aecf26e10f83f5
450
+ # content_hash: 4a446edeace8a993477cc29e6c5676bbeb9fc98ae411e799017a21b610e486be
@@ -0,0 +1,48 @@
1
+ """
2
+ Request DTOs for project-related API endpoints.
3
+ """
4
+
5
+ from pydantic import BaseModel, Field
6
+ from typing import Optional
7
+
8
+
9
+ class CreateProjectRequest(BaseModel):
10
+ """Request to create a new project."""
11
+
12
+ name: str = Field(..., min_length=1, max_length=255, description="Project name")
13
+ description: Optional[str] = Field(None, max_length=1000, description="Project description")
14
+ system_prompt: Optional[str] = Field(None, max_length=4000, description="Instructions for the project")
15
+ default_agent_id: Optional[str] = Field(None, description="Default agent ID for new chats")
16
+ file_metadata: Optional[str] = Field(None, description="JSON string containing file metadata")
17
+ user_id: str
18
+
19
+
20
+ class UpdateProjectRequest(BaseModel):
21
+ """Request to update an existing project."""
22
+
23
+ name: Optional[str] = Field(None, min_length=1, max_length=255, description="Project name")
24
+ description: Optional[str] = Field(None, max_length=1000, description="Project description")
25
+ system_prompt: Optional[str] = Field(None, alias="systemPrompt", max_length=4000, description="Instructions for the project")
26
+ default_agent_id: Optional[str] = Field(None, alias="defaultAgentId", description="Default agent ID for new chats")
27
+
28
+
29
+ class GetProjectsRequest(BaseModel):
30
+ """Request DTO for retrieving projects."""
31
+ user_id: str
32
+
33
+
34
+ class GetProjectRequest(BaseModel):
35
+ """Request DTO for retrieving a specific project."""
36
+ project_id: str
37
+ user_id: str
38
+
39
+
40
+ class DeleteProjectRequest(BaseModel):
41
+ """Request DTO for deleting a project."""
42
+ project_id: str
43
+ user_id: str
44
+
45
+
46
+ class ProjectFilter(BaseModel):
47
+ """Filter criteria for retrieving projects."""
48
+ user_id: Optional[str] = None
@@ -1,42 +1,41 @@
1
1
  # DEVELOPER GUIDE: requests
2
2
 
3
3
  ## Quick Summary
4
- This directory contains request Data Transfer Objects (DTOs) for API endpoints, specifically focused on session management operations. These Pydantic models define the structure and validation rules for incoming API requests.
4
+ This directory contains request Data Transfer Objects (DTOs) for API endpoints, providing Pydantic models for session management and task operations. These DTOs handle request validation, field transformation, and type safety for incoming API requests.
5
5
 
6
6
  ## Files Overview
7
- - `__init__.py` - Exports all session-related request DTOs for easy importing
8
- - `session_requests.py` - Defines request DTOs for session CRUD operations (get, update, history retrieval)
7
+ - `__init__.py` - Exports all request DTOs for centralized importing
8
+ - `session_requests.py` - Defines request DTOs for session operations (get, update)
9
+ - `task_requests.py` - Defines request DTOs for task operations (save)
9
10
 
10
11
  ## Developer API Reference
11
12
 
12
13
  ### __init__.py
13
14
  **Purpose:** Provides centralized imports for all request DTOs
14
- **Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.requests import GetSessionRequest, GetSessionHistoryRequest, UpdateSessionRequest`
15
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.requests import GetSessionRequest, UpdateSessionRequest, SaveTaskRequest`
15
16
 
16
17
  **Usage Examples:**
17
18
  ```python
18
- # Import all session request DTOs
19
+ # Import all request DTOs
19
20
  from solace_agent_mesh.gateway.http_sse.routers.dto.requests import (
20
21
  GetSessionRequest,
21
- GetSessionHistoryRequest,
22
- UpdateSessionRequest
22
+ UpdateSessionRequest,
23
+ SaveTaskRequest
23
24
  )
24
25
  ```
25
26
 
26
27
  ### session_requests.py
27
28
  **Purpose:** Defines Pydantic models for session-related API request validation
28
- **Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.requests.session_requests import GetSessionRequest, GetSessionHistoryRequest, UpdateSessionRequest`
29
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.requests.session_requests import GetSessionRequest, UpdateSessionRequest`
29
30
 
30
31
  **Classes:**
31
32
  - `GetSessionRequest(session_id: SessionId, user_id: UserId)` - Request DTO for retrieving a specific session by ID
32
- - `GetSessionHistoryRequest(session_id: SessionId, user_id: UserId, pagination: Optional[PaginationInfo] = None)` - Request DTO for retrieving session message history with optional pagination
33
33
  - `UpdateSessionRequest(session_id: SessionId, user_id: UserId, name: str)` - Request DTO for updating session details with validation (name must be 1-255 characters)
34
34
 
35
35
  **Usage Examples:**
36
36
  ```python
37
37
  from solace_agent_mesh.gateway.http_sse.routers.dto.requests.session_requests import (
38
38
  GetSessionRequest,
39
- GetSessionHistoryRequest,
40
39
  UpdateSessionRequest
41
40
  )
42
41
  from pydantic import ValidationError
@@ -47,13 +46,6 @@ get_session_req = GetSessionRequest(
47
46
  user_id="user123"
48
47
  )
49
48
 
50
- # Create a request to get session history with pagination
51
- get_history_req = GetSessionHistoryRequest(
52
- session_id="session456",
53
- user_id="user123",
54
- pagination={"page": 1, "size": 20}
55
- )
56
-
57
49
  # Create a request to update a session name
58
50
  update_req = UpdateSessionRequest(
59
51
  session_id="session456",
@@ -80,4 +72,62 @@ print(f"User ID: {update_req.user_id}")
80
72
  print(f"New name: {update_req.name}")
81
73
  ```
82
74
 
83
- # content_hash: d40151714f449905662170c71b393dba7c98e7ec1c46f5f3a861097b2d5376b2
75
+ ### task_requests.py
76
+ **Purpose:** Defines Pydantic models for task-related API request validation with JSON field handling
77
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.requests.task_requests import SaveTaskRequest`
78
+
79
+ **Classes:**
80
+ - `SaveTaskRequest(task_id: str, user_message: Optional[str], message_bubbles: str, task_metadata: Optional[str])` - Request DTO for saving tasks with JSON validation
81
+ - `validate_task_id(v: str) -> str` - Validates task_id is non-empty and strips whitespace
82
+ - `validate_message_bubbles(v: str) -> str` - Validates message_bubbles is valid non-empty JSON array
83
+ - `validate_task_metadata(v: Optional[str]) -> Optional[str]` - Validates task_metadata is valid JSON if provided
84
+
85
+ **Usage Examples:**
86
+ ```python
87
+ from solace_agent_mesh.gateway.http_sse.routers.dto.requests.task_requests import SaveTaskRequest
88
+ from pydantic import ValidationError
89
+ import json
90
+
91
+ # Create a save task request with camelCase field names (API style)
92
+ task_data = {
93
+ "taskId": "task_123",
94
+ "userMessage": "Please analyze this data",
95
+ "messageBubbles": json.dumps([
96
+ {"type": "user", "content": "Hello"},
97
+ {"type": "assistant", "content": "Hi there!"}
98
+ ]),
99
+ "taskMetadata": json.dumps({"priority": "high", "category": "analysis"})
100
+ }
101
+
102
+ try:
103
+ save_task_req = SaveTaskRequest(**task_data)
104
+ print(f"Task ID: {save_task_req.task_id}")
105
+ print(f"User Message: {save_task_req.user_message}")
106
+ print(f"Message Bubbles: {save_task_req.message_bubbles}")
107
+ print(f"Task Metadata: {save_task_req.task_metadata}")
108
+ except ValidationError as e:
109
+ print(f"Validation failed: {e}")
110
+
111
+ # Create with snake_case field names (internal style)
112
+ task_data_snake = {
113
+ "task_id": "task_456",
114
+ "user_message": "Process this request",
115
+ "message_bubbles": json.dumps([{"type": "system", "content": "Processing..."}]),
116
+ "task_metadata": None # Optional field
117
+ }
118
+
119
+ save_task_req2 = SaveTaskRequest(**task_data_snake)
120
+
121
+ # Handle validation errors
122
+ invalid_data = {
123
+ "taskId": "", # Empty task_id will fail validation
124
+ "messageBubbles": "invalid json" # Invalid JSON will fail
125
+ }
126
+
127
+ try:
128
+ SaveTaskRequest(**invalid_data)
129
+ except ValidationError as e:
130
+ print(f"Expected validation error: {e}")
131
+ ```
132
+
133
+ # content_hash: 57595b5f602ab4728452316a250ef1ecdcf8dedba497c07de378959b659eccc2
@@ -2,6 +2,7 @@
2
2
  Session-related request DTOs.
3
3
  """
4
4
 
5
+ from typing import Optional
5
6
  from pydantic import BaseModel, Field
6
7
 
7
8
  from ....shared.types import SessionId, UserId
@@ -10,6 +11,7 @@ from ....shared.types import SessionId, UserId
10
11
  class GetSessionRequest(BaseModel):
11
12
  """Request DTO for retrieving a specific session."""
12
13
  session_id: SessionId
14
+ project_id: Optional[str] = None
13
15
  user_id: UserId
14
16
 
15
17
 
@@ -18,3 +20,14 @@ class UpdateSessionRequest(BaseModel):
18
20
  session_id: SessionId
19
21
  user_id: UserId
20
22
  name: str = Field(..., min_length=1, max_length=255, description="New session name")
23
+
24
+
25
+ class MoveSessionRequest(BaseModel):
26
+ """Request DTO for moving a session to a different project."""
27
+ project_id: Optional[str] = Field(None, alias="projectId", description="New project ID (null to remove from project)")
28
+
29
+
30
+ class SearchSessionsRequest(BaseModel):
31
+ """Request DTO for searching sessions."""
32
+ query: str = Field(..., min_length=1, description="Search query string")
33
+ project_id: Optional[str] = Field(None, alias="projectId", description="Optional project ID to filter results")
@@ -0,0 +1,30 @@
1
+ """
2
+ Project-related response DTOs.
3
+ """
4
+
5
+ from pydantic import BaseModel, ConfigDict, Field
6
+ from typing import Optional
7
+
8
+ from .base_responses import BaseTimestampResponse
9
+
10
+
11
+ class ProjectResponse(BaseTimestampResponse):
12
+ """Response DTO for a project."""
13
+
14
+ id: str
15
+ name: str
16
+ user_id: str = Field(alias="userId")
17
+ description: Optional[str] = None
18
+ system_prompt: Optional[str] = Field(default=None, alias="systemPrompt")
19
+ default_agent_id: Optional[str] = Field(default=None, alias="defaultAgentId")
20
+ created_at: int = Field(alias="createdAt")
21
+ updated_at: Optional[int] = Field(default=None, alias="updatedAt")
22
+
23
+
24
+ class ProjectListResponse(BaseModel):
25
+ """Response DTO for a list of projects."""
26
+
27
+ model_config = ConfigDict(populate_by_name=True)
28
+
29
+ projects: list[ProjectResponse]
30
+ total: int