claude-mpm 3.7.4__py3-none-any.whl → 3.8.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- claude_mpm/VERSION +1 -1
- claude_mpm/agents/BASE_PM.md +0 -106
- claude_mpm/agents/INSTRUCTIONS.md +0 -78
- claude_mpm/agents/MEMORY.md +88 -0
- claude_mpm/agents/WORKFLOW.md +86 -0
- claude_mpm/agents/schema/agent_schema.json +1 -1
- claude_mpm/agents/templates/code_analyzer.json +26 -11
- claude_mpm/agents/templates/data_engineer.json +4 -7
- claude_mpm/agents/templates/documentation.json +2 -2
- claude_mpm/agents/templates/engineer.json +2 -2
- claude_mpm/agents/templates/ops.json +3 -8
- claude_mpm/agents/templates/qa.json +2 -3
- claude_mpm/agents/templates/research.json +2 -3
- claude_mpm/agents/templates/security.json +3 -6
- claude_mpm/agents/templates/ticketing.json +4 -9
- claude_mpm/agents/templates/version_control.json +3 -3
- claude_mpm/agents/templates/web_qa.json +4 -4
- claude_mpm/agents/templates/web_ui.json +4 -4
- claude_mpm/cli/__init__.py +2 -2
- claude_mpm/cli/commands/__init__.py +2 -1
- claude_mpm/cli/commands/agents.py +118 -1
- claude_mpm/cli/commands/tickets.py +596 -19
- claude_mpm/cli/parser.py +228 -5
- claude_mpm/config/__init__.py +30 -39
- claude_mpm/config/socketio_config.py +8 -5
- claude_mpm/constants.py +13 -0
- claude_mpm/core/__init__.py +8 -18
- claude_mpm/core/cache.py +596 -0
- claude_mpm/core/claude_runner.py +166 -622
- claude_mpm/core/config.py +5 -1
- claude_mpm/core/constants.py +339 -0
- claude_mpm/core/container.py +461 -22
- claude_mpm/core/exceptions.py +392 -0
- claude_mpm/core/framework_loader.py +208 -93
- claude_mpm/core/interactive_session.py +432 -0
- claude_mpm/core/interfaces.py +424 -0
- claude_mpm/core/lazy.py +467 -0
- claude_mpm/core/logging_config.py +444 -0
- claude_mpm/core/oneshot_session.py +465 -0
- claude_mpm/core/optimized_agent_loader.py +485 -0
- claude_mpm/core/optimized_startup.py +490 -0
- claude_mpm/core/service_registry.py +52 -26
- claude_mpm/core/socketio_pool.py +162 -5
- claude_mpm/core/types.py +292 -0
- claude_mpm/core/typing_utils.py +477 -0
- claude_mpm/dashboard/static/js/components/file-tool-tracker.js +46 -2
- claude_mpm/dashboard/templates/index.html +5 -5
- claude_mpm/hooks/claude_hooks/hook_handler.py +213 -99
- claude_mpm/init.py +2 -1
- claude_mpm/services/__init__.py +78 -14
- claude_mpm/services/agent/__init__.py +24 -0
- claude_mpm/services/agent/deployment.py +2548 -0
- claude_mpm/services/agent/management.py +598 -0
- claude_mpm/services/agent/registry.py +813 -0
- claude_mpm/services/agents/deployment/agent_deployment.py +592 -269
- claude_mpm/services/agents/deployment/async_agent_deployment.py +5 -1
- claude_mpm/services/agents/management/agent_capabilities_generator.py +21 -11
- claude_mpm/services/agents/memory/agent_memory_manager.py +156 -1
- claude_mpm/services/async_session_logger.py +8 -3
- claude_mpm/services/communication/__init__.py +21 -0
- claude_mpm/services/communication/socketio.py +1933 -0
- claude_mpm/services/communication/websocket.py +479 -0
- claude_mpm/services/core/__init__.py +123 -0
- claude_mpm/services/core/base.py +247 -0
- claude_mpm/services/core/interfaces.py +951 -0
- claude_mpm/services/framework_claude_md_generator/section_generators/todo_task_tools.py +23 -23
- claude_mpm/services/framework_claude_md_generator.py +3 -2
- claude_mpm/services/health_monitor.py +4 -3
- claude_mpm/services/hook_service.py +64 -4
- claude_mpm/services/infrastructure/__init__.py +21 -0
- claude_mpm/services/infrastructure/logging.py +202 -0
- claude_mpm/services/infrastructure/monitoring.py +893 -0
- claude_mpm/services/memory/indexed_memory.py +648 -0
- claude_mpm/services/project/__init__.py +21 -0
- claude_mpm/services/project/analyzer.py +864 -0
- claude_mpm/services/project/registry.py +608 -0
- claude_mpm/services/project_analyzer.py +95 -2
- claude_mpm/services/recovery_manager.py +15 -9
- claude_mpm/services/socketio/__init__.py +25 -0
- claude_mpm/services/socketio/handlers/__init__.py +25 -0
- claude_mpm/services/socketio/handlers/base.py +121 -0
- claude_mpm/services/socketio/handlers/connection.py +198 -0
- claude_mpm/services/socketio/handlers/file.py +213 -0
- claude_mpm/services/socketio/handlers/git.py +723 -0
- claude_mpm/services/socketio/handlers/memory.py +27 -0
- claude_mpm/services/socketio/handlers/project.py +25 -0
- claude_mpm/services/socketio/handlers/registry.py +145 -0
- claude_mpm/services/socketio_client_manager.py +12 -7
- claude_mpm/services/socketio_server.py +156 -30
- claude_mpm/services/ticket_manager.py +377 -51
- claude_mpm/utils/agent_dependency_loader.py +66 -15
- claude_mpm/utils/error_handler.py +1 -1
- claude_mpm/utils/robust_installer.py +587 -0
- claude_mpm/validation/agent_validator.py +27 -14
- claude_mpm/validation/frontmatter_validator.py +231 -0
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/METADATA +74 -41
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/RECORD +101 -76
- claude_mpm/.claude-mpm/logs/hooks_20250728.log +0 -10
- claude_mpm/agents/agent-template.yaml +0 -83
- claude_mpm/cli/README.md +0 -108
- claude_mpm/cli_module/refactoring_guide.md +0 -253
- claude_mpm/config/async_logging_config.yaml +0 -145
- claude_mpm/core/.claude-mpm/logs/hooks_20250730.log +0 -34
- claude_mpm/dashboard/.claude-mpm/memories/README.md +0 -36
- claude_mpm/dashboard/README.md +0 -121
- claude_mpm/dashboard/static/js/dashboard.js.backup +0 -1973
- claude_mpm/dashboard/templates/.claude-mpm/memories/README.md +0 -36
- claude_mpm/dashboard/templates/.claude-mpm/memories/engineer_agent.md +0 -39
- claude_mpm/dashboard/templates/.claude-mpm/memories/version_control_agent.md +0 -38
- claude_mpm/hooks/README.md +0 -96
- claude_mpm/schemas/agent_schema.json +0 -435
- claude_mpm/services/framework_claude_md_generator/README.md +0 -92
- claude_mpm/services/version_control/VERSION +0 -1
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/WHEEL +0 -0
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/entry_points.txt +0 -0
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-3.7.4.dist-info → claude_mpm-3.8.1.dist-info}/top_level.txt +0 -0
    
        claude_mpm/core/config.py
    CHANGED
    
    | @@ -14,6 +14,7 @@ import json | |
