claude-mpm 3.5.6__py3-none-any.whl → 3.6.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/VERSION +1 -1
- claude_mpm/agents/BASE_AGENT_TEMPLATE.md +96 -23
- claude_mpm/agents/BASE_PM.md +273 -0
- claude_mpm/agents/INSTRUCTIONS.md +114 -103
- claude_mpm/agents/agent_loader.py +36 -1
- claude_mpm/agents/async_agent_loader.py +421 -0
- claude_mpm/agents/templates/code_analyzer.json +81 -0
- claude_mpm/agents/templates/data_engineer.json +18 -3
- claude_mpm/agents/templates/documentation.json +18 -3
- claude_mpm/agents/templates/engineer.json +19 -4
- claude_mpm/agents/templates/ops.json +18 -3
- claude_mpm/agents/templates/qa.json +20 -4
- claude_mpm/agents/templates/research.json +20 -4
- claude_mpm/agents/templates/security.json +18 -3
- claude_mpm/agents/templates/version_control.json +16 -3
- claude_mpm/cli/__init__.py +5 -1
- claude_mpm/cli/commands/__init__.py +5 -1
- claude_mpm/cli/commands/agents.py +212 -3
- claude_mpm/cli/commands/aggregate.py +462 -0
- claude_mpm/cli/commands/config.py +277 -0
- claude_mpm/cli/commands/run.py +224 -36
- claude_mpm/cli/parser.py +176 -1
- claude_mpm/constants.py +19 -0
- claude_mpm/core/claude_runner.py +320 -44
- claude_mpm/core/config.py +161 -4
- claude_mpm/core/framework_loader.py +81 -0
- claude_mpm/hooks/claude_hooks/hook_handler.py +391 -9
- claude_mpm/init.py +40 -5
- claude_mpm/models/agent_session.py +511 -0
- claude_mpm/scripts/__init__.py +15 -0
- claude_mpm/scripts/start_activity_logging.py +86 -0
- claude_mpm/services/agents/deployment/agent_deployment.py +165 -19
- claude_mpm/services/agents/deployment/async_agent_deployment.py +461 -0
- claude_mpm/services/event_aggregator.py +547 -0
- claude_mpm/utils/agent_dependency_loader.py +655 -0
- claude_mpm/utils/console.py +11 -0
- claude_mpm/utils/dependency_cache.py +376 -0
- claude_mpm/utils/dependency_strategies.py +343 -0
- claude_mpm/utils/environment_context.py +310 -0
- {claude_mpm-3.5.6.dist-info → claude_mpm-3.6.2.dist-info}/METADATA +47 -3
- {claude_mpm-3.5.6.dist-info → claude_mpm-3.6.2.dist-info}/RECORD +45 -31
- claude_mpm/agents/templates/pm.json +0 -122
- {claude_mpm-3.5.6.dist-info → claude_mpm-3.6.2.dist-info}/WHEEL +0 -0
- {claude_mpm-3.5.6.dist-info → claude_mpm-3.6.2.dist-info}/entry_points.txt +0 -0
- {claude_mpm-3.5.6.dist-info → claude_mpm-3.6.2.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-3.5.6.dist-info → claude_mpm-3.6.2.dist-info}/top_level.txt +0 -0
    
        claude_mpm/cli/parser.py
    CHANGED
    
    | @@ -14,7 +14,7 @@ import argparse | |
| 14 14 | 
             
            from pathlib import Path
         | 
| 15 15 | 
             
            from typing import Optional, List
         | 
| 16 16 |  | 
| 17 | 
            -
            from ..constants import CLICommands, CLIPrefix, AgentCommands, MemoryCommands, MonitorCommands, LogLevel
         | 
| 17 | 
            +
            from ..constants import CLICommands, CLIPrefix, AgentCommands, MemoryCommands, MonitorCommands, LogLevel, ConfigCommands, AggregateCommands
         | 
| 18 18 |  | 
| 19 19 |  | 
| 20 20 | 
             
            def add_common_arguments(parser: argparse.ArgumentParser, version: str = None) -> None:
         | 
