solace-agent-mesh 1.6.3__py3-none-any.whl → 1.7.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.
- 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.e6488e8b.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-1762189824009.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -1
- solace_agent_mesh/assets/docs/search-doc-1762189824009.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.0.dist-info}/METADATA +3 -5
- {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.0.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.e6488e8b.js.LICENSE.txt} +0 -0
- {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.0.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.0.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-1.6.3.dist-info → solace_agent_mesh-1.7.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"""Add projects table and project_id to sessions
|
|
2
|
+
|
|
3
|
+
Revision ID: add_projects_table_001
|
|
4
|
+
Revises: 20251015_session_idx
|
|
5
|
+
Create Date: 2025-10-24 10:00:00.000000
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
from typing import Sequence, Union
|
|
9
|
+
from alembic import op
|
|
10
|
+
import sqlalchemy as sa
|
|
11
|
+
from sqlalchemy import inspect
|
|
12
|
+
|
|
13
|
+
# revision identifiers, used by Alembic.
|
|
14
|
+
revision: str = 'add_projects_table_001'
|
|
15
|
+
down_revision: Union[str, Sequence[str], None] = '20251015_session_idx'
|
|
16
|
+
branch_labels: Union[str, Sequence[str], None] = None
|
|
17
|
+
depends_on: Union[str, Sequence[str], None] = None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def upgrade() -> None:
|
|
21
|
+
"""Create projects table and add project_id to sessions."""
|
|
22
|
+
bind = op.get_bind()
|
|
23
|
+
inspector = inspect(bind)
|
|
24
|
+
existing_tables = inspector.get_table_names()
|
|
25
|
+
dialect_name = bind.dialect.name
|
|
26
|
+
|
|
27
|
+
# Create projects table if it doesn't exist
|
|
28
|
+
# Note: This table is created without is_global and created_by_user_id columns
|
|
29
|
+
# as those were removed in the squashed migration
|
|
30
|
+
if 'projects' not in existing_tables:
|
|
31
|
+
op.create_table('projects',
|
|
32
|
+
sa.Column('id', sa.String(), nullable=False),
|
|
33
|
+
sa.Column('name', sa.String(), nullable=False),
|
|
34
|
+
sa.Column('user_id', sa.String(), nullable=False),
|
|
35
|
+
sa.Column('description', sa.Text(), nullable=True),
|
|
36
|
+
sa.Column('system_prompt', sa.Text(), nullable=True),
|
|
37
|
+
sa.Column('created_at', sa.BigInteger(), nullable=False),
|
|
38
|
+
sa.Column('updated_at', sa.BigInteger(), nullable=True),
|
|
39
|
+
sa.PrimaryKeyConstraint('id')
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
# Add project_id column to sessions if it doesn't exist
|
|
43
|
+
sessions_columns = [col['name'] for col in inspector.get_columns('sessions')]
|
|
44
|
+
if 'project_id' not in sessions_columns:
|
|
45
|
+
if dialect_name == 'sqlite':
|
|
46
|
+
# SQLite doesn't support ALTER TABLE ADD CONSTRAINT, recreate table
|
|
47
|
+
op.create_table(
|
|
48
|
+
'sessions_new',
|
|
49
|
+
sa.Column('id', sa.String(), nullable=False),
|
|
50
|
+
sa.Column('name', sa.String(), nullable=True),
|
|
51
|
+
sa.Column('user_id', sa.String(), nullable=False),
|
|
52
|
+
sa.Column('agent_id', sa.String(), nullable=True),
|
|
53
|
+
sa.Column('created_time', sa.BigInteger(), nullable=False),
|
|
54
|
+
sa.Column('updated_time', sa.BigInteger(), nullable=False),
|
|
55
|
+
sa.Column('project_id', sa.String(), nullable=True),
|
|
56
|
+
sa.ForeignKeyConstraint(['project_id'], ['projects.id']),
|
|
57
|
+
sa.PrimaryKeyConstraint('id')
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
# Copy data from old table
|
|
61
|
+
op.execute("""
|
|
62
|
+
INSERT INTO sessions_new (id, name, user_id, agent_id, created_time, updated_time)
|
|
63
|
+
SELECT id, name, user_id, agent_id, created_time, updated_time
|
|
64
|
+
FROM sessions
|
|
65
|
+
""")
|
|
66
|
+
|
|
67
|
+
# Drop old table
|
|
68
|
+
op.drop_table('sessions')
|
|
69
|
+
|
|
70
|
+
# Rename new table
|
|
71
|
+
op.rename_table('sessions_new', 'sessions')
|
|
72
|
+
|
|
73
|
+
# Recreate indexes
|
|
74
|
+
op.create_index('ix_sessions_user_id', 'sessions', ['user_id'])
|
|
75
|
+
op.create_index('ix_sessions_project_id', 'sessions', ['project_id'])
|
|
76
|
+
else:
|
|
77
|
+
# PostgreSQL, MySQL - standard ALTER TABLE
|
|
78
|
+
op.add_column('sessions', sa.Column('project_id', sa.String(), nullable=True))
|
|
79
|
+
op.create_index('ix_sessions_project_id', 'sessions', ['project_id'])
|
|
80
|
+
op.create_foreign_key(
|
|
81
|
+
'fk_sessions_project_id',
|
|
82
|
+
'sessions',
|
|
83
|
+
'projects',
|
|
84
|
+
['project_id'],
|
|
85
|
+
['id']
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
def downgrade() -> None:
|
|
90
|
+
"""Downgrade schema - removes project-related changes."""
|
|
91
|
+
bind = op.get_bind()
|
|
92
|
+
inspector = inspect(bind)
|
|
93
|
+
dialect_name = bind.dialect.name
|
|
94
|
+
|
|
95
|
+
# Drop project_id column from sessions if it exists
|
|
96
|
+
sessions_columns = [col['name'] for col in inspector.get_columns('sessions')]
|
|
97
|
+
if 'project_id' in sessions_columns:
|
|
98
|
+
if dialect_name == 'sqlite':
|
|
99
|
+
# SQLite doesn't support ALTER TABLE DROP CONSTRAINT, recreate table
|
|
100
|
+
op.create_table(
|
|
101
|
+
'sessions_old',
|
|
102
|
+
sa.Column('id', sa.String(), nullable=False),
|
|
103
|
+
sa.Column('name', sa.String(), nullable=True),
|
|
104
|
+
sa.Column('user_id', sa.String(), nullable=False),
|
|
105
|
+
sa.Column('agent_id', sa.String(), nullable=True),
|
|
106
|
+
sa.Column('created_time', sa.BigInteger(), nullable=False),
|
|
107
|
+
sa.Column('updated_time', sa.BigInteger(), nullable=False),
|
|
108
|
+
sa.PrimaryKeyConstraint('id')
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
# Copy data from current table (excluding project_id)
|
|
112
|
+
op.execute("""
|
|
113
|
+
INSERT INTO sessions_old (id, name, user_id, agent_id, created_time, updated_time)
|
|
114
|
+
SELECT id, name, user_id, agent_id, created_time, updated_time
|
|
115
|
+
FROM sessions
|
|
116
|
+
""")
|
|
117
|
+
|
|
118
|
+
# Drop current table
|
|
119
|
+
op.drop_table('sessions')
|
|
120
|
+
|
|
121
|
+
# Rename old table back
|
|
122
|
+
op.rename_table('sessions_old', 'sessions')
|
|
123
|
+
|
|
124
|
+
# Recreate index on user_id
|
|
125
|
+
op.create_index('ix_sessions_user_id', 'sessions', ['user_id'])
|
|
126
|
+
else:
|
|
127
|
+
# PostgreSQL, MySQL - standard ALTER TABLE
|
|
128
|
+
op.drop_constraint('fk_sessions_project_id', 'sessions', type_='foreignkey')
|
|
129
|
+
op.drop_index('ix_sessions_project_id', 'sessions')
|
|
130
|
+
op.drop_column('sessions', 'project_id')
|
|
131
|
+
|
|
132
|
+
# Drop projects table if it exists
|
|
133
|
+
existing_tables = inspector.get_table_names()
|
|
134
|
+
if 'projects' in existing_tables:
|
|
135
|
+
op.drop_table('projects')
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# DEVELOPER GUIDE: versions
|
|
2
2
|
|
|
3
3
|
## Quick Summary
|
|
4
|
-
This directory contains Alembic database migration files for the HTTP SSE gateway. These migrations handle the evolution of the database schema, including initial table creation, performance optimization through indexing, timestamp format standardization, and task management features
|
|
4
|
+
This directory contains Alembic database migration files for the HTTP SSE gateway. These migrations handle the evolution of the database schema, including initial table creation, performance optimization through indexing, timestamp format standardization, and task management features.
|
|
5
5
|
|
|
6
6
|
## Files Overview
|
|
7
7
|
- `20250910_d5b3f8f2e9a0_create_initial_database.py` - Creates the initial database schema with sessions and chat_messages tables
|
|
8
8
|
- `20250911_b1c2d3e4f5g6_add_database_indexes.py` - Adds performance indexes for common query patterns
|
|
9
9
|
- `20250916_f6e7d8c9b0a1_convert_timestamps_to_epoch_and_align_columns.py` - Converts datetime columns to epoch milliseconds and standardizes column names
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
10
|
+
- `20251006_98882922fa59_add_tasks_events_feedback_chat_tasks.py` - Adds task management tables and replaces chat_messages with chat_tasks
|
|
11
|
+
- `20251015_add_session_performance_indexes.py` - Adds optimized composite indexes for better query performance
|
|
12
12
|
- `versions_llm.txt` - LLM-generated documentation for the versions directory
|
|
13
13
|
|
|
14
14
|
## Developer API Reference
|
|
@@ -85,46 +85,46 @@ alembic upgrade f6e7d8c9b0a1
|
|
|
85
85
|
alembic downgrade b1c2d3e4f5g6
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
###
|
|
89
|
-
**Purpose:**
|
|
88
|
+
### 20251006_98882922fa59_add_tasks_events_feedback_chat_tasks.py
|
|
89
|
+
**Purpose:** Major schema update that adds task management functionality and replaces chat_messages with chat_tasks
|
|
90
90
|
**Import:** This is an Alembic migration file - not directly imported
|
|
91
91
|
|
|
92
92
|
**Functions:**
|
|
93
|
-
- `upgrade() -> None` - Creates tasks, task_events, and
|
|
94
|
-
- `downgrade() -> None` -
|
|
93
|
+
- `upgrade() -> None` - Creates tasks, task_events, feedback, and chat_tasks tables; drops old chat_messages table and indexes
|
|
94
|
+
- `downgrade() -> None` - Recreates chat_messages table and drops all task-related tables
|
|
95
95
|
|
|
96
96
|
**Constants/Variables:**
|
|
97
|
-
- `revision: str` - Migration identifier "
|
|
97
|
+
- `revision: str` - Migration identifier "98882922fa59"
|
|
98
98
|
- `down_revision: Union[str, Sequence[str], None]` - Previous migration "f6e7d8c9b0a1"
|
|
99
99
|
|
|
100
100
|
**Usage Examples:**
|
|
101
101
|
```bash
|
|
102
102
|
# Run this migration
|
|
103
|
-
alembic upgrade
|
|
103
|
+
alembic upgrade 98882922fa59
|
|
104
104
|
|
|
105
105
|
# Rollback this migration
|
|
106
106
|
alembic downgrade f6e7d8c9b0a1
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
###
|
|
110
|
-
**Purpose:**
|
|
109
|
+
### 20251015_add_session_performance_indexes.py
|
|
110
|
+
**Purpose:** Performance optimization migration that adds composite indexes for optimal query patterns
|
|
111
111
|
**Import:** This is an Alembic migration file - not directly imported
|
|
112
112
|
|
|
113
113
|
**Functions:**
|
|
114
|
-
- `upgrade() -> None` -
|
|
115
|
-
- `downgrade() -> None` - Removes
|
|
114
|
+
- `upgrade() -> None` - Creates optimized composite indexes for user sessions, chat tasks, and task events; removes unused text index
|
|
115
|
+
- `downgrade() -> None` - Removes performance indexes and recreates the original text index
|
|
116
116
|
|
|
117
117
|
**Constants/Variables:**
|
|
118
|
-
- `revision: str` - Migration identifier "
|
|
119
|
-
- `down_revision:
|
|
118
|
+
- `revision: str` - Migration identifier "20251015_session_idx"
|
|
119
|
+
- `down_revision: str | Sequence[str] | None` - Previous migration "98882922fa59"
|
|
120
120
|
|
|
121
121
|
**Usage Examples:**
|
|
122
122
|
```bash
|
|
123
123
|
# Run this migration
|
|
124
|
-
alembic upgrade
|
|
124
|
+
alembic upgrade 20251015_session_idx
|
|
125
125
|
|
|
126
126
|
# Rollback this migration
|
|
127
|
-
alembic downgrade
|
|
127
|
+
alembic downgrade 98882922fa59
|
|
128
128
|
|
|
129
129
|
# Run all migrations to latest
|
|
130
130
|
alembic upgrade head
|
|
@@ -139,17 +139,23 @@ alembic history
|
|
|
139
139
|
alembic revision --autogenerate -m "description"
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
**Database Schema After All Migrations:**
|
|
142
|
+
**Final Database Schema After All Migrations:**
|
|
143
143
|
```sql
|
|
144
144
|
-- Core tables with epoch millisecond timestamps:
|
|
145
145
|
-- sessions: id, name, user_id, agent_id, created_time, updated_time
|
|
146
|
-
--
|
|
146
|
+
-- chat_tasks: id, session_id, user_id, user_message, message_bubbles, task_metadata, created_time, updated_time
|
|
147
147
|
|
|
148
148
|
-- Task management tables:
|
|
149
149
|
-- tasks: id, user_id, start_time, end_time, status, initial_request_text,
|
|
150
150
|
-- total_input_tokens, total_output_tokens, total_cached_input_tokens, token_usage_details
|
|
151
151
|
-- task_events: id, task_id, user_id, created_time, topic, direction, payload
|
|
152
152
|
-- feedback: id, session_id, task_id, user_id, rating, comment, created_time
|
|
153
|
+
|
|
154
|
+
-- Performance indexes:
|
|
155
|
+
-- ix_sessions_user_id, ix_sessions_user_updated
|
|
156
|
+
-- ix_chat_tasks_session_user_created
|
|
157
|
+
-- ix_tasks_user_start_time, ix_task_events_task_created
|
|
158
|
+
-- ix_feedback_task_id, ix_feedback_user_id, ix_feedback_created_time
|
|
153
159
|
```
|
|
154
160
|
|
|
155
|
-
# content_hash:
|
|
161
|
+
# content_hash: c1d3d7f6855eba76bdabdb5cc0c7253756faf1583ef349dc503418c611a23bd2
|
|
@@ -75,20 +75,6 @@ class WebUIBackendApp(BaseGatewayApp):
|
|
|
75
75
|
"default": True,
|
|
76
76
|
"description": "If true, the gateway will resolve artifact:// URIs found in A2A messages and embed the content as bytes before sending to the UI. If false, URIs are passed through.",
|
|
77
77
|
},
|
|
78
|
-
{
|
|
79
|
-
"name": "system_purpose",
|
|
80
|
-
"required": False,
|
|
81
|
-
"type": "string",
|
|
82
|
-
"default": "",
|
|
83
|
-
"description": "Detailed description of the system's overall purpose, to be optionally used by agents.",
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"name": "response_format",
|
|
87
|
-
"required": False,
|
|
88
|
-
"type": "string",
|
|
89
|
-
"default": "",
|
|
90
|
-
"description": "General guidelines on how agent responses should be structured, to be optionally used by agents.",
|
|
91
|
-
},
|
|
92
78
|
{
|
|
93
79
|
"name": "model",
|
|
94
80
|
"required": False,
|
|
@@ -95,7 +95,16 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
95
95
|
app_config = component_config.get("app_config", {})
|
|
96
96
|
resolve_uris = app_config.get("resolve_artifact_uris_in_gateway", True)
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
# HTTP SSE gateway configuration:
|
|
99
|
+
# - supports_inline_artifact_resolution=True: Artifacts are converted to FileParts
|
|
100
|
+
# during embed resolution and rendered inline in the web UI
|
|
101
|
+
# - filter_tool_data_parts=False: Web UI displays all parts including tool execution details
|
|
102
|
+
super().__init__(
|
|
103
|
+
resolve_artifact_uris_in_gateway=resolve_uris,
|
|
104
|
+
supports_inline_artifact_resolution=True,
|
|
105
|
+
filter_tool_data_parts=False,
|
|
106
|
+
**kwargs
|
|
107
|
+
)
|
|
99
108
|
log.info("%s Initializing Web UI Backend Component...", self.log_identifier)
|
|
100
109
|
|
|
101
110
|
try:
|
|
@@ -258,10 +267,8 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
258
267
|
if self.database_url:
|
|
259
268
|
# SessionLocal will be initialized later in setup_dependencies
|
|
260
269
|
# We'll pass a lambda that returns SessionLocal when called
|
|
261
|
-
session_factory = (
|
|
262
|
-
|
|
263
|
-
if dependencies.SessionLocal
|
|
264
|
-
else None
|
|
270
|
+
session_factory = lambda: (
|
|
271
|
+
dependencies.SessionLocal() if dependencies.SessionLocal else None
|
|
265
272
|
)
|
|
266
273
|
|
|
267
274
|
self.data_retention_service = DataRetentionService(
|
|
@@ -1711,9 +1718,9 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1711
1718
|
(summary_str[:100] + "...") if len(summary_str) > 100 else summary_str
|
|
1712
1719
|
)
|
|
1713
1720
|
except Exception:
|
|
1714
|
-
details["payload_summary"][
|
|
1715
|
-
"
|
|
1716
|
-
|
|
1721
|
+
details["payload_summary"][
|
|
1722
|
+
"params_preview"
|
|
1723
|
+
] = "[Could not serialize payload]"
|
|
1717
1724
|
|
|
1718
1725
|
return details
|
|
1719
1726
|
|
|
@@ -1935,52 +1942,6 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1935
1942
|
"""Returns the instance of the ConfigResolver."""
|
|
1936
1943
|
return self._config_resolver
|
|
1937
1944
|
|
|
1938
|
-
async def _resolve_embeds_for_persistence(
|
|
1939
|
-
self, message_content: str, session_id: str, user_id: str, log_identifier: str
|
|
1940
|
-
) -> str:
|
|
1941
|
-
"""
|
|
1942
|
-
Resolves embeds in a message for database storage.
|
|
1943
|
-
Returns the resolved text.
|
|
1944
|
-
|
|
1945
|
-
Args:
|
|
1946
|
-
message_content: The message text that may contain embeds
|
|
1947
|
-
session_id: The A2A session ID
|
|
1948
|
-
user_id: The user ID
|
|
1949
|
-
log_identifier: Logging identifier
|
|
1950
|
-
|
|
1951
|
-
Returns:
|
|
1952
|
-
The message with embeds resolved (or original if resolution fails)
|
|
1953
|
-
"""
|
|
1954
|
-
try:
|
|
1955
|
-
embed_context = {
|
|
1956
|
-
"artifact_service": self.shared_artifact_service,
|
|
1957
|
-
"session_context": {
|
|
1958
|
-
"app_name": self.gateway_id,
|
|
1959
|
-
"user_id": user_id,
|
|
1960
|
-
"session_id": session_id,
|
|
1961
|
-
},
|
|
1962
|
-
"config": self.get_embed_config(),
|
|
1963
|
-
}
|
|
1964
|
-
|
|
1965
|
-
resolved_text, _, _ = await resolve_embeds_in_string(
|
|
1966
|
-
text=message_content,
|
|
1967
|
-
context=embed_context,
|
|
1968
|
-
resolver_func=evaluate_embed,
|
|
1969
|
-
types_to_resolve=EARLY_EMBED_TYPES,
|
|
1970
|
-
log_identifier=log_identifier,
|
|
1971
|
-
config=embed_context["config"],
|
|
1972
|
-
)
|
|
1973
|
-
|
|
1974
|
-
return resolved_text
|
|
1975
|
-
|
|
1976
|
-
except Exception as e:
|
|
1977
|
-
log.warning(
|
|
1978
|
-
"%s Error resolving embeds for storage: %s. Using original message.",
|
|
1979
|
-
log_identifier,
|
|
1980
|
-
e,
|
|
1981
|
-
)
|
|
1982
|
-
return message_content
|
|
1983
|
-
|
|
1984
1945
|
def _start_listener(self) -> None:
|
|
1985
1946
|
"""
|
|
1986
1947
|
GDK Hook: Starts the FastAPI/Uvicorn server.
|
|
@@ -2190,7 +2151,7 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
2190
2151
|
)
|
|
2191
2152
|
return
|
|
2192
2153
|
|
|
2193
|
-
log.
|
|
2154
|
+
log.info(
|
|
2194
2155
|
"%s Sending final response for A2A Task ID %s to SSE Task ID %s.",
|
|
2195
2156
|
log_id_prefix,
|
|
2196
2157
|
a2a_task_id,
|
|
@@ -2206,7 +2167,7 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
2206
2167
|
await self.sse_manager.send_event(
|
|
2207
2168
|
task_id=sse_task_id, event_data=sse_payload, event_type="final_response"
|
|
2208
2169
|
)
|
|
2209
|
-
log.
|
|
2170
|
+
log.debug(
|
|
2210
2171
|
"%s Successfully sent final_response via SSE for A2A Task ID %s.",
|
|
2211
2172
|
log_id_prefix,
|
|
2212
2173
|
a2a_task_id,
|
|
@@ -5,9 +5,11 @@ managed by the WebUIBackendComponent.
|
|
|
5
5
|
|
|
6
6
|
import logging
|
|
7
7
|
from collections.abc import Callable, Generator
|
|
8
|
-
from
|
|
8
|
+
from contextlib import contextmanager
|
|
9
|
+
from dataclasses import dataclass
|
|
10
|
+
from typing import TYPE_CHECKING, Any, Optional
|
|
9
11
|
|
|
10
|
-
from fastapi import Depends, HTTPException, Request, status
|
|
12
|
+
from fastapi import Depends, HTTPException, Request, status, Path, Query
|
|
11
13
|
from sqlalchemy import create_engine
|
|
12
14
|
from sqlalchemy.orm import Session, sessionmaker
|
|
13
15
|
|
|
@@ -17,7 +19,7 @@ from ...common.services.identity_service import BaseIdentityService
|
|
|
17
19
|
from ...core_a2a.service import CoreA2AService
|
|
18
20
|
from ...gateway.base.task_context import TaskContextManager
|
|
19
21
|
from ...gateway.http_sse.services.agent_card_service import AgentCardService
|
|
20
|
-
from ...gateway.http_sse.services.
|
|
22
|
+
from ...gateway.http_sse.services.project_service import ProjectService
|
|
21
23
|
from ...gateway.http_sse.services.feedback_service import FeedbackService
|
|
22
24
|
from ...gateway.http_sse.services.people_service import PeopleService
|
|
23
25
|
from ...gateway.http_sse.services.task_logger_service import TaskLoggerService
|
|
@@ -26,6 +28,7 @@ from ...gateway.http_sse.session_manager import SessionManager
|
|
|
26
28
|
from ...gateway.http_sse.sse_manager import SSEManager
|
|
27
29
|
from .repository import SessionRepository
|
|
28
30
|
from .repository.interfaces import ITaskRepository
|
|
31
|
+
from .repository.project_repository import ProjectRepository
|
|
29
32
|
from .repository.task_repository import TaskRepository
|
|
30
33
|
from .services.session_service import SessionService
|
|
31
34
|
|
|
@@ -587,6 +590,21 @@ def get_db_optional() -> Generator[Session | None, None, None]:
|
|
|
587
590
|
finally:
|
|
588
591
|
db.close()
|
|
589
592
|
|
|
593
|
+
def get_project_service(
|
|
594
|
+
component: "WebUIBackendComponent" = Depends(get_sac_component),
|
|
595
|
+
) -> ProjectService:
|
|
596
|
+
"""Dependency factory for ProjectService."""
|
|
597
|
+
return ProjectService(component=component)
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
def get_project_service_optional(
|
|
601
|
+
component: "WebUIBackendComponent" = Depends(get_sac_component),
|
|
602
|
+
) -> ProjectService | None:
|
|
603
|
+
"""Optional project service dependency that returns None if database is not configured."""
|
|
604
|
+
if SessionLocal is None:
|
|
605
|
+
log.debug("Database not configured, projects unavailable")
|
|
606
|
+
return None
|
|
607
|
+
return ProjectService(component=component)
|
|
590
608
|
|
|
591
609
|
def get_session_business_service_optional(
|
|
592
610
|
component: "WebUIBackendComponent" = Depends(get_sac_component),
|
|
@@ -155,8 +155,8 @@ from solace_agent_mesh.gateway.http_sse.components.task_logger_forwarder import
|
|
|
155
155
|
**Import Examples:**
|
|
156
156
|
```python
|
|
157
157
|
from solace_agent_mesh.gateway.http_sse.repository import (
|
|
158
|
-
ISessionRepository,
|
|
159
|
-
Session,
|
|
158
|
+
ISessionRepository, ITaskRepository, SessionRepository, TaskRepository,
|
|
159
|
+
Session, Task, SessionModel, TaskModel, Base
|
|
160
160
|
)
|
|
161
161
|
```
|
|
162
162
|
|
|
@@ -275,7 +275,7 @@ async def my_custom_endpoint(
|
|
|
275
275
|
return {"agents": len(agents), "user": user_id}
|
|
276
276
|
```
|
|
277
277
|
|
|
278
|
-
### 3. Working with Sessions and
|
|
278
|
+
### 3. Working with Sessions and Tasks
|
|
279
279
|
|
|
280
280
|
```python
|
|
281
281
|
from fastapi import Depends
|
|
@@ -286,14 +286,14 @@ from solace_agent_mesh.gateway.http_sse.dependencies import (
|
|
|
286
286
|
from solace_agent_mesh.gateway.http_sse.services.session_service import SessionService
|
|
287
287
|
from solace_agent_mesh.gateway.http_sse.shared.enums import SenderType
|
|
288
288
|
|
|
289
|
-
@router.post("/sessions/{session_id}/
|
|
290
|
-
async def
|
|
289
|
+
@router.post("/sessions/{session_id}/tasks")
|
|
290
|
+
async def save_task_to_session(
|
|
291
291
|
session_id: str,
|
|
292
|
-
|
|
292
|
+
task_data: dict,
|
|
293
293
|
user_id: str = Depends(get_user_id),
|
|
294
294
|
db: Session = Depends(get_db),
|
|
295
295
|
session_service: SessionService = Depends(get_session_business_service_optional)
|
|
296
296
|
):
|
|
297
|
-
if
|
|
297
|
+
if session_service and db
|
|
298
298
|
|
|
299
|
-
# content_hash:
|
|
299
|
+
# content_hash: 7da6d9233d06a0b9137a843efe5238a14d1762ee3bba437875b5d915634e0f63
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import os
|
|
3
3
|
from pathlib import Path
|
|
4
|
-
from typing import TYPE_CHECKING
|
|
5
4
|
|
|
6
5
|
import httpx
|
|
6
|
+
import sqlalchemy as sa
|
|
7
|
+
from fastapi import FastAPI, HTTPException
|
|
8
|
+
from fastapi import Request as FastAPIRequest
|
|
9
|
+
from fastapi import status
|
|
10
|
+
from typing import TYPE_CHECKING
|
|
11
|
+
|
|
7
12
|
import sqlalchemy as sa
|
|
8
13
|
from a2a.types import InternalError, JSONRPCError
|
|
9
14
|
from a2a.types import JSONRPCResponse as A2AJSONRPCResponse
|
|
@@ -18,23 +23,35 @@ from fastapi.responses import JSONResponse
|
|
|
18
23
|
from starlette.middleware.sessions import SessionMiddleware
|
|
19
24
|
from starlette.staticfiles import StaticFiles
|
|
20
25
|
|
|
26
|
+
from .routers.sessions import router as session_router
|
|
27
|
+
from .routers.tasks import router as task_router
|
|
28
|
+
from .routers.users import router as user_router
|
|
21
29
|
from ...common import a2a
|
|
22
30
|
from ...gateway.http_sse import dependencies
|
|
23
|
-
from
|
|
31
|
+
from .routers import (
|
|
24
32
|
agent_cards,
|
|
25
33
|
artifacts,
|
|
26
34
|
auth,
|
|
27
35
|
config,
|
|
36
|
+
feedback,
|
|
28
37
|
people,
|
|
29
38
|
sse,
|
|
30
|
-
tasks,
|
|
31
39
|
visualization,
|
|
32
|
-
|
|
40
|
+
projects,
|
|
33
41
|
)
|
|
34
42
|
from .routers.sessions import router as session_router
|
|
35
43
|
from .routers.tasks import router as task_router
|
|
36
44
|
from .routers.users import router as user_router
|
|
37
45
|
|
|
46
|
+
from alembic import command
|
|
47
|
+
from alembic.config import Config
|
|
48
|
+
|
|
49
|
+
from a2a.types import InternalError, InvalidRequestError, JSONRPCError
|
|
50
|
+
from a2a.types import JSONRPCResponse as A2AJSONRPCResponse
|
|
51
|
+
from ...common import a2a
|
|
52
|
+
from ...gateway.http_sse import dependencies
|
|
53
|
+
|
|
54
|
+
|
|
38
55
|
if TYPE_CHECKING:
|
|
39
56
|
from gateway.http_sse.component import WebUIBackendComponent
|
|
40
57
|
|
|
@@ -587,7 +604,7 @@ def _setup_routers() -> None:
|
|
|
587
604
|
app.include_router(user_router, prefix=f"{api_prefix}/users", tags=["Users"])
|
|
588
605
|
app.include_router(config.router, prefix=api_prefix, tags=["Config"])
|
|
589
606
|
app.include_router(agent_cards.router, prefix=api_prefix, tags=["Agent Cards"])
|
|
590
|
-
app.include_router(
|
|
607
|
+
app.include_router(task_router, prefix=api_prefix, tags=["Tasks"])
|
|
591
608
|
app.include_router(sse.router, prefix=f"{api_prefix}/sse", tags=["SSE"])
|
|
592
609
|
app.include_router(
|
|
593
610
|
artifacts.router, prefix=f"{api_prefix}/artifacts", tags=["Artifacts"]
|
|
@@ -599,6 +616,7 @@ def _setup_routers() -> None:
|
|
|
599
616
|
)
|
|
600
617
|
app.include_router(people.router, prefix=api_prefix, tags=["People"])
|
|
601
618
|
app.include_router(auth.router, prefix=api_prefix, tags=["Auth"])
|
|
619
|
+
app.include_router(projects.router, prefix=api_prefix, tags=["Projects"])
|
|
602
620
|
app.include_router(feedback.router, prefix=api_prefix, tags=["Feedback"])
|
|
603
621
|
log.info("Legacy routers mounted for endpoints not yet migrated")
|
|
604
622
|
|
|
@@ -3,10 +3,20 @@ Repository layer containing all data access logic organized by entity type.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
# Interfaces
|
|
6
|
-
from .interfaces import
|
|
6
|
+
from .interfaces import (
|
|
7
|
+
IChatTaskRepository,
|
|
8
|
+
IFeedbackRepository,
|
|
9
|
+
IProjectRepository,
|
|
10
|
+
ISessionRepository,
|
|
11
|
+
ITaskRepository,
|
|
12
|
+
)
|
|
7
13
|
|
|
8
14
|
# Implementations
|
|
15
|
+
from .chat_task_repository import ChatTaskRepository
|
|
16
|
+
from .feedback_repository import FeedbackRepository
|
|
17
|
+
from .project_repository import ProjectRepository
|
|
9
18
|
from .session_repository import SessionRepository
|
|
19
|
+
from .task_repository import TaskRepository
|
|
10
20
|
|
|
11
21
|
# Entities (re-exported for convenience)
|
|
12
22
|
from .entities.session import Session
|
|
@@ -17,9 +27,17 @@ from .models.session_model import SessionModel
|
|
|
17
27
|
|
|
18
28
|
__all__ = [
|
|
19
29
|
# Interfaces
|
|
30
|
+
"IChatTaskRepository",
|
|
31
|
+
"IFeedbackRepository",
|
|
32
|
+
"IProjectRepository",
|
|
20
33
|
"ISessionRepository",
|
|
34
|
+
"ITaskRepository",
|
|
21
35
|
# Implementations
|
|
36
|
+
"ChatTaskRepository",
|
|
37
|
+
"FeedbackRepository",
|
|
38
|
+
"ProjectRepository",
|
|
22
39
|
"SessionRepository",
|
|
40
|
+
"TaskRepository",
|
|
23
41
|
# Entities
|
|
24
42
|
"Session",
|
|
25
43
|
# Models
|