| 14 14 |  | 
| 15 15 | 
             
            from ..utils.config_manager import ConfigurationManager
         | 
| 16 16 | 
             
            from .config_paths import ConfigPaths
         | 
| 17 | 
            +
            from .exceptions import ConfigurationError
         | 
| 17 18 |  | 
| 18 19 | 
             
            logger = logging.getLogger(__name__)
         | 
| 19 20 |  | 
| @@ -440,7 +441,10 @@ class Config: | |
| 440 441 | 
             
                        elif format.lower() in ["yaml", "yml"]:
         | 
| 441 442 | 
             
                            self._config_mgr.save_yaml(self._config, file_path)
         | 
| 442 443 | 
             
                        else:
         | 
| 443 | 
            -
                            raise  | 
| 444 | 
            +
                            raise ConfigurationError(
         | 
| 445 | 
            +
                                f"Unsupported configuration format: {format}",
         | 
| 446 | 
            +
                                context={"format": format, "supported_formats": ["json", "yaml", "yml"]}
         | 
| 447 | 
            +
                            )
         | 
| 444 448 |  | 
| 445 449 | 
             
                        logger.info(f"Configuration saved to {file_path}")
         | 
| 446 450 |  | 
| @@ -0,0 +1,339 @@ | |
| 1 | 
            +
            """Centralized constants for Claude MPM.
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            This module consolidates all magic numbers and configuration constants
         | 
| 4 | 
            +
            that were previously scattered throughout the codebase.
         | 
| 5 | 
            +
            """
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            from enum import Enum
         | 
