claude-mpm 4.1.1__py3-none-any.whl ā 4.1.3__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/BUILD_NUMBER +1 -1
- claude_mpm/VERSION +1 -1
- claude_mpm/__main__.py +1 -1
- claude_mpm/agents/BASE_PM.md +74 -46
- claude_mpm/agents/INSTRUCTIONS.md +11 -153
- claude_mpm/agents/WORKFLOW.md +61 -321
- claude_mpm/agents/__init__.py +11 -11
- claude_mpm/agents/agent_loader.py +23 -20
- claude_mpm/agents/agent_loader_integration.py +1 -1
- claude_mpm/agents/agents_metadata.py +27 -0
- claude_mpm/agents/async_agent_loader.py +5 -8
- claude_mpm/agents/base_agent_loader.py +36 -25
- claude_mpm/agents/frontmatter_validator.py +6 -6
- claude_mpm/agents/schema/agent_schema.json +1 -1
- claude_mpm/agents/system_agent_config.py +9 -9
- claude_mpm/agents/templates/api_qa.json +47 -2
- claude_mpm/agents/templates/engineer.json +33 -11
- claude_mpm/agents/templates/imagemagick.json +256 -0
- claude_mpm/agents/templates/qa.json +41 -2
- claude_mpm/agents/templates/ticketing.json +5 -5
- claude_mpm/agents/templates/web_qa.json +50 -2
- claude_mpm/cli/__init__.py +51 -46
- claude_mpm/cli/__main__.py +1 -1
- claude_mpm/cli/commands/__init__.py +10 -12
- claude_mpm/cli/commands/agent_manager.py +186 -181
- claude_mpm/cli/commands/agents.py +648 -1098
- claude_mpm/cli/commands/aggregate.py +30 -29
- claude_mpm/cli/commands/cleanup.py +50 -44
- claude_mpm/cli/commands/cleanup_orphaned_agents.py +25 -25
- claude_mpm/cli/commands/config.py +162 -127
- claude_mpm/cli/commands/doctor.py +52 -62
- claude_mpm/cli/commands/info.py +37 -25
- claude_mpm/cli/commands/mcp.py +3 -7
- claude_mpm/cli/commands/mcp_command_router.py +14 -18
- claude_mpm/cli/commands/mcp_install_commands.py +28 -23
- claude_mpm/cli/commands/mcp_pipx_config.py +58 -49
- claude_mpm/cli/commands/mcp_server_commands.py +23 -17
- claude_mpm/cli/commands/memory.py +339 -967
- claude_mpm/cli/commands/monitor.py +117 -88
- claude_mpm/cli/commands/run.py +233 -542
- claude_mpm/cli/commands/socketio_monitor.py +17 -19
- claude_mpm/cli/commands/tickets.py +92 -92
- claude_mpm/cli/parser.py +1 -5
- claude_mpm/cli/parsers/__init__.py +1 -1
- claude_mpm/cli/parsers/agent_manager_parser.py +50 -98
- claude_mpm/cli/parsers/agents_parser.py +2 -3
- claude_mpm/cli/parsers/base_parser.py +7 -5
- claude_mpm/cli/parsers/mcp_parser.py +4 -2
- claude_mpm/cli/parsers/monitor_parser.py +26 -18
- claude_mpm/cli/shared/__init__.py +10 -10
- claude_mpm/cli/shared/argument_patterns.py +57 -71
- claude_mpm/cli/shared/base_command.py +61 -53
- claude_mpm/cli/shared/error_handling.py +62 -58
- claude_mpm/cli/shared/output_formatters.py +78 -77
- claude_mpm/cli/startup_logging.py +280 -172
- claude_mpm/cli/utils.py +10 -11
- claude_mpm/cli_module/__init__.py +1 -1
- claude_mpm/cli_module/args.py +1 -1
- claude_mpm/cli_module/migration_example.py +5 -5
- claude_mpm/config/__init__.py +9 -9
- claude_mpm/config/agent_config.py +15 -14
- claude_mpm/config/experimental_features.py +4 -4
- claude_mpm/config/paths.py +0 -1
- claude_mpm/config/socketio_config.py +5 -6
- claude_mpm/constants.py +1 -2
- claude_mpm/core/__init__.py +8 -8
- claude_mpm/core/agent_name_normalizer.py +1 -1
- claude_mpm/core/agent_registry.py +22 -29
- claude_mpm/core/agent_session_manager.py +3 -3
- claude_mpm/core/base_service.py +7 -15
- claude_mpm/core/cache.py +4 -6
- claude_mpm/core/claude_runner.py +85 -113
- claude_mpm/core/config.py +43 -28
- claude_mpm/core/config_aliases.py +0 -9
- claude_mpm/core/config_constants.py +52 -30
- claude_mpm/core/constants.py +0 -1
- claude_mpm/core/container.py +18 -27
- claude_mpm/core/exceptions.py +2 -2
- claude_mpm/core/factories.py +10 -12
- claude_mpm/core/framework_loader.py +500 -680
- claude_mpm/core/hook_manager.py +26 -22
- claude_mpm/core/hook_performance_config.py +58 -47
- claude_mpm/core/injectable_service.py +1 -1
- claude_mpm/core/interactive_session.py +61 -152
- claude_mpm/core/interfaces.py +1 -100
- claude_mpm/core/lazy.py +5 -5
- claude_mpm/core/log_manager.py +587 -0
- claude_mpm/core/logger.py +125 -8
- claude_mpm/core/logging_config.py +15 -17
- claude_mpm/core/minimal_framework_loader.py +5 -8
- claude_mpm/core/oneshot_session.py +15 -33
- claude_mpm/core/optimized_agent_loader.py +4 -6
- claude_mpm/core/optimized_startup.py +2 -1
- claude_mpm/core/output_style_manager.py +147 -106
- claude_mpm/core/pm_hook_interceptor.py +0 -1
- claude_mpm/core/service_registry.py +11 -8
- claude_mpm/core/session_manager.py +1 -2
- claude_mpm/core/shared/__init__.py +1 -1
- claude_mpm/core/shared/config_loader.py +101 -97
- claude_mpm/core/shared/path_resolver.py +72 -68
- claude_mpm/core/shared/singleton_manager.py +56 -50
- claude_mpm/core/socketio_pool.py +26 -6
- claude_mpm/core/tool_access_control.py +4 -5
- claude_mpm/core/typing_utils.py +50 -59
- claude_mpm/core/unified_agent_registry.py +14 -19
- claude_mpm/core/unified_config.py +4 -6
- claude_mpm/core/unified_paths.py +197 -109
- claude_mpm/dashboard/open_dashboard.py +2 -4
- claude_mpm/experimental/cli_enhancements.py +51 -36
- claude_mpm/generators/agent_profile_generator.py +2 -4
- claude_mpm/hooks/base_hook.py +1 -2
- claude_mpm/hooks/claude_hooks/connection_pool.py +72 -26
- claude_mpm/hooks/claude_hooks/event_handlers.py +99 -154
- claude_mpm/hooks/claude_hooks/hook_handler.py +110 -720
- claude_mpm/hooks/claude_hooks/hook_handler_eventbus.py +104 -77
- claude_mpm/hooks/claude_hooks/hook_handler_original.py +1040 -0
- claude_mpm/hooks/claude_hooks/hook_handler_refactored.py +347 -0
- claude_mpm/hooks/claude_hooks/memory_integration.py +2 -4
- claude_mpm/hooks/claude_hooks/response_tracking.py +15 -11
- claude_mpm/hooks/claude_hooks/services/__init__.py +13 -0
- claude_mpm/hooks/claude_hooks/services/connection_manager.py +190 -0
- claude_mpm/hooks/claude_hooks/services/duplicate_detector.py +106 -0
- claude_mpm/hooks/claude_hooks/services/state_manager.py +282 -0
- claude_mpm/hooks/claude_hooks/services/subagent_processor.py +374 -0
- claude_mpm/hooks/claude_hooks/tool_analysis.py +12 -18
- claude_mpm/hooks/memory_integration_hook.py +5 -5
- claude_mpm/hooks/tool_call_interceptor.py +1 -1
- claude_mpm/hooks/validation_hooks.py +4 -4
- claude_mpm/init.py +4 -9
- claude_mpm/models/__init__.py +2 -2
- claude_mpm/models/agent_session.py +11 -14
- claude_mpm/scripts/mcp_server.py +20 -11
- claude_mpm/scripts/mcp_wrapper.py +5 -5
- claude_mpm/scripts/mpm_doctor.py +321 -0
- claude_mpm/scripts/socketio_daemon.py +28 -25
- claude_mpm/scripts/socketio_daemon_hardened.py +298 -258
- claude_mpm/scripts/socketio_server_manager.py +116 -95
- claude_mpm/services/__init__.py +49 -49
- claude_mpm/services/agent_capabilities_service.py +12 -18
- claude_mpm/services/agents/__init__.py +22 -22
- claude_mpm/services/agents/agent_builder.py +140 -119
- claude_mpm/services/agents/deployment/__init__.py +3 -3
- claude_mpm/services/agents/deployment/agent_config_provider.py +9 -9
- claude_mpm/services/agents/deployment/agent_configuration_manager.py +19 -20
- claude_mpm/services/agents/deployment/agent_definition_factory.py +1 -5
- claude_mpm/services/agents/deployment/agent_deployment.py +129 -511
- claude_mpm/services/agents/deployment/agent_discovery_service.py +4 -8
- claude_mpm/services/agents/deployment/agent_environment_manager.py +2 -7
- claude_mpm/services/agents/deployment/agent_filesystem_manager.py +6 -10
- claude_mpm/services/agents/deployment/agent_format_converter.py +11 -15
- claude_mpm/services/agents/deployment/agent_frontmatter_validator.py +2 -3
- claude_mpm/services/agents/deployment/agent_lifecycle_manager.py +5 -5
- claude_mpm/services/agents/deployment/agent_metrics_collector.py +13 -19
- claude_mpm/services/agents/deployment/agent_restore_handler.py +0 -1
- claude_mpm/services/agents/deployment/agent_template_builder.py +26 -35
- claude_mpm/services/agents/deployment/agent_validator.py +0 -1
- claude_mpm/services/agents/deployment/agent_version_manager.py +7 -9
- claude_mpm/services/agents/deployment/agent_versioning.py +3 -3
- claude_mpm/services/agents/deployment/agents_directory_resolver.py +6 -7
- claude_mpm/services/agents/deployment/async_agent_deployment.py +51 -38
- claude_mpm/services/agents/deployment/base_agent_locator.py +132 -0
- claude_mpm/services/agents/deployment/config/__init__.py +1 -1
- claude_mpm/services/agents/deployment/config/deployment_config.py +7 -8
- claude_mpm/services/agents/deployment/deployment_results_manager.py +185 -0
- claude_mpm/services/agents/deployment/deployment_type_detector.py +1 -1
- claude_mpm/services/agents/deployment/deployment_wrapper.py +18 -18
- claude_mpm/services/agents/deployment/facade/__init__.py +1 -1
- claude_mpm/services/agents/deployment/facade/deployment_executor.py +0 -3
- claude_mpm/services/agents/deployment/facade/deployment_facade.py +3 -4
- claude_mpm/services/agents/deployment/interface_adapter.py +5 -7
- claude_mpm/services/agents/deployment/multi_source_deployment_service.py +345 -276
- claude_mpm/services/agents/deployment/pipeline/__init__.py +2 -2
- claude_mpm/services/agents/deployment/pipeline/pipeline_builder.py +1 -1
- claude_mpm/services/agents/deployment/pipeline/pipeline_context.py +6 -4
- claude_mpm/services/agents/deployment/pipeline/pipeline_executor.py +3 -3
- claude_mpm/services/agents/deployment/pipeline/steps/__init__.py +2 -2
- claude_mpm/services/agents/deployment/pipeline/steps/agent_processing_step.py +14 -13
- claude_mpm/services/agents/deployment/pipeline/steps/base_step.py +0 -1
- claude_mpm/services/agents/deployment/pipeline/steps/configuration_step.py +1 -1
- claude_mpm/services/agents/deployment/pipeline/steps/target_directory_step.py +8 -9
- claude_mpm/services/agents/deployment/pipeline/steps/validation_step.py +1 -1
- claude_mpm/services/agents/deployment/processors/__init__.py +1 -1
- claude_mpm/services/agents/deployment/processors/agent_processor.py +20 -16
- claude_mpm/services/agents/deployment/refactored_agent_deployment_service.py +5 -12
- claude_mpm/services/agents/deployment/results/__init__.py +1 -1
- claude_mpm/services/agents/deployment/results/deployment_result_builder.py +1 -1
- claude_mpm/services/agents/deployment/single_agent_deployer.py +315 -0
- claude_mpm/services/agents/deployment/strategies/__init__.py +2 -2
- claude_mpm/services/agents/deployment/strategies/base_strategy.py +1 -7
- claude_mpm/services/agents/deployment/strategies/project_strategy.py +1 -4
- claude_mpm/services/agents/deployment/strategies/system_strategy.py +2 -3
- claude_mpm/services/agents/deployment/strategies/user_strategy.py +3 -7
- claude_mpm/services/agents/deployment/validation/__init__.py +1 -1
- claude_mpm/services/agents/deployment/validation/agent_validator.py +1 -1
- claude_mpm/services/agents/deployment/validation/template_validator.py +2 -2
- claude_mpm/services/agents/deployment/validation/validation_result.py +2 -6
- claude_mpm/services/agents/loading/__init__.py +1 -1
- claude_mpm/services/agents/loading/agent_profile_loader.py +6 -12
- claude_mpm/services/agents/loading/base_agent_manager.py +5 -5
- claude_mpm/services/agents/loading/framework_agent_loader.py +2 -4
- claude_mpm/services/agents/management/__init__.py +1 -1
- claude_mpm/services/agents/management/agent_capabilities_generator.py +1 -3
- claude_mpm/services/agents/management/agent_management_service.py +5 -9
- claude_mpm/services/agents/memory/__init__.py +4 -4
- claude_mpm/services/agents/memory/agent_memory_manager.py +157 -503
- claude_mpm/services/agents/memory/agent_persistence_service.py +0 -2
- claude_mpm/services/agents/memory/content_manager.py +44 -38
- claude_mpm/services/agents/memory/memory_categorization_service.py +165 -0
- claude_mpm/services/agents/memory/memory_file_service.py +103 -0
- claude_mpm/services/agents/memory/memory_format_service.py +201 -0
- claude_mpm/services/agents/memory/memory_limits_service.py +99 -0
- claude_mpm/services/agents/memory/template_generator.py +4 -6
- claude_mpm/services/agents/registry/__init__.py +11 -7
- claude_mpm/services/agents/registry/deployed_agent_discovery.py +30 -27
- claude_mpm/services/agents/registry/modification_tracker.py +3 -6
- claude_mpm/services/async_session_logger.py +1 -2
- claude_mpm/services/claude_session_logger.py +1 -2
- claude_mpm/services/cli/__init__.py +18 -0
- claude_mpm/services/cli/agent_cleanup_service.py +407 -0
- claude_mpm/services/cli/agent_dependency_service.py +395 -0
- claude_mpm/services/cli/agent_listing_service.py +463 -0
- claude_mpm/services/cli/agent_output_formatter.py +605 -0
- claude_mpm/services/cli/agent_validation_service.py +589 -0
- claude_mpm/services/cli/dashboard_launcher.py +424 -0
- claude_mpm/services/cli/memory_crud_service.py +617 -0
- claude_mpm/services/cli/memory_output_formatter.py +604 -0
- claude_mpm/services/cli/session_manager.py +513 -0
- claude_mpm/services/cli/socketio_manager.py +498 -0
- claude_mpm/services/cli/startup_checker.py +370 -0
- claude_mpm/services/command_deployment_service.py +173 -0
- claude_mpm/services/command_handler_service.py +20 -22
- claude_mpm/services/core/__init__.py +25 -25
- claude_mpm/services/core/base.py +0 -5
- claude_mpm/services/core/cache_manager.py +311 -0
- claude_mpm/services/core/interfaces/__init__.py +32 -32
- claude_mpm/services/core/interfaces/agent.py +0 -21
- claude_mpm/services/core/interfaces/communication.py +0 -27
- claude_mpm/services/core/interfaces/infrastructure.py +0 -56
- claude_mpm/services/core/interfaces/service.py +0 -29
- claude_mpm/services/core/memory_manager.py +637 -0
- claude_mpm/services/core/path_resolver.py +498 -0
- claude_mpm/services/core/service_container.py +520 -0
- claude_mpm/services/core/service_interfaces.py +436 -0
- claude_mpm/services/diagnostics/__init__.py +1 -1
- claude_mpm/services/diagnostics/checks/__init__.py +6 -6
- claude_mpm/services/diagnostics/checks/agent_check.py +152 -97
- claude_mpm/services/diagnostics/checks/base_check.py +12 -16
- claude_mpm/services/diagnostics/checks/claude_desktop_check.py +84 -81
- claude_mpm/services/diagnostics/checks/common_issues_check.py +99 -91
- claude_mpm/services/diagnostics/checks/configuration_check.py +82 -77
- claude_mpm/services/diagnostics/checks/filesystem_check.py +67 -68
- claude_mpm/services/diagnostics/checks/installation_check.py +254 -94
- claude_mpm/services/diagnostics/checks/mcp_check.py +90 -88
- claude_mpm/services/diagnostics/checks/monitor_check.py +75 -76
- claude_mpm/services/diagnostics/checks/startup_log_check.py +67 -73
- claude_mpm/services/diagnostics/diagnostic_runner.py +67 -59
- claude_mpm/services/diagnostics/doctor_reporter.py +107 -70
- claude_mpm/services/diagnostics/models.py +21 -19
- claude_mpm/services/event_aggregator.py +10 -17
- claude_mpm/services/event_bus/__init__.py +1 -1
- claude_mpm/services/event_bus/config.py +54 -35
- claude_mpm/services/event_bus/event_bus.py +76 -71
- claude_mpm/services/event_bus/relay.py +74 -64
- claude_mpm/services/events/__init__.py +11 -11
- claude_mpm/services/events/consumers/__init__.py +3 -3
- claude_mpm/services/events/consumers/dead_letter.py +71 -63
- claude_mpm/services/events/consumers/logging.py +39 -37
- claude_mpm/services/events/consumers/metrics.py +56 -57
- claude_mpm/services/events/consumers/socketio.py +82 -81
- claude_mpm/services/events/core.py +110 -99
- claude_mpm/services/events/interfaces.py +56 -72
- claude_mpm/services/events/producers/__init__.py +1 -1
- claude_mpm/services/events/producers/hook.py +38 -38
- claude_mpm/services/events/producers/system.py +46 -44
- claude_mpm/services/exceptions.py +81 -80
- claude_mpm/services/framework_claude_md_generator/__init__.py +2 -4
- claude_mpm/services/framework_claude_md_generator/content_assembler.py +3 -5
- claude_mpm/services/framework_claude_md_generator/content_validator.py +1 -1
- claude_mpm/services/framework_claude_md_generator/deployment_manager.py +4 -4
- claude_mpm/services/framework_claude_md_generator/section_generators/__init__.py +0 -1
- claude_mpm/services/framework_claude_md_generator/section_generators/agents.py +0 -2
- claude_mpm/services/framework_claude_md_generator/version_manager.py +4 -5
- claude_mpm/services/hook_service.py +6 -9
- claude_mpm/services/infrastructure/__init__.py +1 -1
- claude_mpm/services/infrastructure/context_preservation.py +8 -12
- claude_mpm/services/infrastructure/monitoring.py +21 -23
- claude_mpm/services/mcp_gateway/__init__.py +37 -37
- claude_mpm/services/mcp_gateway/auto_configure.py +95 -103
- claude_mpm/services/mcp_gateway/config/__init__.py +1 -1
- claude_mpm/services/mcp_gateway/config/config_loader.py +23 -25
- claude_mpm/services/mcp_gateway/config/config_schema.py +5 -5
- claude_mpm/services/mcp_gateway/config/configuration.py +9 -6
- claude_mpm/services/mcp_gateway/core/__init__.py +10 -10
- claude_mpm/services/mcp_gateway/core/base.py +0 -3
- claude_mpm/services/mcp_gateway/core/interfaces.py +1 -38
- claude_mpm/services/mcp_gateway/core/process_pool.py +99 -93
- claude_mpm/services/mcp_gateway/core/singleton_manager.py +65 -62
- claude_mpm/services/mcp_gateway/core/startup_verification.py +75 -74
- claude_mpm/services/mcp_gateway/main.py +2 -1
- claude_mpm/services/mcp_gateway/registry/service_registry.py +5 -8
- claude_mpm/services/mcp_gateway/registry/tool_registry.py +1 -1
- claude_mpm/services/mcp_gateway/server/__init__.py +1 -1
- claude_mpm/services/mcp_gateway/server/mcp_gateway.py +12 -19
- claude_mpm/services/mcp_gateway/server/stdio_handler.py +4 -3
- claude_mpm/services/mcp_gateway/server/stdio_server.py +79 -71
- claude_mpm/services/mcp_gateway/tools/__init__.py +2 -2
- claude_mpm/services/mcp_gateway/tools/base_adapter.py +5 -6
- claude_mpm/services/mcp_gateway/tools/document_summarizer.py +13 -22
- claude_mpm/services/mcp_gateway/tools/health_check_tool.py +79 -78
- claude_mpm/services/mcp_gateway/tools/hello_world.py +12 -14
- claude_mpm/services/mcp_gateway/tools/ticket_tools.py +42 -49
- claude_mpm/services/mcp_gateway/tools/unified_ticket_tool.py +51 -55
- claude_mpm/services/memory/__init__.py +3 -3
- claude_mpm/services/memory/builder.py +3 -6
- claude_mpm/services/memory/cache/__init__.py +1 -1
- claude_mpm/services/memory/cache/shared_prompt_cache.py +3 -5
- claude_mpm/services/memory/cache/simple_cache.py +1 -1
- claude_mpm/services/memory/indexed_memory.py +5 -7
- claude_mpm/services/memory/optimizer.py +7 -10
- claude_mpm/services/memory/router.py +8 -9
- claude_mpm/services/memory_hook_service.py +48 -34
- claude_mpm/services/monitor_build_service.py +77 -73
- claude_mpm/services/port_manager.py +130 -108
- claude_mpm/services/project/analyzer.py +12 -10
- claude_mpm/services/project/registry.py +11 -11
- claude_mpm/services/recovery_manager.py +10 -19
- claude_mpm/services/response_tracker.py +0 -1
- claude_mpm/services/runner_configuration_service.py +19 -20
- claude_mpm/services/session_management_service.py +7 -11
- claude_mpm/services/shared/__init__.py +1 -1
- claude_mpm/services/shared/async_service_base.py +58 -50
- claude_mpm/services/shared/config_service_base.py +73 -67
- claude_mpm/services/shared/lifecycle_service_base.py +82 -78
- claude_mpm/services/shared/manager_base.py +94 -82
- claude_mpm/services/shared/service_factory.py +96 -98
- claude_mpm/services/socketio/__init__.py +3 -3
- claude_mpm/services/socketio/client_proxy.py +5 -5
- claude_mpm/services/socketio/event_normalizer.py +199 -181
- claude_mpm/services/socketio/handlers/__init__.py +3 -3
- claude_mpm/services/socketio/handlers/base.py +5 -4
- claude_mpm/services/socketio/handlers/connection.py +163 -136
- claude_mpm/services/socketio/handlers/file.py +13 -14
- claude_mpm/services/socketio/handlers/git.py +12 -7
- claude_mpm/services/socketio/handlers/hook.py +49 -44
- claude_mpm/services/socketio/handlers/memory.py +0 -1
- claude_mpm/services/socketio/handlers/project.py +0 -1
- claude_mpm/services/socketio/handlers/registry.py +37 -19
- claude_mpm/services/socketio/migration_utils.py +98 -84
- claude_mpm/services/socketio/server/__init__.py +1 -1
- claude_mpm/services/socketio/server/broadcaster.py +81 -87
- claude_mpm/services/socketio/server/core.py +65 -54
- claude_mpm/services/socketio/server/eventbus_integration.py +95 -56
- claude_mpm/services/socketio/server/main.py +64 -38
- claude_mpm/services/socketio_client_manager.py +10 -12
- claude_mpm/services/subprocess_launcher_service.py +4 -7
- claude_mpm/services/system_instructions_service.py +13 -14
- claude_mpm/services/ticket_manager.py +2 -2
- claude_mpm/services/utility_service.py +5 -13
- claude_mpm/services/version_control/__init__.py +16 -16
- claude_mpm/services/version_control/branch_strategy.py +5 -8
- claude_mpm/services/version_control/conflict_resolution.py +9 -23
- claude_mpm/services/version_control/git_operations.py +5 -7
- claude_mpm/services/version_control/semantic_versioning.py +16 -17
- claude_mpm/services/version_control/version_parser.py +13 -18
- claude_mpm/services/version_service.py +10 -11
- claude_mpm/storage/__init__.py +1 -1
- claude_mpm/storage/state_storage.py +22 -28
- claude_mpm/utils/__init__.py +6 -6
- claude_mpm/utils/agent_dependency_loader.py +47 -33
- claude_mpm/utils/config_manager.py +11 -14
- claude_mpm/utils/dependency_cache.py +1 -1
- claude_mpm/utils/dependency_manager.py +13 -17
- claude_mpm/utils/dependency_strategies.py +8 -10
- claude_mpm/utils/environment_context.py +3 -9
- claude_mpm/utils/error_handler.py +3 -13
- claude_mpm/utils/file_utils.py +1 -1
- claude_mpm/utils/path_operations.py +8 -12
- claude_mpm/utils/robust_installer.py +110 -33
- claude_mpm/utils/subprocess_utils.py +5 -6
- claude_mpm/validation/agent_validator.py +3 -6
- claude_mpm/validation/frontmatter_validator.py +1 -1
- {claude_mpm-4.1.1.dist-info ā claude_mpm-4.1.3.dist-info}/METADATA +1 -1
- claude_mpm-4.1.3.dist-info/RECORD +528 -0
- claude_mpm/cli/commands/run_config_checker.py +0 -160
- claude_mpm-4.1.1.dist-info/RECORD +0 -494
- {claude_mpm-4.1.1.dist-info ā claude_mpm-4.1.3.dist-info}/WHEEL +0 -0
- {claude_mpm-4.1.1.dist-info ā claude_mpm-4.1.3.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.1.1.dist-info ā claude_mpm-4.1.3.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.1.1.dist-info ā claude_mpm-4.1.3.dist-info}/top_level.txt +0 -0
|
@@ -12,7 +12,7 @@ import platform
|
|
|
12
12
|
import subprocess
|
|
13
13
|
import sys
|
|
14
14
|
from pathlib import Path
|
|
15
|
-
from typing import
|
|
15
|
+
from typing import Any, Dict
|
|
16
16
|
|
|
17
17
|
from claude_mpm.core.logger import get_logger
|
|
18
18
|
|
|
@@ -22,18 +22,30 @@ logger = get_logger(__name__)
|
|
|
22
22
|
def find_claude_config_path() -> Path:
|
|
23
23
|
"""Find the Claude Code configuration file path."""
|
|
24
24
|
system = platform.system()
|
|
25
|
-
|
|
25
|
+
|
|
26
26
|
if system == "Darwin": # macOS
|
|
27
|
-
config_path =
|
|
27
|
+
config_path = (
|
|
28
|
+
Path.home()
|
|
29
|
+
/ "Library"
|
|
30
|
+
/ "Application Support"
|
|
31
|
+
/ "Claude"
|
|
32
|
+
/ "claude_desktop_config.json"
|
|
33
|
+
)
|
|
28
34
|
elif system == "Windows":
|
|
29
35
|
appdata = os.environ.get("APPDATA")
|
|
30
36
|
if appdata:
|
|
31
37
|
config_path = Path(appdata) / "Claude" / "claude_desktop_config.json"
|
|
32
38
|
else:
|
|
33
|
-
config_path =
|
|
39
|
+
config_path = (
|
|
40
|
+
Path.home()
|
|
41
|
+
/ "AppData"
|
|
42
|
+
/ "Roaming"
|
|
43
|
+
/ "Claude"
|
|
44
|
+
/ "claude_desktop_config.json"
|
|
45
|
+
)
|
|
34
46
|
else: # Linux and others
|
|
35
47
|
config_path = Path.home() / ".config" / "Claude" / "claude_desktop_config.json"
|
|
36
|
-
|
|
48
|
+
|
|
37
49
|
return config_path
|
|
38
50
|
|
|
39
51
|
|
|
@@ -43,67 +55,62 @@ def check_pipx_installation() -> bool:
|
|
|
43
55
|
# Check if running from pipx
|
|
44
56
|
if "pipx" in sys.executable.lower():
|
|
45
57
|
return True
|
|
46
|
-
|
|
58
|
+
|
|
47
59
|
# Check pipx list
|
|
48
60
|
result = subprocess.run(
|
|
49
61
|
["pipx", "list", "--json"],
|
|
50
62
|
capture_output=True,
|
|
51
63
|
text=True,
|
|
52
|
-
timeout=5
|
|
64
|
+
timeout=5,
|
|
65
|
+
check=False,
|
|
53
66
|
)
|
|
54
67
|
if result.returncode == 0:
|
|
55
68
|
pipx_data = json.loads(result.stdout)
|
|
56
69
|
return "claude-mpm" in pipx_data.get("venvs", {})
|
|
57
70
|
except Exception:
|
|
58
71
|
pass
|
|
59
|
-
|
|
72
|
+
|
|
60
73
|
return False
|
|
61
74
|
|
|
62
75
|
|
|
63
76
|
def create_mcp_config() -> Dict[str, Any]:
|
|
64
77
|
"""Create MCP configuration for pipx installation."""
|
|
65
|
-
return {
|
|
66
|
-
"mcpServers": {
|
|
67
|
-
"claude-mpm-gateway": {
|
|
68
|
-
"command": "claude-mpm-mcp"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
78
|
+
return {"mcpServers": {"claude-mpm-gateway": {"command": "claude-mpm-mcp"}}}
|
|
72
79
|
|
|
73
80
|
|
|
74
81
|
def configure_mcp_for_pipx(args) -> int:
|
|
75
82
|
"""
|
|
76
83
|
Configure MCP for pipx installation.
|
|
77
|
-
|
|
84
|
+
|
|
78
85
|
Args:
|
|
79
86
|
args: Command line arguments
|
|
80
|
-
|
|
87
|
+
|
|
81
88
|
Returns:
|
|
82
89
|
Exit code (0 for success, 1 for failure)
|
|
83
90
|
"""
|
|
84
91
|
print("Claude MPM - MCP Configuration for pipx")
|
|
85
92
|
print("=" * 40)
|
|
86
|
-
|
|
93
|
+
|
|
87
94
|
# Check if this is a pipx installation
|
|
88
95
|
if not check_pipx_installation():
|
|
89
96
|
print("\nā ļø This doesn't appear to be a pipx installation")
|
|
90
97
|
print("This command is specifically for pipx users.")
|
|
91
98
|
print("\nFor other installation methods, see:")
|
|
92
99
|
print(" docs/MCP_SETUP.md")
|
|
93
|
-
|
|
100
|
+
|
|
94
101
|
if not args.force:
|
|
95
102
|
return 1
|
|
96
103
|
print("\n--force flag detected, continuing anyway...")
|
|
97
|
-
|
|
104
|
+
|
|
98
105
|
# Find Claude config
|
|
99
106
|
config_path = find_claude_config_path()
|
|
100
107
|
print(f"\nš Claude config path: {config_path}")
|
|
101
|
-
|
|
108
|
+
|
|
102
109
|
# Load existing config
|
|
103
110
|
existing_config = {}
|
|
104
111
|
if config_path.exists():
|
|
105
112
|
try:
|
|
106
|
-
with open(config_path
|
|
113
|
+
with open(config_path) as f:
|
|
107
114
|
existing_config = json.load(f)
|
|
108
115
|
print("ā
Existing config loaded")
|
|
109
116
|
except json.JSONDecodeError:
|
|
@@ -114,28 +121,31 @@ def configure_mcp_for_pipx(args) -> int:
|
|
|
114
121
|
else:
|
|
115
122
|
print("š Config will be created")
|
|
116
123
|
config_path.parent.mkdir(parents=True, exist_ok=True)
|
|
117
|
-
|
|
124
|
+
|
|
118
125
|
# Check for existing MCP config
|
|
119
|
-
if
|
|
126
|
+
if (
|
|
127
|
+
"mcpServers" in existing_config
|
|
128
|
+
and "claude-mpm-gateway" in existing_config["mcpServers"]
|
|
129
|
+
):
|
|
120
130
|
print("\nā ļø claude-mpm-gateway is already configured")
|
|
121
131
|
if not args.force:
|
|
122
132
|
print("Use --force to overwrite")
|
|
123
133
|
return 0
|
|
124
134
|
print("Overwriting existing configuration...")
|
|
125
|
-
|
|
135
|
+
|
|
126
136
|
# Create and merge config
|
|
127
137
|
mcp_config = create_mcp_config()
|
|
128
138
|
existing_config.update(mcp_config)
|
|
129
|
-
|
|
139
|
+
|
|
130
140
|
# Show what will be written
|
|
131
141
|
if not args.quiet:
|
|
132
142
|
print("\nš Configuration to write:")
|
|
133
143
|
print(json.dumps(mcp_config, indent=2))
|
|
134
|
-
|
|
144
|
+
|
|
135
145
|
# Write config
|
|
136
146
|
if not args.dry_run:
|
|
137
147
|
try:
|
|
138
|
-
with open(config_path,
|
|
148
|
+
with open(config_path, "w") as f:
|
|
139
149
|
json.dump(existing_config, f, indent=2)
|
|
140
150
|
print(f"\nā
Configuration written to: {config_path}")
|
|
141
151
|
except Exception as e:
|
|
@@ -143,7 +153,7 @@ def configure_mcp_for_pipx(args) -> int:
|
|
|
143
153
|
return 1
|
|
144
154
|
else:
|
|
145
155
|
print("\n--dry-run: Configuration not written")
|
|
146
|
-
|
|
156
|
+
|
|
147
157
|
# Test the command
|
|
148
158
|
print("\nš§Ŗ Testing claude-mpm-mcp command...")
|
|
149
159
|
try:
|
|
@@ -151,7 +161,8 @@ def configure_mcp_for_pipx(args) -> int:
|
|
|
151
161
|
["which", "claude-mpm-mcp"],
|
|
152
162
|
capture_output=True,
|
|
153
163
|
text=True,
|
|
154
|
-
timeout=2
|
|
164
|
+
timeout=2,
|
|
165
|
+
check=False,
|
|
155
166
|
)
|
|
156
167
|
if result.returncode == 0:
|
|
157
168
|
print(f"ā
Command found: {result.stdout.strip()}")
|
|
@@ -160,40 +171,38 @@ def configure_mcp_for_pipx(args) -> int:
|
|
|
160
171
|
print(" Ensure pipx bin directory is in your PATH")
|
|
161
172
|
except Exception as e:
|
|
162
173
|
print(f"ā ļø Could not test command: {e}")
|
|
163
|
-
|
|
174
|
+
|
|
164
175
|
print("\n⨠Next steps:")
|
|
165
176
|
print("1. Restart Claude Code")
|
|
166
177
|
print("2. Look for the MCP icon in the interface")
|
|
167
178
|
print("3. Try using @claude-mpm-gateway in a conversation")
|
|
168
179
|
print("\nFor more help, see: docs/MCP_PIPX_SETUP.md")
|
|
169
|
-
|
|
180
|
+
|
|
170
181
|
return 0
|
|
171
182
|
|
|
172
183
|
|
|
173
184
|
def add_parser(subparsers):
|
|
174
185
|
"""Add the mcp-pipx-config command parser."""
|
|
175
186
|
parser = subparsers.add_parser(
|
|
176
|
-
|
|
177
|
-
help=
|
|
178
|
-
description=
|
|
187
|
+
"mcp-pipx-config",
|
|
188
|
+
help="Configure MCP for pipx installation",
|
|
189
|
+
description="Configure MCP Gateway for Claude Code when installed via pipx",
|
|
179
190
|
)
|
|
180
|
-
|
|
191
|
+
|
|
181
192
|
parser.add_argument(
|
|
182
|
-
|
|
183
|
-
action=
|
|
184
|
-
help=
|
|
193
|
+
"--force",
|
|
194
|
+
action="store_true",
|
|
195
|
+
help="Force configuration even if not pipx or already configured",
|
|
185
196
|
)
|
|
186
|
-
|
|
197
|
+
|
|
187
198
|
parser.add_argument(
|
|
188
|
-
|
|
189
|
-
action=
|
|
190
|
-
help=
|
|
199
|
+
"--dry-run",
|
|
200
|
+
action="store_true",
|
|
201
|
+
help="Show what would be done without making changes",
|
|
191
202
|
)
|
|
192
|
-
|
|
203
|
+
|
|
193
204
|
parser.add_argument(
|
|
194
|
-
|
|
195
|
-
action='store_true',
|
|
196
|
-
help='Suppress non-essential output'
|
|
205
|
+
"--quiet", action="store_true", help="Suppress non-essential output"
|
|
197
206
|
)
|
|
198
|
-
|
|
199
|
-
parser.set_defaults(func=configure_mcp_for_pipx)
|
|
207
|
+
|
|
208
|
+
parser.set_defaults(func=configure_mcp_for_pipx)
|
|
@@ -4,9 +4,7 @@ This module provides MCP server management commands.
|
|
|
4
4
|
Extracted from mcp.py to reduce complexity and improve maintainability.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
import asyncio
|
|
8
7
|
import os
|
|
9
|
-
import shutil
|
|
10
8
|
import sys
|
|
11
9
|
from pathlib import Path
|
|
12
10
|
|
|
@@ -51,28 +49,31 @@ class MCPServerCommands:
|
|
|
51
49
|
print("\n1. Run the configuration script:")
|
|
52
50
|
print(" python scripts/configure_mcp_server.py")
|
|
53
51
|
print("\n2. Or manually configure Claude Code:")
|
|
54
|
-
|
|
52
|
+
|
|
55
53
|
# Find project root for paths
|
|
56
54
|
project_root = Path(__file__).parent.parent.parent.parent.parent
|
|
57
|
-
|
|
55
|
+
|
|
58
56
|
# Use the direct command, not the wrapper
|
|
59
57
|
import shutil
|
|
58
|
+
|
|
60
59
|
claude_mpm_path = shutil.which("claude-mpm")
|
|
61
60
|
if not claude_mpm_path:
|
|
62
61
|
# Fallback to current executable
|
|
63
62
|
claude_mpm_path = sys.executable.replace("python", "claude-mpm")
|
|
64
|
-
|
|
63
|
+
|
|
65
64
|
print("\n Add this to your Claude Code configuration:")
|
|
66
|
-
print(
|
|
65
|
+
print(
|
|
66
|
+
" (~/Library/Application Support/Claude/claude_desktop_config.json on macOS)"
|
|
67
|
+
)
|
|
67
68
|
print("\n {")
|
|
68
69
|
print(' "mcpServers": {')
|
|
69
70
|
print(' "claude-mpm-gateway": {')
|
|
70
71
|
print(f' "command": "{claude_mpm_path}",')
|
|
71
|
-
print(
|
|
72
|
+
print(' "args": ["mcp", "server"],')
|
|
72
73
|
print(f' "cwd": "{project_root}"')
|
|
73
|
-
print(
|
|
74
|
-
print(
|
|
75
|
-
print(
|
|
74
|
+
print(" }")
|
|
75
|
+
print(" }")
|
|
76
|
+
print(" }")
|
|
76
77
|
print("\n3. Restart Claude Code to load the MCP server")
|
|
77
78
|
print("\nTo test the server directly:")
|
|
78
79
|
print(" claude-mpm mcp server")
|
|
@@ -86,26 +87,30 @@ class MCPServerCommands:
|
|
|
86
87
|
# Default behavior: Run the server directly in this process
|
|
87
88
|
if test_mode:
|
|
88
89
|
print("š§Ŗ Starting MCP server in test mode...", file=sys.stderr)
|
|
89
|
-
print(
|
|
90
|
+
print(
|
|
91
|
+
" This will run the server with stdio communication.", file=sys.stderr
|
|
92
|
+
)
|
|
90
93
|
print(" Press Ctrl+C to stop.\n", file=sys.stderr)
|
|
91
94
|
|
|
92
95
|
try:
|
|
93
96
|
# Import and run the server directly
|
|
94
|
-
from claude_mpm.services.mcp_gateway.server.stdio_server import
|
|
95
|
-
|
|
97
|
+
from claude_mpm.services.mcp_gateway.server.stdio_server import (
|
|
98
|
+
SimpleMCPServer,
|
|
99
|
+
)
|
|
100
|
+
|
|
96
101
|
# Set environment variable if in test mode
|
|
97
102
|
if test_mode:
|
|
98
103
|
os.environ["MCP_MODE"] = "test"
|
|
99
104
|
else:
|
|
100
105
|
os.environ["MCP_MODE"] = "production"
|
|
101
|
-
|
|
106
|
+
|
|
102
107
|
# Create and run the server
|
|
103
108
|
self.logger.info("Starting MCP Gateway Server directly...")
|
|
104
109
|
server = SimpleMCPServer(name="claude-mpm-gateway", version="1.0.0")
|
|
105
|
-
|
|
110
|
+
|
|
106
111
|
# Run the server asynchronously
|
|
107
112
|
await server.run()
|
|
108
|
-
|
|
113
|
+
|
|
109
114
|
return 0
|
|
110
115
|
|
|
111
116
|
except ImportError as e:
|
|
@@ -113,7 +118,8 @@ class MCPServerCommands:
|
|
|
113
118
|
# Don't print to stdout as it would interfere with JSON-RPC protocol
|
|
114
119
|
# Log to stderr instead
|
|
115
120
|
print(
|
|
116
|
-
f"ā Error: Could not import MCP server components: {e}",
|
|
121
|
+
f"ā Error: Could not import MCP server components: {e}",
|
|
122
|
+
file=sys.stderr,
|
|
117
123
|
)
|
|
118
124
|
print("\nMake sure the MCP package is installed:", file=sys.stderr)
|
|
119
125
|
print(" pip install mcp", file=sys.stderr)
|