claude-mpm 4.1.0__py3-none-any.whl → 4.1.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/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/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 +133 -58
- claude_mpm/agents/templates/web_ui.json +3 -3
- 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 +271 -268
- 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 +192 -141
- claude_mpm/cli/commands/monitor.py +117 -88
- claude_mpm/cli/commands/run.py +120 -84
- claude_mpm/cli/commands/run_config_checker.py +4 -5
- 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 +204 -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 +20 -23
- 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 +581 -280
- 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 -15
- 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 +93 -38
- claude_mpm/hooks/claude_hooks/hook_handler.py +130 -76
- claude_mpm/hooks/claude_hooks/hook_handler_eventbus.py +104 -77
- 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/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 +136 -106
- 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/config/__init__.py +1 -1
- claude_mpm/services/agents/deployment/config/deployment_config.py +7 -8
- 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/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 +280 -160
- 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/template_generator.py +4 -6
- claude_mpm/services/agents/registry/__init__.py +10 -6
- 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/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/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/diagnostics/__init__.py +1 -1
- claude_mpm/services/diagnostics/checks/__init__.py +6 -6
- claude_mpm/services/diagnostics/checks/agent_check.py +89 -80
- 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.0.dist-info → claude_mpm-4.1.2.dist-info}/METADATA +1 -1
- claude_mpm-4.1.2.dist-info/RECORD +498 -0
- claude_mpm-4.1.0.dist-info/RECORD +0 -494
- {claude_mpm-4.1.0.dist-info → claude_mpm-4.1.2.dist-info}/WHEEL +0 -0
- {claude_mpm-4.1.0.dist-info → claude_mpm-4.1.2.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.1.0.dist-info → claude_mpm-4.1.2.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.1.0.dist-info → claude_mpm-4.1.2.dist-info}/top_level.txt +0 -0
|
@@ -22,11 +22,11 @@ from .steps import (
|
|
|
22
22
|
)
|
|
23
23
|
|
|
24
24
|
__all__ = [
|
|
25
|
+
"BaseDeploymentStep",
|
|
26
|
+
"ConfigurationLoadStep",
|
|
25
27
|
"DeploymentPipelineBuilder",
|
|
26
28
|
"DeploymentPipelineExecutor",
|
|
27
29
|
"PipelineContext",
|
|
28
|
-
"BaseDeploymentStep",
|
|
29
30
|
"StepResult",
|
|
30
|
-
"ConfigurationLoadStep",
|
|
31
31
|
"TargetDirectorySetupStep",
|
|
32
32
|
]
|
|
@@ -42,7 +42,9 @@ class PipelineContext:
|
|
|
42
42
|
template_files: List[Path] = field(default_factory=list)
|
|
43
43
|
base_agent_data: Optional[Dict[str, Any]] = None
|
|
44
44
|
base_agent_version: Optional[tuple] = None
|
|
45
|
-
agent_sources: Dict[str, str] = field(
|
|
45
|
+
agent_sources: Dict[str, str] = field(
|
|
46
|
+
default_factory=dict
|
|
47
|
+
) # Maps agent names to sources
|
|
46
48
|
|
|
47
49
|
# Deployment results
|
|
48
50
|
results: Dict[str, Any] = field(default_factory=dict)
|
|
@@ -110,9 +112,9 @@ class PipelineContext:
|
|
|
110
112
|
"""Initialize the results dictionary with default structure."""
|
|
111
113
|
if not self.results:
|
|
112
114
|
self.results = {
|
|
113
|
-
"target_dir":
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
"target_dir": (
|
|
116
|
+
str(self.actual_target_dir) if self.actual_target_dir else ""
|
|
117
|
+
),
|
|
116
118
|
"deployed": [],
|
|
117
119
|
"updated": [],
|
|
118
120
|
"migrated": [],
|
|
@@ -6,7 +6,7 @@ from typing import Any, Dict, List
|
|
|
6
6
|
from claude_mpm.core.logger import get_logger
|
|
7
7
|
|
|
8
8
|
from .pipeline_context import PipelineContext
|
|
9
|
-
from .steps.base_step import BaseDeploymentStep
|
|
9
|
+
from .steps.base_step import BaseDeploymentStep
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class DeploymentPipelineExecutor:
|
|
@@ -93,7 +93,7 @@ class DeploymentPipelineExecutor:
|
|
|
93
93
|
step_execution_time = time.time() - step_start_time
|
|
94
94
|
context.step_timings[step.name] = step_execution_time
|
|
95
95
|
|
|
96
|
-
error_msg = f"Unexpected error in step {step.name}: {
|
|
96
|
+
error_msg = f"Unexpected error in step {step.name}: {e!s}"
|
|
97
97
|
self.logger.error(error_msg, exc_info=True)
|
|
98
98
|
context.add_error(error_msg)
|
|
99
99
|
failed_steps.append(step.name)
|
|
@@ -152,7 +152,7 @@ class DeploymentPipelineExecutor:
|
|
|
152
152
|
|
|
153
153
|
# Check for duplicate step names
|
|
154
154
|
step_names = [step.name for step in steps]
|
|
155
|
-
duplicates =
|
|
155
|
+
duplicates = {name for name in step_names if step_names.count(name) > 1}
|
|
156
156
|
if duplicates:
|
|
157
157
|
errors.append(f"Duplicate step names found: {duplicates}")
|
|
158
158
|
|
|
@@ -11,9 +11,9 @@ from .configuration_step import ConfigurationLoadStep
|
|
|
11
11
|
from .target_directory_step import TargetDirectorySetupStep
|
|
12
12
|
|
|
13
13
|
__all__ = [
|
|
14
|
+
"AgentProcessingStep",
|
|
14
15
|
"BaseDeploymentStep",
|
|
15
|
-
"StepResult",
|
|
16
16
|
"ConfigurationLoadStep",
|
|
17
|
+
"StepResult",
|
|
17
18
|
"TargetDirectorySetupStep",
|
|
18
|
-
"AgentProcessingStep",
|
|
19
19
|
]
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""Agent processing step for deployment pipeline."""
|
|
2
2
|
|
|
3
3
|
import time
|
|
4
|
-
|
|
5
4
|
from pathlib import Path
|
|
6
5
|
|
|
7
6
|
from claude_mpm.services.agents.deployment.processors import (
|
|
@@ -57,7 +56,7 @@ class AgentProcessingStep(BaseDeploymentStep):
|
|
|
57
56
|
source_info = context.agent_sources[agent_name]
|
|
58
57
|
else:
|
|
59
58
|
source_info = self._determine_agent_source(template_file)
|
|
60
|
-
|
|
59
|
+
|
|
61
60
|
# Create agent deployment context
|
|
62
61
|
agent_context = AgentDeploymentContext.from_template_file(
|
|
63
62
|
template_file=template_file,
|
|
@@ -93,9 +92,7 @@ class AgentProcessingStep(BaseDeploymentStep):
|
|
|
93
92
|
failed_count += 1
|
|
94
93
|
|
|
95
94
|
except Exception as e:
|
|
96
|
-
error_msg =
|
|
97
|
-
f"Failed to process agent {template_file.stem}: {str(e)}"
|
|
98
|
-
)
|
|
95
|
+
error_msg = f"Failed to process agent {template_file.stem}: {e!s}"
|
|
99
96
|
self.logger.error(error_msg, exc_info=True)
|
|
100
97
|
context.add_error(error_msg)
|
|
101
98
|
failed_count += 1
|
|
@@ -125,7 +122,7 @@ class AgentProcessingStep(BaseDeploymentStep):
|
|
|
125
122
|
execution_time = time.time() - start_time
|
|
126
123
|
context.step_timings[self.name] = execution_time
|
|
127
124
|
|
|
128
|
-
error_msg = f"Agent processing step failed: {
|
|
125
|
+
error_msg = f"Agent processing step failed: {e!s}"
|
|
129
126
|
self.logger.error(error_msg, exc_info=True)
|
|
130
127
|
context.add_error(error_msg)
|
|
131
128
|
|
|
@@ -207,32 +204,36 @@ class AgentProcessingStep(BaseDeploymentStep):
|
|
|
207
204
|
|
|
208
205
|
def _determine_agent_source(self, template_path: Path) -> str:
|
|
209
206
|
"""Determine the source of an agent from its template path.
|
|
210
|
-
|
|
207
|
+
|
|
211
208
|
Args:
|
|
212
209
|
template_path: Path to the agent template
|
|
213
|
-
|
|
210
|
+
|
|
214
211
|
Returns:
|
|
215
212
|
Source string (system/project/user/unknown)
|
|
216
213
|
"""
|
|
217
214
|
template_str = str(template_path.resolve())
|
|
218
|
-
|
|
215
|
+
|
|
219
216
|
# Check if it's a system template
|
|
220
|
-
if
|
|
217
|
+
if (
|
|
218
|
+
"/claude_mpm/agents/templates/" in template_str
|
|
219
|
+
or "/src/claude_mpm/agents/templates/" in template_str
|
|
220
|
+
):
|
|
221
221
|
return "system"
|
|
222
|
-
|
|
222
|
+
|
|
223
223
|
# Check if it's a project agent
|
|
224
224
|
if "/.claude-mpm/agents/" in template_str:
|
|
225
225
|
# Check if it's in the current working directory
|
|
226
226
|
try:
|
|
227
227
|
from pathlib import Path
|
|
228
|
+
|
|
228
229
|
cwd = Path.cwd()
|
|
229
230
|
if str(cwd) in template_str:
|
|
230
231
|
return "project"
|
|
231
232
|
except:
|
|
232
233
|
pass
|
|
233
|
-
|
|
234
|
+
|
|
234
235
|
# Check if it's a user agent
|
|
235
236
|
if "/.claude/agents/" in template_str:
|
|
236
237
|
return "user"
|
|
237
|
-
|
|
238
|
+
|
|
238
239
|
return "unknown"
|
|
@@ -63,7 +63,7 @@ class ConfigurationLoadStep(BaseDeploymentStep):
|
|
|
63
63
|
execution_time = time.time() - start_time
|
|
64
64
|
context.step_timings[self.name] = execution_time
|
|
65
65
|
|
|
66
|
-
error_msg = f"Failed to load configuration: {
|
|
66
|
+
error_msg = f"Failed to load configuration: {e!s}"
|
|
67
67
|
self.logger.error(error_msg)
|
|
68
68
|
context.add_error(error_msg)
|
|
69
69
|
|
|
@@ -32,14 +32,13 @@ class TargetDirectorySetupStep(BaseDeploymentStep):
|
|
|
32
32
|
context.actual_target_dir = context.strategy.determine_target_directory(
|
|
33
33
|
context # Pass the context which has the DeploymentContext interface
|
|
34
34
|
)
|
|
35
|
+
# Fallback logic if no strategy is set
|
|
36
|
+
elif context.target_dir:
|
|
37
|
+
context.actual_target_dir = context.target_dir
|
|
35
38
|
else:
|
|
36
|
-
#
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
else:
|
|
40
|
-
# MODIFIED: Default to project .claude/agents directory
|
|
41
|
-
# All agents now deploy to the project level
|
|
42
|
-
context.actual_target_dir = Path.cwd() / ".claude" / "agents"
|
|
39
|
+
# MODIFIED: Default to project .claude/agents directory
|
|
40
|
+
# All agents now deploy to the project level
|
|
41
|
+
context.actual_target_dir = Path.cwd() / ".claude" / "agents"
|
|
43
42
|
|
|
44
43
|
# Create target directory if it doesn't exist
|
|
45
44
|
context.actual_target_dir.mkdir(parents=True, exist_ok=True)
|
|
@@ -49,7 +48,7 @@ class TargetDirectorySetupStep(BaseDeploymentStep):
|
|
|
49
48
|
try:
|
|
50
49
|
test_file.write_text("test")
|
|
51
50
|
test_file.unlink()
|
|
52
|
-
except Exception
|
|
51
|
+
except Exception:
|
|
53
52
|
raise PermissionError(
|
|
54
53
|
f"Target directory is not writable: {context.actual_target_dir}"
|
|
55
54
|
)
|
|
@@ -69,7 +68,7 @@ class TargetDirectorySetupStep(BaseDeploymentStep):
|
|
|
69
68
|
execution_time = time.time() - start_time
|
|
70
69
|
context.step_timings[self.name] = execution_time
|
|
71
70
|
|
|
72
|
-
error_msg = f"Failed to set up target directory: {
|
|
71
|
+
error_msg = f"Failed to set up target directory: {e!s}"
|
|
73
72
|
self.logger.error(error_msg)
|
|
74
73
|
context.add_error(error_msg)
|
|
75
74
|
|
|
@@ -68,7 +68,7 @@ class ValidationStep(BaseDeploymentStep):
|
|
|
68
68
|
execution_time = time.time() - start_time
|
|
69
69
|
context.step_timings[self.name] = execution_time
|
|
70
70
|
|
|
71
|
-
error_msg = f"Validation step failed: {
|
|
71
|
+
error_msg = f"Validation step failed: {e!s}"
|
|
72
72
|
self.logger.error(error_msg, exc_info=True)
|
|
73
73
|
context.add_error(error_msg)
|
|
74
74
|
|
|
@@ -6,7 +6,7 @@ from claude_mpm.core.exceptions import AgentDeploymentError
|
|
|
6
6
|
from claude_mpm.core.logger import get_logger
|
|
7
7
|
|
|
8
8
|
from .agent_deployment_context import AgentDeploymentContext
|
|
9
|
-
from .agent_deployment_result import AgentDeploymentResult
|
|
9
|
+
from .agent_deployment_result import AgentDeploymentResult
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class AgentProcessor:
|
|
@@ -77,7 +77,7 @@ class AgentProcessor:
|
|
|
77
77
|
deployment_time_ms,
|
|
78
78
|
reason,
|
|
79
79
|
)
|
|
80
|
-
|
|
80
|
+
if context.is_update():
|
|
81
81
|
self.logger.debug(f"Updated agent: {context.agent_name}")
|
|
82
82
|
return AgentDeploymentResult.updated(
|
|
83
83
|
context.agent_name,
|
|
@@ -86,21 +86,18 @@ class AgentProcessor:
|
|
|
86
86
|
deployment_time_ms,
|
|
87
87
|
reason,
|
|
88
88
|
)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
)
|
|
89
|
+
self.logger.debug(f"Deployed new agent: {context.agent_name}")
|
|
90
|
+
return AgentDeploymentResult.deployed(
|
|
91
|
+
context.agent_name,
|
|
92
|
+
context.template_file,
|
|
93
|
+
context.target_file,
|
|
94
|
+
deployment_time_ms,
|
|
95
|
+
)
|
|
97
96
|
|
|
98
97
|
except AgentDeploymentError as e:
|
|
99
98
|
# Re-raise our custom exceptions
|
|
100
99
|
deployment_time_ms = (time.time() - start_time) * 1000
|
|
101
|
-
self.logger.error(
|
|
102
|
-
f"Agent deployment error for {context.agent_name}: {str(e)}"
|
|
103
|
-
)
|
|
100
|
+
self.logger.error(f"Agent deployment error for {context.agent_name}: {e!s}")
|
|
104
101
|
return AgentDeploymentResult.failed(
|
|
105
102
|
context.agent_name,
|
|
106
103
|
context.template_file,
|
|
@@ -151,11 +148,15 @@ class AgentProcessor:
|
|
|
151
148
|
# File doesn't exist, needs to be deployed
|
|
152
149
|
needs_update = True
|
|
153
150
|
reason = "New agent deployment"
|
|
154
|
-
self.logger.debug(
|
|
151
|
+
self.logger.debug(
|
|
152
|
+
f"Agent {context.agent_name} doesn't exist, will deploy"
|
|
153
|
+
)
|
|
155
154
|
else:
|
|
156
155
|
# File exists, check version compatibility
|
|
157
156
|
needs_update, reason = self.version_manager.check_agent_needs_update(
|
|
158
|
-
context.target_file,
|
|
157
|
+
context.target_file,
|
|
158
|
+
context.template_file,
|
|
159
|
+
context.base_agent_version,
|
|
159
160
|
)
|
|
160
161
|
if needs_update:
|
|
161
162
|
# Check if this is a migration from old format
|
|
@@ -185,7 +186,10 @@ class AgentProcessor:
|
|
|
185
186
|
"""
|
|
186
187
|
try:
|
|
187
188
|
return self.template_builder.build_agent_markdown(
|
|
188
|
-
context.agent_name,
|
|
189
|
+
context.agent_name,
|
|
190
|
+
context.template_file,
|
|
191
|
+
context.base_agent_data,
|
|
192
|
+
context.source_info,
|
|
189
193
|
)
|
|
190
194
|
except Exception as e:
|
|
191
195
|
raise AgentDeploymentError(
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import Any, Dict, List, Optional, Tuple
|
|
5
5
|
|
|
6
|
-
from claude_mpm.core.config import Config
|
|
7
6
|
from claude_mpm.core.interfaces import AgentDeploymentInterface
|
|
8
7
|
from claude_mpm.core.logger import get_logger
|
|
9
8
|
|
|
@@ -12,10 +11,8 @@ from .facade import DeploymentFacade
|
|
|
12
11
|
from .pipeline import (
|
|
13
12
|
DeploymentPipelineBuilder,
|
|
14
13
|
DeploymentPipelineExecutor,
|
|
15
|
-
PipelineContext,
|
|
16
14
|
)
|
|
17
|
-
from .
|
|
18
|
-
from .results import DeploymentMetrics, DeploymentResultBuilder
|
|
15
|
+
from .results import DeploymentResultBuilder
|
|
19
16
|
|
|
20
17
|
# Import refactored components
|
|
21
18
|
from .strategies import DeploymentContext, DeploymentStrategySelector
|
|
@@ -69,7 +66,7 @@ class RefactoredAgentDeploymentService(AgentDeploymentInterface):
|
|
|
69
66
|
self.pipeline_builder, self.pipeline_executor
|
|
70
67
|
)
|
|
71
68
|
|
|
72
|
-
self.logger.info(
|
|
69
|
+
self.logger.info("Refactored deployment service initialized")
|
|
73
70
|
self.logger.info(f"Templates directory: {self.templates_dir}")
|
|
74
71
|
self.logger.info(f"Base agent path: {self.base_agent_path}")
|
|
75
72
|
self.logger.info(f"Working directory: {self.working_directory}")
|
|
@@ -167,7 +164,7 @@ class RefactoredAgentDeploymentService(AgentDeploymentInterface):
|
|
|
167
164
|
|
|
168
165
|
except Exception as e:
|
|
169
166
|
self.logger.error(f"Agent validation failed: {e}", exc_info=True)
|
|
170
|
-
return False, [f"Validation error: {
|
|
167
|
+
return False, [f"Validation error: {e!s}"]
|
|
171
168
|
|
|
172
169
|
def clean_deployment(self, preserve_user_agents: bool = True) -> bool:
|
|
173
170
|
"""Clean up deployed agents.
|
|
@@ -236,7 +233,7 @@ class RefactoredAgentDeploymentService(AgentDeploymentInterface):
|
|
|
236
233
|
available_executors = self.deployment_facade.get_available_executors()
|
|
237
234
|
|
|
238
235
|
# Build status information
|
|
239
|
-
|
|
236
|
+
return {
|
|
240
237
|
"service_version": "refactored-1.0.0",
|
|
241
238
|
"status": "ready",
|
|
242
239
|
"templates_dir": str(self.templates_dir),
|
|
@@ -254,8 +251,6 @@ class RefactoredAgentDeploymentService(AgentDeploymentInterface):
|
|
|
254
251
|
},
|
|
255
252
|
}
|
|
256
253
|
|
|
257
|
-
return status
|
|
258
|
-
|
|
259
254
|
except Exception as e:
|
|
260
255
|
self.logger.error(f"Failed to get deployment status: {e}", exc_info=True)
|
|
261
256
|
return {
|
|
@@ -292,7 +287,7 @@ class RefactoredAgentDeploymentService(AgentDeploymentInterface):
|
|
|
292
287
|
strategy = self.strategy_selector.select_strategy(deployment_context)
|
|
293
288
|
|
|
294
289
|
# Use facade with synchronous deployment for reliability
|
|
295
|
-
|
|
290
|
+
return self.deployment_facade.deploy_agents(
|
|
296
291
|
templates_dir=self.templates_dir,
|
|
297
292
|
base_agent_path=self.base_agent_path,
|
|
298
293
|
working_directory=self.working_directory,
|
|
@@ -303,8 +298,6 @@ class RefactoredAgentDeploymentService(AgentDeploymentInterface):
|
|
|
303
298
|
use_async=False, # Use synchronous deployment to ensure agents are ready when Claude Code launches
|
|
304
299
|
)
|
|
305
300
|
|
|
306
|
-
return results
|
|
307
|
-
|
|
308
301
|
except Exception as e:
|
|
309
302
|
self.logger.error(f"Async deployment failed: {e}", exc_info=True)
|
|
310
303
|
return {
|
|
@@ -18,8 +18,8 @@ from .user_strategy import UserAgentDeploymentStrategy
|
|
|
18
18
|
__all__ = [
|
|
19
19
|
"BaseDeploymentStrategy",
|
|
20
20
|
"DeploymentContext",
|
|
21
|
-
"
|
|
21
|
+
"DeploymentStrategySelector",
|
|
22
22
|
"ProjectAgentDeploymentStrategy",
|
|
23
|
+
"SystemAgentDeploymentStrategy",
|
|
23
24
|
"UserAgentDeploymentStrategy",
|
|
24
|
-
"DeploymentStrategySelector",
|
|
25
25
|
]
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
from abc import ABC, abstractmethod
|
|
4
4
|
from dataclasses import dataclass
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from typing import
|
|
6
|
+
from typing import List, Optional
|
|
7
7
|
|
|
8
8
|
from claude_mpm.core.config import Config
|
|
9
9
|
|
|
@@ -48,7 +48,6 @@ class BaseDeploymentStrategy(ABC):
|
|
|
48
48
|
Returns:
|
|
49
49
|
True if this strategy should handle the deployment
|
|
50
50
|
"""
|
|
51
|
-
pass
|
|
52
51
|
|
|
53
52
|
@abstractmethod
|
|
54
53
|
def determine_target_directory(self, context: DeploymentContext) -> Path:
|
|
@@ -60,7 +59,6 @@ class BaseDeploymentStrategy(ABC):
|
|
|
60
59
|
Returns:
|
|
61
60
|
Path where agents should be deployed
|
|
62
61
|
"""
|
|
63
|
-
pass
|
|
64
62
|
|
|
65
63
|
@abstractmethod
|
|
66
64
|
def get_templates_directory(self, context: DeploymentContext) -> Path:
|
|
@@ -72,7 +70,6 @@ class BaseDeploymentStrategy(ABC):
|
|
|
72
70
|
Returns:
|
|
73
71
|
Path to the templates directory
|
|
74
72
|
"""
|
|
75
|
-
pass
|
|
76
73
|
|
|
77
74
|
@abstractmethod
|
|
78
75
|
def get_excluded_agents(self, context: DeploymentContext) -> List[str]:
|
|
@@ -84,7 +81,6 @@ class BaseDeploymentStrategy(ABC):
|
|
|
84
81
|
Returns:
|
|
85
82
|
List of agent names to exclude from deployment
|
|
86
83
|
"""
|
|
87
|
-
pass
|
|
88
84
|
|
|
89
85
|
@abstractmethod
|
|
90
86
|
def should_deploy_system_instructions(self, context: DeploymentContext) -> bool:
|
|
@@ -96,7 +92,6 @@ class BaseDeploymentStrategy(ABC):
|
|
|
96
92
|
Returns:
|
|
97
93
|
True if system instructions should be deployed
|
|
98
94
|
"""
|
|
99
|
-
pass
|
|
100
95
|
|
|
101
96
|
@abstractmethod
|
|
102
97
|
def get_deployment_priority(self) -> int:
|
|
@@ -108,7 +103,6 @@ class BaseDeploymentStrategy(ABC):
|
|
|
108
103
|
Returns:
|
|
109
104
|
Priority number (lower = higher priority)
|
|
110
105
|
"""
|
|
111
|
-
pass
|
|
112
106
|
|
|
113
107
|
def __str__(self) -> str:
|
|
114
108
|
"""String representation of the strategy."""
|
|
@@ -58,10 +58,7 @@ class ProjectAgentDeploymentStrategy(BaseDeploymentStrategy):
|
|
|
58
58
|
pass
|
|
59
59
|
|
|
60
60
|
# Check if deployment_mode is "project" - this should be sufficient
|
|
61
|
-
|
|
62
|
-
return True
|
|
63
|
-
|
|
64
|
-
return False
|
|
61
|
+
return context.deployment_mode == "project"
|
|
65
62
|
|
|
66
63
|
def determine_target_directory(self, context: DeploymentContext) -> Path:
|
|
67
64
|
"""Determine target directory for project agents.
|
|
@@ -76,9 +76,8 @@ class SystemAgentDeploymentStrategy(BaseDeploymentStrategy):
|
|
|
76
76
|
# Always deploy to project directory
|
|
77
77
|
if context.working_directory:
|
|
78
78
|
return context.working_directory / ".claude" / "agents"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return Path.cwd() / ".claude" / "agents"
|
|
79
|
+
# Fallback to current working directory if not specified
|
|
80
|
+
return Path.cwd() / ".claude" / "agents"
|
|
82
81
|
|
|
83
82
|
def get_templates_directory(self, context: DeploymentContext) -> Path:
|
|
84
83
|
"""Get templates directory for system agents.
|
|
@@ -49,10 +49,7 @@ class UserAgentDeploymentStrategy(BaseDeploymentStrategy):
|
|
|
49
49
|
# Check for user-specific environment variable
|
|
50
50
|
import os
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
return True
|
|
54
|
-
|
|
55
|
-
return False
|
|
52
|
+
return "CLAUDE_MPM_USER_PWD" in os.environ
|
|
56
53
|
|
|
57
54
|
def determine_target_directory(self, context: DeploymentContext) -> Path:
|
|
58
55
|
"""Determine target directory for user agents.
|
|
@@ -70,9 +67,8 @@ class UserAgentDeploymentStrategy(BaseDeploymentStrategy):
|
|
|
70
67
|
# Always deploy to project directory
|
|
71
68
|
if context.working_directory:
|
|
72
69
|
return context.working_directory / ".claude" / "agents"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
return Path.cwd() / ".claude" / "agents"
|
|
70
|
+
# Fallback to current working directory if not specified
|
|
71
|
+
return Path.cwd() / ".claude" / "agents"
|
|
76
72
|
|
|
77
73
|
def get_templates_directory(self, context: DeploymentContext) -> Path:
|
|
78
74
|
"""Get templates directory for user agents.
|
|
@@ -11,8 +11,8 @@ from .template_validator import TemplateValidator
|
|
|
11
11
|
from .validation_result import ValidationResult, ValidationSeverity
|
|
12
12
|
|
|
13
13
|
__all__ = [
|
|
14
|
-
"DeploymentValidator",
|
|
15
14
|
"AgentValidator",
|
|
15
|
+
"DeploymentValidator",
|
|
16
16
|
"TemplateValidator",
|
|
17
17
|
"ValidationResult",
|
|
18
18
|
"ValidationSeverity",
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
4
|
from pathlib import Path
|
|
5
|
-
from typing import Any, Dict
|
|
5
|
+
from typing import Any, Dict
|
|
6
6
|
|
|
7
7
|
from claude_mpm.core.logger import get_logger
|
|
8
8
|
|
|
9
|
-
from .validation_result import ValidationResult
|
|
9
|
+
from .validation_result import ValidationResult
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class TemplateValidator:
|
|
@@ -175,12 +175,11 @@ class ValidationResult:
|
|
|
175
175
|
Returns:
|
|
176
176
|
New ValidationResult with merged issues
|
|
177
177
|
"""
|
|
178
|
-
|
|
178
|
+
return ValidationResult(
|
|
179
179
|
is_valid=self.is_valid and other.is_valid,
|
|
180
180
|
issues=self.issues + other.issues,
|
|
181
181
|
metadata={**self.metadata, **other.metadata},
|
|
182
182
|
)
|
|
183
|
-
return merged
|
|
184
183
|
|
|
185
184
|
def to_dict(self) -> Dict[str, Any]:
|
|
186
185
|
"""Convert validation result to dictionary.
|
|
@@ -208,10 +207,7 @@ class ValidationResult:
|
|
|
208
207
|
|
|
209
208
|
def __str__(self) -> str:
|
|
210
209
|
"""String representation of the validation result."""
|
|
211
|
-
if self.is_valid
|
|
212
|
-
status = "VALID"
|
|
213
|
-
else:
|
|
214
|
-
status = "INVALID"
|
|
210
|
+
status = "VALID" if self.is_valid else "INVALID"
|
|
215
211
|
|
|
216
212
|
summary = f"Validation {status}"
|
|
217
213
|
|