| 8 | 
            +
            from typing import Tuple
         | 
| 9 | 
            +
             | 
| 10 | 
            +
             | 
| 11 | 
            +
            # ==============================================================================
         | 
| 12 | 
            +
            # System Limits - Size and count limits
         | 
| 13 | 
            +
            # ==============================================================================
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            class SystemLimits:
         | 
| 16 | 
            +
                """System-wide size and count limits."""
         | 
| 17 | 
            +
                
         | 
| 18 | 
            +
                # Instruction and content limits
         | 
| 19 | 
            +
                MAX_INSTRUCTION_LENGTH = 8000  # Maximum characters in agent instructions
         | 
| 20 | 
            +
                MAX_AGENT_CONFIG_SIZE = 1024 * 1024  # 1MB limit for agent config files
         | 
| 21 | 
            +
                MAX_FILE_SIZE = 1024 * 1024  # 1MB default file read limit
         | 
| 22 | 
            +
                
         | 
| 23 | 
            +
                # Memory and entry limits
         | 
| 24 | 
            +
                MAX_MEMORY_ENTRIES = 1000  # Maximum memory entries per agent
         | 
| 25 | 
            +
                MAX_EVENT_HISTORY = 1000  # Maximum events to keep in history
         | 
| 26 | 
            +
                MAX_QUEUE_SIZE = 10000  # Maximum queue size for async operations
         | 
| 27 | 
            +
                
         | 
| 28 | 
            +
                # File and directory limits
         | 
| 29 | 
            +
                MAX_FILES_TO_VALIDATE = 100  # Maximum files to validate in batch (DoS prevention)
         | 
| 30 | 
            +
                MAX_LOG_FILES = 50  # Maximum log files to retain
         | 
| 31 | 
            +
                
         | 
| 32 | 
            +
                # Content generation limits
         | 
| 33 | 
            +
                MIN_CONTENT_LENGTH = 1000  # Minimum content length for validation
         | 
| 34 | 
            +
                MAX_TOKEN_LIMIT = 8192  # Default max tokens for agent responses
         | 
| 35 | 
            +
                
         | 
| 36 | 
            +
                # Chunk sizes
         | 
| 37 | 
            +
                CHUNK_SIZE = 1024  # Default chunk size for file operations
         | 
| 38 | 
            +
                
         | 
| 39 | 
            +
                # Line limits
         | 
| 40 | 
            +
                MAX_LINES = 2000  # Default maximum lines to read from files
         | 
| 41 | 
            +
             | 
| 42 | 
            +
             | 
| 43 | 
            +
            # ==============================================================================
         | 
| 44 | 
            +
            # Network Configuration - Ports, timeouts, connection settings
         | 
| 45 | 
            +
            # ==============================================================================
         | 
| 46 | 
            +
             | 
| 47 | 
            +
            class NetworkConfig:
         | 
| 48 | 
            +
                """Network-related configuration constants."""
         | 
| 49 | 
            +
                
         | 
| 50 | 
            +
                # Port ranges
         | 
| 51 | 
            +
                SOCKETIO_PORT_RANGE: Tuple[int, int] = (8080, 8099)
         | 
| 52 | 
            +
                DEFAULT_SOCKETIO_PORT = 8080
         | 
| 53 | 
            +
                DEFAULT_DASHBOARD_PORT = 8765
         | 
| 54 | 
            +
                
         | 
| 55 | 
            +
                # Connection timeouts (seconds)
         | 
| 56 | 
            +
                CONNECTION_TIMEOUT = 5.0
         | 
| 57 | 
            +
                SOCKET_WAIT_TIMEOUT = 1.0
         | 
| 58 | 
            +
                RECONNECTION_DELAY = 0.5
         | 
| 59 | 
            +
                RECONNECTION_DELAY_MAX = 5.0
         | 
