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.
- solace_agent_mesh/agent/adk/adk_llm.txt +12 -18
- solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +1 -1
- solace_agent_mesh/agent/adk/callbacks.py +138 -20
- solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +2 -0
- solace_agent_mesh/agent/adk/models/lite_llm.py +38 -5
- solace_agent_mesh/agent/adk/models/models_llm.txt +82 -35
- solace_agent_mesh/agent/adk/runner.py +9 -0
- solace_agent_mesh/agent/adk/stream_parser.py +6 -1
- solace_agent_mesh/agent/adk/tool_wrapper.py +3 -0
- solace_agent_mesh/agent/agent_llm.txt +61 -70
- solace_agent_mesh/agent/protocol/event_handlers.py +29 -1
- solace_agent_mesh/agent/protocol/protocol_llm.txt +1 -1
- solace_agent_mesh/agent/proxies/a2a/a2a_llm.txt +190 -0
- solace_agent_mesh/agent/proxies/base/base_llm.txt +148 -0
- solace_agent_mesh/agent/proxies/proxies_llm.txt +283 -0
- solace_agent_mesh/agent/sac/app.py +22 -0
- solace_agent_mesh/agent/sac/component.py +76 -40
- solace_agent_mesh/agent/sac/sac_llm.txt +1 -1
- solace_agent_mesh/agent/sac/task_execution_context.py +21 -0
- solace_agent_mesh/agent/testing/testing_llm.txt +2 -1
- solace_agent_mesh/agent/tools/builtin_artifact_tools.py +13 -148
- solace_agent_mesh/agent/tools/dynamic_tool.py +2 -0
- solace_agent_mesh/agent/tools/tools_llm.txt +93 -80
- solace_agent_mesh/agent/tools/tools_llm_detail.txt +3 -2
- solace_agent_mesh/agent/utils/artifact_helpers.py +4 -0
- solace_agent_mesh/agent/utils/utils_llm.txt +16 -2
- solace_agent_mesh/assets/docs/404.html +3 -3
- solace_agent_mesh/assets/docs/assets/js/05749d90.c70b2be9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/15ba94aa.92fea363.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/15e40e79.36003774.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2987107d.a80604f9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ac1795d.e4870a49.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ff0015d.b63ee53a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/547e15cc.2f7790c1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5c2bd65f.45b32c2b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/631738c7.fa471607.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/64195356.c498c4d0.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6a520c9d.b6e3f2ce.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.a5b36a60.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/71da7b71.374b9d54.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8024126c.fa0e7186.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8b032486.91a91afc.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/94e8668d.09ed9234.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{ab9708a8.3e6dd091.js → ab9708a8.245ae0ef.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/ad87452a.9d73dad6.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/cbe2e9ea.f902fad8.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/da0b5bad.b62f7b08.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/db5d6442.3daf1696.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd817ffc.c37a755e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd81e2b8.b682e9c2.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/de915948.44a432bc.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e04b235d.c9c50c7b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e3d9abda.d11c67a7.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{e6f9706b.e74a984d.js → e6f9706b.045d0fa1.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/e92d0134.3bda61dd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/f284c35a.5099c51e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ff4d71f2.74710fc1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/main.f213fe0c.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/runtime~main.d9606d6a.js +1 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/artifact-management/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/audio-tools/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/data-analysis-tools/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/embeds/index.html +18 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/cli/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +5 -5
- solace_agent_mesh/assets/docs/docs/documentation/components/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/orchestrator/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/plugins/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/projects/index.html +196 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/proxies/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/deploying/debugging/index.html +5 -5
- solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +6 -7
- solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/deploying/kubernetes-deployment/index.html +47 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/logging/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/create-agents/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/create-gateways/index.html +160 -169
- solace_agent_mesh/assets/docs/docs/documentation/developing/creating-python-tools/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/evaluations/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/bedrock-agents/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/custom-agent/index.html +5 -5
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/event-mesh-gateway/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mcp-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mongodb-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rag-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rest-gateway/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/sql-database/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/agent-builder/index.html +59 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/connectors/index.html +62 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +10 -6
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/secure-user-delegated-access/index.html +440 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +27 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/wheel-installation/index.html +62 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/architecture/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/index.html +5 -4
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/artifact-storage/index.html +290 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/configurations/index.html +9 -9
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/installation/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/session-storage/index.html +251 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/user-feedback/index.html +88 -0
- solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0/index.html +3 -3
- solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-technical-migration-map/index.html +3 -3
- solace_agent_mesh/assets/docs/lunr-index-1762283454666.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -1
- solace_agent_mesh/assets/docs/search-doc-1762283454666.json +1 -0
- solace_agent_mesh/assets/docs/search-doc.json +1 -1
- solace_agent_mesh/assets/docs/sitemap.xml +1 -1
- solace_agent_mesh/cli/__init__.py +1 -1
- solace_agent_mesh/cli/commands/docs_cmd.py +4 -1
- solace_agent_mesh/cli/commands/init_cmd/orchestrator_step.py +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-D4_RMYRh.js → authCallback-tcIFZLis.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{client-UZ3qU6Bq.js → client-CRYdKo2Q.js} +3 -3
- solace_agent_mesh/client/webui/frontend/static/assets/main-CojeY_1w.css +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-ILja9MCG.js +353 -0
- solace_agent_mesh/client/webui/frontend/static/assets/vendor-CINwxvwV.js +470 -0
- solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -3
- solace_agent_mesh/client/webui/frontend/static/index.html +4 -4
- solace_agent_mesh/common/a2a/a2a_llm.txt +13 -20
- solace_agent_mesh/common/a2a/protocol.py +5 -0
- solace_agent_mesh/common/a2a/types.py +1 -0
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +49 -11
- solace_agent_mesh/common/a2a_spec/schemas/artifact_creation_progress.json +23 -6
- solace_agent_mesh/common/a2a_spec/schemas/feedback_event.json +51 -0
- solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +26 -9
- solace_agent_mesh/common/common_llm.txt +13 -34
- solace_agent_mesh/common/data_parts.py +20 -4
- solace_agent_mesh/common/middleware/middleware_llm.txt +1 -1
- solace_agent_mesh/common/sac/sac_llm.txt +1 -1
- solace_agent_mesh/common/sam_events/sam_events_llm.txt +1 -1
- solace_agent_mesh/common/services/employee_service.py +1 -1
- solace_agent_mesh/common/services/providers/providers_llm.txt +3 -2
- solace_agent_mesh/common/services/services_llm.txt +9 -4
- solace_agent_mesh/common/utils/embeds/constants.py +1 -0
- solace_agent_mesh/common/utils/embeds/embeds_llm.txt +1 -1
- solace_agent_mesh/common/utils/embeds/modifiers.py +2 -1
- solace_agent_mesh/common/utils/embeds/resolver.py +58 -6
- solace_agent_mesh/common/utils/embeds/types.py +8 -0
- solace_agent_mesh/common/utils/utils_llm.txt +5 -6
- solace_agent_mesh/core_a2a/core_a2a_llm.txt +1 -1
- solace_agent_mesh/gateway/adapter/__init__.py +1 -0
- solace_agent_mesh/gateway/adapter/base.py +143 -0
- solace_agent_mesh/gateway/adapter/types.py +221 -0
- solace_agent_mesh/gateway/base/app.py +29 -2
- solace_agent_mesh/gateway/base/base_llm.txt +10 -8
- solace_agent_mesh/gateway/base/component.py +573 -142
- solace_agent_mesh/gateway/gateway_llm.txt +55 -59
- solace_agent_mesh/gateway/generic/__init__.py +1 -0
- solace_agent_mesh/gateway/generic/app.py +50 -0
- solace_agent_mesh/gateway/generic/component.py +650 -0
- solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +99 -49
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_fulltext_search_indexes.py +92 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_project_users_table.py +72 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251023_add_soft_delete_and_search.py +150 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251024_add_default_agent_to_projects.py +26 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251024_add_projects_table.py +135 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/versions_llm.txt +26 -20
- solace_agent_mesh/gateway/http_sse/app.py +0 -14
- solace_agent_mesh/gateway/http_sse/component.py +17 -56
- solace_agent_mesh/gateway/http_sse/components/components_llm.txt +1 -1
- solace_agent_mesh/gateway/http_sse/dependencies.py +21 -3
- solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +8 -8
- solace_agent_mesh/gateway/http_sse/main.py +23 -5
- solace_agent_mesh/gateway/http_sse/repository/__init__.py +19 -1
- solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +56 -98
- solace_agent_mesh/gateway/http_sse/repository/entities/project.py +81 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/project_user.py +47 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/session.py +23 -1
- solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +47 -0
- solace_agent_mesh/gateway/http_sse/repository/interfaces.py +112 -4
- solace_agent_mesh/gateway/http_sse/repository/models/__init__.py +9 -1
- solace_agent_mesh/gateway/http_sse/repository/models/models_llm.txt +51 -60
- solace_agent_mesh/gateway/http_sse/repository/models/project_model.py +51 -0
- solace_agent_mesh/gateway/http_sse/repository/models/project_user_model.py +75 -0
- solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +7 -1
- solace_agent_mesh/gateway/http_sse/repository/project_repository.py +172 -0
- solace_agent_mesh/gateway/http_sse/repository/project_user_repository.py +186 -0
- solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +125 -157
- solace_agent_mesh/gateway/http_sse/repository/session_repository.py +269 -8
- solace_agent_mesh/gateway/http_sse/routers/artifacts.py +143 -51
- solace_agent_mesh/gateway/http_sse/routers/config.py +69 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +198 -94
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/project_requests.py +48 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +68 -18
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +13 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/project_responses.py +30 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +51 -35
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +2 -0
- solace_agent_mesh/gateway/http_sse/routers/feedback.py +133 -2
- solace_agent_mesh/gateway/http_sse/routers/projects.py +542 -0
- solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +9 -11
- solace_agent_mesh/gateway/http_sse/routers/sessions.py +154 -3
- solace_agent_mesh/gateway/http_sse/routers/tasks.py +296 -4
- solace_agent_mesh/gateway/http_sse/services/project_service.py +403 -0
- solace_agent_mesh/gateway/http_sse/services/services_llm.txt +16 -10
- solace_agent_mesh/gateway/http_sse/services/session_service.py +178 -6
- solace_agent_mesh/gateway/http_sse/shared/exception_handlers.py +2 -3
- solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +48 -14
- solace_agent_mesh/solace_agent_mesh_llm.txt +1 -1
- {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.1.dist-info}/METADATA +3 -5
- {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.1.dist-info}/RECORD +218 -175
- solace_agent_mesh/assets/docs/assets/js/15ba94aa.932dd2db.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/3ac1795d.76654dd9.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/3ff0015d.2be20244.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/547e15cc.2cbb060a.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/5c2bd65f.eda4bcb2.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/631738c7.7c4594c9.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/6a520c9d.ba015d81.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.f4b15f3b.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/71da7b71.ddbdfbe2.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/8024126c.56e59919.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/94e8668d.3b883666.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/da0b5bad.d08a9466.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/dd817ffc.0aa9630a.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/dd81e2b8.d590bc9e.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/de915948.27d6b065.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/e3d9abda.6b9493d0.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/e92d0134.4f395c6b.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/f284c35a.720d2ef2.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ff4d71f2.15b02f97.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/main.ed05b14d.js +0 -2
- solace_agent_mesh/assets/docs/assets/js/runtime~main.a8a75e0b.js +0 -1
- solace_agent_mesh/assets/docs/lunr-index-1761744323675.json +0 -1
- solace_agent_mesh/assets/docs/search-doc-1761744323675.json +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main--3yJYl7S.css +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-DojKHS49.js +0 -342
- solace_agent_mesh/client/webui/frontend/static/assets/vendor-DSqhjwq_.js +0 -405
- /solace_agent_mesh/assets/docs/assets/js/{main.ed05b14d.js.LICENSE.txt → main.f213fe0c.js.LICENSE.txt} +0 -0
- {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.1.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.1.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
# DEVELOPER GUIDE: responses
|
|
2
2
|
|
|
3
3
|
## Quick Summary
|
|
4
|
-
The `responses` directory contains Pydantic response DTOs (Data Transfer Objects) for API endpoints. It provides structured response models with automatic timestamp conversion from epoch milliseconds to ISO 8601 strings for JSON serialization.
|
|
4
|
+
The `responses` directory contains Pydantic response DTOs (Data Transfer Objects) for API endpoints. It provides structured response models with automatic timestamp conversion from epoch milliseconds to ISO 8601 strings for JSON serialization, covering sessions, tasks, and messages.
|
|
5
5
|
|
|
6
6
|
## Files Overview
|
|
7
7
|
- `__init__.py` - Exports all response DTOs for easy importing
|
|
8
8
|
- `base_responses.py` - Base response class with automatic timestamp serialization
|
|
9
|
-
- `session_responses.py` - Session
|
|
9
|
+
- `session_responses.py` - Session-related response DTOs with field aliasing
|
|
10
|
+
- `task_responses.py` - Task-related response DTOs with field aliasing
|
|
10
11
|
|
|
11
12
|
## Developer API Reference
|
|
12
13
|
|
|
13
14
|
### __init__.py
|
|
14
15
|
**Purpose:** Central import point for all response DTOs
|
|
15
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.responses import
|
|
16
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.responses import SessionResponse, SessionListResponse, TaskResponse, TaskListResponse`
|
|
16
17
|
|
|
17
18
|
### base_responses.py
|
|
18
19
|
**Purpose:** Provides base response class with automatic timestamp field conversion
|
|
@@ -38,20 +39,10 @@ json_data = response.model_dump() # created_time becomes ISO string
|
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
### session_responses.py
|
|
41
|
-
**Purpose:** Session
|
|
42
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.responses import
|
|
42
|
+
**Purpose:** Session response DTOs with field aliasing for API consistency
|
|
43
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.responses import SessionResponse, SessionListResponse`
|
|
43
44
|
|
|
44
45
|
**Classes:**
|
|
45
|
-
- `MessageResponse(BaseTimestampResponse)` - Response DTO for chat messages
|
|
46
|
-
- `id: MessageId` - Unique message identifier
|
|
47
|
-
- `session_id: SessionId` - Session this message belongs to (aliased as "sessionId")
|
|
48
|
-
- `message: str` - Message content
|
|
49
|
-
- `sender_type: SenderType` - Type of sender (aliased as "senderType")
|
|
50
|
-
- `sender_name: str` - Name of sender (aliased as "senderName")
|
|
51
|
-
- `message_type: MessageType` - Type of message (aliased as "messageType")
|
|
52
|
-
- `created_time: int` - Creation timestamp in epoch ms (aliased as "createdTime")
|
|
53
|
-
- `updated_time: int | None` - Update timestamp in epoch ms (aliased as "updatedTime")
|
|
54
|
-
|
|
55
46
|
- `SessionResponse(BaseTimestampResponse)` - Response DTO for chat sessions
|
|
56
47
|
- `id: SessionId` - Unique session identifier
|
|
57
48
|
- `user_id: UserId` - User who owns the session (aliased as "userId")
|
|
@@ -62,28 +53,12 @@ json_data = response.model_dump() # created_time becomes ISO string
|
|
|
62
53
|
|
|
63
54
|
- `SessionListResponse(BaseModel)` - Response DTO for paginated session lists
|
|
64
55
|
- `sessions: list[SessionResponse]` - List of session objects
|
|
65
|
-
- `pagination:
|
|
56
|
+
- `pagination: PaginationMeta | None` - Pagination metadata
|
|
66
57
|
- `total_count: int` - Total number of sessions (aliased as "totalCount")
|
|
67
58
|
|
|
68
59
|
**Usage Examples:**
|
|
69
60
|
```python
|
|
70
|
-
from solace_agent_mesh.gateway.http_sse.routers.dto.responses import
|
|
71
|
-
MessageResponse,
|
|
72
|
-
SessionResponse,
|
|
73
|
-
SessionListResponse
|
|
74
|
-
)
|
|
75
|
-
from solace_agent_mesh.gateway.http_sse.shared.enums import MessageType, SenderType
|
|
76
|
-
|
|
77
|
-
# Create a message response
|
|
78
|
-
message = MessageResponse(
|
|
79
|
-
id="msg_123",
|
|
80
|
-
session_id="sess_456",
|
|
81
|
-
message="Hello world",
|
|
82
|
-
sender_type=SenderType.USER,
|
|
83
|
-
sender_name="John Doe",
|
|
84
|
-
message_type=MessageType.TEXT,
|
|
85
|
-
created_time=1640995200000
|
|
86
|
-
)
|
|
61
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.responses import SessionResponse, SessionListResponse
|
|
87
62
|
|
|
88
63
|
# Create a session response
|
|
89
64
|
session = SessionResponse(
|
|
@@ -101,7 +76,48 @@ session_list = SessionListResponse(
|
|
|
101
76
|
)
|
|
102
77
|
|
|
103
78
|
# Serialize to JSON (timestamps auto-converted to ISO strings)
|
|
104
|
-
json_output =
|
|
79
|
+
json_output = session.model_dump_json()
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### task_responses.py
|
|
83
|
+
**Purpose:** Task response DTOs with field aliasing for API consistency
|
|
84
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.responses import TaskResponse, TaskListResponse`
|
|
85
|
+
|
|
86
|
+
**Classes:**
|
|
87
|
+
- `TaskResponse(BaseTimestampResponse)` - Response DTO for a single task
|
|
88
|
+
- `task_id: str` - Unique task identifier (aliased as "taskId")
|
|
89
|
+
- `session_id: str` - Session this task belongs to (aliased as "sessionId")
|
|
90
|
+
- `user_message: str | None` - Optional user message (aliased as "userMessage")
|
|
91
|
+
- `message_bubbles: str` - JSON string containing message bubbles (aliased as "messageBubbles")
|
|
92
|
+
- `task_metadata: str | None` - Optional JSON string with task metadata (aliased as "taskMetadata")
|
|
93
|
+
- `created_time: int` - Creation timestamp in epoch ms (aliased as "createdTime")
|
|
94
|
+
- `updated_time: int | None` - Update timestamp in epoch ms (aliased as "updatedTime")
|
|
95
|
+
|
|
96
|
+
- `TaskListResponse(BaseModel)` - Response DTO for a list of tasks
|
|
97
|
+
- `tasks: list[TaskResponse]` - List of task objects
|
|
98
|
+
|
|
99
|
+
**Usage Examples:**
|
|
100
|
+
```python
|
|
101
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.responses import TaskResponse, TaskListResponse
|
|
102
|
+
|
|
103
|
+
# Create a task response
|
|
104
|
+
task = TaskResponse(
|
|
105
|
+
task_id="task_123",
|
|
106
|
+
session_id="sess_456",
|
|
107
|
+
user_message="Process this data",
|
|
108
|
+
message_bubbles='{"bubbles": [{"type": "text", "content": "Processing..."}]}',
|
|
109
|
+
task_metadata='{"priority": "high"}',
|
|
110
|
+
created_time=1640995200000,
|
|
111
|
+
updated_time=1640995260000
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
# Create a task list response
|
|
115
|
+
task_list = TaskListResponse(
|
|
116
|
+
tasks=[task]
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
# Serialize to JSON (timestamps auto-converted to ISO strings)
|
|
120
|
+
json_output = task.model_dump_json()
|
|
105
121
|
```
|
|
106
122
|
|
|
107
|
-
# content_hash:
|
|
123
|
+
# content_hash: 059aa6ca2472994cbde0e223252c8e78ba2be6c5d0d4f3e91f5e10976e173e5d
|
|
@@ -16,6 +16,8 @@ class SessionResponse(BaseTimestampResponse):
|
|
|
16
16
|
user_id: UserId = Field(alias="userId")
|
|
17
17
|
name: str | None = None
|
|
18
18
|
agent_id: str | None = Field(default=None, alias="agentId")
|
|
19
|
+
project_id: str | None = Field(default=None, alias="projectId")
|
|
20
|
+
project_name: str | None = Field(default=None, alias="projectName")
|
|
19
21
|
created_time: int = Field(alias="createdTime")
|
|
20
22
|
updated_time: int | None = Field(default=None, alias="updatedTime")
|
|
21
23
|
|
|
@@ -2,16 +2,31 @@
|
|
|
2
2
|
API Router for receiving and processing user feedback on chat messages.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
6
|
+
from datetime import datetime
|
|
5
7
|
from typing import Literal, Optional
|
|
6
8
|
|
|
7
|
-
from fastapi import APIRouter, Depends
|
|
9
|
+
from fastapi import APIRouter, Depends, HTTPException, status
|
|
8
10
|
from fastapi import Request as FastAPIRequest
|
|
9
11
|
from pydantic import BaseModel, Field
|
|
12
|
+
from sqlalchemy.orm import Session as DBSession
|
|
10
13
|
|
|
11
|
-
from ..dependencies import
|
|
14
|
+
from ..dependencies import (
|
|
15
|
+
get_db,
|
|
16
|
+
get_feedback_service,
|
|
17
|
+
get_task_repository,
|
|
18
|
+
get_user_config,
|
|
19
|
+
get_user_id,
|
|
20
|
+
)
|
|
21
|
+
from ..repository.entities import Feedback
|
|
22
|
+
from ..repository.feedback_repository import FeedbackRepository
|
|
23
|
+
from ..repository.interfaces import ITaskRepository
|
|
12
24
|
from ..services.feedback_service import FeedbackService
|
|
25
|
+
from ..shared.pagination import PaginationParams
|
|
26
|
+
from ..shared.types import UserId
|
|
13
27
|
|
|
14
28
|
router = APIRouter()
|
|
29
|
+
log = logging.getLogger(__name__)
|
|
15
30
|
|
|
16
31
|
|
|
17
32
|
class FeedbackPayload(BaseModel):
|
|
@@ -23,6 +38,122 @@ class FeedbackPayload(BaseModel):
|
|
|
23
38
|
feedback_text: Optional[str] = Field(None, alias="feedbackText")
|
|
24
39
|
|
|
25
40
|
|
|
41
|
+
@router.get("/feedback", response_model=list[Feedback], tags=["Feedback"])
|
|
42
|
+
async def get_feedback(
|
|
43
|
+
request: FastAPIRequest,
|
|
44
|
+
start_date: str | None = None,
|
|
45
|
+
end_date: str | None = None,
|
|
46
|
+
task_id: str | None = None,
|
|
47
|
+
session_id: str | None = None,
|
|
48
|
+
rating: Literal["up", "down"] | None = None,
|
|
49
|
+
page: int = 1,
|
|
50
|
+
page_size: int = 20,
|
|
51
|
+
query_user_id: str | None = None,
|
|
52
|
+
db: DBSession = Depends(get_db),
|
|
53
|
+
user_id: UserId = Depends(get_user_id),
|
|
54
|
+
user_config: dict = Depends(get_user_config),
|
|
55
|
+
task_repo: ITaskRepository = Depends(get_task_repository),
|
|
56
|
+
):
|
|
57
|
+
"""
|
|
58
|
+
Retrieves feedback with flexible filtering and security controls.
|
|
59
|
+
|
|
60
|
+
Regular users can only view their own feedback.
|
|
61
|
+
Users with the 'feedback:read:all' scope can view any user's feedback.
|
|
62
|
+
|
|
63
|
+
Query Parameters:
|
|
64
|
+
- start_date: Filter feedback created after this date (ISO 8601 format)
|
|
65
|
+
- end_date: Filter feedback created before this date (ISO 8601 format)
|
|
66
|
+
- task_id: Filter by specific task ID
|
|
67
|
+
- session_id: Filter by specific session ID
|
|
68
|
+
- rating: Filter by rating type ("up" or "down")
|
|
69
|
+
- page: Page number (default: 1)
|
|
70
|
+
- page_size: Results per page (default: 20)
|
|
71
|
+
- query_user_id: (Admin only) Query feedback for a specific user
|
|
72
|
+
"""
|
|
73
|
+
log_prefix = "[GET /api/v1/feedback] "
|
|
74
|
+
log.info("%sRequest from user %s", log_prefix, user_id)
|
|
75
|
+
|
|
76
|
+
# Determine target user and permissions
|
|
77
|
+
target_user_id = user_id
|
|
78
|
+
can_query_all = user_config.get("scopes", {}).get("feedback:read:all", False)
|
|
79
|
+
|
|
80
|
+
if query_user_id:
|
|
81
|
+
if can_query_all:
|
|
82
|
+
target_user_id = query_user_id
|
|
83
|
+
log.info(
|
|
84
|
+
"%sAdmin user %s is querying feedback for user %s",
|
|
85
|
+
log_prefix,
|
|
86
|
+
user_id,
|
|
87
|
+
target_user_id,
|
|
88
|
+
)
|
|
89
|
+
else:
|
|
90
|
+
raise HTTPException(
|
|
91
|
+
status_code=status.HTTP_403_FORBIDDEN,
|
|
92
|
+
detail="You do not have permission to query other users' feedback.",
|
|
93
|
+
)
|
|
94
|
+
elif can_query_all:
|
|
95
|
+
target_user_id = "*"
|
|
96
|
+
log.info("%sAdmin user %s is querying feedback for all users.", log_prefix, user_id)
|
|
97
|
+
|
|
98
|
+
# Verify task ownership if task_id filter is provided
|
|
99
|
+
if task_id:
|
|
100
|
+
task = task_repo.find_by_id(db, task_id)
|
|
101
|
+
if not task:
|
|
102
|
+
raise HTTPException(
|
|
103
|
+
status_code=status.HTTP_404_NOT_FOUND,
|
|
104
|
+
detail=f"Task with ID '{task_id}' not found.",
|
|
105
|
+
)
|
|
106
|
+
if task.user_id != user_id and not can_query_all:
|
|
107
|
+
raise HTTPException(
|
|
108
|
+
status_code=status.HTTP_403_FORBIDDEN,
|
|
109
|
+
detail="You do not have permission to view feedback for this task.",
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
# Parse date filters
|
|
113
|
+
start_time_ms = None
|
|
114
|
+
if start_date:
|
|
115
|
+
try:
|
|
116
|
+
start_time_ms = int(datetime.fromisoformat(start_date).timestamp() * 1000)
|
|
117
|
+
except ValueError:
|
|
118
|
+
raise HTTPException(
|
|
119
|
+
status_code=status.HTTP_400_BAD_REQUEST,
|
|
120
|
+
detail="Invalid start_date format. Use ISO 8601 format.",
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
end_time_ms = None
|
|
124
|
+
if end_date:
|
|
125
|
+
try:
|
|
126
|
+
end_time_ms = int(datetime.fromisoformat(end_date).timestamp() * 1000)
|
|
127
|
+
except ValueError:
|
|
128
|
+
raise HTTPException(
|
|
129
|
+
status_code=status.HTTP_400_BAD_REQUEST,
|
|
130
|
+
detail="Invalid end_date format. Use ISO 8601 format.",
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
pagination = PaginationParams(page_number=page, page_size=page_size)
|
|
134
|
+
|
|
135
|
+
try:
|
|
136
|
+
repo = FeedbackRepository()
|
|
137
|
+
feedback_list = repo.search(
|
|
138
|
+
db,
|
|
139
|
+
user_id=target_user_id,
|
|
140
|
+
start_date=start_time_ms,
|
|
141
|
+
end_date=end_time_ms,
|
|
142
|
+
task_id=task_id,
|
|
143
|
+
session_id=session_id,
|
|
144
|
+
rating=rating,
|
|
145
|
+
pagination=pagination,
|
|
146
|
+
)
|
|
147
|
+
log.info("%sReturning %d feedback entries", log_prefix, len(feedback_list))
|
|
148
|
+
return feedback_list
|
|
149
|
+
except Exception as e:
|
|
150
|
+
log.exception("%sError searching for feedback: %s", log_prefix, e)
|
|
151
|
+
raise HTTPException(
|
|
152
|
+
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
|
153
|
+
detail="An error occurred while searching for feedback.",
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
|
|
26
157
|
@router.post("/feedback", status_code=202, tags=["Feedback"])
|
|
27
158
|
async def submit_feedback(
|
|
28
159
|
payload: FeedbackPayload,
|