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,174 +0,0 @@
|
|
|
1
|
-
# DEVELOPER GUIDE: middleware
|
|
2
|
-
|
|
3
|
-
## Quick Summary
|
|
4
|
-
The `middleware` directory provides a pluggable framework for system components that can be extended or replaced at runtime. It offers a registry system to dynamically bind custom implementations for core functionalities like configuration resolution. The default implementations provide permissive behavior, making them suitable for development and testing environments where all features are enabled by default.
|
|
5
|
-
|
|
6
|
-
## Files Overview
|
|
7
|
-
- `__init__.py`: Exposes the main public classes of the middleware package for easy importing.
|
|
8
|
-
- `config_resolver.py`: Defines the default, permissive configuration resolution middleware.
|
|
9
|
-
- `registry.py`: Provides the `MiddlewareRegistry` for dynamically binding custom middleware implementations.
|
|
10
|
-
|
|
11
|
-
## Developer API Reference
|
|
12
|
-
|
|
13
|
-
### __init__.py
|
|
14
|
-
**Purpose:** This file serves as the entry point to the `middleware` package, exporting the primary public interfaces for developers to use.
|
|
15
|
-
|
|
16
|
-
**Import:** `from solace_agent_mesh.common.middleware import ConfigResolver, MiddlewareRegistry`
|
|
17
|
-
|
|
18
|
-
**Usage Examples:**
|
|
19
|
-
```python
|
|
20
|
-
# Import the main classes directly from the middleware package
|
|
21
|
-
from solace_agent_mesh.common.middleware import ConfigResolver, MiddlewareRegistry
|
|
22
|
-
|
|
23
|
-
# Now you can use ConfigResolver and MiddlewareRegistry
|
|
24
|
-
print(ConfigResolver)
|
|
25
|
-
print(MiddlewareRegistry)
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### config_resolver.py
|
|
29
|
-
**Purpose:** This file provides a pluggable interface for resolving user-specific configuration and determining feature availability. The default `ConfigResolver` class is permissive, allowing all operations and enabling all features, which is ideal for development or simple deployments.
|
|
30
|
-
|
|
31
|
-
**Import:** `from solace_agent_mesh.common.middleware import ConfigResolver`
|
|
32
|
-
|
|
33
|
-
**Classes:**
|
|
34
|
-
- `ConfigResolver()` - A class containing static methods to resolve user-specific configuration and determine feature availability. This default implementation is permissive.
|
|
35
|
-
- `resolve_user_config(user_identity: Any, gateway_context: Dict[str, Any], base_config: Dict[str, Any]) -> Dict[str, Any]` - (async) Resolves user-specific configuration. The default implementation returns the `base_config` unchanged.
|
|
36
|
-
- `is_feature_enabled(user_config: Dict[str, Any], feature_descriptor: Dict[str, Any], context: Dict[str, Any]) -> bool` - Checks if a feature is enabled for a user. The default implementation always returns `True`.
|
|
37
|
-
- `validate_operation_config(user_config: Dict[str, Any], operation_spec: Dict[str, Any], validation_context: Dict[str, Any]) -> Dict[str, Any]` - Validates if an operation is allowed for a user. The default implementation always returns a dictionary with `{'valid': True}`.
|
|
38
|
-
- `filter_available_options(user_config: Dict[str, Any], available_options: List[Dict[str, Any]], filter_context: Dict[str, Any]) -> List[Dict[str, Any]]` - Filters a list of options based on user permissions. The default implementation returns the original `available_options` list.
|
|
39
|
-
|
|
40
|
-
**Usage Examples:**
|
|
41
|
-
```python
|
|
42
|
-
import asyncio
|
|
43
|
-
from solace_agent_mesh.common.middleware import ConfigResolver
|
|
44
|
-
|
|
45
|
-
async def main():
|
|
46
|
-
# Example user identity and base configuration
|
|
47
|
-
user_id = "test-user@example.com"
|
|
48
|
-
base_conf = {"api_key": "default_key", "allowed_models": ["gpt-3.5-turbo"]}
|
|
49
|
-
|
|
50
|
-
# 1. Resolve user configuration (default implementation returns base_conf)
|
|
51
|
-
user_config = await ConfigResolver.resolve_user_config(
|
|
52
|
-
user_identity=user_id,
|
|
53
|
-
gateway_context={"gateway_id": "gw-1"},
|
|
54
|
-
base_config=base_conf
|
|
55
|
-
)
|
|
56
|
-
print(f"Resolved User Config: {user_config}")
|
|
57
|
-
|
|
58
|
-
# 2. Check if a feature is enabled (default is always True)
|
|
59
|
-
feature_desc = {"feature_type": "ai_tool", "function_name": "code_interpreter"}
|
|
60
|
-
is_enabled = ConfigResolver.is_feature_enabled(
|
|
61
|
-
user_config=user_config,
|
|
62
|
-
feature_descriptor=feature_desc,
|
|
63
|
-
context={}
|
|
64
|
-
)
|
|
65
|
-
print(f"Is Feature Enabled: {is_enabled}")
|
|
66
|
-
|
|
67
|
-
# 3. Validate an operation (default is always valid)
|
|
68
|
-
op_spec = {"operation_type": "model_inference", "model": "gpt-4"}
|
|
69
|
-
validation = ConfigResolver.validate_operation_config(
|
|
70
|
-
user_config=user_config,
|
|
71
|
-
operation_spec=op_spec,
|
|
72
|
-
validation_context={}
|
|
73
|
-
)
|
|
74
|
-
print(f"Operation Validation: {validation}")
|
|
75
|
-
|
|
76
|
-
# 4. Filter available options (default returns all options)
|
|
77
|
-
all_models = [
|
|
78
|
-
{"name": "gpt-3.5-turbo", "provider": "openai"},
|
|
79
|
-
{"name": "gpt-4", "provider": "openai"},
|
|
80
|
-
]
|
|
81
|
-
available_models = ConfigResolver.filter_available_options(
|
|
82
|
-
user_config=user_config,
|
|
83
|
-
available_options=all_models,
|
|
84
|
-
filter_context={"type": "language_model"}
|
|
85
|
-
)
|
|
86
|
-
print(f"Filtered Options: {available_models}")
|
|
87
|
-
|
|
88
|
-
if __name__ == "__main__":
|
|
89
|
-
asyncio.run(main())
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### registry.py
|
|
93
|
-
**Purpose:** This file provides the `MiddlewareRegistry`, a static class that allows developers to dynamically bind, or "plug in," their own custom middleware implementations at runtime. This is the core of the pluggable system.
|
|
94
|
-
|
|
95
|
-
**Import:** `from solace_agent_mesh.common.middleware import MiddlewareRegistry`
|
|
96
|
-
|
|
97
|
-
**Classes:**
|
|
98
|
-
- `MiddlewareRegistry()` - A registry for managing middleware implementations. All methods are class methods.
|
|
99
|
-
- `bind_config_resolver(resolver_class: Type)` - Binds a custom class that implements the `ConfigResolver` interface. This new class will be used for all subsequent configuration resolution calls.
|
|
100
|
-
- `get_config_resolver() -> Type` - Returns the currently bound `ConfigResolver` class. If no custom resolver has been bound, it returns the default `ConfigResolver`.
|
|
101
|
-
- `register_initialization_callback(callback: callable)` - Registers a function to be executed when `initialize_middleware()` is called. Useful for setting up custom middleware components at application startup.
|
|
102
|
-
- `initialize_middleware()` - Executes all registered initialization callbacks. This should be called once during application startup.
|
|
103
|
-
- `reset_bindings()` - Resets all bindings back to their defaults. This is primarily useful for testing environments.
|
|
104
|
-
- `get_registry_status() -> Dict[str, Any]` - Returns a dictionary containing the current status of the registry, such as which resolver is bound.
|
|
105
|
-
|
|
106
|
-
**Usage Examples:**
|
|
107
|
-
```python
|
|
108
|
-
import asyncio
|
|
109
|
-
from typing import Any, Dict, List
|
|
110
|
-
from solace_agent_mesh.common.middleware import MiddlewareRegistry, ConfigResolver
|
|
111
|
-
|
|
112
|
-
# 1. Define a custom ConfigResolver implementation
|
|
113
|
-
class MyCustomConfigResolver:
|
|
114
|
-
"""A custom resolver that only allows 'admin' users to use 'gpt-4'."""
|
|
115
|
-
@staticmethod
|
|
116
|
-
async def resolve_user_config(user_identity: Any, gateway_context: Dict[str, Any], base_config: Dict[str, Any]) -> Dict[str, Any]:
|
|
117
|
-
if user_identity == "admin":
|
|
118
|
-
return {"role": "admin", "allowed_models": ["gpt-4", "gpt-3.5-turbo"]}
|
|
119
|
-
return {"role": "user", "allowed_models": ["gpt-3.5-turbo"]}
|
|
120
|
-
|
|
121
|
-
@staticmethod
|
|
122
|
-
def validate_operation_config(user_config: Dict, operation_spec: Dict, validation_context: Dict) -> Dict:
|
|
123
|
-
model = operation_spec.get("model")
|
|
124
|
-
if model and model not in user_config.get("allowed_models", []):
|
|
125
|
-
return {"valid": False, "reason": f"Model '{model}' not allowed for this user."}
|
|
126
|
-
return {"valid": True}
|
|
127
|
-
|
|
128
|
-
# Inherit other methods from the default for simplicity
|
|
129
|
-
is_feature_enabled = ConfigResolver.is_feature_enabled
|
|
130
|
-
filter_available_options = ConfigResolver.filter_available_options
|
|
131
|
-
|
|
132
|
-
# 2. Define an initialization callback
|
|
133
|
-
def setup_custom_logging():
|
|
134
|
-
print("Custom middleware initialization logic is running!")
|
|
135
|
-
|
|
136
|
-
# 3. Bind the custom components
|
|
137
|
-
MiddlewareRegistry.bind_config_resolver(MyCustomConfigResolver)
|
|
138
|
-
MiddlewareRegistry.register_initialization_callback(setup_custom_logging)
|
|
139
|
-
|
|
140
|
-
# 4. Initialize the middleware (e.g., at application startup)
|
|
141
|
-
print("--- Initializing Middleware ---")
|
|
142
|
-
MiddlewareRegistry.initialize_middleware()
|
|
143
|
-
print("--- Initialization Complete ---")
|
|
144
|
-
|
|
145
|
-
# 5. Use the middleware system
|
|
146
|
-
async def check_permissions():
|
|
147
|
-
# The registry will now use MyCustomConfigResolver automatically
|
|
148
|
-
CurrentResolver = MiddlewareRegistry.get_config_resolver()
|
|
149
|
-
print(f"Current resolver is: {CurrentResolver.__name__}")
|
|
150
|
-
|
|
151
|
-
# Check an admin user
|
|
152
|
-
admin_config = await CurrentResolver.resolve_user_config("admin", {}, {})
|
|
153
|
-
validation_result = CurrentResolver.validate_operation_config(
|
|
154
|
-
admin_config, {"model": "gpt-4"}, {}
|
|
155
|
-
)
|
|
156
|
-
print(f"Admin validation for gpt-4: {validation_result}")
|
|
157
|
-
|
|
158
|
-
# Check a regular user
|
|
159
|
-
user_config = await CurrentResolver.resolve_user_config("user", {}, {})
|
|
160
|
-
validation_result = CurrentResolver.validate_operation_config(
|
|
161
|
-
user_config, {"model": "gpt-4"}, {}
|
|
162
|
-
)
|
|
163
|
-
print(f"User validation for gpt-4: {validation_result}")
|
|
164
|
-
|
|
165
|
-
# Run the example
|
|
166
|
-
asyncio.run(check_permissions())
|
|
167
|
-
|
|
168
|
-
# 6. Check status and reset (useful for testing)
|
|
169
|
-
print(f"\nRegistry Status: {MiddlewareRegistry.get_registry_status()}")
|
|
170
|
-
MiddlewareRegistry.reset_bindings()
|
|
171
|
-
print(f"Registry Status after reset: {MiddlewareRegistry.get_registry_status()}")
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
# content_hash: eb6f60d7fdc4a0fb198bf8cc5644c3d372a72ebf46870c79282f230b07637095
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
# LLM Summary Detail File
|
|
2
|
-
|
|
3
|
-
This file is a concatenation of all individual *llm.txt files found in the 'middleware' directory tree. Each section below corresponds to a specific directory's summary file.
|
|
4
|
-
|
|
5
|
-
================================================================================
|
|
6
|
-
|
|
7
|
-
## Section 1: solace_agent_mesh/common/middleware/middleware_llm.txt
|
|
8
|
-
|
|
9
|
-
**Source file:** `solace_agent_mesh/common/middleware/middleware_llm.txt`
|
|
10
|
-
|
|
11
|
-
# DEVELOPER GUIDE: middleware
|
|
12
|
-
|
|
13
|
-
## Quick Summary
|
|
14
|
-
The `middleware` directory provides a pluggable framework for system components that can be extended or replaced at runtime. It offers a registry system to dynamically bind custom implementations for core functionalities like configuration resolution. The default implementations provide permissive behavior, making them suitable for development and testing environments where all features are enabled by default.
|
|
15
|
-
|
|
16
|
-
## Files Overview
|
|
17
|
-
- `__init__.py`: Exposes the main public classes of the middleware package for easy importing.
|
|
18
|
-
- `config_resolver.py`: Defines the default, permissive configuration resolution middleware.
|
|
19
|
-
- `registry.py`: Provides the `MiddlewareRegistry` for dynamically binding custom middleware implementations.
|
|
20
|
-
|
|
21
|
-
## Developer API Reference
|
|
22
|
-
|
|
23
|
-
### __init__.py
|
|
24
|
-
**Purpose:** This file serves as the entry point to the `middleware` package, exporting the primary public interfaces for developers to use.
|
|
25
|
-
|
|
26
|
-
**Import:** `from solace_agent_mesh.common.middleware import ConfigResolver, MiddlewareRegistry`
|
|
27
|
-
|
|
28
|
-
**Usage Examples:**
|
|
29
|
-
```python
|
|
30
|
-
# Import the main classes directly from the middleware package
|
|
31
|
-
from solace_agent_mesh.common.middleware import ConfigResolver, MiddlewareRegistry
|
|
32
|
-
|
|
33
|
-
# Now you can use ConfigResolver and MiddlewareRegistry
|
|
34
|
-
print(ConfigResolver)
|
|
35
|
-
print(MiddlewareRegistry)
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### config_resolver.py
|
|
39
|
-
**Purpose:** This file provides a pluggable interface for resolving user-specific configuration and determining feature availability. The default `ConfigResolver` class is permissive, allowing all operations and enabling all features, which is ideal for development or simple deployments.
|
|
40
|
-
|
|
41
|
-
**Import:** `from solace_agent_mesh.common.middleware import ConfigResolver`
|
|
42
|
-
|
|
43
|
-
**Classes:**
|
|
44
|
-
- `ConfigResolver()` - A class containing static methods to resolve user-specific configuration and determine feature availability. This default implementation is permissive.
|
|
45
|
-
- `resolve_user_config(user_identity: Any, gateway_context: Dict[str, Any], base_config: Dict[str, Any]) -> Dict[str, Any]` - (async) Resolves user-specific configuration. The default implementation returns the `base_config` unchanged.
|
|
46
|
-
- `is_feature_enabled(user_config: Dict[str, Any], feature_descriptor: Dict[str, Any], context: Dict[str, Any]) -> bool` - Checks if a feature is enabled for a user. The default implementation always returns `True`.
|
|
47
|
-
- `validate_operation_config(user_config: Dict[str, Any], operation_spec: Dict[str, Any], validation_context: Dict[str, Any]) -> Dict[str, Any]` - Validates if an operation is allowed for a user. The default implementation always returns a dictionary with `{'valid': True}`.
|
|
48
|
-
- `filter_available_options(user_config: Dict[str, Any], available_options: List[Dict[str, Any]], filter_context: Dict[str, Any]) -> List[Dict[str, Any]]` - Filters a list of options based on user permissions. The default implementation returns the original `available_options` list.
|
|
49
|
-
|
|
50
|
-
**Usage Examples:**
|
|
51
|
-
```python
|
|
52
|
-
import asyncio
|
|
53
|
-
from solace_agent_mesh.common.middleware import ConfigResolver
|
|
54
|
-
|
|
55
|
-
async def main():
|
|
56
|
-
# Example user identity and base configuration
|
|
57
|
-
user_id = "test-user@example.com"
|
|
58
|
-
base_conf = {"api_key": "default_key", "allowed_models": ["gpt-3.5-turbo"]}
|
|
59
|
-
|
|
60
|
-
# 1. Resolve user configuration (default implementation returns base_conf)
|
|
61
|
-
user_config = await ConfigResolver.resolve_user_config(
|
|
62
|
-
user_identity=user_id,
|
|
63
|
-
gateway_context={"gateway_id": "gw-1"},
|
|
64
|
-
base_config=base_conf
|
|
65
|
-
)
|
|
66
|
-
print(f"Resolved User Config: {user_config}")
|
|
67
|
-
|
|
68
|
-
# 2. Check if a feature is enabled (default is always True)
|
|
69
|
-
feature_desc = {"feature_type": "ai_tool", "function_name": "code_interpreter"}
|
|
70
|
-
is_enabled = ConfigResolver.is_feature_enabled(
|
|
71
|
-
user_config=user_config,
|
|
72
|
-
feature_descriptor=feature_desc,
|
|
73
|
-
context={}
|
|
74
|
-
)
|
|
75
|
-
print(f"Is Feature Enabled: {is_enabled}")
|
|
76
|
-
|
|
77
|
-
# 3. Validate an operation (default is always valid)
|
|
78
|
-
op_spec = {"operation_type": "model_inference", "model": "gpt-4"}
|
|
79
|
-
validation = ConfigResolver.validate_operation_config(
|
|
80
|
-
user_config=user_config,
|
|
81
|
-
operation_spec=op_spec,
|
|
82
|
-
validation_context={}
|
|
83
|
-
)
|
|
84
|
-
print(f"Operation Validation: {validation}")
|
|
85
|
-
|
|
86
|
-
# 4. Filter available options (default returns all options)
|
|
87
|
-
all_models = [
|
|
88
|
-
{"name": "gpt-3.5-turbo", "provider": "openai"},
|
|
89
|
-
{"name": "gpt-4", "provider": "openai"},
|
|
90
|
-
]
|
|
91
|
-
available_models = ConfigResolver.filter_available_options(
|
|
92
|
-
user_config=user_config,
|
|
93
|
-
available_options=all_models,
|
|
94
|
-
filter_context={"type": "language_model"}
|
|
95
|
-
)
|
|
96
|
-
print(f"Filtered Options: {available_models}")
|
|
97
|
-
|
|
98
|
-
if __name__ == "__main__":
|
|
99
|
-
asyncio.run(main())
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
### registry.py
|
|
103
|
-
**Purpose:** This file provides the `MiddlewareRegistry`, a static class that allows developers to dynamically bind, or "plug in," their own custom middleware implementations at runtime. This is the core of the pluggable system.
|
|
104
|
-
|
|
105
|
-
**Import:** `from solace_agent_mesh.common.middleware import MiddlewareRegistry`
|
|
106
|
-
|
|
107
|
-
**Classes:**
|
|
108
|
-
- `MiddlewareRegistry()` - A registry for managing middleware implementations. All methods are class methods.
|
|
109
|
-
- `bind_config_resolver(resolver_class: Type)` - Binds a custom class that implements the `ConfigResolver` interface. This new class will be used for all subsequent configuration resolution calls.
|
|
110
|
-
- `get_config_resolver() -> Type` - Returns the currently bound `ConfigResolver` class. If no custom resolver has been bound, it returns the default `ConfigResolver`.
|
|
111
|
-
- `register_initialization_callback(callback: callable)` - Registers a function to be executed when `initialize_middleware()` is called. Useful for setting up custom middleware components at application startup.
|
|
112
|
-
- `initialize_middleware()` - Executes all registered initialization callbacks. This should be called once during application startup.
|
|
113
|
-
- `reset_bindings()` - Resets all bindings back to their defaults. This is primarily useful for testing environments.
|
|
114
|
-
- `get_registry_status() -> Dict[str, Any]` - Returns a dictionary containing the current status of the registry, such as which resolver is bound.
|
|
115
|
-
|
|
116
|
-
**Usage Examples:**
|
|
117
|
-
```python
|
|
118
|
-
import asyncio
|
|
119
|
-
from typing import Any, Dict, List
|
|
120
|
-
from solace_agent_mesh.common.middleware import MiddlewareRegistry, ConfigResolver
|
|
121
|
-
|
|
122
|
-
# 1. Define a custom ConfigResolver implementation
|
|
123
|
-
class MyCustomConfigResolver:
|
|
124
|
-
"""A custom resolver that only allows 'admin' users to use 'gpt-4'."""
|
|
125
|
-
@staticmethod
|
|
126
|
-
async def resolve_user_config(user_identity: Any, gateway_context: Dict[str, Any], base_config: Dict[str, Any]) -> Dict[str, Any]:
|
|
127
|
-
if user_identity == "admin":
|
|
128
|
-
return {"role": "admin", "allowed_models": ["gpt-4", "gpt-3.5-turbo"]}
|
|
129
|
-
return {"role": "user", "allowed_models": ["gpt-3.5-turbo"]}
|
|
130
|
-
|
|
131
|
-
@staticmethod
|
|
132
|
-
def validate_operation_config(user_config: Dict, operation_spec: Dict, validation_context: Dict) -> Dict:
|
|
133
|
-
model = operation_spec.get("model")
|
|
134
|
-
if model and model not in user_config.get("allowed_models", []):
|
|
135
|
-
return {"valid": False, "reason": f"Model '{model}' not allowed for this user."}
|
|
136
|
-
return {"valid": True}
|
|
137
|
-
|
|
138
|
-
# Inherit other methods from the default for simplicity
|
|
139
|
-
is_feature_enabled = ConfigResolver.is_feature_enabled
|
|
140
|
-
filter_available_options = ConfigResolver.filter_available_options
|
|
141
|
-
|
|
142
|
-
# 2. Define an initialization callback
|
|
143
|
-
def setup_custom_logging():
|
|
144
|
-
print("Custom middleware initialization logic is running!")
|
|
145
|
-
|
|
146
|
-
# 3. Bind the custom components
|
|
147
|
-
MiddlewareRegistry.bind_config_resolver(MyCustomConfigResolver)
|
|
148
|
-
MiddlewareRegistry.register_initialization_callback(setup_custom_logging)
|
|
149
|
-
|
|
150
|
-
# 4. Initialize the middleware (e.g., at application startup)
|
|
151
|
-
print("--- Initializing Middleware ---")
|
|
152
|
-
MiddlewareRegistry.initialize_middleware()
|
|
153
|
-
print("--- Initialization Complete ---")
|
|
154
|
-
|
|
155
|
-
# 5. Use the middleware system
|
|
156
|
-
async def check_permissions():
|
|
157
|
-
# The registry will now use MyCustomConfigResolver automatically
|
|
158
|
-
CurrentResolver = MiddlewareRegistry.get_config_resolver()
|
|
159
|
-
print(f"Current resolver is: {CurrentResolver.__name__}")
|
|
160
|
-
|
|
161
|
-
# Check an admin user
|
|
162
|
-
admin_config = await CurrentResolver.resolve_user_config("admin", {}, {})
|
|
163
|
-
validation_result = CurrentResolver.validate_operation_config(
|
|
164
|
-
admin_config, {"model": "gpt-4"}, {}
|
|
165
|
-
)
|
|
166
|
-
print(f"Admin validation for gpt-4: {validation_result}")
|
|
167
|
-
|
|
168
|
-
# Check a regular user
|
|
169
|
-
user_config = await CurrentResolver.resolve_user_config("user", {}, {})
|
|
170
|
-
validation_result = CurrentResolver.validate_operation_config(
|
|
171
|
-
user_config, {"model": "gpt-4"}, {}
|
|
172
|
-
)
|
|
173
|
-
print(f"User validation for gpt-4: {validation_result}")
|
|
174
|
-
|
|
175
|
-
# Run the example
|
|
176
|
-
asyncio.run(check_permissions())
|
|
177
|
-
|
|
178
|
-
# 6. Check status and reset (useful for testing)
|
|
179
|
-
print(f"\nRegistry Status: {MiddlewareRegistry.get_registry_status()}")
|
|
180
|
-
MiddlewareRegistry.reset_bindings()
|
|
181
|
-
print(f"Registry Status after reset: {MiddlewareRegistry.get_registry_status()}")
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
================================================================================
|
|
185
|
-
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# DEVELOPER GUIDE: sac
|
|
2
|
-
|
|
3
|
-
## Quick Summary
|
|
4
|
-
The `sac` directory provides the base component framework for Solace Agent Mesh (SAM) implementations in the Solace AI Connector. It offers a standardized foundation for building high-level SAM components like Agents and Gateways with built-in async operations management and message publishing capabilities.
|
|
5
|
-
|
|
6
|
-
## Files Overview
|
|
7
|
-
- `__init__.py` - Empty package initialization file
|
|
8
|
-
- `sam_component_base.py` - Abstract base class providing async thread management and A2A message publishing for SAM components
|
|
9
|
-
|
|
10
|
-
## Developer API Reference
|
|
11
|
-
|
|
12
|
-
### sam_component_base.py
|
|
13
|
-
**Purpose:** Provides an abstract base class for SAM components with managed asyncio event loops and message publishing
|
|
14
|
-
**Import:** `from solace_agent_mesh.common.sac.sam_component_base import SamComponentBase`
|
|
15
|
-
|
|
16
|
-
**Classes:**
|
|
17
|
-
- `SamComponentBase(info: Dict[str, Any], **kwargs: Any)` - Abstract base class for high-level SAM components (Agents, Gateways)
|
|
18
|
-
- `publish_a2a_message(payload: Dict, topic: str, user_properties: Optional[Dict] = None) -> None` - Publishes A2A messages with size validation
|
|
19
|
-
- `run() -> None` - Starts the component's dedicated async thread
|
|
20
|
-
- `cleanup() -> None` - Cleans up resources including async thread and loop
|
|
21
|
-
- `get_async_loop() -> Optional[asyncio.AbstractEventLoop]` - Returns the dedicated asyncio event loop
|
|
22
|
-
- `_async_setup_and_run() -> None` - Abstract method for subclasses to implement main async logic
|
|
23
|
-
- `_pre_async_cleanup() -> None` - Abstract method for cleanup before async loop stops
|
|
24
|
-
- `namespace: str` - The configured namespace for the component
|
|
25
|
-
- `max_message_size_bytes: int` - Maximum allowed message size in bytes
|
|
26
|
-
|
|
27
|
-
**Usage Examples:**
|
|
28
|
-
```python
|
|
29
|
-
from solace_agent_mesh.common.sac.sam_component_base import SamComponentBase
|
|
30
|
-
from typing import Dict, Any
|
|
31
|
-
import asyncio
|
|
32
|
-
|
|
33
|
-
class MyAgent(SamComponentBase):
|
|
34
|
-
def __init__(self, info: Dict[str, Any], **kwargs: Any):
|
|
35
|
-
super().__init__(info, **kwargs)
|
|
36
|
-
# Additional initialization
|
|
37
|
-
|
|
38
|
-
async def _async_setup_and_run(self) -> None:
|
|
39
|
-
"""Implement your main async logic here"""
|
|
40
|
-
while not self.stop_signal.is_set():
|
|
41
|
-
# Your async operations
|
|
42
|
-
await asyncio.sleep(1)
|
|
43
|
-
|
|
44
|
-
def _pre_async_cleanup(self) -> None:
|
|
45
|
-
"""Cleanup before async loop stops"""
|
|
46
|
-
# Your cleanup logic
|
|
47
|
-
pass
|
|
48
|
-
|
|
49
|
-
# Usage
|
|
50
|
-
config = {
|
|
51
|
-
"namespace": "my_namespace",
|
|
52
|
-
"max_message_size_bytes": 1048576 # 1MB
|
|
53
|
-
}
|
|
54
|
-
agent = MyAgent(config)
|
|
55
|
-
|
|
56
|
-
# Publish a message
|
|
57
|
-
payload = {"message": "Hello World"}
|
|
58
|
-
agent.publish_a2a_message(
|
|
59
|
-
payload=payload,
|
|
60
|
-
topic="sam/agents/my_agent/response",
|
|
61
|
-
user_properties={"correlation_id": "123"}
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
# Start the component
|
|
65
|
-
agent.run()
|
|
66
|
-
|
|
67
|
-
# Later, cleanup
|
|
68
|
-
agent.cleanup()
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
# content_hash: 3a67b8df1c1af409e52645a3674864418b00017b58519d84736eb4d1da56ea11
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# LLM Summary Detail File
|
|
2
|
-
|
|
3
|
-
This file is a concatenation of all individual *llm.txt files found in the 'sac' directory tree. Each section below corresponds to a specific directory's summary file.
|
|
4
|
-
|
|
5
|
-
================================================================================
|
|
6
|
-
|
|
7
|
-
## Section 1: solace_agent_mesh/common/sac/sac_llm.txt
|
|
8
|
-
|
|
9
|
-
**Source file:** `solace_agent_mesh/common/sac/sac_llm.txt`
|
|
10
|
-
|
|
11
|
-
# DEVELOPER GUIDE: sac
|
|
12
|
-
|
|
13
|
-
## Quick Summary
|
|
14
|
-
The `sac` directory provides the base component framework for Solace Agent Mesh (SAM) implementations in the Solace AI Connector. It offers a standardized foundation for building high-level SAM components like Agents and Gateways with built-in async operations management and message publishing capabilities.
|
|
15
|
-
|
|
16
|
-
## Files Overview
|
|
17
|
-
- `__init__.py` - Empty package initialization file
|
|
18
|
-
- `sam_component_base.py` - Abstract base class providing async thread management and A2A message publishing for SAM components
|
|
19
|
-
|
|
20
|
-
## Developer API Reference
|
|
21
|
-
|
|
22
|
-
### sam_component_base.py
|
|
23
|
-
**Purpose:** Provides an abstract base class for SAM components with managed asyncio event loops and message publishing
|
|
24
|
-
**Import:** `from solace_agent_mesh.common.sac.sam_component_base import SamComponentBase`
|
|
25
|
-
|
|
26
|
-
**Classes:**
|
|
27
|
-
- `SamComponentBase(info: Dict[str, Any], **kwargs: Any)` - Abstract base class for high-level SAM components (Agents, Gateways)
|
|
28
|
-
- `publish_a2a_message(payload: Dict, topic: str, user_properties: Optional[Dict] = None) -> None` - Publishes A2A messages with size validation
|
|
29
|
-
- `run() -> None` - Starts the component's dedicated async thread
|
|
30
|
-
- `cleanup() -> None` - Cleans up resources including async thread and loop
|
|
31
|
-
- `get_async_loop() -> Optional[asyncio.AbstractEventLoop]` - Returns the dedicated asyncio event loop
|
|
32
|
-
- `_async_setup_and_run() -> None` - Abstract method for subclasses to implement main async logic
|
|
33
|
-
- `_pre_async_cleanup() -> None` - Abstract method for cleanup before async loop stops
|
|
34
|
-
- `namespace: str` - The configured namespace for the component
|
|
35
|
-
- `max_message_size_bytes: int` - Maximum allowed message size in bytes
|
|
36
|
-
|
|
37
|
-
**Usage Examples:**
|
|
38
|
-
```python
|
|
39
|
-
from solace_agent_mesh.common.sac.sam_component_base import SamComponentBase
|
|
40
|
-
from typing import Dict, Any
|
|
41
|
-
import asyncio
|
|
42
|
-
|
|
43
|
-
class MyAgent(SamComponentBase):
|
|
44
|
-
def __init__(self, info: Dict[str, Any], **kwargs: Any):
|
|
45
|
-
super().__init__(info, **kwargs)
|
|
46
|
-
# Additional initialization
|
|
47
|
-
|
|
48
|
-
async def _async_setup_and_run(self) -> None:
|
|
49
|
-
"""Implement your main async logic here"""
|
|
50
|
-
while not self.stop_signal.is_set():
|
|
51
|
-
# Your async operations
|
|
52
|
-
await asyncio.sleep(1)
|
|
53
|
-
|
|
54
|
-
def _pre_async_cleanup(self) -> None:
|
|
55
|
-
"""Cleanup before async loop stops"""
|
|
56
|
-
# Your cleanup logic
|
|
57
|
-
pass
|
|
58
|
-
|
|
59
|
-
# Usage
|
|
60
|
-
config = {
|
|
61
|
-
"namespace": "my_namespace",
|
|
62
|
-
"max_message_size_bytes": 1048576 # 1MB
|
|
63
|
-
}
|
|
64
|
-
agent = MyAgent(config)
|
|
65
|
-
|
|
66
|
-
# Publish a message
|
|
67
|
-
payload = {"message": "Hello World"}
|
|
68
|
-
agent.publish_a2a_message(
|
|
69
|
-
payload=payload,
|
|
70
|
-
topic="sam/agents/my_agent/response",
|
|
71
|
-
user_properties={"correlation_id": "123"}
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
# Start the component
|
|
75
|
-
agent.run()
|
|
76
|
-
|
|
77
|
-
# Later, cleanup
|
|
78
|
-
agent.cleanup()
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
================================================================================
|
|
82
|
-
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
# DEVELOPER GUIDE: sam_events
|
|
2
|
-
|
|
3
|
-
## Quick Summary
|
|
4
|
-
The `sam_events` directory provides system-level event messaging for Solace Agent Mesh (SAM). It enables clean separation between agent-to-agent (A2A) task communication and system events like session lifecycle, agent health, and configuration changes.
|
|
5
|
-
|
|
6
|
-
## Files Overview
|
|
7
|
-
- `__init__.py` - Package initialization and public API exports
|
|
8
|
-
- `event_service.py` - Core event service implementation with publishing/subscription capabilities
|
|
9
|
-
|
|
10
|
-
## Developer API Reference
|
|
11
|
-
|
|
12
|
-
### __init__.py
|
|
13
|
-
**Purpose:** Package entry point that exports the main classes for SAM event handling
|
|
14
|
-
**Import:** `from solace_agent_mesh.common.sam_events import SamEventService, SamEvent, SessionDeletedEvent`
|
|
15
|
-
|
|
16
|
-
### event_service.py
|
|
17
|
-
**Purpose:** Implements the core event messaging service for system-level events in SAM
|
|
18
|
-
**Import:** `from solace_agent_mesh.common.sam_events.event_service import SamEventService, SamEvent, SessionDeletedEvent`
|
|
19
|
-
|
|
20
|
-
**Classes:**
|
|
21
|
-
|
|
22
|
-
- `SamEvent(event_type: str, event_id: str, timestamp: str, source_component: str, namespace: str, data: Dict[str, Any])` - Base class for all SAM system events
|
|
23
|
-
- `create(event_type: str, source_component: str, namespace: str, data: Dict[str, Any]) -> SamEvent` - Create a new event with auto-generated ID and timestamp
|
|
24
|
-
- `to_dict() -> Dict[str, Any]` - Convert event to dictionary for messaging
|
|
25
|
-
- `event_type: str` - Type of event (e.g., "session.deleted")
|
|
26
|
-
- `event_id: str` - Unique identifier for the event
|
|
27
|
-
- `timestamp: str` - ISO format timestamp when event was created
|
|
28
|
-
- `source_component: str` - Component that generated the event
|
|
29
|
-
- `namespace: str` - SAM namespace
|
|
30
|
-
- `data: Dict[str, Any]` - Event-specific data payload
|
|
31
|
-
|
|
32
|
-
- `SessionDeletedEvent(SamEvent)` - Specialized event for session deletion notifications
|
|
33
|
-
- `create(namespace: str, source_component: str, session_id: str, user_id: str, agent_id: str, gateway_id: str) -> SessionDeletedEvent` - Create a session deleted event
|
|
34
|
-
|
|
35
|
-
- `SamEventService(namespace: str, component_name: str, publish_func: Callable[[str, Dict, Optional[Dict]], None])` - Service for publishing and subscribing to SAM system events
|
|
36
|
-
- `publish_event(event: SamEvent) -> bool` - Publish a system event
|
|
37
|
-
- `publish_session_deleted(session_id: str, user_id: str, agent_id: str, gateway_id: str) -> bool` - Convenience method to publish session deleted event
|
|
38
|
-
- `subscribe_to_events(event_type: str, handler: Callable[[SamEvent], None]) -> bool` - Subscribe to events of a specific type
|
|
39
|
-
- `handle_incoming_event(topic: str, payload: Dict[str, Any]) -> None` - Handle incoming events from messaging system
|
|
40
|
-
- `namespace: str` - The SAM namespace
|
|
41
|
-
- `component_name: str` - Name of the component using this service
|
|
42
|
-
|
|
43
|
-
**Functions:**
|
|
44
|
-
|
|
45
|
-
- `SamEventService.get_event_topic(namespace: str, event_type: str) -> str` - Get the topic for a specific event type
|
|
46
|
-
|
|
47
|
-
**Usage Examples:**
|
|
48
|
-
|
|
49
|
-
```python
|
|
50
|
-
# Basic event service setup
|
|
51
|
-
from solace_agent_mesh.common.sam_events import SamEventService, SamEvent, SessionDeletedEvent
|
|
52
|
-
|
|
53
|
-
# Initialize the event service
|
|
54
|
-
def my_publish_func(topic: str, payload: dict, headers: dict = None):
|
|
55
|
-
# Your A2A publishing implementation
|
|
56
|
-
pass
|
|
57
|
-
|
|
58
|
-
event_service = SamEventService(
|
|
59
|
-
namespace="my_namespace",
|
|
60
|
-
component_name="my_component",
|
|
61
|
-
publish_func=my_publish_func
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
# Create and publish a custom event
|
|
65
|
-
custom_event = SamEvent.create(
|
|
66
|
-
event_type="agent.health_check",
|
|
67
|
-
source_component="health_monitor",
|
|
68
|
-
namespace="my_namespace",
|
|
69
|
-
data={"status": "healthy", "cpu_usage": 45.2}
|
|
70
|
-
)
|
|
71
|
-
success = event_service.publish_event(custom_event)
|
|
72
|
-
|
|
73
|
-
# Publish a session deleted event (convenience method)
|
|
74
|
-
success = event_service.publish_session_deleted(
|
|
75
|
-
session_id="sess_123",
|
|
76
|
-
user_id="user_456",
|
|
77
|
-
agent_id="agent_789",
|
|
78
|
-
gateway_id="gateway_001"
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
# Subscribe to events
|
|
82
|
-
def handle_session_deleted(event: SamEvent):
|
|
83
|
-
session_id = event.data["session_id"]
|
|
84
|
-
print(f"Session {session_id} was deleted")
|
|
85
|
-
|
|
86
|
-
event_service.subscribe_to_events("session.deleted", handle_session_deleted)
|
|
87
|
-
|
|
88
|
-
# Handle incoming events (typically called by your messaging infrastructure)
|
|
89
|
-
incoming_payload = {
|
|
90
|
-
"event_type": "session.deleted",
|
|
91
|
-
"event_id": "evt_123",
|
|
92
|
-
"timestamp": "2024-01-01T12:00:00Z",
|
|
93
|
-
"source_component": "gateway",
|
|
94
|
-
"namespace": "my_namespace",
|
|
95
|
-
"data": {"session_id": "sess_123", "user_id": "user_456"}
|
|
96
|
-
}
|
|
97
|
-
event_service.handle_incoming_event("sam/events/session/deleted", incoming_payload)
|
|
98
|
-
|
|
99
|
-
# Get topic for an event type
|
|
100
|
-
topic = SamEventService.get_event_topic("my_namespace", "session.deleted")
|
|
101
|
-
print(topic) # Returns the proper SAM events topic
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
# content_hash: 2a249adbac594bbf8a551a6b4f606218b7b8fce41753efe31954b8acc50cc126
|