| 60 | 
            +
                RECONNECTION_ATTEMPTS = 3
         | 
| 61 | 
            +
                
         | 
| 62 | 
            +
                # Ping/Pong settings
         | 
| 63 | 
            +
                PING_INTERVAL = 30  # seconds
         | 
| 64 | 
            +
                PING_TIMEOUT = 120  # seconds
         | 
| 65 | 
            +
                PING_INTERVAL_FAST = 10  # seconds (debug mode)
         | 
| 66 | 
            +
                PING_TIMEOUT_FAST = 30  # seconds (debug mode)
         | 
| 67 | 
            +
                PING_INTERVAL_STANDARD = 25  # seconds (standard mode)
         | 
| 68 | 
            +
                PING_TIMEOUT_STANDARD = 90  # seconds (standard mode)
         | 
| 69 | 
            +
                
         | 
| 70 | 
            +
                # HTTP status codes
         | 
| 71 | 
            +
                HTTP_OK = 200
         | 
| 72 | 
            +
                HTTP_INTERNAL_ERROR = 500
         | 
| 73 | 
            +
                
         | 
| 74 | 
            +
                # Batch processing
         | 
| 75 | 
            +
                BATCH_INTERVAL = 0.1  # seconds between batch processing
         | 
| 76 | 
            +
             | 
| 77 | 
            +
             | 
| 78 | 
            +
            # ==============================================================================
         | 
| 79 | 
            +
            # Timeout Configuration - All timeout values
         | 
| 80 | 
            +
            # ==============================================================================
         | 
| 81 | 
            +
             | 
| 82 | 
            +
            class TimeoutConfig:
         | 
| 83 | 
            +
                """Timeout configuration constants."""
         | 
| 84 | 
            +
                
         | 
| 85 | 
            +
                # Query and operation timeouts (seconds)
         | 
| 86 | 
            +
                QUERY_TIMEOUT = 600  # 10 minutes for long-running queries
         | 
| 87 | 
            +
                DEFAULT_TIMEOUT = 600  # Default timeout for operations
         | 
| 88 | 
            +
                DEPLOYMENT_TIMEOUT = 120  # Timeout for deployment operations
         | 
| 89 | 
            +
                SUBPROCESS_TIMEOUT = 120000  # 2 minutes in milliseconds
         | 
| 90 | 
            +
                SUBPROCESS_WAIT = 2  # Seconds to wait for subprocess cleanup
         | 
| 91 | 
            +
                
         | 
| 92 | 
            +
                # Quick timeouts (seconds)
         | 
| 93 | 
            +
                QUICK_TIMEOUT = 2.0  # Quick operations timeout
         | 
| 94 | 
            +
                HEALTH_CHECK_TIMEOUT = 1.0  # Health check timeout
         | 
| 95 | 
            +
                FILE_OPERATION_TIMEOUT = 5.0  # File operation timeout
         | 
| 96 | 
            +
                
         | 
| 97 | 
            +
                # Session and thread timeouts
         | 
| 98 | 
            +
                SESSION_TIMEOUT = 30  # Session initialization timeout
         | 
| 99 | 
            +
                THREAD_JOIN_TIMEOUT = 5  # Thread join timeout
         | 
| 100 | 
            +
                WORKER_TIMEOUT = 60  # Worker thread timeout
         | 
| 101 | 
            +
                
         | 
| 102 | 
            +
                # Async operation timeouts
         | 
| 103 | 
            +
                QUEUE_GET_TIMEOUT = 0.1  # Queue get operation timeout
         | 
| 104 | 
            +
                FLUSH_TIMEOUT = 5.0  # Flush operation timeout
         | 
| 105 | 
            +
                
         | 
| 106 | 
            +
                # Performance monitoring intervals
         | 
| 107 | 
            +
                CPU_SAMPLE_INTERVAL = 0.1  # CPU sampling interval
         | 
| 108 | 
            +
                HEARTBEAT_INTERVAL = 100  # Heartbeat log interval (iterations)
         | 
| 109 | 
            +
                
         | 
| 110 | 
            +
                # Resource tier timeouts (min, max)
         | 
| 111 | 
            +
                INTENSIVE_TIMEOUT_RANGE = (600, 3600)  # 10 min to 1 hour
         | 
| 112 | 
            +
                STANDARD_TIMEOUT_RANGE = (300, 1200)  # 5 min to 20 min
         | 
