solace-agent-mesh 1.11.2__py3-none-any.whl → 1.12.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.
- solace_agent_mesh/agent/adk/callbacks.py +177 -10
- solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +3 -0
- solace_agent_mesh/agent/adk/models/lite_llm.py +34 -16
- solace_agent_mesh/agent/adk/runner.py +66 -8
- solace_agent_mesh/agent/adk/setup.py +61 -26
- solace_agent_mesh/agent/protocol/event_handlers.py +48 -0
- solace_agent_mesh/agent/proxies/a2a/component.py +27 -0
- solace_agent_mesh/agent/sac/component.py +84 -2
- solace_agent_mesh/agent/tools/builtin_artifact_tools.py +41 -22
- solace_agent_mesh/agent/tools/peer_agent_tool.py +19 -12
- solace_agent_mesh/agent/tools/tool_config_types.py +21 -1
- solace_agent_mesh/agent/utils/artifact_helpers.py +54 -0
- solace_agent_mesh/assets/docs/404.html +3 -3
- solace_agent_mesh/assets/docs/assets/js/15ba94aa.e186750d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/240a0364.83e37aa8.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2e32b5e0.2f0db237.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3a6c6137.7e61915d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{3ac1795d.28b7c67b.js → 3ac1795d.dc006e20.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/3ff0015d.f08618fb.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/4667dc50.bf2ad456.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/547e15cc.8e6da617.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5b8d9c11.d4eb37b8.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5c2bd65f.1ee87753.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/64195356.09dbd087.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/66d4869e.30340bd3.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/729898df.7249e9fd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/7e294c01.7c5f6906.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8024126c.e3467286.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/81a99df0.95be65d4.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9bb13469.4523ae20.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/a7d42657.a956689d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ab9708a8.3e563275.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e04b235d.06d23db6.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e1b6eeb4.deb2b62e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e6f9706b.acc800d3.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e92d0134.c147a429.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ee0c2fe7.94d0a351.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/f284c35a.08fab659.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/main.b241af3e.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/runtime~main.4ca7d2e2.js +1 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/artifact-management/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/audio-tools/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/data-analysis-tools/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/embeds/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/image-tools/index.html +81 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/builtin-tools/index.html +14 -12
- solace_agent_mesh/assets/docs/docs/documentation/components/cli/index.html +30 -9
- solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/index.html +6 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/orchestrator/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/platform-service/index.html +33 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/plugins/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/projects/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/prompts/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/proxies/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/components/speech/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/deploying/debugging/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +5 -5
- solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/deploying/{kubernetes-deployment → kubernetes}/index.html +6 -6
- solace_agent_mesh/assets/docs/docs/documentation/deploying/kubernetes/kubernetes-deployment-guide/index.html +197 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/logging/index.html +11 -6
- solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/deploying/proxy_configuration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/create-agents/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/create-gateways/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/creating-python-tools/index.html +23 -5
- solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/evaluations/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/bedrock-agents/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/custom-agent/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/event-mesh-gateway/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mcp-integration/index.html +17 -8
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/mongodb-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rag-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/rest-gateway/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/sql-database/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/teams-integration/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/agent-builder/index.html +5 -5
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/connectors/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/openapi-tools/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/secure-user-delegated-access/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/wheel-installation/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/architecture/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/index.html +6 -5
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/vibe_coding/index.html +62 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/artifact-storage/index.html +25 -4
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/configurations/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/installation/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/session-storage/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/user-feedback/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-technical-migration-map/index.html +4 -4
- solace_agent_mesh/assets/docs/docs/documentation/migrations/platform-service-split/index.html +85 -0
- solace_agent_mesh/assets/docs/lunr-index-1767712284328.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -1
- solace_agent_mesh/assets/docs/search-doc-1767712284328.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/init_cmd/__init__.py +15 -0
- solace_agent_mesh/cli/commands/init_cmd/directory_step.py +1 -1
- solace_agent_mesh/cli/commands/init_cmd/env_step.py +29 -2
- solace_agent_mesh/cli/commands/init_cmd/platform_service_step.py +85 -0
- solace_agent_mesh/cli/commands/tools_cmd.py +315 -0
- solace_agent_mesh/cli/main.py +2 -0
- solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-Dj3JtK42.js → authCallback-8Nihi8rv.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{client-ZKk9kEJ5.js → client-DYtZN8p-.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-BYGUHQMk.js +435 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-D2CSH1bp.css +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/{vendor-BNV4kZN0.js → vendor-XBWAmrun.js} +106 -101
- 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/client/webui/frontend/static/ui-version.json +1 -1
- solace_agent_mesh/common/a2a/types.py +1 -1
- solace_agent_mesh/common/agent_registry.py +38 -11
- solace_agent_mesh/common/data_parts.py +28 -0
- solace_agent_mesh/common/error_handlers.py +83 -0
- solace_agent_mesh/common/sam_events/event_service.py +2 -2
- solace_agent_mesh/config_portal/backend/common.py +2 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-ZV-jX48T.js +103 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/{manifest-ba77705e.js → manifest-ce5bc5da.js} +1 -1
- solace_agent_mesh/config_portal/frontend/static/client/index.html +1 -1
- solace_agent_mesh/core_a2a/service.py +3 -2
- solace_agent_mesh/gateway/adapter/base.py +28 -1
- solace_agent_mesh/gateway/adapter/types.py +9 -0
- solace_agent_mesh/gateway/base/auth_interface.py +103 -0
- solace_agent_mesh/gateway/base/component.py +68 -1
- solace_agent_mesh/gateway/generic/component.py +195 -30
- solace_agent_mesh/gateway/http_sse/app.py +23 -6
- solace_agent_mesh/gateway/http_sse/component.py +9 -61
- solace_agent_mesh/gateway/http_sse/dependencies.py +9 -51
- solace_agent_mesh/gateway/http_sse/main.py +28 -418
- solace_agent_mesh/gateway/http_sse/repository/chat_task_repository.py +2 -2
- solace_agent_mesh/gateway/http_sse/repository/entities/project.py +1 -1
- solace_agent_mesh/gateway/http_sse/repository/entities/project_user.py +1 -1
- solace_agent_mesh/gateway/http_sse/repository/entities/session.py +2 -2
- solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +2 -2
- solace_agent_mesh/gateway/http_sse/repository/interfaces.py +2 -2
- solace_agent_mesh/gateway/http_sse/repository/models/prompt_model.py +1 -1
- solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +1 -1
- solace_agent_mesh/gateway/http_sse/repository/project_repository.py +1 -1
- solace_agent_mesh/gateway/http_sse/repository/project_user_repository.py +1 -1
- solace_agent_mesh/gateway/http_sse/repository/session_repository.py +4 -4
- solace_agent_mesh/gateway/http_sse/repository/task_repository.py +2 -2
- solace_agent_mesh/gateway/http_sse/routers/artifacts.py +16 -15
- solace_agent_mesh/gateway/http_sse/routers/auth.py +61 -132
- solace_agent_mesh/gateway/http_sse/routers/config.py +12 -8
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +1 -1
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/base_responses.py +1 -1
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +2 -2
- solace_agent_mesh/gateway/http_sse/routers/feedback.py +2 -2
- solace_agent_mesh/gateway/http_sse/routers/people.py +2 -2
- solace_agent_mesh/gateway/http_sse/routers/projects.py +2 -1
- solace_agent_mesh/gateway/http_sse/routers/prompts.py +2 -1
- solace_agent_mesh/gateway/http_sse/routers/sessions.py +3 -3
- solace_agent_mesh/gateway/http_sse/routers/speech.py +1 -1
- solace_agent_mesh/gateway/http_sse/routers/tasks.py +3 -2
- solace_agent_mesh/gateway/http_sse/routers/users.py +1 -1
- solace_agent_mesh/gateway/http_sse/routers/visualization.py +2 -1
- solace_agent_mesh/gateway/http_sse/services/background_task_monitor.py +1 -1
- solace_agent_mesh/gateway/http_sse/services/data_retention_service.py +1 -1
- solace_agent_mesh/gateway/http_sse/services/feedback_service.py +1 -1
- solace_agent_mesh/gateway/http_sse/services/session_service.py +4 -4
- solace_agent_mesh/gateway/http_sse/services/task_logger_service.py +1 -1
- solace_agent_mesh/services/platform/__init__.py +23 -12
- solace_agent_mesh/services/platform/api/dependencies.py +23 -16
- solace_agent_mesh/services/platform/api/main.py +118 -43
- solace_agent_mesh/services/platform/api/routers/__init__.py +12 -3
- solace_agent_mesh/services/platform/api/routers/health_router.py +31 -0
- solace_agent_mesh/services/platform/app.py +101 -7
- solace_agent_mesh/services/platform/component.py +552 -33
- solace_agent_mesh/shared/__init__.py +14 -0
- solace_agent_mesh/shared/api/__init__.py +42 -0
- solace_agent_mesh/shared/auth/__init__.py +26 -0
- solace_agent_mesh/shared/auth/dependencies.py +204 -0
- solace_agent_mesh/shared/auth/middleware.py +291 -0
- solace_agent_mesh/shared/database/__init__.py +20 -0
- solace_agent_mesh/{gateway/http_sse/shared → shared/database}/base_repository.py +1 -1
- solace_agent_mesh/{gateway/http_sse/shared → shared/database}/database_exceptions.py +1 -1
- solace_agent_mesh/{gateway/http_sse/shared → shared/database}/database_helpers.py +1 -1
- solace_agent_mesh/shared/exceptions/__init__.py +36 -0
- solace_agent_mesh/{gateway/http_sse/shared → shared/exceptions}/exception_handlers.py +1 -1
- solace_agent_mesh/shared/utils/__init__.py +21 -0
- solace_agent_mesh/templates/platform.yaml +49 -0
- solace_agent_mesh/templates/webui.yaml +12 -3
- {solace_agent_mesh-1.11.2.dist-info → solace_agent_mesh-1.12.0.dist-info}/METADATA +2 -1
- {solace_agent_mesh-1.11.2.dist-info → solace_agent_mesh-1.12.0.dist-info}/RECORD +214 -258
- solace_agent_mesh/agent/adk/adk_llm.txt +0 -226
- solace_agent_mesh/agent/adk/adk_llm_detail.txt +0 -566
- solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +0 -171
- solace_agent_mesh/agent/adk/models/models_llm.txt +0 -189
- solace_agent_mesh/agent/agent_llm.txt +0 -369
- solace_agent_mesh/agent/agent_llm_detail.txt +0 -1702
- solace_agent_mesh/agent/protocol/protocol_llm.txt +0 -81
- solace_agent_mesh/agent/protocol/protocol_llm_detail.txt +0 -92
- solace_agent_mesh/agent/proxies/a2a/a2a_llm.txt +0 -190
- solace_agent_mesh/agent/proxies/base/base_llm.txt +0 -148
- solace_agent_mesh/agent/proxies/proxies_llm.txt +0 -283
- solace_agent_mesh/agent/sac/sac_llm.txt +0 -189
- solace_agent_mesh/agent/sac/sac_llm_detail.txt +0 -200
- solace_agent_mesh/agent/testing/testing_llm.txt +0 -58
- solace_agent_mesh/agent/testing/testing_llm_detail.txt +0 -68
- solace_agent_mesh/agent/tools/tools_llm.txt +0 -276
- solace_agent_mesh/agent/tools/tools_llm_detail.txt +0 -275
- solace_agent_mesh/agent/utils/utils_llm.txt +0 -152
- solace_agent_mesh/agent/utils/utils_llm_detail.txt +0 -149
- solace_agent_mesh/assets/docs/assets/js/15ba94aa.92fea363.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/240a0364.9ad94d1b.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/2e32b5e0.33f5d75b.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/3a6c6137.f5940cfa.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/3ff0015d.2ddc75c0.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/547e15cc.2f7790c1.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/5c2bd65f.90a87880.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/64195356.c498c4d0.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/66d4869e.b77431fc.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/8024126c.fa0e7186.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/81a99df0.2484b8d9.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/9bb13469.b2333011.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ab9708a8.245ae0ef.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/db5d6442.3daf1696.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/e04b235d.52cb25ed.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/e1b6eeb4.b1068f9b.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/e6f9706b.4488e34c.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/e92d0134.3bda61dd.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/f284c35a.250993bf.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/main.7acf7ace.js +0 -2
- solace_agent_mesh/assets/docs/assets/js/runtime~main.9e0813a2.js +0 -1
- solace_agent_mesh/assets/docs/lunr-index-1765810064709.json +0 -1
- solace_agent_mesh/assets/docs/search-doc-1765810064709.json +0 -1
- solace_agent_mesh/cli/commands/add_cmd/add_cmd_llm.txt +0 -250
- solace_agent_mesh/cli/commands/init_cmd/init_cmd_llm.txt +0 -365
- solace_agent_mesh/cli/commands/plugin_cmd/plugin_cmd_llm.txt +0 -305
- solace_agent_mesh/client/webui/frontend/static/assets/main-BcUaNZ-Q.css +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-vjch4RYc.js +0 -435
- solace_agent_mesh/common/a2a/a2a_llm.txt +0 -175
- solace_agent_mesh/common/a2a/a2a_llm_detail.txt +0 -193
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +0 -445
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm_detail.txt +0 -736
- solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +0 -330
- solace_agent_mesh/common/common_llm.txt +0 -230
- solace_agent_mesh/common/common_llm_detail.txt +0 -2562
- solace_agent_mesh/common/middleware/middleware_llm.txt +0 -174
- solace_agent_mesh/common/middleware/middleware_llm_detail.txt +0 -185
- solace_agent_mesh/common/sac/sac_llm.txt +0 -71
- solace_agent_mesh/common/sac/sac_llm_detail.txt +0 -82
- solace_agent_mesh/common/sam_events/sam_events_llm.txt +0 -104
- solace_agent_mesh/common/sam_events/sam_events_llm_detail.txt +0 -115
- solace_agent_mesh/common/services/providers/providers_llm.txt +0 -81
- solace_agent_mesh/common/services/services_llm.txt +0 -368
- solace_agent_mesh/common/services/services_llm_detail.txt +0 -459
- solace_agent_mesh/common/utils/embeds/embeds_llm.txt +0 -220
- solace_agent_mesh/common/utils/utils_llm.txt +0 -335
- solace_agent_mesh/common/utils/utils_llm_detail.txt +0 -572
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-DiOiAjzL.js +0 -103
- solace_agent_mesh/core_a2a/core_a2a_llm.txt +0 -90
- solace_agent_mesh/core_a2a/core_a2a_llm_detail.txt +0 -101
- solace_agent_mesh/gateway/base/base_llm.txt +0 -226
- solace_agent_mesh/gateway/base/base_llm_detail.txt +0 -235
- solace_agent_mesh/gateway/gateway_llm.txt +0 -369
- solace_agent_mesh/gateway/gateway_llm_detail.txt +0 -3885
- solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +0 -345
- solace_agent_mesh/gateway/http_sse/alembic/versions/versions_llm.txt +0 -161
- solace_agent_mesh/gateway/http_sse/components/components_llm.txt +0 -105
- solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +0 -299
- solace_agent_mesh/gateway/http_sse/http_sse_llm_detail.txt +0 -3278
- solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +0 -221
- solace_agent_mesh/gateway/http_sse/repository/models/models_llm.txt +0 -257
- solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +0 -308
- solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +0 -450
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +0 -133
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +0 -123
- solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +0 -312
- solace_agent_mesh/gateway/http_sse/services/services_llm.txt +0 -303
- solace_agent_mesh/gateway/http_sse/shared/__init__.py +0 -146
- solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +0 -319
- solace_agent_mesh/gateway/http_sse/utils/utils_llm.txt +0 -47
- solace_agent_mesh/llm.txt +0 -228
- solace_agent_mesh/llm_detail.txt +0 -2835
- solace_agent_mesh/solace_agent_mesh_llm.txt +0 -362
- solace_agent_mesh/solace_agent_mesh_llm_detail.txt +0 -8599
- solace_agent_mesh/templates/templates_llm.txt +0 -147
- /solace_agent_mesh/assets/docs/assets/js/{main.7acf7ace.js.LICENSE.txt → main.b241af3e.js.LICENSE.txt} +0 -0
- /solace_agent_mesh/{gateway/http_sse/shared → shared/api}/auth_utils.py +0 -0
- /solace_agent_mesh/{gateway/http_sse/shared → shared/api}/pagination.py +0 -0
- /solace_agent_mesh/{gateway/http_sse/shared → shared/api}/response_utils.py +0 -0
- /solace_agent_mesh/{gateway/http_sse/shared → shared/exceptions}/error_dto.py +0 -0
- /solace_agent_mesh/{gateway/http_sse/shared → shared/exceptions}/exceptions.py +0 -0
- /solace_agent_mesh/{gateway/http_sse/shared → shared/utils}/enums.py +0 -0
- /solace_agent_mesh/{gateway/http_sse/shared → shared/utils}/timestamp_utils.py +0 -0
- /solace_agent_mesh/{gateway/http_sse/shared → shared/utils}/types.py +0 -0
- /solace_agent_mesh/{gateway/http_sse/shared → shared/utils}/utils.py +0 -0
- {solace_agent_mesh-1.11.2.dist-info → solace_agent_mesh-1.12.0.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-1.11.2.dist-info → solace_agent_mesh-1.12.0.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-1.11.2.dist-info → solace_agent_mesh-1.12.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
# DEVELOPER GUIDE for the routers directory
|
|
2
|
-
|
|
3
|
-
## Quick Summary
|
|
4
|
-
The `routers` directory contains FastAPI router modules that define the REST API endpoints for the HTTP SSE Gateway. Each router groups endpoints by functional domain (agent discovery, artifact management, authentication, sessions, etc.) and provides the primary interface for frontend applications and other clients to interact with the gateway. The routers work together to provide a complete web API with real-time capabilities through Server-Sent Events (SSE), along with comprehensive session management, artifact handling, and A2A message visualization.
|
|
5
|
-
|
|
6
|
-
## Files and Subdirectories Overview
|
|
7
|
-
- **Direct files:**
|
|
8
|
-
- `__init__.py` - Package initialization for router modules
|
|
9
|
-
- `agent_cards.py` - Agent discovery endpoints
|
|
10
|
-
- `artifacts.py` - Artifact management (upload, download, versioning)
|
|
11
|
-
- `auth.py` - Authentication flow endpoints (login, callback, refresh)
|
|
12
|
-
- `config.py` - Frontend configuration endpoint
|
|
13
|
-
- `feedback.py` - User feedback collection endpoints
|
|
14
|
-
- `people.py` - User search for autocomplete features
|
|
15
|
-
- `sessions.py` - Session management (CRUD operations)
|
|
16
|
-
- `sse.py` - Server-Sent Events streaming endpoint
|
|
17
|
-
- `tasks.py` - Task submission and management endpoints
|
|
18
|
-
- `users.py` - Current user information endpoint
|
|
19
|
-
- `visualization.py` - A2A message visualization streaming
|
|
20
|
-
- **Subdirectories:**
|
|
21
|
-
- `dto/` - Data Transfer Objects for request/response validation
|
|
22
|
-
|
|
23
|
-
## Developer API Reference
|
|
24
|
-
|
|
25
|
-
### Direct Files
|
|
26
|
-
|
|
27
|
-
#### __init__.py
|
|
28
|
-
**Purpose:** Package initialization for the routers module
|
|
29
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers import *`
|
|
30
|
-
|
|
31
|
-
#### agent_cards.py
|
|
32
|
-
**Purpose:** Provides REST endpoints for agent discovery
|
|
33
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.agent_cards import router`
|
|
34
|
-
|
|
35
|
-
**Functions:**
|
|
36
|
-
- `get_discovered_agent_cards() -> List[AgentCard]` - Retrieves all currently discovered A2A agents
|
|
37
|
-
|
|
38
|
-
#### artifacts.py
|
|
39
|
-
**Purpose:** Manages session-specific artifacts via REST endpoints with versioning and metadata support
|
|
40
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.artifacts import router, ArtifactUploadResponse`
|
|
41
|
-
|
|
42
|
-
**Classes:**
|
|
43
|
-
- `ArtifactUploadResponse(BaseModel)` - Response model for artifact uploads with camelCase fields
|
|
44
|
-
|
|
45
|
-
**Functions:**
|
|
46
|
-
- `upload_artifact_with_session(upload_file: UploadFile, sessionId: str, filename: str, metadata_json: str) -> ArtifactUploadResponse` - Uploads artifact with session management
|
|
47
|
-
- `list_artifact_versions(session_id: str, filename: str) -> List[int]` - Lists available versions for an artifact
|
|
48
|
-
- `list_artifacts(session_id: str) -> List[ArtifactInfo]` - Lists all artifacts in a session with metadata
|
|
49
|
-
- `get_latest_artifact(session_id: str, filename: str) -> StreamingResponse` - Downloads latest artifact version with embed resolution
|
|
50
|
-
- `get_specific_artifact_version(session_id: str, filename: str, version: Union[int, str]) -> StreamingResponse` - Downloads specific version
|
|
51
|
-
- `get_artifact_by_uri(uri: str) -> StreamingResponse` - Downloads artifact by formal artifact:// URI
|
|
52
|
-
- `delete_artifact(session_id: str, filename: str) -> Response` - Deletes artifact and all versions
|
|
53
|
-
|
|
54
|
-
#### auth.py
|
|
55
|
-
**Purpose:** Handles OAuth-based user authentication flow with external authorization service
|
|
56
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.auth import router`
|
|
57
|
-
|
|
58
|
-
**Functions:**
|
|
59
|
-
- `initiate_login(request: FastAPIRequest) -> RedirectResponse` - Starts OAuth login flow with external service
|
|
60
|
-
- `get_csrf_token(response: Response) -> Dict[str, str]` - Generates and sets CSRF token
|
|
61
|
-
- `auth_callback(request: FastAPIRequest) -> RedirectResponse` - Handles OAuth callback and token exchange
|
|
62
|
-
- `refresh_token(request: FastAPIRequest) -> Dict[str, str]` - Refreshes access token using refresh token
|
|
63
|
-
|
|
64
|
-
#### config.py
|
|
65
|
-
**Purpose:** Provides frontend configuration settings including feature flags
|
|
66
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.config import router`
|
|
67
|
-
|
|
68
|
-
**Functions:**
|
|
69
|
-
- `get_app_config() -> Dict[str, Any]` - Returns frontend configuration including auth URLs, feature flags, and persistence settings
|
|
70
|
-
|
|
71
|
-
#### feedback.py
|
|
72
|
-
**Purpose:** Receives and processes user feedback on chat messages
|
|
73
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.feedback import router, FeedbackPayload`
|
|
74
|
-
|
|
75
|
-
**Classes:**
|
|
76
|
-
- `FeedbackPayload(BaseModel)` - Data model for feedback submission
|
|
77
|
-
- `task_id: str` - ID of the task being rated
|
|
78
|
-
- `session_id: str` - Session containing the task
|
|
79
|
-
- `feedback_type: Literal["up", "down"]` - Type of feedback
|
|
80
|
-
- `feedback_text: Optional[str]` - Optional text feedback
|
|
81
|
-
|
|
82
|
-
**Functions:**
|
|
83
|
-
- `submit_feedback(payload: FeedbackPayload, user_id: str) -> Dict[str, str]` - Processes user feedback asynchronously
|
|
84
|
-
|
|
85
|
-
#### people.py
|
|
86
|
-
**Purpose:** Provides user search functionality for autocomplete features
|
|
87
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.people import router`
|
|
88
|
-
|
|
89
|
-
**Functions:**
|
|
90
|
-
- `search_people(q: str, limit: int = 10) -> List[Dict[str, Any]]` - Searches for users for @mention autocomplete
|
|
91
|
-
|
|
92
|
-
#### sessions.py
|
|
93
|
-
**Purpose:** Manages user sessions including CRUD operations with persistence
|
|
94
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.sessions import router`
|
|
95
|
-
|
|
96
|
-
**Functions:**
|
|
97
|
-
- `get_all_sessions(page_number: int, page_size: int, user: dict) -> PaginatedResponse[SessionResponse]` - Lists user's sessions with pagination
|
|
98
|
-
- `get_session(session_id: str, user: dict) -> DataResponse[SessionResponse]` - Gets session details with authorization
|
|
99
|
-
- `get_session_history(session_id: str, user: dict) -> List[MessageResponse]` - Gets session message history
|
|
100
|
-
- `update_session_name(session_id: str, name: str, user: dict) -> SessionResponse` - Updates session name with validation
|
|
101
|
-
- `delete_session(session_id: str, user: dict) -> None` - Deletes session with cascade notifications
|
|
102
|
-
- `save_task(session_id: str, request: SaveTaskRequest, user: dict) -> TaskResponse` - Saves complete task interaction (upsert)
|
|
103
|
-
- `get_session_tasks(session_id: str, user: dict) -> TaskListResponse` - Gets all tasks for a session
|
|
104
|
-
|
|
105
|
-
#### sse.py
|
|
106
|
-
**Purpose:** Provides Server-Sent Events endpoint for real-time streaming
|
|
107
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.sse import router`
|
|
108
|
-
|
|
109
|
-
**Functions:**
|
|
110
|
-
- `subscribe_to_task_events(task_id: str, request: FastAPIRequest) -> EventSourceResponse` - Establishes SSE connection for task updates with automatic cleanup
|
|
111
|
-
|
|
112
|
-
#### tasks.py
|
|
113
|
-
**Purpose:** Handles task submission, management, and historical search
|
|
114
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.tasks import router`
|
|
115
|
-
|
|
116
|
-
**Functions:**
|
|
117
|
-
- `search_tasks(start_date: Optional[str], end_date: Optional[str], search: Optional[str], page: int, page_size: int, query_user_id: Optional[str]) -> List[Task]` - Searches historical tasks with admin capabilities
|
|
118
|
-
- `get_task_as_stim_file(task_id: str) -> Response` - Downloads complete task history as .stim file
|
|
119
|
-
- `send_task_to_agent(request: FastAPIRequest, payload: SendMessageRequest) -> SendMessageSuccessResponse` - Submits non-streaming task
|
|
120
|
-
- `subscribe_task_from_agent(request: FastAPIRequest, payload: SendStreamingMessageRequest) -> SendStreamingMessageSuccessResponse` - Submits streaming task
|
|
121
|
-
- `cancel_agent_task(request: FastAPIRequest, taskId: str, payload: CancelTaskRequest) -> Dict[str, str]` - Cancels active task
|
|
122
|
-
|
|
123
|
-
#### users.py
|
|
124
|
-
**Purpose:** Provides current user information with authentication status
|
|
125
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.users import router`
|
|
126
|
-
|
|
127
|
-
**Functions:**
|
|
128
|
-
- `get_current_user_endpoint(user: dict) -> Dict[str, Any]` - Returns current user information with auth status
|
|
129
|
-
|
|
130
|
-
#### visualization.py
|
|
131
|
-
**Purpose:** Manages A2A message visualization streams for real-time monitoring
|
|
132
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.visualization import router, SubscriptionTarget, VisualizationSubscribeRequest`
|
|
133
|
-
|
|
134
|
-
**Classes:**
|
|
135
|
-
- `SubscriptionTarget(BaseModel)` - Defines visualization target
|
|
136
|
-
- `type: str` - Target type (e.g., "current_namespace_a2a_messages", "agent_a2a_messages")
|
|
137
|
-
- `identifier: Optional[str]` - Target identifier (namespace or agent name)
|
|
138
|
-
- `VisualizationSubscribeRequest(BaseModel)` - Subscription request
|
|
139
|
-
- `subscription_targets: Optional[List[SubscriptionTarget]]` - Targets to monitor
|
|
140
|
-
- `client_stream_id: Optional[str]` - Client-generated stream ID for idempotency
|
|
141
|
-
- `VisualizationSubscribeResponse(BaseModel)` - Subscription response with SSE URL
|
|
142
|
-
- `VisualizationConfigUpdateRequest(BaseModel)` - Configuration update request
|
|
143
|
-
- `VisualizationConfigUpdateResponse(BaseModel)` - Configuration update response
|
|
144
|
-
|
|
145
|
-
**Functions:**
|
|
146
|
-
- `subscribe_to_visualization_stream(request_data: VisualizationSubscribeRequest) -> VisualizationSubscribeResponse` - Starts visualization stream with authorization
|
|
147
|
-
- `get_visualization_stream_events(stream_id: str) -> EventSourceResponse` - SSE endpoint for visualization events
|
|
148
|
-
- `update_visualization_stream_config(stream_id: str, update_request: VisualizationConfigUpdateRequest) -> VisualizationConfigUpdateResponse` - Updates stream configuration
|
|
149
|
-
- `unsubscribe_from_visualization_stream(stream_id: str) -> Response` - Terminates visualization stream
|
|
150
|
-
|
|
151
|
-
### Subdirectory APIs
|
|
152
|
-
|
|
153
|
-
#### dto/
|
|
154
|
-
**Purpose:** Provides Data Transfer Objects for request/response validation and serialization with automatic timestamp conversion
|
|
155
|
-
**Key Exports:** Request and response DTOs for session management with field validation and camelCase aliasing
|
|
156
|
-
**Import Examples:**
|
|
157
|
-
```python
|
|
158
|
-
from solace_agent_mesh.gateway.http_sse.routers.dto.requests import GetSessionsRequest, UpdateSessionRequest
|
|
159
|
-
from solace_agent_mesh.gateway.http_sse.routers.dto.responses import SessionResponse, MessageResponse
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
## Complete Usage Guide
|
|
163
|
-
|
|
164
|
-
### 1. Setting Up Routers in FastAPI Application
|
|
165
|
-
|
|
166
|
-
```python
|
|
167
|
-
from fastapi import FastAPI
|
|
168
|
-
from solace_agent_mesh.gateway.http_sse.routers import (
|
|
169
|
-
agent_cards,
|
|
170
|
-
artifacts,
|
|
171
|
-
auth,
|
|
172
|
-
config,
|
|
173
|
-
feedback,
|
|
174
|
-
people,
|
|
175
|
-
sessions,
|
|
176
|
-
sse,
|
|
177
|
-
tasks,
|
|
178
|
-
users,
|
|
179
|
-
visualization
|
|
180
|
-
)
|
|
181
|
-
|
|
182
|
-
app = FastAPI()
|
|
183
|
-
|
|
184
|
-
# Include all routers with appropriate prefixes
|
|
185
|
-
app.include_router(agent_cards.router, prefix="/api/v1", tags=["agents"])
|
|
186
|
-
app.include_router(artifacts.router, prefix="/api/v1/artifacts", tags=["artifacts"])
|
|
187
|
-
app.include_router(auth.router, prefix="/api/v1", tags=["auth"])
|
|
188
|
-
app.include_router(config.router, prefix="/api/v1", tags=["config"])
|
|
189
|
-
app.include_router(feedback.router, prefix="/api/v1", tags=["feedback"])
|
|
190
|
-
app.include_router(people.router, prefix="/api/v1", tags=["people"])
|
|
191
|
-
app.include_router(sessions.router, prefix="/api/v1", tags=["sessions"])
|
|
192
|
-
app.include_router(sse.router, prefix="/api/v1/sse", tags=["sse"])
|
|
193
|
-
app.include_router(tasks.router, prefix="/api/v1/tasks", tags=["tasks"])
|
|
194
|
-
app.include_router(users.router, prefix="/api/v1/users", tags=["users"])
|
|
195
|
-
app.include_router(visualization.router, prefix="/api/v1/visualization", tags=["visualization"])
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
### 2. Agent Discovery and Task Submission
|
|
199
|
-
|
|
200
|
-
```python
|
|
201
|
-
import httpx
|
|
202
|
-
from a2a.types import SendStreamingMessageRequest, Message, MessagePart
|
|
203
|
-
|
|
204
|
-
# Discover available agents
|
|
205
|
-
async def get_available_agents():
|
|
206
|
-
async with httpx.AsyncClient() as client:
|
|
207
|
-
response = await client.get("http://localhost:8000/api/v1/agentCards")
|
|
208
|
-
return response.json()
|
|
209
|
-
|
|
210
|
-
# Submit a streaming task to an agent
|
|
211
|
-
async def submit_streaming_task(agent_name: str, message_text: str, session_id: str):
|
|
212
|
-
# Create message parts
|
|
213
|
-
parts = [MessagePart(text=message_text)]
|
|
214
|
-
|
|
215
|
-
# Create message with metadata
|
|
216
|
-
message = Message(
|
|
217
|
-
parts=parts,
|
|
218
|
-
context_id=session_id,
|
|
219
|
-
metadata={"agent_name": agent_name}
|
|
220
|
-
)
|
|
221
|
-
|
|
222
|
-
# Create request payload
|
|
223
|
-
payload = SendStreamingMessageRequest(
|
|
224
|
-
method="message:stream",
|
|
225
|
-
params={"message": message},
|
|
226
|
-
id="req_123"
|
|
227
|
-
)
|
|
228
|
-
|
|
229
|
-
async with httpx.AsyncClient() as client:
|
|
230
|
-
response = await client.post(
|
|
231
|
-
"http://localhost:8000/api/v1/tasks/message:stream",
|
|
232
|
-
json=payload.model_dump()
|
|
233
|
-
)
|
|
234
|
-
return response.json()
|
|
235
|
-
|
|
236
|
-
# Search historical tasks (admin users can query all users)
|
|
237
|
-
async def search_historical_tasks(start_date: str = None, query_user_id: str = None):
|
|
238
|
-
params = {}
|
|
239
|
-
if start_date:
|
|
240
|
-
params["start_date"] = start_date
|
|
241
|
-
if query_user_id:
|
|
242
|
-
params["query_user_id"] = query_user_id
|
|
243
|
-
|
|
244
|
-
async with httpx.AsyncClient() as client:
|
|
245
|
-
response = await client.get(
|
|
246
|
-
"http://localhost:8000/api/v1/tasks",
|
|
247
|
-
params=params
|
|
248
|
-
)
|
|
249
|
-
return response.json()
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### 3. Real-time Event Streaming with SSE
|
|
253
|
-
|
|
254
|
-
```python
|
|
255
|
-
import asyncio
|
|
256
|
-
import httpx
|
|
257
|
-
import json
|
|
258
|
-
|
|
259
|
-
# Client-side SSE connection for task events
|
|
260
|
-
async def listen_to_task_events(task_id: str):
|
|
261
|
-
async with httpx.AsyncClient() as client:
|
|
262
|
-
async with client.stream(
|
|
263
|
-
"GET",
|
|
264
|
-
f"http://localhost:8000/api/v1/sse/subscribe/{task_id}",
|
|
265
|
-
headers={"Accept": "text/event-stream"}
|
|
266
|
-
) as response:
|
|
267
|
-
async for line in response.aiter_lines():
|
|
268
|
-
if line.startswith("data: "):
|
|
269
|
-
event_data = line[6:] # Remove "data: " prefix
|
|
270
|
-
try:
|
|
271
|
-
parsed_data = json.loads(event_data)
|
|
272
|
-
print(f"Received event: {parsed_data}")
|
|
273
|
-
except json.JSONDecodeError:
|
|
274
|
-
print(f"Received raw data: {event_data}")
|
|
275
|
-
|
|
276
|
-
# Client-side SSE connection for visualization
|
|
277
|
-
async def listen_to_visualization_events(stream_id: str):
|
|
278
|
-
async with httpx.AsyncClient() as client:
|
|
279
|
-
async with client.stream(
|
|
280
|
-
"GET",
|
|
281
|
-
f"http://localhost:8000/api/v1/visualization/{stream_id}/events",
|
|
282
|
-
headers={"Accept": "text/event-stream"}
|
|
283
|
-
) as response:
|
|
284
|
-
async for line in response.aiter_lines():
|
|
285
|
-
if line.startswith("data: "):
|
|
286
|
-
event_data = line[6:]
|
|
287
|
-
print(f"Visualization event: {event_data}")
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
### 4. Comprehensive Artifact Management
|
|
291
|
-
|
|
292
|
-
```python
|
|
293
|
-
import httpx
|
|
294
|
-
import json
|
|
295
|
-
from pathlib import Path
|
|
296
|
-
|
|
297
|
-
# Upload an artifact with metadata and automatic session creation
|
|
298
|
-
async def upload_artifact_with_metadata(session_id: str, filename: str, file_path: Path, metadata: dict = None):
|
|
299
|
-
files = {"upload_file": (filename, file_path.open("rb"))}
|
|
300
|
-
data = {
|
|
301
|
-
"sessionId": session_id, # Can be null/empty to create new session
|
|
302
|
-
"filename": filename
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
if metadata:
|
|
306
|
-
data["metadata_json"] = json.dumps(metadata)
|
|
307
|
-
|
|
308
|
-
async with httpx.AsyncClient() as client:
|
|
309
|
-
response = await client.post(
|
|
310
|
-
"http://localhost:
|
|
311
|
-
|
|
312
|
-
# content_hash: 8e5e35d1d55cb448656d32d58b4600db192110e8de163a93765eef3e04086329
|
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
# DEVELOPER GUIDE: services
|
|
2
|
-
|
|
3
|
-
## Quick Summary
|
|
4
|
-
The `services` directory contains the business logic layer for the HTTP SSE Gateway. It provides high-level services for agent management (discovering and retrieving A2A agents), user feedback processing with database persistence and event publishing, user search via identity services, session management with database persistence, task logging to database, data retention/cleanup, and A2A task operations like cancellation.
|
|
5
|
-
|
|
6
|
-
## Files Overview
|
|
7
|
-
- `__init__.py` - Package initialization file marking the directory as a Python package
|
|
8
|
-
- `agent_card_service.py` - Service for retrieving information about discovered A2A agents from the registry
|
|
9
|
-
- `data_retention_service.py` - Service for automatic cleanup of old tasks and feedback based on retention policies
|
|
10
|
-
- `feedback_service.py` - Service for processing and storing user feedback on chat messages with database and event publishing
|
|
11
|
-
- `people_service.py` - Service for searching users via configured identity services
|
|
12
|
-
- `session_service.py` - Service for managing chat sessions and messages with database persistence
|
|
13
|
-
- `task_logger_service.py` - Service for logging A2A tasks and events to the database
|
|
14
|
-
- `task_service.py` - Service for handling A2A task operations like cancellation
|
|
15
|
-
|
|
16
|
-
## Developer API Reference
|
|
17
|
-
|
|
18
|
-
### __init__.py
|
|
19
|
-
**Purpose:** Marks the services directory as a Python package
|
|
20
|
-
**Import:** N/A - No public interfaces
|
|
21
|
-
|
|
22
|
-
### agent_card_service.py
|
|
23
|
-
**Purpose:** Provides methods for accessing information about discovered A2A agents from the shared AgentRegistry
|
|
24
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.services.agent_card_service import AgentCardService`
|
|
25
|
-
|
|
26
|
-
**Classes:**
|
|
27
|
-
- `AgentCardService(agent_registry: AgentRegistry)` - Service for accessing discovered A2A agent information
|
|
28
|
-
- `get_all_agent_cards() -> List[AgentCard]` - Retrieves all currently discovered and registered agent cards
|
|
29
|
-
- `get_agent_card_by_name(agent_name: str) -> Optional[AgentCard]` - Retrieves a specific agent card by name, returns None if not found
|
|
30
|
-
|
|
31
|
-
**Usage Examples:**
|
|
32
|
-
```python
|
|
33
|
-
from solace_agent_mesh.gateway.http_sse.services.agent_card_service import AgentCardService
|
|
34
|
-
from solace_agent_mesh.common.agent_registry import AgentRegistry
|
|
35
|
-
|
|
36
|
-
# Initialize with shared agent registry
|
|
37
|
-
agent_registry = AgentRegistry() # Usually injected as shared instance
|
|
38
|
-
agent_service = AgentCardService(agent_registry=agent_registry)
|
|
39
|
-
|
|
40
|
-
# Get all available agents
|
|
41
|
-
all_agents = agent_service.get_all_agent_cards()
|
|
42
|
-
print(f"Found {len(all_agents)} agents")
|
|
43
|
-
|
|
44
|
-
# Get specific agent by name
|
|
45
|
-
agent = agent_service.get_agent_card_by_name("data-processor")
|
|
46
|
-
if agent:
|
|
47
|
-
print(f"Found agent: {agent.name}")
|
|
48
|
-
else:
|
|
49
|
-
print("Agent not found")
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### data_retention_service.py
|
|
53
|
-
**Purpose:** Service for automatically cleaning up old tasks, task events, and feedback based on configurable retention policies
|
|
54
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.services.data_retention_service import DataRetentionService`
|
|
55
|
-
|
|
56
|
-
**Classes:**
|
|
57
|
-
- `DataRetentionService(session_factory: Callable[[], DBSession] | None, config: Dict[str, Any])` - Service for automatic data cleanup based on retention policies
|
|
58
|
-
- `cleanup_old_data() -> None` - Main orchestration method for cleaning up old data, calls cleanup methods for tasks and feedback
|
|
59
|
-
|
|
60
|
-
**Constants/Variables:**
|
|
61
|
-
- `MIN_RETENTION_DAYS: int` - Minimum retention period (1 day)
|
|
62
|
-
- `MIN_CLEANUP_INTERVAL_HOURS: int` - Minimum cleanup interval (1 hour)
|
|
63
|
-
- `MIN_BATCH_SIZE: int` - Minimum batch size for deletion (1)
|
|
64
|
-
- `MAX_BATCH_SIZE: int` - Maximum batch size for deletion (10000)
|
|
65
|
-
|
|
66
|
-
**Usage Examples:**
|
|
67
|
-
```python
|
|
68
|
-
from solace_agent_mesh.gateway.http_sse.services.data_retention_service import DataRetentionService
|
|
69
|
-
from sqlalchemy.orm import sessionmaker
|
|
70
|
-
|
|
71
|
-
# Initialize with database session factory and config
|
|
72
|
-
session_factory = sessionmaker(bind=your_engine)
|
|
73
|
-
config = {
|
|
74
|
-
"enabled": True,
|
|
75
|
-
"task_retention_days": 90,
|
|
76
|
-
"feedback_retention_days": 90,
|
|
77
|
-
"cleanup_interval_hours": 24,
|
|
78
|
-
"batch_size": 1000
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
retention_service = DataRetentionService(
|
|
82
|
-
session_factory=session_factory,
|
|
83
|
-
config=config
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
# Run cleanup (typically called by scheduler)
|
|
87
|
-
retention_service.cleanup_old_data()
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### feedback_service.py
|
|
91
|
-
**Purpose:** Handles the business logic for processing and storing user feedback with database persistence and event publishing
|
|
92
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.services.feedback_service import FeedbackService`
|
|
93
|
-
|
|
94
|
-
**Classes:**
|
|
95
|
-
- `FeedbackService(session_factory: Callable[[], DBSession] | None, component: WebUIBackendComponent, task_repo: ITaskRepository)` - Service for processing user feedback with database persistence and event publishing
|
|
96
|
-
- `process_feedback(payload: FeedbackPayload, user_id: str) -> None` - Asynchronously processes and stores feedback, publishes events if configured
|
|
97
|
-
|
|
98
|
-
**Usage Examples:**
|
|
99
|
-
```python
|
|
100
|
-
import asyncio
|
|
101
|
-
from solace_agent_mesh.gateway.http_sse.services.feedback_service import FeedbackService
|
|
102
|
-
from sqlalchemy.orm import sessionmaker
|
|
103
|
-
|
|
104
|
-
# Initialize with database session factory
|
|
105
|
-
session_factory = sessionmaker(bind=your_engine)
|
|
106
|
-
component = YourWebUIBackendComponent() # Your component instance
|
|
107
|
-
task_repo = YourTaskRepository() # Your task repository
|
|
108
|
-
|
|
109
|
-
feedback_service = FeedbackService(
|
|
110
|
-
session_factory=session_factory,
|
|
111
|
-
component=component,
|
|
112
|
-
task_repo=task_repo
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
# Process feedback (requires FeedbackPayload from router)
|
|
116
|
-
async def process_user_feedback():
|
|
117
|
-
# payload would be a FeedbackPayload instance from the router
|
|
118
|
-
await feedback_service.process_feedback(payload, user_id="user123")
|
|
119
|
-
|
|
120
|
-
asyncio.run(process_user_feedback())
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### people_service.py
|
|
124
|
-
**Purpose:** Provides user search functionality via configured identity services
|
|
125
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.services.people_service import PeopleService`
|
|
126
|
-
|
|
127
|
-
**Classes:**
|
|
128
|
-
- `PeopleService(identity_service: Optional[BaseIdentityService])` - Service for searching and retrieving user information
|
|
129
|
-
- `search_for_users(query: str, limit: int = 10) -> List[Dict[str, Any]]` - Asynchronously searches for users, returns empty list if no identity service configured or query too short
|
|
130
|
-
|
|
131
|
-
**Usage Examples:**
|
|
132
|
-
```python
|
|
133
|
-
import asyncio
|
|
134
|
-
from solace_agent_mesh.gateway.http_sse.services.people_service import PeopleService
|
|
135
|
-
from solace_agent_mesh.common.services.identity_service import BaseIdentityService
|
|
136
|
-
|
|
137
|
-
# Initialize with identity service
|
|
138
|
-
identity_service = SomeIdentityService() # Your identity service implementation
|
|
139
|
-
people_service = PeopleService(identity_service=identity_service)
|
|
140
|
-
|
|
141
|
-
async def search_users():
|
|
142
|
-
# Search for users
|
|
143
|
-
users = await people_service.search_for_users("john", limit=5)
|
|
144
|
-
for user in users:
|
|
145
|
-
print(f"User: {user.get('name')} - {user.get('email')}")
|
|
146
|
-
|
|
147
|
-
# Initialize without identity service (graceful degradation)
|
|
148
|
-
people_service_no_id = PeopleService(identity_service=None)
|
|
149
|
-
# search_for_users will return empty list
|
|
150
|
-
|
|
151
|
-
asyncio.run(search_users())
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### session_service.py
|
|
155
|
-
**Purpose:** Manages chat sessions and messages with database persistence support
|
|
156
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.services.session_service import SessionService`
|
|
157
|
-
|
|
158
|
-
**Classes:**
|
|
159
|
-
- `SessionService(component: WebUIBackendComponent = None)` - Service for managing chat sessions and messages
|
|
160
|
-
- `is_persistence_enabled() -> bool` - Checks if the service is configured with a persistent backend
|
|
161
|
-
- `get_user_sessions(db: DbSession, user_id: UserId, pagination: PaginationParams | None = None) -> PaginatedResponse[Session]` - Retrieves paginated sessions for a user
|
|
162
|
-
- `get_session_details(db: DbSession, session_id: SessionId, user_id: UserId) -> Session | None` - Gets session details for a specific session
|
|
163
|
-
- `create_session(db: DbSession, user_id: UserId, name: str | None = None, agent_id: str | None = None, session_id: str | None = None) -> Optional[Session]` - Creates a new session
|
|
164
|
-
- `update_session_name(db: DbSession, session_id: SessionId, user_id: UserId, name: str) -> Session | None` - Updates session name
|
|
165
|
-
- `delete_session_with_notifications(db: DbSession, session_id: SessionId, user_id: UserId) -> bool` - Deletes session and notifies agents
|
|
166
|
-
- `save_task(db: DbSession, task_id: str, session_id: str, user_id: str, user_message: Optional[str], message_bubbles: str, task_metadata: Optional[str] = None) -> ChatTask` - Saves a complete task interaction
|
|
167
|
-
- `get_session_tasks(db: DbSession, session_id: str, user_id: str) -> List[ChatTask]` - Gets all tasks for a session
|
|
168
|
-
- `get_session_messages_from_tasks(db: DbSession, session_id: str, user_id: str) -> List[Dict[str, Any]]` - Gets session messages by flattening task message_bubbles for backward compatibility
|
|
169
|
-
|
|
170
|
-
**Usage Examples:**
|
|
171
|
-
```python
|
|
172
|
-
from solace_agent_mesh.gateway.http_sse.services.session_service import SessionService
|
|
173
|
-
from sqlalchemy.orm import Session as DbSession
|
|
174
|
-
|
|
175
|
-
# Initialize with component
|
|
176
|
-
component = YourWebUIBackendComponent() # Your component
|
|
177
|
-
session_service = SessionService(component=component)
|
|
178
|
-
|
|
179
|
-
# Use with database session
|
|
180
|
-
with your_session_factory() as db:
|
|
181
|
-
# Create a new session
|
|
182
|
-
session = session_service.create_session(
|
|
183
|
-
db=db,
|
|
184
|
-
user_id="user123",
|
|
185
|
-
name="My Chat Session",
|
|
186
|
-
agent_id="assistant-agent"
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
# Save a task with message bubbles
|
|
190
|
-
import json
|
|
191
|
-
message_bubbles = json.dumps([
|
|
192
|
-
{"type": "user", "text": "Hello", "id": "msg1"},
|
|
193
|
-
{"type": "agent", "text": "Hi there!", "id": "msg2"}
|
|
194
|
-
])
|
|
195
|
-
|
|
196
|
-
task = session_service.save_task(
|
|
197
|
-
db=db,
|
|
198
|
-
task_id="task-123",
|
|
199
|
-
session_id=session.id,
|
|
200
|
-
user_id="user123",
|
|
201
|
-
user_message="Hello",
|
|
202
|
-
message_bubbles=message_bubbles
|
|
203
|
-
)
|
|
204
|
-
|
|
205
|
-
# Get user's sessions with pagination
|
|
206
|
-
paginated_sessions = session_service.get_user_sessions(db, "user123")
|
|
207
|
-
|
|
208
|
-
db.commit()
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### task_logger_service.py
|
|
212
|
-
**Purpose:** Service for logging A2A tasks and events to the database with configurable filtering and sanitization
|
|
213
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.services.task_logger_service import TaskLoggerService`
|
|
214
|
-
|
|
215
|
-
**Classes:**
|
|
216
|
-
- `TaskLoggerService(session_factory: Callable[[], DBSession] | None, config: Dict[str, Any])` - Service for logging A2A tasks and events to database
|
|
217
|
-
- `log_event(event_data: Dict[str, Any]) -> None` - Parses a raw A2A message and logs it as a task event, creates or updates master task record
|
|
218
|
-
|
|
219
|
-
**Usage Examples:**
|
|
220
|
-
```python
|
|
221
|
-
from solace_agent_mesh.gateway.http_sse.services.task_logger_service import TaskLoggerService
|
|
222
|
-
from sqlalchemy.orm import sessionmaker
|
|
223
|
-
|
|
224
|
-
# Initialize with database session factory and config
|
|
225
|
-
session_factory = sessionmaker(bind=your_engine)
|
|
226
|
-
config = {
|
|
227
|
-
"enabled": True,
|
|
228
|
-
"log_status_updates": True,
|
|
229
|
-
"log_artifact_events": False,
|
|
230
|
-
"log_file_parts": True,
|
|
231
|
-
"max_file_part_size_bytes": 102400
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
task_logger = TaskLoggerService(
|
|
235
|
-
session_factory=session_factory,
|
|
236
|
-
config=config
|
|
237
|
-
)
|
|
238
|
-
|
|
239
|
-
# Log an A2A event
|
|
240
|
-
event_data = {
|
|
241
|
-
"topic": "sam/agents/my-agent/request",
|
|
242
|
-
"payload": {"id": "task-123", "method": "sendMessage"},
|
|
243
|
-
"user_properties": {"userId": "user@example.com"}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
task_logger.log_event(event_data)
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
### task_service.py
|
|
250
|
-
**Purpose:** Handles A2A task operations, specifically task cancellation using CoreA2AService and message publishing
|
|
251
|
-
**Import:** `from solace_agent_mesh.gateway.http_sse.services.task_service import TaskService, PublishFunc`
|
|
252
|
-
|
|
253
|
-
**Type Aliases:**
|
|
254
|
-
- `PublishFunc: Callable[[str, Dict, Optional[Dict]], None]` - Function type for publishing messages (topic, payload, user_properties)
|
|
255
|
-
|
|
256
|
-
**Classes:**
|
|
257
|
-
- `TaskService(core_a2a_service: CoreA2AService, publish_func: PublishFunc, namespace: str, gateway_id: str, sse_manager: SSEManager, task_context_map: Dict[str, Dict], task_context_lock: threading.Lock, app_name: str)` - Service for managing A2A task operations
|
|
258
|
-
- `cancel_task(agent_name: str, task_id: str, client_id: str, user_id: str = "web_user") -> None` - Asynchronously cancels a task by publishing A2A CancelTaskRequest message
|
|
259
|
-
|
|
260
|
-
**Usage Examples:**
|
|
261
|
-
```python
|
|
262
|
-
import asyncio
|
|
263
|
-
import threading
|
|
264
|
-
from solace_agent_mesh.gateway.http_sse.services.task_service import TaskService, PublishFunc
|
|
265
|
-
from solace_agent_mesh.core_a2a.service import CoreA2AService
|
|
266
|
-
from solace_agent_mesh.gateway.http_sse.sse_manager import SSEManager
|
|
267
|
-
|
|
268
|
-
# Define publish function
|
|
269
|
-
def my_publish_func(topic: str, payload: dict, user_properties: dict = None):
|
|
270
|
-
print(f"Publishing to {topic}: {payload}")
|
|
271
|
-
# Your actual message publishing logic here
|
|
272
|
-
|
|
273
|
-
# Initialize dependencies
|
|
274
|
-
core_a2a_service = CoreA2AService() # Your core A2A service
|
|
275
|
-
sse_manager = SSEManager()
|
|
276
|
-
task_context_map = {}
|
|
277
|
-
task_context_lock = threading.Lock()
|
|
278
|
-
|
|
279
|
-
# Create task service
|
|
280
|
-
task_service = TaskService(
|
|
281
|
-
core_a2a_service=core_a2a_service,
|
|
282
|
-
publish_func=my_publish_func,
|
|
283
|
-
namespace="my-namespace",
|
|
284
|
-
gateway_id="gateway-01",
|
|
285
|
-
sse_manager=sse_manager,
|
|
286
|
-
task_context_map=task_context_map,
|
|
287
|
-
task_context_lock=task_context_lock,
|
|
288
|
-
app_name="my-app"
|
|
289
|
-
)
|
|
290
|
-
|
|
291
|
-
async def cancel_task_example():
|
|
292
|
-
# Cancel a task
|
|
293
|
-
await task_service.cancel_task(
|
|
294
|
-
agent_name="data-processor",
|
|
295
|
-
task_id="task-123",
|
|
296
|
-
client_id="client-456",
|
|
297
|
-
user_id="user@example.com"
|
|
298
|
-
)
|
|
299
|
-
|
|
300
|
-
asyncio.run(cancel_task_example())
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
# content_hash: 09bc3008d9a6c148b0b9d7477d20b26514f7fc4ee72f36eda5348f8f7d51f2ea
|