claude-mpm 5.6.38__py3-none-any.whl → 5.6.40__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 CHANGED
@@ -1 +1 @@
1
- 5.6.38
1
+ 5.6.40
@@ -17,6 +17,12 @@ NOTE: Requires Claude Code version 1.0.92 or higher for proper hook support.
17
17
  Earlier versions do not support matcher-based hook configuration.
18
18
  """
19
19
 
20
+ # Suppress RuntimeWarning from frozen runpy (prevents REPL pollution in Claude Code)
21
+ # Must be before other imports to suppress warnings during import
22
+ import warnings
23
+
24
+ warnings.filterwarnings("ignore", category=RuntimeWarning)
25
+
20
26
  import json
21
27
  import os
22
28
  import re
@@ -387,8 +387,35 @@ main "$@"
387
387
  return False
388
388
  return self._version_meets_minimum(version, self.MIN_SKILLS_VERSION)
389
389
 
390
- def get_hook_script_path(self) -> Path:
391
- """Get the path to the hook handler script based on installation method.
390
+ def get_hook_command(self) -> str:
391
+ """Get the hook command based on installation method.
392
+
393
+ Priority order:
394
+ 1. claude-hook entry point (uv tool install, pipx install, pip install)
395
+ 2. Fallback to bash script (development installs)
396
+
397
+ Returns:
398
+ Command string for the hook handler (either 'claude-hook' or path to bash script)
399
+
400
+ Raises:
401
+ FileNotFoundError: If no hook handler can be found
402
+ """
403
+ # Check if claude-hook entry point is available in PATH
404
+ claude_hook_path = shutil.which("claude-hook")
405
+ if claude_hook_path:
406
+ self.logger.info(f"Using claude-hook entry point: {claude_hook_path}")
407
+ return "claude-hook"
408
+
409
+ # Fallback to bash script for development installs
410
+ script_path = self._get_hook_script_path()
411
+ self.logger.info(f"Using fallback bash script: {script_path}")
412
+ return str(script_path.absolute())
413
+
414
+ def _get_hook_script_path(self) -> Path:
415
+ """Get the path to the fallback bash hook handler script.
416
+
417
+ This is used when the claude-hook entry point is not available
418
+ (e.g., development installs without uv tool install).
392
419
 
393
420
  Returns:
394
421
  Path to the claude-hook-handler.sh script
@@ -441,6 +468,19 @@ main "$@"
441
468
 
442
469
  raise FileNotFoundError(f"Hook handler script not found at {script_path}")
443
470
 
471
+ def get_hook_script_path(self) -> Path:
472
+ """Get the path to the hook handler script based on installation method.
473
+
474
+ DEPRECATED: Use get_hook_command() instead for proper entry point support.
475
+
476
+ Returns:
477
+ Path to the claude-hook-handler.sh script
478
+
479
+ Raises:
480
+ FileNotFoundError: If the script cannot be found
481
+ """
482
+ return self._get_hook_script_path()
483
+
444
484
  def install_hooks(self, force: bool = False) -> bool:
445
485
  """
446
486
  Install Claude MPM hooks.
@@ -473,18 +513,16 @@ main "$@"
473
513
  # Create Claude directory (hooks_dir no longer needed)
474
514
  self.claude_dir.mkdir(exist_ok=True)
475
515
 
476
- # Get the deployment-root hook script path
516
+ # Get the hook command (either claude-hook entry point or fallback bash script)
477
517
  try:
478
- hook_script_path = self.get_hook_script_path()
479
- self.logger.info(
480
- f"Using deployment-root hook script: {hook_script_path}"
481
- )
518
+ hook_command = self.get_hook_command()
519
+ self.logger.info(f"Using hook command: {hook_command}")
482
520
  except FileNotFoundError as e:
483
- self.logger.error(f"Failed to locate hook script: {e}")
521
+ self.logger.error(f"Failed to locate hook handler: {e}")
484
522
  return False
485
523
 
486
- # Update Claude settings to use deployment-root script
487
- self._update_claude_settings(hook_script_path)
524
+ # Update Claude settings to use the hook command
525
+ self._update_claude_settings(hook_command)
488
526
 
489
527
  # Install commands if available
490
528
  self._install_commands()
@@ -579,8 +617,12 @@ main "$@"
579
617
  "StatusLine command already supports both schemas or not present"
580
618
  )
581
619
 
582
- def _update_claude_settings(self, hook_script_path: Path) -> None:
583
- """Update Claude settings to use the installed hook."""
620
+ def _update_claude_settings(self, hook_cmd: str) -> None:
621
+ """Update Claude settings to use the installed hook.
622
+
623
+ Args:
624
+ hook_cmd: The hook command to use (either 'claude-hook' or path to bash script)
625
+ """
584
626
  self.logger.info("Updating Claude settings...")
585
627
 
586
628
  # Load existing settings.json or create new
@@ -603,15 +645,18 @@ main "$@"
603
645
  settings["hooks"] = {}
604
646
 
605
647
  # Hook configuration for each event type