| 113 | 
            +
                LIGHTWEIGHT_TIMEOUT_RANGE = (30, 600)  # 30 sec to 10 min
         | 
| 114 | 
            +
             | 
| 115 | 
            +
             | 
| 116 | 
            +
            # ==============================================================================
         | 
| 117 | 
            +
            # Resource Limits - Memory, CPU, and resource constraints
         | 
| 118 | 
            +
            # ==============================================================================
         | 
| 119 | 
            +
             | 
| 120 | 
            +
            class ResourceLimits:
         | 
| 121 | 
            +
                """Resource limitation constants."""
         | 
| 122 | 
            +
                
         | 
| 123 | 
            +
                # Memory limits (MB) - (min, max) tuples
         | 
| 124 | 
            +
                INTENSIVE_MEMORY_RANGE = (4096, 8192)  # 4GB to 8GB
         | 
| 125 | 
            +
                STANDARD_MEMORY_RANGE = (2048, 4096)  # 2GB to 4GB
         | 
| 126 | 
            +
                LIGHTWEIGHT_MEMORY_RANGE = (512, 2048)  # 512MB to 2GB
         | 
| 127 | 
            +
                
         | 
| 128 | 
            +
                # CPU limits (%) - (min, max) tuples
         | 
| 129 | 
            +
                INTENSIVE_CPU_RANGE = (60, 100)  # 60% to 100%
         | 
| 130 | 
            +
                STANDARD_CPU_RANGE = (30, 60)  # 30% to 60%
         | 
| 131 | 
            +
                LIGHTWEIGHT_CPU_RANGE = (10, 30)  # 10% to 30%
         | 
| 132 | 
            +
                
         | 
| 133 | 
            +
                # Process limits
         | 
| 134 | 
            +
                MAX_PARALLEL_AGENTS = 10  # Maximum parallel subagents
         | 
| 135 | 
            +
                MAX_WORKERS = 4  # Maximum worker threads
         | 
| 136 | 
            +
                
         | 
| 137 | 
            +
                # Memory conversion
         | 
| 138 | 
            +
                BYTES_TO_MB = 1024 * 1024  # Conversion factor
         | 
| 139 | 
            +
             | 
| 140 | 
            +
             | 
| 141 | 
            +
            # ==============================================================================
         | 
| 142 | 
            +
            # Retry Configuration - Retry attempts and delays
         | 
| 143 | 
            +
            # ==============================================================================
         | 
| 144 | 
            +
             | 
| 145 | 
            +
            class RetryConfig:
         | 
| 146 | 
            +
                """Retry configuration constants."""
         | 
| 147 | 
            +
                
         | 
| 148 | 
            +
                # Retry attempts
         | 
| 149 | 
            +
                MAX_RETRIES = 3
         | 
| 150 | 
            +
                MAX_CONNECTION_RETRIES = 3
         | 
| 151 | 
            +
                MAX_INSTALL_RETRIES = 3
         | 
| 152 | 
            +
                
         | 
| 153 | 
            +
                # Retry delays (seconds)
         | 
| 154 | 
            +
                INITIAL_RETRY_DELAY = 0.1  # 100ms initial delay
         | 
| 155 | 
            +
                MAX_RETRY_DELAY = 5.0  # Maximum retry delay
         | 
| 156 | 
            +
                EXPONENTIAL_BASE = 2  # Base for exponential backoff
         | 
| 157 | 
            +
                
         | 
| 158 | 
            +
                # Circuit breaker
         | 
| 159 | 
            +
                FAILURE_THRESHOLD = 5  # Failures before circuit opens
         | 
| 160 | 
            +
                SUCCESS_THRESHOLD = 3  # Successes to close circuit
         | 
| 161 | 
            +
                CIRCUIT_TIMEOUT = 300  # 5 minutes circuit breaker timeout
         | 
| 162 | 
            +
                FAILURE_WINDOW = 300  # 5 minutes failure tracking window
         | 
| 163 | 
            +
                MIN_RECOVERY_INTERVAL = 60  # 1 minute minimum between recoveries
         | 
| 164 | 
            +
                CRITICAL_THRESHOLD = 1  # Critical failures threshold
         | 
| 165 | 
            +
             | 
| 166 | 
            +
             | 
