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,61 +2,53 @@
|
|
|
2
2
|
API Router for submitting and managing tasks to agents.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import logging
|
|
6
6
|
from datetime import datetime
|
|
7
|
-
from
|
|
8
|
-
APIRouter,
|
|
9
|
-
Depends,
|
|
10
|
-
HTTPException,
|
|
11
|
-
Request as FastAPIRequest,
|
|
12
|
-
Response,
|
|
13
|
-
status,
|
|
14
|
-
)
|
|
15
|
-
from fastapi.exceptions import RequestValidationError
|
|
16
|
-
from typing import List, Optional, Union
|
|
17
|
-
|
|
18
|
-
from solace_ai_connector.common.log import log
|
|
19
|
-
|
|
20
|
-
from ....gateway.http_sse.session_manager import SessionManager
|
|
21
|
-
from ....gateway.http_sse.services.task_service import TaskService
|
|
22
|
-
from ....gateway.http_sse.services.session_service import SessionService
|
|
23
|
-
from ....gateway.http_sse.repository.interfaces import ITaskRepository
|
|
24
|
-
from ....gateway.http_sse.repository.entities import Task
|
|
25
|
-
from ....gateway.http_sse.shared.types import PaginationParams, UserId
|
|
26
|
-
from ..utils.stim_utils import create_stim_from_task_data
|
|
7
|
+
from typing import TYPE_CHECKING
|
|
27
8
|
|
|
9
|
+
import yaml
|
|
28
10
|
from a2a.types import (
|
|
29
11
|
CancelTaskRequest,
|
|
30
12
|
SendMessageRequest,
|
|
31
|
-
SendStreamingMessageRequest,
|
|
32
13
|
SendMessageSuccessResponse,
|
|
14
|
+
SendStreamingMessageRequest,
|
|
33
15
|
SendStreamingMessageSuccessResponse,
|
|
34
16
|
)
|
|
35
|
-
from
|
|
17
|
+
from fastapi import APIRouter, Depends, HTTPException, Response, status
|
|
18
|
+
from fastapi import Request as FastAPIRequest
|
|
19
|
+
from sqlalchemy.orm import Session as DBSession
|
|
36
20
|
|
|
21
|
+
from ....common import a2a
|
|
37
22
|
from ....gateway.http_sse.dependencies import (
|
|
38
|
-
|
|
23
|
+
get_db,
|
|
39
24
|
get_sac_component,
|
|
40
|
-
get_task_service,
|
|
41
25
|
get_session_business_service,
|
|
26
|
+
get_session_manager,
|
|
42
27
|
get_task_repository,
|
|
43
|
-
|
|
28
|
+
get_task_service,
|
|
44
29
|
get_user_config,
|
|
45
|
-
|
|
30
|
+
get_user_id,
|
|
46
31
|
)
|
|
32
|
+
from ....gateway.http_sse.repository.entities import Task
|
|
33
|
+
from ....gateway.http_sse.repository.interfaces import ITaskRepository
|
|
47
34
|
from ....gateway.http_sse.services.session_service import SessionService
|
|
48
|
-
|
|
49
|
-
from
|
|
35
|
+
from ....gateway.http_sse.services.task_service import TaskService
|
|
36
|
+
from ....gateway.http_sse.session_manager import SessionManager
|
|
37
|
+
from ....gateway.http_sse.shared.pagination import PaginationParams
|
|
38
|
+
from ....gateway.http_sse.shared.types import UserId
|
|
39
|
+
from ..utils.stim_utils import create_stim_from_task_data
|
|
50
40
|
|
|
51
41
|
if TYPE_CHECKING:
|
|
52
42
|
from ....gateway.http_sse.component import WebUIBackendComponent
|
|
53
43
|
|
|
54
44
|
router = APIRouter()
|
|
55
45
|
|
|
46
|
+
log = logging.getLogger(__name__)
|
|
47
|
+
|
|
56
48
|
|
|
57
49
|
async def _submit_task(
|
|
58
50
|
request: FastAPIRequest,
|
|
59
|
-
payload:
|
|
51
|
+
payload: SendMessageRequest | SendStreamingMessageRequest,
|
|
60
52
|
session_manager: SessionManager,
|
|
61
53
|
component: "WebUIBackendComponent",
|
|
62
54
|
is_streaming: bool,
|
|
@@ -202,25 +194,25 @@ async def _submit_task(
|
|
|
202
194
|
)
|
|
203
195
|
|
|
204
196
|
|
|
205
|
-
@router.get("/tasks", response_model=
|
|
197
|
+
@router.get("/tasks", response_model=list[Task], tags=["Tasks"])
|
|
206
198
|
async def search_tasks(
|
|
207
199
|
request: FastAPIRequest,
|
|
208
|
-
start_date:
|
|
209
|
-
end_date:
|
|
210
|
-
search: Optional[str] = None,
|
|
200
|
+
start_date: str | None = None,
|
|
201
|
+
end_date: str | None = None,
|
|
211
202
|
page: int = 1,
|
|
212
203
|
page_size: int = 20,
|
|
213
|
-
query_user_id:
|
|
204
|
+
query_user_id: str | None = None,
|
|
205
|
+
db: DBSession = Depends(get_db),
|
|
214
206
|
user_id: UserId = Depends(get_user_id),
|
|
215
207
|
user_config: dict = Depends(get_user_config),
|
|
216
208
|
repo: ITaskRepository = Depends(get_task_repository),
|
|
217
209
|
):
|
|
218
210
|
"""
|
|
219
|
-
Lists and
|
|
220
|
-
- Regular users can only
|
|
221
|
-
- Users with the 'tasks:read:all' scope can
|
|
211
|
+
Lists and filters historical tasks by date.
|
|
212
|
+
- Regular users can only view their own tasks.
|
|
213
|
+
- Users with the 'tasks:read:all' scope can view any user's tasks by providing `query_user_id`.
|
|
222
214
|
"""
|
|
223
|
-
log_prefix =
|
|
215
|
+
log_prefix = "[GET /api/v1/tasks] "
|
|
224
216
|
log.info("%sRequest from user %s", log_prefix, user_id)
|
|
225
217
|
|
|
226
218
|
target_user_id = user_id
|
|
@@ -264,14 +256,14 @@ async def search_tasks(
|
|
|
264
256
|
detail="Invalid end_date format. Use ISO 8601 format.",
|
|
265
257
|
)
|
|
266
258
|
|
|
267
|
-
pagination = PaginationParams(
|
|
259
|
+
pagination = PaginationParams(page_number=page, page_size=page_size)
|
|
268
260
|
|
|
269
261
|
try:
|
|
270
262
|
tasks = repo.search(
|
|
263
|
+
db,
|
|
271
264
|
user_id=target_user_id,
|
|
272
265
|
start_date=start_time_ms,
|
|
273
266
|
end_date=end_time_ms,
|
|
274
|
-
search_query=search,
|
|
275
267
|
pagination=pagination,
|
|
276
268
|
)
|
|
277
269
|
return tasks
|
|
@@ -287,6 +279,7 @@ async def search_tasks(
|
|
|
287
279
|
async def get_task_as_stim_file(
|
|
288
280
|
task_id: str,
|
|
289
281
|
request: FastAPIRequest,
|
|
282
|
+
db: DBSession = Depends(get_db),
|
|
290
283
|
user_id: UserId = Depends(get_user_id),
|
|
291
284
|
user_config: dict = Depends(get_user_config),
|
|
292
285
|
repo: ITaskRepository = Depends(get_task_repository),
|
|
@@ -298,7 +291,7 @@ async def get_task_as_stim_file(
|
|
|
298
291
|
log.info("%sRequest from user %s", log_prefix, user_id)
|
|
299
292
|
|
|
300
293
|
try:
|
|
301
|
-
result = repo.find_by_id_with_events(task_id)
|
|
294
|
+
result = repo.find_by_id_with_events(db, task_id)
|
|
302
295
|
if not result:
|
|
303
296
|
raise HTTPException(
|
|
304
297
|
status_code=status.HTTP_404_NOT_FOUND,
|
|
@@ -3,13 +3,15 @@ Router for user-related endpoints.
|
|
|
3
3
|
Maintains backward compatibility with original API format.
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
|
+
import logging
|
|
6
7
|
from typing import Any
|
|
7
8
|
|
|
8
9
|
from fastapi import APIRouter, Depends
|
|
9
|
-
from solace_ai_connector.common.log import log
|
|
10
10
|
|
|
11
11
|
from ..shared.auth_utils import get_current_user
|
|
12
12
|
|
|
13
|
+
log = logging.getLogger(__name__)
|
|
14
|
+
|
|
13
15
|
router = APIRouter()
|
|
14
16
|
|
|
15
17
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
API Router for managing A2A message visualization streams.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
import asyncio
|
|
6
7
|
import uuid
|
|
7
8
|
from fastapi import (
|
|
@@ -15,7 +16,6 @@ from fastapi import (
|
|
|
15
16
|
from pydantic import BaseModel, Field
|
|
16
17
|
from typing import List, Optional, Dict, Any, Set
|
|
17
18
|
|
|
18
|
-
from solace_ai_connector.common.log import log
|
|
19
19
|
|
|
20
20
|
from ....gateway.http_sse.dependencies import (
|
|
21
21
|
get_sac_component,
|
|
@@ -30,6 +30,7 @@ from typing import TYPE_CHECKING
|
|
|
30
30
|
if TYPE_CHECKING:
|
|
31
31
|
from ....gateway.http_sse.component import WebUIBackendComponent
|
|
32
32
|
|
|
33
|
+
log = logging.getLogger(__name__)
|
|
33
34
|
|
|
34
35
|
router = APIRouter()
|
|
35
36
|
|
|
@@ -133,26 +134,32 @@ from sse_starlette.sse import EventSourceResponse
|
|
|
133
134
|
|
|
134
135
|
def _generate_sse_url(fastapi_request: FastAPIRequest, stream_id: str) -> str:
|
|
135
136
|
"""
|
|
136
|
-
Generate SSE endpoint URL with proper scheme detection for reverse proxy scenarios.
|
|
137
|
+
Generate SSE endpoint URL with proper scheme and host detection for reverse proxy scenarios.
|
|
137
138
|
|
|
138
139
|
Args:
|
|
139
140
|
fastapi_request: The FastAPI request object
|
|
140
141
|
stream_id: The stream ID for the SSE endpoint
|
|
141
142
|
|
|
142
143
|
Returns:
|
|
143
|
-
Complete SSE URL with correct scheme (http/https)
|
|
144
|
+
Complete SSE URL with correct scheme (http/https) and host.
|
|
144
145
|
"""
|
|
146
|
+
base_url = fastapi_request.url_for(
|
|
147
|
+
"get_visualization_stream_events", stream_id=stream_id
|
|
148
|
+
)
|
|
149
|
+
|
|
145
150
|
forwarded_proto = fastapi_request.headers.get("x-forwarded-proto")
|
|
146
|
-
|
|
147
|
-
|
|
151
|
+
forwarded_host = fastapi_request.headers.get("x-forwarded-host")
|
|
152
|
+
|
|
153
|
+
if forwarded_proto and forwarded_host:
|
|
154
|
+
# In a reverse proxy environment like GitHub Codespaces, reconstruct the URL
|
|
155
|
+
# using the forwarded headers to ensure it's publicly accessible.
|
|
156
|
+
return str(base_url.replace(scheme=forwarded_proto, netloc=forwarded_host))
|
|
157
|
+
elif forwarded_proto:
|
|
158
|
+
# Handle cases with only a forwarded protocol (standard reverse proxy)
|
|
159
|
+
return str(base_url.replace(scheme=forwarded_proto))
|
|
148
160
|
else:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
return str(
|
|
152
|
-
fastapi_request.url_for(
|
|
153
|
-
"get_visualization_stream_events", stream_id=stream_id
|
|
154
|
-
).replace(scheme=scheme)
|
|
155
|
-
)
|
|
161
|
+
# Default behavior when not behind a reverse proxy
|
|
162
|
+
return str(base_url)
|
|
156
163
|
|
|
157
164
|
|
|
158
165
|
def _translate_target_to_solace_topics(
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
Service for managing automatic cleanup of old data based on retention policies.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
import time
|
|
6
7
|
from typing import Any, Callable, Dict
|
|
7
8
|
|
|
8
|
-
from solace_ai_connector.common.log import log
|
|
9
9
|
from sqlalchemy.orm import Session as DBSession
|
|
10
10
|
|
|
11
11
|
from ..repository.feedback_repository import FeedbackRepository
|
|
12
12
|
from ..repository.task_repository import TaskRepository
|
|
13
13
|
from ..shared import now_epoch_ms
|
|
14
14
|
|
|
15
|
+
log = logging.getLogger(__name__)
|
|
15
16
|
|
|
16
17
|
class DataRetentionService:
|
|
17
18
|
"""
|
|
@@ -187,8 +188,8 @@ class DataRetentionService:
|
|
|
187
188
|
|
|
188
189
|
db = self.session_factory()
|
|
189
190
|
try:
|
|
190
|
-
repo = TaskRepository(
|
|
191
|
-
total_deleted = repo.delete_tasks_older_than(cutoff_time_ms, batch_size)
|
|
191
|
+
repo = TaskRepository()
|
|
192
|
+
total_deleted = repo.delete_tasks_older_than(db, cutoff_time_ms, batch_size)
|
|
192
193
|
|
|
193
194
|
if total_deleted == 0:
|
|
194
195
|
log.info(
|
|
@@ -240,8 +241,8 @@ class DataRetentionService:
|
|
|
240
241
|
|
|
241
242
|
db = self.session_factory()
|
|
242
243
|
try:
|
|
243
|
-
repo = FeedbackRepository(
|
|
244
|
-
total_deleted = repo.delete_feedback_older_than(cutoff_time_ms, batch_size)
|
|
244
|
+
repo = FeedbackRepository()
|
|
245
|
+
total_deleted = repo.delete_feedback_older_than(db, cutoff_time_ms, batch_size)
|
|
245
246
|
|
|
246
247
|
if total_deleted == 0:
|
|
247
248
|
log.info(
|
|
@@ -3,10 +3,10 @@ Service layer for handling user feedback on chat messages.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
import json
|
|
6
|
+
import logging
|
|
6
7
|
import uuid
|
|
7
8
|
from typing import TYPE_CHECKING, Callable
|
|
8
9
|
|
|
9
|
-
from solace_ai_connector.common.log import log
|
|
10
10
|
from sqlalchemy.orm import Session as DBSession
|
|
11
11
|
|
|
12
12
|
from ..repository.entities import Feedback
|
|
@@ -21,6 +21,7 @@ if TYPE_CHECKING:
|
|
|
21
21
|
from ..component import WebUIBackendComponent
|
|
22
22
|
from ..repository.interfaces import ITaskRepository
|
|
23
23
|
|
|
24
|
+
log = logging.getLogger(__name__)
|
|
24
25
|
|
|
25
26
|
class FeedbackService:
|
|
26
27
|
"""Handles the business logic for processing user feedback."""
|
|
@@ -70,8 +71,8 @@ class FeedbackService:
|
|
|
70
71
|
|
|
71
72
|
db = self.session_factory()
|
|
72
73
|
try:
|
|
73
|
-
repo = FeedbackRepository(
|
|
74
|
-
repo.save(feedback_entity)
|
|
74
|
+
repo = FeedbackRepository()
|
|
75
|
+
repo.save(db, feedback_entity)
|
|
75
76
|
db.commit()
|
|
76
77
|
log.info(
|
|
77
78
|
"Feedback from user '%s' for task '%s' saved to database.",
|
|
@@ -130,14 +131,14 @@ class FeedbackService:
|
|
|
130
131
|
db = self.session_factory()
|
|
131
132
|
try:
|
|
132
133
|
from ..repository.chat_task_repository import ChatTaskRepository
|
|
133
|
-
|
|
134
|
-
task_repo = ChatTaskRepository(
|
|
135
|
-
task = task_repo.find_by_id(task_id, user_id)
|
|
136
|
-
|
|
134
|
+
|
|
135
|
+
task_repo = ChatTaskRepository()
|
|
136
|
+
task = task_repo.find_by_id(db, task_id, user_id)
|
|
137
|
+
|
|
137
138
|
if task:
|
|
138
139
|
# Update feedback in task metadata
|
|
139
140
|
task.add_feedback(feedback_type, feedback_text)
|
|
140
|
-
task_repo.save(task)
|
|
141
|
+
task_repo.save(db, task)
|
|
141
142
|
db.commit()
|
|
142
143
|
log.info(
|
|
143
144
|
"Updated task metadata with feedback for task '%s' by user '%s'",
|
|
@@ -186,45 +187,53 @@ class FeedbackService:
|
|
|
186
187
|
|
|
187
188
|
if include_task_info == "summary":
|
|
188
189
|
log.debug("%s Including task summary.", log_id)
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
db = self.session_factory()
|
|
191
|
+
try:
|
|
192
|
+
task_summary_data = self.task_repo.find_by_id(db, payload.task_id)
|
|
193
|
+
if task_summary_data:
|
|
194
|
+
event_payload["task_summary"] = task_summary_data.model_dump()
|
|
195
|
+
finally:
|
|
196
|
+
db.close()
|
|
192
197
|
|
|
193
198
|
elif include_task_info == "stim":
|
|
194
199
|
log.debug("%s Including task stim data.", log_id)
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
"
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
200
|
+
db = self.session_factory()
|
|
201
|
+
try:
|
|
202
|
+
task_with_events = self.task_repo.find_by_id_with_events(db, payload.task_id)
|
|
203
|
+
if task_with_events:
|
|
204
|
+
task, events = task_with_events
|
|
205
|
+
stim_data = create_stim_from_task_data(task, events)
|
|
206
|
+
event_payload["task_stim_data"] = stim_data
|
|
207
|
+
|
|
208
|
+
# Check payload size
|
|
209
|
+
max_size = config.get("max_payload_size_bytes", 9000000)
|
|
210
|
+
try:
|
|
211
|
+
payload_bytes = json.dumps(event_payload).encode("utf-8")
|
|
212
|
+
if len(payload_bytes) > max_size:
|
|
213
|
+
log.warning(
|
|
214
|
+
"%s Stim payload size (%d bytes) exceeds limit (%d bytes). Falling back to summary.",
|
|
215
|
+
log_id,
|
|
216
|
+
len(payload_bytes),
|
|
217
|
+
max_size,
|
|
218
|
+
)
|
|
219
|
+
# Fallback to summary
|
|
220
|
+
del event_payload["task_stim_data"]
|
|
221
|
+
task_summary_data = self.task_repo.find_by_id(db, payload.task_id)
|
|
222
|
+
if task_summary_data:
|
|
223
|
+
event_payload[
|
|
224
|
+
"task_summary"
|
|
225
|
+
] = task_summary_data.model_dump()
|
|
226
|
+
event_payload["truncation_details"] = {
|
|
227
|
+
"strategy": "fallback_to_summary",
|
|
228
|
+
"reason": "payload_too_large",
|
|
229
|
+
}
|
|
230
|
+
except Exception as e:
|
|
231
|
+
log.error("%s Error checking payload size: %s", log_id, e)
|
|
232
|
+
# If we can't check size, better to not send a potentially huge message
|
|
233
|
+
if "task_stim_data" in event_payload:
|
|
234
|
+
del event_payload["task_stim_data"]
|
|
235
|
+
finally:
|
|
236
|
+
db.close()
|
|
228
237
|
|
|
229
238
|
# Publish the event
|
|
230
239
|
topic = config.get("topic", "sam/feedback/v1")
|
|
@@ -2,12 +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
8
|
from ....common.services.identity_service import BaseIdentityService
|
|
10
9
|
|
|
10
|
+
log = logging.getLogger(__name__)
|
|
11
11
|
|
|
12
12
|
class PeopleService:
|
|
13
13
|
"""
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
import uuid
|
|
2
3
|
from typing import TYPE_CHECKING, Optional, List, Dict, Any
|
|
3
4
|
|
|
4
|
-
from solace_ai_connector.common.log import log
|
|
5
5
|
from sqlalchemy.orm import Session as DbSession
|
|
6
6
|
|
|
7
7
|
from ..repository import (
|
|
@@ -15,6 +15,8 @@ from ..shared.types import SessionId, UserId
|
|
|
15
15
|
from ..shared import now_epoch_ms
|
|
16
16
|
from ..shared.pagination import PaginationParams, PaginatedResponse, get_pagination_or_default
|
|
17
17
|
|
|
18
|
+
log = logging.getLogger(__name__)
|
|
19
|
+
|
|
18
20
|
if TYPE_CHECKING:
|
|
19
21
|
from ..component import WebUIBackendComponent
|
|
20
22
|
|
|
@@ -29,7 +31,7 @@ class SessionService:
|
|
|
29
31
|
def _get_repositories(self, db: DbSession):
|
|
30
32
|
"""Create session repository for the given database session."""
|
|
31
33
|
from ..repository import SessionRepository
|
|
32
|
-
session_repository = SessionRepository(
|
|
34
|
+
session_repository = SessionRepository()
|
|
33
35
|
return session_repository
|
|
34
36
|
|
|
35
37
|
def is_persistence_enabled(self) -> bool:
|
|
@@ -55,8 +57,8 @@ class SessionService:
|
|
|
55
57
|
session_repository = self._get_repositories(db)
|
|
56
58
|
|
|
57
59
|
# Pass pagination params directly - repository will handle offset calculation
|
|
58
|
-
sessions = session_repository.find_by_user(user_id, pagination)
|
|
59
|
-
total_count = session_repository.count_by_user(user_id)
|
|
60
|
+
sessions = session_repository.find_by_user(db, user_id, pagination)
|
|
61
|
+
total_count = session_repository.count_by_user(db, user_id)
|
|
60
62
|
|
|
61
63
|
return PaginatedResponse.create(sessions, total_count, pagination)
|
|
62
64
|
|
|
@@ -67,7 +69,7 @@ class SessionService:
|
|
|
67
69
|
return None
|
|
68
70
|
|
|
69
71
|
session_repository = self._get_repositories(db)
|
|
70
|
-
return session_repository.find_user_session(session_id, user_id)
|
|
72
|
+
return session_repository.find_user_session(db, session_id, user_id)
|
|
71
73
|
|
|
72
74
|
def create_session(
|
|
73
75
|
self,
|
|
@@ -98,7 +100,7 @@ class SessionService:
|
|
|
98
100
|
)
|
|
99
101
|
|
|
100
102
|
session_repository = self._get_repositories(db)
|
|
101
|
-
created_session = session_repository.save(session)
|
|
103
|
+
created_session = session_repository.save(db, session)
|
|
102
104
|
log.info("Created new session %s for user %s", created_session.id, user_id)
|
|
103
105
|
|
|
104
106
|
if not created_session:
|
|
@@ -119,12 +121,12 @@ class SessionService:
|
|
|
119
121
|
raise ValueError("Session name cannot exceed 255 characters")
|
|
120
122
|
|
|
121
123
|
session_repository = self._get_repositories(db)
|
|
122
|
-
session = session_repository.find_user_session(session_id, user_id)
|
|
124
|
+
session = session_repository.find_user_session(db, session_id, user_id)
|
|
123
125
|
if not session:
|
|
124
126
|
return None
|
|
125
127
|
|
|
126
128
|
session.update_name(name)
|
|
127
|
-
updated_session = session_repository.save(session)
|
|
129
|
+
updated_session = session_repository.save(db, session)
|
|
128
130
|
|
|
129
131
|
log.info("Updated session %s name to '%s'", session_id, name)
|
|
130
132
|
return updated_session
|
|
@@ -136,7 +138,7 @@ class SessionService:
|
|
|
136
138
|
raise ValueError("Invalid session ID")
|
|
137
139
|
|
|
138
140
|
session_repository = self._get_repositories(db)
|
|
139
|
-
session = session_repository.find_user_session(session_id, user_id)
|
|
141
|
+
session = session_repository.find_user_session(db, session_id, user_id)
|
|
140
142
|
if not session:
|
|
141
143
|
log.warning(
|
|
142
144
|
"Attempted to delete non-existent session %s by user %s",
|
|
@@ -153,7 +155,7 @@ class SessionService:
|
|
|
153
155
|
)
|
|
154
156
|
return False
|
|
155
157
|
|
|
156
|
-
deleted = session_repository.delete(session_id, user_id)
|
|
158
|
+
deleted = session_repository.delete(db, session_id, user_id)
|
|
157
159
|
if not deleted:
|
|
158
160
|
return False
|
|
159
161
|
|
|
@@ -194,10 +196,10 @@ class SessionService:
|
|
|
194
196
|
"""
|
|
195
197
|
# Validate session exists and belongs to user
|
|
196
198
|
session_repository = self._get_repositories(db)
|
|
197
|
-
session = session_repository.find_user_session(session_id, user_id)
|
|
199
|
+
session = session_repository.find_user_session(db, session_id, user_id)
|
|
198
200
|
if not session:
|
|
199
201
|
raise ValueError(f"Session {session_id} not found for user {user_id}")
|
|
200
|
-
|
|
202
|
+
|
|
201
203
|
# Create task entity - pass strings directly
|
|
202
204
|
task = ChatTask(
|
|
203
205
|
id=task_id,
|
|
@@ -209,14 +211,14 @@ class SessionService:
|
|
|
209
211
|
created_time=now_epoch_ms(),
|
|
210
212
|
updated_time=None
|
|
211
213
|
)
|
|
212
|
-
|
|
214
|
+
|
|
213
215
|
# Save via repository
|
|
214
|
-
task_repo = ChatTaskRepository(
|
|
215
|
-
saved_task = task_repo.save(task)
|
|
216
|
-
|
|
216
|
+
task_repo = ChatTaskRepository()
|
|
217
|
+
saved_task = task_repo.save(db, task)
|
|
218
|
+
|
|
217
219
|
# Update session activity
|
|
218
220
|
session.mark_activity()
|
|
219
|
-
session_repository.save(session)
|
|
221
|
+
session_repository.save(db, session)
|
|
220
222
|
|
|
221
223
|
log.info(f"Saved task {task_id} for session {session_id}")
|
|
222
224
|
return saved_task
|
|
@@ -243,13 +245,13 @@ class SessionService:
|
|
|
243
245
|
"""
|
|
244
246
|
# Validate session exists and belongs to user
|
|
245
247
|
session_repository = self._get_repositories(db)
|
|
246
|
-
session = session_repository.find_user_session(session_id, user_id)
|
|
248
|
+
session = session_repository.find_user_session(db, session_id, user_id)
|
|
247
249
|
if not session:
|
|
248
250
|
raise ValueError(f"Session {session_id} not found for user {user_id}")
|
|
249
|
-
|
|
251
|
+
|
|
250
252
|
# Load tasks
|
|
251
|
-
task_repo = ChatTaskRepository(
|
|
252
|
-
return task_repo.find_by_session(session_id, user_id)
|
|
253
|
+
task_repo = ChatTaskRepository()
|
|
254
|
+
return task_repo.find_by_session(db, session_id, user_id)
|
|
253
255
|
|
|
254
256
|
def get_session_messages_from_tasks(
|
|
255
257
|
self,
|
|
@@ -3,6 +3,7 @@ Service for logging A2A tasks and events to the database.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
import copy
|
|
6
|
+
import logging
|
|
6
7
|
import uuid
|
|
7
8
|
from typing import Any, Callable, Dict, Union
|
|
8
9
|
|
|
@@ -14,7 +15,6 @@ from a2a.types import (
|
|
|
14
15
|
TaskArtifactUpdateEvent,
|
|
15
16
|
TaskStatusUpdateEvent,
|
|
16
17
|
)
|
|
17
|
-
from solace_ai_connector.common.log import log
|
|
18
18
|
from sqlalchemy.orm import Session as DBSession
|
|
19
19
|
|
|
20
20
|
from ....common import a2a
|
|
@@ -22,6 +22,7 @@ from ..repository.entities import Task, TaskEvent
|
|
|
22
22
|
from ..repository.task_repository import TaskRepository
|
|
23
23
|
from ..shared import now_epoch_ms
|
|
24
24
|
|
|
25
|
+
log = logging.getLogger(__name__)
|
|
25
26
|
|
|
26
27
|
class TaskLoggerService:
|
|
27
28
|
"""Service for logging A2A tasks and events to the database."""
|
|
@@ -70,7 +71,7 @@ class TaskLoggerService:
|
|
|
70
71
|
|
|
71
72
|
db = self.session_factory()
|
|
72
73
|
try:
|
|
73
|
-
repo = TaskRepository(
|
|
74
|
+
repo = TaskRepository()
|
|
74
75
|
|
|
75
76
|
# Infer details from the parsed event
|
|
76
77
|
direction, task_id, user_id = self._infer_event_details(
|
|
@@ -94,7 +95,7 @@ class TaskLoggerService:
|
|
|
94
95
|
sanitized_payload = self._sanitize_payload(payload)
|
|
95
96
|
|
|
96
97
|
# Check for existing task or create a new one
|
|
97
|
-
task = repo.find_by_id(task_id)
|
|
98
|
+
task = repo.find_by_id(db, task_id)
|
|
98
99
|
if not task:
|
|
99
100
|
if direction == "request":
|
|
100
101
|
initial_text = self._extract_initial_text(parsed_event)
|
|
@@ -106,7 +107,7 @@ class TaskLoggerService:
|
|
|
106
107
|
initial_text[:1024] if initial_text else None
|
|
107
108
|
), # Truncate
|
|
108
109
|
)
|
|
109
|
-
repo.save_task(new_task)
|
|
110
|
+
repo.save_task(db, new_task)
|
|
110
111
|
log.info(
|
|
111
112
|
f"{self.log_identifier} Created new task record for ID: {task_id}"
|
|
112
113
|
)
|
|
@@ -119,7 +120,7 @@ class TaskLoggerService:
|
|
|
119
120
|
start_time=now_epoch_ms(),
|
|
120
121
|
initial_request_text="[Task started before logger was active]",
|
|
121
122
|
)
|
|
122
|
-
repo.save_task(placeholder_task)
|
|
123
|
+
repo.save_task(db, placeholder_task)
|
|
123
124
|
log.info(
|
|
124
125
|
f"{self.log_identifier} Created placeholder task record for ID: {task_id}"
|
|
125
126
|
)
|
|
@@ -134,12 +135,12 @@ class TaskLoggerService:
|
|
|
134
135
|
direction=direction,
|
|
135
136
|
payload=sanitized_payload,
|
|
136
137
|
)
|
|
137
|
-
repo.save_event(task_event)
|
|
138
|
+
repo.save_event(db, task_event)
|
|
138
139
|
|
|
139
140
|
# If it's a final event, update the master task record
|
|
140
141
|
final_status = self._get_final_status(parsed_event)
|
|
141
142
|
if final_status:
|
|
142
|
-
task_to_update = repo.find_by_id(task_id)
|
|
143
|
+
task_to_update = repo.find_by_id(db, task_id)
|
|
143
144
|
if task_to_update:
|
|
144
145
|
task_to_update.end_time = now_epoch_ms()
|
|
145
146
|
task_to_update.status = final_status
|
|
@@ -158,8 +159,8 @@ class TaskLoggerService:
|
|
|
158
159
|
f"output={token_usage.get('total_output_tokens')}, "
|
|
159
160
|
f"cached={token_usage.get('total_cached_input_tokens')}"
|
|
160
161
|
)
|
|
161
|
-
|
|
162
|
-
repo.save_task(task_to_update)
|
|
162
|
+
|
|
163
|
+
repo.save_task(db, task_to_update)
|
|
163
164
|
log.info(
|
|
164
165
|
f"{self.log_identifier} Finalized task record for ID: {task_id} with status: {final_status}"
|
|
165
166
|
)
|