solace-agent-mesh 1.4.12__py3-none-any.whl → 1.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of solace-agent-mesh might be problematic. Click here for more details.
- solace_agent_mesh/agent/adk/adk_llm.txt +3 -4
- solace_agent_mesh/agent/adk/adk_llm_detail.txt +566 -0
- solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +1 -1
- solace_agent_mesh/agent/adk/callbacks.py +56 -5
- 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 +1 -0
- solace_agent_mesh/agent/adk/models/models_llm.txt +1 -2
- 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/agent_llm.txt +1 -1
- solace_agent_mesh/agent/agent_llm_detail.txt +1702 -0
- solace_agent_mesh/agent/protocol/event_handlers.py +4 -14
- solace_agent_mesh/agent/protocol/protocol_llm.txt +15 -2
- solace_agent_mesh/agent/protocol/protocol_llm_detail.txt +92 -0
- solace_agent_mesh/agent/sac/app.py +3 -1
- solace_agent_mesh/agent/sac/component.py +55 -22
- solace_agent_mesh/agent/sac/sac_llm.txt +15 -1
- solace_agent_mesh/agent/sac/sac_llm_detail.txt +200 -0
- solace_agent_mesh/agent/sac/task_execution_context.py +73 -0
- solace_agent_mesh/agent/testing/testing_llm_detail.txt +68 -0
- solace_agent_mesh/agent/tools/audio_tools.py +2 -1
- 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/tools_llm.txt +148 -154
- solace_agent_mesh/agent/tools/tools_llm_detail.txt +274 -0
- solace_agent_mesh/agent/tools/web_tools.py +2 -1
- solace_agent_mesh/agent/utils/artifact_helpers.py +3 -1
- solace_agent_mesh/agent/utils/config_parser.py +3 -1
- solace_agent_mesh/agent/utils/utils_llm.txt +1 -1
- solace_agent_mesh/agent/utils/utils_llm_detail.txt +149 -0
- 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.e49689dd.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.39d5851d.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.804d6567.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.64c9bd6c.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/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.dd810042.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ab9708a8.3e6dd091.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ad71b5ed.60668e9e.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/da0b5bad.9d369087.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/db924877.cbc66f02.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.139b4b9c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e3d9abda.2b916f9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e6f9706b.582a78ca.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e92d0134.cf6d6522.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/f284c35a.5766a13d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ff4d71f2.9c0297a6.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/main.bd3c34f3.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/runtime~main.18dc45dd.js +1 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +143 -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/deploying/debugging/index.html +104 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +57 -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 +9 -9
- 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/index.html +32 -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 +11 -11
- 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/{getting-started → installing-and-configuring}/configurations/index.html +56 -50
- 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 +63 -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-1760121512891.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -1
- solace_agent_mesh/assets/docs/search-doc-1760121512891.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/client/webui/frontend/static/assets/{authCallback-j1LW-wlq.js → authCallback-DwrxZE0E.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{client-B9p_nFNA.js → client-DarGQzyw.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-2nd1gbaH.js +339 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-DoKXctCM.css +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/{vendor-CS5YMf8a.js → vendor-BKIeiHj_.js} +80 -70
- 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 +1 -1
- solace_agent_mesh/common/a2a/a2a_llm_detail.txt +193 -0
- solace_agent_mesh/common/a2a/artifact.py +2 -1
- solace_agent_mesh/common/a2a/protocol.py +3 -2
- solace_agent_mesh/common/a2a/translation.py +3 -1
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +1 -1
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm_detail.txt +736 -0
- solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json +23 -0
- solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +93 -15
- solace_agent_mesh/common/a2a_spec/schemas/tool_result.json +23 -0
- solace_agent_mesh/common/common_llm.txt +24 -39
- solace_agent_mesh/common/common_llm_detail.txt +2562 -0
- solace_agent_mesh/common/data_parts.py +9 -1
- solace_agent_mesh/common/middleware/config_resolver.py +3 -1
- solace_agent_mesh/common/middleware/middleware_llm_detail.txt +185 -0
- solace_agent_mesh/common/middleware/registry.py +3 -1
- solace_agent_mesh/common/sac/sac_llm.txt +1 -1
- solace_agent_mesh/common/sac/sac_llm_detail.txt +82 -0
- 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/sam_events/sam_events_llm.txt +104 -0
- solace_agent_mesh/common/sam_events/sam_events_llm_detail.txt +115 -0
- 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/services/services_llm.txt +57 -6
- solace_agent_mesh/common/services/services_llm_detail.txt +459 -0
- 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/embeds_llm.txt +1 -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/utils_llm.txt +75 -87
- solace_agent_mesh/common/utils/utils_llm_detail.txt +572 -0
- solace_agent_mesh/core_a2a/core_a2a_llm_detail.txt +101 -0
- solace_agent_mesh/core_a2a/service.py +2 -2
- solace_agent_mesh/gateway/base/app.py +3 -2
- solace_agent_mesh/gateway/base/base_llm.txt +1 -1
- solace_agent_mesh/gateway/base/base_llm_detail.txt +235 -0
- solace_agent_mesh/gateway/base/component.py +3 -1
- solace_agent_mesh/gateway/base/task_context.py +2 -1
- solace_agent_mesh/gateway/gateway_llm.txt +242 -235
- solace_agent_mesh/gateway/gateway_llm_detail.txt +3885 -0
- solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +295 -0
- solace_agent_mesh/gateway/http_sse/alembic/env.py +10 -1
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251006_98882922fa59_add_tasks_events_feedback_chat_tasks.py +190 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/versions_llm.txt +155 -0
- solace_agent_mesh/gateway/http_sse/alembic.ini +1 -1
- solace_agent_mesh/gateway/http_sse/app.py +150 -3
- solace_agent_mesh/gateway/http_sse/component.py +372 -61
- solace_agent_mesh/gateway/http_sse/components/components_llm.txt +46 -6
- solace_agent_mesh/gateway/http_sse/components/task_logger_forwarder.py +109 -0
- solace_agent_mesh/gateway/http_sse/components/visualization_forwarder_component.py +4 -2
- solace_agent_mesh/gateway/http_sse/dependencies.py +119 -27
- solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +172 -172
- solace_agent_mesh/gateway/http_sse/http_sse_llm_detail.txt +3278 -0
- solace_agent_mesh/gateway/http_sse/main.py +149 -42
- solace_agent_mesh/gateway/http_sse/repository/__init__.py +3 -12
- solace_agent_mesh/gateway/http_sse/repository/chat_task_repository.py +103 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/__init__.py +5 -3
- solace_agent_mesh/gateway/http_sse/repository/entities/chat_task.py +75 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +263 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/feedback.py +20 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/session_history.py +0 -16
- solace_agent_mesh/gateway/http_sse/repository/entities/task.py +25 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/task_event.py +21 -0
- solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +81 -0
- solace_agent_mesh/gateway/http_sse/repository/interfaces.py +73 -18
- solace_agent_mesh/gateway/http_sse/repository/models/__init__.py +9 -5
- solace_agent_mesh/gateway/http_sse/repository/models/chat_task_model.py +31 -0
- solace_agent_mesh/gateway/http_sse/repository/models/feedback_model.py +21 -0
- solace_agent_mesh/gateway/http_sse/repository/models/models_llm.txt +266 -0
- solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +3 -3
- solace_agent_mesh/gateway/http_sse/repository/models/task_event_model.py +25 -0
- solace_agent_mesh/gateway/http_sse/repository/models/task_model.py +32 -0
- solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +340 -0
- solace_agent_mesh/gateway/http_sse/repository/session_repository.py +4 -53
- solace_agent_mesh/gateway/http_sse/repository/task_repository.py +173 -0
- solace_agent_mesh/gateway/http_sse/routers/agent_cards.py +3 -2
- solace_agent_mesh/gateway/http_sse/routers/artifacts.py +3 -3
- solace_agent_mesh/gateway/http_sse/routers/auth.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/config.py +29 -6
- solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +346 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/__init__.py +3 -3
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +83 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +2 -10
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/task_requests.py +58 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/__init__.py +5 -3
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +107 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +1 -15
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/task_responses.py +30 -0
- solace_agent_mesh/gateway/http_sse/routers/feedback.py +37 -0
- solace_agent_mesh/gateway/http_sse/routers/people.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +255 -204
- solace_agent_mesh/gateway/http_sse/routers/sessions.py +223 -41
- solace_agent_mesh/gateway/http_sse/routers/sse.py +3 -2
- solace_agent_mesh/gateway/http_sse/routers/tasks.py +170 -43
- solace_agent_mesh/gateway/http_sse/routers/users.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/visualization.py +2 -1
- solace_agent_mesh/gateway/http_sse/services/agent_card_service.py +3 -1
- solace_agent_mesh/gateway/http_sse/services/data_retention_service.py +273 -0
- solace_agent_mesh/gateway/http_sse/services/feedback_service.py +242 -0
- solace_agent_mesh/gateway/http_sse/services/people_service.py +2 -82
- solace_agent_mesh/gateway/http_sse/services/services_llm.txt +177 -13
- solace_agent_mesh/gateway/http_sse/services/session_service.py +154 -85
- solace_agent_mesh/gateway/http_sse/services/task_logger_service.py +318 -0
- 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/exception_handlers.py +25 -14
- solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +285 -0
- solace_agent_mesh/gateway/http_sse/shared/types.py +7 -0
- 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/gateway/http_sse/utils/__init__.py +1 -0
- solace_agent_mesh/gateway/http_sse/utils/stim_utils.py +32 -0
- solace_agent_mesh/gateway/http_sse/utils/utils_llm.txt +47 -0
- solace_agent_mesh/solace_agent_mesh_llm.txt +1 -1
- solace_agent_mesh/solace_agent_mesh_llm_detail.txt +8599 -0
- solace_agent_mesh/templates/gateway_app_template.py +4 -2
- solace_agent_mesh/templates/gateway_component_template.py +3 -1
- solace_agent_mesh/templates/logging_config_template.ini +22 -45
- solace_agent_mesh/templates/plugin_tools_template.py +2 -2
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/METADATA +2 -2
- solace_agent_mesh-1.5.1.dist-info/RECORD +504 -0
- solace_agent_mesh/agent/adk/invocation_monitor.py +0 -295
- 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.4736f2d8.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.f67fc9f4.js +0 -2
- solace_agent_mesh/assets/docs/assets/js/runtime~main.40527046.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 -25
- 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/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-1759936913198.json +0 -1
- solace_agent_mesh/assets/docs/search-doc-1759936913198.json +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-ChRwcV89.css +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-DnnE01OM.js +0 -339
- solace_agent_mesh/gateway/http_sse/repository/entities/message.py +0 -41
- solace_agent_mesh/gateway/http_sse/repository/message_repository.py +0 -84
- solace_agent_mesh/gateway/http_sse/repository/models/message_model.py +0 -45
- solace_agent_mesh-1.4.12.dist-info/RECORD +0 -448
- /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.f67fc9f4.js.LICENSE.txt → main.bd3c34f3.js.LICENSE.txt} +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Service layer for handling user feedback on chat messages.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
import logging
|
|
7
|
+
import uuid
|
|
8
|
+
from typing import TYPE_CHECKING, Callable
|
|
9
|
+
|
|
10
|
+
from sqlalchemy.orm import Session as DBSession
|
|
11
|
+
|
|
12
|
+
from ..repository.entities import Feedback
|
|
13
|
+
from ..repository.feedback_repository import FeedbackRepository
|
|
14
|
+
from ..shared import now_epoch_ms
|
|
15
|
+
from ..utils.stim_utils import create_stim_from_task_data
|
|
16
|
+
|
|
17
|
+
# The FeedbackPayload is defined in the router, this creates a forward reference
|
|
18
|
+
# which is resolved at runtime.
|
|
19
|
+
if TYPE_CHECKING:
|
|
20
|
+
from ..routers.feedback import FeedbackPayload
|
|
21
|
+
from ..component import WebUIBackendComponent
|
|
22
|
+
from ..repository.interfaces import ITaskRepository
|
|
23
|
+
|
|
24
|
+
log = logging.getLogger(__name__)
|
|
25
|
+
|
|
26
|
+
class FeedbackService:
|
|
27
|
+
"""Handles the business logic for processing user feedback."""
|
|
28
|
+
|
|
29
|
+
def __init__(
|
|
30
|
+
self,
|
|
31
|
+
session_factory: Callable[[], DBSession] | None,
|
|
32
|
+
component: "WebUIBackendComponent",
|
|
33
|
+
task_repo: "ITaskRepository",
|
|
34
|
+
):
|
|
35
|
+
"""Initializes the FeedbackService."""
|
|
36
|
+
self.session_factory = session_factory
|
|
37
|
+
self.component = component
|
|
38
|
+
self.task_repo = task_repo
|
|
39
|
+
if self.session_factory:
|
|
40
|
+
log.info("FeedbackService initialized with database persistence.")
|
|
41
|
+
else:
|
|
42
|
+
log.info(
|
|
43
|
+
"FeedbackService initialized without database persistence (logging only)."
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
async def process_feedback(self, payload: "FeedbackPayload", user_id: str):
|
|
47
|
+
"""
|
|
48
|
+
Processes and stores the feedback. If a repository is configured,
|
|
49
|
+
it saves to the database. Otherwise, it logs the feedback.
|
|
50
|
+
Also publishes feedback to a Solace topic if configured.
|
|
51
|
+
Additionally updates the corresponding task's metadata with the feedback.
|
|
52
|
+
"""
|
|
53
|
+
if self.session_factory:
|
|
54
|
+
task_id = getattr(payload, "task_id", None)
|
|
55
|
+
if not task_id:
|
|
56
|
+
log.error(
|
|
57
|
+
"Feedback payload is missing 'task_id'. Cannot save to database. Payload: %s",
|
|
58
|
+
payload.model_dump_json(by_alias=True),
|
|
59
|
+
)
|
|
60
|
+
# We can still try to publish the event without saving to DB
|
|
61
|
+
else:
|
|
62
|
+
feedback_entity = Feedback(
|
|
63
|
+
id=str(uuid.uuid4()),
|
|
64
|
+
session_id=payload.session_id,
|
|
65
|
+
task_id=task_id,
|
|
66
|
+
user_id=user_id,
|
|
67
|
+
rating=payload.feedback_type,
|
|
68
|
+
comment=payload.feedback_text,
|
|
69
|
+
created_time=now_epoch_ms(),
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
db = self.session_factory()
|
|
73
|
+
try:
|
|
74
|
+
repo = FeedbackRepository(db)
|
|
75
|
+
repo.save(feedback_entity)
|
|
76
|
+
db.commit()
|
|
77
|
+
log.info(
|
|
78
|
+
"Feedback from user '%s' for task '%s' saved to database.",
|
|
79
|
+
user_id,
|
|
80
|
+
task_id,
|
|
81
|
+
)
|
|
82
|
+
except Exception as e:
|
|
83
|
+
log.exception(
|
|
84
|
+
"Failed to save feedback for user '%s' to database: %s",
|
|
85
|
+
user_id,
|
|
86
|
+
e,
|
|
87
|
+
)
|
|
88
|
+
db.rollback()
|
|
89
|
+
finally:
|
|
90
|
+
db.close()
|
|
91
|
+
|
|
92
|
+
# Update task metadata with feedback
|
|
93
|
+
self._update_task_metadata_with_feedback(
|
|
94
|
+
task_id, user_id, payload.feedback_type, payload.feedback_text
|
|
95
|
+
)
|
|
96
|
+
else:
|
|
97
|
+
log.warning(
|
|
98
|
+
"Feedback received but no database repository is configured. "
|
|
99
|
+
"Logging feedback only. Payload: %s",
|
|
100
|
+
payload.model_dump_json(by_alias=True),
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
# --- New event publishing logic ---
|
|
104
|
+
try:
|
|
105
|
+
await self._publish_feedback_event(payload, user_id)
|
|
106
|
+
except Exception as e:
|
|
107
|
+
log.error(
|
|
108
|
+
"Failed to publish feedback event for user '%s': %s", user_id, e
|
|
109
|
+
)
|
|
110
|
+
# Do not re-raise, as the primary operation (DB save) may have succeeded.
|
|
111
|
+
|
|
112
|
+
def _update_task_metadata_with_feedback(
|
|
113
|
+
self, task_id: str, user_id: str, feedback_type: str, feedback_text: str | None
|
|
114
|
+
):
|
|
115
|
+
"""
|
|
116
|
+
Update the task's metadata with feedback information.
|
|
117
|
+
|
|
118
|
+
Args:
|
|
119
|
+
task_id: The task ID to update
|
|
120
|
+
user_id: The user ID who submitted feedback
|
|
121
|
+
feedback_type: Type of feedback ("up" or "down")
|
|
122
|
+
feedback_text: Optional feedback text
|
|
123
|
+
"""
|
|
124
|
+
if not self.session_factory:
|
|
125
|
+
log.debug(
|
|
126
|
+
"No session factory available, skipping task metadata update for task %s",
|
|
127
|
+
task_id
|
|
128
|
+
)
|
|
129
|
+
return
|
|
130
|
+
|
|
131
|
+
db = self.session_factory()
|
|
132
|
+
try:
|
|
133
|
+
from ..repository.chat_task_repository import ChatTaskRepository
|
|
134
|
+
|
|
135
|
+
task_repo = ChatTaskRepository(db)
|
|
136
|
+
task = task_repo.find_by_id(task_id, user_id)
|
|
137
|
+
|
|
138
|
+
if task:
|
|
139
|
+
# Update feedback in task metadata
|
|
140
|
+
task.add_feedback(feedback_type, feedback_text)
|
|
141
|
+
task_repo.save(task)
|
|
142
|
+
db.commit()
|
|
143
|
+
log.info(
|
|
144
|
+
"Updated task metadata with feedback for task '%s' by user '%s'",
|
|
145
|
+
task_id,
|
|
146
|
+
user_id
|
|
147
|
+
)
|
|
148
|
+
else:
|
|
149
|
+
log.warning(
|
|
150
|
+
"Task '%s' not found for user '%s', cannot update task metadata with feedback",
|
|
151
|
+
task_id,
|
|
152
|
+
user_id
|
|
153
|
+
)
|
|
154
|
+
except Exception as e:
|
|
155
|
+
log.warning(
|
|
156
|
+
"Failed to update task metadata with feedback for task '%s': %s",
|
|
157
|
+
task_id,
|
|
158
|
+
e
|
|
159
|
+
)
|
|
160
|
+
db.rollback()
|
|
161
|
+
# Don't re-raise - feedback was already saved to feedback table
|
|
162
|
+
finally:
|
|
163
|
+
db.close()
|
|
164
|
+
|
|
165
|
+
async def _publish_feedback_event(self, payload: "FeedbackPayload", user_id: str):
|
|
166
|
+
"""Publishes the feedback as an event to the message broker if configured."""
|
|
167
|
+
log_id = f"[FeedbackPublisher:{payload.task_id}]"
|
|
168
|
+
config = self.component.get_config("feedback_publishing", {})
|
|
169
|
+
|
|
170
|
+
if not config.get("enabled", False):
|
|
171
|
+
log.debug("%s Feedback publishing is disabled. Skipping.", log_id)
|
|
172
|
+
return
|
|
173
|
+
|
|
174
|
+
# Construct base payload
|
|
175
|
+
event_payload = {
|
|
176
|
+
"feedback": {
|
|
177
|
+
"task_id": payload.task_id,
|
|
178
|
+
"session_id": payload.session_id,
|
|
179
|
+
"feedback_type": payload.feedback_type,
|
|
180
|
+
"feedback_text": payload.feedback_text,
|
|
181
|
+
"user_id": user_id,
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
include_task_info = config.get("include_task_info", "none")
|
|
186
|
+
task_summary_data = None
|
|
187
|
+
|
|
188
|
+
if include_task_info == "summary":
|
|
189
|
+
log.debug("%s Including task summary.", log_id)
|
|
190
|
+
task_summary_data = self.task_repo.find_by_id(payload.task_id)
|
|
191
|
+
if task_summary_data:
|
|
192
|
+
event_payload["task_summary"] = task_summary_data.model_dump()
|
|
193
|
+
|
|
194
|
+
elif include_task_info == "stim":
|
|
195
|
+
log.debug("%s Including task stim data.", log_id)
|
|
196
|
+
task_with_events = self.task_repo.find_by_id_with_events(payload.task_id)
|
|
197
|
+
if task_with_events:
|
|
198
|
+
task, events = task_with_events
|
|
199
|
+
stim_data = create_stim_from_task_data(task, events)
|
|
200
|
+
event_payload["task_stim_data"] = stim_data
|
|
201
|
+
|
|
202
|
+
# Check payload size
|
|
203
|
+
max_size = config.get("max_payload_size_bytes", 9000000)
|
|
204
|
+
try:
|
|
205
|
+
payload_bytes = json.dumps(event_payload).encode("utf-8")
|
|
206
|
+
if len(payload_bytes) > max_size:
|
|
207
|
+
log.warning(
|
|
208
|
+
"%s Stim payload size (%d bytes) exceeds limit (%d bytes). Falling back to summary.",
|
|
209
|
+
log_id,
|
|
210
|
+
len(payload_bytes),
|
|
211
|
+
max_size,
|
|
212
|
+
)
|
|
213
|
+
# Fallback to summary
|
|
214
|
+
del event_payload["task_stim_data"]
|
|
215
|
+
task_summary_data = self.task_repo.find_by_id(payload.task_id)
|
|
216
|
+
if task_summary_data:
|
|
217
|
+
event_payload[
|
|
218
|
+
"task_summary"
|
|
219
|
+
] = task_summary_data.model_dump()
|
|
220
|
+
event_payload["truncation_details"] = {
|
|
221
|
+
"strategy": "fallback_to_summary",
|
|
222
|
+
"reason": "payload_too_large",
|
|
223
|
+
}
|
|
224
|
+
except Exception as e:
|
|
225
|
+
log.error("%s Error checking payload size: %s", log_id, e)
|
|
226
|
+
# If we can't check size, better to not send a potentially huge message
|
|
227
|
+
if "task_stim_data" in event_payload:
|
|
228
|
+
del event_payload["task_stim_data"]
|
|
229
|
+
|
|
230
|
+
# Publish the event
|
|
231
|
+
topic = config.get("topic", "sam/feedback/v1")
|
|
232
|
+
try:
|
|
233
|
+
log.info("%s Publishing feedback event to topic '%s'", log_id, topic)
|
|
234
|
+
self.component.publish_a2a(topic, event_payload)
|
|
235
|
+
except Exception as e:
|
|
236
|
+
log.error(
|
|
237
|
+
"%s Failed to publish feedback event to topic '%s': %s",
|
|
238
|
+
log_id,
|
|
239
|
+
topic,
|
|
240
|
+
e,
|
|
241
|
+
)
|
|
242
|
+
# Don't re-raise, this is a non-critical operation.
|
|
@@ -2,92 +2,12 @@
|
|
|
2
2
|
Service layer for handling people-related operations, such as searching for users.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
from typing import Any, Dict, List, Optional
|
|
6
7
|
|
|
7
|
-
from solace_ai_connector.common.log import log
|
|
8
|
-
|
|
9
|
-
from ....common.services.identity_service import BaseIdentityService
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class PeopleService:
|
|
13
|
-
"""
|
|
14
|
-
Provides methods for searching and retrieving user information,
|
|
15
|
-
acting as a layer on top of the configured IdentityService.
|
|
16
|
-
"""
|
|
17
|
-
|
|
18
|
-
def __init__(self, identity_service: Optional[BaseIdentityService]):
|
|
19
|
-
"""
|
|
20
|
-
Initializes the PeopleService.
|
|
21
|
-
|
|
22
|
-
Args:
|
|
23
|
-
identity_service: An instance of a configured BaseIdentityService, or None.
|
|
24
|
-
"""
|
|
25
|
-
self._identity_service = identity_service
|
|
26
|
-
self.log_identifier = "[PeopleService]"
|
|
27
|
-
log.info(
|
|
28
|
-
"%s Initialized with Identity Service: %s",
|
|
29
|
-
self.log_identifier,
|
|
30
|
-
identity_service is not None,
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
async def search_for_users(
|
|
34
|
-
self, query: str, limit: int = 10
|
|
35
|
-
) -> List[Dict[str, Any]]:
|
|
36
|
-
"""
|
|
37
|
-
Searches for users via the identity service.
|
|
38
|
-
|
|
39
|
-
Args:
|
|
40
|
-
query: The search query string.
|
|
41
|
-
limit: The maximum number of results to return.
|
|
42
|
-
|
|
43
|
-
Returns:
|
|
44
|
-
A list of user profile dictionaries.
|
|
45
|
-
"""
|
|
46
|
-
if not self._identity_service:
|
|
47
|
-
log.warning(
|
|
48
|
-
"%s Search requested but no identity service is configured.",
|
|
49
|
-
self.log_identifier,
|
|
50
|
-
)
|
|
51
|
-
return []
|
|
52
|
-
|
|
53
|
-
if not query or len(query) < 2:
|
|
54
|
-
return []
|
|
55
|
-
|
|
56
|
-
try:
|
|
57
|
-
log.debug(
|
|
58
|
-
"%s Searching for users with query: '%s', limit: %d",
|
|
59
|
-
self.log_identifier,
|
|
60
|
-
query,
|
|
61
|
-
limit,
|
|
62
|
-
)
|
|
63
|
-
results = await self._identity_service.search_users(query, limit)
|
|
64
|
-
log.info(
|
|
65
|
-
"%s Found %d users for query: '%s'",
|
|
66
|
-
self.log_identifier,
|
|
67
|
-
len(results),
|
|
68
|
-
query,
|
|
69
|
-
)
|
|
70
|
-
return results
|
|
71
|
-
except Exception as e:
|
|
72
|
-
log.exception(
|
|
73
|
-
"%s Error during user search for query '%s': %s",
|
|
74
|
-
self.log_identifier,
|
|
75
|
-
query,
|
|
76
|
-
e,
|
|
77
|
-
)
|
|
78
|
-
return []
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"""
|
|
82
|
-
Service layer for handling people-related operations, such as searching for users.
|
|
83
|
-
"""
|
|
84
|
-
|
|
85
|
-
from typing import Any, Dict, List, Optional
|
|
86
|
-
|
|
87
|
-
from solace_ai_connector.common.log import log
|
|
88
|
-
|
|
89
8
|
from ....common.services.identity_service import BaseIdentityService
|
|
90
9
|
|
|
10
|
+
log = logging.getLogger(__name__)
|
|
91
11
|
|
|
92
12
|
class PeopleService:
|
|
93
13
|
"""
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
# DEVELOPER GUIDE: services
|
|
2
2
|
|
|
3
3
|
## Quick Summary
|
|
4
|
-
The `services` directory contains the business logic layer for the HTTP SSE Gateway. It provides high-level services for agent management (discovering and retrieving A2A agents), user
|
|
4
|
+
The `services` directory contains the business logic layer for the HTTP SSE Gateway. It provides high-level services for agent management (discovering and retrieving A2A agents), user feedback processing with database persistence and event publishing, user search via identity services, session management with database persistence, task logging to database, data retention/cleanup, and A2A task operations like cancellation.
|
|
5
5
|
|
|
6
6
|
## Files Overview
|
|
7
7
|
- `__init__.py` - Package initialization file marking the directory as a Python package
|
|
8
|
-
- `
|
|
8
|
+
- `agent_card_service.py` - Service for retrieving information about discovered A2A agents from the registry
|
|
9
|
+
- `data_retention_service.py` - Service for automatic cleanup of old tasks and feedback based on retention policies
|
|
10
|
+
- `feedback_service.py` - Service for processing and storing user feedback on chat messages with database and event publishing
|
|
9
11
|
- `people_service.py` - Service for searching users via configured identity services
|
|
10
|
-
- `
|
|
12
|
+
- `session_service.py` - Service for managing chat sessions and messages with database persistence
|
|
13
|
+
- `task_logger_service.py` - Service for logging A2A tasks and events to the database
|
|
14
|
+
- `task_service.py` - Service for handling A2A task operations like cancellation
|
|
11
15
|
|
|
12
16
|
## Developer API Reference
|
|
13
17
|
|
|
@@ -15,36 +19,107 @@ The `services` directory contains the business logic layer for the HTTP SSE Gate
|
|
|
15
19
|
**Purpose:** Marks the services directory as a Python package
|
|
16
20
|
**Import:** N/A - No public interfaces
|
|
17
21
|
|
|
18
|
-
###
|
|
22
|
+
### agent_card_service.py
|
|
19
23
|
**Purpose:** Provides methods for accessing information about discovered A2A agents from the shared AgentRegistry
|
|
20
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.services.
|
|
24
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.services.agent_card_service import AgentCardService`
|
|
21
25
|
|
|
22
26
|
**Classes:**
|
|
23
|
-
- `
|
|
24
|
-
- `
|
|
25
|
-
- `
|
|
27
|
+
- `AgentCardService(agent_registry: AgentRegistry)` - Service for accessing discovered A2A agent information
|
|
28
|
+
- `get_all_agent_cards() -> List[AgentCard]` - Retrieves all currently discovered and registered agent cards
|
|
29
|
+
- `get_agent_card_by_name(agent_name: str) -> Optional[AgentCard]` - Retrieves a specific agent card by name, returns None if not found
|
|
26
30
|
|
|
27
31
|
**Usage Examples:**
|
|
28
32
|
```python
|
|
29
|
-
from solace_agent_mesh.gateway.http_sse.services.
|
|
33
|
+
from solace_agent_mesh.gateway.http_sse.services.agent_card_service import AgentCardService
|
|
30
34
|
from solace_agent_mesh.common.agent_registry import AgentRegistry
|
|
31
35
|
|
|
32
36
|
# Initialize with shared agent registry
|
|
33
37
|
agent_registry = AgentRegistry() # Usually injected as shared instance
|
|
34
|
-
agent_service =
|
|
38
|
+
agent_service = AgentCardService(agent_registry=agent_registry)
|
|
35
39
|
|
|
36
40
|
# Get all available agents
|
|
37
|
-
all_agents = agent_service.
|
|
41
|
+
all_agents = agent_service.get_all_agent_cards()
|
|
38
42
|
print(f"Found {len(all_agents)} agents")
|
|
39
43
|
|
|
40
44
|
# Get specific agent by name
|
|
41
|
-
agent = agent_service.
|
|
45
|
+
agent = agent_service.get_agent_card_by_name("data-processor")
|
|
42
46
|
if agent:
|
|
43
47
|
print(f"Found agent: {agent.name}")
|
|
44
48
|
else:
|
|
45
49
|
print("Agent not found")
|
|
46
50
|
```
|
|
47
51
|
|
|
52
|
+
### data_retention_service.py
|
|
53
|
+
**Purpose:** Service for automatically cleaning up old tasks, task events, and feedback based on configurable retention policies
|
|
54
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.services.data_retention_service import DataRetentionService`
|
|
55
|
+
|
|
56
|
+
**Classes:**
|
|
57
|
+
- `DataRetentionService(session_factory: Callable[[], DBSession] | None, config: Dict[str, Any])` - Service for automatic data cleanup based on retention policies
|
|
58
|
+
- `cleanup_old_data() -> None` - Main orchestration method for cleaning up old data, calls cleanup methods for tasks and feedback
|
|
59
|
+
|
|
60
|
+
**Constants/Variables:**
|
|
61
|
+
- `MIN_RETENTION_DAYS: int` - Minimum retention period (7 days)
|
|
62
|
+
- `MIN_CLEANUP_INTERVAL_HOURS: int` - Minimum cleanup interval (1 hour)
|
|
63
|
+
- `MIN_BATCH_SIZE: int` - Minimum batch size for deletion (1)
|
|
64
|
+
- `MAX_BATCH_SIZE: int` - Maximum batch size for deletion (10000)
|
|
65
|
+
|
|
66
|
+
**Usage Examples:**
|
|
67
|
+
```python
|
|
68
|
+
from solace_agent_mesh.gateway.http_sse.services.data_retention_service import DataRetentionService
|
|
69
|
+
from sqlalchemy.orm import sessionmaker
|
|
70
|
+
|
|
71
|
+
# Initialize with database session factory and config
|
|
72
|
+
session_factory = sessionmaker(bind=your_engine)
|
|
73
|
+
config = {
|
|
74
|
+
"enabled": True,
|
|
75
|
+
"task_retention_days": 90,
|
|
76
|
+
"feedback_retention_days": 90,
|
|
77
|
+
"cleanup_interval_hours": 24,
|
|
78
|
+
"batch_size": 1000
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
retention_service = DataRetentionService(
|
|
82
|
+
session_factory=session_factory,
|
|
83
|
+
config=config
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
# Run cleanup (typically called by scheduler)
|
|
87
|
+
retention_service.cleanup_old_data()
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### feedback_service.py
|
|
91
|
+
**Purpose:** Handles the business logic for processing and storing user feedback with database persistence and event publishing
|
|
92
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.services.feedback_service import FeedbackService`
|
|
93
|
+
|
|
94
|
+
**Classes:**
|
|
95
|
+
- `FeedbackService(session_factory: Callable[[], DBSession] | None, component: WebUIBackendComponent, task_repo: ITaskRepository)` - Service for processing user feedback with database persistence and event publishing
|
|
96
|
+
- `process_feedback(payload: FeedbackPayload, user_id: str) -> None` - Asynchronously processes and stores feedback, publishes events if configured
|
|
97
|
+
|
|
98
|
+
**Usage Examples:**
|
|
99
|
+
```python
|
|
100
|
+
import asyncio
|
|
101
|
+
from solace_agent_mesh.gateway.http_sse.services.feedback_service import FeedbackService
|
|
102
|
+
from sqlalchemy.orm import sessionmaker
|
|
103
|
+
|
|
104
|
+
# Initialize with database session factory
|
|
105
|
+
session_factory = sessionmaker(bind=your_engine)
|
|
106
|
+
component = YourWebUIBackendComponent() # Your component instance
|
|
107
|
+
task_repo = YourTaskRepository() # Your task repository
|
|
108
|
+
|
|
109
|
+
feedback_service = FeedbackService(
|
|
110
|
+
session_factory=session_factory,
|
|
111
|
+
component=component,
|
|
112
|
+
task_repo=task_repo
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
# Process feedback (requires FeedbackPayload from router)
|
|
116
|
+
async def process_user_feedback():
|
|
117
|
+
# payload would be a FeedbackPayload instance from the router
|
|
118
|
+
await feedback_service.process_feedback(payload, user_id="user123")
|
|
119
|
+
|
|
120
|
+
asyncio.run(process_user_feedback())
|
|
121
|
+
```
|
|
122
|
+
|
|
48
123
|
### people_service.py
|
|
49
124
|
**Purpose:** Provides user search functionality via configured identity services
|
|
50
125
|
**Import:** `from solace_agent_mesh.gateway.http_sse.services.people_service import PeopleService`
|
|
@@ -76,6 +151,95 @@ people_service_no_id = PeopleService(identity_service=None)
|
|
|
76
151
|
asyncio.run(search_users())
|
|
77
152
|
```
|
|
78
153
|
|
|
154
|
+
### session_service.py
|
|
155
|
+
**Purpose:** Manages chat sessions and messages with database persistence support
|
|
156
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.services.session_service import SessionService`
|
|
157
|
+
|
|
158
|
+
**Classes:**
|
|
159
|
+
- `SessionService(component: WebUIBackendComponent = None)` - Service for managing chat sessions and messages
|
|
160
|
+
- `is_persistence_enabled() -> bool` - Checks if the service is configured with a persistent backend
|
|
161
|
+
- `get_user_sessions(db: DbSession, user_id: UserId, pagination: PaginationParams | None = None) -> PaginatedResponse[Session]` - Retrieves paginated sessions for a user
|
|
162
|
+
- `get_session_details(db: DbSession, session_id: SessionId, user_id: UserId) -> Session | None` - Gets session details for a specific session
|
|
163
|
+
- `get_session_history(db: DbSession, session_id: SessionId, user_id: UserId, pagination: PaginationInfo | None = None) -> SessionHistory | None` - Gets session with messages
|
|
164
|
+
- `create_session(db: DbSession, user_id: UserId, name: str | None = None, agent_id: str | None = None, session_id: str | None = None) -> Optional[Session]` - Creates a new session
|
|
165
|
+
- `update_session_name(db: DbSession, session_id: SessionId, user_id: UserId, name: str) -> Session | None` - Updates session name
|
|
166
|
+
- `delete_session_with_notifications(db: DbSession, session_id: SessionId, user_id: UserId) -> bool` - Deletes session and notifies agents
|
|
167
|
+
- `add_message_to_session(db: DbSession, session_id: SessionId, user_id: UserId, message: str, sender_type: SenderType, sender_name: str, agent_id: str | None = None, message_type: MessageType = MessageType.TEXT) -> Message` - Adds a message to a session
|
|
168
|
+
|
|
169
|
+
**Usage Examples:**
|
|
170
|
+
```python
|
|
171
|
+
from solace_agent_mesh.gateway.http_sse.services.session_service import SessionService
|
|
172
|
+
from solace_agent_mesh.gateway.http_sse.shared.enums import SenderType, MessageType
|
|
173
|
+
from sqlalchemy.orm import Session as DbSession
|
|
174
|
+
|
|
175
|
+
# Initialize with component
|
|
176
|
+
component = YourWebUIBackendComponent() # Your component
|
|
177
|
+
session_service = SessionService(component=component)
|
|
178
|
+
|
|
179
|
+
# Use with database session
|
|
180
|
+
with your_session_factory() as db:
|
|
181
|
+
# Create a new session
|
|
182
|
+
session = session_service.create_session(
|
|
183
|
+
db=db,
|
|
184
|
+
user_id="user123",
|
|
185
|
+
name="My Chat Session",
|
|
186
|
+
agent_id="assistant-agent"
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
# Add a message to the session
|
|
190
|
+
message = session_service.add_message_to_session(
|
|
191
|
+
db=db,
|
|
192
|
+
session_id=session.id,
|
|
193
|
+
user_id="user123",
|
|
194
|
+
message="Hello, how can you help me?",
|
|
195
|
+
sender_type=SenderType.USER,
|
|
196
|
+
sender_name="John Doe"
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
# Get user's sessions with pagination
|
|
200
|
+
paginated_sessions = session_service.get_user_sessions(db, "user123")
|
|
201
|
+
|
|
202
|
+
db.commit()
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### task_logger_service.py
|
|
206
|
+
**Purpose:** Service for logging A2A tasks and events to the database with configurable filtering and sanitization
|
|
207
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.services.task_logger_service import TaskLoggerService`
|
|
208
|
+
|
|
209
|
+
**Classes:**
|
|
210
|
+
- `TaskLoggerService(session_factory: Callable[[], DBSession] | None, config: Dict[str, Any])` - Service for logging A2A tasks and events to database
|
|
211
|
+
- `log_event(event_data: Dict[str, Any]) -> None` - Parses a raw A2A message and logs it as a task event, creates or updates master task record
|
|
212
|
+
|
|
213
|
+
**Usage Examples:**
|
|
214
|
+
```python
|
|
215
|
+
from solace_agent_mesh.gateway.http_sse.services.task_logger_service import TaskLoggerService
|
|
216
|
+
from sqlalchemy.orm import sessionmaker
|
|
217
|
+
|
|
218
|
+
# Initialize with database session factory and config
|
|
219
|
+
session_factory = sessionmaker(bind=your_engine)
|
|
220
|
+
config = {
|
|
221
|
+
"enabled": True,
|
|
222
|
+
"log_status_updates": True,
|
|
223
|
+
"log_artifact_events": False,
|
|
224
|
+
"log_file_parts": True,
|
|
225
|
+
"max_file_part_size_bytes": 102400
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
task_logger = TaskLoggerService(
|
|
229
|
+
session_factory=session_factory,
|
|
230
|
+
config=config
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
# Log an A2A event
|
|
234
|
+
event_data = {
|
|
235
|
+
"topic": "sam/agents/my-agent/request",
|
|
236
|
+
"payload": {"id": "task-123", "method": "sendMessage"},
|
|
237
|
+
"user_properties": {"userId": "user@example.com"}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
task_logger.log_event(event_data)
|
|
241
|
+
```
|
|
242
|
+
|
|
79
243
|
### task_service.py
|
|
80
244
|
**Purpose:** Handles A2A task operations, specifically task cancellation using CoreA2AService and message publishing
|
|
81
245
|
**Import:** `from solace_agent_mesh.gateway.http_sse.services.task_service import TaskService, PublishFunc`
|
|
@@ -130,4 +294,4 @@ async def cancel_task_example():
|
|
|
130
294
|
asyncio.run(cancel_task_example())
|
|
131
295
|
```
|
|
132
296
|
|
|
133
|
-
# content_hash:
|
|
297
|
+
# content_hash: 12385f5117d2f5c30f0e44a0913ea91d62722aa82eb55268ae6bd317311ec5eb
|