solace-agent-mesh 1.5.0__py3-none-any.whl → 1.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of solace-agent-mesh might be problematic. Click here for more details.
- solace_agent_mesh/agent/adk/callbacks.py +14 -17
- solace_agent_mesh/agent/adk/embed_resolving_mcp_toolset.py +3 -1
- solace_agent_mesh/agent/adk/intelligent_mcp_callbacks.py +2 -1
- solace_agent_mesh/agent/adk/mcp_content_processor.py +2 -1
- solace_agent_mesh/agent/adk/models/lite_llm.py +123 -8
- solace_agent_mesh/agent/adk/models/oauth2_token_manager.py +245 -0
- solace_agent_mesh/agent/adk/runner.py +3 -1
- solace_agent_mesh/agent/adk/services.py +4 -1
- solace_agent_mesh/agent/adk/setup.py +3 -1
- solace_agent_mesh/agent/adk/tool_wrapper.py +2 -2
- solace_agent_mesh/agent/protocol/event_handlers.py +42 -2
- solace_agent_mesh/agent/proxies/__init__.py +0 -0
- solace_agent_mesh/agent/proxies/a2a/__init__.py +3 -0
- solace_agent_mesh/agent/proxies/a2a/app.py +55 -0
- solace_agent_mesh/agent/proxies/a2a/component.py +1115 -0
- solace_agent_mesh/agent/proxies/a2a/config.py +140 -0
- solace_agent_mesh/agent/proxies/a2a/oauth_token_cache.py +104 -0
- solace_agent_mesh/agent/proxies/base/__init__.py +3 -0
- solace_agent_mesh/agent/proxies/base/app.py +99 -0
- solace_agent_mesh/agent/proxies/base/component.py +619 -0
- solace_agent_mesh/agent/proxies/base/config.py +85 -0
- solace_agent_mesh/agent/proxies/base/proxy_task_context.py +17 -0
- solace_agent_mesh/agent/sac/app.py +12 -4
- solace_agent_mesh/agent/sac/component.py +164 -9
- solace_agent_mesh/agent/tools/audio_tools.py +127 -9
- solace_agent_mesh/agent/tools/builtin_artifact_tools.py +3 -1
- solace_agent_mesh/agent/tools/builtin_data_analysis_tools.py +3 -1
- solace_agent_mesh/agent/tools/dynamic_tool.py +2 -1
- solace_agent_mesh/agent/tools/general_agent_tools.py +2 -1
- solace_agent_mesh/agent/tools/image_tools.py +2 -1
- solace_agent_mesh/agent/tools/peer_agent_tool.py +2 -1
- solace_agent_mesh/agent/tools/registry.py +3 -1
- solace_agent_mesh/agent/tools/test_tools.py +2 -1
- solace_agent_mesh/agent/tools/web_tools.py +12 -6
- solace_agent_mesh/agent/utils/artifact_helpers.py +144 -4
- solace_agent_mesh/agent/utils/config_parser.py +3 -1
- solace_agent_mesh/assets/docs/404.html +3 -3
- solace_agent_mesh/assets/docs/assets/js/{b7006a3a.73a79653.js → 032c2d61.f3d37824.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/0bcf40b7.c019ad46.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/15ba94aa.932dd2db.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2131ec11.5c7a1f6e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{2334.622a6395.js → 2334.1cf50a20.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/240a0364.7eac6021.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/2e32b5e0.33f5d75b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/341393d4.0fac2613.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{3624.b524e433.js → 3624.0eaa1fd0.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/3a6c6137.f5940cfa.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ac1795d.76654dd9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/3ff0015d.2be20244.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/509e993c.4c7a1a6d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/547e15cc.2cbb060a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/55b7b518.f2b1d1ba.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/5c2bd65f.eda4bcb2.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6063ff4c.ef84f702.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/631738c7.a8b1ef8b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6a520c9d.ba015d81.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6ad8f0bd.f4b15f3b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6d84eae0.4a5fbf39.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/6fdfefc7.99de744e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/71da7b71.38583438.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/722f809d.965da774.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/742f027b.46c07808.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/77cf947d.48cb18a2.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/8024126c.56e59919.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/81a99df0.07034dd9.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/82fbfb93.139a1a1f.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/{8591.d7c16be6.js → 8591.5d015485.js} +2 -2
- solace_agent_mesh/assets/docs/assets/js/{8731.49e930c2.js → 8731.6c1dbf0c.js} +1 -1
- solace_agent_mesh/assets/docs/assets/js/924ffdeb.8095e148.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/945fb41e.6f4cdffd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/94e8668d.b5ddb7a1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9bb13469.dd1c9b54.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/9e9d0a82.570c057b.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ab9708a8.3e6dd091.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ad71b5ed.af3ecfd1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/c198a0dc.8f31f867.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/c93cbaa0.eaff365e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ceb2a7a6.5d92d7d0.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/da0b5bad.d08a9466.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/db924877.e98d12a1.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd817ffc.0aa9630a.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/dd81e2b8.d590bc9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/de5f4c65.e8241890.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/de915948.27d6b065.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e3d9abda.2b916f9e.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e6f9706b.e74a984d.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/e92d0134.cf6d6522.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/f284c35a.42f59cdd.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/ff4d71f2.15b02f97.js +1 -0
- solace_agent_mesh/assets/docs/assets/js/main.20feee82.js +2 -0
- solace_agent_mesh/assets/docs/assets/js/runtime~main.0d198646.js +1 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/agents/index.html +154 -0
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/artifact-management/index.html +7 -7
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/audio-tools/index.html +7 -7
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/data-analysis-tools/index.html +8 -8
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/embeds/index.html +6 -6
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → components}/builtin-tools/index.html +11 -11
- solace_agent_mesh/assets/docs/docs/documentation/{concepts → components}/cli/index.html +25 -25
- solace_agent_mesh/assets/docs/docs/documentation/components/gateways/index.html +91 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/index.html +29 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/orchestrator/index.html +55 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/plugins/index.html +110 -0
- solace_agent_mesh/assets/docs/docs/documentation/components/proxies/index.html +262 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/debugging/index.html +104 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/deployment-options/index.html +85 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/index.html +25 -0
- solace_agent_mesh/assets/docs/docs/documentation/deploying/observability/index.html +59 -0
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/create-agents/index.html +113 -152
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/create-gateways/index.html +10 -10
- solace_agent_mesh/assets/docs/docs/documentation/{user-guide → developing}/creating-python-tools/index.html +12 -12
- solace_agent_mesh/assets/docs/docs/documentation/developing/creating-service-providers/index.html +54 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/evaluations/index.html +135 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/index.html +34 -0
- solace_agent_mesh/assets/docs/docs/documentation/developing/structure/index.html +55 -0
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/bedrock-agents/index.html +25 -25
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/custom-agent/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/event-mesh-gateway/index.html +12 -12
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/mcp-integration/index.html +10 -10
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/mongodb-integration/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/rag-integration/index.html +13 -13
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/rest-gateway/index.html +10 -10
- solace_agent_mesh/assets/docs/docs/documentation/developing/tutorials/slack-integration/index.html +72 -0
- solace_agent_mesh/assets/docs/docs/documentation/{tutorials → developing/tutorials}/sql-database/index.html +14 -14
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/index.html +33 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/installation/index.html +83 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/rbac-setup-guide/index.html +222 -0
- solace_agent_mesh/assets/docs/docs/documentation/enterprise/single-sign-on/index.html +161 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/architecture/index.html +75 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/index.html +53 -0
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/introduction/index.html +35 -100
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/try-agent-mesh/index.html +41 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/configurations/index.html +81 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/index.html +25 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/installation/index.html +76 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/large_language_models/index.html +160 -0
- solace_agent_mesh/assets/docs/docs/documentation/installing-and-configuring/run-project/index.html +142 -0
- solace_agent_mesh/assets/docs/docs/documentation/migrations/a2a-upgrade/a2a-gateway-upgrade-to-0.3.0/index.html +100 -0
- solace_agent_mesh/assets/docs/docs/documentation/{Migrations/A2A Upgrade To 0.3.0/a2a-technical-migration-map/index.html → migrations/a2a-upgrade/a2a-technical-migration-map/index.html} +10 -11
- solace_agent_mesh/assets/docs/img/solace-logo.png +0 -0
- solace_agent_mesh/assets/docs/lunr-index-1761165361160.json +1 -0
- solace_agent_mesh/assets/docs/lunr-index.json +1 -1
- solace_agent_mesh/assets/docs/search-doc-1761165361160.json +1 -0
- solace_agent_mesh/assets/docs/search-doc.json +1 -1
- solace_agent_mesh/assets/docs/sitemap.xml +1 -1
- solace_agent_mesh/cli/__init__.py +1 -1
- solace_agent_mesh/cli/commands/add_cmd/agent_cmd.py +2 -69
- solace_agent_mesh/cli/commands/eval_cmd.py +11 -49
- solace_agent_mesh/cli/commands/init_cmd/__init__.py +0 -5
- solace_agent_mesh/cli/commands/init_cmd/env_step.py +10 -12
- solace_agent_mesh/cli/commands/init_cmd/orchestrator_step.py +9 -61
- solace_agent_mesh/cli/commands/init_cmd/webui_gateway_step.py +9 -49
- solace_agent_mesh/cli/commands/plugin_cmd/add_cmd.py +1 -2
- solace_agent_mesh/client/webui/frontend/static/assets/{authCallback-DwrxZE0E.js → authCallback-BTf6dqwp.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/{client-DarGQzyw.js → client-CaY59VuC.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-BGTaW0uv.js +342 -0
- solace_agent_mesh/client/webui/frontend/static/assets/main-DHJKSW1S.css +1 -0
- solace_agent_mesh/client/webui/frontend/static/assets/{vendor-BKIeiHj_.js → vendor-BEmvJSYz.js} +1 -1
- solace_agent_mesh/client/webui/frontend/static/auth-callback.html +3 -3
- solace_agent_mesh/client/webui/frontend/static/index.html +4 -4
- solace_agent_mesh/common/a2a/__init__.py +24 -0
- solace_agent_mesh/common/a2a/artifact.py +41 -1
- solace_agent_mesh/common/a2a/events.py +29 -0
- solace_agent_mesh/common/a2a/message.py +68 -0
- solace_agent_mesh/common/a2a/protocol.py +76 -3
- solace_agent_mesh/common/a2a/translation.py +3 -1
- solace_agent_mesh/common/agent_registry.py +83 -3
- solace_agent_mesh/common/constants.py +3 -1
- solace_agent_mesh/common/middleware/config_resolver.py +3 -1
- solace_agent_mesh/common/middleware/registry.py +3 -1
- solace_agent_mesh/common/sac/sam_component_base.py +2 -1
- solace_agent_mesh/common/sam_events/event_service.py +3 -2
- solace_agent_mesh/common/services/employee_service.py +3 -1
- solace_agent_mesh/common/services/identity_service.py +2 -1
- solace_agent_mesh/common/services/providers/local_file_identity_service.py +2 -1
- solace_agent_mesh/common/utils/artifact_utils.py +3 -1
- solace_agent_mesh/common/utils/asyncio_macos_fix.py +3 -1
- solace_agent_mesh/common/utils/embeds/converter.py +3 -1
- solace_agent_mesh/common/utils/embeds/evaluators.py +2 -1
- solace_agent_mesh/common/utils/embeds/modifiers.py +3 -2
- solace_agent_mesh/common/utils/embeds/resolver.py +2 -1
- solace_agent_mesh/common/utils/initializer.py +3 -1
- solace_agent_mesh/common/utils/message_utils.py +2 -1
- solace_agent_mesh/common/utils/push_notification_auth.py +3 -2
- solace_agent_mesh/common/utils/pydantic_utils.py +12 -0
- solace_agent_mesh/config_portal/backend/common.py +1 -1
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-ByU1X1HD.js +98 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/{manifest-44d62be6.js → manifest-61038fc6.js} +1 -1
- solace_agent_mesh/config_portal/frontend/static/client/index.html +1 -1
- solace_agent_mesh/core_a2a/service.py +2 -2
- solace_agent_mesh/evaluation/evaluator.py +128 -104
- solace_agent_mesh/evaluation/message_organizer.py +116 -110
- solace_agent_mesh/evaluation/report_data_processor.py +84 -86
- solace_agent_mesh/evaluation/report_generator.py +73 -79
- solace_agent_mesh/evaluation/run.py +421 -235
- solace_agent_mesh/evaluation/shared/__init__.py +92 -0
- solace_agent_mesh/evaluation/shared/constants.py +47 -0
- solace_agent_mesh/evaluation/shared/exceptions.py +50 -0
- solace_agent_mesh/evaluation/shared/helpers.py +35 -0
- solace_agent_mesh/evaluation/shared/test_case_loader.py +167 -0
- solace_agent_mesh/evaluation/shared/test_suite_loader.py +280 -0
- solace_agent_mesh/evaluation/subscriber.py +111 -232
- solace_agent_mesh/evaluation/summary_builder.py +227 -117
- solace_agent_mesh/gateway/base/app.py +3 -2
- solace_agent_mesh/gateway/base/component.py +11 -2
- solace_agent_mesh/gateway/base/task_context.py +2 -1
- solace_agent_mesh/gateway/http_sse/alembic/versions/20251015_add_session_performance_indexes.py +70 -0
- solace_agent_mesh/gateway/http_sse/app.py +2 -1
- solace_agent_mesh/gateway/http_sse/component.py +102 -3
- solace_agent_mesh/gateway/http_sse/components/task_logger_forwarder.py +3 -2
- solace_agent_mesh/gateway/http_sse/components/visualization_forwarder_component.py +3 -1
- solace_agent_mesh/gateway/http_sse/dependencies.py +7 -5
- solace_agent_mesh/gateway/http_sse/main.py +5 -2
- solace_agent_mesh/gateway/http_sse/repository/chat_task_repository.py +12 -13
- solace_agent_mesh/gateway/http_sse/repository/feedback_repository.py +15 -18
- solace_agent_mesh/gateway/http_sse/repository/interfaces.py +25 -18
- solace_agent_mesh/gateway/http_sse/repository/session_repository.py +30 -26
- solace_agent_mesh/gateway/http_sse/repository/task_repository.py +35 -44
- solace_agent_mesh/gateway/http_sse/routers/agent_cards.py +7 -5
- solace_agent_mesh/gateway/http_sse/routers/artifacts.py +97 -205
- solace_agent_mesh/gateway/http_sse/routers/auth.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/config.py +3 -2
- solace_agent_mesh/gateway/http_sse/routers/dto/responses/session_responses.py +4 -3
- solace_agent_mesh/gateway/http_sse/routers/people.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/sessions.py +5 -3
- solace_agent_mesh/gateway/http_sse/routers/sse.py +3 -2
- solace_agent_mesh/gateway/http_sse/routers/tasks.py +35 -42
- solace_agent_mesh/gateway/http_sse/routers/users.py +3 -1
- solace_agent_mesh/gateway/http_sse/routers/visualization.py +19 -12
- solace_agent_mesh/gateway/http_sse/services/agent_card_service.py +3 -1
- solace_agent_mesh/gateway/http_sse/services/data_retention_service.py +6 -5
- solace_agent_mesh/gateway/http_sse/services/feedback_service.py +53 -44
- solace_agent_mesh/gateway/http_sse/services/people_service.py +2 -2
- solace_agent_mesh/gateway/http_sse/services/session_service.py +23 -21
- solace_agent_mesh/gateway/http_sse/services/task_logger_service.py +10 -9
- solace_agent_mesh/gateway/http_sse/services/task_service.py +3 -2
- solace_agent_mesh/gateway/http_sse/session_manager.py +2 -1
- solace_agent_mesh/gateway/http_sse/shared/base_repository.py +45 -71
- solace_agent_mesh/gateway/http_sse/shared/types.py +0 -18
- solace_agent_mesh/gateway/http_sse/sse_event_buffer.py +2 -1
- solace_agent_mesh/gateway/http_sse/sse_manager.py +2 -2
- solace_agent_mesh/templates/gateway_app_template.py +4 -2
- solace_agent_mesh/templates/gateway_component_template.py +3 -1
- solace_agent_mesh/templates/gateway_config_template.yaml +0 -5
- solace_agent_mesh/templates/logging_config_template.ini +27 -46
- solace_agent_mesh/templates/plugin_gateway_config_template.yaml +0 -3
- solace_agent_mesh/templates/plugin_tools_template.py +2 -2
- solace_agent_mesh/templates/shared_config.yaml +40 -0
- {solace_agent_mesh-1.5.0.dist-info → solace_agent_mesh-1.6.0.dist-info}/METADATA +47 -21
- {solace_agent_mesh-1.5.0.dist-info → solace_agent_mesh-1.6.0.dist-info}/RECORD +254 -225
- solace_agent_mesh/assets/docs/assets/images/sac-flows-80d5b603c6aafd33e87945680ce0abf3.png +0 -0
- solace_agent_mesh/assets/docs/assets/images/sac_parts_of_a_component-cb3d0424b1d0c17734c5435cca6b4082.png +0 -0
- solace_agent_mesh/assets/docs/assets/js/04989206.a248f00c.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/0e682baa.d54b8668.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1023fc19.8a8a9309.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1523c6b4.2645ef68.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/166ab619.e27886d9.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/1c6e87d2.e056b7e0.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/21ceee5f.3bf39250.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/2a9cab12.2afaee76.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/332e10b5.f7629851.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/3d406171.5560fdf9.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/42b3f8d8.508ae8db.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/442a8107.b5c2532a.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/453a82a6.3c6bb61d.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/483cef9a.bf9398af.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/4c2787c2.c1290a40.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/55f47984.bcd00a86.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/5b4258a4.fdfd2325.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/664b740a.ba305a89.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/75384d09.c19e8b51.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/768e31b0.9abcdc48.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/85387663.be2bc838.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/945fb41e.16e00776.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/9a09e75d.92de8cf5.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/9eff14a2.d62aad71.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/a12a4955.25fbed32.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/a3a92b25.af35e313.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/aba87c2f.4ddf32f2.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ae0e903d.5fe5203f.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ae4415af.16cc58d3.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/bac0be12.17de4316.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/c2c06897.87cb1f47.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/c835a94d.ce21f0bf.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cc969b05.feef7dcc.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cd3d4052.a19e7d78.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/ced92a13.fb92e7ca.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/cee5d587.47904f5e.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/d6a81ee7.829198f1.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/f284c35a.ed8dd236.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/f897a61a.126663fe.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/fbfa3e75.e144b16c.js +0 -1
- solace_agent_mesh/assets/docs/assets/js/main.0c149855.js +0 -2
- solace_agent_mesh/assets/docs/assets/js/runtime~main.c66557e4.js +0 -1
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/installation/index.html +0 -46
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/rbac-setup-guilde/index.html +0 -201
- solace_agent_mesh/assets/docs/docs/documentation/Enterprise/single-sign-on/index.html +0 -29
- solace_agent_mesh/assets/docs/docs/documentation/Migrations/A2A Upgrade To 0.3.0/a2a-gateway-upgrade-to-0.3.0/index.html +0 -105
- solace_agent_mesh/assets/docs/docs/documentation/concepts/agents/index.html +0 -144
- solace_agent_mesh/assets/docs/docs/documentation/concepts/architecture/index.html +0 -91
- solace_agent_mesh/assets/docs/docs/documentation/concepts/gateways/index.html +0 -91
- solace_agent_mesh/assets/docs/docs/documentation/concepts/orchestrator/index.html +0 -55
- solace_agent_mesh/assets/docs/docs/documentation/concepts/plugins/index.html +0 -111
- solace_agent_mesh/assets/docs/docs/documentation/deployment/debugging/index.html +0 -77
- solace_agent_mesh/assets/docs/docs/documentation/deployment/deploy/index.html +0 -48
- solace_agent_mesh/assets/docs/docs/documentation/deployment/observability/index.html +0 -54
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/component-overview/index.html +0 -45
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/index.html +0 -74
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/configurations/litellm_models/index.html +0 -49
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/installation/index.html +0 -76
- solace_agent_mesh/assets/docs/docs/documentation/getting-started/quick-start/index.html +0 -73
- solace_agent_mesh/assets/docs/docs/documentation/tutorials/slack-integration/index.html +0 -72
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/creating-service-providers/index.html +0 -54
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/solace-ai-connector/index.html +0 -69
- solace_agent_mesh/assets/docs/docs/documentation/user-guide/structure/index.html +0 -59
- solace_agent_mesh/assets/docs/lunr-index-1760032255022.json +0 -1
- solace_agent_mesh/assets/docs/search-doc-1760032255022.json +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-CZbpmwfA.css +0 -1
- solace_agent_mesh/client/webui/frontend/static/assets/main-C__uuUkB.js +0 -339
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-BNuqpWDc.js +0 -98
- solace_agent_mesh/evaluation/config_loader.py +0 -657
- solace_agent_mesh/evaluation/test_case_loader.py +0 -714
- /solace_agent_mesh/assets/docs/assets/js/{8591.d7c16be6.js.LICENSE.txt → 8591.5d015485.js.LICENSE.txt} +0 -0
- /solace_agent_mesh/assets/docs/assets/js/{main.0c149855.js.LICENSE.txt → main.20feee82.js.LICENSE.txt} +0 -0
- {solace_agent_mesh-1.5.0.dist-info → solace_agent_mesh-1.6.0.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-1.5.0.dist-info → solace_agent_mesh-1.6.0.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-1.5.0.dist-info → solace_agent_mesh-1.6.0.dist-info}/licenses/LICENSE +0 -0
|
@@ -4,31 +4,17 @@ This module categorizes evaluation messages into appropriate run directories.
|
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
import json
|
|
7
|
-
import os
|
|
8
|
-
from dataclasses import dataclass
|
|
9
|
-
from typing import Dict, List, Optional, Tuple, Any
|
|
10
7
|
import logging
|
|
8
|
+
from dataclasses import dataclass
|
|
9
|
+
from pathlib import Path
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"""Base exception for categorization errors."""
|
|
18
|
-
|
|
19
|
-
pass
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class MissingFileError(CategorizationError):
|
|
23
|
-
"""Raised when required files are missing."""
|
|
24
|
-
|
|
25
|
-
pass
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class InvalidDataError(CategorizationError):
|
|
29
|
-
"""Raised when data format is invalid."""
|
|
11
|
+
from .shared import (
|
|
12
|
+
CategorizationError,
|
|
13
|
+
InvalidDataError,
|
|
14
|
+
MissingFileError,
|
|
15
|
+
)
|
|
30
16
|
|
|
31
|
-
|
|
17
|
+
log = logging.getLogger(__name__)
|
|
32
18
|
|
|
33
19
|
|
|
34
20
|
@dataclass
|
|
@@ -36,18 +22,18 @@ class TaskMessage:
|
|
|
36
22
|
"""Represents a categorized task message with extracted metadata."""
|
|
37
23
|
|
|
38
24
|
topic: str
|
|
39
|
-
payload:
|
|
40
|
-
task_id:
|
|
41
|
-
parent_task_id:
|
|
25
|
+
payload: dict[str, any]
|
|
26
|
+
task_id: str | None = None
|
|
27
|
+
parent_task_id: str | None = None
|
|
42
28
|
|
|
43
29
|
@classmethod
|
|
44
|
-
def from_dict(cls, message_dict:
|
|
30
|
+
def from_dict(cls, message_dict: dict[str, any]) -> "TaskMessage":
|
|
45
31
|
"""Create TaskMessage from dictionary representation."""
|
|
46
32
|
return cls(
|
|
47
33
|
topic=message_dict.get("topic", ""), payload=message_dict.get("payload", {})
|
|
48
34
|
)
|
|
49
35
|
|
|
50
|
-
def to_dict(self) ->
|
|
36
|
+
def to_dict(self) -> dict[str, any]:
|
|
51
37
|
"""Convert TaskMessage back to dictionary format."""
|
|
52
38
|
return {"topic": self.topic, "payload": self.payload}
|
|
53
39
|
|
|
@@ -56,9 +42,9 @@ class TaskMessage:
|
|
|
56
42
|
class TaskMapping:
|
|
57
43
|
"""Represents task ID to directory mappings with validation."""
|
|
58
44
|
|
|
59
|
-
mappings:
|
|
45
|
+
mappings: dict[str, str]
|
|
60
46
|
|
|
61
|
-
def get_run_directory(self, task_id: str) ->
|
|
47
|
+
def get_run_directory(self, task_id: str) -> str | None:
|
|
62
48
|
"""Get the run directory for a given task ID."""
|
|
63
49
|
return self.mappings.get(task_id)
|
|
64
50
|
|
|
@@ -101,7 +87,7 @@ class TaskIdExtractor:
|
|
|
101
87
|
|
|
102
88
|
def extract_task_id(
|
|
103
89
|
self, message: TaskMessage
|
|
104
|
-
) ->
|
|
90
|
+
) -> tuple[str | None, str | None]:
|
|
105
91
|
"""
|
|
106
92
|
Extract task ID using multiple strategies in order of preference.
|
|
107
93
|
Returns (parent_task_id, sub_task_id) tuple.
|
|
@@ -125,14 +111,14 @@ class TaskIdExtractor:
|
|
|
125
111
|
if task_id:
|
|
126
112
|
return task_id, sub_task_id
|
|
127
113
|
except Exception as e:
|
|
128
|
-
|
|
114
|
+
log.debug(f"Task ID extraction strategy failed: {e}")
|
|
129
115
|
continue
|
|
130
116
|
|
|
131
117
|
return None, None
|
|
132
118
|
|
|
133
119
|
def _extract_from_subtask_delegation(
|
|
134
120
|
self, payload: dict
|
|
135
|
-
) ->
|
|
121
|
+
) -> tuple[str | None, str | None]:
|
|
136
122
|
"""Strategy 1: Check for sub-task delegation (agent-to-agent calls)."""
|
|
137
123
|
params = payload.get("params", {})
|
|
138
124
|
if isinstance(params, dict):
|
|
@@ -148,7 +134,7 @@ class TaskIdExtractor:
|
|
|
148
134
|
|
|
149
135
|
def _extract_from_toplevel_id(
|
|
150
136
|
self, payload: dict
|
|
151
|
-
) ->
|
|
137
|
+
) -> tuple[str | None, str | None]:
|
|
152
138
|
"""Strategy 2: Get the primary task ID from the top-level 'id' field."""
|
|
153
139
|
task_id = payload.get("id")
|
|
154
140
|
if task_id and isinstance(task_id, str):
|
|
@@ -157,7 +143,7 @@ class TaskIdExtractor:
|
|
|
157
143
|
|
|
158
144
|
def _extract_from_result_object(
|
|
159
145
|
self, payload: dict
|
|
160
|
-
) ->
|
|
146
|
+
) -> tuple[str | None, str | None]:
|
|
161
147
|
"""Strategy 3: Fallback for status updates which also have taskId nested."""
|
|
162
148
|
result = payload.get("result", {})
|
|
163
149
|
if isinstance(result, dict):
|
|
@@ -168,7 +154,7 @@ class TaskIdExtractor:
|
|
|
168
154
|
|
|
169
155
|
def _extract_from_topic(
|
|
170
156
|
self, message: TaskMessage
|
|
171
|
-
) ->
|
|
157
|
+
) -> tuple[str | None, str | None]:
|
|
172
158
|
"""Strategy 4: Extract from topic path (fallback method)."""
|
|
173
159
|
topic = message.topic
|
|
174
160
|
if not topic:
|
|
@@ -186,47 +172,47 @@ class FileOperations:
|
|
|
186
172
|
"""Handles file I/O operations with comprehensive error handling."""
|
|
187
173
|
|
|
188
174
|
@staticmethod
|
|
189
|
-
def load_json(filepath:
|
|
175
|
+
def load_json(filepath: Path) -> any:
|
|
190
176
|
"""Load JSON file with error handling and validation."""
|
|
191
177
|
try:
|
|
192
|
-
if not
|
|
178
|
+
if not filepath.exists():
|
|
193
179
|
raise MissingFileError(f"File not found: {filepath}")
|
|
194
180
|
|
|
195
|
-
with open(
|
|
181
|
+
with filepath.open() as f:
|
|
196
182
|
data = json.load(f)
|
|
197
183
|
|
|
198
|
-
|
|
184
|
+
log.debug(f"Successfully loaded JSON from {filepath}")
|
|
199
185
|
return data
|
|
200
186
|
|
|
201
187
|
except json.JSONDecodeError as e:
|
|
202
|
-
raise InvalidDataError(f"Invalid JSON in file {filepath}: {e}")
|
|
188
|
+
raise InvalidDataError(f"Invalid JSON in file {filepath}: {e}") from e
|
|
203
189
|
except Exception as e:
|
|
204
|
-
raise CategorizationError(f"Error loading file {filepath}: {e}")
|
|
190
|
+
raise CategorizationError(f"Error loading file {filepath}: {e}") from e
|
|
205
191
|
|
|
206
192
|
@staticmethod
|
|
207
|
-
def save_json(data:
|
|
193
|
+
def save_json(data: any, filepath: Path) -> None:
|
|
208
194
|
"""Save data as JSON with error handling."""
|
|
209
195
|
try:
|
|
210
196
|
# Ensure directory exists
|
|
211
|
-
|
|
197
|
+
filepath.parent.mkdir(parents=True, exist_ok=True)
|
|
212
198
|
|
|
213
|
-
with open(
|
|
199
|
+
with filepath.open("w") as f:
|
|
214
200
|
json.dump(data, f, indent=4)
|
|
215
201
|
|
|
216
|
-
|
|
202
|
+
log.debug(f"Successfully saved JSON to {filepath}")
|
|
217
203
|
|
|
218
204
|
except Exception as e:
|
|
219
|
-
raise CategorizationError(f"Error saving file {filepath}: {e}")
|
|
205
|
+
raise CategorizationError(f"Error saving file {filepath}: {e}") from e
|
|
220
206
|
|
|
221
207
|
@staticmethod
|
|
222
|
-
def file_exists(filepath:
|
|
208
|
+
def file_exists(filepath: Path) -> bool:
|
|
223
209
|
"""Check if file exists."""
|
|
224
|
-
return
|
|
210
|
+
return filepath.exists()
|
|
225
211
|
|
|
226
212
|
@staticmethod
|
|
227
|
-
def is_directory(path:
|
|
213
|
+
def is_directory(path: Path) -> bool:
|
|
228
214
|
"""Check if path is a directory."""
|
|
229
|
-
return
|
|
215
|
+
return path.is_dir()
|
|
230
216
|
|
|
231
217
|
|
|
232
218
|
class MessageCategorizer:
|
|
@@ -237,10 +223,10 @@ class MessageCategorizer:
|
|
|
237
223
|
self.file_ops = file_ops
|
|
238
224
|
|
|
239
225
|
def categorize_messages_for_model(
|
|
240
|
-
self, model_path:
|
|
226
|
+
self, model_path: Path, model_name: str
|
|
241
227
|
) -> CategorizationResult:
|
|
242
228
|
"""Categorize messages for a single model with comprehensive error handling."""
|
|
243
|
-
|
|
229
|
+
log.info(f"Starting message categorization for model: {model_name}")
|
|
244
230
|
|
|
245
231
|
try:
|
|
246
232
|
# Validate required files exist
|
|
@@ -250,7 +236,7 @@ class MessageCategorizer:
|
|
|
250
236
|
task_mappings = self._load_task_mappings(model_path)
|
|
251
237
|
messages = self._load_messages(model_path)
|
|
252
238
|
|
|
253
|
-
|
|
239
|
+
log.info(
|
|
254
240
|
f"Loaded {len(messages)} messages and {len(task_mappings.mappings)} task mappings"
|
|
255
241
|
)
|
|
256
242
|
|
|
@@ -279,17 +265,17 @@ class MessageCategorizer:
|
|
|
279
265
|
updated_mappings_count=updated_mappings_count,
|
|
280
266
|
)
|
|
281
267
|
|
|
282
|
-
|
|
268
|
+
log.info(f"Categorization completed for {model_name}: {result}")
|
|
283
269
|
return result
|
|
284
270
|
|
|
285
271
|
except Exception as e:
|
|
286
|
-
|
|
272
|
+
log.error(f"Error categorizing messages for model {model_name}: {e}")
|
|
287
273
|
raise
|
|
288
274
|
|
|
289
|
-
def _validate_required_files(self, model_path:
|
|
275
|
+
def _validate_required_files(self, model_path: Path, model_name: str) -> None:
|
|
290
276
|
"""Validate that required files exist for processing."""
|
|
291
|
-
mappings_file =
|
|
292
|
-
messages_file =
|
|
277
|
+
mappings_file = model_path / "task_mappings.json"
|
|
278
|
+
messages_file = model_path / "full_messages.json"
|
|
293
279
|
|
|
294
280
|
if not self.file_ops.file_exists(mappings_file):
|
|
295
281
|
raise MissingFileError(
|
|
@@ -301,9 +287,9 @@ class MessageCategorizer:
|
|
|
301
287
|
f"Missing messages file for model {model_name}: {messages_file}"
|
|
302
288
|
)
|
|
303
289
|
|
|
304
|
-
def _load_task_mappings(self, model_path:
|
|
290
|
+
def _load_task_mappings(self, model_path: Path) -> TaskMapping:
|
|
305
291
|
"""Load task mappings from file with validation."""
|
|
306
|
-
mappings_file =
|
|
292
|
+
mappings_file = model_path / "task_mappings.json"
|
|
307
293
|
mappings_data = self.file_ops.load_json(mappings_file)
|
|
308
294
|
|
|
309
295
|
if not isinstance(mappings_data, dict):
|
|
@@ -313,9 +299,9 @@ class MessageCategorizer:
|
|
|
313
299
|
|
|
314
300
|
return TaskMapping(mappings=mappings_data)
|
|
315
301
|
|
|
316
|
-
def _load_messages(self, model_path:
|
|
302
|
+
def _load_messages(self, model_path: Path) -> list[TaskMessage]:
|
|
317
303
|
"""Load and parse messages from file with validation."""
|
|
318
|
-
messages_file =
|
|
304
|
+
messages_file = model_path / "full_messages.json"
|
|
319
305
|
messages_data = self.file_ops.load_json(messages_file)
|
|
320
306
|
|
|
321
307
|
if not isinstance(messages_data, list):
|
|
@@ -329,12 +315,12 @@ class MessageCategorizer:
|
|
|
329
315
|
message = TaskMessage.from_dict(message_dict)
|
|
330
316
|
messages.append(message)
|
|
331
317
|
except Exception as e:
|
|
332
|
-
|
|
318
|
+
log.warning(f"Skipping invalid message at index {i}: {e}")
|
|
333
319
|
continue
|
|
334
320
|
|
|
335
321
|
return messages
|
|
336
322
|
|
|
337
|
-
def _extract_task_ids_from_messages(self, messages:
|
|
323
|
+
def _extract_task_ids_from_messages(self, messages: list[TaskMessage]) -> None:
|
|
338
324
|
"""Extract task IDs from all messages and update the message objects."""
|
|
339
325
|
for message in messages:
|
|
340
326
|
task_id, sub_task_id = self.task_extractor.extract_task_id(message)
|
|
@@ -342,7 +328,7 @@ class MessageCategorizer:
|
|
|
342
328
|
message.parent_task_id = task_id if sub_task_id else None
|
|
343
329
|
|
|
344
330
|
def _update_task_mappings(
|
|
345
|
-
self, messages:
|
|
331
|
+
self, messages: list[TaskMessage], task_mappings: TaskMapping
|
|
346
332
|
) -> int:
|
|
347
333
|
"""Update task mappings with sub-task relationships."""
|
|
348
334
|
updated_count = 0
|
|
@@ -362,15 +348,15 @@ class MessageCategorizer:
|
|
|
362
348
|
task_mappings.add_mapping(message.task_id, parent_directory)
|
|
363
349
|
updated_count += 1
|
|
364
350
|
|
|
365
|
-
|
|
351
|
+
log.debug(
|
|
366
352
|
f"Mapped sub-task {message.task_id} to parent directory: {parent_directory}"
|
|
367
353
|
)
|
|
368
354
|
|
|
369
355
|
return updated_count
|
|
370
356
|
|
|
371
357
|
def _categorize_by_task_id(
|
|
372
|
-
self, messages:
|
|
373
|
-
) ->
|
|
358
|
+
self, messages: list[TaskMessage], task_mappings: TaskMapping
|
|
359
|
+
) -> dict[str, list[TaskMessage]]:
|
|
374
360
|
"""Group messages by their target run directory."""
|
|
375
361
|
categorized = {}
|
|
376
362
|
|
|
@@ -390,14 +376,14 @@ class MessageCategorizer:
|
|
|
390
376
|
return categorized
|
|
391
377
|
|
|
392
378
|
def _save_categorized_messages(
|
|
393
|
-
self, categorized_messages:
|
|
379
|
+
self, categorized_messages: dict[str, list[TaskMessage]]
|
|
394
380
|
) -> int:
|
|
395
381
|
"""Save categorized messages to their respective directories."""
|
|
396
382
|
total_saved = 0
|
|
397
383
|
|
|
398
384
|
for run_directory, messages in categorized_messages.items():
|
|
399
385
|
try:
|
|
400
|
-
output_file =
|
|
386
|
+
output_file = Path(run_directory) / "messages.json"
|
|
401
387
|
|
|
402
388
|
# Convert TaskMessage objects back to dictionaries
|
|
403
389
|
message_dicts = [msg.to_dict() for msg in messages]
|
|
@@ -405,19 +391,19 @@ class MessageCategorizer:
|
|
|
405
391
|
self.file_ops.save_json(message_dicts, output_file)
|
|
406
392
|
total_saved += len(messages)
|
|
407
393
|
|
|
408
|
-
|
|
394
|
+
log.info(f"Saved {len(messages)} messages to {output_file}")
|
|
409
395
|
|
|
410
396
|
except Exception as e:
|
|
411
|
-
|
|
397
|
+
log.error(f"Error saving messages to {run_directory}: {e}")
|
|
412
398
|
continue
|
|
413
399
|
|
|
414
400
|
return total_saved
|
|
415
401
|
|
|
416
|
-
def _save_task_mappings(self, task_mappings: TaskMapping, model_path:
|
|
402
|
+
def _save_task_mappings(self, task_mappings: TaskMapping, model_path: Path) -> None:
|
|
417
403
|
"""Save updated task mappings back to file."""
|
|
418
|
-
mappings_file =
|
|
404
|
+
mappings_file = model_path / "task_mappings.json"
|
|
419
405
|
self.file_ops.save_json(task_mappings.mappings, mappings_file)
|
|
420
|
-
|
|
406
|
+
log.info(f"Updated task mappings saved to {mappings_file}")
|
|
421
407
|
|
|
422
408
|
|
|
423
409
|
class MessageOrganizer:
|
|
@@ -430,12 +416,13 @@ class MessageOrganizer:
|
|
|
430
416
|
|
|
431
417
|
def categorize_all_messages(
|
|
432
418
|
self, base_results_path: str
|
|
433
|
-
) ->
|
|
419
|
+
) -> dict[str, CategorizationResult]:
|
|
434
420
|
"""
|
|
435
421
|
Main entry point for categorizing all messages across all models.
|
|
436
422
|
Returns a dictionary mapping model names to their categorization results.
|
|
437
423
|
"""
|
|
438
|
-
|
|
424
|
+
base_results_path = Path(base_results_path)
|
|
425
|
+
log.info(
|
|
439
426
|
f"Starting message categorization for all models in: {base_results_path}"
|
|
440
427
|
)
|
|
441
428
|
|
|
@@ -446,26 +433,26 @@ class MessageOrganizer:
|
|
|
446
433
|
processed_models = 0
|
|
447
434
|
|
|
448
435
|
try:
|
|
449
|
-
for
|
|
450
|
-
model_path = os.path.join(base_results_path, model_name)
|
|
451
|
-
|
|
436
|
+
for model_path in base_results_path.iterdir():
|
|
452
437
|
if not self.file_ops.is_directory(model_path):
|
|
453
|
-
|
|
438
|
+
log.debug(f"Skipping non-directory: {model_path.name}")
|
|
454
439
|
continue
|
|
455
440
|
|
|
441
|
+
model_name = model_path.name
|
|
442
|
+
|
|
456
443
|
try:
|
|
457
444
|
result = self._process_model_directory(model_path, model_name)
|
|
458
445
|
results[model_name] = result
|
|
459
446
|
processed_models += 1
|
|
460
447
|
|
|
461
448
|
except (MissingFileError, InvalidDataError) as e:
|
|
462
|
-
|
|
449
|
+
log.warning(f"Skipping model {model_name}: {e}")
|
|
463
450
|
continue
|
|
464
451
|
except Exception as e:
|
|
465
|
-
|
|
452
|
+
log.error(f"Error processing model {model_name}: {e}")
|
|
466
453
|
continue
|
|
467
454
|
|
|
468
|
-
|
|
455
|
+
log.info(
|
|
469
456
|
f"Message categorization completed. Processed {processed_models} models."
|
|
470
457
|
)
|
|
471
458
|
self._log_summary_statistics(results)
|
|
@@ -473,30 +460,30 @@ class MessageOrganizer:
|
|
|
473
460
|
return results
|
|
474
461
|
|
|
475
462
|
except Exception as e:
|
|
476
|
-
|
|
463
|
+
log.error(f"Error during message categorization: {e}")
|
|
477
464
|
raise
|
|
478
465
|
|
|
479
466
|
def _process_model_directory(
|
|
480
|
-
self, model_path:
|
|
467
|
+
self, model_path: Path, model_name: str
|
|
481
468
|
) -> CategorizationResult:
|
|
482
469
|
"""Process a single model directory and return categorization results."""
|
|
483
|
-
|
|
470
|
+
log.info(f"Processing model directory: {model_name}")
|
|
484
471
|
|
|
485
472
|
try:
|
|
486
473
|
result = self.categorizer.categorize_messages_for_model(
|
|
487
474
|
model_path, model_name
|
|
488
475
|
)
|
|
489
|
-
|
|
476
|
+
log.info(f"Successfully processed model {model_name}: {result}")
|
|
490
477
|
return result
|
|
491
478
|
|
|
492
479
|
except Exception as e:
|
|
493
|
-
|
|
480
|
+
log.error(f"Failed to process model {model_name}: {e}")
|
|
494
481
|
raise
|
|
495
482
|
|
|
496
|
-
def _log_summary_statistics(self, results:
|
|
483
|
+
def _log_summary_statistics(self, results: dict[str, CategorizationResult]) -> None:
|
|
497
484
|
"""Log summary statistics for all processed models."""
|
|
498
485
|
if not results:
|
|
499
|
-
|
|
486
|
+
log.warning("No models were successfully processed")
|
|
500
487
|
return
|
|
501
488
|
|
|
502
489
|
total_messages = sum(result.total_messages for result in results.values())
|
|
@@ -511,37 +498,56 @@ class MessageOrganizer:
|
|
|
511
498
|
total_categorized / total_messages if total_messages > 0 else 0.0
|
|
512
499
|
)
|
|
513
500
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
501
|
+
log.info("=== CATEGORIZATION SUMMARY ===")
|
|
502
|
+
log.info(f"Models processed: {len(results)}")
|
|
503
|
+
log.info(f"Total messages: {total_messages}")
|
|
504
|
+
log.info(f"Messages categorized: {total_categorized}")
|
|
505
|
+
log.info(f"Overall success rate: {overall_success_rate:.1%}")
|
|
506
|
+
log.info(f"New task mappings added: {total_mappings_added}")
|
|
507
|
+
log.info("==============================")
|
|
521
508
|
|
|
522
509
|
|
|
523
|
-
def main():
|
|
510
|
+
def main(config_path: str = None):
|
|
524
511
|
"""Main entry point when running the script directly."""
|
|
525
512
|
try:
|
|
526
513
|
# Import here to avoid circular imports
|
|
527
|
-
from evaluation.
|
|
514
|
+
from evaluation.shared import EvaluationConfigLoader
|
|
528
515
|
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
516
|
+
# Use default config path if none provided
|
|
517
|
+
if config_path is None:
|
|
518
|
+
# This default path is for standalone testing purposes
|
|
519
|
+
config_path = Path.cwd() / "tests" / "evaluation" / "config.json"
|
|
520
|
+
if not config_path.exists():
|
|
521
|
+
log.error(f"Default test config not found at {config_path}")
|
|
522
|
+
return
|
|
523
|
+
|
|
524
|
+
config_loader = EvaluationConfigLoader(config_path)
|
|
525
|
+
config = config_loader.load_configuration()
|
|
526
|
+
results_dir_name = config.results_directory
|
|
527
|
+
|
|
528
|
+
# Results path should be based on the current working directory
|
|
529
|
+
base_results_path = Path.cwd() / "results" / results_dir_name
|
|
534
530
|
|
|
535
531
|
orchestrator = MessageOrganizer()
|
|
536
|
-
results = orchestrator.categorize_all_messages(base_results_path)
|
|
532
|
+
results = orchestrator.categorize_all_messages(str(base_results_path))
|
|
537
533
|
|
|
538
|
-
|
|
539
|
-
|
|
534
|
+
log.info("Message categorization completed successfully!")
|
|
535
|
+
log.info(f"Processed {len(results)} models")
|
|
540
536
|
|
|
541
537
|
except Exception as e:
|
|
542
|
-
|
|
538
|
+
log.error(f"Script execution failed: {e}")
|
|
543
539
|
raise
|
|
544
540
|
|
|
545
541
|
|
|
546
542
|
if __name__ == "__main__":
|
|
547
|
-
|
|
543
|
+
import argparse
|
|
544
|
+
|
|
545
|
+
parser = argparse.ArgumentParser(description="Categorize evaluation messages.")
|
|
546
|
+
parser.add_argument(
|
|
547
|
+
"--config",
|
|
548
|
+
type=str,
|
|
549
|
+
help="Path to the evaluation config.json file. If not provided, uses default test config.",
|
|
550
|
+
)
|
|
551
|
+
args = parser.parse_args()
|
|
552
|
+
|
|
553
|
+
main(args.config)
|