solace-agent-mesh 1.5.0__py3-none-any.whl → 1.6.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/callbacks.py +14 -17
- solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +3 -1
- solace_agent_mesh/agent/adk/intelligent_mcp_callbacks.py +2 -1
- solace_agent_mesh/agent/adk/mcp_content_processor.py +2 -1
- solace_agent_mesh/agent/adk/models/lite_llm.py +123 -8
- solace_agent_mesh/agent/adk/models/oauth2_token_manager.py +245 -0
- solace_agent_mesh/agent/adk/runner.py +3 -1
- solace_agent_mesh/agent/adk/services.py +4 -1
- solace_agent_mesh/agent/adk/setup.py +3 -1
- solace_agent_mesh/agent/adk/tool_wrapper.py +2 -2
- solace_agent_mesh/agent/protocol/event_handlers.py +42 -2
- solace_agent_mesh/agent/proxies/__init__.py +0 -0
- solace_agent_mesh/agent/proxies/a2a/__init__.py +3 -0
- solace_agent_mesh/agent/proxies/a2a/app.py +55 -0
- solace_agent_mesh/agent/proxies/a2a/component.py +1115 -0
- solace_agent_mesh/agent/proxies/a2a/config.py +140 -0
- solace_agent_mesh/agent/proxies/a2a/oauth_token_cache.py +104 -0
- solace_agent_mesh/agent/proxies/base/__init__.py +3 -0
- solace_agent_mesh/agent/proxies/base/app.py +99 -0
- solace_agent_mesh/agent/proxies/base/component.py +619 -0
- solace_agent_mesh/agent/proxies/base/config.py +85 -0
- solace_agent_mesh/agent/proxies/base/proxy_task_context.py +17 -0
- solace_agent_mesh/agent/sac/app.py +12 -4
- solace_agent_mesh/agent/sac/component.py +164 -9
- solace_agent_mesh/agent/tools/audio_tools.py +127 -9
- solace_agent_mesh/agent/tools/builtin_artifact_tools.py +3 -1
- solace_agent_mesh/agent/tools/builtin_data_analysis_tools.py +3 -1
- solace_agent_mesh/agent/tools/dynamic_tool.py +2 -1
- solace_agent_mesh/agent/tools/general_agent_tools.py +2 -1
- solace_agent_mesh/agent/tools/image_tools.py +2 -1
- solace_agent_mesh/agent/tools/peer_agent_tool.py +2 -1
- solace_agent_mesh/agent/tools/registry.py +3 -1
- solace_agent_mesh/agent/tools/test_tools.py +2 -1
- solace_agent_mesh/agent/tools/web_tools.py +12 -6
- solace_agent_mesh/agent/utils/artifact_helpers.py +144 -4
- solace_agent_mesh/agent/utils/config_parser.py +3 -1
- solace_agent_mesh/assets/docs/404.html +3 -3
- solace_agent_mesh/assets/docs/assets/js/{b7006a3a.73a79653.js → 032c2d61.f3d37824.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/0bcf40b7.c019ad46.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/15ba94aa.932dd2db.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2131ec11.5c7a1f6e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{2334.622a6395.js → 2334.1cf50a20.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/240a0364.7eac6021.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2e32b5e0.33f5d75b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/341393d4.0fac2613.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{3624.b524e433.js → 3624.0eaa1fd0.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/3a6c6137.f5940cfa.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ac1795d.76654dd9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ff0015d.2be20244.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/509e993c.4c7a1a6d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/547e15cc.2cbb060a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/55b7b518.f2b1d1ba.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5c2bd65f.eda4bcb2.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6063ff4c.ef84f702.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/631738c7.a8b1ef8b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6a520c9d.ba015d81.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.f4b15f3b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6d84eae0.4a5fbf39.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6fdfefc7.99de744e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/71da7b71.38583438.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/722f809d.965da774.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/742f027b.46c07808.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/77cf947d.48cb18a2.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8024126c.56e59919.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/81a99df0.07034dd9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/82fbfb93.139a1a1f.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{8591.d7c16be6.js → 8591.5d015485.js} +2 -2
- solace_agent_mesh/assets/docs/assets/js/{8731.49e930c2.js → 8731.6c1dbf0c.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/924ffdeb.8095e148.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/945fb41e.6f4cdffd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/94e8668d.b5ddb7a1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9bb13469.dd1c9b54.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9e9d0a82.570c057b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ab9708a8.3e6dd091.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ad71b5ed.af3ecfd1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/c198a0dc.8f31f867.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/c93cbaa0.eaff365e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ceb2a7a6.5d92d7d0.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/da0b5bad.d08a9466.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/db924877.e98d12a1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd817ffc.0aa9630a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd81e2b8.d590bc9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/de5f4c65.e8241890.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/de915948.27d6b065.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e3d9abda.2b916f9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e6f9706b.e74a984d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e92d0134.cf6d6522.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/f284c35a.42f59cdd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ff4d71f2.15b02f97.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/main.20feee82.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/runtime~main.0d198646.js +1 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +154 -0
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/artifact-management/index.html +7 -7
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/audio-tools/index.html +7 -7
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/data-analysis-tools/index.html +8 -8
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/embeds/index.html +6 -6
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/index.html +11 -11
- solace_agent_mesh/assets/docs/docs/documentation/{concepts → components}/cli/index.html +25 -25
- solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +91 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/index.html +29 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/orchestrator/index.html +55 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/plugins/index.html +110 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/proxies/index.html +262 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/debugging/index.html +104 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +85 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +25 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +59 -0
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/create-agents/index.html +113 -152
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/create-gateways/index.html +10 -10
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/creating-python-tools/index.html +12 -12
- solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +54 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/evaluations/index.html +135 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +34 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +55 -0
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/bedrock-agents/index.html +25 -25
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/custom-agent/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/event-mesh-gateway/index.html +12 -12
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/mcp-integration/index.html +10 -10
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/mongodb-integration/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/rag-integration/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/rest-gateway/index.html +10 -10
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +72 -0
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/sql-database/index.html +14 -14
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +33 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +83 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +222 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +161 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/architecture/index.html +75 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/index.html +53 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +35 -100
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +41 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/configurations/index.html +81 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/index.html +25 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/installation/index.html +76 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +160 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +142 -0
- solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0/index.html +100 -0
- solace_agent_mesh/assets/docs/docs/documentation/{Migrations/A2A Upgrade To 0.3.0/a2a-technical-migration-map/index.html → migrations/a2a-upgrade/a2a-technical-migration-map/index.html} +10 -11
- solace_agent_mesh/assets/docs/img/solace-logo.png +0 -0
- solace_agent_mesh/assets/docs/lunr-index-1761165361160.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -1
- solace_agent_mesh/assets/docs/search-doc-1761165361160.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/add_cmd/agent_cmd.py +2 -69
- solace_agent_mesh/cli/commands/eval_cmd.py +11 -49
- solace_agent_mesh/cli/commands/init_cmd/__init__.py +0 -5
- solace_agent_mesh/cli/commands/init_cmd/env_step.py +10 -12
- solace_agent_mesh/cli/commands/init_cmd/orchestrator_step.py +9 -61
- solace_agent_mesh/cli/commands/init_cmd/webui_gateway_step.py +9 -49
- solace_agent_mesh/cli/commands/plugin_cmd/add_cmd.py +1 -2
- solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-DwrxZE0E.js → authCallback-BTf6dqwp.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{client-DarGQzyw.js → client-CaY59VuC.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-BGTaW0uv.js +342 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-DHJKSW1S.css +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/{vendor-BKIeiHj_.js → vendor-BEmvJSYz.js} +1 -1
- 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/__init__.py +24 -0
- solace_agent_mesh/common/a2a/artifact.py +41 -1
- solace_agent_mesh/common/a2a/events.py +29 -0
- solace_agent_mesh/common/a2a/message.py +68 -0
- solace_agent_mesh/common/a2a/protocol.py +76 -3
- solace_agent_mesh/common/a2a/translation.py +3 -1
- solace_agent_mesh/common/agent_registry.py +83 -3
- solace_agent_mesh/common/constants.py +3 -1
- solace_agent_mesh/common/middleware/config_resolver.py +3 -1
- solace_agent_mesh/common/middleware/registry.py +3 -1
- solace_agent_mesh/common/sac/sam_component_base.py +2 -1
- solace_agent_mesh/common/sam_events/event_service.py +3 -2
- solace_agent_mesh/common/services/employee_service.py +3 -1
- solace_agent_mesh/common/services/identity_service.py +2 -1
- solace_agent_mesh/common/services/providers/local_file_identity_service.py +2 -1
- solace_agent_mesh/common/utils/artifact_utils.py +3 -1
- solace_agent_mesh/common/utils/asyncio_macos_fix.py +3 -1
- solace_agent_mesh/common/utils/embeds/converter.py +3 -1
- solace_agent_mesh/common/utils/embeds/evaluators.py +2 -1
- solace_agent_mesh/common/utils/embeds/modifiers.py +3 -2
- solace_agent_mesh/common/utils/embeds/resolver.py +2 -1
- solace_agent_mesh/common/utils/initializer.py +3 -1
- solace_agent_mesh/common/utils/message_utils.py +2 -1
- solace_agent_mesh/common/utils/push_notification_auth.py +3 -2
- solace_agent_mesh/common/utils/pydantic_utils.py +12 -0
- solace_agent_mesh/config_portal/backend/common.py +1 -1
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-ByU1X1HD.js +98 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/{manifest-44d62be6.js → manifest-61038fc6.js} +1 -1
- solace_agent_mesh/config_portal/frontend/static/client/index.html +1 -1
- solace_agent_mesh/core_a2a/service.py +2 -2
- solace_agent_mesh/evaluation/evaluator.py +128 -104
- solace_agent_mesh/evaluation/message_organizer.py +116 -110
- solace_agent_mesh/evaluation/report_data_processor.py +84 -86
- solace_agent_mesh/evaluation/report_generator.py +73 -79
- solace_agent_mesh/evaluation/run.py +421 -235
- solace_agent_mesh/evaluation/shared/__init__.py +92 -0
- solace_agent_mesh/evaluation/shared/constants.py +47 -0
- solace_agent_mesh/evaluation/shared/exceptions.py +50 -0
- solace_agent_mesh/evaluation/shared/helpers.py +35 -0
- solace_agent_mesh/evaluation/shared/test_case_loader.py +167 -0
- solace_agent_mesh/evaluation/shared/test_suite_loader.py +280 -0
- solace_agent_mesh/evaluation/subscriber.py +111 -232
- solace_agent_mesh/evaluation/summary_builder.py +227 -117
- solace_agent_mesh/gateway/base/app.py +3 -2
- solace_agent_mesh/gateway/base/component.py +11 -2
- solace_agent_mesh/gateway/base/task_context.py +2 -1
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251015_add_session_performance_indexes.py +70 -0
- solace_agent_mesh/gateway/http_sse/app.py +2 -1
- solace_agent_mesh/gateway/http_sse/component.py +102 -3
- solace_agent_mesh/gateway/http_sse/components/task_logger_forwarder.py +3 -2
- solace_agent_mesh/gateway/http_sse/components/visualization_forwarder_component.py +3 -1
- solace_agent_mesh/gateway/http_sse/dependencies.py +7 -5
- solace_agent_mesh/gateway/http_sse/main.py +5 -2
- solace_agent_mesh/gateway/http_sse/repository/chat_task_repository.py +12 -13
- solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +15 -18
- solace_agent_mesh/gateway/http_sse/repository/interfaces.py +25 -18
- solace_agent_mesh/gateway/http_sse/repository/session_repository.py +30 -26
- solace_agent_mesh/gateway/http_sse/repository/task_repository.py +35 -44
- solace_agent_mesh/gateway/http_sse/routers/agent_cards.py +7 -5
- solace_agent_mesh/gateway/http_sse/routers/artifacts.py +97 -205
- solace_agent_mesh/gateway/http_sse/routers/auth.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/config.py +3 -2
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +4 -3
- solace_agent_mesh/gateway/http_sse/routers/people.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/sessions.py +5 -3
- solace_agent_mesh/gateway/http_sse/routers/sse.py +3 -2
- solace_agent_mesh/gateway/http_sse/routers/tasks.py +35 -42
- solace_agent_mesh/gateway/http_sse/routers/users.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/visualization.py +19 -12
- solace_agent_mesh/gateway/http_sse/services/agent_card_service.py +3 -1
- solace_agent_mesh/gateway/http_sse/services/data_retention_service.py +6 -5
- solace_agent_mesh/gateway/http_sse/services/feedback_service.py +53 -44
- solace_agent_mesh/gateway/http_sse/services/people_service.py +2 -2
- solace_agent_mesh/gateway/http_sse/services/session_service.py +23 -21
- solace_agent_mesh/gateway/http_sse/services/task_logger_service.py +10 -9
- solace_agent_mesh/gateway/http_sse/services/task_service.py +3 -2
- solace_agent_mesh/gateway/http_sse/session_manager.py +2 -1
- solace_agent_mesh/gateway/http_sse/shared/base_repository.py +45 -71
- solace_agent_mesh/gateway/http_sse/shared/types.py +0 -18
- solace_agent_mesh/gateway/http_sse/sse_event_buffer.py +2 -1
- solace_agent_mesh/gateway/http_sse/sse_manager.py +2 -2
- solace_agent_mesh/templates/gateway_app_template.py +4 -2
- solace_agent_mesh/templates/gateway_component_template.py +3 -1
- solace_agent_mesh/templates/gateway_config_template.yaml +0 -5
- solace_agent_mesh/templates/logging_config_template.ini +27 -46
- solace_agent_mesh/templates/plugin_gateway_config_template.yaml +0 -3
- solace_agent_mesh/templates/plugin_tools_template.py +2 -2
- solace_agent_mesh/templates/shared_config.yaml +40 -0
- {solace_agent_mesh-1.5.0.dist-info → solace_agent_mesh-1.6.0.dist-info}/METADATA +47 -21
- {solace_agent_mesh-1.5.0.dist-info → solace_agent_mesh-1.6.0.dist-info}/RECORD +254 -225
- solace_agent_mesh/assets/docs/assets/images/sac-flows-80d5b603c6aafd33e87945680ce0abf3.png +0 -0
- solace_agent_mesh/assets/docs/assets/images/sac_parts_of_a_component-cb3d0424b1d0c17734c5435cca6b4082.png +0 -0
- solace_agent_mesh/assets/docs/assets/js/04989206.a248f00c.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/0e682baa.d54b8668.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1023fc19.8a8a9309.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1523c6b4.2645ef68.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/166ab619.e27886d9.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1c6e87d2.e056b7e0.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/21ceee5f.3bf39250.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/2a9cab12.2afaee76.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/332e10b5.f7629851.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/3d406171.5560fdf9.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/42b3f8d8.508ae8db.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/442a8107.b5c2532a.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/453a82a6.3c6bb61d.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/483cef9a.bf9398af.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/4c2787c2.c1290a40.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/55f47984.bcd00a86.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/5b4258a4.fdfd2325.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/664b740a.ba305a89.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/75384d09.c19e8b51.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/768e31b0.9abcdc48.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/85387663.be2bc838.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/945fb41e.16e00776.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/9a09e75d.92de8cf5.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/9eff14a2.d62aad71.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/a12a4955.25fbed32.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/a3a92b25.af35e313.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/aba87c2f.4ddf32f2.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ae0e903d.5fe5203f.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ae4415af.16cc58d3.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/bac0be12.17de4316.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/c2c06897.87cb1f47.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/c835a94d.ce21f0bf.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cc969b05.feef7dcc.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cd3d4052.a19e7d78.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ced92a13.fb92e7ca.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cee5d587.47904f5e.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/d6a81ee7.829198f1.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/f284c35a.ed8dd236.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/f897a61a.126663fe.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/fbfa3e75.e144b16c.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/main.0c149855.js +0 -2
- solace_agent_mesh/assets/docs/assets/js/runtime~main.c66557e4.js +0 -1
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/installation/index.html +0 -46
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/rbac-setup-guilde/index.html +0 -201
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/single-sign-on/index.html +0 -29
- solace_agent_mesh/assets/docs/docs/documentation/Migrations/A2A Upgrade To 0.3.0/a2a-gateway-upgrade-to-0.3.0/index.html +0 -105
- solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +0 -144
- solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +0 -91
- solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +0 -91
- solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +0 -55
- solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +0 -111
- solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +0 -77
- solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +0 -48
- solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +0 -54
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +0 -45
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/index.html +0 -74
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/litellm_models/index.html +0 -49
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +0 -76
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +0 -73
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +0 -72
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +0 -54
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +0 -69
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +0 -59
- solace_agent_mesh/assets/docs/lunr-index-1760032255022.json +0 -1
- solace_agent_mesh/assets/docs/search-doc-1760032255022.json +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-CZbpmwfA.css +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-C__uuUkB.js +0 -339
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-BNuqpWDc.js +0 -98
- solace_agent_mesh/evaluation/config_loader.py +0 -657
- solace_agent_mesh/evaluation/test_case_loader.py +0 -714
- /solace_agent_mesh/assets/docs/assets/js/{8591.d7c16be6.js.LICENSE.txt → 8591.5d015485.js.LICENSE.txt} +0 -0
- /solace_agent_mesh/assets/docs/assets/js/{main.0c149855.js.LICENSE.txt → main.20feee82.js.LICENSE.txt} +0 -0
- {solace_agent_mesh-1.5.0.dist-info → solace_agent_mesh-1.6.0.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-1.5.0.dist-info → solace_agent_mesh-1.6.0.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-1.5.0.dist-info → solace_agent_mesh-1.6.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Base App class for Gateway implementations in the Solace AI Connector.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
import uuid
|
|
6
7
|
from abc import abstractmethod
|
|
7
8
|
from typing import Any, Dict, List, Type
|
|
8
9
|
|
|
9
|
-
from solace_ai_connector.common.log import log
|
|
10
10
|
from solace_ai_connector.common.utils import deep_merge
|
|
11
11
|
from solace_ai_connector.flow.app import App
|
|
12
12
|
from solace_ai_connector.components.component_base import ComponentBase
|
|
@@ -17,6 +17,7 @@ from ...common.a2a import (
|
|
|
17
17
|
get_gateway_status_subscription_topic,
|
|
18
18
|
)
|
|
19
19
|
|
|
20
|
+
log = logging.getLogger(__name__)
|
|
20
21
|
|
|
21
22
|
class BaseGatewayComponent(ComponentBase):
|
|
22
23
|
pass
|
|
@@ -271,7 +272,7 @@ class BaseGatewayApp(App):
|
|
|
271
272
|
broker_config["queue_name"] = (
|
|
272
273
|
f"{self.namespace.strip('/')}/q/gdk/gateway/{self.gateway_id}"
|
|
273
274
|
)
|
|
274
|
-
broker_config["temporary_queue"] = True
|
|
275
|
+
broker_config["temporary_queue"] = modified_app_info.get("broker", {}).get("temporary_queue", True)
|
|
275
276
|
log.debug(
|
|
276
277
|
"Injected broker settings for gateway '%s': %s",
|
|
277
278
|
self.gateway_id,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Base Component class for Gateway implementations in the Solace AI Connector.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
import asyncio
|
|
6
7
|
import queue
|
|
7
8
|
import base64
|
|
@@ -9,7 +10,6 @@ import uuid
|
|
|
9
10
|
from datetime import datetime, timezone
|
|
10
11
|
from typing import Any, Dict, Optional, List, Tuple, Union
|
|
11
12
|
|
|
12
|
-
from solace_ai_connector.common.log import log
|
|
13
13
|
from google.adk.artifacts import BaseArtifactService
|
|
14
14
|
|
|
15
15
|
from ...common.agent_registry import AgentRegistry
|
|
@@ -53,6 +53,8 @@ from abc import abstractmethod
|
|
|
53
53
|
|
|
54
54
|
from ...common.middleware.registry import MiddlewareRegistry
|
|
55
55
|
|
|
56
|
+
log = logging.getLogger(__name__)
|
|
57
|
+
|
|
56
58
|
info = {
|
|
57
59
|
"class_name": "BaseGatewayComponent",
|
|
58
60
|
"description": (
|
|
@@ -280,6 +282,9 @@ class BaseGatewayComponent(SamComponentBase):
|
|
|
280
282
|
"user_id_for_a2a", user_identity.get("id")
|
|
281
283
|
)
|
|
282
284
|
|
|
285
|
+
system_purpose = self.get_config("system_purpose", "")
|
|
286
|
+
response_format = self.get_config("response_format", "")
|
|
287
|
+
|
|
283
288
|
if not a2a_session_id:
|
|
284
289
|
a2a_session_id = f"gdk-session-{uuid.uuid4().hex}"
|
|
285
290
|
log.warning(
|
|
@@ -289,7 +294,11 @@ class BaseGatewayComponent(SamComponentBase):
|
|
|
289
294
|
)
|
|
290
295
|
external_request_context["a2a_session_id"] = a2a_session_id
|
|
291
296
|
|
|
292
|
-
a2a_metadata = {
|
|
297
|
+
a2a_metadata = {
|
|
298
|
+
"agent_name": target_agent_name,
|
|
299
|
+
"system_purpose": system_purpose,
|
|
300
|
+
"response_format": response_format,
|
|
301
|
+
}
|
|
293
302
|
invoked_artifacts = external_request_context.get("invoked_with_artifacts")
|
|
294
303
|
if invoked_artifacts:
|
|
295
304
|
a2a_metadata["invoked_with_artifacts"] = invoked_artifacts
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Manages context for tasks being processed by a gateway.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
import threading
|
|
6
7
|
from typing import Dict, Optional, Any
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
log = logging.getLogger(__name__)
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class TaskContextManager:
|
solace_agent_mesh/gateway/http_sse/alembic/versions/20251015_add_session_performance_indexes.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""add performance indexes for query optimization
|
|
2
|
+
|
|
3
|
+
Revision ID: 20251015_session_idx
|
|
4
|
+
Revises: 98882922fa59
|
|
5
|
+
Create Date: 2025-10-15
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from collections.abc import Sequence
|
|
10
|
+
|
|
11
|
+
import sqlalchemy as sa
|
|
12
|
+
from alembic import op
|
|
13
|
+
|
|
14
|
+
revision: str = "20251015_session_idx"
|
|
15
|
+
down_revision: str | Sequence[str] | None = "98882922fa59"
|
|
16
|
+
branch_labels: str | Sequence[str] | None = None
|
|
17
|
+
depends_on: str | Sequence[str] | None = None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def upgrade() -> None:
|
|
21
|
+
"""Add composite indexes for optimal query performance."""
|
|
22
|
+
|
|
23
|
+
op.create_index("ix_sessions_user_id", "sessions", ["user_id"], unique=False)
|
|
24
|
+
|
|
25
|
+
op.create_index(
|
|
26
|
+
"ix_sessions_user_updated",
|
|
27
|
+
"sessions",
|
|
28
|
+
["user_id", sa.text("updated_time DESC")],
|
|
29
|
+
unique=False,
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
op.create_index(
|
|
33
|
+
"ix_chat_tasks_session_user_created",
|
|
34
|
+
"chat_tasks",
|
|
35
|
+
["session_id", "user_id", "created_time"],
|
|
36
|
+
unique=False,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
op.create_index(
|
|
40
|
+
"ix_tasks_user_start_time",
|
|
41
|
+
"tasks",
|
|
42
|
+
["user_id", sa.text("start_time DESC")],
|
|
43
|
+
unique=False,
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
op.create_index(
|
|
47
|
+
"ix_task_events_task_created",
|
|
48
|
+
"task_events",
|
|
49
|
+
["task_id", "created_time"],
|
|
50
|
+
unique=False,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
op.drop_index("ix_tasks_initial_request_text", table_name="tasks")
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def downgrade() -> None:
|
|
57
|
+
"""Remove performance indexes."""
|
|
58
|
+
|
|
59
|
+
op.create_index(
|
|
60
|
+
op.f("ix_tasks_initial_request_text"),
|
|
61
|
+
"tasks",
|
|
62
|
+
["initial_request_text"],
|
|
63
|
+
unique=False,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
op.drop_index("ix_task_events_task_created", table_name="task_events")
|
|
67
|
+
op.drop_index("ix_tasks_user_start_time", table_name="tasks")
|
|
68
|
+
op.drop_index("ix_chat_tasks_session_user_created", table_name="chat_tasks")
|
|
69
|
+
op.drop_index("ix_sessions_user_updated", table_name="sessions")
|
|
70
|
+
op.drop_index("ix_sessions_user_id", table_name="sessions")
|
|
@@ -3,14 +3,15 @@ Custom Solace AI Connector App class for the Web UI Backend.
|
|
|
3
3
|
Defines configuration schema and programmatically creates the WebUIBackendComponent.
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
|
+
import logging
|
|
6
7
|
from typing import Any, Dict, List
|
|
7
|
-
from solace_ai_connector.common.log import log
|
|
8
8
|
|
|
9
9
|
from ...gateway.http_sse.component import WebUIBackendComponent
|
|
10
10
|
|
|
11
11
|
from ...gateway.base.app import BaseGatewayApp
|
|
12
12
|
from ...gateway.base.component import BaseGatewayComponent
|
|
13
13
|
|
|
14
|
+
log = logging.getLogger(__name__)
|
|
14
15
|
|
|
15
16
|
info = {
|
|
16
17
|
"class_name": "WebUIBackendApp",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Custom Solace AI Connector Component to host the FastAPI backend for the Web UI.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
import asyncio
|
|
6
7
|
import json
|
|
7
8
|
import queue
|
|
@@ -14,7 +15,7 @@ from typing import Any
|
|
|
14
15
|
import uvicorn
|
|
15
16
|
from fastapi import FastAPI, UploadFile
|
|
16
17
|
from fastapi import Request as FastAPIRequest
|
|
17
|
-
|
|
18
|
+
|
|
18
19
|
from solace_ai_connector.components.inputs_outputs.broker_input import BrokerInput
|
|
19
20
|
from solace_ai_connector.flow.app import App as SACApp
|
|
20
21
|
from solace_ai_connector.common.event import Event, EventType
|
|
@@ -31,6 +32,8 @@ from .services.feedback_service import FeedbackService
|
|
|
31
32
|
from .services.task_logger_service import TaskLoggerService
|
|
32
33
|
from . import dependencies
|
|
33
34
|
|
|
35
|
+
log = logging.getLogger(__name__)
|
|
36
|
+
|
|
34
37
|
try:
|
|
35
38
|
from google.adk.artifacts import BaseArtifactService
|
|
36
39
|
except ImportError:
|
|
@@ -143,6 +146,27 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
143
146
|
timer_id=self._sse_cleanup_timer_id,
|
|
144
147
|
interval_ms=cleanup_interval_sec * 1000,
|
|
145
148
|
)
|
|
149
|
+
|
|
150
|
+
# Set up health check timer for agent registry
|
|
151
|
+
from ...common.constants import HEALTH_CHECK_INTERVAL_SECONDS
|
|
152
|
+
self.health_check_timer_id = f"agent_health_check_{self.gateway_id}"
|
|
153
|
+
health_check_interval_seconds = self.get_config("agent_health_check_interval_seconds", HEALTH_CHECK_INTERVAL_SECONDS)
|
|
154
|
+
if health_check_interval_seconds > 0:
|
|
155
|
+
log.info(
|
|
156
|
+
"%s Scheduling agent health check every %d seconds.",
|
|
157
|
+
self.log_identifier,
|
|
158
|
+
health_check_interval_seconds,
|
|
159
|
+
)
|
|
160
|
+
self.add_timer(
|
|
161
|
+
delay_ms=health_check_interval_seconds * 1000,
|
|
162
|
+
timer_id=self.health_check_timer_id,
|
|
163
|
+
interval_ms=health_check_interval_seconds * 1000,
|
|
164
|
+
)
|
|
165
|
+
else:
|
|
166
|
+
log.warning(
|
|
167
|
+
"%s Agent health check interval not configured or invalid, health checks will not run periodically.",
|
|
168
|
+
self.log_identifier,
|
|
169
|
+
)
|
|
146
170
|
|
|
147
171
|
session_config = self._resolve_session_config()
|
|
148
172
|
if session_config.get("type") == "sql":
|
|
@@ -262,6 +286,10 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
262
286
|
log.debug("%s SSE buffer cleanup timer triggered.", self.log_identifier)
|
|
263
287
|
self.sse_event_buffer.cleanup_stale_buffers()
|
|
264
288
|
return
|
|
289
|
+
elif event.data.get("timer_id") == self.health_check_timer_id:
|
|
290
|
+
log.debug("%s Agent health check timer triggered.", self.log_identifier)
|
|
291
|
+
self._check_agent_health()
|
|
292
|
+
return
|
|
265
293
|
|
|
266
294
|
if timer_id == self._data_retention_timer_id:
|
|
267
295
|
log.debug("%s Data retention cleanup timer triggered.", self.log_identifier)
|
|
@@ -351,7 +379,7 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
351
379
|
),
|
|
352
380
|
"retry_interval": main_broker_config.get("retry_interval"),
|
|
353
381
|
"retry_count": main_broker_config.get("retry_count"),
|
|
354
|
-
"temporary_queue": True,
|
|
382
|
+
"temporary_queue": main_broker_config.get("temporary_queue", True),
|
|
355
383
|
},
|
|
356
384
|
}
|
|
357
385
|
|
|
@@ -483,7 +511,7 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
483
511
|
),
|
|
484
512
|
"retry_interval": main_broker_config.get("retry_interval"),
|
|
485
513
|
"retry_count": main_broker_config.get("retry_count"),
|
|
486
|
-
"temporary_queue": True,
|
|
514
|
+
"temporary_queue": main_broker_config.get("temporary_queue", True),
|
|
487
515
|
},
|
|
488
516
|
}
|
|
489
517
|
|
|
@@ -1401,6 +1429,7 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1401
1429
|
self.data_retention_service = None
|
|
1402
1430
|
log.info("%s Data retention service cleaned up.", self.log_identifier)
|
|
1403
1431
|
|
|
1432
|
+
self.cancel_timer(self.health_check_timer_id)
|
|
1404
1433
|
log.info("%s Cleaning up visualization resources...", self.log_identifier)
|
|
1405
1434
|
if self._visualization_message_queue:
|
|
1406
1435
|
self._visualization_message_queue.put(None)
|
|
@@ -1726,6 +1755,76 @@ class WebUIBackendComponent(BaseGatewayComponent):
|
|
|
1726
1755
|
|
|
1727
1756
|
def get_agent_registry(self) -> AgentRegistry:
|
|
1728
1757
|
return self.agent_registry
|
|
1758
|
+
|
|
1759
|
+
def _check_agent_health(self):
|
|
1760
|
+
"""
|
|
1761
|
+
Checks the health of peer agents and de-registers unresponsive ones.
|
|
1762
|
+
This is called periodically by the health check timer.
|
|
1763
|
+
Uses TTL-based expiration to determine if an agent is unresponsive.
|
|
1764
|
+
"""
|
|
1765
|
+
|
|
1766
|
+
log.debug("%s Performing agent health check...", self.log_identifier)
|
|
1767
|
+
|
|
1768
|
+
# Get TTL from configuration or use default from constants
|
|
1769
|
+
from ...common.constants import HEALTH_CHECK_TTL_SECONDS, HEALTH_CHECK_INTERVAL_SECONDS
|
|
1770
|
+
ttl_seconds = self.get_config("agent_health_check_ttl_seconds", HEALTH_CHECK_TTL_SECONDS)
|
|
1771
|
+
health_check_interval = self.get_config("agent_health_check_interval_seconds", HEALTH_CHECK_INTERVAL_SECONDS)
|
|
1772
|
+
|
|
1773
|
+
log.debug(
|
|
1774
|
+
"%s Health check configuration: interval=%d seconds, TTL=%d seconds",
|
|
1775
|
+
self.log_identifier,
|
|
1776
|
+
health_check_interval,
|
|
1777
|
+
ttl_seconds
|
|
1778
|
+
)
|
|
1779
|
+
|
|
1780
|
+
# Validate configuration values
|
|
1781
|
+
if ttl_seconds <= 0 or health_check_interval <= 0 or ttl_seconds < health_check_interval:
|
|
1782
|
+
log.error(
|
|
1783
|
+
"%s agent_health_check_ttl_seconds (%d) and agent_health_check_interval_seconds (%d) must be positive and TTL must be greater than interval.",
|
|
1784
|
+
self.log_identifier,
|
|
1785
|
+
ttl_seconds,
|
|
1786
|
+
health_check_interval
|
|
1787
|
+
)
|
|
1788
|
+
raise ValueError(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.")
|
|
1789
|
+
|
|
1790
|
+
# Get all agent names from the registry
|
|
1791
|
+
agent_names = self.agent_registry.get_agent_names()
|
|
1792
|
+
total_agents = len(agent_names)
|
|
1793
|
+
agents_to_deregister = []
|
|
1794
|
+
|
|
1795
|
+
log.debug("%s Checking health of %d peer agents", self.log_identifier, total_agents)
|
|
1796
|
+
|
|
1797
|
+
for agent_name in agent_names:
|
|
1798
|
+
# Check if the agent's TTL has expired
|
|
1799
|
+
is_expired, time_since_last_seen = self.agent_registry.check_ttl_expired(agent_name, ttl_seconds)
|
|
1800
|
+
|
|
1801
|
+
if is_expired:
|
|
1802
|
+
log.warning(
|
|
1803
|
+
"%s Agent '%s' TTL has expired. De-registering. Time since last seen: %d seconds (TTL: %d seconds)",
|
|
1804
|
+
self.log_identifier,
|
|
1805
|
+
agent_name,
|
|
1806
|
+
time_since_last_seen,
|
|
1807
|
+
ttl_seconds
|
|
1808
|
+
)
|
|
1809
|
+
agents_to_deregister.append(agent_name)
|
|
1810
|
+
|
|
1811
|
+
# De-register unresponsive agents
|
|
1812
|
+
for agent_name in agents_to_deregister:
|
|
1813
|
+
self._deregister_agent(agent_name)
|
|
1814
|
+
|
|
1815
|
+
log.info(
|
|
1816
|
+
"%s Agent health check completed. Total agents: %d, De-registered: %d",
|
|
1817
|
+
self.log_identifier,
|
|
1818
|
+
total_agents,
|
|
1819
|
+
len(agents_to_deregister)
|
|
1820
|
+
)
|
|
1821
|
+
|
|
1822
|
+
def _deregister_agent(self, agent_name: str):
|
|
1823
|
+
"""
|
|
1824
|
+
De-registers an agent from the registry and publishes a de-registration event.
|
|
1825
|
+
"""
|
|
1826
|
+
# Remove from registry
|
|
1827
|
+
self.agent_registry.remove_agent(agent_name)
|
|
1729
1828
|
|
|
1730
1829
|
def get_sse_manager(self) -> SSEManager:
|
|
1731
1830
|
return self.sse_manager
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
SAC Component to forward messages from an internal BrokerInput
|
|
3
3
|
to the WebUIBackendComponent's internal queue for task logging.
|
|
4
4
|
"""
|
|
5
|
-
|
|
5
|
+
import logging
|
|
6
6
|
import queue
|
|
7
7
|
from typing import Any, Dict
|
|
8
8
|
|
|
9
9
|
from solace_ai_connector.components.component_base import ComponentBase
|
|
10
10
|
from solace_ai_connector.common.message import Message as SolaceMessage
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
log = logging.getLogger(__name__)
|
|
12
13
|
|
|
13
14
|
info = {
|
|
14
15
|
"class_name": "TaskLoggerForwarderComponent",
|
|
@@ -3,12 +3,14 @@ SAC Component to forward messages from an internal BrokerInput
|
|
|
3
3
|
to the WebUIBackendComponent's internal queue for visualization.
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
|
+
import logging
|
|
6
7
|
import queue
|
|
7
8
|
from typing import Any, Dict
|
|
8
9
|
|
|
9
10
|
from solace_ai_connector.components.component_base import ComponentBase
|
|
10
11
|
from solace_ai_connector.common.message import Message as SolaceMessage
|
|
11
|
-
|
|
12
|
+
|
|
13
|
+
log = logging.getLogger(__name__)
|
|
12
14
|
|
|
13
15
|
info = {
|
|
14
16
|
"class_name": "VisualizationForwarderComponent",
|
|
@@ -3,12 +3,12 @@ Defines FastAPI dependency injectors to access shared resources
|
|
|
3
3
|
managed by the WebUIBackendComponent.
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
|
+
import logging
|
|
6
7
|
from collections.abc import Callable, Generator
|
|
7
8
|
from contextlib import contextmanager
|
|
8
9
|
from typing import TYPE_CHECKING, Any
|
|
9
10
|
|
|
10
11
|
from fastapi import Depends, HTTPException, Request, status
|
|
11
|
-
from solace_ai_connector.common.log import log
|
|
12
12
|
from sqlalchemy import create_engine
|
|
13
13
|
from sqlalchemy.orm import Session, sessionmaker
|
|
14
14
|
|
|
@@ -30,6 +30,8 @@ from .repository.interfaces import ITaskRepository
|
|
|
30
30
|
from .repository.task_repository import TaskRepository
|
|
31
31
|
from .services.session_service import SessionService
|
|
32
32
|
|
|
33
|
+
log = logging.getLogger(__name__)
|
|
34
|
+
|
|
33
35
|
try:
|
|
34
36
|
from google.adk.artifacts import BaseArtifactService
|
|
35
37
|
except ImportError:
|
|
@@ -241,10 +243,10 @@ def get_people_service(
|
|
|
241
243
|
return PeopleService(identity_service=identity_service)
|
|
242
244
|
|
|
243
245
|
|
|
244
|
-
def get_task_repository(
|
|
246
|
+
def get_task_repository() -> ITaskRepository:
|
|
245
247
|
"""FastAPI dependency to get an instance of TaskRepository."""
|
|
246
248
|
log.debug("[Dependencies] get_task_repository called")
|
|
247
|
-
return TaskRepository(
|
|
249
|
+
return TaskRepository()
|
|
248
250
|
|
|
249
251
|
|
|
250
252
|
def get_feedback_service(
|
|
@@ -523,9 +525,9 @@ def get_session_validator(
|
|
|
523
525
|
try:
|
|
524
526
|
db = SessionLocal()
|
|
525
527
|
try:
|
|
526
|
-
session_repository = SessionRepository(
|
|
528
|
+
session_repository = SessionRepository()
|
|
527
529
|
session_domain = session_repository.find_user_session(
|
|
528
|
-
session_id, user_id
|
|
530
|
+
db, session_id, user_id
|
|
529
531
|
)
|
|
530
532
|
return session_domain is not None
|
|
531
533
|
finally:
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
import os
|
|
2
3
|
from pathlib import Path
|
|
3
4
|
from typing import TYPE_CHECKING
|
|
@@ -14,7 +15,6 @@ from fastapi import status
|
|
|
14
15
|
from fastapi.exceptions import RequestValidationError
|
|
15
16
|
from fastapi.middleware.cors import CORSMiddleware
|
|
16
17
|
from fastapi.responses import JSONResponse
|
|
17
|
-
from solace_ai_connector.common.log import log
|
|
18
18
|
from starlette.middleware.sessions import SessionMiddleware
|
|
19
19
|
from starlette.staticfiles import StaticFiles
|
|
20
20
|
|
|
@@ -38,6 +38,8 @@ from .routers.users import router as user_router
|
|
|
38
38
|
if TYPE_CHECKING:
|
|
39
39
|
from gateway.http_sse.component import WebUIBackendComponent
|
|
40
40
|
|
|
41
|
+
log = logging.getLogger(__name__)
|
|
42
|
+
|
|
41
43
|
app = FastAPI(
|
|
42
44
|
title="A2A Web UI Backend",
|
|
43
45
|
version="1.0.0", # Updated to reflect simplified architecture
|
|
@@ -95,7 +97,8 @@ async def _get_user_info(
|
|
|
95
97
|
|
|
96
98
|
def _extract_user_identifier(user_info: dict) -> str:
|
|
97
99
|
user_identifier = (
|
|
98
|
-
user_info.get("
|
|
100
|
+
user_info.get("user_id") # internal /user_info endpoint format maps identifier to user_id
|
|
101
|
+
or user_info.get("sub")
|
|
99
102
|
or user_info.get("client_id")
|
|
100
103
|
or user_info.get("username")
|
|
101
104
|
or user_info.get("oid")
|
|
@@ -16,12 +16,9 @@ from .models import ChatTaskModel
|
|
|
16
16
|
class ChatTaskRepository(IChatTaskRepository):
|
|
17
17
|
"""SQLAlchemy implementation of chat task repository."""
|
|
18
18
|
|
|
19
|
-
def
|
|
20
|
-
self.db = db
|
|
21
|
-
|
|
22
|
-
def save(self, task: ChatTask) -> ChatTask:
|
|
19
|
+
def save(self, session: DBSession, task: ChatTask) -> ChatTask:
|
|
23
20
|
"""Save or update a chat task (upsert)."""
|
|
24
|
-
existing =
|
|
21
|
+
existing = session.query(ChatTaskModel).filter(
|
|
25
22
|
ChatTaskModel.id == task.id
|
|
26
23
|
).first()
|
|
27
24
|
|
|
@@ -43,12 +40,12 @@ class ChatTaskRepository(IChatTaskRepository):
|
|
|
43
40
|
created_time=task.created_time,
|
|
44
41
|
updated_time=task.updated_time
|
|
45
42
|
)
|
|
46
|
-
|
|
43
|
+
session.add(model)
|
|
47
44
|
|
|
48
|
-
|
|
45
|
+
session.flush()
|
|
49
46
|
|
|
50
47
|
# Reload to get updated values
|
|
51
|
-
model =
|
|
48
|
+
model = session.query(ChatTaskModel).filter(
|
|
52
49
|
ChatTaskModel.id == task.id
|
|
53
50
|
).first()
|
|
54
51
|
|
|
@@ -56,11 +53,12 @@ class ChatTaskRepository(IChatTaskRepository):
|
|
|
56
53
|
|
|
57
54
|
def find_by_session(
|
|
58
55
|
self,
|
|
56
|
+
session: DBSession,
|
|
59
57
|
session_id: SessionId,
|
|
60
58
|
user_id: UserId
|
|
61
59
|
) -> List[ChatTask]:
|
|
62
60
|
"""Find all tasks for a session."""
|
|
63
|
-
models =
|
|
61
|
+
models = session.query(ChatTaskModel).filter(
|
|
64
62
|
ChatTaskModel.session_id == session_id,
|
|
65
63
|
ChatTaskModel.user_id == user_id
|
|
66
64
|
).order_by(ChatTaskModel.created_time.asc()).all()
|
|
@@ -69,23 +67,24 @@ class ChatTaskRepository(IChatTaskRepository):
|
|
|
69
67
|
|
|
70
68
|
def find_by_id(
|
|
71
69
|
self,
|
|
70
|
+
session: DBSession,
|
|
72
71
|
task_id: str,
|
|
73
72
|
user_id: UserId
|
|
74
73
|
) -> Optional[ChatTask]:
|
|
75
74
|
"""Find a specific task."""
|
|
76
|
-
model =
|
|
75
|
+
model = session.query(ChatTaskModel).filter(
|
|
77
76
|
ChatTaskModel.id == task_id,
|
|
78
77
|
ChatTaskModel.user_id == user_id
|
|
79
78
|
).first()
|
|
80
79
|
|
|
81
80
|
return self._model_to_entity(model) if model else None
|
|
82
81
|
|
|
83
|
-
def delete_by_session(self, session_id: SessionId) -> bool:
|
|
82
|
+
def delete_by_session(self, session: DBSession, session_id: SessionId) -> bool:
|
|
84
83
|
"""Delete all tasks for a session."""
|
|
85
|
-
result =
|
|
84
|
+
result = session.query(ChatTaskModel).filter(
|
|
86
85
|
ChatTaskModel.session_id == session_id
|
|
87
86
|
).delete()
|
|
88
|
-
|
|
87
|
+
session.flush()
|
|
89
88
|
return result > 0
|
|
90
89
|
|
|
91
90
|
def _model_to_entity(self, model: ChatTaskModel) -> ChatTask:
|
|
@@ -12,10 +12,7 @@ from .models import FeedbackModel
|
|
|
12
12
|
class FeedbackRepository(IFeedbackRepository):
|
|
13
13
|
"""SQLAlchemy implementation of feedback repository."""
|
|
14
14
|
|
|
15
|
-
def
|
|
16
|
-
self.db = db
|
|
17
|
-
|
|
18
|
-
def save(self, feedback: Feedback) -> Feedback:
|
|
15
|
+
def save(self, session: DBSession, feedback: Feedback) -> Feedback:
|
|
19
16
|
"""Save feedback."""
|
|
20
17
|
model = FeedbackModel(
|
|
21
18
|
id=feedback.id,
|
|
@@ -26,12 +23,12 @@ class FeedbackRepository(IFeedbackRepository):
|
|
|
26
23
|
comment=feedback.comment,
|
|
27
24
|
created_time=feedback.created_time,
|
|
28
25
|
)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
session.add(model)
|
|
27
|
+
session.flush()
|
|
28
|
+
session.refresh(model)
|
|
32
29
|
return self._model_to_entity(model)
|
|
33
30
|
|
|
34
|
-
def delete_feedback_older_than(self, cutoff_time_ms: int, batch_size: int) -> int:
|
|
31
|
+
def delete_feedback_older_than(self, session: DBSession, cutoff_time_ms: int, batch_size: int) -> int:
|
|
35
32
|
"""
|
|
36
33
|
Delete feedback records older than the cutoff time.
|
|
37
34
|
Uses batch deletion to avoid long-running transactions.
|
|
@@ -44,36 +41,36 @@ class FeedbackRepository(IFeedbackRepository):
|
|
|
44
41
|
Total number of feedback records deleted
|
|
45
42
|
"""
|
|
46
43
|
total_deleted = 0
|
|
47
|
-
|
|
44
|
+
|
|
48
45
|
while True:
|
|
49
46
|
# Find a batch of feedback IDs to delete
|
|
50
47
|
feedback_ids_to_delete = (
|
|
51
|
-
|
|
48
|
+
session.query(FeedbackModel.id)
|
|
52
49
|
.filter(FeedbackModel.created_time < cutoff_time_ms)
|
|
53
50
|
.limit(batch_size)
|
|
54
51
|
.all()
|
|
55
52
|
)
|
|
56
|
-
|
|
53
|
+
|
|
57
54
|
if not feedback_ids_to_delete:
|
|
58
55
|
break
|
|
59
|
-
|
|
56
|
+
|
|
60
57
|
# Extract IDs from the result tuples
|
|
61
58
|
ids = [feedback_id[0] for feedback_id in feedback_ids_to_delete]
|
|
62
|
-
|
|
59
|
+
|
|
63
60
|
# Delete this batch
|
|
64
61
|
deleted_count = (
|
|
65
|
-
|
|
62
|
+
session.query(FeedbackModel)
|
|
66
63
|
.filter(FeedbackModel.id.in_(ids))
|
|
67
64
|
.delete(synchronize_session=False)
|
|
68
65
|
)
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
|
|
67
|
+
session.commit()
|
|
71
68
|
total_deleted += deleted_count
|
|
72
|
-
|
|
69
|
+
|
|
73
70
|
# If we deleted fewer than batch_size, we're done
|
|
74
71
|
if deleted_count < batch_size:
|
|
75
72
|
break
|
|
76
|
-
|
|
73
|
+
|
|
77
74
|
return total_deleted
|
|
78
75
|
|
|
79
76
|
def _model_to_entity(self, model: FeedbackModel) -> Feedback:
|