solace-agent-mesh 1.4.12__py3-none-any.whl → 1.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of solace-agent-mesh might be problematic. Click here for more details.
- solace_agent_mesh/agent/adk/adk_llm.txt +3 -4
- solace_agent_mesh/agent/adk/adk_llm_detail.txt +566 -0
- solace_agent_mesh/agent/adk/artifacts/artifacts_llm.txt +1 -1
- solace_agent_mesh/agent/adk/callbacks.py +56 -5
- solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +3 -1
- solace_agent_mesh/agent/adk/intelligent_mcp_callbacks.py +2 -1
- solace_agent_mesh/agent/adk/mcp_content_processor.py +2 -1
- solace_agent_mesh/agent/adk/models/lite_llm.py +1 -0
- solace_agent_mesh/agent/adk/models/models_llm.txt +1 -2
- solace_agent_mesh/agent/adk/runner.py +3 -1
- solace_agent_mesh/agent/adk/services.py +4 -1
- solace_agent_mesh/agent/adk/setup.py +3 -1
- solace_agent_mesh/agent/adk/tool_wrapper.py +2 -2
- solace_agent_mesh/agent/agent_llm.txt +1 -1
- solace_agent_mesh/agent/agent_llm_detail.txt +1702 -0
- solace_agent_mesh/agent/protocol/event_handlers.py +4 -14
- solace_agent_mesh/agent/protocol/protocol_llm.txt +15 -2
- solace_agent_mesh/agent/protocol/protocol_llm_detail.txt +92 -0
- solace_agent_mesh/agent/sac/app.py +3 -1
- solace_agent_mesh/agent/sac/component.py +55 -22
- solace_agent_mesh/agent/sac/sac_llm.txt +15 -1
- solace_agent_mesh/agent/sac/sac_llm_detail.txt +200 -0
- solace_agent_mesh/agent/sac/task_execution_context.py +73 -0
- solace_agent_mesh/agent/testing/testing_llm_detail.txt +68 -0
- solace_agent_mesh/agent/tools/audio_tools.py +2 -1
- solace_agent_mesh/agent/tools/builtin_artifact_tools.py +3 -1
- solace_agent_mesh/agent/tools/builtin_data_analysis_tools.py +3 -1
- solace_agent_mesh/agent/tools/dynamic_tool.py +2 -1
- solace_agent_mesh/agent/tools/general_agent_tools.py +2 -1
- solace_agent_mesh/agent/tools/image_tools.py +2 -1
- solace_agent_mesh/agent/tools/peer_agent_tool.py +2 -1
- solace_agent_mesh/agent/tools/registry.py +3 -1
- solace_agent_mesh/agent/tools/test_tools.py +2 -1
- solace_agent_mesh/agent/tools/tools_llm.txt +148 -154
- solace_agent_mesh/agent/tools/tools_llm_detail.txt +274 -0
- solace_agent_mesh/agent/tools/web_tools.py +2 -1
- solace_agent_mesh/agent/utils/artifact_helpers.py +3 -1
- solace_agent_mesh/agent/utils/config_parser.py +3 -1
- solace_agent_mesh/agent/utils/utils_llm.txt +1 -1
- solace_agent_mesh/agent/utils/utils_llm_detail.txt +149 -0
- solace_agent_mesh/assets/docs/404.html +3 -3
- solace_agent_mesh/assets/docs/assets/js/{b7006a3a.73a79653.js → 032c2d61.f3d37824.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/0bcf40b7.c019ad46.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/15ba94aa.932dd2db.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2131ec11.5c7a1f6e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{2334.622a6395.js → 2334.1cf50a20.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/240a0364.7eac6021.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2e32b5e0.33f5d75b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/341393d4.0fac2613.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{3624.b524e433.js → 3624.0eaa1fd0.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/3a6c6137.f5940cfa.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ac1795d.76654dd9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ff0015d.2be20244.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/509e993c.4c7a1a6d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/547e15cc.2cbb060a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/55b7b518.f2b1d1ba.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5c2bd65f.e49689dd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6063ff4c.ef84f702.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/631738c7.a8b1ef8b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6a520c9d.ba015d81.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.39d5851d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6d84eae0.4a5fbf39.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6fdfefc7.99de744e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/71da7b71.804d6567.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/722f809d.965da774.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/742f027b.46c07808.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/77cf947d.64c9bd6c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8024126c.56e59919.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/81a99df0.07034dd9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/82fbfb93.139a1a1f.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{8591.d7c16be6.js → 8591.5d015485.js} +2 -2
- solace_agent_mesh/assets/docs/assets/js/{8731.49e930c2.js → 8731.6c1dbf0c.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/945fb41e.6f4cdffd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/94e8668d.b5ddb7a1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9bb13469.dd1c9b54.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9e9d0a82.dd810042.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ab9708a8.3e6dd091.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ad71b5ed.60668e9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/c198a0dc.8f31f867.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/c93cbaa0.eaff365e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/da0b5bad.9d369087.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/db924877.cbc66f02.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd817ffc.0aa9630a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd81e2b8.d590bc9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/de5f4c65.e8241890.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/de915948.139b4b9c.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e3d9abda.2b916f9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e6f9706b.582a78ca.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e92d0134.cf6d6522.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/f284c35a.5766a13d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ff4d71f2.9c0297a6.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/main.bd3c34f3.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/runtime~main.18dc45dd.js +1 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +143 -0
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/artifact-management/index.html +7 -7
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/audio-tools/index.html +7 -7
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/data-analysis-tools/index.html +8 -8
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/embeds/index.html +6 -6
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/index.html +11 -11
- solace_agent_mesh/assets/docs/docs/documentation/{concepts → components}/cli/index.html +25 -25
- solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +91 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/index.html +29 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/orchestrator/index.html +55 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/plugins/index.html +110 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/debugging/index.html +104 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +57 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +25 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +59 -0
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/create-agents/index.html +113 -152
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/create-gateways/index.html +9 -9
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/creating-python-tools/index.html +12 -12
- solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +54 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +32 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +55 -0
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/bedrock-agents/index.html +25 -25
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/custom-agent/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/event-mesh-gateway/index.html +11 -11
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/mcp-integration/index.html +10 -10
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/mongodb-integration/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/rag-integration/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/rest-gateway/index.html +10 -10
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +72 -0
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/sql-database/index.html +14 -14
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +33 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +83 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +222 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +161 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/architecture/index.html +75 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/index.html +53 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +35 -100
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +41 -0
- solace_agent_mesh/assets/docs/docs/documentation/{getting-started → installing-and-configuring}/configurations/index.html +56 -50
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/index.html +25 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/installation/index.html +76 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +63 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +142 -0
- solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0/index.html +100 -0
- solace_agent_mesh/assets/docs/docs/documentation/{Migrations/A2A Upgrade To 0.3.0/a2a-technical-migration-map/index.html → migrations/a2a-upgrade/a2a-technical-migration-map/index.html} +10 -11
- solace_agent_mesh/assets/docs/img/solace-logo.png +0 -0
- solace_agent_mesh/assets/docs/lunr-index-1760121512891.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -1
- solace_agent_mesh/assets/docs/search-doc-1760121512891.json +1 -0
- solace_agent_mesh/assets/docs/search-doc.json +1 -1
- solace_agent_mesh/assets/docs/sitemap.xml +1 -1
- solace_agent_mesh/cli/__init__.py +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-j1LW-wlq.js → authCallback-DwrxZE0E.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{client-B9p_nFNA.js → client-DarGQzyw.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-2nd1gbaH.js +339 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-DoKXctCM.css +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/{vendor-CS5YMf8a.js → vendor-BKIeiHj_.js} +80 -70
- solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -3
- solace_agent_mesh/client/webui/frontend/static/index.html +4 -4
- solace_agent_mesh/common/a2a/a2a_llm.txt +1 -1
- solace_agent_mesh/common/a2a/a2a_llm_detail.txt +193 -0
- solace_agent_mesh/common/a2a/artifact.py +2 -1
- solace_agent_mesh/common/a2a/protocol.py +3 -2
- solace_agent_mesh/common/a2a/translation.py +3 -1
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm.txt +1 -1
- solace_agent_mesh/common/a2a_spec/a2a_spec_llm_detail.txt +736 -0
- solace_agent_mesh/common/a2a_spec/schemas/llm_invocation.json +23 -0
- solace_agent_mesh/common/a2a_spec/schemas/schemas_llm.txt +93 -15
- solace_agent_mesh/common/a2a_spec/schemas/tool_result.json +23 -0
- solace_agent_mesh/common/common_llm.txt +24 -39
- solace_agent_mesh/common/common_llm_detail.txt +2562 -0
- solace_agent_mesh/common/data_parts.py +9 -1
- solace_agent_mesh/common/middleware/config_resolver.py +3 -1
- solace_agent_mesh/common/middleware/middleware_llm_detail.txt +185 -0
- solace_agent_mesh/common/middleware/registry.py +3 -1
- solace_agent_mesh/common/sac/sac_llm.txt +1 -1
- solace_agent_mesh/common/sac/sac_llm_detail.txt +82 -0
- solace_agent_mesh/common/sac/sam_component_base.py +2 -1
- solace_agent_mesh/common/sam_events/event_service.py +3 -2
- solace_agent_mesh/common/sam_events/sam_events_llm.txt +104 -0
- solace_agent_mesh/common/sam_events/sam_events_llm_detail.txt +115 -0
- solace_agent_mesh/common/services/employee_service.py +3 -1
- solace_agent_mesh/common/services/identity_service.py +2 -1
- solace_agent_mesh/common/services/providers/local_file_identity_service.py +2 -1
- solace_agent_mesh/common/services/services_llm.txt +57 -6
- solace_agent_mesh/common/services/services_llm_detail.txt +459 -0
- solace_agent_mesh/common/utils/artifact_utils.py +3 -1
- solace_agent_mesh/common/utils/asyncio_macos_fix.py +3 -1
- solace_agent_mesh/common/utils/embeds/converter.py +3 -1
- solace_agent_mesh/common/utils/embeds/embeds_llm.txt +1 -1
- solace_agent_mesh/common/utils/embeds/evaluators.py +2 -1
- solace_agent_mesh/common/utils/embeds/modifiers.py +3 -2
- solace_agent_mesh/common/utils/embeds/resolver.py +2 -1
- solace_agent_mesh/common/utils/initializer.py +3 -1
- solace_agent_mesh/common/utils/message_utils.py +2 -1
- solace_agent_mesh/common/utils/push_notification_auth.py +3 -2
- solace_agent_mesh/common/utils/utils_llm.txt +75 -87
- solace_agent_mesh/common/utils/utils_llm_detail.txt +572 -0
- solace_agent_mesh/core_a2a/core_a2a_llm_detail.txt +101 -0
- solace_agent_mesh/core_a2a/service.py +2 -2
- solace_agent_mesh/gateway/base/app.py +3 -2
- solace_agent_mesh/gateway/base/base_llm.txt +1 -1
- solace_agent_mesh/gateway/base/base_llm_detail.txt +235 -0
- solace_agent_mesh/gateway/base/component.py +3 -1
- solace_agent_mesh/gateway/base/task_context.py +2 -1
- solace_agent_mesh/gateway/gateway_llm.txt +242 -235
- solace_agent_mesh/gateway/gateway_llm_detail.txt +3885 -0
- solace_agent_mesh/gateway/http_sse/alembic/alembic_llm.txt +295 -0
- solace_agent_mesh/gateway/http_sse/alembic/env.py +10 -1
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251006_98882922fa59_add_tasks_events_feedback_chat_tasks.py +190 -0
- solace_agent_mesh/gateway/http_sse/alembic/versions/versions_llm.txt +155 -0
- solace_agent_mesh/gateway/http_sse/alembic.ini +1 -1
- solace_agent_mesh/gateway/http_sse/app.py +150 -3
- solace_agent_mesh/gateway/http_sse/component.py +372 -61
- solace_agent_mesh/gateway/http_sse/components/components_llm.txt +46 -6
- solace_agent_mesh/gateway/http_sse/components/task_logger_forwarder.py +109 -0
- solace_agent_mesh/gateway/http_sse/components/visualization_forwarder_component.py +4 -2
- solace_agent_mesh/gateway/http_sse/dependencies.py +119 -27
- solace_agent_mesh/gateway/http_sse/http_sse_llm.txt +172 -172
- solace_agent_mesh/gateway/http_sse/http_sse_llm_detail.txt +3278 -0
- solace_agent_mesh/gateway/http_sse/main.py +149 -42
- solace_agent_mesh/gateway/http_sse/repository/__init__.py +3 -12
- solace_agent_mesh/gateway/http_sse/repository/chat_task_repository.py +103 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/__init__.py +5 -3
- solace_agent_mesh/gateway/http_sse/repository/entities/chat_task.py +75 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/entities_llm.txt +263 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/feedback.py +20 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/session_history.py +0 -16
- solace_agent_mesh/gateway/http_sse/repository/entities/task.py +25 -0
- solace_agent_mesh/gateway/http_sse/repository/entities/task_event.py +21 -0
- solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +81 -0
- solace_agent_mesh/gateway/http_sse/repository/interfaces.py +73 -18
- solace_agent_mesh/gateway/http_sse/repository/models/__init__.py +9 -5
- solace_agent_mesh/gateway/http_sse/repository/models/chat_task_model.py +31 -0
- solace_agent_mesh/gateway/http_sse/repository/models/feedback_model.py +21 -0
- solace_agent_mesh/gateway/http_sse/repository/models/models_llm.txt +266 -0
- solace_agent_mesh/gateway/http_sse/repository/models/session_model.py +3 -3
- solace_agent_mesh/gateway/http_sse/repository/models/task_event_model.py +25 -0
- solace_agent_mesh/gateway/http_sse/repository/models/task_model.py +32 -0
- solace_agent_mesh/gateway/http_sse/repository/repository_llm.txt +340 -0
- solace_agent_mesh/gateway/http_sse/repository/session_repository.py +4 -53
- solace_agent_mesh/gateway/http_sse/repository/task_repository.py +173 -0
- solace_agent_mesh/gateway/http_sse/routers/agent_cards.py +3 -2
- solace_agent_mesh/gateway/http_sse/routers/artifacts.py +3 -3
- solace_agent_mesh/gateway/http_sse/routers/auth.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/config.py +29 -6
- solace_agent_mesh/gateway/http_sse/routers/dto/dto_llm.txt +346 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/__init__.py +3 -3
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/requests_llm.txt +83 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/session_requests.py +2 -10
- solace_agent_mesh/gateway/http_sse/routers/dto/requests/task_requests.py +58 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/__init__.py +5 -3
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/responses_llm.txt +107 -0
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +1 -15
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/task_responses.py +30 -0
- solace_agent_mesh/gateway/http_sse/routers/feedback.py +37 -0
- solace_agent_mesh/gateway/http_sse/routers/people.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/routers_llm.txt +255 -204
- solace_agent_mesh/gateway/http_sse/routers/sessions.py +223 -41
- solace_agent_mesh/gateway/http_sse/routers/sse.py +3 -2
- solace_agent_mesh/gateway/http_sse/routers/tasks.py +170 -43
- solace_agent_mesh/gateway/http_sse/routers/users.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/visualization.py +2 -1
- solace_agent_mesh/gateway/http_sse/services/agent_card_service.py +3 -1
- solace_agent_mesh/gateway/http_sse/services/data_retention_service.py +273 -0
- solace_agent_mesh/gateway/http_sse/services/feedback_service.py +242 -0
- solace_agent_mesh/gateway/http_sse/services/people_service.py +2 -82
- solace_agent_mesh/gateway/http_sse/services/services_llm.txt +177 -13
- solace_agent_mesh/gateway/http_sse/services/session_service.py +154 -85
- solace_agent_mesh/gateway/http_sse/services/task_logger_service.py +318 -0
- solace_agent_mesh/gateway/http_sse/services/task_service.py +3 -2
- solace_agent_mesh/gateway/http_sse/session_manager.py +2 -1
- solace_agent_mesh/gateway/http_sse/shared/exception_handlers.py +25 -14
- solace_agent_mesh/gateway/http_sse/shared/shared_llm.txt +285 -0
- solace_agent_mesh/gateway/http_sse/shared/types.py +7 -0
- solace_agent_mesh/gateway/http_sse/sse_event_buffer.py +2 -1
- solace_agent_mesh/gateway/http_sse/sse_manager.py +2 -2
- solace_agent_mesh/gateway/http_sse/utils/__init__.py +1 -0
- solace_agent_mesh/gateway/http_sse/utils/stim_utils.py +32 -0
- solace_agent_mesh/gateway/http_sse/utils/utils_llm.txt +47 -0
- solace_agent_mesh/solace_agent_mesh_llm.txt +1 -1
- solace_agent_mesh/solace_agent_mesh_llm_detail.txt +8599 -0
- solace_agent_mesh/templates/gateway_app_template.py +4 -2
- solace_agent_mesh/templates/gateway_component_template.py +3 -1
- solace_agent_mesh/templates/logging_config_template.ini +22 -45
- solace_agent_mesh/templates/plugin_tools_template.py +2 -2
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/METADATA +2 -2
- solace_agent_mesh-1.5.1.dist-info/RECORD +504 -0
- solace_agent_mesh/agent/adk/invocation_monitor.py +0 -295
- solace_agent_mesh/assets/docs/assets/images/sac-flows-80d5b603c6aafd33e87945680ce0abf3.png +0 -0
- solace_agent_mesh/assets/docs/assets/images/sac_parts_of_a_component-cb3d0424b1d0c17734c5435cca6b4082.png +0 -0
- solace_agent_mesh/assets/docs/assets/js/04989206.a248f00c.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/0e682baa.d54b8668.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1023fc19.8a8a9309.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1523c6b4.2645ef68.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/166ab619.e27886d9.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1c6e87d2.e056b7e0.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/21ceee5f.3bf39250.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/2a9cab12.2afaee76.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/332e10b5.f7629851.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/3d406171.5560fdf9.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/42b3f8d8.508ae8db.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/442a8107.b5c2532a.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/453a82a6.3c6bb61d.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/483cef9a.4736f2d8.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/4c2787c2.c1290a40.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/55f47984.bcd00a86.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/5b4258a4.fdfd2325.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/664b740a.ba305a89.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/75384d09.c19e8b51.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/768e31b0.9abcdc48.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/85387663.be2bc838.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/945fb41e.16e00776.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/9a09e75d.92de8cf5.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/9eff14a2.d62aad71.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/a12a4955.25fbed32.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/a3a92b25.af35e313.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/aba87c2f.4ddf32f2.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ae0e903d.5fe5203f.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ae4415af.16cc58d3.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/bac0be12.17de4316.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/c2c06897.87cb1f47.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/c835a94d.ce21f0bf.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cc969b05.feef7dcc.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cd3d4052.a19e7d78.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ced92a13.fb92e7ca.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cee5d587.47904f5e.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/d6a81ee7.829198f1.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/f284c35a.ed8dd236.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/f897a61a.126663fe.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/fbfa3e75.e144b16c.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/main.f67fc9f4.js +0 -2
- solace_agent_mesh/assets/docs/assets/js/runtime~main.40527046.js +0 -1
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/installation/index.html +0 -46
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/rbac-setup-guilde/index.html +0 -201
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/single-sign-on/index.html +0 -25
- solace_agent_mesh/assets/docs/docs/documentation/Migrations/A2A Upgrade To 0.3.0/a2a-gateway-upgrade-to-0.3.0/index.html +0 -105
- solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +0 -144
- solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +0 -91
- solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +0 -91
- solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +0 -55
- solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +0 -111
- solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +0 -77
- solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +0 -48
- solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +0 -54
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +0 -45
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/litellm_models/index.html +0 -49
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +0 -76
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +0 -73
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +0 -72
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +0 -54
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +0 -69
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +0 -59
- solace_agent_mesh/assets/docs/lunr-index-1759936913198.json +0 -1
- solace_agent_mesh/assets/docs/search-doc-1759936913198.json +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-ChRwcV89.css +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-DnnE01OM.js +0 -339
- solace_agent_mesh/gateway/http_sse/repository/entities/message.py +0 -41
- solace_agent_mesh/gateway/http_sse/repository/message_repository.py +0 -84
- solace_agent_mesh/gateway/http_sse/repository/models/message_model.py +0 -45
- solace_agent_mesh-1.4.12.dist-info/RECORD +0 -448
- /solace_agent_mesh/assets/docs/assets/js/{8591.d7c16be6.js.LICENSE.txt → 8591.5d015485.js.LICENSE.txt} +0 -0
- /solace_agent_mesh/assets/docs/assets/js/{main.f67fc9f4.js.LICENSE.txt → main.bd3c34f3.js.LICENSE.txt} +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-1.4.12.dist-info → solace_agent_mesh-1.5.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
# DEVELOPER GUIDE: dto
|
|
2
|
+
|
|
3
|
+
## Quick Summary
|
|
4
|
+
The `dto` directory contains Data Transfer Objects (DTOs) for API contract definition and validation in the HTTP SSE gateway. It's organized into two main subdirectories: `requests` for incoming API request validation using Pydantic models, and `responses` for structured API response formatting with automatic timestamp conversion. The DTOs primarily focus on session management operations and provide type-safe interfaces for API endpoints.
|
|
5
|
+
|
|
6
|
+
## Files and Subdirectories Overview
|
|
7
|
+
- **Direct files:**
|
|
8
|
+
- `__init__.py` - Main module exports for requests and responses submodules
|
|
9
|
+
- **Subdirectories:**
|
|
10
|
+
- `requests/` - Request DTOs for API endpoint validation (session CRUD operations)
|
|
11
|
+
- `responses/` - Response DTOs with automatic timestamp serialization and field aliasing
|
|
12
|
+
|
|
13
|
+
## Developer API Reference
|
|
14
|
+
|
|
15
|
+
### Direct Files
|
|
16
|
+
|
|
17
|
+
#### __init__.py
|
|
18
|
+
**Purpose:** Main entry point that exports the requests and responses submodules
|
|
19
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto import requests, responses`
|
|
20
|
+
|
|
21
|
+
**Exports:**
|
|
22
|
+
- `requests` - Module containing all request DTOs
|
|
23
|
+
- `responses` - Module containing all response DTOs
|
|
24
|
+
|
|
25
|
+
### Subdirectory APIs
|
|
26
|
+
|
|
27
|
+
#### requests/
|
|
28
|
+
**Purpose:** Provides Pydantic models for validating incoming API requests, specifically for session management operations
|
|
29
|
+
**Key Exports:** GetSessionsRequest, GetSessionRequest, GetSessionHistoryRequest, UpdateSessionRequest, DeleteSessionRequest
|
|
30
|
+
**Import Examples:**
|
|
31
|
+
```python
|
|
32
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.requests import (
|
|
33
|
+
GetSessionRequest,
|
|
34
|
+
GetSessionHistoryRequest,
|
|
35
|
+
UpdateSessionRequest
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### responses/
|
|
40
|
+
**Purpose:** Provides structured response DTOs with automatic timestamp conversion and field aliasing for API consistency
|
|
41
|
+
**Key Exports:** MessageResponse, SessionResponse, SessionListResponse, BaseTimestampResponse
|
|
42
|
+
**Import Examples:**
|
|
43
|
+
```python
|
|
44
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.responses import (
|
|
45
|
+
MessageResponse,
|
|
46
|
+
SessionResponse,
|
|
47
|
+
SessionListResponse
|
|
48
|
+
)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Complete Usage Guide
|
|
52
|
+
|
|
53
|
+
### 1. Basic Imports and Setup
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
# Import the main dto modules
|
|
57
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto import requests, responses
|
|
58
|
+
|
|
59
|
+
# Or import specific DTOs directly
|
|
60
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.requests import (
|
|
61
|
+
GetSessionRequest,
|
|
62
|
+
GetSessionHistoryRequest,
|
|
63
|
+
UpdateSessionRequest
|
|
64
|
+
)
|
|
65
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.responses import (
|
|
66
|
+
SessionResponse,
|
|
67
|
+
MessageResponse,
|
|
68
|
+
SessionListResponse
|
|
69
|
+
)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 2. Working with Request DTOs
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.requests import (
|
|
76
|
+
GetSessionRequest,
|
|
77
|
+
GetSessionHistoryRequest,
|
|
78
|
+
UpdateSessionRequest
|
|
79
|
+
)
|
|
80
|
+
from pydantic import ValidationError
|
|
81
|
+
|
|
82
|
+
# Create a request to get a specific session
|
|
83
|
+
def get_session(session_id: str, user_id: str):
|
|
84
|
+
try:
|
|
85
|
+
request = GetSessionRequest(
|
|
86
|
+
session_id=session_id,
|
|
87
|
+
user_id=user_id
|
|
88
|
+
)
|
|
89
|
+
return request
|
|
90
|
+
except ValidationError as e:
|
|
91
|
+
print(f"Invalid request parameters: {e}")
|
|
92
|
+
return None
|
|
93
|
+
|
|
94
|
+
# Create a request to get session history with pagination
|
|
95
|
+
def get_session_history(session_id: str, user_id: str, page: int = 1, size: int = 20):
|
|
96
|
+
try:
|
|
97
|
+
request = GetSessionHistoryRequest(
|
|
98
|
+
session_id=session_id,
|
|
99
|
+
user_id=user_id,
|
|
100
|
+
pagination={"page": page, "size": size}
|
|
101
|
+
)
|
|
102
|
+
return request
|
|
103
|
+
except ValidationError as e:
|
|
104
|
+
print(f"Validation failed: {e}")
|
|
105
|
+
return None
|
|
106
|
+
|
|
107
|
+
# Create a request to update session name
|
|
108
|
+
def update_session_name(session_id: str, user_id: str, new_name: str):
|
|
109
|
+
try:
|
|
110
|
+
request = UpdateSessionRequest(
|
|
111
|
+
session_id=session_id,
|
|
112
|
+
user_id=user_id,
|
|
113
|
+
name=new_name # Automatically validated (1-255 characters)
|
|
114
|
+
)
|
|
115
|
+
return request
|
|
116
|
+
except ValidationError as e:
|
|
117
|
+
print(f"Validation failed: {e}")
|
|
118
|
+
return None
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 3. Working with Response DTOs
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.responses import (
|
|
125
|
+
SessionResponse,
|
|
126
|
+
MessageResponse,
|
|
127
|
+
SessionListResponse
|
|
128
|
+
)
|
|
129
|
+
from solace_agent_mesh.gateway.http_sse.shared.enums import MessageType, SenderType
|
|
130
|
+
import time
|
|
131
|
+
|
|
132
|
+
# Create session responses
|
|
133
|
+
def create_session_response(session_data: dict) -> SessionResponse:
|
|
134
|
+
return SessionResponse(
|
|
135
|
+
id=session_data["id"],
|
|
136
|
+
user_id=session_data["user_id"],
|
|
137
|
+
name=session_data.get("name"),
|
|
138
|
+
agent_id=session_data.get("agent_id"),
|
|
139
|
+
created_time=int(time.time() * 1000), # Current time in epoch ms
|
|
140
|
+
updated_time=session_data.get("updated_time")
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
# Create message responses
|
|
144
|
+
def create_message_response(message_data: dict) -> MessageResponse:
|
|
145
|
+
return MessageResponse(
|
|
146
|
+
id=message_data["id"],
|
|
147
|
+
session_id=message_data["session_id"],
|
|
148
|
+
message=message_data["message"],
|
|
149
|
+
sender_type=SenderType.USER,
|
|
150
|
+
sender_name=message_data["sender_name"],
|
|
151
|
+
message_type=MessageType.TEXT,
|
|
152
|
+
created_time=int(time.time() * 1000)
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
# Create paginated session list responses
|
|
156
|
+
def create_session_list_response(sessions: list, total: int) -> SessionListResponse:
|
|
157
|
+
session_responses = [create_session_response(session) for session in sessions]
|
|
158
|
+
return SessionListResponse(
|
|
159
|
+
sessions=session_responses,
|
|
160
|
+
pagination={"page": 1, "size": len(sessions), "total_pages": 1},
|
|
161
|
+
total_count=total
|
|
162
|
+
)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### 4. Complete API Endpoint Example
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
from fastapi import APIRouter, HTTPException
|
|
169
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.requests import (
|
|
170
|
+
GetSessionRequest,
|
|
171
|
+
GetSessionHistoryRequest,
|
|
172
|
+
UpdateSessionRequest
|
|
173
|
+
)
|
|
174
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.responses import (
|
|
175
|
+
SessionResponse,
|
|
176
|
+
MessageResponse,
|
|
177
|
+
SessionListResponse
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
router = APIRouter()
|
|
181
|
+
|
|
182
|
+
@router.get("/sessions/{session_id}")
|
|
183
|
+
async def get_session(session_id: str, user_id: str) -> SessionResponse:
|
|
184
|
+
"""Get a specific session"""
|
|
185
|
+
|
|
186
|
+
# Create and validate request DTO
|
|
187
|
+
request = GetSessionRequest(
|
|
188
|
+
session_id=session_id,
|
|
189
|
+
user_id=user_id
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
# Fetch data (mock implementation)
|
|
193
|
+
session_data = fetch_session(request)
|
|
194
|
+
|
|
195
|
+
# Return structured response with automatic timestamp conversion
|
|
196
|
+
return SessionResponse(
|
|
197
|
+
id=session_data["id"],
|
|
198
|
+
user_id=session_data["user_id"],
|
|
199
|
+
name=session_data["name"],
|
|
200
|
+
created_time=session_data["created_time"]
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
@router.get("/sessions/{session_id}/history")
|
|
204
|
+
async def get_session_history(
|
|
205
|
+
session_id: str,
|
|
206
|
+
user_id: str,
|
|
207
|
+
page: int = 1,
|
|
208
|
+
size: int = 20
|
|
209
|
+
) -> list[MessageResponse]:
|
|
210
|
+
"""Get session message history"""
|
|
211
|
+
|
|
212
|
+
# Validate request using DTO
|
|
213
|
+
request = GetSessionHistoryRequest(
|
|
214
|
+
session_id=session_id,
|
|
215
|
+
user_id=user_id,
|
|
216
|
+
pagination={"page": page, "size": size}
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
# Fetch messages (mock implementation)
|
|
220
|
+
messages_data = fetch_session_messages(request)
|
|
221
|
+
|
|
222
|
+
# Return response DTOs with automatic field aliasing
|
|
223
|
+
return [
|
|
224
|
+
MessageResponse(
|
|
225
|
+
id=msg["id"],
|
|
226
|
+
session_id=msg["session_id"],
|
|
227
|
+
message=msg["message"],
|
|
228
|
+
sender_type=msg["sender_type"],
|
|
229
|
+
sender_name=msg["sender_name"],
|
|
230
|
+
message_type=msg["message_type"],
|
|
231
|
+
created_time=msg["created_time"]
|
|
232
|
+
)
|
|
233
|
+
for msg in messages_data
|
|
234
|
+
]
|
|
235
|
+
|
|
236
|
+
@router.put("/sessions/{session_id}")
|
|
237
|
+
async def update_session(
|
|
238
|
+
session_id: str,
|
|
239
|
+
user_id: str,
|
|
240
|
+
name: str
|
|
241
|
+
) -> SessionResponse:
|
|
242
|
+
"""Update session name"""
|
|
243
|
+
|
|
244
|
+
# Validate request using DTO
|
|
245
|
+
try:
|
|
246
|
+
request = UpdateSessionRequest(
|
|
247
|
+
session_id=session_id,
|
|
248
|
+
user_id=user_id,
|
|
249
|
+
name=name
|
|
250
|
+
)
|
|
251
|
+
except ValidationError as e:
|
|
252
|
+
raise HTTPException(status_code=400, detail=str(e))
|
|
253
|
+
|
|
254
|
+
# Update session (mock implementation)
|
|
255
|
+
updated_session = update_session_in_db(request)
|
|
256
|
+
|
|
257
|
+
# Return response DTO with automatic field aliasing
|
|
258
|
+
return SessionResponse(
|
|
259
|
+
id=updated_session["id"],
|
|
260
|
+
user_id=updated_session["user_id"],
|
|
261
|
+
name=updated_session["name"],
|
|
262
|
+
created_time=updated_session["created_time"],
|
|
263
|
+
updated_time=updated_session["updated_time"]
|
|
264
|
+
)
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### 5. JSON Serialization with Automatic Timestamp Conversion
|
|
268
|
+
|
|
269
|
+
```python
|
|
270
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.responses import SessionResponse, MessageResponse
|
|
271
|
+
from solace_agent_mesh.gateway.http_sse.shared.enums import MessageType, SenderType
|
|
272
|
+
import json
|
|
273
|
+
|
|
274
|
+
# Create a session response
|
|
275
|
+
session = SessionResponse(
|
|
276
|
+
id="sess_123",
|
|
277
|
+
user_id="user_456",
|
|
278
|
+
name="My Session",
|
|
279
|
+
created_time=1640995200000, # Epoch milliseconds
|
|
280
|
+
updated_time=1640995260000
|
|
281
|
+
)
|
|
282
|
+
|
|
283
|
+
# Automatic conversion to ISO strings in JSON output
|
|
284
|
+
json_output = session.model_dump_json()
|
|
285
|
+
print(json_output)
|
|
286
|
+
# Output: {
|
|
287
|
+
# "id": "sess_123",
|
|
288
|
+
# "userId": "user_456", # Note the camelCase aliasing
|
|
289
|
+
# "name": "My Session",
|
|
290
|
+
# "createdTime": "2022-01-01T00:00:00Z", # Converted to ISO string
|
|
291
|
+
# "updatedTime": "2022-01-01T00:01:00Z"
|
|
292
|
+
# }
|
|
293
|
+
|
|
294
|
+
# Create a message response with field aliasing
|
|
295
|
+
message = MessageResponse(
|
|
296
|
+
id="msg_789",
|
|
297
|
+
session_id="sess_123",
|
|
298
|
+
message="Hello world",
|
|
299
|
+
sender_type=SenderType.USER,
|
|
300
|
+
sender_name="John Doe",
|
|
301
|
+
message_type=MessageType.TEXT,
|
|
302
|
+
created_time=1640995200000
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
# Get dict with converted timestamps and aliased fields
|
|
306
|
+
dict_output = message.model_dump()
|
|
307
|
+
print(dict_output["sessionId"]) # "sess_123" (camelCase alias)
|
|
308
|
+
print(dict_output["senderType"]) # SenderType.USER (camelCase alias)
|
|
309
|
+
print(dict_output["createdTime"]) # "2022-01-01T00:00:00Z" (converted timestamp)
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### 6. Custom Response Classes Using Base
|
|
313
|
+
|
|
314
|
+
```python
|
|
315
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.responses.base_responses import BaseTimestampResponse
|
|
316
|
+
|
|
317
|
+
class CustomResponse(BaseTimestampResponse):
|
|
318
|
+
"""Custom response with automatic timestamp handling"""
|
|
319
|
+
name: str
|
|
320
|
+
status: str
|
|
321
|
+
created_time: int
|
|
322
|
+
last_accessed: int | None = None
|
|
323
|
+
|
|
324
|
+
class Config:
|
|
325
|
+
# Add field aliases if needed
|
|
326
|
+
alias_generator = lambda field_name: ''.join(
|
|
327
|
+
word.capitalize() if i > 0 else word
|
|
328
|
+
for i, word in enumerate(field_name.split('_'))
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
# Usage
|
|
332
|
+
custom_response = CustomResponse(
|
|
333
|
+
name="Test Item",
|
|
334
|
+
status="active",
|
|
335
|
+
created_time=1640995200000,
|
|
336
|
+
last_accessed=1640995300000
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
# Automatic timestamp conversion in JSON
|
|
340
|
+
json_data = custom_response.model_dump_json()
|
|
341
|
+
# Fields like created_time become ISO strings automatically
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
This comprehensive guide shows how the `dto` directory provides a complete type-safe API contract system with automatic validation for requests and structured responses with timestamp conversion for the HTTP SSE gateway.
|
|
345
|
+
|
|
346
|
+
# content_hash: 3bb29d4c46b962221fc3034560b7e0da75b5a41f7f8f4d4f25aecf26e10f83f5
|
|
@@ -4,12 +4,12 @@ Request DTOs for API endpoints.
|
|
|
4
4
|
|
|
5
5
|
from .session_requests import (
|
|
6
6
|
GetSessionRequest,
|
|
7
|
-
GetSessionHistoryRequest,
|
|
8
7
|
UpdateSessionRequest,
|
|
9
8
|
)
|
|
9
|
+
from .task_requests import SaveTaskRequest
|
|
10
10
|
|
|
11
11
|
__all__ = [
|
|
12
12
|
"GetSessionRequest",
|
|
13
|
-
"GetSessionHistoryRequest",
|
|
14
13
|
"UpdateSessionRequest",
|
|
15
|
-
|
|
14
|
+
"SaveTaskRequest",
|
|
15
|
+
]
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# DEVELOPER GUIDE: requests
|
|
2
|
+
|
|
3
|
+
## Quick Summary
|
|
4
|
+
This directory contains request Data Transfer Objects (DTOs) for API endpoints, specifically focused on session management operations. These Pydantic models define the structure and validation rules for incoming API requests.
|
|
5
|
+
|
|
6
|
+
## Files Overview
|
|
7
|
+
- `__init__.py` - Exports all session-related request DTOs for easy importing
|
|
8
|
+
- `session_requests.py` - Defines request DTOs for session CRUD operations (get, update, history retrieval)
|
|
9
|
+
|
|
10
|
+
## Developer API Reference
|
|
11
|
+
|
|
12
|
+
### __init__.py
|
|
13
|
+
**Purpose:** Provides centralized imports for all request DTOs
|
|
14
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.requests import GetSessionRequest, GetSessionHistoryRequest, UpdateSessionRequest`
|
|
15
|
+
|
|
16
|
+
**Usage Examples:**
|
|
17
|
+
```python
|
|
18
|
+
# Import all session request DTOs
|
|
19
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.requests import (
|
|
20
|
+
GetSessionRequest,
|
|
21
|
+
GetSessionHistoryRequest,
|
|
22
|
+
UpdateSessionRequest
|
|
23
|
+
)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### session_requests.py
|
|
27
|
+
**Purpose:** Defines Pydantic models for session-related API request validation
|
|
28
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.requests.session_requests import GetSessionRequest, GetSessionHistoryRequest, UpdateSessionRequest`
|
|
29
|
+
|
|
30
|
+
**Classes:**
|
|
31
|
+
- `GetSessionRequest(session_id: SessionId, user_id: UserId)` - Request DTO for retrieving a specific session by ID
|
|
32
|
+
- `GetSessionHistoryRequest(session_id: SessionId, user_id: UserId, pagination: Optional[PaginationInfo] = None)` - Request DTO for retrieving session message history with optional pagination
|
|
33
|
+
- `UpdateSessionRequest(session_id: SessionId, user_id: UserId, name: str)` - Request DTO for updating session details with validation (name must be 1-255 characters)
|
|
34
|
+
|
|
35
|
+
**Usage Examples:**
|
|
36
|
+
```python
|
|
37
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.requests.session_requests import (
|
|
38
|
+
GetSessionRequest,
|
|
39
|
+
GetSessionHistoryRequest,
|
|
40
|
+
UpdateSessionRequest
|
|
41
|
+
)
|
|
42
|
+
from pydantic import ValidationError
|
|
43
|
+
|
|
44
|
+
# Create a request to get a specific session
|
|
45
|
+
get_session_req = GetSessionRequest(
|
|
46
|
+
session_id="session456",
|
|
47
|
+
user_id="user123"
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
# Create a request to get session history with pagination
|
|
51
|
+
get_history_req = GetSessionHistoryRequest(
|
|
52
|
+
session_id="session456",
|
|
53
|
+
user_id="user123",
|
|
54
|
+
pagination={"page": 1, "size": 20}
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
# Create a request to update a session name
|
|
58
|
+
update_req = UpdateSessionRequest(
|
|
59
|
+
session_id="session456",
|
|
60
|
+
user_id="user123",
|
|
61
|
+
name="My Updated Session"
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
# Validate request data from dictionary
|
|
65
|
+
request_data = {
|
|
66
|
+
"session_id": "session789",
|
|
67
|
+
"user_id": "user456",
|
|
68
|
+
"name": "New Session Name"
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
try:
|
|
72
|
+
validated_request = UpdateSessionRequest(**request_data)
|
|
73
|
+
print(f"Valid request: {validated_request}")
|
|
74
|
+
except ValidationError as e:
|
|
75
|
+
print(f"Validation failed: {e}")
|
|
76
|
+
|
|
77
|
+
# Access validated fields
|
|
78
|
+
print(f"Session ID: {update_req.session_id}")
|
|
79
|
+
print(f"User ID: {update_req.user_id}")
|
|
80
|
+
print(f"New name: {update_req.name}")
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
# content_hash: d40151714f449905662170c71b393dba7c98e7ec1c46f5f3a861097b2d5376b2
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
Session-related request DTOs.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
from typing import Optional
|
|
6
5
|
from pydantic import BaseModel, Field
|
|
7
6
|
|
|
8
|
-
from ....shared.types import SessionId, UserId
|
|
7
|
+
from ....shared.types import SessionId, UserId
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class GetSessionRequest(BaseModel):
|
|
@@ -14,15 +13,8 @@ class GetSessionRequest(BaseModel):
|
|
|
14
13
|
user_id: UserId
|
|
15
14
|
|
|
16
15
|
|
|
17
|
-
class GetSessionHistoryRequest(BaseModel):
|
|
18
|
-
"""Request DTO for retrieving session message history."""
|
|
19
|
-
session_id: SessionId
|
|
20
|
-
user_id: UserId
|
|
21
|
-
pagination: Optional[PaginationInfo] = None
|
|
22
|
-
|
|
23
|
-
|
|
24
16
|
class UpdateSessionRequest(BaseModel):
|
|
25
17
|
"""Request DTO for updating session details."""
|
|
26
18
|
session_id: SessionId
|
|
27
19
|
user_id: UserId
|
|
28
|
-
name: str = Field(..., min_length=1, max_length=255, description="New session name")
|
|
20
|
+
name: str = Field(..., min_length=1, max_length=255, description="New session name")
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Task-related request DTOs.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from typing import Optional
|
|
7
|
+
from pydantic import BaseModel, Field, field_validator
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SaveTaskRequest(BaseModel):
|
|
11
|
+
"""Request DTO for saving a task."""
|
|
12
|
+
|
|
13
|
+
task_id: str = Field(..., alias="taskId", min_length=1)
|
|
14
|
+
user_message: Optional[str] = Field(None, alias="userMessage")
|
|
15
|
+
message_bubbles: str = Field(..., alias="messageBubbles") # JSON string (opaque)
|
|
16
|
+
task_metadata: Optional[str] = Field(None, alias="taskMetadata") # JSON string (opaque)
|
|
17
|
+
|
|
18
|
+
model_config = {"populate_by_name": True}
|
|
19
|
+
|
|
20
|
+
@field_validator("task_id")
|
|
21
|
+
@classmethod
|
|
22
|
+
def validate_task_id(cls, v: str) -> str:
|
|
23
|
+
"""Validate that task_id is non-empty."""
|
|
24
|
+
if not v or not v.strip():
|
|
25
|
+
raise ValueError("task_id cannot be empty")
|
|
26
|
+
return v.strip()
|
|
27
|
+
|
|
28
|
+
@field_validator("message_bubbles")
|
|
29
|
+
@classmethod
|
|
30
|
+
def validate_message_bubbles(cls, v: str) -> str:
|
|
31
|
+
"""Validate that message_bubbles is a non-empty JSON string."""
|
|
32
|
+
if not v or not v.strip():
|
|
33
|
+
raise ValueError("message_bubbles cannot be empty")
|
|
34
|
+
|
|
35
|
+
# Validate it's valid JSON (but don't validate structure)
|
|
36
|
+
try:
|
|
37
|
+
parsed = json.loads(v)
|
|
38
|
+
if not isinstance(parsed, list) or len(parsed) == 0:
|
|
39
|
+
raise ValueError("message_bubbles must be a non-empty JSON array")
|
|
40
|
+
except json.JSONDecodeError as e:
|
|
41
|
+
raise ValueError(f"message_bubbles must be valid JSON: {e}")
|
|
42
|
+
|
|
43
|
+
return v
|
|
44
|
+
|
|
45
|
+
@field_validator("task_metadata")
|
|
46
|
+
@classmethod
|
|
47
|
+
def validate_task_metadata(cls, v: Optional[str]) -> Optional[str]:
|
|
48
|
+
"""Validate that task_metadata is valid JSON if provided."""
|
|
49
|
+
if v is None or not v.strip():
|
|
50
|
+
return None
|
|
51
|
+
|
|
52
|
+
# Validate it's valid JSON (but don't validate structure)
|
|
53
|
+
try:
|
|
54
|
+
json.loads(v)
|
|
55
|
+
except json.JSONDecodeError as e:
|
|
56
|
+
raise ValueError(f"task_metadata must be valid JSON: {e}")
|
|
57
|
+
|
|
58
|
+
return v
|
|
@@ -3,14 +3,16 @@ Response DTOs for API endpoints.
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
from .session_responses import (
|
|
6
|
-
MessageResponse,
|
|
7
6
|
SessionResponse,
|
|
8
7
|
SessionListResponse,
|
|
9
8
|
)
|
|
9
|
+
from .task_responses import TaskResponse, TaskListResponse
|
|
10
10
|
|
|
11
11
|
__all__ = [
|
|
12
12
|
# Session responses
|
|
13
|
-
"MessageResponse",
|
|
14
13
|
"SessionResponse",
|
|
15
14
|
"SessionListResponse",
|
|
16
|
-
|
|
15
|
+
# Task responses
|
|
16
|
+
"TaskResponse",
|
|
17
|
+
"TaskListResponse",
|
|
18
|
+
]
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# DEVELOPER GUIDE: responses
|
|
2
|
+
|
|
3
|
+
## Quick Summary
|
|
4
|
+
The `responses` directory contains Pydantic response DTOs (Data Transfer Objects) for API endpoints. It provides structured response models with automatic timestamp conversion from epoch milliseconds to ISO 8601 strings for JSON serialization.
|
|
5
|
+
|
|
6
|
+
## Files Overview
|
|
7
|
+
- `__init__.py` - Exports all response DTOs for easy importing
|
|
8
|
+
- `base_responses.py` - Base response class with automatic timestamp serialization
|
|
9
|
+
- `session_responses.py` - Session and message-related response DTOs
|
|
10
|
+
|
|
11
|
+
## Developer API Reference
|
|
12
|
+
|
|
13
|
+
### __init__.py
|
|
14
|
+
**Purpose:** Central import point for all response DTOs
|
|
15
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.responses import MessageResponse, SessionResponse, SessionListResponse`
|
|
16
|
+
|
|
17
|
+
### base_responses.py
|
|
18
|
+
**Purpose:** Provides base response class with automatic timestamp field conversion
|
|
19
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.responses.base_responses import BaseTimestampResponse`
|
|
20
|
+
|
|
21
|
+
**Classes:**
|
|
22
|
+
- `BaseTimestampResponse(BaseModel)` - Base class for responses with timestamp fields that auto-converts epoch ms to ISO strings
|
|
23
|
+
- `model_dump(**kwargs) -> dict[str, Any]` - Converts timestamp fields to ISO strings in output
|
|
24
|
+
- `model_dump_json(**kwargs) -> str` - Serializes to JSON with timestamp conversion
|
|
25
|
+
|
|
26
|
+
**Usage Examples:**
|
|
27
|
+
```python
|
|
28
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.responses.base_responses import BaseTimestampResponse
|
|
29
|
+
|
|
30
|
+
class MyResponse(BaseTimestampResponse):
|
|
31
|
+
name: str
|
|
32
|
+
created_time: int # Will be auto-converted to ISO string in JSON output
|
|
33
|
+
updated_time: int | None = None
|
|
34
|
+
|
|
35
|
+
# Usage
|
|
36
|
+
response = MyResponse(name="test", created_time=1640995200000)
|
|
37
|
+
json_data = response.model_dump() # created_time becomes ISO string
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### session_responses.py
|
|
41
|
+
**Purpose:** Session and message response DTOs with field aliasing for API consistency
|
|
42
|
+
**Import:** `from solace_agent_mesh.gateway.http_sse.routers.dto.responses import MessageResponse, SessionResponse, SessionListResponse`
|
|
43
|
+
|
|
44
|
+
**Classes:**
|
|
45
|
+
- `MessageResponse(BaseTimestampResponse)` - Response DTO for chat messages
|
|
46
|
+
- `id: MessageId` - Unique message identifier
|
|
47
|
+
- `session_id: SessionId` - Session this message belongs to (aliased as "sessionId")
|
|
48
|
+
- `message: str` - Message content
|
|
49
|
+
- `sender_type: SenderType` - Type of sender (aliased as "senderType")
|
|
50
|
+
- `sender_name: str` - Name of sender (aliased as "senderName")
|
|
51
|
+
- `message_type: MessageType` - Type of message (aliased as "messageType")
|
|
52
|
+
- `created_time: int` - Creation timestamp in epoch ms (aliased as "createdTime")
|
|
53
|
+
- `updated_time: int | None` - Update timestamp in epoch ms (aliased as "updatedTime")
|
|
54
|
+
|
|
55
|
+
- `SessionResponse(BaseTimestampResponse)` - Response DTO for chat sessions
|
|
56
|
+
- `id: SessionId` - Unique session identifier
|
|
57
|
+
- `user_id: UserId` - User who owns the session (aliased as "userId")
|
|
58
|
+
- `name: str | None` - Optional session name
|
|
59
|
+
- `agent_id: str | None` - Optional agent identifier (aliased as "agentId")
|
|
60
|
+
- `created_time: int` - Creation timestamp in epoch ms (aliased as "createdTime")
|
|
61
|
+
- `updated_time: int | None` - Update timestamp in epoch ms (aliased as "updatedTime")
|
|
62
|
+
|
|
63
|
+
- `SessionListResponse(BaseModel)` - Response DTO for paginated session lists
|
|
64
|
+
- `sessions: list[SessionResponse]` - List of session objects
|
|
65
|
+
- `pagination: PaginationInfo | None` - Pagination metadata
|
|
66
|
+
- `total_count: int` - Total number of sessions (aliased as "totalCount")
|
|
67
|
+
|
|
68
|
+
**Usage Examples:**
|
|
69
|
+
```python
|
|
70
|
+
from solace_agent_mesh.gateway.http_sse.routers.dto.responses import (
|
|
71
|
+
MessageResponse,
|
|
72
|
+
SessionResponse,
|
|
73
|
+
SessionListResponse
|
|
74
|
+
)
|
|
75
|
+
from solace_agent_mesh.gateway.http_sse.shared.enums import MessageType, SenderType
|
|
76
|
+
|
|
77
|
+
# Create a message response
|
|
78
|
+
message = MessageResponse(
|
|
79
|
+
id="msg_123",
|
|
80
|
+
session_id="sess_456",
|
|
81
|
+
message="Hello world",
|
|
82
|
+
sender_type=SenderType.USER,
|
|
83
|
+
sender_name="John Doe",
|
|
84
|
+
message_type=MessageType.TEXT,
|
|
85
|
+
created_time=1640995200000
|
|
86
|
+
)
|
|
87
|
+
|
|
88
|
+
# Create a session response
|
|
89
|
+
session = SessionResponse(
|
|
90
|
+
id="sess_456",
|
|
91
|
+
user_id="user_789",
|
|
92
|
+
name="My Chat Session",
|
|
93
|
+
agent_id="agent_001",
|
|
94
|
+
created_time=1640995200000
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
# Create a session list response
|
|
98
|
+
session_list = SessionListResponse(
|
|
99
|
+
sessions=[session],
|
|
100
|
+
total_count=1
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
# Serialize to JSON (timestamps auto-converted to ISO strings)
|
|
104
|
+
json_output = message.model_dump_json()
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
# content_hash: ed7205266a0eb2b2cb548d0c84fd44758cf1030524ffb144d08e9c82545fc4eb
|
|
@@ -4,24 +4,10 @@ Session-related response DTOs.
|
|
|
4
4
|
|
|
5
5
|
from pydantic import BaseModel, ConfigDict, Field
|
|
6
6
|
|
|
7
|
-
from ....shared.
|
|
8
|
-
from ....shared.types import MessageId, PaginationInfo, SessionId, UserId
|
|
7
|
+
from ....shared.types import PaginationInfo, SessionId, UserId
|
|
9
8
|
from .base_responses import BaseTimestampResponse
|
|
10
9
|
|
|
11
10
|
|
|
12
|
-
class MessageResponse(BaseTimestampResponse):
|
|
13
|
-
"""Response DTO for a chat message."""
|
|
14
|
-
|
|
15
|
-
id: MessageId
|
|
16
|
-
session_id: SessionId = Field(alias="sessionId")
|
|
17
|
-
message: str
|
|
18
|
-
sender_type: SenderType = Field(alias="senderType")
|
|
19
|
-
sender_name: str = Field(alias="senderName")
|
|
20
|
-
message_type: MessageType = Field(default=MessageType.TEXT, alias="messageType")
|
|
21
|
-
created_time: int = Field(alias="createdTime")
|
|
22
|
-
updated_time: int | None = Field(default=None, alias="updatedTime")
|
|
23
|
-
|
|
24
|
-
|
|
25
11
|
class SessionResponse(BaseTimestampResponse):
|
|
26
12
|
"""Response DTO for a session."""
|
|
27
13
|
|