| 167 | 
            +
            # ==============================================================================
         | 
| 168 | 
            +
            # Complexity Metrics - Code quality thresholds
         | 
| 169 | 
            +
            # ==============================================================================
         | 
| 170 | 
            +
             | 
| 171 | 
            +
            class ComplexityMetrics:
         | 
| 172 | 
            +
                """Code complexity and quality metrics."""
         | 
| 173 | 
            +
                
         | 
| 174 | 
            +
                # Complexity thresholds
         | 
| 175 | 
            +
                HIGH_COMPLEXITY = 10  # High cyclomatic complexity
         | 
| 176 | 
            +
                CRITICAL_COMPLEXITY = 20  # Critical cyclomatic complexity
         | 
| 177 | 
            +
                
         | 
| 178 | 
            +
                # Size thresholds
         | 
| 179 | 
            +
                LONG_FUNCTION_LINES = 50  # Function is getting long
         | 
| 180 | 
            +
                CRITICAL_FUNCTION_LINES = 100  # Function too long
         | 
| 181 | 
            +
                LARGE_CLASS_LINES = 300  # Class needs refactoring
         | 
| 182 | 
            +
                CRITICAL_CLASS_LINES = 500  # Class too large
         | 
| 183 | 
            +
                GOD_CLASS_LINES = 500  # God object threshold
         | 
| 184 | 
            +
                
         | 
| 185 | 
            +
                # Coupling thresholds
         | 
| 186 | 
            +
                HIGH_IMPORT_COUNT = 20  # High coupling
         | 
| 187 | 
            +
                CRITICAL_IMPORT_COUNT = 40  # Critical coupling/fan-out
         | 
| 188 | 
            +
                
         | 
| 189 | 
            +
                # Duplication thresholds
         | 
| 190 | 
            +
                DUPLICATION_WARNING = 5  # 5% duplication needs attention
         | 
| 191 | 
            +
                DUPLICATION_CRITICAL = 10  # 10% duplication is critical
         | 
| 192 | 
            +
                
         | 
| 193 | 
            +
                # Maintainability grades
         | 
| 194 | 
            +
                GRADE_A_THRESHOLD = 80
         | 
| 195 | 
            +
                GRADE_B_THRESHOLD = 60
         | 
| 196 | 
            +
                GRADE_C_THRESHOLD = 40
         | 
| 197 | 
            +
                GRADE_D_THRESHOLD = 20
         | 
| 198 | 
            +
             | 
| 199 | 
            +
             | 
| 200 | 
            +
            # ==============================================================================
         | 
| 201 | 
            +
            # Error Messages - Standardized error message templates
         | 
| 202 | 
            +
            # ==============================================================================
         | 
| 203 | 
            +
             | 
| 204 | 
            +
            class ErrorMessages:
         | 
| 205 | 
            +
                """Standardized error message templates."""
         | 
| 206 | 
            +
                
         | 
| 207 | 
            +
                # Validation errors
         | 
| 208 | 
            +
                INSTRUCTION_TOO_LONG = "Instructions exceed {limit} character limit: {actual} characters"
         | 
| 209 | 
            +
                CONFIG_TOO_LARGE = "Configuration file exceeds {limit} size limit: {actual} bytes"
         | 
| 210 | 
            +
                FILE_TOO_LARGE = "File exceeds maximum size of {limit} bytes"
         | 
| 211 | 
            +
                TOO_MANY_FILES = "Too many files to validate: {count} exceeds limit of {limit}"
         | 
| 212 | 
            +
                
         | 
| 213 | 
            +
                # Connection errors
         | 
| 214 | 
            +
                CONNECTION_FAILED = "Failed to connect to {service} on port {port}"
         | 
| 215 | 
            +
                CONNECTION_TIMEOUT = "Connection to {service} timed out after {timeout} seconds"
         | 
| 216 | 
            +
                PORT_IN_USE = "Port {port} is already in use"
         | 
| 217 | 
            +
                PORT_NOT_IN_RANGE = "Port {port} is outside allowed range {range}"
         | 
| 218 | 
            +
                
         | 
| 219 | 
            +
                # Resource errors
         | 
| 220 | 
            +
                MEMORY_EXCEEDED = "Memory usage {usage}MB exceeds limit of {limit}MB"
         | 
