claude-mpm 4.1.1__py3-none-any.whl → 4.1.2__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/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 +271 -268
- 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 +192 -141
- claude_mpm/cli/commands/monitor.py +117 -88
- claude_mpm/cli/commands/run.py +120 -84
- claude_mpm/cli/commands/run_config_checker.py +4 -5
- 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 +204 -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 +20 -23
- 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 +581 -280
- 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 -15
- 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 +93 -38
- claude_mpm/hooks/claude_hooks/hook_handler.py +130 -76
- claude_mpm/hooks/claude_hooks/hook_handler_eventbus.py +104 -77
- 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/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 +136 -106
- 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/config/__init__.py +1 -1
- claude_mpm/services/agents/deployment/config/deployment_config.py +7 -8
- 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/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 +280 -160
- 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/template_generator.py +4 -6
- claude_mpm/services/agents/registry/__init__.py +10 -6
- 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/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/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/diagnostics/__init__.py +1 -1
- claude_mpm/services/diagnostics/checks/__init__.py +6 -6
- claude_mpm/services/diagnostics/checks/agent_check.py +89 -80
- 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.2.dist-info}/METADATA +1 -1
- claude_mpm-4.1.2.dist-info/RECORD +498 -0
- claude_mpm-4.1.1.dist-info/RECORD +0 -494
- {claude_mpm-4.1.1.dist-info → claude_mpm-4.1.2.dist-info}/WHEEL +0 -0
- {claude_mpm-4.1.1.dist-info → claude_mpm-4.1.2.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.1.1.dist-info → claude_mpm-4.1.2.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.1.1.dist-info → claude_mpm-4.1.2.dist-info}/top_level.txt +0 -0
claude_mpm/core/interfaces.py
CHANGED
|
@@ -25,14 +25,12 @@ Phase 1 Refactoring: Interface extraction and dependency injection foundation
|
|
|
25
25
|
These interfaces reduce cyclomatic complexity and establish clean separation of concerns.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
|
-
import asyncio
|
|
29
|
-
|
|
30
28
|
# Keep original imports to prevent any parsing issues
|
|
31
29
|
from abc import ABC, abstractmethod
|
|
32
30
|
from dataclasses import dataclass
|
|
33
31
|
from datetime import datetime
|
|
34
32
|
from pathlib import Path
|
|
35
|
-
from typing import Any, Dict, Generic, List, Optional,
|
|
33
|
+
from typing import Any, Dict, Generic, List, Optional, Tuple, TypeVar
|
|
36
34
|
|
|
37
35
|
# Re-export everything from the new location for backward compatibility
|
|
38
36
|
from claude_mpm.services.core.interfaces import *
|
|
@@ -51,27 +49,22 @@ class IServiceContainer(ABC):
|
|
|
51
49
|
self, service_type: type, implementation: type, singleton: bool = True
|
|
52
50
|
) -> None:
|
|
53
51
|
"""Register a service implementation"""
|
|
54
|
-
pass
|
|
55
52
|
|
|
56
53
|
@abstractmethod
|
|
57
54
|
def register_instance(self, service_type: type, instance: Any) -> None:
|
|
58
55
|
"""Register a service instance"""
|
|
59
|
-
pass
|
|
60
56
|
|
|
61
57
|
@abstractmethod
|
|
62
58
|
def resolve(self, service_type: type) -> Any:
|
|
63
59
|
"""Resolve a service by type"""
|
|
64
|
-
pass
|
|
65
60
|
|
|
66
61
|
@abstractmethod
|
|
67
62
|
def resolve_all(self, service_type: type) -> List[Any]:
|
|
68
63
|
"""Resolve all implementations of a service type"""
|
|
69
|
-
pass
|
|
70
64
|
|
|
71
65
|
@abstractmethod
|
|
72
66
|
def is_registered(self, service_type: type) -> bool:
|
|
73
67
|
"""Check if a service type is registered"""
|
|
74
|
-
pass
|
|
75
68
|
|
|
76
69
|
|
|
77
70
|
# Configuration management interfaces
|
|
@@ -81,22 +74,18 @@ class IConfigurationService(ABC):
|
|
|
81
74
|
@abstractmethod
|
|
82
75
|
def get(self, key: str, default: Any = None) -> Any:
|
|
83
76
|
"""Get configuration value by key"""
|
|
84
|
-
pass
|
|
85
77
|
|
|
86
78
|
@abstractmethod
|
|
87
79
|
def set(self, key: str, value: Any) -> None:
|
|
88
80
|
"""Set configuration value"""
|
|
89
|
-
pass
|
|
90
81
|
|
|
91
82
|
@abstractmethod
|
|
92
83
|
def initialize(self) -> bool:
|
|
93
84
|
"""Initialize configuration service"""
|
|
94
|
-
pass
|
|
95
85
|
|
|
96
86
|
@abstractmethod
|
|
97
87
|
def shutdown(self) -> None:
|
|
98
88
|
"""Shutdown configuration service"""
|
|
99
|
-
pass
|
|
100
89
|
|
|
101
90
|
|
|
102
91
|
class IConfigurationManager(ABC):
|
|
@@ -105,32 +94,26 @@ class IConfigurationManager(ABC):
|
|
|
105
94
|
@abstractmethod
|
|
106
95
|
def get(self, key: str, default: Any = None) -> Any:
|
|
107
96
|
"""Get configuration value by key"""
|
|
108
|
-
pass
|
|
109
97
|
|
|
110
98
|
@abstractmethod
|
|
111
99
|
def set(self, key: str, value: Any) -> None:
|
|
112
100
|
"""Set configuration value"""
|
|
113
|
-
pass
|
|
114
101
|
|
|
115
102
|
@abstractmethod
|
|
116
103
|
def get_section(self, section: str) -> Dict[str, Any]:
|
|
117
104
|
"""Get entire configuration section"""
|
|
118
|
-
pass
|
|
119
105
|
|
|
120
106
|
@abstractmethod
|
|
121
107
|
def validate_schema(self, schema: Dict[str, Any]) -> bool:
|
|
122
108
|
"""Validate configuration against schema"""
|
|
123
|
-
pass
|
|
124
109
|
|
|
125
110
|
@abstractmethod
|
|
126
111
|
def reload(self) -> None:
|
|
127
112
|
"""Reload configuration from sources"""
|
|
128
|
-
pass
|
|
129
113
|
|
|
130
114
|
@abstractmethod
|
|
131
115
|
def watch_changes(self, callback: callable) -> None:
|
|
132
116
|
"""Watch for configuration changes"""
|
|
133
|
-
pass
|
|
134
117
|
|
|
135
118
|
|
|
136
119
|
# Cache service interface
|
|
@@ -140,32 +123,26 @@ class ICacheService(ABC):
|
|
|
140
123
|
@abstractmethod
|
|
141
124
|
def get(self, key: str) -> Any:
|
|
142
125
|
"""Get value from cache"""
|
|
143
|
-
pass
|
|
144
126
|
|
|
145
127
|
@abstractmethod
|
|
146
128
|
def set(self, key: str, value: Any, ttl: Optional[int] = None) -> None:
|
|
147
129
|
"""Set value in cache with optional TTL"""
|
|
148
|
-
pass
|
|
149
130
|
|
|
150
131
|
@abstractmethod
|
|
151
132
|
def delete(self, key: str) -> bool:
|
|
152
133
|
"""Delete key from cache"""
|
|
153
|
-
pass
|
|
154
134
|
|
|
155
135
|
@abstractmethod
|
|
156
136
|
def invalidate(self, pattern: str) -> int:
|
|
157
137
|
"""Invalidate keys matching pattern"""
|
|
158
|
-
pass
|
|
159
138
|
|
|
160
139
|
@abstractmethod
|
|
161
140
|
def clear(self) -> None:
|
|
162
141
|
"""Clear all cache entries"""
|
|
163
|
-
pass
|
|
164
142
|
|
|
165
143
|
@abstractmethod
|
|
166
144
|
def get_cache_metrics(self) -> Dict[str, Any]:
|
|
167
145
|
"""Get cache performance metrics"""
|
|
168
|
-
pass
|
|
169
146
|
|
|
170
147
|
|
|
171
148
|
# Health monitoring interface
|
|
@@ -186,27 +163,22 @@ class IHealthMonitor(ABC):
|
|
|
186
163
|
@abstractmethod
|
|
187
164
|
async def check_health(self, service_name: str) -> HealthStatus:
|
|
188
165
|
"""Check health of a specific service"""
|
|
189
|
-
pass
|
|
190
166
|
|
|
191
167
|
@abstractmethod
|
|
192
168
|
async def get_system_health(self) -> HealthStatus:
|
|
193
169
|
"""Get overall system health"""
|
|
194
|
-
pass
|
|
195
170
|
|
|
196
171
|
@abstractmethod
|
|
197
172
|
def register_health_check(self, service_name: str, check_func: callable) -> None:
|
|
198
173
|
"""Register a health check function"""
|
|
199
|
-
pass
|
|
200
174
|
|
|
201
175
|
@abstractmethod
|
|
202
176
|
async def start_monitoring(self) -> None:
|
|
203
177
|
"""Start health monitoring"""
|
|
204
|
-
pass
|
|
205
178
|
|
|
206
179
|
@abstractmethod
|
|
207
180
|
async def stop_monitoring(self) -> None:
|
|
208
181
|
"""Stop health monitoring"""
|
|
209
|
-
pass
|
|
210
182
|
|
|
211
183
|
|
|
212
184
|
# Agent registry interface
|
|
@@ -256,34 +228,28 @@ class IAgentRegistry(ABC):
|
|
|
256
228
|
self, force_refresh: bool = False
|
|
257
229
|
) -> Dict[str, AgentMetadata]:
|
|
258
230
|
"""Discover all available agents"""
|
|
259
|
-
pass
|
|
260
231
|
|
|
261
232
|
@abstractmethod
|
|
262
233
|
async def get_agent(self, agent_name: str) -> Optional[AgentMetadata]:
|
|
263
234
|
"""Get specific agent metadata"""
|
|
264
|
-
pass
|
|
265
235
|
|
|
266
236
|
@abstractmethod
|
|
267
237
|
async def list_agents(
|
|
268
238
|
self, agent_type: Optional[str] = None, tier: Optional[str] = None
|
|
269
239
|
) -> List[AgentMetadata]:
|
|
270
240
|
"""List agents with optional filtering"""
|
|
271
|
-
pass
|
|
272
241
|
|
|
273
242
|
@abstractmethod
|
|
274
243
|
async def get_specialized_agents(self, agent_type: str) -> List[AgentMetadata]:
|
|
275
244
|
"""Get agents of a specific specialized type"""
|
|
276
|
-
pass
|
|
277
245
|
|
|
278
246
|
@abstractmethod
|
|
279
247
|
async def search_by_capability(self, capability: str) -> List[AgentMetadata]:
|
|
280
248
|
"""Search agents by capability"""
|
|
281
|
-
pass
|
|
282
249
|
|
|
283
250
|
@abstractmethod
|
|
284
251
|
async def get_registry_stats(self) -> Dict[str, Any]:
|
|
285
252
|
"""Get registry statistics"""
|
|
286
|
-
pass
|
|
287
253
|
|
|
288
254
|
|
|
289
255
|
# Prompt cache interface
|
|
@@ -311,7 +277,6 @@ class IPromptCache(ABC):
|
|
|
311
277
|
@abstractmethod
|
|
312
278
|
def get(self, key: str) -> Optional[Any]:
|
|
313
279
|
"""Get cached value by key"""
|
|
314
|
-
pass
|
|
315
280
|
|
|
316
281
|
@abstractmethod
|
|
317
282
|
def set(
|
|
@@ -322,27 +287,22 @@ class IPromptCache(ABC):
|
|
|
322
287
|
metadata: Optional[Dict[str, Any]] = None,
|
|
323
288
|
) -> bool:
|
|
324
289
|
"""Set cached value with optional TTL"""
|
|
325
|
-
pass
|
|
326
290
|
|
|
327
291
|
@abstractmethod
|
|
328
292
|
def delete(self, key: str) -> bool:
|
|
329
293
|
"""Delete cached value"""
|
|
330
|
-
pass
|
|
331
294
|
|
|
332
295
|
@abstractmethod
|
|
333
296
|
def invalidate(self, pattern: str) -> int:
|
|
334
297
|
"""Invalidate cached values matching pattern"""
|
|
335
|
-
pass
|
|
336
298
|
|
|
337
299
|
@abstractmethod
|
|
338
300
|
def clear(self) -> None:
|
|
339
301
|
"""Clear all cached values"""
|
|
340
|
-
pass
|
|
341
302
|
|
|
342
303
|
@abstractmethod
|
|
343
304
|
def get_metrics(self) -> Dict[str, Any]:
|
|
344
305
|
"""Get cache performance metrics"""
|
|
345
|
-
pass
|
|
346
306
|
|
|
347
307
|
|
|
348
308
|
# Template management interface
|
|
@@ -364,22 +324,18 @@ class ITemplateManager(ABC):
|
|
|
364
324
|
self, template_content: str, context: TemplateRenderContext
|
|
365
325
|
) -> str:
|
|
366
326
|
"""Render template with given context"""
|
|
367
|
-
pass
|
|
368
327
|
|
|
369
328
|
@abstractmethod
|
|
370
329
|
async def load_template(self, template_id: str) -> Optional[str]:
|
|
371
330
|
"""Load template by ID"""
|
|
372
|
-
pass
|
|
373
331
|
|
|
374
332
|
@abstractmethod
|
|
375
333
|
async def validate_template(self, template_content: str) -> Tuple[bool, List[str]]:
|
|
376
334
|
"""Validate template syntax and variables"""
|
|
377
|
-
pass
|
|
378
335
|
|
|
379
336
|
@abstractmethod
|
|
380
337
|
def register_template_function(self, name: str, func: callable) -> None:
|
|
381
338
|
"""Register custom template function"""
|
|
382
|
-
pass
|
|
383
339
|
|
|
384
340
|
|
|
385
341
|
# Service factory interface
|
|
@@ -389,17 +345,14 @@ class IServiceFactory(Generic[ServiceType], ABC):
|
|
|
389
345
|
@abstractmethod
|
|
390
346
|
def create(self, **kwargs) -> ServiceType:
|
|
391
347
|
"""Create service instance"""
|
|
392
|
-
pass
|
|
393
348
|
|
|
394
349
|
@abstractmethod
|
|
395
350
|
def create_with_config(self, config: Dict[str, Any]) -> ServiceType:
|
|
396
351
|
"""Create service instance with configuration"""
|
|
397
|
-
pass
|
|
398
352
|
|
|
399
353
|
@abstractmethod
|
|
400
354
|
def supports_type(self, service_type: type) -> bool:
|
|
401
355
|
"""Check if factory supports service type"""
|
|
402
|
-
pass
|
|
403
356
|
|
|
404
357
|
|
|
405
358
|
# Logging interface
|
|
@@ -409,32 +362,26 @@ class IStructuredLogger(ABC):
|
|
|
409
362
|
@abstractmethod
|
|
410
363
|
def debug(self, message: str, **kwargs) -> None:
|
|
411
364
|
"""Log debug message with structured data"""
|
|
412
|
-
pass
|
|
413
365
|
|
|
414
366
|
@abstractmethod
|
|
415
367
|
def info(self, message: str, **kwargs) -> None:
|
|
416
368
|
"""Log info message with structured data"""
|
|
417
|
-
pass
|
|
418
369
|
|
|
419
370
|
@abstractmethod
|
|
420
371
|
def warning(self, message: str, **kwargs) -> None:
|
|
421
372
|
"""Log warning message with structured data"""
|
|
422
|
-
pass
|
|
423
373
|
|
|
424
374
|
@abstractmethod
|
|
425
375
|
def error(self, message: str, **kwargs) -> None:
|
|
426
376
|
"""Log error message with structured data"""
|
|
427
|
-
pass
|
|
428
377
|
|
|
429
378
|
@abstractmethod
|
|
430
379
|
def critical(self, message: str, **kwargs) -> None:
|
|
431
380
|
"""Log critical message with structured data"""
|
|
432
|
-
pass
|
|
433
381
|
|
|
434
382
|
@abstractmethod
|
|
435
383
|
def set_context(self, **kwargs) -> None:
|
|
436
384
|
"""Set logging context for all subsequent messages"""
|
|
437
|
-
pass
|
|
438
385
|
|
|
439
386
|
|
|
440
387
|
# Service lifecycle interface
|
|
@@ -444,27 +391,22 @@ class IServiceLifecycle(ABC):
|
|
|
444
391
|
@abstractmethod
|
|
445
392
|
async def initialize(self) -> None:
|
|
446
393
|
"""Initialize the service"""
|
|
447
|
-
pass
|
|
448
394
|
|
|
449
395
|
@abstractmethod
|
|
450
396
|
async def start(self) -> None:
|
|
451
397
|
"""Start the service"""
|
|
452
|
-
pass
|
|
453
398
|
|
|
454
399
|
@abstractmethod
|
|
455
400
|
async def stop(self) -> None:
|
|
456
401
|
"""Stop the service"""
|
|
457
|
-
pass
|
|
458
402
|
|
|
459
403
|
@abstractmethod
|
|
460
404
|
async def restart(self) -> None:
|
|
461
405
|
"""Restart the service"""
|
|
462
|
-
pass
|
|
463
406
|
|
|
464
407
|
@abstractmethod
|
|
465
408
|
def is_running(self) -> bool:
|
|
466
409
|
"""Check if service is running"""
|
|
467
|
-
pass
|
|
468
410
|
|
|
469
411
|
|
|
470
412
|
# Error handling interface
|
|
@@ -474,17 +416,14 @@ class IErrorHandler(ABC):
|
|
|
474
416
|
@abstractmethod
|
|
475
417
|
def handle_error(self, error: Exception, context: Dict[str, Any]) -> None:
|
|
476
418
|
"""Handle error with context"""
|
|
477
|
-
pass
|
|
478
419
|
|
|
479
420
|
@abstractmethod
|
|
480
421
|
def register_error_handler(self, error_type: type, handler: callable) -> None:
|
|
481
422
|
"""Register error handler for specific error type"""
|
|
482
|
-
pass
|
|
483
423
|
|
|
484
424
|
@abstractmethod
|
|
485
425
|
def get_error_stats(self) -> Dict[str, Any]:
|
|
486
426
|
"""Get error statistics"""
|
|
487
|
-
pass
|
|
488
427
|
|
|
489
428
|
|
|
490
429
|
# Performance monitoring interface
|
|
@@ -494,24 +433,20 @@ class IPerformanceMonitor(ABC):
|
|
|
494
433
|
@abstractmethod
|
|
495
434
|
def start_timer(self, operation: str) -> str:
|
|
496
435
|
"""Start timing an operation"""
|
|
497
|
-
pass
|
|
498
436
|
|
|
499
437
|
@abstractmethod
|
|
500
438
|
def stop_timer(self, timer_id: str) -> float:
|
|
501
439
|
"""Stop timing and return duration"""
|
|
502
|
-
pass
|
|
503
440
|
|
|
504
441
|
@abstractmethod
|
|
505
442
|
def record_metric(
|
|
506
443
|
self, name: str, value: float, tags: Optional[Dict[str, str]] = None
|
|
507
444
|
) -> None:
|
|
508
445
|
"""Record a performance metric"""
|
|
509
|
-
pass
|
|
510
446
|
|
|
511
447
|
@abstractmethod
|
|
512
448
|
def get_metrics(self) -> Dict[str, Any]:
|
|
513
449
|
"""Get performance metrics"""
|
|
514
|
-
pass
|
|
515
450
|
|
|
516
451
|
|
|
517
452
|
# Event system interface
|
|
@@ -521,22 +456,18 @@ class IEventBus(ABC):
|
|
|
521
456
|
@abstractmethod
|
|
522
457
|
def publish(self, event_type: str, data: Any) -> None:
|
|
523
458
|
"""Publish an event"""
|
|
524
|
-
pass
|
|
525
459
|
|
|
526
460
|
@abstractmethod
|
|
527
461
|
def subscribe(self, event_type: str, handler: callable) -> str:
|
|
528
462
|
"""Subscribe to events"""
|
|
529
|
-
pass
|
|
530
463
|
|
|
531
464
|
@abstractmethod
|
|
532
465
|
def unsubscribe(self, subscription_id: str) -> None:
|
|
533
466
|
"""Unsubscribe from events"""
|
|
534
|
-
pass
|
|
535
467
|
|
|
536
468
|
@abstractmethod
|
|
537
469
|
async def publish_async(self, event_type: str, data: Any) -> None:
|
|
538
470
|
"""Publish an event asynchronously"""
|
|
539
|
-
pass
|
|
540
471
|
|
|
541
472
|
|
|
542
473
|
# Agent deployment interface
|
|
@@ -564,7 +495,6 @@ class AgentDeploymentInterface(ABC):
|
|
|
564
495
|
Returns:
|
|
565
496
|
Dictionary with deployment results and status
|
|
566
497
|
"""
|
|
567
|
-
pass
|
|
568
498
|
|
|
569
499
|
@abstractmethod
|
|
570
500
|
def validate_agent(self, agent_path: Path) -> Tuple[bool, List[str]]:
|
|
@@ -576,7 +506,6 @@ class AgentDeploymentInterface(ABC):
|
|
|
576
506
|
Returns:
|
|
577
507
|
Tuple of (is_valid, list_of_errors)
|
|
578
508
|
"""
|
|
579
|
-
pass
|
|
580
509
|
|
|
581
510
|
@abstractmethod
|
|
582
511
|
def clean_deployment(self, preserve_user_agents: bool = True) -> bool:
|
|
@@ -588,7 +517,6 @@ class AgentDeploymentInterface(ABC):
|
|
|
588
517
|
Returns:
|
|
589
518
|
True if cleanup successful
|
|
590
519
|
"""
|
|
591
|
-
pass
|
|
592
520
|
|
|
593
521
|
@abstractmethod
|
|
594
522
|
def get_deployment_status(self) -> Dict[str, Any]:
|
|
@@ -597,7 +525,6 @@ class AgentDeploymentInterface(ABC):
|
|
|
597
525
|
Returns:
|
|
598
526
|
Dictionary with deployment status information
|
|
599
527
|
"""
|
|
600
|
-
pass
|
|
601
528
|
|
|
602
529
|
|
|
603
530
|
# Memory service interface
|
|
@@ -622,7 +549,6 @@ class MemoryServiceInterface(ABC):
|
|
|
622
549
|
Returns:
|
|
623
550
|
Memory content as string or None if not found
|
|
624
551
|
"""
|
|
625
|
-
pass
|
|
626
552
|
|
|
627
553
|
@abstractmethod
|
|
628
554
|
def save_memory(self, agent_id: str, content: str) -> bool:
|
|
@@ -635,7 +561,6 @@ class MemoryServiceInterface(ABC):
|
|
|
635
561
|
Returns:
|
|
636
562
|
True if save successful
|
|
637
563
|
"""
|
|
638
|
-
pass
|
|
639
564
|
|
|
640
565
|
@abstractmethod
|
|
641
566
|
def validate_memory_size(self, content: str) -> Tuple[bool, Optional[str]]:
|
|
@@ -647,7 +572,6 @@ class MemoryServiceInterface(ABC):
|
|
|
647
572
|
Returns:
|
|
648
573
|
Tuple of (is_valid, error_message)
|
|
649
574
|
"""
|
|
650
|
-
pass
|
|
651
575
|
|
|
652
576
|
@abstractmethod
|
|
653
577
|
def optimize_memory(self, agent_id: str) -> bool:
|
|
@@ -659,7 +583,6 @@ class MemoryServiceInterface(ABC):
|
|
|
659
583
|
Returns:
|
|
660
584
|
True if optimization successful
|
|
661
585
|
"""
|
|
662
|
-
pass
|
|
663
586
|
|
|
664
587
|
@abstractmethod
|
|
665
588
|
def get_memory_metrics(self, agent_id: Optional[str] = None) -> Dict[str, Any]:
|
|
@@ -671,7 +594,6 @@ class MemoryServiceInterface(ABC):
|
|
|
671
594
|
Returns:
|
|
672
595
|
Dictionary with memory metrics
|
|
673
596
|
"""
|
|
674
|
-
pass
|
|
675
597
|
|
|
676
598
|
|
|
677
599
|
# Hook service interface
|
|
@@ -696,7 +618,6 @@ class HookServiceInterface(ABC):
|
|
|
696
618
|
Returns:
|
|
697
619
|
True if registration successful
|
|
698
620
|
"""
|
|
699
|
-
pass
|
|
700
621
|
|
|
701
622
|
@abstractmethod
|
|
702
623
|
def execute_pre_delegation_hooks(self, context: Any) -> Any:
|
|
@@ -708,7 +629,6 @@ class HookServiceInterface(ABC):
|
|
|
708
629
|
Returns:
|
|
709
630
|
Hook execution result
|
|
710
631
|
"""
|
|
711
|
-
pass
|
|
712
632
|
|
|
713
633
|
@abstractmethod
|
|
714
634
|
def execute_post_delegation_hooks(self, context: Any) -> Any:
|
|
@@ -720,7 +640,6 @@ class HookServiceInterface(ABC):
|
|
|
720
640
|
Returns:
|
|
721
641
|
Hook execution result
|
|
722
642
|
"""
|
|
723
|
-
pass
|
|
724
643
|
|
|
725
644
|
@abstractmethod
|
|
726
645
|
def get_registered_hooks(self) -> Dict[str, List[Any]]:
|
|
@@ -729,7 +648,6 @@ class HookServiceInterface(ABC):
|
|
|
729
648
|
Returns:
|
|
730
649
|
Dictionary mapping hook types to lists of hooks
|
|
731
650
|
"""
|
|
732
|
-
pass
|
|
733
651
|
|
|
734
652
|
@abstractmethod
|
|
735
653
|
def clear_hooks(self, hook_type: Optional[str] = None) -> None:
|
|
@@ -738,7 +656,6 @@ class HookServiceInterface(ABC):
|
|
|
738
656
|
Args:
|
|
739
657
|
hook_type: Optional specific hook type to clear, or None for all
|
|
740
658
|
"""
|
|
741
|
-
pass
|
|
742
659
|
|
|
743
660
|
|
|
744
661
|
# WebSocket/SocketIO service interface
|
|
@@ -761,12 +678,10 @@ class SocketIOServiceInterface(ABC):
|
|
|
761
678
|
host: Host to bind to
|
|
762
679
|
port: Port to listen on
|
|
763
680
|
"""
|
|
764
|
-
pass
|
|
765
681
|
|
|
766
682
|
@abstractmethod
|
|
767
683
|
async def stop(self) -> None:
|
|
768
684
|
"""Stop the WebSocket server."""
|
|
769
|
-
pass
|
|
770
685
|
|
|
771
686
|
@abstractmethod
|
|
772
687
|
async def emit(self, event: str, data: Any, room: Optional[str] = None) -> None:
|
|
@@ -777,7 +692,6 @@ class SocketIOServiceInterface(ABC):
|
|
|
777
692
|
data: Event data
|
|
778
693
|
room: Optional room to target
|
|
779
694
|
"""
|
|
780
|
-
pass
|
|
781
695
|
|
|
782
696
|
@abstractmethod
|
|
783
697
|
async def broadcast(self, event: str, data: Any) -> None:
|
|
@@ -787,7 +701,6 @@ class SocketIOServiceInterface(ABC):
|
|
|
787
701
|
event: Event name
|
|
788
702
|
data: Event data
|
|
789
703
|
"""
|
|
790
|
-
pass
|
|
791
704
|
|
|
792
705
|
@abstractmethod
|
|
793
706
|
def get_connection_count(self) -> int:
|
|
@@ -796,7 +709,6 @@ class SocketIOServiceInterface(ABC):
|
|
|
796
709
|
Returns:
|
|
797
710
|
Number of active connections
|
|
798
711
|
"""
|
|
799
|
-
pass
|
|
800
712
|
|
|
801
713
|
@abstractmethod
|
|
802
714
|
def is_running(self) -> bool:
|
|
@@ -805,7 +717,6 @@ class SocketIOServiceInterface(ABC):
|
|
|
805
717
|
Returns:
|
|
806
718
|
True if server is active
|
|
807
719
|
"""
|
|
808
|
-
pass
|
|
809
720
|
|
|
810
721
|
|
|
811
722
|
# Project analyzer interface
|
|
@@ -830,7 +741,6 @@ class ProjectAnalyzerInterface(ABC):
|
|
|
830
741
|
Returns:
|
|
831
742
|
ProjectCharacteristics or similar structured data
|
|
832
743
|
"""
|
|
833
|
-
pass
|
|
834
744
|
|
|
835
745
|
@abstractmethod
|
|
836
746
|
def detect_technology_stack(self) -> List[str]:
|
|
@@ -839,7 +749,6 @@ class ProjectAnalyzerInterface(ABC):
|
|
|
839
749
|
Returns:
|
|
840
750
|
List of detected technologies
|
|
841
751
|
"""
|
|
842
|
-
pass
|
|
843
752
|
|
|
844
753
|
@abstractmethod
|
|
845
754
|
def analyze_code_patterns(self) -> Dict[str, Any]:
|
|
@@ -848,7 +757,6 @@ class ProjectAnalyzerInterface(ABC):
|
|
|
848
757
|
Returns:
|
|
849
758
|
Dictionary of pattern analysis results
|
|
850
759
|
"""
|
|
851
|
-
pass
|
|
852
760
|
|
|
853
761
|
@abstractmethod
|
|
854
762
|
def get_project_structure(self) -> Dict[str, Any]:
|
|
@@ -857,7 +765,6 @@ class ProjectAnalyzerInterface(ABC):
|
|
|
857
765
|
Returns:
|
|
858
766
|
Dictionary representing project structure
|
|
859
767
|
"""
|
|
860
|
-
pass
|
|
861
768
|
|
|
862
769
|
@abstractmethod
|
|
863
770
|
def identify_entry_points(self) -> List[Path]:
|
|
@@ -866,7 +773,6 @@ class ProjectAnalyzerInterface(ABC):
|
|
|
866
773
|
Returns:
|
|
867
774
|
List of entry point paths
|
|
868
775
|
"""
|
|
869
|
-
pass
|
|
870
776
|
|
|
871
777
|
|
|
872
778
|
# Ticket manager interface
|
|
@@ -893,7 +799,6 @@ class TicketManagerInterface(ABC):
|
|
|
893
799
|
Returns:
|
|
894
800
|
Task ID if created successfully, None otherwise
|
|
895
801
|
"""
|
|
896
|
-
pass
|
|
897
802
|
|
|
898
803
|
@abstractmethod
|
|
899
804
|
def update_task(self, task_id: str, **updates) -> bool:
|
|
@@ -906,7 +811,6 @@ class TicketManagerInterface(ABC):
|
|
|
906
811
|
Returns:
|
|
907
812
|
True if update successful
|
|
908
813
|
"""
|
|
909
|
-
pass
|
|
910
814
|
|
|
911
815
|
@abstractmethod
|
|
912
816
|
def get_task(self, task_id: str) -> Optional[Dict[str, Any]]:
|
|
@@ -918,7 +822,6 @@ class TicketManagerInterface(ABC):
|
|
|
918
822
|
Returns:
|
|
919
823
|
Task data dictionary or None if not found
|
|
920
824
|
"""
|
|
921
|
-
pass
|
|
922
825
|
|
|
923
826
|
@abstractmethod
|
|
924
827
|
def list_tasks(
|
|
@@ -933,7 +836,6 @@ class TicketManagerInterface(ABC):
|
|
|
933
836
|
Returns:
|
|
934
837
|
List of task dictionaries
|
|
935
838
|
"""
|
|
936
|
-
pass
|
|
937
839
|
|
|
938
840
|
@abstractmethod
|
|
939
841
|
def close_task(self, task_id: str, resolution: Optional[str] = None) -> bool:
|
|
@@ -946,7 +848,6 @@ class TicketManagerInterface(ABC):
|
|
|
946
848
|
Returns:
|
|
947
849
|
True if close successful
|
|
948
850
|
"""
|
|
949
|
-
pass
|
|
950
851
|
|
|
951
852
|
|
|
952
853
|
# Interface registry for dependency injection discovery
|
claude_mpm/core/lazy.py
CHANGED
|
@@ -67,7 +67,7 @@ class LazyService(Generic[T]):
|
|
|
67
67
|
self,
|
|
68
68
|
service_class: Type[T],
|
|
69
69
|
init_args: tuple = (),
|
|
70
|
-
init_kwargs: dict = None,
|
|
70
|
+
init_kwargs: Optional[dict] = None,
|
|
71
71
|
name: Optional[str] = None,
|
|
72
72
|
eager: bool = False,
|
|
73
73
|
):
|
|
@@ -198,7 +198,7 @@ class LazyServiceRegistry:
|
|
|
198
198
|
name: str,
|
|
199
199
|
service_class: Type,
|
|
200
200
|
init_args: tuple = (),
|
|
201
|
-
init_kwargs: dict = None,
|
|
201
|
+
init_kwargs: Optional[dict] = None,
|
|
202
202
|
eager: bool = False,
|
|
203
203
|
) -> LazyService:
|
|
204
204
|
"""Register a lazy service.
|
|
@@ -285,7 +285,7 @@ def lazy_load(
|
|
|
285
285
|
service_class: Type,
|
|
286
286
|
name: Optional[str] = None,
|
|
287
287
|
init_args: tuple = (),
|
|
288
|
-
init_kwargs: dict = None,
|
|
288
|
+
init_kwargs: Optional[dict] = None,
|
|
289
289
|
) -> LazyService:
|
|
290
290
|
"""Convenience function to create and register a lazy service.
|
|
291
291
|
|
|
@@ -356,7 +356,7 @@ class lazy_property:
|
|
|
356
356
|
self.lock = threading.RLock()
|
|
357
357
|
functools.update_wrapper(self, func)
|
|
358
358
|
|
|
359
|
-
def __get__(self, obj: Any, objtype: Type = None) -> Any:
|
|
359
|
+
def __get__(self, obj: Any, objtype: Optional[Type] = None) -> Any:
|
|
360
360
|
if obj is None:
|
|
361
361
|
return self
|
|
362
362
|
|
|
@@ -388,7 +388,7 @@ class AsyncLazyService(Generic[T]):
|
|
|
388
388
|
self,
|
|
389
389
|
service_class: Type[T],
|
|
390
390
|
init_args: tuple = (),
|
|
391
|
-
init_kwargs: dict = None,
|
|
391
|
+
init_kwargs: Optional[dict] = None,
|
|
392
392
|
name: Optional[str] = None,
|
|
393
393
|
):
|
|
394
394
|
self._service_class = service_class
|