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,6 +2,7 @@
|
|
|
2
2
|
FastAPI router for managing session-specific artifacts via REST endpoints.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
from collections.abc import Callable
|
|
6
7
|
from typing import TYPE_CHECKING, Any
|
|
7
8
|
|
|
@@ -32,8 +33,6 @@ import json
|
|
|
32
33
|
from datetime import datetime, timezone
|
|
33
34
|
from urllib.parse import parse_qs, quote, urlparse
|
|
34
35
|
|
|
35
|
-
from solace_ai_connector.common.log import log
|
|
36
|
-
|
|
37
36
|
from ....common.a2a.types import ArtifactInfo
|
|
38
37
|
from ....common.utils.embeds import (
|
|
39
38
|
LATE_EMBED_TYPES,
|
|
@@ -46,31 +45,32 @@ from ..dependencies import (
|
|
|
46
45
|
get_sac_component,
|
|
47
46
|
get_session_validator,
|
|
48
47
|
get_shared_artifact_service,
|
|
49
|
-
get_user_config,
|
|
50
48
|
get_user_id,
|
|
51
49
|
get_session_manager,
|
|
52
50
|
get_session_business_service_optional,
|
|
53
51
|
get_db_optional,
|
|
54
52
|
)
|
|
55
53
|
|
|
56
|
-
if TYPE_CHECKING:
|
|
57
|
-
from ....gateway.http_sse.component import WebUIBackendComponent
|
|
58
54
|
|
|
59
55
|
from ..session_manager import SessionManager
|
|
60
56
|
from ..services.session_service import SessionService
|
|
61
57
|
from sqlalchemy.orm import Session
|
|
62
58
|
|
|
63
59
|
from ....agent.utils.artifact_helpers import (
|
|
64
|
-
DEFAULT_SCHEMA_MAX_KEYS,
|
|
65
|
-
format_artifact_uri,
|
|
66
60
|
get_artifact_info_list,
|
|
67
61
|
load_artifact_content_or_metadata,
|
|
68
|
-
|
|
62
|
+
process_artifact_upload,
|
|
69
63
|
)
|
|
70
64
|
|
|
65
|
+
if TYPE_CHECKING:
|
|
66
|
+
from ....gateway.http_sse.component import WebUIBackendComponent
|
|
67
|
+
|
|
68
|
+
log = logging.getLogger(__name__)
|
|
69
|
+
|
|
71
70
|
|
|
72
71
|
class ArtifactUploadResponse(BaseModel):
|
|
73
72
|
"""Response model for artifact upload with camelCase fields."""
|
|
73
|
+
|
|
74
74
|
uri: str
|
|
75
75
|
session_id: str = Field(..., alias="sessionId")
|
|
76
76
|
filename: str
|
|
@@ -95,7 +95,11 @@ router = APIRouter()
|
|
|
95
95
|
async def upload_artifact_with_session(
|
|
96
96
|
request: FastAPIRequest,
|
|
97
97
|
upload_file: UploadFile = File(..., description="The file content to upload"),
|
|
98
|
-
sessionId: str | None = Form(
|
|
98
|
+
sessionId: str | None = Form(
|
|
99
|
+
None,
|
|
100
|
+
description="Session ID (null/empty to create new session)",
|
|
101
|
+
alias="sessionId",
|
|
102
|
+
),
|
|
99
103
|
filename: str = Form(..., description="The name of the artifact to create/update"),
|
|
100
104
|
metadata_json: str | None = Form(
|
|
101
105
|
None, description="JSON string of artifact metadata (e.g., description, source)"
|
|
@@ -106,7 +110,9 @@ async def upload_artifact_with_session(
|
|
|
106
110
|
component: "WebUIBackendComponent" = Depends(get_sac_component),
|
|
107
111
|
user_config: dict = Depends(ValidatedUserConfig(["tool:artifact:create"])),
|
|
108
112
|
session_manager: SessionManager = Depends(get_session_manager),
|
|
109
|
-
session_service: SessionService | None = Depends(
|
|
113
|
+
session_service: SessionService | None = Depends(
|
|
114
|
+
get_session_business_service_optional
|
|
115
|
+
),
|
|
110
116
|
db: Session | None = Depends(get_db_optional),
|
|
111
117
|
):
|
|
112
118
|
"""
|
|
@@ -129,7 +135,11 @@ async def upload_artifact_with_session(
|
|
|
129
135
|
else:
|
|
130
136
|
# Create new session when no sessionId provided (like chat does for new conversations)
|
|
131
137
|
effective_session_id = session_manager.create_new_session_id(request)
|
|
132
|
-
log.info(
|
|
138
|
+
log.info(
|
|
139
|
+
"%sCreated new session for file upload: %s",
|
|
140
|
+
log_prefix,
|
|
141
|
+
effective_session_id,
|
|
142
|
+
)
|
|
133
143
|
|
|
134
144
|
# Persist session in database if persistence is available (matching chat pattern)
|
|
135
145
|
if session_service and db:
|
|
@@ -139,17 +149,27 @@ async def upload_artifact_with_session(
|
|
|
139
149
|
user_id=user_id,
|
|
140
150
|
session_id=effective_session_id,
|
|
141
151
|
agent_id=None, # Will be determined when first message is sent
|
|
142
|
-
name=None,
|
|
152
|
+
name=None, # Will be set when first message is sent
|
|
143
153
|
)
|
|
144
154
|
db.commit()
|
|
145
|
-
log.info(
|
|
155
|
+
log.info(
|
|
156
|
+
"%sSession created and committed to database: %s",
|
|
157
|
+
log_prefix,
|
|
158
|
+
effective_session_id,
|
|
159
|
+
)
|
|
146
160
|
except Exception as session_error:
|
|
147
161
|
db.rollback()
|
|
148
|
-
log.warning(
|
|
149
|
-
|
|
162
|
+
log.warning(
|
|
163
|
+
"%sSession persistence failed, continuing with in-memory session: %s",
|
|
164
|
+
log_prefix,
|
|
165
|
+
session_error,
|
|
166
|
+
)
|
|
150
167
|
else:
|
|
151
|
-
log.debug(
|
|
152
|
-
|
|
168
|
+
log.debug(
|
|
169
|
+
"%sNo persistence available - using in-memory session: %s",
|
|
170
|
+
log_prefix,
|
|
171
|
+
effective_session_id,
|
|
172
|
+
)
|
|
153
173
|
|
|
154
174
|
# Validate inputs
|
|
155
175
|
if not filename or not filename.strip():
|
|
@@ -174,56 +194,83 @@ async def upload_artifact_with_session(
|
|
|
174
194
|
|
|
175
195
|
# Validate session (now that we have an effective_session_id)
|
|
176
196
|
if not validate_session(effective_session_id, user_id):
|
|
177
|
-
log.warning(
|
|
197
|
+
log.warning(
|
|
198
|
+
"%sSession validation failed for session: %s",
|
|
199
|
+
log_prefix,
|
|
200
|
+
effective_session_id,
|
|
201
|
+
)
|
|
178
202
|
raise HTTPException(
|
|
179
203
|
status_code=status.HTTP_403_FORBIDDEN,
|
|
180
204
|
detail="Invalid session or insufficient permissions.",
|
|
181
205
|
)
|
|
182
206
|
|
|
183
|
-
log.info(
|
|
207
|
+
log.info(
|
|
208
|
+
"%sUploading file '%s' to session '%s'",
|
|
209
|
+
log_prefix,
|
|
210
|
+
filename.strip(),
|
|
211
|
+
effective_session_id,
|
|
212
|
+
)
|
|
184
213
|
|
|
185
214
|
try:
|
|
186
215
|
# Read and validate file content
|
|
187
216
|
content_bytes = await upload_file.read()
|
|
188
|
-
if not content_bytes:
|
|
189
|
-
raise HTTPException(
|
|
190
|
-
status_code=status.HTTP_400_BAD_REQUEST,
|
|
191
|
-
detail="File is empty.",
|
|
192
|
-
)
|
|
193
217
|
|
|
194
218
|
mime_type = upload_file.content_type or "application/octet-stream"
|
|
195
219
|
filename_clean = filename.strip()
|
|
196
220
|
|
|
197
|
-
log.debug(
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
if not isinstance(metadata, dict):
|
|
205
|
-
raise ValueError("Metadata must be a JSON object")
|
|
206
|
-
except (json.JSONDecodeError, ValueError) as e:
|
|
207
|
-
log.warning("%sInvalid metadata JSON: %s", log_prefix, e)
|
|
208
|
-
raise HTTPException(
|
|
209
|
-
status_code=status.HTTP_400_BAD_REQUEST,
|
|
210
|
-
detail=f"Invalid JSON in metadata field: {str(e)}",
|
|
211
|
-
)
|
|
212
|
-
|
|
213
|
-
app_name = component.get_config("name", "A2A_WebUI_App")
|
|
221
|
+
log.debug(
|
|
222
|
+
"%sProcessing file: %s (%d bytes, %s)",
|
|
223
|
+
log_prefix,
|
|
224
|
+
filename_clean,
|
|
225
|
+
len(content_bytes),
|
|
226
|
+
mime_type,
|
|
227
|
+
)
|
|
214
228
|
|
|
215
|
-
#
|
|
216
|
-
|
|
217
|
-
|
|
229
|
+
# Use the common upload helper
|
|
230
|
+
upload_result = await process_artifact_upload(
|
|
231
|
+
artifact_service=artifact_service,
|
|
232
|
+
component=component,
|
|
218
233
|
user_id=user_id,
|
|
219
234
|
session_id=effective_session_id,
|
|
220
235
|
filename=filename_clean,
|
|
221
236
|
content_bytes=content_bytes,
|
|
222
237
|
mime_type=mime_type,
|
|
223
|
-
|
|
238
|
+
metadata_json=metadata_json,
|
|
239
|
+
log_prefix=log_prefix,
|
|
240
|
+
)
|
|
241
|
+
|
|
242
|
+
if upload_result["status"] != "success":
|
|
243
|
+
error_msg = upload_result.get("message", "Failed to upload artifact")
|
|
244
|
+
error_type = upload_result.get("error", "unknown")
|
|
245
|
+
|
|
246
|
+
if error_type in ["invalid_filename", "empty_file"]:
|
|
247
|
+
status_code = status.HTTP_400_BAD_REQUEST
|
|
248
|
+
else:
|
|
249
|
+
status_code = status.HTTP_500_INTERNAL_SERVER_ERROR
|
|
250
|
+
|
|
251
|
+
log.error("%s%s", log_prefix, error_msg)
|
|
252
|
+
raise HTTPException(status_code=status_code, detail=error_msg)
|
|
253
|
+
|
|
254
|
+
artifact_uri = upload_result["artifact_uri"]
|
|
255
|
+
saved_version = upload_result["version"]
|
|
256
|
+
|
|
257
|
+
log.info(
|
|
258
|
+
"%sArtifact stored successfully: %s (%d bytes), version: %s",
|
|
259
|
+
log_prefix,
|
|
260
|
+
artifact_uri,
|
|
261
|
+
len(content_bytes),
|
|
262
|
+
saved_version,
|
|
224
263
|
)
|
|
225
264
|
|
|
226
|
-
|
|
265
|
+
# Get metadata from upload result (it was already parsed and validated)
|
|
266
|
+
metadata_dict = {}
|
|
267
|
+
if metadata_json and metadata_json.strip():
|
|
268
|
+
try:
|
|
269
|
+
metadata_dict = json.loads(metadata_json.strip())
|
|
270
|
+
if not isinstance(metadata_dict, dict):
|
|
271
|
+
metadata_dict = {}
|
|
272
|
+
except json.JSONDecodeError:
|
|
273
|
+
metadata_dict = {}
|
|
227
274
|
|
|
228
275
|
# Return standardized response using Pydantic model (ensures camelCase conversion)
|
|
229
276
|
return ArtifactUploadResponse(
|
|
@@ -232,8 +279,10 @@ async def upload_artifact_with_session(
|
|
|
232
279
|
filename=filename_clean,
|
|
233
280
|
size=len(content_bytes),
|
|
234
281
|
mime_type=mime_type, # Will be returned as "mimeType" due to alias
|
|
235
|
-
metadata=
|
|
236
|
-
created_at=datetime.now(
|
|
282
|
+
metadata=metadata_dict,
|
|
283
|
+
created_at=datetime.now(
|
|
284
|
+
timezone.utc
|
|
285
|
+
).isoformat(), # Will be returned as "createdAt" due to alias
|
|
237
286
|
)
|
|
238
287
|
|
|
239
288
|
except HTTPException:
|
|
@@ -785,7 +834,6 @@ async def get_artifact_by_uri(
|
|
|
785
834
|
version,
|
|
786
835
|
)
|
|
787
836
|
|
|
788
|
-
|
|
789
837
|
log.info(
|
|
790
838
|
"%s User '%s' authorized to access artifact URI.",
|
|
791
839
|
log_id_prefix,
|
|
@@ -828,162 +876,6 @@ async def get_artifact_by_uri(
|
|
|
828
876
|
)
|
|
829
877
|
|
|
830
878
|
|
|
831
|
-
@router.post(
|
|
832
|
-
"/{session_id}/{filename}",
|
|
833
|
-
status_code=status.HTTP_201_CREATED,
|
|
834
|
-
response_model=dict[str, Any],
|
|
835
|
-
summary="Upload Artifact (Create/Update Version with Metadata)",
|
|
836
|
-
description="Uploads file content and optional metadata to create or update an artifact version.",
|
|
837
|
-
)
|
|
838
|
-
async def upload_artifact(
|
|
839
|
-
session_id: str = Path(
|
|
840
|
-
..., title="Session ID", description="The session ID to upload artifacts to"
|
|
841
|
-
),
|
|
842
|
-
filename: str = Path(
|
|
843
|
-
..., title="Filename", description="The name of the artifact to create/update"
|
|
844
|
-
),
|
|
845
|
-
upload_file: UploadFile = File(..., description="The file content to upload"),
|
|
846
|
-
metadata_json: str | None = Form(
|
|
847
|
-
None, description="JSON string of artifact metadata (e.g., description, source)"
|
|
848
|
-
),
|
|
849
|
-
artifact_service: BaseArtifactService = Depends(get_shared_artifact_service),
|
|
850
|
-
user_id: str = Depends(get_user_id),
|
|
851
|
-
validate_session: Callable[[str, str], bool] = Depends(get_session_validator),
|
|
852
|
-
component: "WebUIBackendComponent" = Depends(get_sac_component),
|
|
853
|
-
user_config: dict = Depends(ValidatedUserConfig(["tool:artifact:create"])),
|
|
854
|
-
):
|
|
855
|
-
"""
|
|
856
|
-
Uploads a file to create a new version of the specified artifact
|
|
857
|
-
associated with the current user and session ID. Also saves associated metadata.
|
|
858
|
-
"""
|
|
859
|
-
log_prefix = (
|
|
860
|
-
f"[ArtifactRouter:Post:{filename}] User={user_id}, Session={session_id} -"
|
|
861
|
-
)
|
|
862
|
-
log.info(
|
|
863
|
-
"%s Request received. Upload filename: '%s', content type: %s",
|
|
864
|
-
log_prefix,
|
|
865
|
-
upload_file.filename,
|
|
866
|
-
upload_file.content_type,
|
|
867
|
-
)
|
|
868
|
-
|
|
869
|
-
# Validate session exists and belongs to user
|
|
870
|
-
if not validate_session(session_id, user_id):
|
|
871
|
-
log.warning("%s Session validation failed or access denied.", log_prefix)
|
|
872
|
-
raise HTTPException(
|
|
873
|
-
status_code=status.HTTP_404_NOT_FOUND,
|
|
874
|
-
detail="Session not found or access denied.",
|
|
875
|
-
)
|
|
876
|
-
|
|
877
|
-
if artifact_service is None:
|
|
878
|
-
log.error("%s Artifact service is not configured or available.", log_prefix)
|
|
879
|
-
raise HTTPException(
|
|
880
|
-
status_code=status.HTTP_501_NOT_IMPLEMENTED,
|
|
881
|
-
detail="Artifact service is not configured.",
|
|
882
|
-
)
|
|
883
|
-
|
|
884
|
-
try:
|
|
885
|
-
content_bytes = await upload_file.read()
|
|
886
|
-
if not content_bytes:
|
|
887
|
-
log.warning("%s Uploaded file is empty.", log_prefix)
|
|
888
|
-
raise HTTPException(
|
|
889
|
-
status_code=status.HTTP_400_BAD_REQUEST,
|
|
890
|
-
detail="Uploaded file cannot be empty.",
|
|
891
|
-
)
|
|
892
|
-
|
|
893
|
-
mime_type = upload_file.content_type or "application/octet-stream"
|
|
894
|
-
|
|
895
|
-
parsed_metadata = {}
|
|
896
|
-
if metadata_json:
|
|
897
|
-
try:
|
|
898
|
-
parsed_metadata = json.loads(metadata_json)
|
|
899
|
-
if not isinstance(parsed_metadata, dict):
|
|
900
|
-
log.warning(
|
|
901
|
-
"%s Metadata JSON did not parse to a dictionary. Ignoring.",
|
|
902
|
-
log_prefix,
|
|
903
|
-
)
|
|
904
|
-
parsed_metadata = {}
|
|
905
|
-
except json.JSONDecodeError as json_err:
|
|
906
|
-
log.warning(
|
|
907
|
-
"%s Failed to parse metadata_json: %s. Proceeding without it.",
|
|
908
|
-
log_prefix,
|
|
909
|
-
json_err,
|
|
910
|
-
)
|
|
911
|
-
|
|
912
|
-
app_name = component.get_config("name", "A2A_WebUI_App")
|
|
913
|
-
current_timestamp = datetime.now(timezone.utc)
|
|
914
|
-
|
|
915
|
-
save_result = await save_artifact_with_metadata(
|
|
916
|
-
artifact_service=artifact_service,
|
|
917
|
-
app_name=app_name,
|
|
918
|
-
user_id=user_id,
|
|
919
|
-
session_id=session_id,
|
|
920
|
-
filename=filename,
|
|
921
|
-
content_bytes=content_bytes,
|
|
922
|
-
mime_type=mime_type,
|
|
923
|
-
metadata_dict=parsed_metadata,
|
|
924
|
-
timestamp=current_timestamp,
|
|
925
|
-
schema_max_keys=component.get_config(
|
|
926
|
-
"schema_max_keys", DEFAULT_SCHEMA_MAX_KEYS
|
|
927
|
-
),
|
|
928
|
-
)
|
|
929
|
-
|
|
930
|
-
if save_result["status"] == "success":
|
|
931
|
-
log.info(
|
|
932
|
-
"%s Artifact and metadata processing completed. Data version: %s, Metadata version: %s. Message: %s",
|
|
933
|
-
log_prefix,
|
|
934
|
-
save_result.get("data_version"),
|
|
935
|
-
save_result.get("metadata_version"),
|
|
936
|
-
save_result.get("message"),
|
|
937
|
-
)
|
|
938
|
-
saved_version = save_result.get("data_version")
|
|
939
|
-
artifact_uri = format_artifact_uri(
|
|
940
|
-
app_name=app_name,
|
|
941
|
-
user_id=user_id,
|
|
942
|
-
session_id=session_id,
|
|
943
|
-
filename=filename,
|
|
944
|
-
version=saved_version,
|
|
945
|
-
)
|
|
946
|
-
log.info(
|
|
947
|
-
"%s Successfully saved artifact. Returning URI: %s",
|
|
948
|
-
log_prefix,
|
|
949
|
-
artifact_uri,
|
|
950
|
-
)
|
|
951
|
-
return {
|
|
952
|
-
"filename": filename,
|
|
953
|
-
"data_version": saved_version,
|
|
954
|
-
"metadata_version": save_result.get("metadata_version"),
|
|
955
|
-
"mime_type": mime_type,
|
|
956
|
-
"size": len(content_bytes),
|
|
957
|
-
"message": save_result.get("message"),
|
|
958
|
-
"status": save_result["status"],
|
|
959
|
-
"uri": artifact_uri,
|
|
960
|
-
}
|
|
961
|
-
else:
|
|
962
|
-
log.error(
|
|
963
|
-
"%s Failed to save artifact and metadata: %s",
|
|
964
|
-
log_prefix,
|
|
965
|
-
save_result.get("message"),
|
|
966
|
-
)
|
|
967
|
-
raise HTTPException(
|
|
968
|
-
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
|
969
|
-
detail=save_result.get(
|
|
970
|
-
"message", "Failed to save artifact with metadata."
|
|
971
|
-
),
|
|
972
|
-
)
|
|
973
|
-
|
|
974
|
-
except HTTPException:
|
|
975
|
-
raise
|
|
976
|
-
except Exception as e:
|
|
977
|
-
log.exception("%s Error saving artifact: %s", log_prefix, e)
|
|
978
|
-
raise HTTPException(
|
|
979
|
-
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
|
|
980
|
-
detail=f"Failed to save artifact: {str(e)}",
|
|
981
|
-
)
|
|
982
|
-
finally:
|
|
983
|
-
await upload_file.close()
|
|
984
|
-
log.debug("%s Upload file closed.", log_prefix)
|
|
985
|
-
|
|
986
|
-
|
|
987
879
|
@router.delete(
|
|
988
880
|
"/{session_id}/{filename}",
|
|
989
881
|
status_code=status.HTTP_204_NO_CONTENT,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Router for handling authentication-related endpoints.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
from fastapi import (
|
|
6
7
|
APIRouter,
|
|
7
8
|
Request as FastAPIRequest,
|
|
@@ -15,7 +16,8 @@ import secrets
|
|
|
15
16
|
from urllib.parse import urlencode
|
|
16
17
|
|
|
17
18
|
from ...http_sse.dependencies import get_sac_component, get_api_config
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
log = logging.getLogger(__name__)
|
|
19
21
|
|
|
20
22
|
router = APIRouter()
|
|
21
23
|
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
API Router for providing frontend configuration.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
from fastapi import APIRouter, Depends, HTTPException, status
|
|
6
7
|
from typing import Dict, Any
|
|
7
8
|
|
|
8
|
-
from solace_ai_connector.common.log import log
|
|
9
|
-
|
|
10
9
|
from ....gateway.http_sse.dependencies import get_sac_component, get_api_config
|
|
11
10
|
from typing import TYPE_CHECKING
|
|
12
11
|
|
|
13
12
|
if TYPE_CHECKING:
|
|
14
13
|
from gateway.http_sse.component import WebUIBackendComponent
|
|
15
14
|
|
|
15
|
+
log = logging.getLogger(__name__)
|
|
16
|
+
|
|
16
17
|
router = APIRouter()
|
|
17
18
|
|
|
18
19
|
|
|
@@ -4,7 +4,8 @@ Session-related response DTOs.
|
|
|
4
4
|
|
|
5
5
|
from pydantic import BaseModel, ConfigDict, Field
|
|
6
6
|
|
|
7
|
-
from ....shared.
|
|
7
|
+
from ....shared.pagination import PaginationMeta
|
|
8
|
+
from ....shared.types import SessionId, UserId
|
|
8
9
|
from .base_responses import BaseTimestampResponse
|
|
9
10
|
|
|
10
11
|
|
|
@@ -20,10 +21,10 @@ class SessionResponse(BaseTimestampResponse):
|
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
class SessionListResponse(BaseModel):
|
|
23
|
-
"""Response DTO for a list of sessions."""
|
|
24
|
+
"""Response DTO for a list of sessions (legacy - use PaginatedResponse instead)."""
|
|
24
25
|
|
|
25
26
|
model_config = ConfigDict(populate_by_name=True)
|
|
26
27
|
|
|
27
28
|
sessions: list[SessionResponse]
|
|
28
|
-
pagination:
|
|
29
|
+
pagination: PaginationMeta | None = None
|
|
29
30
|
total_count: int = Field(alias="totalCount")
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
API endpoints for people-related features, such as user search for autocomplete.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
from typing import Any, Dict, List
|
|
6
7
|
|
|
7
8
|
from fastapi import APIRouter, Depends, Query
|
|
8
|
-
from solace_ai_connector.common.log import log
|
|
9
9
|
|
|
10
10
|
from ..dependencies import get_people_service
|
|
11
11
|
from ..services.people_service import PeopleService
|
|
12
12
|
from ..shared.pagination import DataResponse
|
|
13
13
|
from ..shared.response_utils import create_data_response
|
|
14
14
|
|
|
15
|
+
log = logging.getLogger(__name__)
|
|
16
|
+
|
|
15
17
|
router = APIRouter()
|
|
16
18
|
|
|
17
19
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import logging
|
|
1
2
|
from fastapi import APIRouter, Body, Depends, HTTPException, Query, status
|
|
2
|
-
from solace_ai_connector.common.log import log
|
|
3
3
|
from sqlalchemy.orm import Session
|
|
4
4
|
|
|
5
5
|
from ..dependencies import get_session_business_service, get_db
|
|
@@ -15,6 +15,8 @@ from .dto.requests.task_requests import SaveTaskRequest
|
|
|
15
15
|
from .dto.responses.session_responses import SessionResponse
|
|
16
16
|
from .dto.responses.task_responses import TaskResponse, TaskListResponse
|
|
17
17
|
|
|
18
|
+
log = logging.getLogger(__name__)
|
|
19
|
+
|
|
18
20
|
router = APIRouter()
|
|
19
21
|
|
|
20
22
|
SESSION_NOT_FOUND_MSG = "Session not found."
|
|
@@ -147,8 +149,8 @@ async def save_task(
|
|
|
147
149
|
# Check if task already exists to determine status code
|
|
148
150
|
from ..repository.chat_task_repository import ChatTaskRepository
|
|
149
151
|
|
|
150
|
-
task_repo = ChatTaskRepository(
|
|
151
|
-
existing_task = task_repo.find_by_id(request.task_id, user_id)
|
|
152
|
+
task_repo = ChatTaskRepository()
|
|
153
|
+
existing_task = task_repo.find_by_id(db, request.task_id, user_id)
|
|
152
154
|
is_update = existing_task is not None
|
|
153
155
|
|
|
154
156
|
# Save the task - pass strings directly
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
API Router for Server-Sent Events (SSE) subscriptions.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import logging
|
|
5
6
|
import asyncio
|
|
6
7
|
import json
|
|
7
8
|
from fastapi import APIRouter, Depends, Request as FastAPIRequest, HTTPException, status
|
|
8
9
|
|
|
9
|
-
from solace_ai_connector.common.log import log
|
|
10
|
-
|
|
11
10
|
from sse_starlette.sse import EventSourceResponse
|
|
12
11
|
|
|
13
12
|
from ....gateway.http_sse.sse_manager import SSEManager
|
|
14
13
|
from ....gateway.http_sse.dependencies import get_sse_manager
|
|
15
14
|
|
|
15
|
+
log = logging.getLogger(__name__)
|
|
16
|
+
|
|
16
17
|
router = APIRouter()
|
|
17
18
|
|
|
18
19
|
|