| @@ -127,6 +127,30 @@ def add_run_arguments(parser: argparse.ArgumentParser) -> None: | |
| 127 127 | 
             
                    help="Resume a session (last session if no ID specified, or specific session ID)"
         | 
| 128 128 | 
             
                )
         | 
| 129 129 |  | 
| 130 | 
            +
                # Dependency checking options
         | 
| 131 | 
            +
                dep_group = parser.add_argument_group('dependency options')
         | 
| 132 | 
            +
                dep_group.add_argument(
         | 
| 133 | 
            +
                    "--no-check-dependencies",
         | 
| 134 | 
            +
                    action="store_false",
         | 
| 135 | 
            +
                    dest="check_dependencies",
         | 
| 136 | 
            +
                    help="Skip agent dependency checking at startup"
         | 
| 137 | 
            +
                )
         | 
| 138 | 
            +
                dep_group.add_argument(
         | 
| 139 | 
            +
                    "--force-check-dependencies",
         | 
| 140 | 
            +
                    action="store_true",
         | 
| 141 | 
            +
                    help="Force dependency checking even if cached results exist"
         | 
| 142 | 
            +
                )
         | 
| 143 | 
            +
                dep_group.add_argument(
         | 
| 144 | 
            +
                    "--no-prompt",
         | 
| 145 | 
            +
                    action="store_true",
         | 
| 146 | 
            +
                    help="Never prompt for dependency installation (non-interactive mode)"
         | 
| 147 | 
            +
                )
         | 
| 148 | 
            +
                dep_group.add_argument(
         | 
| 149 | 
            +
                    "--force-prompt",
         | 
| 150 | 
            +
                    action="store_true",
         | 
| 151 | 
            +
                    help="Force interactive prompting even in non-TTY environments (use with caution)"
         | 
| 152 | 
            +
                )
         | 
| 153 | 
            +
                
         | 
| 130 154 | 
             
                # Input/output options
         | 
| 131 155 | 
             
                io_group = parser.add_argument_group('input/output options')
         | 
| 132 156 | 
             
                io_group.add_argument(
         | 
| @@ -229,6 +253,30 @@ def create_parser(prog_name: str = "claude-mpm", version: str = "0.0.0") -> argp | |
| 229 253 | 
             
                    help="Resume a session (last session if no ID specified, or specific session ID)"
         | 
| 230 254 | 
             
                )
         | 
| 231 255 |  | 
| 256 | 
            +
                # Dependency checking options (for backward compatibility at top level)
         | 
| 257 | 
            +
                dep_group_top = parser.add_argument_group('dependency options (when no command specified)')
         | 
| 258 | 
            +
                dep_group_top.add_argument(
         | 
| 259 | 
            +
                    "--no-check-dependencies",
         | 
| 260 | 
            +
                    action="store_false",
         | 
| 261 | 
            +
                    dest="check_dependencies",
         | 
| 262 | 
            +
                    help="Skip agent dependency checking at startup"
         | 
| 263 | 
            +
                )
         | 
| 264 | 
            +
                dep_group_top.add_argument(
         | 
| 265 | 
            +
                    "--force-check-dependencies",
         | 
| 266 | 
            +
                    action="store_true",
         | 
| 267 | 
            +
                    help="Force dependency checking even if cached results exist"
         | 
| 268 | 
            +
                )
         | 
| 269 | 
            +
                dep_group_top.add_argument(
         | 
| 270 | 
            +
                    "--no-prompt",
         | 
| 271 | 
            +
                    action="store_true",
         | 
| 272 | 
            +
                    help="Never prompt for dependency installation (non-interactive mode)"
         | 
| 273 | 
            +
                )
         | 
| 274 | 
            +
                dep_group_top.add_argument(
         | 
| 275 | 
            +
                    "--force-prompt",
         | 
| 276 | 
            +
                    action="store_true",
         | 
| 277 | 
            +
                    help="Force interactive prompting even in non-TTY environments (use with caution)"
         | 
| 278 | 
            +
                )
         | 
| 279 | 
            +
                
         | 
| 232 280 | 
             
                # Input/output options
         | 
