solace-agent-mesh 1.0.7__py3-none-any.whl → 1.1.0__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (163) hide show
  1. solace_agent_mesh/agent/adk/adk_llm.txt +182 -42
  2. solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +171 -0
  3. solace_agent_mesh/agent/adk/callbacks.py +165 -104
  4. solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +0 -18
  5. solace_agent_mesh/agent/adk/models/models_llm.txt +104 -55
  6. solace_agent_mesh/agent/adk/runner.py +7 -5
  7. solace_agent_mesh/agent/adk/services.py +9 -1
  8. solace_agent_mesh/agent/adk/setup.py +11 -0
  9. solace_agent_mesh/agent/adk/stream_parser.py +8 -1
  10. solace_agent_mesh/agent/adk/tool_wrapper.py +10 -3
  11. solace_agent_mesh/agent/agent_llm.txt +355 -18
  12. solace_agent_mesh/agent/protocol/event_handlers.py +433 -296
  13. solace_agent_mesh/agent/protocol/protocol_llm.txt +54 -7
  14. solace_agent_mesh/agent/sac/app.py +1 -1
  15. solace_agent_mesh/agent/sac/component.py +212 -517
  16. solace_agent_mesh/agent/sac/sac_llm.txt +133 -63
  17. solace_agent_mesh/agent/testing/testing_llm.txt +25 -58
  18. solace_agent_mesh/agent/tools/peer_agent_tool.py +15 -11
  19. solace_agent_mesh/agent/tools/tools_llm.txt +234 -69
  20. solace_agent_mesh/agent/utils/artifact_helpers.py +35 -1
  21. solace_agent_mesh/agent/utils/utils_llm.txt +90 -105
  22. solace_agent_mesh/assets/docs/404.html +3 -3
  23. solace_agent_mesh/assets/docs/assets/js/{3d406171.7d02a73b.js → 3d406171.0b9eeed1.js} +1 -1
  24. solace_agent_mesh/assets/docs/assets/js/6e0db977.39a79ca9.js +1 -0
  25. solace_agent_mesh/assets/docs/assets/js/{75384d09.ccd480c4.js → 75384d09.bf78fbdb.js} +1 -1
  26. solace_agent_mesh/assets/docs/assets/js/90dd9cf6.88f385ea.js +1 -0
  27. solace_agent_mesh/assets/docs/assets/js/f284c35a.fb68323a.js +1 -0
  28. solace_agent_mesh/assets/docs/assets/js/main.a75ecc0d.js +2 -0
  29. solace_agent_mesh/assets/docs/assets/js/runtime~main.458efb1d.js +1 -0
  30. solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +4 -4
  31. solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +4 -4
  32. solace_agent_mesh/assets/docs/docs/documentation/concepts/cli/index.html +4 -4
  33. solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +4 -4
  34. solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +4 -4
  35. solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +4 -4
  36. solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +4 -4
  37. solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +4 -4
  38. solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +4 -4
  39. solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +4 -4
  40. solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/index.html +4 -4
  41. solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +4 -4
  42. solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +4 -4
  43. solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +4 -4
  44. solace_agent_mesh/assets/docs/docs/documentation/migration-guides/a2a-upgrade-to-0.3.0/a2a-gateway-upgrade-to-0.3.0/index.html +105 -0
  45. solace_agent_mesh/assets/docs/docs/documentation/migration-guides/a2a-upgrade-to-0.3.0/a2a-technical-migration-map/index.html +53 -0
  46. solace_agent_mesh/assets/docs/docs/documentation/tutorials/bedrock-agents/index.html +4 -4
  47. solace_agent_mesh/assets/docs/docs/documentation/tutorials/custom-agent/index.html +8 -8
  48. solace_agent_mesh/assets/docs/docs/documentation/tutorials/event-mesh-gateway/index.html +4 -4
  49. solace_agent_mesh/assets/docs/docs/documentation/tutorials/mcp-integration/index.html +4 -4
  50. solace_agent_mesh/assets/docs/docs/documentation/tutorials/mongodb-integration/index.html +4 -4
  51. solace_agent_mesh/assets/docs/docs/documentation/tutorials/rag-integration/index.html +4 -4
  52. solace_agent_mesh/assets/docs/docs/documentation/tutorials/rest-gateway/index.html +4 -4
  53. solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +4 -4
  54. solace_agent_mesh/assets/docs/docs/documentation/tutorials/sql-database/index.html +4 -4
  55. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/artifact-management/index.html +4 -4
  56. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/audio-tools/index.html +4 -4
  57. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/data-analysis-tools/index.html +4 -4
  58. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/embeds/index.html +4 -4
  59. solace_agent_mesh/assets/docs/docs/documentation/user-guide/builtin-tools/index.html +4 -4
  60. solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-agents/index.html +4 -4
  61. solace_agent_mesh/assets/docs/docs/documentation/user-guide/create-gateways/index.html +4 -4
  62. solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +4 -4
  63. solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +4 -4
  64. solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +4 -4
  65. solace_agent_mesh/assets/docs/lunr-index-1756992446316.json +1 -0
  66. solace_agent_mesh/assets/docs/lunr-index.json +1 -1
  67. solace_agent_mesh/assets/docs/search-doc-1756992446316.json +1 -0
  68. solace_agent_mesh/assets/docs/search-doc.json +1 -1
  69. solace_agent_mesh/assets/docs/sitemap.xml +1 -1
  70. solace_agent_mesh/cli/__init__.py +1 -1
  71. solace_agent_mesh/cli/commands/add_cmd/web_add_agent_step.py +12 -3
  72. solace_agent_mesh/cli/commands/add_cmd/web_add_gateway_step.py +10 -14
  73. solace_agent_mesh/cli/commands/init_cmd/web_init_step.py +2 -15
  74. solace_agent_mesh/cli/commands/plugin_cmd/catalog_cmd.py +6 -2
  75. solace_agent_mesh/cli/utils.py +15 -0
  76. solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-DvlO62me.js → authCallback-BmF2l6vg.js} +1 -1
  77. solace_agent_mesh/client/webui/frontend/static/assets/{client-bp6u3qVZ.js → client-D881Dttc.js} +4 -4
  78. solace_agent_mesh/client/webui/frontend/static/assets/main-C0jZjYa8.js +699 -0
  79. solace_agent_mesh/client/webui/frontend/static/assets/main-CCeG324-.css +1 -0
  80. solace_agent_mesh/client/webui/frontend/static/auth-callback.html +2 -2
  81. solace_agent_mesh/client/webui/frontend/static/index.html +3 -3
  82. solace_agent_mesh/common/a2a/__init__.py +213 -0
  83. solace_agent_mesh/common/a2a/a2a_llm.txt +182 -0
  84. solace_agent_mesh/common/a2a/artifact.py +328 -0
  85. solace_agent_mesh/common/a2a/events.py +183 -0
  86. solace_agent_mesh/common/a2a/message.py +307 -0
  87. solace_agent_mesh/common/a2a/protocol.py +513 -0
  88. solace_agent_mesh/common/a2a/task.py +127 -0
  89. solace_agent_mesh/common/a2a/translation.py +653 -0
  90. solace_agent_mesh/common/a2a/types.py +54 -0
  91. solace_agent_mesh/common/a2a_spec/a2a.json +2576 -0
  92. solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +407 -0
  93. solace_agent_mesh/common/a2a_spec/schemas/agent_progress_update.json +18 -0
  94. solace_agent_mesh/common/a2a_spec/schemas/artifact_creation_progress.json +31 -0
  95. solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json +18 -0
  96. solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +235 -0
  97. solace_agent_mesh/common/a2a_spec/schemas/tool_invocation_start.json +26 -0
  98. solace_agent_mesh/common/a2a_spec/schemas/tool_result.json +25 -0
  99. solace_agent_mesh/common/agent_registry.py +1 -1
  100. solace_agent_mesh/common/common_llm.txt +192 -70
  101. solace_agent_mesh/common/data_parts.py +99 -0
  102. solace_agent_mesh/common/middleware/middleware_llm.txt +17 -17
  103. solace_agent_mesh/common/sac/__init__.py +0 -0
  104. solace_agent_mesh/common/sac/sac_llm.txt +71 -0
  105. solace_agent_mesh/common/sac/sam_component_base.py +252 -0
  106. solace_agent_mesh/common/services/providers/providers_llm.txt +51 -84
  107. solace_agent_mesh/common/services/services_llm.txt +206 -26
  108. solace_agent_mesh/common/utils/artifact_utils.py +29 -0
  109. solace_agent_mesh/common/utils/embeds/embeds_llm.txt +176 -80
  110. solace_agent_mesh/common/utils/utils_llm.txt +323 -42
  111. solace_agent_mesh/config_portal/backend/common.py +1 -1
  112. solace_agent_mesh/config_portal/frontend/static/client/assets/{_index-MqsrTd6g.js → _index-Bym6YkMd.js} +74 -24
  113. solace_agent_mesh/config_portal/frontend/static/client/assets/{components-B7lKcHVY.js → components-Rk0n-9cK.js} +1 -1
  114. solace_agent_mesh/config_portal/frontend/static/client/assets/{entry.client-CEumGClk.js → entry.client-mvZjNKiz.js} +1 -1
  115. solace_agent_mesh/config_portal/frontend/static/client/assets/{index-DSo1AH_7.js → index-DzNKzXrc.js} +1 -1
  116. solace_agent_mesh/config_portal/frontend/static/client/assets/manifest-d845808d.js +1 -0
  117. solace_agent_mesh/config_portal/frontend/static/client/assets/{root-C4XmHinv.js → root-BWvk5-gF.js} +1 -1
  118. solace_agent_mesh/config_portal/frontend/static/client/index.html +3 -3
  119. solace_agent_mesh/core_a2a/core_a2a_llm.txt +10 -8
  120. solace_agent_mesh/core_a2a/service.py +20 -44
  121. solace_agent_mesh/gateway/base/app.py +27 -1
  122. solace_agent_mesh/gateway/base/base_llm.txt +177 -72
  123. solace_agent_mesh/gateway/base/component.py +294 -523
  124. solace_agent_mesh/gateway/gateway_llm.txt +299 -58
  125. solace_agent_mesh/gateway/http_sse/component.py +156 -183
  126. solace_agent_mesh/gateway/http_sse/components/components_llm.txt +29 -29
  127. solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +272 -36
  128. solace_agent_mesh/gateway/http_sse/main.py +8 -10
  129. solace_agent_mesh/gateway/http_sse/routers/agents.py +1 -1
  130. solace_agent_mesh/gateway/http_sse/routers/artifacts.py +18 -4
  131. solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +231 -5
  132. solace_agent_mesh/gateway/http_sse/routers/sessions.py +12 -7
  133. solace_agent_mesh/gateway/http_sse/routers/tasks.py +116 -169
  134. solace_agent_mesh/gateway/http_sse/services/agent_service.py +1 -1
  135. solace_agent_mesh/gateway/http_sse/services/services_llm.txt +89 -135
  136. solace_agent_mesh/gateway/http_sse/services/task_service.py +2 -5
  137. solace_agent_mesh/solace_agent_mesh_llm.txt +362 -0
  138. solace_agent_mesh/templates/gateway_component_template.py +149 -98
  139. {solace_agent_mesh-1.0.7.dist-info → solace_agent_mesh-1.1.0.dist-info}/METADATA +5 -4
  140. {solace_agent_mesh-1.0.7.dist-info → solace_agent_mesh-1.1.0.dist-info}/RECORD +144 -127
  141. solace_agent_mesh/assets/docs/assets/js/f284c35a.731836ad.js +0 -1
  142. solace_agent_mesh/assets/docs/assets/js/main.d79f063b.js +0 -2
  143. solace_agent_mesh/assets/docs/assets/js/runtime~main.6415ad00.js +0 -1
  144. solace_agent_mesh/assets/docs/lunr-index-1756146501924.json +0 -1
  145. solace_agent_mesh/assets/docs/search-doc-1756146501924.json +0 -1
  146. solace_agent_mesh/client/webui/frontend/static/assets/main-BCpII1-0.css +0 -1
  147. solace_agent_mesh/client/webui/frontend/static/assets/main-BucUdn9m.js +0 -673
  148. solace_agent_mesh/common/a2a_protocol.py +0 -564
  149. solace_agent_mesh/common/client/__init__.py +0 -4
  150. solace_agent_mesh/common/client/card_resolver.py +0 -21
  151. solace_agent_mesh/common/client/client.py +0 -85
  152. solace_agent_mesh/common/client/client_llm.txt +0 -133
  153. solace_agent_mesh/common/server/__init__.py +0 -4
  154. solace_agent_mesh/common/server/server.py +0 -122
  155. solace_agent_mesh/common/server/server_llm.txt +0 -169
  156. solace_agent_mesh/common/server/task_manager.py +0 -291
  157. solace_agent_mesh/common/server/utils.py +0 -28
  158. solace_agent_mesh/common/types.py +0 -411
  159. solace_agent_mesh/config_portal/frontend/static/client/assets/manifest-28271392.js +0 -1
  160. /solace_agent_mesh/assets/docs/assets/js/{main.d79f063b.js.LICENSE.txt → main.a75ecc0d.js.LICENSE.txt} +0 -0
  161. {solace_agent_mesh-1.0.7.dist-info → solace_agent_mesh-1.1.0.dist-info}/WHEEL +0 -0
  162. {solace_agent_mesh-1.0.7.dist-info → solace_agent_mesh-1.1.0.dist-info}/entry_points.txt +0 -0
  163. {solace_agent_mesh-1.0.7.dist-info → solace_agent_mesh-1.1.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,4 @@
1
- Here is the DEVELOPER GUIDE for the `routers` directory.
1
+ # DEVELOPER GUIDE for the routers directory
2
2
 
3
3
  ## Quick Summary
4
4
  The `routers` directory contains FastAPI `APIRouter` modules that define the REST API endpoints for the HTTP SSE Gateway. Each file groups endpoints by a specific domain of functionality, such as agent discovery, artifact management, user authentication, task submission, and real-time event streaming. These routers are the primary interface for frontend applications and other clients to interact with the gateway.
@@ -20,18 +20,244 @@ The `routers` directory contains FastAPI `APIRouter` modules that define the RES
20
20
 
21
21
  ### agents.py
22
22
  **Purpose:** Provides REST endpoints for agent discovery.
23
- **Import:** `from src.solace_agent_mesh.gateway.http_sse.routers.agents import router`
23
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.agents import router`
24
24
 
25
25
  **Functions:**
26
- - `get_discovered_agents() -> List[AgentCard]`: Retrieves a list of all currently discovered and available A2A agents. The `AgentCard` type contains details about each agent.
26
+ - `get_discovered_agents() -> List[AgentCard]` - Retrieves a list of all currently discovered and available A2A agents.
27
27
 
28
28
  **Usage Examples:**
29
29
  ```python
30
30
  # To include this router in a FastAPI application
31
31
  from fastapi import FastAPI
32
- from src.solace_agent_mesh.gateway.http_sse.routers.agents import router
32
+ from solace_agent_mesh.gateway.http_sse.routers.agents import router
33
33
 
34
34
  app = FastAPI()
35
35
  app.include_router(router, prefix="/api/v1")
36
36
 
37
- # A client would make a GET request to /api/v1/agents
37
+ # A client would make a GET request to /api/v1/agents
38
+ ```
39
+
40
+ ### artifacts.py
41
+ **Purpose:** Manages session-specific artifacts via REST endpoints (upload, download, list, delete).
42
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.artifacts import router`
43
+
44
+ **Functions:**
45
+ - `list_artifact_versions(filename: str) -> List[int]` - Lists available version numbers for a specific artifact.
46
+ - `list_artifacts() -> List[ArtifactInfo]` - Retrieves detailed information for all artifacts in the current session.
47
+ - `get_latest_artifact(filename: str) -> StreamingResponse` - Downloads the latest version of an artifact.
48
+ - `get_specific_artifact_version(filename: str, version: Union[int, str]) -> StreamingResponse` - Downloads a specific version of an artifact.
49
+ - `get_artifact_by_uri(uri: str) -> StreamingResponse` - Downloads an artifact using its formal artifact:// URI.
50
+ - `upload_artifact(filename: str, upload_file: UploadFile, metadata_json: Optional[str]) -> Dict[str, Any]` - Uploads a new artifact version with optional metadata.
51
+ - `delete_artifact(filename: str) -> Response` - Deletes an artifact and all its versions.
52
+
53
+ **Usage Examples:**
54
+ ```python
55
+ # Include in FastAPI app
56
+ from fastapi import FastAPI
57
+ from solace_agent_mesh.gateway.http_sse.routers.artifacts import router
58
+
59
+ app = FastAPI()
60
+ app.include_router(router, prefix="/api/v1/artifacts")
61
+
62
+ # Client usage examples:
63
+ # GET /api/v1/artifacts/ - List all artifacts
64
+ # GET /api/v1/artifacts/myfile.txt - Download latest version
65
+ # GET /api/v1/artifacts/myfile.txt/versions/1 - Download specific version
66
+ # POST /api/v1/artifacts/myfile.txt - Upload new version
67
+ # DELETE /api/v1/artifacts/myfile.txt - Delete artifact
68
+ ```
69
+
70
+ ### auth.py
71
+ **Purpose:** Handles user authentication flow including login, callback, and token refresh.
72
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.auth import router`
73
+
74
+ **Functions:**
75
+ - `initiate_login(request: FastAPIRequest) -> RedirectResponse` - Initiates the login flow by redirecting to external auth service.
76
+ - `get_csrf_token(response: Response) -> Dict[str, str]` - Generates and returns a CSRF token.
77
+ - `auth_callback(request: FastAPIRequest) -> RedirectResponse` - Handles the callback from the OIDC provider.
78
+ - `refresh_token(request: FastAPIRequest) -> Dict[str, str]` - Refreshes an access token using the external auth service.
79
+
80
+ **Usage Examples:**
81
+ ```python
82
+ # Include in FastAPI app
83
+ from fastapi import FastAPI
84
+ from solace_agent_mesh.gateway.http_sse.routers.auth import router
85
+
86
+ app = FastAPI()
87
+ app.include_router(router, prefix="/api/v1")
88
+
89
+ # Client usage:
90
+ # GET /api/v1/auth/login - Start login flow
91
+ # GET /api/v1/csrf-token - Get CSRF token
92
+ # GET /api/v1/auth/callback - OAuth callback endpoint
93
+ # POST /api/v1/auth/refresh - Refresh access token
94
+ ```
95
+
96
+ ### config.py
97
+ **Purpose:** Provides configuration settings needed by the frontend application.
98
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.config import router`
99
+
100
+ **Functions:**
101
+ - `get_app_config() -> Dict[str, Any]` - Returns frontend configuration settings including auth URLs, welcome messages, and feature flags.
102
+
103
+ **Usage Examples:**
104
+ ```python
105
+ # Include in FastAPI app
106
+ from fastapi import FastAPI
107
+ from solace_agent_mesh.gateway.http_sse.routers.config import router
108
+
109
+ app = FastAPI()
110
+ app.include_router(router, prefix="/api/v1")
111
+
112
+ # Client usage:
113
+ # GET /api/v1/config - Get frontend configuration
114
+ ```
115
+
116
+ ### people.py
117
+ **Purpose:** Provides user search functionality for autocomplete features.
118
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.people import router`
119
+
120
+ **Functions:**
121
+ - `search_people(q: str, limit: int = 10) -> List[Dict[str, Any]]` - Searches for users to populate frontend autocomplete suggestions.
122
+
123
+ **Usage Examples:**
124
+ ```python
125
+ # Include in FastAPI app
126
+ from fastapi import FastAPI
127
+ from solace_agent_mesh.gateway.http_sse.routers.people import router
128
+
129
+ app = FastAPI()
130
+ app.include_router(router, prefix="/api/v1")
131
+
132
+ # Client usage:
133
+ # GET /api/v1/people/search?q=john&limit=5 - Search for users
134
+ ```
135
+
136
+ ### sessions.py
137
+ **Purpose:** Manages user sessions including creation and retrieval of session information.
138
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.sessions import router`
139
+
140
+ **Functions:**
141
+ - `create_new_session(request: FastAPIRequest) -> JSONRPCSuccessResponse` - Forces creation of a new A2A session.
142
+ - `get_current_session(request: FastAPIRequest) -> JSONRPCSuccessResponse` - Returns information about the current session.
143
+
144
+ **Usage Examples:**
145
+ ```python
146
+ # Include in FastAPI app
147
+ from fastapi import FastAPI
148
+ from solace_agent_mesh.gateway.http_sse.routers.sessions import router
149
+
150
+ app = FastAPI()
151
+ app.include_router(router, prefix="/api/v1/sessions")
152
+
153
+ # Client usage:
154
+ # POST /api/v1/sessions/new - Create new session
155
+ # GET /api/v1/sessions/current - Get current session info
156
+ ```
157
+
158
+ ### sse.py
159
+ **Purpose:** Provides Server-Sent Events (SSE) endpoint for streaming real-time task updates.
160
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.sse import router`
161
+
162
+ **Functions:**
163
+ - `subscribe_to_task_events(task_id: str, request: FastAPIRequest) -> EventSourceResponse` - Establishes an SSE connection for real-time task updates.
164
+
165
+ **Usage Examples:**
166
+ ```python
167
+ # Include in FastAPI app
168
+ from fastapi import FastAPI
169
+ from solace_agent_mesh.gateway.http_sse.routers.sse import router
170
+
171
+ app = FastAPI()
172
+ app.include_router(router, prefix="/api/v1/sse")
173
+
174
+ # Client usage:
175
+ # GET /api/v1/sse/subscribe/{task_id} - Subscribe to task events via SSE
176
+ ```
177
+
178
+ ### tasks.py
179
+ **Purpose:** Handles task submission and management including cancellation.
180
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.tasks import router`
181
+
182
+ **Functions:**
183
+ - `send_task_to_agent(request: FastAPIRequest, payload: SendMessageRequest) -> SendMessageSuccessResponse` - Submits a non-streaming task request.
184
+ - `subscribe_task_from_agent(request: FastAPIRequest, payload: SendStreamingMessageRequest) -> SendStreamingMessageSuccessResponse` - Submits a streaming task request.
185
+ - `cancel_agent_task(request: FastAPIRequest, taskId: str, payload: CancelTaskRequest) -> Dict[str, str]` - Sends a cancellation request for a specific task.
186
+
187
+ **Usage Examples:**
188
+ ```python
189
+ # Include in FastAPI app
190
+ from fastapi import FastAPI
191
+ from solace_agent_mesh.gateway.http_sse.routers.tasks import router
192
+
193
+ app = FastAPI()
194
+ app.include_router(router, prefix="/api/v1/tasks")
195
+
196
+ # Client usage:
197
+ # POST /api/v1/tasks/message:send - Submit non-streaming task
198
+ # POST /api/v1/tasks/message:stream - Submit streaming task
199
+ # POST /api/v1/tasks/{taskId}:cancel - Cancel a task
200
+ ```
201
+
202
+ ### users.py
203
+ **Purpose:** Provides information about the currently authenticated user.
204
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.users import router`
205
+
206
+ **Functions:**
207
+ - `get_current_user(request: FastAPIRequest) -> Dict[str, Any]` - Retrieves information about the currently authenticated user.
208
+
209
+ **Usage Examples:**
210
+ ```python
211
+ # Include in FastAPI app
212
+ from fastapi import FastAPI
213
+ from solace_agent_mesh.gateway.http_sse.routers.users import router
214
+
215
+ app = FastAPI()
216
+ app.include_router(router, prefix="/api/v1/users")
217
+
218
+ # Client usage:
219
+ # GET /api/v1/users/me - Get current user info
220
+ ```
221
+
222
+ ### visualization.py
223
+ **Purpose:** Manages A2A message visualization streams for monitoring and debugging.
224
+ **Import:** `from solace_agent_mesh.gateway.http_sse.routers.visualization import router, SubscriptionTarget, VisualizationSubscribeRequest`
225
+
226
+ **Classes:**
227
+ - `SubscriptionTarget(BaseModel)` - Defines an abstract target for A2A message visualization.
228
+ - `type: str` - Type of target to monitor
229
+ - `identifier: Optional[str]` - Identifier for the target
230
+ - `VisualizationSubscribeRequest(BaseModel)` - Request body for initiating a visualization stream.
231
+ - `subscription_targets: Optional[List[SubscriptionTarget]]` - Targets to monitor
232
+ - `client_stream_id: Optional[str]` - Client-generated ID for idempotency
233
+ - `VisualizationSubscribeResponse(BaseModel)` - Response for successful visualization subscription.
234
+ - `VisualizationConfigUpdateRequest(BaseModel)` - Request for updating stream configuration.
235
+ - `VisualizationConfigUpdateResponse(BaseModel)` - Response for configuration updates.
236
+
237
+ **Functions:**
238
+ - `subscribe_to_visualization_stream(request_data: VisualizationSubscribeRequest) -> VisualizationSubscribeResponse` - Initiates a new A2A message visualization stream.
239
+ - `get_visualization_stream_events(stream_id: str) -> EventSourceResponse` - Establishes SSE connection for filtered A2A messages.
240
+ - `update_visualization_stream_config(stream_id: str, update_request: VisualizationConfigUpdateRequest) -> VisualizationConfigUpdateResponse` - Modifies stream configuration.
241
+ - `unsubscribe_from_visualization_stream(stream_id: str) -> Response` - Terminates an active visualization stream.
242
+
243
+ **Usage Examples:**
244
+ ```python
245
+ # Include in FastAPI app
246
+ from fastapi import FastAPI
247
+ from solace_agent_mesh.gateway.http_sse.routers.visualization import router, SubscriptionTarget, VisualizationSubscribeRequest
248
+
249
+ app = FastAPI()
250
+ app.include_router(router, prefix="/api/v1/visualization")
251
+
252
+ # Client usage:
253
+ # POST /api/v1/visualization/subscribe - Start visualization stream
254
+ # GET /api/v1/visualization/{stream_id}/events - SSE endpoint for events
255
+ # PUT /api/v1/visualization/{stream_id}/config - Update stream config
256
+ # DELETE /api/v1/visualization/{stream_id}/unsubscribe - Stop stream
257
+
258
+ # Example subscription request:
259
+ targets = [SubscriptionTarget(type="current_namespace_a2a_messages")]
260
+ request = VisualizationSubscribeRequest(subscription_targets=targets)
261
+ ```
262
+
263
+ # content_hash: cd51f2d84ce27b9939390065e8505a44c131798ac8296e1ad69ae55133cab7d5
@@ -8,7 +8,8 @@ from typing import TYPE_CHECKING
8
8
  from solace_ai_connector.common.log import log
9
9
  from ....gateway.http_sse.session_manager import SessionManager
10
10
  from ....gateway.http_sse.dependencies import get_session_manager
11
- from ....common.types import JSONRPCResponse, InternalError
11
+ from a2a.types import JSONRPCSuccessResponse
12
+ from ....common import a2a
12
13
 
13
14
  if TYPE_CHECKING:
14
15
  from ....gateway.http_sse.component import WebUIBackendComponent
@@ -16,7 +17,7 @@ if TYPE_CHECKING:
16
17
  router = APIRouter()
17
18
 
18
19
 
19
- @router.post("/new", response_model=JSONRPCResponse)
20
+ @router.post("/new", response_model=JSONRPCSuccessResponse)
20
21
  async def create_new_session(
21
22
  request: FastAPIRequest,
22
23
  session_manager: SessionManager = Depends(get_session_manager),
@@ -33,7 +34,7 @@ async def create_new_session(
33
34
 
34
35
  log.info("%sCreated new A2A session: %s", log_prefix, new_session_id)
35
36
 
36
- return JSONRPCResponse(
37
+ return a2a.create_generic_success_response(
37
38
  result={
38
39
  "sessionId": new_session_id,
39
40
  "message": "New A2A session created successfully",
@@ -42,14 +43,16 @@ async def create_new_session(
42
43
 
43
44
  except Exception as e:
44
45
  log.exception("%sError creating new session: %s", log_prefix, e)
45
- error_resp = InternalError(message=f"Failed to create new session: {e}")
46
+ error_resp = a2a.create_internal_error(
47
+ message=f"Failed to create new session: {e}"
48
+ )
46
49
  raise HTTPException(
47
50
  status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
48
51
  detail=error_resp.model_dump(exclude_none=True),
49
52
  )
50
53
 
51
54
 
52
- @router.get("/current", response_model=JSONRPCResponse)
55
+ @router.get("/current", response_model=JSONRPCSuccessResponse)
53
56
  async def get_current_session(
54
57
  request: FastAPIRequest,
55
58
  session_manager: SessionManager = Depends(get_session_manager),
@@ -63,7 +66,7 @@ async def get_current_session(
63
66
  client_id = session_manager.get_a2a_client_id(request)
64
67
  session_id = session_manager.get_a2a_session_id(request)
65
68
 
66
- return JSONRPCResponse(
69
+ return a2a.create_generic_success_response(
67
70
  result={
68
71
  "clientId": client_id,
69
72
  "sessionId": session_id,
@@ -73,7 +76,9 @@ async def get_current_session(
73
76
 
74
77
  except Exception as e:
75
78
  log.exception("%sError getting current session info: %s", log_prefix, e)
76
- error_resp = InternalError(message=f"Failed to get session info: {e}")
79
+ error_resp = a2a.create_internal_error(
80
+ message=f"Failed to get session info: {e}"
81
+ )
77
82
  raise HTTPException(
78
83
  status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
79
84
  detail=error_resp.model_dump(exclude_none=True),