claude-mpm 4.1.1__py3-none-any.whl → 4.1.3__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.
- claude_mpm/BUILD_NUMBER +1 -1
- claude_mpm/VERSION +1 -1
- claude_mpm/__main__.py +1 -1
- claude_mpm/agents/BASE_PM.md +74 -46
- claude_mpm/agents/INSTRUCTIONS.md +11 -153
- claude_mpm/agents/WORKFLOW.md +61 -321
- claude_mpm/agents/__init__.py +11 -11
- claude_mpm/agents/agent_loader.py +23 -20
- claude_mpm/agents/agent_loader_integration.py +1 -1
- claude_mpm/agents/agents_metadata.py +27 -0
- claude_mpm/agents/async_agent_loader.py +5 -8
- claude_mpm/agents/base_agent_loader.py +36 -25
- claude_mpm/agents/frontmatter_validator.py +6 -6
- claude_mpm/agents/schema/agent_schema.json +1 -1
- claude_mpm/agents/system_agent_config.py +9 -9
- claude_mpm/agents/templates/api_qa.json +47 -2
- claude_mpm/agents/templates/engineer.json +33 -11
- claude_mpm/agents/templates/imagemagick.json +256 -0
- claude_mpm/agents/templates/qa.json +41 -2
- claude_mpm/agents/templates/ticketing.json +5 -5
- claude_mpm/agents/templates/web_qa.json +50 -2
- claude_mpm/cli/__init__.py +51 -46
- claude_mpm/cli/__main__.py +1 -1
- claude_mpm/cli/commands/__init__.py +10 -12
- claude_mpm/cli/commands/agent_manager.py +186 -181
- claude_mpm/cli/commands/agents.py +648 -1098
- claude_mpm/cli/commands/aggregate.py +30 -29
- claude_mpm/cli/commands/cleanup.py +50 -44
- claude_mpm/cli/commands/cleanup_orphaned_agents.py +25 -25
- claude_mpm/cli/commands/config.py +162 -127
- claude_mpm/cli/commands/doctor.py +52 -62
- claude_mpm/cli/commands/info.py +37 -25
- claude_mpm/cli/commands/mcp.py +3 -7
- claude_mpm/cli/commands/mcp_command_router.py +14 -18
- claude_mpm/cli/commands/mcp_install_commands.py +28 -23
- claude_mpm/cli/commands/mcp_pipx_config.py +58 -49
- claude_mpm/cli/commands/mcp_server_commands.py +23 -17
- claude_mpm/cli/commands/memory.py +339 -967
- claude_mpm/cli/commands/monitor.py +117 -88
- claude_mpm/cli/commands/run.py +233 -542
- claude_mpm/cli/commands/socketio_monitor.py +17 -19
- claude_mpm/cli/commands/tickets.py +92 -92
- claude_mpm/cli/parser.py +1 -5
- claude_mpm/cli/parsers/__init__.py +1 -1
- claude_mpm/cli/parsers/agent_manager_parser.py +50 -98
- claude_mpm/cli/parsers/agents_parser.py +2 -3
- claude_mpm/cli/parsers/base_parser.py +7 -5
- claude_mpm/cli/parsers/mcp_parser.py +4 -2
- claude_mpm/cli/parsers/monitor_parser.py +26 -18
- claude_mpm/cli/shared/__init__.py +10 -10
- claude_mpm/cli/shared/argument_patterns.py +57 -71
- claude_mpm/cli/shared/base_command.py +61 -53
- claude_mpm/cli/shared/error_handling.py +62 -58
- claude_mpm/cli/shared/output_formatters.py +78 -77
- claude_mpm/cli/startup_logging.py +280 -172
- claude_mpm/cli/utils.py +10 -11
- claude_mpm/cli_module/__init__.py +1 -1
- claude_mpm/cli_module/args.py +1 -1
- claude_mpm/cli_module/migration_example.py +5 -5
- claude_mpm/config/__init__.py +9 -9
- claude_mpm/config/agent_config.py +15 -14
- claude_mpm/config/experimental_features.py +4 -4
- claude_mpm/config/paths.py +0 -1
- claude_mpm/config/socketio_config.py +5 -6
- claude_mpm/constants.py +1 -2
- claude_mpm/core/__init__.py +8 -8
- claude_mpm/core/agent_name_normalizer.py +1 -1
- claude_mpm/core/agent_registry.py +22 -29
- claude_mpm/core/agent_session_manager.py +3 -3
- claude_mpm/core/base_service.py +7 -15
- claude_mpm/core/cache.py +4 -6
- claude_mpm/core/claude_runner.py +85 -113
- claude_mpm/core/config.py +43 -28
- claude_mpm/core/config_aliases.py +0 -9
- claude_mpm/core/config_constants.py +52 -30
- claude_mpm/core/constants.py +0 -1
- claude_mpm/core/container.py +18 -27
- claude_mpm/core/exceptions.py +2 -2
- claude_mpm/core/factories.py +10 -12
- claude_mpm/core/framework_loader.py +500 -680
- claude_mpm/core/hook_manager.py +26 -22
- claude_mpm/core/hook_performance_config.py +58 -47
- claude_mpm/core/injectable_service.py +1 -1
- claude_mpm/core/interactive_session.py +61 -152
- claude_mpm/core/interfaces.py +1 -100
- claude_mpm/core/lazy.py +5 -5
- claude_mpm/core/log_manager.py +587 -0
- claude_mpm/core/logger.py +125 -8
- claude_mpm/core/logging_config.py +15 -17
- claude_mpm/core/minimal_framework_loader.py +5 -8
- claude_mpm/core/oneshot_session.py +15 -33
- claude_mpm/core/optimized_agent_loader.py +4 -6
- claude_mpm/core/optimized_startup.py +2 -1
- claude_mpm/core/output_style_manager.py +147 -106
- claude_mpm/core/pm_hook_interceptor.py +0 -1
- claude_mpm/core/service_registry.py +11 -8
- claude_mpm/core/session_manager.py +1 -2
- claude_mpm/core/shared/__init__.py +1 -1
- claude_mpm/core/shared/config_loader.py +101 -97
- claude_mpm/core/shared/path_resolver.py +72 -68
- claude_mpm/core/shared/singleton_manager.py +56 -50
- claude_mpm/core/socketio_pool.py +26 -6
- claude_mpm/core/tool_access_control.py +4 -5
- claude_mpm/core/typing_utils.py +50 -59
- claude_mpm/core/unified_agent_registry.py +14 -19
- claude_mpm/core/unified_config.py +4 -6
- claude_mpm/core/unified_paths.py +197 -109
- claude_mpm/dashboard/open_dashboard.py +2 -4
- claude_mpm/experimental/cli_enhancements.py +51 -36
- claude_mpm/generators/agent_profile_generator.py +2 -4
- claude_mpm/hooks/base_hook.py +1 -2
- claude_mpm/hooks/claude_hooks/connection_pool.py +72 -26
- claude_mpm/hooks/claude_hooks/event_handlers.py +99 -154
- claude_mpm/hooks/claude_hooks/hook_handler.py +110 -720
- claude_mpm/hooks/claude_hooks/hook_handler_eventbus.py +104 -77
- claude_mpm/hooks/claude_hooks/hook_handler_original.py +1040 -0
- claude_mpm/hooks/claude_hooks/hook_handler_refactored.py +347 -0
- claude_mpm/hooks/claude_hooks/memory_integration.py +2 -4
- claude_mpm/hooks/claude_hooks/response_tracking.py +15 -11
- claude_mpm/hooks/claude_hooks/services/__init__.py +13 -0
- claude_mpm/hooks/claude_hooks/services/connection_manager.py +190 -0
- claude_mpm/hooks/claude_hooks/services/duplicate_detector.py +106 -0
- claude_mpm/hooks/claude_hooks/services/state_manager.py +282 -0
- claude_mpm/hooks/claude_hooks/services/subagent_processor.py +374 -0
- claude_mpm/hooks/claude_hooks/tool_analysis.py +12 -18
- claude_mpm/hooks/memory_integration_hook.py +5 -5
- claude_mpm/hooks/tool_call_interceptor.py +1 -1
- claude_mpm/hooks/validation_hooks.py +4 -4
- claude_mpm/init.py +4 -9
- claude_mpm/models/__init__.py +2 -2
- claude_mpm/models/agent_session.py +11 -14
- claude_mpm/scripts/mcp_server.py +20 -11
- claude_mpm/scripts/mcp_wrapper.py +5 -5
- claude_mpm/scripts/mpm_doctor.py +321 -0
- claude_mpm/scripts/socketio_daemon.py +28 -25
- claude_mpm/scripts/socketio_daemon_hardened.py +298 -258
- claude_mpm/scripts/socketio_server_manager.py +116 -95
- claude_mpm/services/__init__.py +49 -49
- claude_mpm/services/agent_capabilities_service.py +12 -18
- claude_mpm/services/agents/__init__.py +22 -22
- claude_mpm/services/agents/agent_builder.py +140 -119
- claude_mpm/services/agents/deployment/__init__.py +3 -3
- claude_mpm/services/agents/deployment/agent_config_provider.py +9 -9
- claude_mpm/services/agents/deployment/agent_configuration_manager.py +19 -20
- claude_mpm/services/agents/deployment/agent_definition_factory.py +1 -5
- claude_mpm/services/agents/deployment/agent_deployment.py +129 -511
- claude_mpm/services/agents/deployment/agent_discovery_service.py +4 -8
- claude_mpm/services/agents/deployment/agent_environment_manager.py +2 -7
- claude_mpm/services/agents/deployment/agent_filesystem_manager.py +6 -10
- claude_mpm/services/agents/deployment/agent_format_converter.py +11 -15
- claude_mpm/services/agents/deployment/agent_frontmatter_validator.py +2 -3
- claude_mpm/services/agents/deployment/agent_lifecycle_manager.py +5 -5
- claude_mpm/services/agents/deployment/agent_metrics_collector.py +13 -19
- claude_mpm/services/agents/deployment/agent_restore_handler.py +0 -1
- claude_mpm/services/agents/deployment/agent_template_builder.py +26 -35
- claude_mpm/services/agents/deployment/agent_validator.py +0 -1
- claude_mpm/services/agents/deployment/agent_version_manager.py +7 -9
- claude_mpm/services/agents/deployment/agent_versioning.py +3 -3
- claude_mpm/services/agents/deployment/agents_directory_resolver.py +6 -7
- claude_mpm/services/agents/deployment/async_agent_deployment.py +51 -38
- claude_mpm/services/agents/deployment/base_agent_locator.py +132 -0
- claude_mpm/services/agents/deployment/config/__init__.py +1 -1
- claude_mpm/services/agents/deployment/config/deployment_config.py +7 -8
- claude_mpm/services/agents/deployment/deployment_results_manager.py +185 -0
- claude_mpm/services/agents/deployment/deployment_type_detector.py +1 -1
- claude_mpm/services/agents/deployment/deployment_wrapper.py +18 -18
- claude_mpm/services/agents/deployment/facade/__init__.py +1 -1
- claude_mpm/services/agents/deployment/facade/deployment_executor.py +0 -3
- claude_mpm/services/agents/deployment/facade/deployment_facade.py +3 -4
- claude_mpm/services/agents/deployment/interface_adapter.py +5 -7
- claude_mpm/services/agents/deployment/multi_source_deployment_service.py +345 -276
- claude_mpm/services/agents/deployment/pipeline/__init__.py +2 -2
- claude_mpm/services/agents/deployment/pipeline/pipeline_builder.py +1 -1
- claude_mpm/services/agents/deployment/pipeline/pipeline_context.py +6 -4
- claude_mpm/services/agents/deployment/pipeline/pipeline_executor.py +3 -3
- claude_mpm/services/agents/deployment/pipeline/steps/__init__.py +2 -2
- claude_mpm/services/agents/deployment/pipeline/steps/agent_processing_step.py +14 -13
- claude_mpm/services/agents/deployment/pipeline/steps/base_step.py +0 -1
- claude_mpm/services/agents/deployment/pipeline/steps/configuration_step.py +1 -1
- claude_mpm/services/agents/deployment/pipeline/steps/target_directory_step.py +8 -9
- claude_mpm/services/agents/deployment/pipeline/steps/validation_step.py +1 -1
- claude_mpm/services/agents/deployment/processors/__init__.py +1 -1
- claude_mpm/services/agents/deployment/processors/agent_processor.py +20 -16
- claude_mpm/services/agents/deployment/refactored_agent_deployment_service.py +5 -12
- claude_mpm/services/agents/deployment/results/__init__.py +1 -1
- claude_mpm/services/agents/deployment/results/deployment_result_builder.py +1 -1
- claude_mpm/services/agents/deployment/single_agent_deployer.py +315 -0
- claude_mpm/services/agents/deployment/strategies/__init__.py +2 -2
- claude_mpm/services/agents/deployment/strategies/base_strategy.py +1 -7
- claude_mpm/services/agents/deployment/strategies/project_strategy.py +1 -4
- claude_mpm/services/agents/deployment/strategies/system_strategy.py +2 -3
- claude_mpm/services/agents/deployment/strategies/user_strategy.py +3 -7
- claude_mpm/services/agents/deployment/validation/__init__.py +1 -1
- claude_mpm/services/agents/deployment/validation/agent_validator.py +1 -1
- claude_mpm/services/agents/deployment/validation/template_validator.py +2 -2
- claude_mpm/services/agents/deployment/validation/validation_result.py +2 -6
- claude_mpm/services/agents/loading/__init__.py +1 -1
- claude_mpm/services/agents/loading/agent_profile_loader.py +6 -12
- claude_mpm/services/agents/loading/base_agent_manager.py +5 -5
- claude_mpm/services/agents/loading/framework_agent_loader.py +2 -4
- claude_mpm/services/agents/management/__init__.py +1 -1
- claude_mpm/services/agents/management/agent_capabilities_generator.py +1 -3
- claude_mpm/services/agents/management/agent_management_service.py +5 -9
- claude_mpm/services/agents/memory/__init__.py +4 -4
- claude_mpm/services/agents/memory/agent_memory_manager.py +157 -503
- claude_mpm/services/agents/memory/agent_persistence_service.py +0 -2
- claude_mpm/services/agents/memory/content_manager.py +44 -38
- claude_mpm/services/agents/memory/memory_categorization_service.py +165 -0
- claude_mpm/services/agents/memory/memory_file_service.py +103 -0
- claude_mpm/services/agents/memory/memory_format_service.py +201 -0
- claude_mpm/services/agents/memory/memory_limits_service.py +99 -0
- claude_mpm/services/agents/memory/template_generator.py +4 -6
- claude_mpm/services/agents/registry/__init__.py +11 -7
- claude_mpm/services/agents/registry/deployed_agent_discovery.py +30 -27
- claude_mpm/services/agents/registry/modification_tracker.py +3 -6
- claude_mpm/services/async_session_logger.py +1 -2
- claude_mpm/services/claude_session_logger.py +1 -2
- claude_mpm/services/cli/__init__.py +18 -0
- claude_mpm/services/cli/agent_cleanup_service.py +407 -0
- claude_mpm/services/cli/agent_dependency_service.py +395 -0
- claude_mpm/services/cli/agent_listing_service.py +463 -0
- claude_mpm/services/cli/agent_output_formatter.py +605 -0
- claude_mpm/services/cli/agent_validation_service.py +589 -0
- claude_mpm/services/cli/dashboard_launcher.py +424 -0
- claude_mpm/services/cli/memory_crud_service.py +617 -0
- claude_mpm/services/cli/memory_output_formatter.py +604 -0
- claude_mpm/services/cli/session_manager.py +513 -0
- claude_mpm/services/cli/socketio_manager.py +498 -0
- claude_mpm/services/cli/startup_checker.py +370 -0
- claude_mpm/services/command_deployment_service.py +173 -0
- claude_mpm/services/command_handler_service.py +20 -22
- claude_mpm/services/core/__init__.py +25 -25
- claude_mpm/services/core/base.py +0 -5
- claude_mpm/services/core/cache_manager.py +311 -0
- claude_mpm/services/core/interfaces/__init__.py +32 -32
- claude_mpm/services/core/interfaces/agent.py +0 -21
- claude_mpm/services/core/interfaces/communication.py +0 -27
- claude_mpm/services/core/interfaces/infrastructure.py +0 -56
- claude_mpm/services/core/interfaces/service.py +0 -29
- claude_mpm/services/core/memory_manager.py +637 -0
- claude_mpm/services/core/path_resolver.py +498 -0
- claude_mpm/services/core/service_container.py +520 -0
- claude_mpm/services/core/service_interfaces.py +436 -0
- claude_mpm/services/diagnostics/__init__.py +1 -1
- claude_mpm/services/diagnostics/checks/__init__.py +6 -6
- claude_mpm/services/diagnostics/checks/agent_check.py +152 -97
- claude_mpm/services/diagnostics/checks/base_check.py +12 -16
- claude_mpm/services/diagnostics/checks/claude_desktop_check.py +84 -81
- claude_mpm/services/diagnostics/checks/common_issues_check.py +99 -91
- claude_mpm/services/diagnostics/checks/configuration_check.py +82 -77
- claude_mpm/services/diagnostics/checks/filesystem_check.py +67 -68
- claude_mpm/services/diagnostics/checks/installation_check.py +254 -94
- claude_mpm/services/diagnostics/checks/mcp_check.py +90 -88
- claude_mpm/services/diagnostics/checks/monitor_check.py +75 -76
- claude_mpm/services/diagnostics/checks/startup_log_check.py +67 -73
- claude_mpm/services/diagnostics/diagnostic_runner.py +67 -59
- claude_mpm/services/diagnostics/doctor_reporter.py +107 -70
- claude_mpm/services/diagnostics/models.py +21 -19
- claude_mpm/services/event_aggregator.py +10 -17
- claude_mpm/services/event_bus/__init__.py +1 -1
- claude_mpm/services/event_bus/config.py +54 -35
- claude_mpm/services/event_bus/event_bus.py +76 -71
- claude_mpm/services/event_bus/relay.py +74 -64
- claude_mpm/services/events/__init__.py +11 -11
- claude_mpm/services/events/consumers/__init__.py +3 -3
- claude_mpm/services/events/consumers/dead_letter.py +71 -63
- claude_mpm/services/events/consumers/logging.py +39 -37
- claude_mpm/services/events/consumers/metrics.py +56 -57
- claude_mpm/services/events/consumers/socketio.py +82 -81
- claude_mpm/services/events/core.py +110 -99
- claude_mpm/services/events/interfaces.py +56 -72
- claude_mpm/services/events/producers/__init__.py +1 -1
- claude_mpm/services/events/producers/hook.py +38 -38
- claude_mpm/services/events/producers/system.py +46 -44
- claude_mpm/services/exceptions.py +81 -80
- claude_mpm/services/framework_claude_md_generator/__init__.py +2 -4
- claude_mpm/services/framework_claude_md_generator/content_assembler.py +3 -5
- claude_mpm/services/framework_claude_md_generator/content_validator.py +1 -1
- claude_mpm/services/framework_claude_md_generator/deployment_manager.py +4 -4
- claude_mpm/services/framework_claude_md_generator/section_generators/__init__.py +0 -1
- claude_mpm/services/framework_claude_md_generator/section_generators/agents.py +0 -2
- claude_mpm/services/framework_claude_md_generator/version_manager.py +4 -5
- claude_mpm/services/hook_service.py +6 -9
- claude_mpm/services/infrastructure/__init__.py +1 -1
- claude_mpm/services/infrastructure/context_preservation.py +8 -12
- claude_mpm/services/infrastructure/monitoring.py +21 -23
- claude_mpm/services/mcp_gateway/__init__.py +37 -37
- claude_mpm/services/mcp_gateway/auto_configure.py +95 -103
- claude_mpm/services/mcp_gateway/config/__init__.py +1 -1
- claude_mpm/services/mcp_gateway/config/config_loader.py +23 -25
- claude_mpm/services/mcp_gateway/config/config_schema.py +5 -5
- claude_mpm/services/mcp_gateway/config/configuration.py +9 -6
- claude_mpm/services/mcp_gateway/core/__init__.py +10 -10
- claude_mpm/services/mcp_gateway/core/base.py +0 -3
- claude_mpm/services/mcp_gateway/core/interfaces.py +1 -38
- claude_mpm/services/mcp_gateway/core/process_pool.py +99 -93
- claude_mpm/services/mcp_gateway/core/singleton_manager.py +65 -62
- claude_mpm/services/mcp_gateway/core/startup_verification.py +75 -74
- claude_mpm/services/mcp_gateway/main.py +2 -1
- claude_mpm/services/mcp_gateway/registry/service_registry.py +5 -8
- claude_mpm/services/mcp_gateway/registry/tool_registry.py +1 -1
- claude_mpm/services/mcp_gateway/server/__init__.py +1 -1
- claude_mpm/services/mcp_gateway/server/mcp_gateway.py +12 -19
- claude_mpm/services/mcp_gateway/server/stdio_handler.py +4 -3
- claude_mpm/services/mcp_gateway/server/stdio_server.py +79 -71
- claude_mpm/services/mcp_gateway/tools/__init__.py +2 -2
- claude_mpm/services/mcp_gateway/tools/base_adapter.py +5 -6
- claude_mpm/services/mcp_gateway/tools/document_summarizer.py +13 -22
- claude_mpm/services/mcp_gateway/tools/health_check_tool.py +79 -78
- claude_mpm/services/mcp_gateway/tools/hello_world.py +12 -14
- claude_mpm/services/mcp_gateway/tools/ticket_tools.py +42 -49
- claude_mpm/services/mcp_gateway/tools/unified_ticket_tool.py +51 -55
- claude_mpm/services/memory/__init__.py +3 -3
- claude_mpm/services/memory/builder.py +3 -6
- claude_mpm/services/memory/cache/__init__.py +1 -1
- claude_mpm/services/memory/cache/shared_prompt_cache.py +3 -5
- claude_mpm/services/memory/cache/simple_cache.py +1 -1
- claude_mpm/services/memory/indexed_memory.py +5 -7
- claude_mpm/services/memory/optimizer.py +7 -10
- claude_mpm/services/memory/router.py +8 -9
- claude_mpm/services/memory_hook_service.py +48 -34
- claude_mpm/services/monitor_build_service.py +77 -73
- claude_mpm/services/port_manager.py +130 -108
- claude_mpm/services/project/analyzer.py +12 -10
- claude_mpm/services/project/registry.py +11 -11
- claude_mpm/services/recovery_manager.py +10 -19
- claude_mpm/services/response_tracker.py +0 -1
- claude_mpm/services/runner_configuration_service.py +19 -20
- claude_mpm/services/session_management_service.py +7 -11
- claude_mpm/services/shared/__init__.py +1 -1
- claude_mpm/services/shared/async_service_base.py +58 -50
- claude_mpm/services/shared/config_service_base.py +73 -67
- claude_mpm/services/shared/lifecycle_service_base.py +82 -78
- claude_mpm/services/shared/manager_base.py +94 -82
- claude_mpm/services/shared/service_factory.py +96 -98
- claude_mpm/services/socketio/__init__.py +3 -3
- claude_mpm/services/socketio/client_proxy.py +5 -5
- claude_mpm/services/socketio/event_normalizer.py +199 -181
- claude_mpm/services/socketio/handlers/__init__.py +3 -3
- claude_mpm/services/socketio/handlers/base.py +5 -4
- claude_mpm/services/socketio/handlers/connection.py +163 -136
- claude_mpm/services/socketio/handlers/file.py +13 -14
- claude_mpm/services/socketio/handlers/git.py +12 -7
- claude_mpm/services/socketio/handlers/hook.py +49 -44
- claude_mpm/services/socketio/handlers/memory.py +0 -1
- claude_mpm/services/socketio/handlers/project.py +0 -1
- claude_mpm/services/socketio/handlers/registry.py +37 -19
- claude_mpm/services/socketio/migration_utils.py +98 -84
- claude_mpm/services/socketio/server/__init__.py +1 -1
- claude_mpm/services/socketio/server/broadcaster.py +81 -87
- claude_mpm/services/socketio/server/core.py +65 -54
- claude_mpm/services/socketio/server/eventbus_integration.py +95 -56
- claude_mpm/services/socketio/server/main.py +64 -38
- claude_mpm/services/socketio_client_manager.py +10 -12
- claude_mpm/services/subprocess_launcher_service.py +4 -7
- claude_mpm/services/system_instructions_service.py +13 -14
- claude_mpm/services/ticket_manager.py +2 -2
- claude_mpm/services/utility_service.py +5 -13
- claude_mpm/services/version_control/__init__.py +16 -16
- claude_mpm/services/version_control/branch_strategy.py +5 -8
- claude_mpm/services/version_control/conflict_resolution.py +9 -23
- claude_mpm/services/version_control/git_operations.py +5 -7
- claude_mpm/services/version_control/semantic_versioning.py +16 -17
- claude_mpm/services/version_control/version_parser.py +13 -18
- claude_mpm/services/version_service.py +10 -11
- claude_mpm/storage/__init__.py +1 -1
- claude_mpm/storage/state_storage.py +22 -28
- claude_mpm/utils/__init__.py +6 -6
- claude_mpm/utils/agent_dependency_loader.py +47 -33
- claude_mpm/utils/config_manager.py +11 -14
- claude_mpm/utils/dependency_cache.py +1 -1
- claude_mpm/utils/dependency_manager.py +13 -17
- claude_mpm/utils/dependency_strategies.py +8 -10
- claude_mpm/utils/environment_context.py +3 -9
- claude_mpm/utils/error_handler.py +3 -13
- claude_mpm/utils/file_utils.py +1 -1
- claude_mpm/utils/path_operations.py +8 -12
- claude_mpm/utils/robust_installer.py +110 -33
- claude_mpm/utils/subprocess_utils.py +5 -6
- claude_mpm/validation/agent_validator.py +3 -6
- claude_mpm/validation/frontmatter_validator.py +1 -1
- {claude_mpm-4.1.1.dist-info → claude_mpm-4.1.3.dist-info}/METADATA +1 -1
- claude_mpm-4.1.3.dist-info/RECORD +528 -0
- claude_mpm/cli/commands/run_config_checker.py +0 -160
- claude_mpm-4.1.1.dist-info/RECORD +0 -494
- {claude_mpm-4.1.1.dist-info → claude_mpm-4.1.3.dist-info}/WHEEL +0 -0
- {claude_mpm-4.1.1.dist-info → claude_mpm-4.1.3.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.1.1.dist-info → claude_mpm-4.1.3.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.1.1.dist-info → claude_mpm-4.1.3.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,6 @@ WHY: Verify that agents are properly deployed, up-to-date, and functioning corre
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Dict, Any, List
|
|
9
8
|
|
|
10
9
|
from ..models import DiagnosticResult, DiagnosticStatus
|
|
11
10
|
from .base_check import BaseDiagnosticCheck
|
|
@@ -13,52 +12,57 @@ from .base_check import BaseDiagnosticCheck
|
|
|
13
12
|
|
|
14
13
|
class AgentCheck(BaseDiagnosticCheck):
|
|
15
14
|
"""Check agent deployment and configuration."""
|
|
16
|
-
|
|
15
|
+
|
|
17
16
|
@property
|
|
18
17
|
def name(self) -> str:
|
|
19
18
|
return "agent_check"
|
|
20
|
-
|
|
19
|
+
|
|
21
20
|
@property
|
|
22
21
|
def category(self) -> str:
|
|
23
22
|
return "Agents"
|
|
24
|
-
|
|
23
|
+
|
|
25
24
|
def run(self) -> DiagnosticResult:
|
|
26
25
|
"""Run agent diagnostics."""
|
|
27
26
|
try:
|
|
28
|
-
from ....services.agents.deployment.
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
from ....services.agents.deployment.agent_discovery_service import (
|
|
28
|
+
AgentDiscoveryService,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
31
|
sub_results = []
|
|
32
32
|
details = {}
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
# Get available agents
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
# AgentDiscoveryService requires templates_dir parameter
|
|
36
|
+
templates_dir = Path(__file__).parents[3] / "agents" / "templates"
|
|
37
|
+
discovery = AgentDiscoveryService(templates_dir)
|
|
38
|
+
available_agents = discovery.list_available_agents()
|
|
37
39
|
details["available_count"] = len(available_agents)
|
|
38
|
-
details["available_agents"] = [
|
|
39
|
-
|
|
40
|
+
details["available_agents"] = [
|
|
41
|
+
a.get("name", "unknown") for a in available_agents
|
|
42
|
+
]
|
|
43
|
+
|
|
40
44
|
# Check deployed agents
|
|
41
45
|
deployed_result = self._check_deployed_agents()
|
|
42
46
|
sub_results.append(deployed_result)
|
|
43
47
|
details["deployed_count"] = deployed_result.details.get("count", 0)
|
|
44
|
-
|
|
48
|
+
|
|
45
49
|
# Check agent versions
|
|
46
50
|
version_result = self._check_agent_versions()
|
|
47
51
|
sub_results.append(version_result)
|
|
48
52
|
details["outdated_agents"] = version_result.details.get("outdated", [])
|
|
49
|
-
|
|
53
|
+
|
|
50
54
|
# Validate agent configurations
|
|
51
55
|
validation_result = self._validate_agents()
|
|
52
56
|
sub_results.append(validation_result)
|
|
53
|
-
|
|
57
|
+
|
|
54
58
|
# Check for common agent issues
|
|
55
59
|
issues_result = self._check_common_issues()
|
|
56
60
|
sub_results.append(issues_result)
|
|
57
|
-
|
|
61
|
+
|
|
58
62
|
# Determine overall status
|
|
59
63
|
deployed_count = details["deployed_count"]
|
|
60
64
|
available_count = details["available_count"]
|
|
61
|
-
|
|
65
|
+
|
|
62
66
|
if deployed_count == 0:
|
|
63
67
|
status = DiagnosticStatus.ERROR
|
|
64
68
|
message = f"No agents deployed (0/{available_count} available)"
|
|
@@ -68,7 +72,9 @@ class AgentCheck(BaseDiagnosticCheck):
|
|
|
68
72
|
status = DiagnosticStatus.WARNING
|
|
69
73
|
message = f"{deployed_count}/{available_count} agents deployed"
|
|
70
74
|
fix_command = "claude-mpm agents deploy"
|
|
71
|
-
fix_description =
|
|
75
|
+
fix_description = (
|
|
76
|
+
f"Deploy remaining {available_count - deployed_count} agents"
|
|
77
|
+
)
|
|
72
78
|
elif any(r.status == DiagnosticStatus.ERROR for r in sub_results):
|
|
73
79
|
status = DiagnosticStatus.ERROR
|
|
74
80
|
message = "Agents have critical issues"
|
|
@@ -84,7 +90,7 @@ class AgentCheck(BaseDiagnosticCheck):
|
|
|
84
90
|
message = f"All {deployed_count} agents properly deployed"
|
|
85
91
|
fix_command = None
|
|
86
92
|
fix_description = None
|
|
87
|
-
|
|
93
|
+
|
|
88
94
|
return DiagnosticResult(
|
|
89
95
|
category=self.category,
|
|
90
96
|
status=status,
|
|
@@ -92,102 +98,131 @@ class AgentCheck(BaseDiagnosticCheck):
|
|
|
92
98
|
details=details,
|
|
93
99
|
fix_command=fix_command,
|
|
94
100
|
fix_description=fix_description,
|
|
95
|
-
sub_results=sub_results if self.verbose else []
|
|
101
|
+
sub_results=sub_results if self.verbose else [],
|
|
96
102
|
)
|
|
97
|
-
|
|
103
|
+
|
|
98
104
|
except Exception as e:
|
|
99
105
|
return DiagnosticResult(
|
|
100
106
|
category=self.category,
|
|
101
107
|
status=DiagnosticStatus.ERROR,
|
|
102
|
-
message=f"Agent check failed: {
|
|
103
|
-
details={"error": str(e)}
|
|
108
|
+
message=f"Agent check failed: {e!s}",
|
|
109
|
+
details={"error": str(e)},
|
|
104
110
|
)
|
|
105
|
-
|
|
111
|
+
|
|
106
112
|
def _check_deployed_agents(self) -> DiagnosticResult:
|
|
107
|
-
"""Check deployed agents in user
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
113
|
+
"""Check deployed agents in both project and user directories."""
|
|
114
|
+
import os
|
|
115
|
+
|
|
116
|
+
# Check project-level agents first (preferred in development)
|
|
117
|
+
project_agents_dir = Path(os.getcwd()) / ".claude" / "agents"
|
|
118
|
+
user_agents_dir = Path.home() / ".claude" / "agents"
|
|
119
|
+
|
|
120
|
+
# Determine which directory to check
|
|
121
|
+
if project_agents_dir.exists():
|
|
122
|
+
agents_dir = project_agents_dir
|
|
123
|
+
location = "project"
|
|
124
|
+
elif user_agents_dir.exists():
|
|
125
|
+
agents_dir = user_agents_dir
|
|
126
|
+
location = "user"
|
|
127
|
+
else:
|
|
128
|
+
# Neither exists, default to user directory for error message
|
|
111
129
|
return DiagnosticResult(
|
|
112
130
|
category="Deployed Agents",
|
|
113
131
|
status=DiagnosticStatus.ERROR,
|
|
114
|
-
message="
|
|
115
|
-
details={
|
|
132
|
+
message="No agents directory found (checked project and user)",
|
|
133
|
+
details={
|
|
134
|
+
"project_path": str(project_agents_dir),
|
|
135
|
+
"user_path": str(user_agents_dir),
|
|
136
|
+
"count": 0,
|
|
137
|
+
},
|
|
116
138
|
fix_command="claude-mpm agents deploy",
|
|
117
|
-
fix_description="Create agents directory and deploy agents"
|
|
139
|
+
fix_description="Create agents directory and deploy agents",
|
|
118
140
|
)
|
|
119
|
-
|
|
141
|
+
|
|
120
142
|
# Count deployed agent files
|
|
121
143
|
agent_files = list(agents_dir.glob("*.md"))
|
|
122
|
-
|
|
144
|
+
|
|
123
145
|
if not agent_files:
|
|
124
146
|
return DiagnosticResult(
|
|
125
147
|
category="Deployed Agents",
|
|
126
148
|
status=DiagnosticStatus.ERROR,
|
|
127
|
-
message="No agents deployed",
|
|
128
|
-
details={"path": str(agents_dir), "count": 0},
|
|
149
|
+
message=f"No agents deployed in {location} directory",
|
|
150
|
+
details={"path": str(agents_dir), "location": location, "count": 0},
|
|
129
151
|
fix_command="claude-mpm agents deploy",
|
|
130
|
-
fix_description="Deploy available agents"
|
|
152
|
+
fix_description="Deploy available agents",
|
|
131
153
|
)
|
|
132
|
-
|
|
154
|
+
|
|
133
155
|
# Check for required core agents
|
|
134
156
|
core_agents = ["research.md", "engineer.md", "qa.md", "documentation.md"]
|
|
135
157
|
deployed_names = [f.name for f in agent_files]
|
|
136
158
|
missing_core = [a for a in core_agents if a not in deployed_names]
|
|
137
|
-
|
|
159
|
+
|
|
138
160
|
if missing_core:
|
|
139
161
|
return DiagnosticResult(
|
|
140
162
|
category="Deployed Agents",
|
|
141
163
|
status=DiagnosticStatus.WARNING,
|
|
142
|
-
message=f"Missing core agents: {', '.join(missing_core)}",
|
|
164
|
+
message=f"Missing core agents in {location}: {', '.join(missing_core)}",
|
|
143
165
|
details={
|
|
144
166
|
"path": str(agents_dir),
|
|
167
|
+
"location": location,
|
|
145
168
|
"count": len(agent_files),
|
|
146
169
|
"deployed": deployed_names,
|
|
147
|
-
"missing_core": missing_core
|
|
170
|
+
"missing_core": missing_core,
|
|
148
171
|
},
|
|
149
172
|
fix_command="claude-mpm agents deploy",
|
|
150
|
-
fix_description="Deploy missing core agents"
|
|
173
|
+
fix_description="Deploy missing core agents",
|
|
151
174
|
)
|
|
152
|
-
|
|
175
|
+
|
|
153
176
|
return DiagnosticResult(
|
|
154
177
|
category="Deployed Agents",
|
|
155
178
|
status=DiagnosticStatus.OK,
|
|
156
|
-
message=f"{len(agent_files)} agents deployed",
|
|
179
|
+
message=f"{len(agent_files)} agents deployed ({location} level)",
|
|
157
180
|
details={
|
|
158
181
|
"path": str(agents_dir),
|
|
182
|
+
"location": location,
|
|
159
183
|
"count": len(agent_files),
|
|
160
|
-
"deployed": deployed_names
|
|
161
|
-
}
|
|
184
|
+
"deployed": deployed_names,
|
|
185
|
+
},
|
|
162
186
|
)
|
|
163
|
-
|
|
187
|
+
|
|
164
188
|
def _check_agent_versions(self) -> DiagnosticResult:
|
|
165
189
|
"""Check if deployed agents are up-to-date."""
|
|
166
190
|
try:
|
|
167
|
-
|
|
168
|
-
|
|
191
|
+
import os
|
|
192
|
+
|
|
193
|
+
from ....services.agents.deployment.agent_version_manager import (
|
|
194
|
+
AgentVersionManager,
|
|
195
|
+
)
|
|
196
|
+
|
|
169
197
|
version_manager = AgentVersionManager()
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
198
|
+
|
|
199
|
+
# Check both project and user directories
|
|
200
|
+
project_agents_dir = Path(os.getcwd()) / ".claude" / "agents"
|
|
201
|
+
user_agents_dir = Path.home() / ".claude" / "agents"
|
|
202
|
+
|
|
203
|
+
if project_agents_dir.exists():
|
|
204
|
+
agents_dir = project_agents_dir
|
|
205
|
+
elif user_agents_dir.exists():
|
|
206
|
+
agents_dir = user_agents_dir
|
|
207
|
+
else:
|
|
173
208
|
return DiagnosticResult(
|
|
174
209
|
category="Agent Versions",
|
|
175
210
|
status=DiagnosticStatus.SKIPPED,
|
|
176
211
|
message="No agents to check",
|
|
177
|
-
details={}
|
|
212
|
+
details={},
|
|
178
213
|
)
|
|
179
|
-
|
|
214
|
+
|
|
180
215
|
outdated = []
|
|
181
216
|
checked = 0
|
|
182
|
-
|
|
217
|
+
|
|
183
218
|
for agent_file in agents_dir.glob("*.md"):
|
|
184
219
|
checked += 1
|
|
185
220
|
agent_name = agent_file.stem
|
|
186
|
-
|
|
221
|
+
|
|
187
222
|
# Check if agent needs update (simplified check)
|
|
188
223
|
if version_manager.needs_update(agent_name):
|
|
189
224
|
outdated.append(agent_name)
|
|
190
|
-
|
|
225
|
+
|
|
191
226
|
if outdated:
|
|
192
227
|
return DiagnosticResult(
|
|
193
228
|
category="Agent Versions",
|
|
@@ -195,98 +230,119 @@ class AgentCheck(BaseDiagnosticCheck):
|
|
|
195
230
|
message=f"{len(outdated)} agent(s) outdated",
|
|
196
231
|
details={"outdated": outdated, "checked": checked},
|
|
197
232
|
fix_command="claude-mpm agents update",
|
|
198
|
-
fix_description="Update agents to latest versions"
|
|
233
|
+
fix_description="Update agents to latest versions",
|
|
199
234
|
)
|
|
200
|
-
|
|
235
|
+
|
|
201
236
|
if checked == 0:
|
|
202
237
|
return DiagnosticResult(
|
|
203
238
|
category="Agent Versions",
|
|
204
239
|
status=DiagnosticStatus.WARNING,
|
|
205
240
|
message="No agents to check",
|
|
206
|
-
details={"checked": 0}
|
|
241
|
+
details={"checked": 0},
|
|
207
242
|
)
|
|
208
|
-
|
|
243
|
+
|
|
209
244
|
return DiagnosticResult(
|
|
210
245
|
category="Agent Versions",
|
|
211
246
|
status=DiagnosticStatus.OK,
|
|
212
247
|
message=f"All {checked} agents up-to-date",
|
|
213
|
-
details={"checked": checked}
|
|
248
|
+
details={"checked": checked},
|
|
214
249
|
)
|
|
215
|
-
|
|
250
|
+
|
|
216
251
|
except Exception as e:
|
|
217
252
|
return DiagnosticResult(
|
|
218
253
|
category="Agent Versions",
|
|
219
254
|
status=DiagnosticStatus.WARNING,
|
|
220
|
-
message=f"Could not check versions: {
|
|
221
|
-
details={"error": str(e)}
|
|
255
|
+
message=f"Could not check versions: {e!s}",
|
|
256
|
+
details={"error": str(e)},
|
|
222
257
|
)
|
|
223
|
-
|
|
258
|
+
|
|
224
259
|
def _validate_agents(self) -> DiagnosticResult:
|
|
225
260
|
"""Validate agent configurations."""
|
|
226
261
|
try:
|
|
262
|
+
import os
|
|
263
|
+
|
|
227
264
|
from ....services.agents.deployment.agent_validator import AgentValidator
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
265
|
+
|
|
266
|
+
AgentValidator()
|
|
267
|
+
|
|
268
|
+
# Check both project and user directories
|
|
269
|
+
project_agents_dir = Path(os.getcwd()) / ".claude" / "agents"
|
|
270
|
+
user_agents_dir = Path.home() / ".claude" / "agents"
|
|
271
|
+
|
|
272
|
+
if project_agents_dir.exists():
|
|
273
|
+
agents_dir = project_agents_dir
|
|
274
|
+
elif user_agents_dir.exists():
|
|
275
|
+
agents_dir = user_agents_dir
|
|
276
|
+
else:
|
|
233
277
|
return DiagnosticResult(
|
|
234
278
|
category="Agent Validation",
|
|
235
279
|
status=DiagnosticStatus.SKIPPED,
|
|
236
280
|
message="No agents to validate",
|
|
237
|
-
details={}
|
|
281
|
+
details={},
|
|
238
282
|
)
|
|
239
|
-
|
|
283
|
+
|
|
240
284
|
invalid = []
|
|
241
285
|
validated = 0
|
|
242
|
-
|
|
286
|
+
|
|
243
287
|
for agent_file in agents_dir.glob("*.md"):
|
|
244
288
|
validated += 1
|
|
245
|
-
|
|
289
|
+
|
|
246
290
|
# Basic validation
|
|
247
291
|
try:
|
|
248
|
-
with open(agent_file
|
|
292
|
+
with open(agent_file) as f:
|
|
249
293
|
content = f.read()
|
|
250
|
-
|
|
294
|
+
|
|
251
295
|
# Check for required sections
|
|
252
296
|
if "## Core Identity" not in content:
|
|
253
297
|
invalid.append(f"{agent_file.stem}: missing Core Identity")
|
|
254
298
|
elif len(content) < 100:
|
|
255
299
|
invalid.append(f"{agent_file.stem}: file too small")
|
|
256
|
-
|
|
300
|
+
|
|
257
301
|
except Exception as e:
|
|
258
|
-
invalid.append(f"{agent_file.stem}: {
|
|
259
|
-
|
|
302
|
+
invalid.append(f"{agent_file.stem}: {e!s}")
|
|
303
|
+
|
|
260
304
|
if invalid:
|
|
261
305
|
return DiagnosticResult(
|
|
262
306
|
category="Agent Validation",
|
|
263
307
|
status=DiagnosticStatus.WARNING,
|
|
264
308
|
message=f"{len(invalid)} validation issue(s)",
|
|
265
|
-
details={"issues": invalid, "validated": validated}
|
|
309
|
+
details={"issues": invalid, "validated": validated},
|
|
266
310
|
)
|
|
267
|
-
|
|
311
|
+
|
|
268
312
|
return DiagnosticResult(
|
|
269
313
|
category="Agent Validation",
|
|
270
314
|
status=DiagnosticStatus.OK,
|
|
271
315
|
message=f"All {validated} agents valid",
|
|
272
|
-
details={"validated": validated}
|
|
316
|
+
details={"validated": validated},
|
|
273
317
|
)
|
|
274
|
-
|
|
318
|
+
|
|
275
319
|
except Exception as e:
|
|
276
320
|
return DiagnosticResult(
|
|
277
321
|
category="Agent Validation",
|
|
278
322
|
status=DiagnosticStatus.WARNING,
|
|
279
|
-
message=f"Validation failed: {
|
|
280
|
-
details={"error": str(e)}
|
|
323
|
+
message=f"Validation failed: {e!s}",
|
|
324
|
+
details={"error": str(e)},
|
|
281
325
|
)
|
|
282
|
-
|
|
326
|
+
|
|
283
327
|
def _check_common_issues(self) -> DiagnosticResult:
|
|
284
328
|
"""Check for common agent-related issues."""
|
|
329
|
+
import os
|
|
330
|
+
|
|
285
331
|
issues = []
|
|
286
|
-
|
|
332
|
+
|
|
333
|
+
# Check both project and user directories
|
|
334
|
+
project_agents_dir = Path(os.getcwd()) / ".claude" / "agents"
|
|
335
|
+
user_agents_dir = Path.home() / ".claude" / "agents"
|
|
336
|
+
|
|
337
|
+
if project_agents_dir.exists():
|
|
338
|
+
agents_dir = project_agents_dir
|
|
339
|
+
elif user_agents_dir.exists():
|
|
340
|
+
agents_dir = user_agents_dir
|
|
341
|
+
else:
|
|
342
|
+
agents_dir = None
|
|
343
|
+
|
|
287
344
|
# Check for duplicate agents
|
|
288
|
-
agents_dir
|
|
289
|
-
if agents_dir.exists():
|
|
345
|
+
if agents_dir and agents_dir.exists():
|
|
290
346
|
agent_names = {}
|
|
291
347
|
for agent_file in agents_dir.glob("*.md"):
|
|
292
348
|
name = agent_file.stem.lower()
|
|
@@ -294,26 +350,25 @@ class AgentCheck(BaseDiagnosticCheck):
|
|
|
294
350
|
issues.append(f"Duplicate agent: {agent_file.stem}")
|
|
295
351
|
else:
|
|
296
352
|
agent_names[name] = agent_file
|
|
297
|
-
|
|
353
|
+
|
|
298
354
|
# Check permissions
|
|
299
|
-
if agents_dir.exists():
|
|
300
|
-
import os
|
|
355
|
+
if agents_dir and agents_dir.exists():
|
|
301
356
|
if not os.access(agents_dir, os.R_OK):
|
|
302
357
|
issues.append("Agents directory not readable")
|
|
303
358
|
if not os.access(agents_dir, os.W_OK):
|
|
304
359
|
issues.append("Agents directory not writable")
|
|
305
|
-
|
|
360
|
+
|
|
306
361
|
if issues:
|
|
307
362
|
return DiagnosticResult(
|
|
308
363
|
category="Common Issues",
|
|
309
364
|
status=DiagnosticStatus.WARNING,
|
|
310
365
|
message=f"{len(issues)} issue(s) found",
|
|
311
|
-
details={"issues": issues}
|
|
366
|
+
details={"issues": issues},
|
|
312
367
|
)
|
|
313
|
-
|
|
368
|
+
|
|
314
369
|
return DiagnosticResult(
|
|
315
370
|
category="Common Issues",
|
|
316
371
|
status=DiagnosticStatus.OK,
|
|
317
372
|
message="No common issues detected",
|
|
318
|
-
details={}
|
|
319
|
-
)
|
|
373
|
+
details={},
|
|
374
|
+
)
|
|
@@ -6,59 +6,55 @@ they can be easily added, tested, and executed by the diagnostic runner.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
from abc import ABC, abstractmethod
|
|
9
|
-
from typing import Optional
|
|
10
9
|
|
|
11
10
|
from ..models import DiagnosticResult
|
|
12
11
|
|
|
13
12
|
|
|
14
13
|
class BaseDiagnosticCheck(ABC):
|
|
15
14
|
"""Base class for all diagnostic checks.
|
|
16
|
-
|
|
15
|
+
|
|
17
16
|
WHY: Ensures all checks follow the same pattern and can be
|
|
18
17
|
executed uniformly by the diagnostic runner.
|
|
19
18
|
"""
|
|
20
|
-
|
|
19
|
+
|
|
21
20
|
def __init__(self, verbose: bool = False):
|
|
22
21
|
"""Initialize the check.
|
|
23
|
-
|
|
22
|
+
|
|
24
23
|
Args:
|
|
25
24
|
verbose: Whether to include detailed information in results
|
|
26
25
|
"""
|
|
27
26
|
self.verbose = verbose
|
|
28
|
-
|
|
27
|
+
|
|
29
28
|
@property
|
|
30
29
|
@abstractmethod
|
|
31
30
|
def name(self) -> str:
|
|
32
31
|
"""Get the name of this check."""
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
|
|
35
33
|
@property
|
|
36
34
|
@abstractmethod
|
|
37
35
|
def category(self) -> str:
|
|
38
36
|
"""Get the category this check belongs to."""
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
|
|
41
38
|
@property
|
|
42
39
|
def description(self) -> str:
|
|
43
40
|
"""Get a description of what this check does."""
|
|
44
41
|
return f"Checking {self.category.lower()} health"
|
|
45
|
-
|
|
42
|
+
|
|
46
43
|
@abstractmethod
|
|
47
44
|
def run(self) -> DiagnosticResult:
|
|
48
45
|
"""Run the diagnostic check.
|
|
49
|
-
|
|
46
|
+
|
|
50
47
|
Returns:
|
|
51
48
|
DiagnosticResult with the check results
|
|
52
49
|
"""
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
|
|
55
51
|
def should_run(self) -> bool:
|
|
56
52
|
"""Determine if this check should run.
|
|
57
|
-
|
|
53
|
+
|
|
58
54
|
WHY: Some checks may not be applicable in certain environments
|
|
59
55
|
or configurations. This allows checks to opt out gracefully.
|
|
60
|
-
|
|
56
|
+
|
|
61
57
|
Returns:
|
|
62
58
|
True if the check should run, False to skip
|
|
63
59
|
"""
|
|
64
|
-
return True
|
|
60
|
+
return True
|