| 233 281 | 
             
                io_group = parser.add_argument_group('input/output options (when no command specified)')
         | 
| 234 282 | 
             
                io_group.add_argument(
         | 
| @@ -353,6 +401,11 @@ def create_parser(prog_name: str = "claude-mpm", version: str = "0.0.0") -> argp | |
| 353 401 | 
             
                    type=Path,
         | 
| 354 402 | 
             
                    help="Target directory (default: .claude/agents/)"
         | 
| 355 403 | 
             
                )
         | 
| 404 | 
            +
                deploy_agents_parser.add_argument(
         | 
| 405 | 
            +
                    "--include-all",
         | 
| 406 | 
            +
                    action="store_true",
         | 
| 407 | 
            +
                    help="Include all agents, overriding exclusion configuration"
         | 
| 408 | 
            +
                )
         | 
| 356 409 |  | 
| 357 410 | 
             
                # Force deploy agents
         | 
| 358 411 | 
             
                force_deploy_parser = agents_subparsers.add_parser(
         | 
| @@ -364,6 +417,11 @@ def create_parser(prog_name: str = "claude-mpm", version: str = "0.0.0") -> argp | |
| 364 417 | 
             
                    type=Path,
         | 
| 365 418 | 
             
                    help="Target directory (default: .claude/agents/)"
         | 
| 366 419 | 
             
                )
         | 
| 420 | 
            +
                force_deploy_parser.add_argument(
         | 
| 421 | 
            +
                    "--include-all",
         | 
| 422 | 
            +
                    action="store_true",
         | 
| 423 | 
            +
                    help="Include all agents, overriding exclusion configuration"
         | 
| 424 | 
            +
                )
         | 
| 367 425 |  | 
| 368 426 | 
             
                # Clean agents
         | 
| 369 427 | 
             
                clean_agents_parser = agents_subparsers.add_parser(
         | 
| @@ -504,6 +562,119 @@ def create_parser(prog_name: str = "claude-mpm", version: str = "0.0.0") -> argp | |
| 504 562 | 
             
                    help="Output raw memory content in JSON format for programmatic processing"
         | 
| 505 563 | 
             
                )
         | 
| 506 564 |  | 
| 565 | 
            +
                # Add dependency management subcommands to agents
         | 
| 566 | 
            +
                deps_check_parser = agents_subparsers.add_parser(
         | 
| 567 | 
            +
                    'deps-check',
         | 
| 568 | 
            +
                    help='Check dependencies for deployed agents'
         | 
| 569 | 
            +
                )
         | 
| 570 | 
            +
                deps_check_parser.add_argument(
         | 
| 571 | 
            +
                    '--verbose',
         | 
| 572 | 
            +
                    action='store_true',
         | 
| 573 | 
            +
                    help='Enable verbose output'
         | 
| 574 | 
            +
                )
         | 
| 575 | 
            +
                deps_check_parser.add_argument(
         | 
| 576 | 
            +
                    '--agent',
         | 
| 577 | 
            +
                    type=str,
         | 
| 578 | 
            +
                    help='Check dependencies for a specific agent only'
         | 
| 579 | 
            +
                )
         | 
| 580 | 
            +
                
         | 
| 581 | 
            +
                deps_install_parser = agents_subparsers.add_parser(
         | 
| 582 | 
            +
                    'deps-install',
         | 
| 583 | 
            +
                    help='Install missing dependencies for deployed agents'
         | 
| 584 | 
            +
                )
         | 
| 585 | 
            +
                deps_install_parser.add_argument(
         | 
| 586 | 
            +
                    '--agent',
         | 
| 587 | 
            +
                    type=str,
         | 
| 588 | 
            +
                    help='Install dependencies for a specific agent only'
         | 
| 589 | 
            +
                )
         | 
| 590 | 
            +
                deps_install_parser.add_argument(
         | 
| 591 | 
            +
                    '--dry-run',
         | 
| 592 | 
            +
                    action='store_true',
         | 
| 593 | 
            +
                    help='Show what would be installed without actually installing'
         | 
| 594 | 
            +
                )
         | 
