claude-mpm 5.6.37__py3-none-any.whl → 5.6.38__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/cli/startup.py +51 -8
- {claude_mpm-5.6.37.dist-info → claude_mpm-5.6.38.dist-info}/METADATA +1 -1
- {claude_mpm-5.6.37.dist-info → claude_mpm-5.6.38.dist-info}/RECORD +9 -9
- {claude_mpm-5.6.37.dist-info → claude_mpm-5.6.38.dist-info}/WHEEL +0 -0
- {claude_mpm-5.6.37.dist-info → claude_mpm-5.6.38.dist-info}/entry_points.txt +0 -0
- {claude_mpm-5.6.37.dist-info → claude_mpm-5.6.38.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-5.6.37.dist-info → claude_mpm-5.6.38.dist-info}/licenses/LICENSE-FAQ.md +0 -0
- {claude_mpm-5.6.37.dist-info → claude_mpm-5.6.38.dist-info}/top_level.txt +0 -0
claude_mpm/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.6.
|
|
1
|
+
5.6.38
|
claude_mpm/cli/startup.py
CHANGED
|
@@ -13,7 +13,7 @@ import sys
|
|
|
13
13
|
from pathlib import Path
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
def cleanup_user_level_hooks() ->
|
|
16
|
+
def cleanup_user_level_hooks() -> bool:
|
|
17
17
|
"""Remove stale user-level hooks directory.
|
|
18
18
|
|
|
19
19
|
WHY: claude-mpm previously deployed hooks to ~/.claude/hooks/claude-mpm/
|
|
@@ -23,13 +23,16 @@ def cleanup_user_level_hooks() -> None:
|
|
|
23
23
|
|
|
24
24
|
DESIGN DECISION: Runs early in startup, before project hook sync.
|
|
25
25
|
Non-blocking - failures are logged at debug level but don't prevent startup.
|
|
26
|
+
|
|
27
|
+
Returns:
|
|
28
|
+
bool: True if hooks were cleaned up, False if none found or cleanup failed
|
|
26
29
|
"""
|
|
27
30
|
import shutil
|
|
28
31
|
|
|
29
32
|
user_hooks_dir = Path.home() / ".claude" / "hooks" / "claude-mpm"
|
|
30
33
|
|
|
31
34
|
if not user_hooks_dir.exists():
|
|
32
|
-
return
|
|
35
|
+
return False
|
|
33
36
|
|
|
34
37
|
try:
|
|
35
38
|
from ..core.logger import get_logger
|
|
@@ -40,6 +43,7 @@ def cleanup_user_level_hooks() -> None:
|
|
|
40
43
|
shutil.rmtree(user_hooks_dir)
|
|
41
44
|
|
|
42
45
|
logger.debug("User-level hooks cleanup complete")
|
|
46
|
+
return True
|
|
43
47
|
except Exception as e:
|
|
44
48
|
# Non-critical - log but don't fail startup
|
|
45
49
|
try:
|
|
@@ -49,6 +53,7 @@ def cleanup_user_level_hooks() -> None:
|
|
|
49
53
|
logger.debug(f"Failed to cleanup user-level hooks (non-fatal): {e}")
|
|
50
54
|
except Exception: # nosec B110
|
|
51
55
|
pass # Avoid any errors in error handling
|
|
56
|
+
return False
|
|
52
57
|
|
|
53
58
|
|
|
54
59
|
def sync_hooks_on_startup(quiet: bool = False) -> bool:
|
|
@@ -71,31 +76,45 @@ def sync_hooks_on_startup(quiet: bool = False) -> bool:
|
|
|
71
76
|
Returns:
|
|
72
77
|
bool: True if hooks were synced successfully, False otherwise
|
|
73
78
|
"""
|
|
79
|
+
is_tty = not quiet and sys.stdout.isatty()
|
|
80
|
+
|
|
74
81
|
# Step 1: Cleanup stale user-level hooks first
|
|
75
|
-
|
|
82
|
+
if is_tty:
|
|
83
|
+
print("Cleaning user-level hooks...", end=" ", flush=True)
|
|
76
84
|
|
|
85
|
+
cleaned = cleanup_user_level_hooks()
|
|
86
|
+
|
|
87
|
+
if is_tty:
|
|
88
|
+
if cleaned:
|
|
89
|
+
print("✓")
|
|
90
|
+
else:
|
|
91
|
+
print("(none found)")
|
|
92
|
+
|
|
93
|
+
# Step 2: Install project-level hooks
|
|
77
94
|
try:
|
|
78
95
|
from ..hooks.claude_hooks.installer import HookInstaller
|
|
79
96
|
|
|
80
97
|
installer = HookInstaller()
|
|
81
98
|
|
|
82
99
|
# Show brief status (hooks sync is fast)
|
|
83
|
-
if
|
|
84
|
-
print("
|
|
100
|
+
if is_tty:
|
|
101
|
+
print("Installing project hooks...", end=" ", flush=True)
|
|
85
102
|
|
|
86
103
|
# Reinstall hooks (force=True ensures update)
|
|
87
104
|
success = installer.install_hooks(force=True)
|
|
88
105
|
|
|
89
|
-
if
|
|
106
|
+
if is_tty:
|
|
90
107
|
if success:
|
|
91
|
-
|
|
108
|
+
# Count hooks from settings file
|
|
109
|
+
hook_count = _count_installed_hooks(installer.settings_file)
|
|
110
|
+
print(f"{hook_count} hooks configured ✓")
|
|
92
111
|
else:
|
|
93
112
|
print("(skipped)")
|
|
94
113
|
|
|
95
114
|
return success
|
|
96
115
|
|
|
97
116
|
except Exception as e:
|
|
98
|
-
if
|
|
117
|
+
if is_tty:
|
|
99
118
|
print("(error)")
|
|
100
119
|
# Log but don't fail startup
|
|
101
120
|
from ..core.logger import get_logger
|
|
@@ -105,6 +124,30 @@ def sync_hooks_on_startup(quiet: bool = False) -> bool:
|
|
|
105
124
|
return False
|
|
106
125
|
|
|
107
126
|
|
|
127
|
+
def _count_installed_hooks(settings_file: Path) -> int:
|
|
128
|
+
"""Count the number of hook event types configured in settings.
|
|
129
|
+
|
|
130
|
+
Args:
|
|
131
|
+
settings_file: Path to the settings.local.json file
|
|
132
|
+
|
|
133
|
+
Returns:
|
|
134
|
+
int: Number of hook event types configured (e.g., 7 for all events)
|
|
135
|
+
"""
|
|
136
|
+
import json
|
|
137
|
+
|
|
138
|
+
try:
|
|
139
|
+
if not settings_file.exists():
|
|
140
|
+
return 0
|
|
141
|
+
|
|
142
|
+
with settings_file.open() as f:
|
|
143
|
+
settings = json.load(f)
|
|
144
|
+
|
|
145
|
+
hooks = settings.get("hooks", {})
|
|
146
|
+
return len(hooks)
|
|
147
|
+
except Exception:
|
|
148
|
+
return 0
|
|
149
|
+
|
|
150
|
+
|
|
108
151
|
def cleanup_legacy_agent_cache() -> None:
|
|
109
152
|
"""Remove legacy hierarchical agent cache directories.
|
|
110
153
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
claude_mpm/BUILD_NUMBER,sha256=9JfxhnDtr-8l3kCP2U5TVXSErptHoga8m7XA8zqgGOc,4
|
|
2
|
-
claude_mpm/VERSION,sha256=
|
|
2
|
+
claude_mpm/VERSION,sha256=TdNcmUqmk3u_JB1KJrdoi12qIixv4X4pA-YZa93wleM,7
|
|
3
3
|
claude_mpm/__init__.py,sha256=AGfh00BHKvLYD-UVFw7qbKtl7NMRIzRXOWw7vEuZ-h4,2214
|
|
4
4
|
claude_mpm/__main__.py,sha256=Ro5UBWBoQaSAIoSqWAr7zkbLyvi4sSy28WShqAhKJG0,723
|
|
5
5
|
claude_mpm/constants.py,sha256=pz3lTrZZR5HhV3eZzYtIbtBwWo7iM6pkBHP_ixxmI6Y,6827
|
|
@@ -42,7 +42,7 @@ claude_mpm/cli/chrome_devtools_installer.py,sha256=efA_ZX1iR3oaJi3222079BQw6DEG8
|
|
|
42
42
|
claude_mpm/cli/executor.py,sha256=eerqDVszBfTm8N2FgreLr-132Jb9BVZGNrrukvb_b-I,15106
|
|
43
43
|
claude_mpm/cli/helpers.py,sha256=CypEhw0tbNH6_GzVTaQdi4w7ThCWO43Ep92YbJzPR4I,3638
|
|
44
44
|
claude_mpm/cli/parser.py,sha256=Vqx9n-6Xo1uNhXR4rThmgWpZXTr0nOtkgDf3oMS9b0g,5855
|
|
45
|
-
claude_mpm/cli/startup.py,sha256=
|
|
45
|
+
claude_mpm/cli/startup.py,sha256=iYf_i1fzFPVCljsQM048h6vkpDz9DyVP_UfIEGmjO28,71438
|
|
46
46
|
claude_mpm/cli/startup_display.py,sha256=KI4GZ0uVoK7FXeK5jsS4JAyaKaKf5rCkY3h5tNeEY7M,17209
|
|
47
47
|
claude_mpm/cli/startup_logging.py,sha256=wHokzcCA0AJPxAqFrpY5PMOBh1iOhdhgP1gY1OvD0gY,29392
|
|
48
48
|
claude_mpm/cli/utils.py,sha256=5e3v-ow1gd-5nlad9OWCsL-3SRJcPjBJ9HS3zygwkiQ,8988
|
|
@@ -1106,10 +1106,10 @@ claude_mpm/utils/subprocess_utils.py,sha256=D0izRT8anjiUb_JG72zlJR_JAw1cDkb7kalN
|
|
|
1106
1106
|
claude_mpm/validation/__init__.py,sha256=YZhwE3mhit-lslvRLuwfX82xJ_k4haZeKmh4IWaVwtk,156
|
|
1107
1107
|
claude_mpm/validation/agent_validator.py,sha256=GprtAvu80VyMXcKGsK_VhYiXWA6BjKHv7O6HKx0AB9w,20917
|
|
1108
1108
|
claude_mpm/validation/frontmatter_validator.py,sha256=YpJlYNNYcV8u6hIOi3_jaRsDnzhbcQpjCBE6eyBKaFY,7076
|
|
1109
|
-
claude_mpm-5.6.
|
|
1110
|
-
claude_mpm-5.6.
|
|
1111
|
-
claude_mpm-5.6.
|
|
1112
|
-
claude_mpm-5.6.
|
|
1113
|
-
claude_mpm-5.6.
|
|
1114
|
-
claude_mpm-5.6.
|
|
1115
|
-
claude_mpm-5.6.
|
|
1109
|
+
claude_mpm-5.6.38.dist-info/licenses/LICENSE,sha256=ca3y_Rk4aPrbF6f62z8Ht5MJM9OAvbGlHvEDcj9vUQ4,3867
|
|
1110
|
+
claude_mpm-5.6.38.dist-info/licenses/LICENSE-FAQ.md,sha256=TxfEkXVCK98RzDOer09puc7JVCP_q_bN4dHtZKHCMcM,5104
|
|
1111
|
+
claude_mpm-5.6.38.dist-info/METADATA,sha256=3ZJ-6T5yZGLlj1LH6-cmZvjq9P6hV_CKZNxCaSnQBuE,15245
|
|
1112
|
+
claude_mpm-5.6.38.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
1113
|
+
claude_mpm-5.6.38.dist-info/entry_points.txt,sha256=n-Uk4vwHPpuvu-g_I7-GHORzTnN_m6iyOsoLveKKD0E,228
|
|
1114
|
+
claude_mpm-5.6.38.dist-info/top_level.txt,sha256=1nUg3FEaBySgm8t-s54jK5zoPnu3_eY6EP6IOlekyHA,11
|
|
1115
|
+
claude_mpm-5.6.38.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|