| 221 | 
            +
                CPU_EXCEEDED = "CPU usage {usage}% exceeds limit of {limit}%"
         | 
| 222 | 
            +
                QUEUE_FULL = "Queue is full: {size} items exceeds limit of {limit}"
         | 
| 223 | 
            +
                
         | 
| 224 | 
            +
                # Timeout errors
         | 
| 225 | 
            +
                OPERATION_TIMEOUT = "Operation timed out after {timeout} seconds"
         | 
| 226 | 
            +
                SUBPROCESS_TIMEOUT = "Subprocess timed out after {timeout} milliseconds"
         | 
| 227 | 
            +
                
         | 
| 228 | 
            +
                # Retry errors
         | 
| 229 | 
            +
                MAX_RETRIES_EXCEEDED = "Maximum retries ({max_retries}) exceeded for {operation}"
         | 
| 230 | 
            +
                CIRCUIT_OPEN = "Circuit breaker is open for {service}"
         | 
| 231 | 
            +
             | 
| 232 | 
            +
             | 
| 233 | 
            +
            # ==============================================================================
         | 
| 234 | 
            +
            # Default Values - Default configuration values
         | 
| 235 | 
            +
            # ==============================================================================
         | 
| 236 | 
            +
             | 
| 237 | 
            +
            class Defaults:
         | 
| 238 | 
            +
                """Default configuration values."""
         | 
| 239 | 
            +
                
         | 
| 240 | 
            +
                # Agent defaults
         | 
| 241 | 
            +
                DEFAULT_AUTHOR = "claude-mpm"
         | 
| 242 | 
            +
                DEFAULT_VERSION = "1.0.0"
         | 
| 243 | 
            +
                DEFAULT_PRIORITY = "medium"
         | 
| 244 | 
            +
                DEFAULT_TEMPERATURE = 0.5
         | 
| 245 | 
            +
                
         | 
| 246 | 
            +
                # Logging defaults
         | 
| 247 | 
            +
                DEFAULT_LOG_LEVEL = "INFO"
         | 
| 248 | 
            +
                DEFAULT_LOG_FORMAT = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
         | 
| 249 | 
            +
                
         | 
| 250 | 
            +
                # Session defaults
         | 
| 251 | 
            +
                DEFAULT_SESSION_PREFIX = "session"
         | 
| 252 | 
            +
                DEFAULT_WORKSPACE = ".claude-mpm"
         | 
| 253 | 
            +
                
         | 
| 254 | 
            +
                # Dashboard defaults
         | 
| 255 | 
            +
                DEFAULT_DASHBOARD_HOST = "localhost"
         | 
| 256 | 
            +
                DEFAULT_DASHBOARD_TITLE = "Claude MPM Dashboard"
         | 
| 257 | 
            +
                
         | 
| 258 | 
            +
                # Time formats
         | 
| 259 | 
            +
                TIMESTAMP_FORMAT = "%Y%m%d_%H%M%S"
         | 
| 260 | 
            +
                LOG_TIMESTAMP_FORMAT = "%Y-%m-%d %H:%M:%S"
         | 
| 261 | 
            +
             | 
| 262 | 
            +
             | 
| 263 | 
            +
            # ==============================================================================
         | 
| 264 | 
            +
            # Performance Configuration - Performance-related settings
         | 
| 265 | 
            +
            # ==============================================================================
         | 
| 266 | 
            +
             | 
| 267 | 
            +
            class PerformanceConfig:
         | 
| 268 | 
            +
                """Performance optimization settings."""
         | 
| 269 | 
            +
                
         | 
| 270 | 
            +
                # Scoring weights for server selection
         | 
| 271 | 
            +
                VERSION_SCORE_MAJOR = 1000
         | 
| 272 | 
            +
                VERSION_SCORE_MINOR = 100
         | 
| 273 | 
            +
                VERSION_SCORE_PATCH = 1
         | 
| 274 | 
            +
                
         | 
| 275 | 
            +
                # Time conversion
         | 
| 276 | 
            +
                SECONDS_TO_MS = 1000
         | 
| 277 | 
            +
                MS_TO_SECONDS = 0.001
         | 
| 278 | 
            +
                
         | 
| 279 | 
            +
                # Logging frequencies
         | 
| 280 | 
            +
                LOG_EVERY_N_ITERATIONS = 100  # Log every N iterations
         | 