| 595 | 
            +
                
         | 
| 596 | 
            +
                deps_list_parser = agents_subparsers.add_parser(
         | 
| 597 | 
            +
                    'deps-list',
         | 
| 598 | 
            +
                    help='List all dependencies from deployed agents'
         | 
| 599 | 
            +
                )
         | 
| 600 | 
            +
                deps_list_parser.add_argument(
         | 
| 601 | 
            +
                    '--format',
         | 
| 602 | 
            +
                    choices=['text', 'pip', 'json'],
         | 
| 603 | 
            +
                    default='text',
         | 
| 604 | 
            +
                    help='Output format for dependency list'
         | 
| 605 | 
            +
                )
         | 
| 606 | 
            +
                
         | 
| 607 | 
            +
                # Config command with subcommands
         | 
| 608 | 
            +
                config_parser = subparsers.add_parser(
         | 
| 609 | 
            +
                    CLICommands.CONFIG.value,
         | 
| 610 | 
            +
                    help="Validate and manage configuration"
         | 
| 611 | 
            +
                )
         | 
| 612 | 
            +
                add_common_arguments(config_parser)
         | 
| 613 | 
            +
                
         | 
| 614 | 
            +
                config_subparsers = config_parser.add_subparsers(
         | 
| 615 | 
            +
                    dest="config_command",
         | 
| 616 | 
            +
                    help="Config commands",
         | 
| 617 | 
            +
                    metavar="SUBCOMMAND"
         | 
| 618 | 
            +
                )
         | 
| 619 | 
            +
                
         | 
| 620 | 
            +
                # Validate config
         | 
| 621 | 
            +
                validate_config_parser = config_subparsers.add_parser(
         | 
| 622 | 
            +
                    ConfigCommands.VALIDATE.value,
         | 
| 623 | 
            +
                    help="Validate configuration file"
         | 
| 624 | 
            +
                )
         | 
| 625 | 
            +
                validate_config_parser.add_argument(
         | 
| 626 | 
            +
                    "--config-file",
         | 
| 627 | 
            +
                    type=Path,
         | 
| 628 | 
            +
                    help="Path to configuration file (default: .claude-mpm/configuration.yaml)"
         | 
| 629 | 
            +
                )
         | 
| 630 | 
            +
                validate_config_parser.add_argument(
         | 
| 631 | 
            +
                    "--strict",
         | 
| 632 | 
            +
                    action="store_true",
         | 
| 633 | 
            +
                    help="Treat warnings as errors"
         | 
| 634 | 
            +
                )
         | 
| 635 | 
            +
                
         | 
| 636 | 
            +
                # View config
         | 
| 637 | 
            +
                view_config_parser = config_subparsers.add_parser(
         | 
| 638 | 
            +
                    ConfigCommands.VIEW.value,
         | 
| 639 | 
            +
                    help="View current configuration"
         | 
| 640 | 
            +
                )
         | 
| 641 | 
            +
                view_config_parser.add_argument(
         | 
| 642 | 
            +
                    "--config-file",
         | 
| 643 | 
            +
                    type=Path,
         | 
| 644 | 
            +
                    help="Path to configuration file"
         | 
| 645 | 
            +
                )
         | 
| 646 | 
            +
                view_config_parser.add_argument(
         | 
| 647 | 
            +
                    "--section",
         | 
| 648 | 
            +
                    help="View specific configuration section"
         | 
| 649 | 
            +
                )
         | 
| 650 | 
            +
                view_config_parser.add_argument(
         | 
| 651 | 
            +
                    "--format",
         | 
| 652 | 
            +
                    choices=["table", "json", "yaml"],
         | 
| 653 | 
            +
                    default="table",
         | 
| 654 | 
            +
                    help="Output format (default: table)"
         | 
| 655 | 
            +
                )
         | 
| 656 | 
            +
                
         | 
| 657 | 
            +
                # Config status
         | 
| 658 | 
            +
                status_config_parser = config_subparsers.add_parser(
         | 
| 659 | 
            +
                    ConfigCommands.STATUS.value,
         | 
| 660 | 
            +
                    help="Show configuration status and health"
         | 
| 661 | 
            +
                )
         | 
