claude-mpm 4.3.19__py3-none-any.whl → 4.3.22__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/agent_loader.py +2 -2
- claude_mpm/agents/agent_loader_integration.py +2 -2
- claude_mpm/agents/async_agent_loader.py +2 -2
- claude_mpm/agents/base_agent_loader.py +2 -2
- claude_mpm/agents/frontmatter_validator.py +2 -2
- claude_mpm/agents/system_agent_config.py +2 -2
- claude_mpm/agents/templates/clerk-ops.json +6 -4
- claude_mpm/agents/templates/data_engineer.json +1 -2
- claude_mpm/cli/commands/doctor.py +2 -2
- claude_mpm/cli/commands/mpm_init.py +560 -47
- claude_mpm/cli/commands/mpm_init_handler.py +6 -0
- claude_mpm/cli/parsers/mpm_init_parser.py +39 -1
- claude_mpm/cli/startup_logging.py +11 -9
- claude_mpm/commands/mpm-init.md +76 -12
- claude_mpm/config/agent_config.py +2 -2
- claude_mpm/config/paths.py +2 -2
- claude_mpm/core/agent_name_normalizer.py +2 -2
- claude_mpm/core/config.py +2 -1
- claude_mpm/core/config_aliases.py +2 -2
- claude_mpm/core/file_utils.py +1 -0
- claude_mpm/core/log_manager.py +2 -2
- claude_mpm/core/tool_access_control.py +2 -2
- claude_mpm/core/unified_agent_registry.py +2 -2
- claude_mpm/core/unified_paths.py +2 -2
- claude_mpm/experimental/cli_enhancements.py +3 -2
- claude_mpm/hooks/base_hook.py +2 -2
- claude_mpm/hooks/instruction_reinforcement.py +2 -2
- claude_mpm/hooks/validation_hooks.py +2 -2
- claude_mpm/scripts/mpm_doctor.py +2 -2
- claude_mpm/services/agents/loading/agent_profile_loader.py +2 -2
- claude_mpm/services/agents/loading/base_agent_manager.py +2 -2
- claude_mpm/services/agents/loading/framework_agent_loader.py +2 -2
- claude_mpm/services/agents/management/agent_capabilities_generator.py +2 -2
- claude_mpm/services/agents/management/agent_management_service.py +2 -2
- claude_mpm/services/agents/memory/memory_categorization_service.py +5 -2
- claude_mpm/services/agents/memory/memory_file_service.py +27 -6
- claude_mpm/services/agents/memory/memory_format_service.py +5 -2
- claude_mpm/services/agents/memory/memory_limits_service.py +3 -2
- claude_mpm/services/agents/registry/deployed_agent_discovery.py +2 -2
- claude_mpm/services/agents/registry/modification_tracker.py +4 -4
- claude_mpm/services/async_session_logger.py +2 -1
- claude_mpm/services/claude_session_logger.py +2 -2
- claude_mpm/services/core/path_resolver.py +3 -2
- claude_mpm/services/diagnostics/diagnostic_runner.py +4 -3
- claude_mpm/services/event_bus/direct_relay.py +2 -1
- claude_mpm/services/event_bus/event_bus.py +2 -1
- claude_mpm/services/event_bus/relay.py +2 -2
- claude_mpm/services/framework_claude_md_generator/content_assembler.py +2 -2
- claude_mpm/services/infrastructure/daemon_manager.py +2 -2
- claude_mpm/services/memory/cache/simple_cache.py +2 -2
- claude_mpm/services/project/archive_manager.py +981 -0
- claude_mpm/services/project/documentation_manager.py +536 -0
- claude_mpm/services/project/enhanced_analyzer.py +491 -0
- claude_mpm/services/project/project_organizer.py +904 -0
- claude_mpm/services/response_tracker.py +2 -2
- claude_mpm/services/socketio/handlers/connection.py +14 -33
- claude_mpm/services/socketio/server/eventbus_integration.py +2 -2
- claude_mpm/services/version_control/version_parser.py +5 -4
- claude_mpm/storage/state_storage.py +2 -2
- claude_mpm/utils/agent_dependency_loader.py +49 -0
- claude_mpm/utils/common.py +542 -0
- claude_mpm/utils/database_connector.py +298 -0
- claude_mpm/utils/error_handler.py +2 -1
- claude_mpm/utils/log_cleanup.py +2 -2
- claude_mpm/utils/path_operations.py +2 -2
- claude_mpm/utils/robust_installer.py +56 -0
- claude_mpm/utils/session_logging.py +2 -2
- claude_mpm/utils/subprocess_utils.py +2 -2
- claude_mpm/validation/agent_validator.py +2 -2
- {claude_mpm-4.3.19.dist-info → claude_mpm-4.3.22.dist-info}/METADATA +1 -1
- {claude_mpm-4.3.19.dist-info → claude_mpm-4.3.22.dist-info}/RECORD +76 -70
- {claude_mpm-4.3.19.dist-info → claude_mpm-4.3.22.dist-info}/WHEEL +0 -0
- {claude_mpm-4.3.19.dist-info → claude_mpm-4.3.22.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.3.19.dist-info → claude_mpm-4.3.22.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.3.19.dist-info → claude_mpm-4.3.22.dist-info}/top_level.txt +0 -0
@@ -1,9 +1,12 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
"""Memory File Service - Handles file operations for agent memories."""
|
3
3
|
|
4
|
-
import logging
|
5
4
|
from pathlib import Path
|
6
5
|
|
6
|
+
from claude_mpm.core.logging_utils import get_logger
|
7
|
+
|
8
|
+
logger = get_logger(__name__)
|
9
|
+
|
7
10
|
|
8
11
|
class MemoryFileService:
|
9
12
|
"""Service for handling memory file operations."""
|
@@ -15,24 +18,42 @@ class MemoryFileService:
|
|
15
18
|
memories_dir: Directory where memory files are stored
|
16
19
|
"""
|
17
20
|
self.memories_dir = memories_dir
|
18
|
-
self.logger = logging.getLogger(__name__)
|
19
21
|
|
20
22
|
def get_memory_file_with_migration(self, directory: Path, agent_id: str) -> Path:
|
21
23
|
"""Get memory file path with migration support.
|
22
24
|
|
23
25
|
Migrates from old naming convention if needed.
|
26
|
+
Also handles hyphen to underscore conversion for agent IDs.
|
24
27
|
|
25
28
|
Args:
|
26
29
|
directory: Directory to check for memory file
|
27
|
-
agent_id: Agent identifier
|
30
|
+
agent_id: Agent identifier (may contain hyphens or underscores)
|
28
31
|
|
29
32
|
Returns:
|
30
33
|
Path to the memory file
|
31
34
|
"""
|
32
|
-
|
33
|
-
|
35
|
+
# Normalize agent_id to use underscores (matching deployed agent names)
|
36
|
+
normalized_id = agent_id.replace("-", "_")
|
37
|
+
|
38
|
+
# Define possible file paths
|
39
|
+
new_file = directory / f"{normalized_id}_memories.md"
|
40
|
+
old_file = directory / f"{normalized_id}_memory.md"
|
41
|
+
|
42
|
+
# Also check for legacy hyphenated versions
|
43
|
+
hyphenated_file = directory / f"{agent_id}_memories.md" if "-" in agent_id else None
|
44
|
+
|
45
|
+
# Migration priority:
|
46
|
+
# 1. If hyphenated version exists and normalized doesn't, migrate it
|
47
|
+
if hyphenated_file and hyphenated_file.exists() and not new_file.exists():
|
48
|
+
try:
|
49
|
+
hyphenated_file.rename(new_file)
|
50
|
+
self.logger.info(f"Migrated hyphenated memory file: {hyphenated_file} -> {new_file}")
|
51
|
+
except Exception as e:
|
52
|
+
self.logger.warning(f"Could not migrate hyphenated memory file: {e}")
|
53
|
+
# Fall back to using the hyphenated version
|
54
|
+
return hyphenated_file
|
34
55
|
|
35
|
-
# Migrate from old naming convention
|
56
|
+
# 2. Migrate from old naming convention (_memory.md to _memories.md)
|
36
57
|
if old_file.exists() and not new_file.exists():
|
37
58
|
try:
|
38
59
|
old_file.rename(new_file)
|
@@ -1,18 +1,21 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
"""Memory Format Service - Handles memory content formatting and parsing."""
|
3
3
|
|
4
|
-
import logging
|
5
4
|
import re
|
6
5
|
from datetime import datetime, timezone
|
7
6
|
from typing import Dict, List
|
8
7
|
|
8
|
+
from claude_mpm.core.logging_utils import get_logger
|
9
|
+
|
10
|
+
logger = get_logger(__name__)
|
11
|
+
|
9
12
|
|
10
13
|
class MemoryFormatService:
|
11
14
|
"""Service for memory content formatting and parsing."""
|
12
15
|
|
13
16
|
def __init__(self):
|
14
17
|
"""Initialize the memory format service."""
|
15
|
-
|
18
|
+
pass
|
16
19
|
|
17
20
|
def build_simple_memory_content(self, agent_id: str, items: List[str]) -> str:
|
18
21
|
"""Build memory content as a simple list with header and timestamp.
|
@@ -1,10 +1,12 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
"""Memory Limits Service - Manages memory size limits and configuration."""
|
3
3
|
|
4
|
-
import logging
|
5
4
|
from typing import Any, Dict, Optional
|
6
5
|
|
7
6
|
from claude_mpm.core.config import Config
|
7
|
+
from claude_mpm.core.logging_utils import get_logger
|
8
|
+
|
9
|
+
logger = get_logger(__name__)
|
8
10
|
|
9
11
|
|
10
12
|
class MemoryLimitsService:
|
@@ -24,7 +26,6 @@ class MemoryLimitsService:
|
|
24
26
|
config: Optional Config object for reading configuration
|
25
27
|
"""
|
26
28
|
self.config = config or Config()
|
27
|
-
self.logger = logging.getLogger(__name__)
|
28
29
|
self.memory_limits = self._init_memory_limits()
|
29
30
|
|
30
31
|
def _init_memory_limits(self) -> Dict[str, Any]:
|
@@ -5,7 +5,6 @@ handling both new standardized schema and legacy agent formats.
|
|
5
5
|
"""
|
6
6
|
|
7
7
|
import json
|
8
|
-
import logging
|
9
8
|
from pathlib import Path
|
10
9
|
from typing import Any, Dict, List, Optional
|
11
10
|
|
@@ -13,7 +12,8 @@ from claude_mpm.core.agent_registry import AgentRegistryAdapter
|
|
13
12
|
from claude_mpm.core.unified_paths import get_path_manager
|
14
13
|
from claude_mpm.services.shared import ConfigServiceBase
|
15
14
|
|
16
|
-
|
15
|
+
from claude_mpm.core.logging_utils import get_logger
|
16
|
+
logger = get_logger(__name__)
|
17
17
|
|
18
18
|
|
19
19
|
class DeployedAgentDiscovery(ConfigServiceBase):
|
@@ -1,5 +1,3 @@
|
|
1
|
-
from pathlib import Path
|
2
|
-
|
3
1
|
#!/usr/bin/env python3
|
4
2
|
"""
|
5
3
|
Agent Modification Tracker - Consolidated Service
|
@@ -25,23 +23,26 @@ combining all functionality into a single module for better maintainability.
|
|
25
23
|
import asyncio
|
26
24
|
import hashlib
|
27
25
|
import json
|
28
|
-
import logging
|
29
26
|
import shutil
|
30
27
|
import time
|
31
28
|
import uuid
|
32
29
|
from dataclasses import asdict, dataclass, field
|
33
30
|
from datetime import datetime, timezone
|
34
31
|
from enum import Enum
|
32
|
+
from pathlib import Path
|
35
33
|
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
|
36
34
|
|
37
35
|
from watchdog.events import FileSystemEvent, FileSystemEventHandler
|
38
36
|
from watchdog.observers import Observer
|
39
37
|
|
40
38
|
from claude_mpm.core.base_service import BaseService
|
39
|
+
from claude_mpm.core.logging_utils import get_logger
|
41
40
|
from claude_mpm.core.unified_agent_registry import UnifiedAgentRegistry as AgentRegistry
|
42
41
|
from claude_mpm.core.unified_paths import get_path_manager
|
43
42
|
from claude_mpm.services.memory.cache.shared_prompt_cache import SharedPromptCache
|
44
43
|
|
44
|
+
logger = get_logger(__name__)
|
45
|
+
|
45
46
|
# ============================================================================
|
46
47
|
# Data Models
|
47
48
|
# ============================================================================
|
@@ -154,7 +155,6 @@ class AgentFileSystemHandler(FileSystemEventHandler):
|
|
154
155
|
|
155
156
|
def __init__(self, tracker: "AgentModificationTracker"):
|
156
157
|
self.tracker = tracker
|
157
|
-
self.logger = logging.getLogger(__name__)
|
158
158
|
|
159
159
|
def on_created(self, event: FileSystemEvent) -> None:
|
160
160
|
"""Handle file creation events."""
|
@@ -33,7 +33,8 @@ from claude_mpm.core.constants import PerformanceConfig, SystemLimits, TimeoutCo
|
|
33
33
|
# Import configuration manager
|
34
34
|
from ..core.config import Config
|
35
35
|
|
36
|
-
|
36
|
+
from claude_mpm.core.logging_utils import get_logger
|
37
|
+
logger = get_logger(__name__)
|
37
38
|
|
38
39
|
|
39
40
|
class LogFormat(Enum):
|
@@ -11,7 +11,6 @@ Configuration via .claude-mpm/configuration.yaml.
|
|
11
11
|
"""
|
12
12
|
|
13
13
|
import json
|
14
|
-
import logging
|
15
14
|
import os
|
16
15
|
from datetime import datetime, timezone
|
17
16
|
from typing import Any, Dict, Optional
|
@@ -31,7 +30,8 @@ try:
|
|
31
30
|
except ImportError:
|
32
31
|
ASYNC_AVAILABLE = False
|
33
32
|
|
34
|
-
|
33
|
+
from claude_mpm.core.logging_utils import get_logger
|
34
|
+
logger = get_logger(__name__)
|
35
35
|
|
36
36
|
|
37
37
|
class ClaudeSessionLogger:
|
@@ -13,14 +13,16 @@ that was previously embedded in FrameworkLoader. It manages:
|
|
13
13
|
The service consolidates path management logic while maintaining backward compatibility.
|
14
14
|
"""
|
15
15
|
|
16
|
-
import logging
|
17
16
|
import subprocess
|
18
17
|
from enum import Enum
|
19
18
|
from pathlib import Path
|
20
19
|
from typing import Dict, Optional, Tuple
|
21
20
|
|
21
|
+
from claude_mpm.core.logging_utils import get_logger
|
22
22
|
from .service_interfaces import ICacheManager, IPathResolver
|
23
23
|
|
24
|
+
logger = get_logger(__name__)
|
25
|
+
|
24
26
|
|
25
27
|
class DeploymentContext(Enum):
|
26
28
|
"""Deployment context enumeration."""
|
@@ -48,7 +50,6 @@ class PathResolver(IPathResolver):
|
|
48
50
|
Args:
|
49
51
|
cache_manager: Optional cache manager for caching resolved paths
|
50
52
|
"""
|
51
|
-
self.logger = logging.getLogger(__name__)
|
52
53
|
self.cache_manager = cache_manager
|
53
54
|
self._framework_path: Optional[Path] = None
|
54
55
|
self._deployment_context: Optional[DeploymentContext] = None
|
@@ -6,10 +6,11 @@ and aggregate results for reporting.
|
|
6
6
|
"""
|
7
7
|
|
8
8
|
import asyncio
|
9
|
-
import logging
|
10
9
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
11
10
|
from typing import List, Type
|
12
11
|
|
12
|
+
from claude_mpm.core.logging_utils import get_logger
|
13
|
+
|
13
14
|
from .checks import (
|
14
15
|
AgentCheck,
|
15
16
|
BaseDiagnosticCheck,
|
@@ -25,6 +26,8 @@ from .checks import (
|
|
25
26
|
)
|
26
27
|
from .models import DiagnosticResult, DiagnosticStatus, DiagnosticSummary
|
27
28
|
|
29
|
+
logger = get_logger(__name__)
|
30
|
+
|
28
31
|
|
29
32
|
class DiagnosticRunner:
|
30
33
|
"""Orchestrate diagnostic checks and aggregate results.
|
@@ -42,8 +45,6 @@ class DiagnosticRunner:
|
|
42
45
|
"""
|
43
46
|
self.verbose = verbose
|
44
47
|
self.fix = fix
|
45
|
-
self.logger = logging.getLogger(__name__)
|
46
|
-
|
47
48
|
# Define check order (dependencies first)
|
48
49
|
self.check_classes: List[Type[BaseDiagnosticCheck]] = [
|
49
50
|
InstallationCheck,
|
@@ -17,7 +17,8 @@ from typing import Any, Callable, Dict, List, Optional, Set
|
|
17
17
|
from pyee.asyncio import AsyncIOEventEmitter
|
18
18
|
|
19
19
|
# Configure logger
|
20
|
-
|
20
|
+
from claude_mpm.core.logging_utils import get_logger
|
21
|
+
logger = get_logger(__name__)
|
21
22
|
|
22
23
|
|
23
24
|
class EventBus:
|
@@ -8,7 +8,6 @@ WHY separate relay component:
|
|
8
8
|
- Supports batching and retry logic in one place
|
9
9
|
"""
|
10
10
|
|
11
|
-
import logging
|
12
11
|
import os
|
13
12
|
import time
|
14
13
|
from datetime import datetime, timezone
|
@@ -28,7 +27,8 @@ import contextlib
|
|
28
27
|
from .event_bus import EventBus
|
29
28
|
|
30
29
|
# Configure logger
|
31
|
-
|
30
|
+
from claude_mpm.core.logging_utils import get_logger
|
31
|
+
logger = get_logger(__name__)
|
32
32
|
|
33
33
|
|
34
34
|
class SocketIORelay:
|
@@ -5,7 +5,6 @@ Assembles sections and applies template variable substitution.
|
|
5
5
|
"""
|
6
6
|
|
7
7
|
import hashlib
|
8
|
-
import logging
|
9
8
|
from collections import OrderedDict
|
10
9
|
from datetime import datetime, timezone
|
11
10
|
from typing import Any, Dict, Optional
|
@@ -13,7 +12,8 @@ from typing import Any, Dict, Optional
|
|
13
12
|
from claude_mpm.services.agents.management import AgentCapabilitiesGenerator
|
14
13
|
from claude_mpm.services.agents.registry import DeployedAgentDiscovery
|
15
14
|
|
16
|
-
|
15
|
+
from claude_mpm.core.logging_utils import get_logger
|
16
|
+
logger = get_logger(__name__)
|
17
17
|
|
18
18
|
|
19
19
|
class ContentAssembler:
|
@@ -16,7 +16,6 @@ This service handles:
|
|
16
16
|
- Status monitoring and health checks
|
17
17
|
"""
|
18
18
|
|
19
|
-
import logging
|
20
19
|
import os
|
21
20
|
import signal
|
22
21
|
import subprocess
|
@@ -34,7 +33,8 @@ except ImportError:
|
|
34
33
|
# from claude_mpm.core.base_service import BaseService
|
35
34
|
from claude_mpm.services.socketio.server.main import SocketIOServer
|
36
35
|
|
37
|
-
|
36
|
+
from claude_mpm.core.logging_utils import get_logger
|
37
|
+
logger = get_logger(__name__)
|
38
38
|
|
39
39
|
|
40
40
|
class SocketIODaemonManager:
|
@@ -15,7 +15,6 @@ Features:
|
|
15
15
|
"""
|
16
16
|
|
17
17
|
import fnmatch
|
18
|
-
import logging
|
19
18
|
import threading
|
20
19
|
import time
|
21
20
|
from dataclasses import dataclass, field
|
@@ -24,7 +23,8 @@ from typing import Any, Dict, List, Optional, Set
|
|
24
23
|
|
25
24
|
from claude_mpm.core.interfaces import ICacheService
|
26
25
|
|
27
|
-
|
26
|
+
from claude_mpm.core.logging_utils import get_logger
|
27
|
+
logger = get_logger(__name__)
|
28
28
|
|
29
29
|
|
30
30
|
@dataclass
|