| 281 | 
            +
                LOG_EVERY_N_SECONDS = 10  # Log every N seconds
         | 
| 282 | 
            +
                
         | 
| 283 | 
            +
                # Batch sizes
         | 
| 284 | 
            +
                DEFAULT_BATCH_SIZE = 100
         | 
| 285 | 
            +
                MAX_BATCH_SIZE = 1000
         | 
| 286 | 
            +
                
         | 
| 287 | 
            +
                # Cache settings
         | 
| 288 | 
            +
                CACHE_CLEANUP_INTERVAL = 60  # seconds
         | 
| 289 | 
            +
                CACHE_TTL = 3600  # 1 hour default TTL
         | 
| 290 | 
            +
                
         | 
| 291 | 
            +
                # Memory thresholds
         | 
| 292 | 
            +
                LOW_MEMORY_THRESHOLD = 100  # MB
         | 
| 293 | 
            +
                CRITICAL_MEMORY_THRESHOLD = 50  # MB
         | 
| 294 | 
            +
             | 
| 295 | 
            +
             | 
| 296 | 
            +
            # ==============================================================================
         | 
| 297 | 
            +
            # Validation Rules - Validation thresholds and rules
         | 
| 298 | 
            +
            # ==============================================================================
         | 
| 299 | 
            +
             | 
| 300 | 
            +
            class ValidationRules:
         | 
| 301 | 
            +
                """Validation rules and thresholds."""
         | 
| 302 | 
            +
                
         | 
| 303 | 
            +
                # Name validation
         | 
| 304 | 
            +
                MIN_NAME_LENGTH = 3
         | 
| 305 | 
            +
                MAX_NAME_LENGTH = 50
         | 
| 306 | 
            +
                
         | 
| 307 | 
            +
                # Version validation
         | 
| 308 | 
            +
                MIN_VERSION_PARTS = 3  # major.minor.patch
         | 
| 309 | 
            +
                
         | 
| 310 | 
            +
                # Description validation
         | 
| 311 | 
            +
                MIN_DESCRIPTION_LENGTH = 10
         | 
| 312 | 
            +
                MAX_DESCRIPTION_LENGTH = 500
         | 
| 313 | 
            +
                
         | 
| 314 | 
            +
                # Tag validation
         | 
| 315 | 
            +
                MAX_TAGS = 10
         | 
| 316 | 
            +
                MAX_TAG_LENGTH = 30
         | 
| 317 | 
            +
                
         | 
| 318 | 
            +
                # Tool validation
         | 
| 319 | 
            +
                MAX_TOOLS = 20
         | 
| 320 | 
            +
                
         | 
| 321 | 
            +
                # Priority levels
         | 
| 322 | 
            +
                VALID_PRIORITIES = ["low", "medium", "high", "critical"]
         | 
| 323 | 
            +
                
         | 
| 324 | 
            +
                # Resource tiers
         | 
| 325 | 
            +
                VALID_RESOURCE_TIERS = ["intensive", "standard", "lightweight"]
         | 
| 326 | 
            +
             | 
| 327 | 
            +
             | 
| 328 | 
            +
            # ==============================================================================
         | 
| 329 | 
            +
            # Backwards Compatibility Exports
         | 
| 330 | 
            +
            # ==============================================================================
         | 
| 331 | 
            +
             | 
| 332 | 
            +
            # Export commonly used constants at module level for backwards compatibility
         | 
| 333 | 
            +
            MAX_INSTRUCTION_LENGTH = SystemLimits.MAX_INSTRUCTION_LENGTH
         | 
| 334 | 
            +
            MAX_AGENT_CONFIG_SIZE = SystemLimits.MAX_AGENT_CONFIG_SIZE
         | 
| 335 | 
            +
            MAX_FILE_SIZE = SystemLimits.MAX_FILE_SIZE
         | 
| 336 | 
            +
            SOCKETIO_PORT_RANGE = NetworkConfig.SOCKETIO_PORT_RANGE
         | 
| 337 | 
            +
            QUERY_TIMEOUT = TimeoutConfig.QUERY_TIMEOUT
         | 
| 338 | 
            +
            MAX_RETRIES = RetryConfig.MAX_RETRIES
         | 
| 339 | 
            +
            DEFAULT_TIMEOUT = TimeoutConfig.DEFAULT_TIMEOUT
         |