606
- hook_command = {"type": "command", "command": str(hook_script_path.absolute())}
648
+ hook_command = {"type": "command", "command": hook_cmd}
607
649
 
608
650
  def is_our_hook(cmd: dict) -> bool:
609
651
  """Check if a hook command belongs to claude-mpm."""
610
652
  if cmd.get("type") != "command":
611
653
  return False
612
654
  command = cmd.get("command", "")
613
- return "claude-hook-handler.sh" in command or command.endswith(
614
- "claude-mpm-hook.sh"
655
+ # Match claude-hook entry point or bash script fallback
656
+ return (
657
+ command == "claude-hook"
658
+ or "claude-hook-handler.sh" in command
659
+ or command.endswith("claude-mpm-hook.sh")
615
660
  )
616
661
 
617
662
  def merge_hooks_for_event(
@@ -867,7 +912,8 @@ main "$@"
867
912
  ):
868
913
  cmd = hook_cmd.get("command", "")
869
914
  if (
870
- "claude-hook-handler.sh" in cmd
915
+ cmd == "claude-hook"
916
+ or "claude-hook-handler.sh" in cmd
871
917
  or cmd.endswith("claude-mpm-hook.sh")
872
918
  ):
873
919
  is_claude_mpm = True
@@ -912,27 +958,42 @@ main "$@"
912
958
 
913
959
  is_valid, issues = self.verify_hooks()
914
960
 
915
- # Try to get deployment-root script path
961
+ # Try to get hook command (entry point or fallback script)
962
+ hook_command = None
963
+ using_entry_point = False
916
964
  try:
917
- hook_script_path = self.get_hook_script_path()
965
+ hook_command = self.get_hook_command()
966
+ using_entry_point = hook_command == "claude-hook"
967
+ except FileNotFoundError:
968
+ hook_command = None
969
+
970
+ # For backward compatibility, also try to get the script path
971
+ hook_script_str = None
972
+ script_exists = False
973
+ try:
974
+ hook_script_path = self._get_hook_script_path()
918
975
  hook_script_str = str(hook_script_path)
919
976
  script_exists = hook_script_path.exists()
920
977
  except FileNotFoundError:
921
- hook_script_str = None
922
- script_exists = False
978
+ pass
923
979
 
924
980
  status = {
925
- "installed": script_exists and self.settings_file.exists(),
981
+ "installed": (hook_command is not None or script_exists)
982
+ and self.settings_file.exists(),
926
983
  "valid": is_valid,
927
984
  "issues": issues,
928
- "hook_script": hook_script_str,
985
+ "hook_command": hook_command,
986
+ "hook_script": hook_script_str, # Kept for backward compatibility
987
+ "using_entry_point": using_entry_point,
929
988
  "settings_file": (
930
989
  str(self.settings_file) if self.settings_file.exists() else None
931
990
  ),
932
991
  "claude_version": claude_version,
933
992
  "version_compatible": is_compatible,
934
993
  "version_message": version_message,
935
- "deployment_type": "deployment-root", # New field to indicate new architecture
994
+ "deployment_type": "entry-point"
995
+ if using_entry_point
996
+ else "deployment-root",
936
997
  "pretool_modify_supported": pretool_modify_supported, # v2.0.30+ feature
937
998
  "pretool_modify_message": (
938
999
  f"PreToolUse input modification supported (v{claude_version})"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-mpm
3
- Version: 5.6.38
3
+ Version: 5.6.40
4
4
  Summary: Claude Multi-Agent Project Manager - Orchestrate Claude with agent delegation and ticket tracking
5
5
  Author-email: Bob Matsuoka <bob@matsuoka.com>
6
6
  Maintainer: Claude MPM Team
@@ -1,5 +1,5 @@
1
1
  claude_mpm/BUILD_NUMBER,sha256=9JfxhnDtr-8l3kCP2U5TVXSErptHoga8m7XA8zqgGOc,4
2
- claude_mpm/VERSION,sha256=TdNcmUqmk3u_JB1KJrdoi12qIixv4X4pA-YZa93wleM,7
2
+ claude_mpm/VERSION,sha256=Z-pCnpaqxQII0qTjtChhtMldIh9cYJIuxiX_Zb1xvz8,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
@@ -430,9 +430,9 @@ claude_mpm/hooks/claude_hooks/auto_pause_handler.py,sha256=Fm8d_a0KJ1GBPPQ3xmQo-
430
430
  claude_mpm/hooks/claude_hooks/connection_pool.py,sha256=vpi-XbVf61GWhh85tHBzubbOgbJly_I-5-QmsleND2M,8658
431
431
  claude_mpm/hooks/claude_hooks/correlation_manager.py,sha256=3n-RxzqE8egG4max_NcpJgL9gzrBY6Ti529LrjleI1g,2033
432
432
  claude_mpm/hooks/claude_hooks/event_handlers.py,sha256=VJ4kY_GMZkVv8WBAII4GTfY4qxFgoKdXpMdhEbzt980,50344
433
- claude_mpm/hooks/claude_hooks/hook_handler.py,sha256=AH0z6D06bo02UGyEdYlzll2EcELl-gmt8D42MPqu_SU,30459
433
+ claude_mpm/hooks/claude_hooks/hook_handler.py,sha256=BCLqc-01d0jqxqZIhjqG4pK_17dBs22VhfVE6yE_kzU,30687
434
434
  claude_mpm/hooks/claude_hooks/hook_wrapper.sh,sha256=XYkdYtcM0nfnwYvMdyIFCasr80ry3uI5-fLYsLtDGw4,2214
435
- claude_mpm/hooks/claude_hooks/installer.py,sha256=SvIgxRMocQxnqNF3ZQfKH8zA-1b4lpiCA4vCI0vWOZI,38065
435
+ claude_mpm/hooks/claude_hooks/installer.py,sha256=s4AqVbln4oWmVr4cSCXhMN4TxDPQ48P-qk-qKvv0690,40353
436
436
  claude_mpm/hooks/claude_hooks/memory_integration.py,sha256=YOMD4Ah003uMh7A454w8ngLmKw8RUAEIHpEj-FRk3TI,10759
437
437
  claude_mpm/hooks/claude_hooks/response_tracking.py,sha256=1KOGC19rYRNYbc1Tfe7FAP6AtvgOMSM5uEPxMi2N6-c,16323
438
438
  claude_mpm/hooks/claude_hooks/tool_analysis.py,sha256=3_o2PP9D7wEMwLriCtIBOw0cj2fSZfepN7lI4P1meSQ,7862
@@ -440,7 +440,7 @@ claude_mpm/hooks/claude_hooks/__pycache__/__init__.cpython-311.pyc,sha256=EGpgXq
440
440
  claude_mpm/hooks/claude_hooks/__pycache__/auto_pause_handler.cpython-311.pyc,sha256=lw3g7dHPcJ258xtcmbXOk-tCqVz0JAc5PZ10LUfG4Zo,20829
441
441
  claude_mpm/hooks/claude_hooks/__pycache__/correlation_manager.cpython-311.pyc,sha256=SQX5iiP9bQZkLL-cj_2tlGH7lpAzarO0mYal7btj3tc,3521
442
442
  claude_mpm/hooks/claude_hooks/__pycache__/event_handlers.cpython-311.pyc,sha256=rUcbnsARIgWenNkPv8LlHJBXmxTOExqgcwtBaBfGzg4,49040
443
- claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-311.pyc,sha256=NQtvV9vs1OMKQTZWRQrAie83y4Q61mJ-QFawC2GnsUQ,32799
443
+ claude_mpm/hooks/claude_hooks/__pycache__/hook_handler.cpython-311.pyc,sha256=UcqjwA6kRbd8BcTnmYekEiF98aSDszayGqbuCK-ff7s,32939
444
444
  claude_mpm/hooks/claude_hooks/__pycache__/memory_integration.cpython-311.pyc,sha256=1llucgjrun0H6q8V8_BXTHtkTiYAwNGyptluhoIi7ss,11185
445
445
  claude_mpm/hooks/claude_hooks/__pycache__/response_tracking.cpython-311.pyc,sha256=E_pRoKx-mAB5gEv2_5TneMC_K10zj7FYCPwQPnPd88g,16228
446
446
  claude_mpm/hooks/claude_hooks/__pycache__/tool_analysis.cpython-311.pyc,sha256=ZjcNfNY5Ht6FhalPeh7M7OzMffcey5iF4AVjDDg9kak,10694
@@ -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.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,,
1109
+ claude_mpm-5.6.40.dist-info/licenses/LICENSE,sha256=ca3y_Rk4aPrbF6f62z8Ht5MJM9OAvbGlHvEDcj9vUQ4,3867
1110
+ claude_mpm-5.6.40.dist-info/licenses/LICENSE-FAQ.md,sha256=TxfEkXVCK98RzDOer09puc7JVCP_q_bN4dHtZKHCMcM,5104
1111
+ claude_mpm-5.6.40.dist-info/METADATA,sha256=ebfBslq9e58CyY8JnhNjw7o7OoalCxnq6zJ68bSf1f0,15245
1112
+ claude_mpm-5.6.40.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
1113
+ claude_mpm-5.6.40.dist-info/entry_points.txt,sha256=1zA7qb37iArFuimIPKvNMoJz1WtKPNKfxfr8E_ijk30,290
1114
+ claude_mpm-5.6.40.dist-info/top_level.txt,sha256=1nUg3FEaBySgm8t-s54jK5zoPnu3_eY6EP6IOlekyHA,11
1115
+ claude_mpm-5.6.40.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  [console_scripts]
2
+ claude-hook = claude_mpm.hooks.claude_hooks.hook_handler:main
2
3
  claude-mpm = claude_mpm.cli:main
3
4
  claude-mpm-doctor = claude_mpm.scripts.mpm_doctor:main
4
5
  claude-mpm-monitor = claude_mpm.scripts.launch_monitor:main