solace-agent-mesh 1.6.2__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/services.py +3 -3
- 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 +24 -29
- 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 +19 -14
- solace_agent_mesh/gateway/http_sse/component.py +150 -118
- 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 +55 -14
- 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.2.dist-info → solace_agent_mesh-1.7.0.dist-info}/METADATA +3 -5
- {solace_agent_mesh-1.6.2.dist-info → solace_agent_mesh-1.7.0.dist-info}/RECORD +219 -176
- 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.b5ddb7a1.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.d1643f0b.js +0 -2
- solace_agent_mesh/assets/docs/assets/js/runtime~main.97f920d4.js +0 -1
- solace_agent_mesh/assets/docs/lunr-index-1761663789856.json +0 -1
- solace_agent_mesh/assets/docs/search-doc-1761663789856.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.d1643f0b.js.LICENSE.txt → main.e6488e8b.js.LICENSE.txt} +0 -0
- {solace_agent_mesh-1.6.2.dist-info → solace_agent_mesh-1.7.0.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-1.6.2.dist-info → solace_agent_mesh-1.7.0.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-1.6.2.dist-info → solace_agent_mesh-1.7.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Custom Solace AI Connector Component to host the FastAPI backend for the Web UI.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
import logging
|
|
6
5
|
import asyncio
|
|
7
6
|
import json
|
|
7
|
+
import logging
|
|
8
8
|
import queue
|
|
9
9
|
import re
|
|
10
10
|
import threading
|
|
@@ -15,22 +15,20 @@ from typing import Any
|
|
|
15
15
|
import uvicorn
|
|
16
16
|
from fastapi import FastAPI, UploadFile
|
|
17
17
|
from fastapi import Request as FastAPIRequest
|
|
18
|
-
|
|
18
|
+
from solace_ai_connector.common.event import Event, EventType
|
|
19
19
|
from solace_ai_connector.components.inputs_outputs.broker_input import BrokerInput
|
|
20
20
|
from solace_ai_connector.flow.app import App as SACApp
|
|
21
|
-
from solace_ai_connector.common.event import Event, EventType
|
|
22
21
|
|
|
23
22
|
from ...common.agent_registry import AgentRegistry
|
|
24
23
|
from ...core_a2a.service import CoreA2AService
|
|
25
24
|
from ...gateway.base.component import BaseGatewayComponent
|
|
26
25
|
from ...gateway.http_sse.session_manager import SessionManager
|
|
27
26
|
from ...gateway.http_sse.sse_manager import SSEManager
|
|
28
|
-
from .
|
|
27
|
+
from . import dependencies
|
|
29
28
|
from .components import VisualizationForwarderComponent
|
|
30
29
|
from .components.task_logger_forwarder import TaskLoggerForwarderComponent
|
|
31
|
-
from .services.feedback_service import FeedbackService
|
|
32
30
|
from .services.task_logger_service import TaskLoggerService
|
|
33
|
-
from . import
|
|
31
|
+
from .sse_event_buffer import SSEEventBuffer
|
|
34
32
|
|
|
35
33
|
log = logging.getLogger(__name__)
|
|
36
34
|
|
|
@@ -97,7 +95,16 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
97
95
|
app_config = component_config.get("app_config", {})
|
|
98
96
|
resolve_uris = app_config.get("resolve_artifact_uris_in_gateway", True)
|
|
99
97
|
|
|
100
|
-
|
|
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
|
+
)
|
|
101
108
|
log.info("%s Initializing Web UI Backend Component...", self.log_identifier)
|
|
102
109
|
|
|
103
110
|
try:
|
|
@@ -147,11 +154,14 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
147
154
|
timer_id=self._sse_cleanup_timer_id,
|
|
148
155
|
interval_ms=cleanup_interval_sec * 1000,
|
|
149
156
|
)
|
|
150
|
-
|
|
157
|
+
|
|
151
158
|
# Set up health check timer for agent registry
|
|
152
159
|
from ...common.constants import HEALTH_CHECK_INTERVAL_SECONDS
|
|
160
|
+
|
|
153
161
|
self.health_check_timer_id = f"agent_health_check_{self.gateway_id}"
|
|
154
|
-
health_check_interval_seconds = self.get_config(
|
|
162
|
+
health_check_interval_seconds = self.get_config(
|
|
163
|
+
"agent_health_check_interval_seconds", HEALTH_CHECK_INTERVAL_SECONDS
|
|
164
|
+
)
|
|
155
165
|
if health_check_interval_seconds > 0:
|
|
156
166
|
log.info(
|
|
157
167
|
"%s Scheduling agent health check every %d seconds.",
|
|
@@ -182,8 +192,9 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
182
192
|
else:
|
|
183
193
|
# Memory storage or no explicit configuration - no persistence service needed
|
|
184
194
|
self.database_url = None
|
|
185
|
-
|
|
186
|
-
|
|
195
|
+
|
|
196
|
+
# Validate that features requiring runtime database persistence are not enabled without database
|
|
197
|
+
if self.database_url is None:
|
|
187
198
|
task_logging_config = self.get_config("task_logging", {})
|
|
188
199
|
if task_logging_config.get("enabled", False):
|
|
189
200
|
raise ValueError(
|
|
@@ -191,15 +202,17 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
191
202
|
"Either set session_service.type='sql' with a valid database_url, "
|
|
192
203
|
"or disable task_logging.enabled."
|
|
193
204
|
)
|
|
194
|
-
|
|
205
|
+
|
|
195
206
|
feedback_config = self.get_config("feedback_publishing", {})
|
|
196
207
|
if feedback_config.get("enabled", False):
|
|
197
208
|
log.warning(
|
|
198
209
|
"%s Feedback publishing is enabled but database persistence is not configured. "
|
|
199
210
|
"Feedback will only be published to the broker, not stored locally.",
|
|
200
|
-
self.log_identifier
|
|
211
|
+
self.log_identifier,
|
|
201
212
|
)
|
|
202
213
|
|
|
214
|
+
platform_config = self.get_config("platform_service", {})
|
|
215
|
+
self.platform_database_url = platform_config.get("database_url")
|
|
203
216
|
component_config = self.get_config("component_config", {})
|
|
204
217
|
app_config = component_config.get("app_config", {})
|
|
205
218
|
|
|
@@ -242,27 +255,33 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
242
255
|
self._data_retention_timer_id = None
|
|
243
256
|
data_retention_config = self.get_config("data_retention", {})
|
|
244
257
|
if data_retention_config.get("enabled", True):
|
|
245
|
-
log.info(
|
|
246
|
-
|
|
258
|
+
log.info(
|
|
259
|
+
"%s Data retention is enabled. Initializing service and timer...",
|
|
260
|
+
self.log_identifier,
|
|
261
|
+
)
|
|
262
|
+
|
|
247
263
|
# Import and initialize the DataRetentionService
|
|
248
264
|
from .services.data_retention_service import DataRetentionService
|
|
249
|
-
|
|
265
|
+
|
|
250
266
|
session_factory = None
|
|
251
267
|
if self.database_url:
|
|
252
268
|
# SessionLocal will be initialized later in setup_dependencies
|
|
253
269
|
# We'll pass a lambda that returns SessionLocal when called
|
|
254
|
-
session_factory = lambda:
|
|
255
|
-
|
|
270
|
+
session_factory = lambda: (
|
|
271
|
+
dependencies.SessionLocal() if dependencies.SessionLocal else None
|
|
272
|
+
)
|
|
273
|
+
|
|
256
274
|
self.data_retention_service = DataRetentionService(
|
|
257
|
-
session_factory=session_factory,
|
|
258
|
-
config=data_retention_config
|
|
275
|
+
session_factory=session_factory, config=data_retention_config
|
|
259
276
|
)
|
|
260
|
-
|
|
277
|
+
|
|
261
278
|
# Create and start the cleanup timer
|
|
262
|
-
cleanup_interval_hours = data_retention_config.get(
|
|
279
|
+
cleanup_interval_hours = data_retention_config.get(
|
|
280
|
+
"cleanup_interval_hours", 24
|
|
281
|
+
)
|
|
263
282
|
cleanup_interval_ms = cleanup_interval_hours * 60 * 60 * 1000
|
|
264
283
|
self._data_retention_timer_id = f"data_retention_cleanup_{self.gateway_id}"
|
|
265
|
-
|
|
284
|
+
|
|
266
285
|
self.add_timer(
|
|
267
286
|
delay_ms=cleanup_interval_ms,
|
|
268
287
|
timer_id=self._data_retention_timer_id,
|
|
@@ -275,14 +294,16 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
275
294
|
cleanup_interval_hours,
|
|
276
295
|
)
|
|
277
296
|
else:
|
|
278
|
-
log.info(
|
|
297
|
+
log.info(
|
|
298
|
+
"%s Data retention is disabled via configuration.", self.log_identifier
|
|
299
|
+
)
|
|
279
300
|
|
|
280
301
|
log.info("%s Web UI Backend Component initialized.", self.log_identifier)
|
|
281
302
|
|
|
282
303
|
def process_event(self, event: Event):
|
|
283
304
|
if event.event_type == EventType.TIMER:
|
|
284
305
|
timer_id = event.data.get("timer_id")
|
|
285
|
-
|
|
306
|
+
|
|
286
307
|
if timer_id == self._sse_cleanup_timer_id:
|
|
287
308
|
log.debug("%s SSE buffer cleanup timer triggered.", self.log_identifier)
|
|
288
309
|
self.sse_event_buffer.cleanup_stale_buffers()
|
|
@@ -291,9 +312,11 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
291
312
|
log.debug("%s Agent health check timer triggered.", self.log_identifier)
|
|
292
313
|
self._check_agent_health()
|
|
293
314
|
return
|
|
294
|
-
|
|
315
|
+
|
|
295
316
|
if timer_id == self._data_retention_timer_id:
|
|
296
|
-
log.debug(
|
|
317
|
+
log.debug(
|
|
318
|
+
"%s Data retention cleanup timer triggered.", self.log_identifier
|
|
319
|
+
)
|
|
297
320
|
if self.data_retention_service:
|
|
298
321
|
try:
|
|
299
322
|
self.data_retention_service.cleanup_old_data()
|
|
@@ -387,7 +410,9 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
387
410
|
forwarder_cfg = {
|
|
388
411
|
"component_class": VisualizationForwarderComponent,
|
|
389
412
|
"component_name": f"{self.gateway_id}_viz_forwarder",
|
|
390
|
-
"component_config": {
|
|
413
|
+
"component_config": {
|
|
414
|
+
"target_queue_ref": self._visualization_message_queue
|
|
415
|
+
},
|
|
391
416
|
}
|
|
392
417
|
|
|
393
418
|
flow_config = {
|
|
@@ -1165,7 +1190,12 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1165
1190
|
log_id_prefix,
|
|
1166
1191
|
username,
|
|
1167
1192
|
)
|
|
1168
|
-
return {
|
|
1193
|
+
return {
|
|
1194
|
+
"id": username,
|
|
1195
|
+
"name": username,
|
|
1196
|
+
"email": username,
|
|
1197
|
+
"user_info": user_info,
|
|
1198
|
+
}
|
|
1169
1199
|
|
|
1170
1200
|
log.debug(
|
|
1171
1201
|
"%s No authenticated user in request.state, falling back to SessionManager.",
|
|
@@ -1199,7 +1229,7 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1199
1229
|
|
|
1200
1230
|
self.fastapi_app = fastapi_app_instance
|
|
1201
1231
|
|
|
1202
|
-
setup_dependencies(self, self.database_url)
|
|
1232
|
+
setup_dependencies(self, self.database_url, self.platform_database_url)
|
|
1203
1233
|
|
|
1204
1234
|
# Instantiate services that depend on the database session factory.
|
|
1205
1235
|
# This must be done *after* setup_dependencies has run.
|
|
@@ -1298,7 +1328,9 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1298
1328
|
self.log_identifier,
|
|
1299
1329
|
)
|
|
1300
1330
|
else:
|
|
1301
|
-
log.info(
|
|
1331
|
+
log.info(
|
|
1332
|
+
"%s Task logging is disabled.", self.log_identifier
|
|
1333
|
+
)
|
|
1302
1334
|
else:
|
|
1303
1335
|
log.error(
|
|
1304
1336
|
"%s FastAPI event loop not captured. Cannot start visualization processor.",
|
|
@@ -1314,24 +1346,36 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1314
1346
|
self.stop_signal.set()
|
|
1315
1347
|
|
|
1316
1348
|
try:
|
|
1317
|
-
from solace_agent_mesh_enterprise.init_enterprise import
|
|
1318
|
-
|
|
1349
|
+
from solace_agent_mesh_enterprise.init_enterprise import (
|
|
1350
|
+
start_enterprise_background_tasks,
|
|
1351
|
+
)
|
|
1352
|
+
|
|
1353
|
+
log.info(
|
|
1354
|
+
"%s Starting enterprise background tasks...",
|
|
1355
|
+
self.log_identifier,
|
|
1356
|
+
)
|
|
1319
1357
|
await start_enterprise_background_tasks(self)
|
|
1320
|
-
log.info(
|
|
1358
|
+
log.info(
|
|
1359
|
+
"%s Enterprise background tasks started successfully",
|
|
1360
|
+
self.log_identifier,
|
|
1361
|
+
)
|
|
1321
1362
|
except ImportError:
|
|
1322
|
-
log.debug(
|
|
1363
|
+
log.debug(
|
|
1364
|
+
"%s Enterprise package not available - skipping background tasks",
|
|
1365
|
+
self.log_identifier,
|
|
1366
|
+
)
|
|
1323
1367
|
except RuntimeError as enterprise_err:
|
|
1324
1368
|
log.warning(
|
|
1325
1369
|
"%s Enterprise background tasks disabled: %s - Community features will continue normally",
|
|
1326
1370
|
self.log_identifier,
|
|
1327
|
-
enterprise_err
|
|
1371
|
+
enterprise_err,
|
|
1328
1372
|
)
|
|
1329
1373
|
except Exception as enterprise_err:
|
|
1330
1374
|
log.error(
|
|
1331
1375
|
"%s Failed to start enterprise background tasks: %s - Community features will continue normally",
|
|
1332
1376
|
self.log_identifier,
|
|
1333
1377
|
enterprise_err,
|
|
1334
|
-
exc_info=True
|
|
1378
|
+
exc_info=True,
|
|
1335
1379
|
)
|
|
1336
1380
|
|
|
1337
1381
|
@self.fastapi_app.on_event("shutdown")
|
|
@@ -1342,18 +1386,29 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1342
1386
|
)
|
|
1343
1387
|
|
|
1344
1388
|
try:
|
|
1345
|
-
from solace_agent_mesh_enterprise.init_enterprise import
|
|
1346
|
-
|
|
1389
|
+
from solace_agent_mesh_enterprise.init_enterprise import (
|
|
1390
|
+
stop_enterprise_background_tasks,
|
|
1391
|
+
)
|
|
1392
|
+
|
|
1393
|
+
log.info(
|
|
1394
|
+
"%s Stopping enterprise background tasks...",
|
|
1395
|
+
self.log_identifier,
|
|
1396
|
+
)
|
|
1347
1397
|
await stop_enterprise_background_tasks()
|
|
1348
|
-
log.info(
|
|
1398
|
+
log.info(
|
|
1399
|
+
"%s Enterprise background tasks stopped", self.log_identifier
|
|
1400
|
+
)
|
|
1349
1401
|
except ImportError:
|
|
1350
|
-
log.debug(
|
|
1402
|
+
log.debug(
|
|
1403
|
+
"%s Enterprise package not available - no background tasks to stop",
|
|
1404
|
+
self.log_identifier,
|
|
1405
|
+
)
|
|
1351
1406
|
except Exception as enterprise_err:
|
|
1352
1407
|
log.error(
|
|
1353
1408
|
"%s Failed to stop enterprise background tasks: %s",
|
|
1354
1409
|
self.log_identifier,
|
|
1355
1410
|
enterprise_err,
|
|
1356
|
-
exc_info=True
|
|
1411
|
+
exc_info=True,
|
|
1357
1412
|
)
|
|
1358
1413
|
|
|
1359
1414
|
self.fastapi_thread = threading.Thread(
|
|
@@ -1418,18 +1473,18 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1418
1473
|
def cleanup(self):
|
|
1419
1474
|
"""Gracefully shuts down the component and the FastAPI server."""
|
|
1420
1475
|
log.info("%s Cleaning up Web UI Backend Component...", self.log_identifier)
|
|
1421
|
-
|
|
1476
|
+
|
|
1422
1477
|
# Cancel timers
|
|
1423
1478
|
self.cancel_timer(self._sse_cleanup_timer_id)
|
|
1424
1479
|
if self._data_retention_timer_id:
|
|
1425
1480
|
self.cancel_timer(self._data_retention_timer_id)
|
|
1426
1481
|
log.info("%s Cancelled data retention cleanup timer.", self.log_identifier)
|
|
1427
|
-
|
|
1482
|
+
|
|
1428
1483
|
# Clean up data retention service
|
|
1429
1484
|
if self.data_retention_service:
|
|
1430
1485
|
self.data_retention_service = None
|
|
1431
1486
|
log.info("%s Data retention service cleaned up.", self.log_identifier)
|
|
1432
|
-
|
|
1487
|
+
|
|
1433
1488
|
self.cancel_timer(self.health_check_timer_id)
|
|
1434
1489
|
log.info("%s Cleaning up visualization resources...", self.log_identifier)
|
|
1435
1490
|
if self._visualization_message_queue:
|
|
@@ -1446,7 +1501,10 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1446
1501
|
)
|
|
1447
1502
|
self._visualization_processor_task.cancel()
|
|
1448
1503
|
|
|
1449
|
-
if
|
|
1504
|
+
if (
|
|
1505
|
+
self._task_logger_processor_task
|
|
1506
|
+
and not self._task_logger_processor_task.done()
|
|
1507
|
+
):
|
|
1450
1508
|
log.info("%s Cancelling task logger processor task...", self.log_identifier)
|
|
1451
1509
|
self._task_logger_processor_task.cancel()
|
|
1452
1510
|
|
|
@@ -1756,70 +1814,88 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1756
1814
|
|
|
1757
1815
|
def get_agent_registry(self) -> AgentRegistry:
|
|
1758
1816
|
return self.agent_registry
|
|
1759
|
-
|
|
1817
|
+
|
|
1760
1818
|
def _check_agent_health(self):
|
|
1761
1819
|
"""
|
|
1762
1820
|
Checks the health of peer agents and de-registers unresponsive ones.
|
|
1763
1821
|
This is called periodically by the health check timer.
|
|
1764
1822
|
Uses TTL-based expiration to determine if an agent is unresponsive.
|
|
1765
1823
|
"""
|
|
1766
|
-
|
|
1824
|
+
|
|
1767
1825
|
log.debug("%s Performing agent health check...", self.log_identifier)
|
|
1768
|
-
|
|
1826
|
+
|
|
1769
1827
|
# Get TTL from configuration or use default from constants
|
|
1770
|
-
from ...common.constants import
|
|
1771
|
-
|
|
1772
|
-
|
|
1828
|
+
from ...common.constants import (
|
|
1829
|
+
HEALTH_CHECK_INTERVAL_SECONDS,
|
|
1830
|
+
HEALTH_CHECK_TTL_SECONDS,
|
|
1831
|
+
)
|
|
1832
|
+
|
|
1833
|
+
ttl_seconds = self.get_config(
|
|
1834
|
+
"agent_health_check_ttl_seconds", HEALTH_CHECK_TTL_SECONDS
|
|
1835
|
+
)
|
|
1836
|
+
health_check_interval = self.get_config(
|
|
1837
|
+
"agent_health_check_interval_seconds", HEALTH_CHECK_INTERVAL_SECONDS
|
|
1838
|
+
)
|
|
1773
1839
|
|
|
1774
1840
|
log.debug(
|
|
1775
1841
|
"%s Health check configuration: interval=%d seconds, TTL=%d seconds",
|
|
1776
1842
|
self.log_identifier,
|
|
1777
1843
|
health_check_interval,
|
|
1778
|
-
ttl_seconds
|
|
1844
|
+
ttl_seconds,
|
|
1779
1845
|
)
|
|
1780
|
-
|
|
1846
|
+
|
|
1781
1847
|
# Validate configuration values
|
|
1782
|
-
if
|
|
1848
|
+
if (
|
|
1849
|
+
ttl_seconds <= 0
|
|
1850
|
+
or health_check_interval <= 0
|
|
1851
|
+
or ttl_seconds < health_check_interval
|
|
1852
|
+
):
|
|
1783
1853
|
log.error(
|
|
1784
1854
|
"%s agent_health_check_ttl_seconds (%d) and agent_health_check_interval_seconds (%d) must be positive and TTL must be greater than interval.",
|
|
1785
1855
|
self.log_identifier,
|
|
1786
1856
|
ttl_seconds,
|
|
1787
|
-
health_check_interval
|
|
1857
|
+
health_check_interval,
|
|
1788
1858
|
)
|
|
1789
|
-
raise ValueError(
|
|
1790
|
-
|
|
1859
|
+
raise ValueError(
|
|
1860
|
+
f"Invalid health check configuration. agent_health_check_ttl_seconds ({ttl_seconds}) and agent_health_check_interval_seconds ({health_check_interval}) must be positive and TTL must be greater than interval."
|
|
1861
|
+
)
|
|
1862
|
+
|
|
1791
1863
|
# Get all agent names from the registry
|
|
1792
1864
|
agent_names = self.agent_registry.get_agent_names()
|
|
1793
1865
|
total_agents = len(agent_names)
|
|
1794
1866
|
agents_to_deregister = []
|
|
1795
|
-
|
|
1796
|
-
log.debug(
|
|
1797
|
-
|
|
1867
|
+
|
|
1868
|
+
log.debug(
|
|
1869
|
+
"%s Checking health of %d peer agents", self.log_identifier, total_agents
|
|
1870
|
+
)
|
|
1871
|
+
|
|
1798
1872
|
for agent_name in agent_names:
|
|
1799
1873
|
# Check if the agent's TTL has expired
|
|
1800
|
-
is_expired, time_since_last_seen = self.agent_registry.check_ttl_expired(
|
|
1801
|
-
|
|
1874
|
+
is_expired, time_since_last_seen = self.agent_registry.check_ttl_expired(
|
|
1875
|
+
agent_name, ttl_seconds
|
|
1876
|
+
)
|
|
1877
|
+
|
|
1802
1878
|
if is_expired:
|
|
1803
1879
|
log.warning(
|
|
1804
1880
|
"%s Agent '%s' TTL has expired. De-registering. Time since last seen: %d seconds (TTL: %d seconds)",
|
|
1805
1881
|
self.log_identifier,
|
|
1806
1882
|
agent_name,
|
|
1807
1883
|
time_since_last_seen,
|
|
1808
|
-
ttl_seconds
|
|
1884
|
+
ttl_seconds,
|
|
1809
1885
|
)
|
|
1810
1886
|
agents_to_deregister.append(agent_name)
|
|
1811
|
-
|
|
1887
|
+
|
|
1812
1888
|
# De-register unresponsive agents
|
|
1813
1889
|
for agent_name in agents_to_deregister:
|
|
1814
1890
|
self._deregister_agent(agent_name)
|
|
1815
|
-
|
|
1891
|
+
|
|
1816
1892
|
log.debug(
|
|
1817
1893
|
"%s Agent health check completed. Total agents: %d, De-registered: %d",
|
|
1818
1894
|
self.log_identifier,
|
|
1819
1895
|
total_agents,
|
|
1820
|
-
len(agents_to_deregister)
|
|
1896
|
+
len(agents_to_deregister),
|
|
1821
1897
|
)
|
|
1822
|
-
|
|
1898
|
+
|
|
1823
1899
|
def _deregister_agent(self, agent_name: str):
|
|
1824
1900
|
"""
|
|
1825
1901
|
De-registers an agent from the registry and publishes a de-registration event.
|
|
@@ -1866,52 +1942,6 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1866
1942
|
"""Returns the instance of the ConfigResolver."""
|
|
1867
1943
|
return self._config_resolver
|
|
1868
1944
|
|
|
1869
|
-
async def _resolve_embeds_for_persistence(
|
|
1870
|
-
self, message_content: str, session_id: str, user_id: str, log_identifier: str
|
|
1871
|
-
) -> str:
|
|
1872
|
-
"""
|
|
1873
|
-
Resolves embeds in a message for database storage.
|
|
1874
|
-
Returns the resolved text.
|
|
1875
|
-
|
|
1876
|
-
Args:
|
|
1877
|
-
message_content: The message text that may contain embeds
|
|
1878
|
-
session_id: The A2A session ID
|
|
1879
|
-
user_id: The user ID
|
|
1880
|
-
log_identifier: Logging identifier
|
|
1881
|
-
|
|
1882
|
-
Returns:
|
|
1883
|
-
The message with embeds resolved (or original if resolution fails)
|
|
1884
|
-
"""
|
|
1885
|
-
try:
|
|
1886
|
-
embed_context = {
|
|
1887
|
-
"artifact_service": self.shared_artifact_service,
|
|
1888
|
-
"session_context": {
|
|
1889
|
-
"app_name": self.gateway_id,
|
|
1890
|
-
"user_id": user_id,
|
|
1891
|
-
"session_id": session_id,
|
|
1892
|
-
},
|
|
1893
|
-
"config": self.get_embed_config(),
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
resolved_text, _, _ = await resolve_embeds_in_string(
|
|
1897
|
-
text=message_content,
|
|
1898
|
-
context=embed_context,
|
|
1899
|
-
resolver_func=evaluate_embed,
|
|
1900
|
-
types_to_resolve=EARLY_EMBED_TYPES,
|
|
1901
|
-
log_identifier=log_identifier,
|
|
1902
|
-
config=embed_context["config"],
|
|
1903
|
-
)
|
|
1904
|
-
|
|
1905
|
-
return resolved_text
|
|
1906
|
-
|
|
1907
|
-
except Exception as e:
|
|
1908
|
-
log.warning(
|
|
1909
|
-
"%s Error resolving embeds for storage: %s. Using original message.",
|
|
1910
|
-
log_identifier,
|
|
1911
|
-
e,
|
|
1912
|
-
)
|
|
1913
|
-
return message_content
|
|
1914
|
-
|
|
1915
1945
|
def _start_listener(self) -> None:
|
|
1916
1946
|
"""
|
|
1917
1947
|
GDK Hook: Starts the FastAPI/Uvicorn server.
|
|
@@ -2054,12 +2084,14 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
2054
2084
|
return
|
|
2055
2085
|
|
|
2056
2086
|
try:
|
|
2057
|
-
from solace_agent_mesh_enterprise.auth.input_required import
|
|
2087
|
+
from solace_agent_mesh_enterprise.auth.input_required import (
|
|
2088
|
+
handle_input_required_request,
|
|
2089
|
+
)
|
|
2090
|
+
|
|
2058
2091
|
event_data = handle_input_required_request(event_data, sse_task_id, self)
|
|
2059
2092
|
except ImportError:
|
|
2060
2093
|
pass
|
|
2061
2094
|
|
|
2062
|
-
|
|
2063
2095
|
log.debug(
|
|
2064
2096
|
"%s Sending update for A2A Task ID %s to SSE Task ID %s. Final chunk: %s",
|
|
2065
2097
|
log_id_prefix,
|
|
@@ -2119,7 +2151,7 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
2119
2151
|
)
|
|
2120
2152
|
return
|
|
2121
2153
|
|
|
2122
|
-
log.
|
|
2154
|
+
log.info(
|
|
2123
2155
|
"%s Sending final response for A2A Task ID %s to SSE Task ID %s.",
|
|
2124
2156
|
log_id_prefix,
|
|
2125
2157
|
a2a_task_id,
|
|
@@ -2135,7 +2167,7 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
2135
2167
|
await self.sse_manager.send_event(
|
|
2136
2168
|
task_id=sse_task_id, event_data=sse_payload, event_type="final_response"
|
|
2137
2169
|
)
|
|
2138
|
-
log.
|
|
2170
|
+
log.debug(
|
|
2139
2171
|
"%s Successfully sent final_response via SSE for A2A Task ID %s.",
|
|
2140
2172
|
log_id_prefix,
|
|
2141
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
|