| 662 | 
            +
                status_config_parser.add_argument(
         | 
| 663 | 
            +
                    "--config-file",
         | 
| 664 | 
            +
                    type=Path,
         | 
| 665 | 
            +
                    help="Path to configuration file"
         | 
| 666 | 
            +
                )
         | 
| 667 | 
            +
                status_config_parser.add_argument(
         | 
| 668 | 
            +
                    "--check-response-logging",
         | 
| 669 | 
            +
                    action="store_true",
         | 
| 670 | 
            +
                    help="Show detailed response logging configuration"
         | 
| 671 | 
            +
                )
         | 
| 672 | 
            +
                status_config_parser.add_argument(
         | 
| 673 | 
            +
                    "--verbose",
         | 
| 674 | 
            +
                    action="store_true",
         | 
| 675 | 
            +
                    help="Show detailed errors and warnings"
         | 
| 676 | 
            +
                )
         | 
| 677 | 
            +
                
         | 
| 507 678 | 
             
                # Monitor command with subcommands
         | 
| 508 679 | 
             
                monitor_parser = subparsers.add_parser(
         | 
| 509 680 | 
             
                    CLICommands.MONITOR.value,
         | 
| @@ -572,6 +743,10 @@ def create_parser(prog_name: str = "claude-mpm", version: str = "0.0.0") -> argp | |
| 572 743 | 
             
                    help="Host to bind to (default: localhost)"
         | 
| 573 744 | 
             
                )
         | 
| 574 745 |  | 
| 746 | 
            +
                # Import and add aggregate command parser
         | 
| 747 | 
            +
                from .commands.aggregate import add_aggregate_parser
         | 
| 748 | 
            +
                add_aggregate_parser(subparsers)
         | 
| 749 | 
            +
                
         | 
| 575 750 | 
             
                return parser
         | 
| 576 751 |  | 
| 577 752 |  | 
    
        claude_mpm/constants.py
    CHANGED
    
    | @@ -28,6 +28,8 @@ class CLICommands(str, Enum): | |
| 28 28 | 
             
                AGENTS = "agents"
         | 
| 29 29 | 
             
                MEMORY = "memory"
         | 
| 30 30 | 
             
                MONITOR = "monitor"
         | 
| 31 | 
            +
                CONFIG = "config"
         | 
| 32 | 
            +
                AGGREGATE = "aggregate"
         | 
| 31 33 |  | 
| 32 34 | 
             
                def with_prefix(self, prefix: CLIPrefix = CLIPrefix.MPM) -> str:
         | 
| 33 35 | 
             
                    """Get command with prefix."""
         | 
| @@ -80,6 +82,23 @@ class MonitorCommands(str, Enum): | |
| 80 82 | 
             
                PORT = "port"
         | 
| 81 83 |  | 
| 82 84 |  | 
| 85 | 
            +
            class ConfigCommands(str, Enum):
         | 
| 86 | 
            +
                """Config subcommand constants."""
         | 
| 87 | 
            +
                VALIDATE = "validate"
         | 
| 88 | 
            +
                VIEW = "view"
         | 
| 89 | 
            +
                STATUS = "status"
         | 
| 90 | 
            +
             | 
| 91 | 
            +
             | 
| 92 | 
            +
            class AggregateCommands(str, Enum):
         | 
| 93 | 
            +
                """Event aggregator subcommand constants."""
         | 
| 94 | 
            +
                START = "start"
         | 
| 95 | 
            +
                STOP = "stop"
         | 
| 96 | 
            +
                STATUS = "status"
         | 
| 97 | 
            +
                SESSIONS = "sessions"
         | 
| 98 | 
            +
                VIEW = "view"
         | 
| 99 | 
            +
                EXPORT = "export"
         | 
| 100 | 
            +
             | 
| 101 | 
            +
             | 
| 83 102 | 
             
            class CLIFlags(str, Enum):
         | 
| 84 103 | 
             
                """CLI flag constants (without prefix)."""
         | 
| 85 104 | 
             
                # Logging flags
         |