claude-mpm 4.21.0__py3-none-any.whl → 5.0.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_PM.md +12 -0
- claude_mpm/agents/OUTPUT_STYLE.md +3 -48
- claude_mpm/agents/PM_INSTRUCTIONS.md +632 -334
- claude_mpm/agents/WORKFLOW.md +75 -2
- claude_mpm/agents/__init__.py +6 -0
- claude_mpm/agents/agent_loader.py +1 -4
- claude_mpm/agents/base_agent.json +6 -3
- claude_mpm/agents/frontmatter_validator.py +1 -1
- claude_mpm/agents/templates/{circuit_breakers.md → circuit-breakers.md} +370 -3
- claude_mpm/agents/templates/context-management-examples.md +544 -0
- claude_mpm/agents/templates/{pm_red_flags.md → pm-red-flags.md} +89 -19
- claude_mpm/agents/templates/pr-workflow-examples.md +427 -0
- claude_mpm/agents/templates/research-gate-examples.md +669 -0
- claude_mpm/agents/templates/structured-questions-examples.md +615 -0
- claude_mpm/agents/templates/ticket-completeness-examples.md +139 -0
- claude_mpm/agents/templates/ticketing-examples.md +277 -0
- claude_mpm/cli/__init__.py +38 -2
- claude_mpm/cli/commands/agent_source.py +774 -0
- claude_mpm/cli/commands/agent_state_manager.py +125 -20
- claude_mpm/cli/commands/agents.py +684 -13
- claude_mpm/cli/commands/agents_cleanup.py +210 -0
- claude_mpm/cli/commands/agents_discover.py +338 -0
- claude_mpm/cli/commands/aggregate.py +1 -1
- claude_mpm/cli/commands/analyze.py +3 -3
- claude_mpm/cli/commands/auto_configure.py +2 -6
- claude_mpm/cli/commands/cleanup.py +1 -1
- claude_mpm/cli/commands/config.py +7 -4
- claude_mpm/cli/commands/configure.py +478 -44
- claude_mpm/cli/commands/configure_agent_display.py +4 -4
- claude_mpm/cli/commands/configure_navigation.py +63 -46
- claude_mpm/cli/commands/debug.py +12 -12
- claude_mpm/cli/commands/doctor.py +10 -2
- claude_mpm/cli/commands/hook_errors.py +277 -0
- claude_mpm/cli/commands/local_deploy.py +1 -4
- claude_mpm/cli/commands/mcp_install_commands.py +1 -1
- claude_mpm/cli/commands/mpm_init/core.py +50 -2
- claude_mpm/cli/commands/mpm_init/git_activity.py +10 -10
- claude_mpm/cli/commands/mpm_init/prompts.py +6 -6
- claude_mpm/cli/commands/run.py +124 -128
- claude_mpm/cli/commands/skill_source.py +694 -0
- claude_mpm/cli/commands/skills.py +435 -1
- claude_mpm/cli/executor.py +78 -3
- claude_mpm/cli/interactive/agent_wizard.py +919 -41
- claude_mpm/cli/parsers/agent_source_parser.py +171 -0
- claude_mpm/cli/parsers/agents_parser.py +173 -4
- claude_mpm/cli/parsers/base_parser.py +49 -0
- claude_mpm/cli/parsers/config_parser.py +96 -43
- claude_mpm/cli/parsers/skill_source_parser.py +169 -0
- claude_mpm/cli/parsers/skills_parser.py +138 -0
- claude_mpm/cli/parsers/source_parser.py +138 -0
- claude_mpm/cli/startup.py +499 -84
- claude_mpm/cli/startup_display.py +480 -0
- claude_mpm/cli/utils.py +1 -1
- claude_mpm/cli_module/commands.py +1 -1
- claude_mpm/commands/{mpm-auto-configure.md → mpm-agents-auto-configure.md} +9 -0
- claude_mpm/commands/mpm-agents-detect.md +9 -0
- claude_mpm/commands/{mpm-agents.md → mpm-agents-list.md} +9 -0
- claude_mpm/commands/mpm-agents-recommend.md +9 -0
- claude_mpm/commands/{mpm-config.md → mpm-config-view.md} +9 -0
- claude_mpm/commands/mpm-doctor.md +9 -0
- claude_mpm/commands/mpm-help.md +14 -2
- claude_mpm/commands/mpm-init.md +27 -2
- claude_mpm/commands/mpm-monitor.md +9 -0
- claude_mpm/commands/mpm-session-resume.md +381 -0
- claude_mpm/commands/mpm-status.md +9 -0
- claude_mpm/commands/{mpm-organize.md → mpm-ticket-organize.md} +9 -0
- claude_mpm/commands/mpm-ticket-view.md +552 -0
- claude_mpm/commands/mpm-version.md +9 -0
- claude_mpm/commands/mpm.md +11 -0
- claude_mpm/config/agent_presets.py +258 -0
- claude_mpm/config/agent_sources.py +325 -0
- claude_mpm/config/skill_sources.py +590 -0
- claude_mpm/constants.py +12 -0
- claude_mpm/core/api_validator.py +1 -1
- claude_mpm/core/claude_runner.py +17 -10
- claude_mpm/core/config.py +24 -0
- claude_mpm/core/constants.py +1 -1
- claude_mpm/core/framework/__init__.py +3 -16
- claude_mpm/core/framework/loaders/instruction_loader.py +25 -5
- claude_mpm/core/framework/processors/metadata_processor.py +1 -1
- claude_mpm/core/hook_error_memory.py +381 -0
- claude_mpm/core/hook_manager.py +41 -2
- claude_mpm/core/interactive_session.py +112 -5
- claude_mpm/core/logger.py +3 -1
- claude_mpm/core/oneshot_session.py +94 -4
- claude_mpm/dashboard/static/css/activity.css +69 -69
- claude_mpm/dashboard/static/css/connection-status.css +10 -10
- claude_mpm/dashboard/static/css/dashboard.css +15 -15
- claude_mpm/dashboard/static/js/components/activity-tree.js +178 -178
- claude_mpm/dashboard/static/js/components/agent-hierarchy.js +101 -101
- claude_mpm/dashboard/static/js/components/agent-inference.js +31 -31
- claude_mpm/dashboard/static/js/components/build-tracker.js +59 -59
- claude_mpm/dashboard/static/js/components/code-simple.js +107 -107
- claude_mpm/dashboard/static/js/components/connection-debug.js +101 -101
- claude_mpm/dashboard/static/js/components/diff-viewer.js +113 -113
- claude_mpm/dashboard/static/js/components/event-viewer.js +12 -12
- claude_mpm/dashboard/static/js/components/file-change-tracker.js +57 -57
- claude_mpm/dashboard/static/js/components/file-change-viewer.js +74 -74
- claude_mpm/dashboard/static/js/components/file-tool-tracker.js +6 -6
- claude_mpm/dashboard/static/js/components/file-viewer.js +42 -42
- claude_mpm/dashboard/static/js/components/module-viewer.js +27 -27
- claude_mpm/dashboard/static/js/components/session-manager.js +14 -14
- claude_mpm/dashboard/static/js/components/socket-manager.js +1 -1
- claude_mpm/dashboard/static/js/components/ui-state-manager.js +14 -14
- claude_mpm/dashboard/static/js/components/unified-data-viewer.js +110 -110
- claude_mpm/dashboard/static/js/components/working-directory.js +8 -8
- claude_mpm/dashboard/static/js/connection-manager.js +76 -76
- claude_mpm/dashboard/static/js/dashboard.js +76 -58
- claude_mpm/dashboard/static/js/extension-error-handler.js +22 -22
- claude_mpm/dashboard/static/js/socket-client.js +138 -121
- claude_mpm/dashboard/templates/code_simple.html +23 -23
- claude_mpm/dashboard/templates/index.html +18 -18
- claude_mpm/experimental/cli_enhancements.py +1 -5
- claude_mpm/hooks/claude_hooks/event_handlers.py +3 -1
- claude_mpm/hooks/claude_hooks/hook_handler.py +24 -7
- claude_mpm/hooks/claude_hooks/installer.py +45 -0
- claude_mpm/hooks/failure_learning/__init__.py +2 -8
- claude_mpm/hooks/failure_learning/failure_detection_hook.py +1 -6
- claude_mpm/hooks/failure_learning/fix_detection_hook.py +1 -6
- claude_mpm/hooks/failure_learning/learning_extraction_hook.py +1 -6
- claude_mpm/hooks/kuzu_response_hook.py +1 -5
- claude_mpm/hooks/templates/pre_tool_use_simple.py +78 -0
- claude_mpm/hooks/templates/pre_tool_use_template.py +323 -0
- claude_mpm/models/git_repository.py +198 -0
- claude_mpm/scripts/claude-hook-handler.sh +3 -3
- claude_mpm/scripts/start_activity_logging.py +3 -1
- claude_mpm/services/agents/agent_builder.py +45 -9
- claude_mpm/services/agents/agent_preset_service.py +238 -0
- claude_mpm/services/agents/agent_selection_service.py +484 -0
- claude_mpm/services/agents/auto_deploy_index_parser.py +569 -0
- claude_mpm/services/agents/deployment/agent_deployment.py +126 -2
- claude_mpm/services/agents/deployment/agent_discovery_service.py +105 -73
- claude_mpm/services/agents/deployment/agent_format_converter.py +1 -1
- claude_mpm/services/agents/deployment/agent_lifecycle_manager.py +1 -5
- claude_mpm/services/agents/deployment/agent_metrics_collector.py +3 -3
- claude_mpm/services/agents/deployment/agent_restore_handler.py +1 -4
- claude_mpm/services/agents/deployment/agent_template_builder.py +236 -15
- claude_mpm/services/agents/deployment/agents_directory_resolver.py +101 -15
- claude_mpm/services/agents/deployment/async_agent_deployment.py +2 -1
- claude_mpm/services/agents/deployment/facade/deployment_facade.py +3 -3
- claude_mpm/services/agents/deployment/multi_source_deployment_service.py +115 -15
- claude_mpm/services/agents/deployment/pipeline/pipeline_executor.py +2 -2
- claude_mpm/services/agents/deployment/refactored_agent_deployment_service.py +1 -4
- claude_mpm/services/agents/deployment/remote_agent_discovery_service.py +363 -0
- claude_mpm/services/agents/deployment/single_agent_deployer.py +2 -2
- claude_mpm/services/agents/deployment/system_instructions_deployer.py +168 -46
- claude_mpm/services/agents/deployment/validation/deployment_validator.py +2 -2
- claude_mpm/services/agents/git_source_manager.py +629 -0
- claude_mpm/services/agents/loading/framework_agent_loader.py +9 -12
- claude_mpm/services/agents/local_template_manager.py +50 -10
- claude_mpm/services/agents/single_tier_deployment_service.py +696 -0
- claude_mpm/services/agents/sources/__init__.py +13 -0
- claude_mpm/services/agents/sources/agent_sync_state.py +516 -0
- claude_mpm/services/agents/sources/git_source_sync_service.py +1055 -0
- claude_mpm/services/agents/startup_sync.py +239 -0
- claude_mpm/services/agents/toolchain_detector.py +474 -0
- claude_mpm/services/cli/session_pause_manager.py +1 -1
- claude_mpm/services/cli/unified_dashboard_manager.py +1 -1
- claude_mpm/services/command_deployment_service.py +92 -1
- claude_mpm/services/core/base.py +26 -11
- claude_mpm/services/core/interfaces/__init__.py +1 -3
- claude_mpm/services/core/interfaces/health.py +1 -4
- claude_mpm/services/core/models/__init__.py +2 -11
- claude_mpm/services/diagnostics/checks/__init__.py +4 -0
- claude_mpm/services/diagnostics/checks/agent_check.py +0 -2
- claude_mpm/services/diagnostics/checks/agent_sources_check.py +577 -0
- claude_mpm/services/diagnostics/checks/instructions_check.py +1 -2
- claude_mpm/services/diagnostics/checks/mcp_check.py +0 -1
- claude_mpm/services/diagnostics/checks/monitor_check.py +0 -1
- claude_mpm/services/diagnostics/checks/skill_sources_check.py +587 -0
- claude_mpm/services/diagnostics/diagnostic_runner.py +9 -0
- claude_mpm/services/diagnostics/doctor_reporter.py +40 -10
- claude_mpm/services/event_bus/direct_relay.py +3 -3
- claude_mpm/services/event_bus/event_bus.py +36 -3
- claude_mpm/services/event_bus/relay.py +23 -7
- claude_mpm/services/events/consumers/logging.py +1 -2
- claude_mpm/services/git/__init__.py +21 -0
- claude_mpm/services/git/git_operations_service.py +494 -0
- claude_mpm/services/github/__init__.py +21 -0
- claude_mpm/services/github/github_cli_service.py +397 -0
- claude_mpm/services/infrastructure/monitoring/__init__.py +1 -5
- claude_mpm/services/infrastructure/monitoring/aggregator.py +1 -6
- claude_mpm/services/infrastructure/monitoring/resources.py +1 -1
- claude_mpm/services/instructions/__init__.py +9 -0
- claude_mpm/services/instructions/instruction_cache_service.py +374 -0
- claude_mpm/services/local_ops/__init__.py +3 -13
- claude_mpm/services/local_ops/health_checks/__init__.py +1 -3
- claude_mpm/services/local_ops/health_manager.py +1 -4
- claude_mpm/services/local_ops/process_manager.py +1 -1
- claude_mpm/services/local_ops/resource_monitor.py +2 -2
- claude_mpm/services/mcp_gateway/config/configuration.py +1 -1
- claude_mpm/services/mcp_gateway/server/mcp_gateway.py +1 -6
- claude_mpm/services/mcp_gateway/server/stdio_server.py +0 -2
- claude_mpm/services/mcp_gateway/tools/document_summarizer.py +1 -1
- claude_mpm/services/mcp_gateway/tools/kuzu_memory_service.py +6 -2
- claude_mpm/services/memory/failure_tracker.py +19 -4
- claude_mpm/services/memory/optimizer.py +1 -1
- claude_mpm/services/model/model_router.py +8 -9
- claude_mpm/services/monitor/daemon.py +1 -1
- claude_mpm/services/monitor/server.py +2 -2
- claude_mpm/services/native_agent_converter.py +356 -0
- claude_mpm/services/port_manager.py +1 -1
- claude_mpm/services/pr/__init__.py +14 -0
- claude_mpm/services/pr/pr_template_service.py +329 -0
- claude_mpm/services/project/documentation_manager.py +2 -1
- claude_mpm/services/project/toolchain_analyzer.py +3 -1
- claude_mpm/services/runner_configuration_service.py +1 -0
- claude_mpm/services/self_upgrade_service.py +165 -7
- claude_mpm/services/skills/__init__.py +18 -0
- claude_mpm/services/skills/git_skill_source_manager.py +1169 -0
- claude_mpm/services/skills/skill_discovery_service.py +568 -0
- claude_mpm/services/skills_config.py +547 -0
- claude_mpm/services/skills_deployer.py +955 -0
- claude_mpm/services/socketio/handlers/connection.py +1 -1
- claude_mpm/services/socketio/handlers/git.py +2 -2
- claude_mpm/services/socketio/server/core.py +1 -4
- claude_mpm/services/socketio/server/main.py +1 -3
- claude_mpm/services/system_instructions_service.py +1 -3
- claude_mpm/services/unified/analyzer_strategies/performance_analyzer.py +0 -3
- claude_mpm/services/unified/analyzer_strategies/security_analyzer.py +0 -1
- claude_mpm/services/unified/deployment_strategies/cloud_strategies.py +1 -1
- claude_mpm/services/unified/deployment_strategies/vercel.py +1 -5
- claude_mpm/services/unified/unified_deployment.py +1 -5
- claude_mpm/services/version_control/conflict_resolution.py +6 -4
- claude_mpm/services/visualization/__init__.py +1 -5
- claude_mpm/services/visualization/mermaid_generator.py +2 -3
- claude_mpm/skills/bundled/infrastructure/env-manager/scripts/validate_env.py +576 -0
- claude_mpm/skills/bundled/performance-profiling.md +6 -0
- claude_mpm/skills/bundled/testing/webapp-testing/scripts/with_server.py +2 -2
- claude_mpm/skills/skills_registry.py +0 -1
- claude_mpm/templates/questions/__init__.py +38 -0
- claude_mpm/templates/questions/base.py +193 -0
- claude_mpm/templates/questions/pr_strategy.py +311 -0
- claude_mpm/templates/questions/project_init.py +385 -0
- claude_mpm/templates/questions/ticket_mgmt.py +394 -0
- claude_mpm/tools/__main__.py +8 -8
- claude_mpm/tools/code_tree_analyzer/__init__.py +45 -0
- claude_mpm/tools/code_tree_analyzer/analysis.py +299 -0
- claude_mpm/tools/code_tree_analyzer/cache.py +131 -0
- claude_mpm/tools/code_tree_analyzer/core.py +380 -0
- claude_mpm/tools/code_tree_analyzer/discovery.py +403 -0
- claude_mpm/tools/code_tree_analyzer/events.py +168 -0
- claude_mpm/tools/code_tree_analyzer/gitignore.py +308 -0
- claude_mpm/tools/code_tree_analyzer/models.py +39 -0
- claude_mpm/tools/code_tree_analyzer/multilang_analyzer.py +224 -0
- claude_mpm/tools/code_tree_analyzer/python_analyzer.py +284 -0
- claude_mpm/utils/agent_dependency_loader.py +80 -13
- claude_mpm/utils/dependency_cache.py +3 -1
- claude_mpm/utils/gitignore.py +241 -0
- claude_mpm/utils/log_cleanup.py +3 -3
- claude_mpm/utils/progress.py +383 -0
- claude_mpm/utils/robust_installer.py +3 -5
- claude_mpm/utils/structured_questions.py +619 -0
- {claude_mpm-4.21.0.dist-info → claude_mpm-5.0.2.dist-info}/METADATA +429 -59
- {claude_mpm-4.21.0.dist-info → claude_mpm-5.0.2.dist-info}/RECORD +264 -427
- claude_mpm/agents/templates/.claude-mpm/memories/README.md +0 -17
- claude_mpm/agents/templates/.claude-mpm/memories/engineer_memories.md +0 -3
- claude_mpm/agents/templates/agent-manager.json +0 -273
- claude_mpm/agents/templates/agentic-coder-optimizer.json +0 -248
- claude_mpm/agents/templates/api_qa.json +0 -180
- claude_mpm/agents/templates/clerk-ops.json +0 -235
- claude_mpm/agents/templates/code_analyzer.json +0 -101
- claude_mpm/agents/templates/content-agent.json +0 -358
- claude_mpm/agents/templates/dart_engineer.json +0 -307
- claude_mpm/agents/templates/data_engineer.json +0 -225
- claude_mpm/agents/templates/documentation.json +0 -211
- claude_mpm/agents/templates/engineer.json +0 -210
- claude_mpm/agents/templates/gcp_ops_agent.json +0 -253
- claude_mpm/agents/templates/golang_engineer.json +0 -270
- claude_mpm/agents/templates/imagemagick.json +0 -264
- claude_mpm/agents/templates/java_engineer.json +0 -346
- claude_mpm/agents/templates/local_ops_agent.json +0 -1840
- claude_mpm/agents/templates/logs/prompts/agent_engineer_20250826_014258_728.md +0 -39
- claude_mpm/agents/templates/logs/prompts/agent_engineer_20250901_010124_142.md +0 -400
- claude_mpm/agents/templates/memory_manager.json +0 -158
- claude_mpm/agents/templates/nextjs_engineer.json +0 -285
- claude_mpm/agents/templates/ops.json +0 -185
- claude_mpm/agents/templates/php-engineer.json +0 -287
- claude_mpm/agents/templates/product_owner.json +0 -338
- claude_mpm/agents/templates/project_organizer.json +0 -140
- claude_mpm/agents/templates/prompt-engineer.json +0 -737
- claude_mpm/agents/templates/python_engineer.json +0 -387
- claude_mpm/agents/templates/qa.json +0 -242
- claude_mpm/agents/templates/react_engineer.json +0 -238
- claude_mpm/agents/templates/refactoring_engineer.json +0 -276
- claude_mpm/agents/templates/research.json +0 -188
- claude_mpm/agents/templates/ruby-engineer.json +0 -280
- claude_mpm/agents/templates/rust_engineer.json +0 -275
- claude_mpm/agents/templates/security.json +0 -202
- claude_mpm/agents/templates/svelte-engineer.json +0 -225
- claude_mpm/agents/templates/ticketing.json +0 -177
- claude_mpm/agents/templates/typescript_engineer.json +0 -285
- claude_mpm/agents/templates/vercel_ops_agent.json +0 -412
- claude_mpm/agents/templates/version_control.json +0 -157
- claude_mpm/agents/templates/web_qa.json +0 -399
- claude_mpm/agents/templates/web_ui.json +0 -189
- claude_mpm/commands/mpm-tickets.md +0 -102
- claude_mpm/dashboard/.claude-mpm/socketio-instances.json +0 -1
- claude_mpm/dashboard/react/components/DataInspector/DataInspector.module.css +0 -188
- claude_mpm/dashboard/react/components/EventViewer/EventViewer.module.css +0 -156
- claude_mpm/dashboard/react/components/shared/ConnectionStatus.module.css +0 -38
- claude_mpm/dashboard/react/components/shared/FilterBar.module.css +0 -92
- claude_mpm/dashboard/static/archive/activity_dashboard_fixed.html +0 -248
- claude_mpm/dashboard/static/archive/activity_dashboard_test.html +0 -61
- claude_mpm/dashboard/static/archive/test_activity_connection.html +0 -179
- claude_mpm/dashboard/static/archive/test_claude_tree_tab.html +0 -68
- claude_mpm/dashboard/static/archive/test_dashboard.html +0 -409
- claude_mpm/dashboard/static/archive/test_dashboard_fixed.html +0 -519
- claude_mpm/dashboard/static/archive/test_dashboard_verification.html +0 -181
- claude_mpm/dashboard/static/archive/test_file_data.html +0 -315
- claude_mpm/dashboard/static/archive/test_file_tree_empty_state.html +0 -243
- claude_mpm/dashboard/static/archive/test_file_tree_fix.html +0 -234
- claude_mpm/dashboard/static/archive/test_file_tree_rename.html +0 -117
- claude_mpm/dashboard/static/archive/test_file_tree_tab.html +0 -115
- claude_mpm/dashboard/static/archive/test_file_viewer.html +0 -224
- claude_mpm/dashboard/static/archive/test_final_activity.html +0 -220
- claude_mpm/dashboard/static/archive/test_tab_fix.html +0 -139
- claude_mpm/dashboard/static/built/assets/events.DjpNxWNo.css +0 -1
- claude_mpm/dashboard/static/built/components/activity-tree.js +0 -2
- claude_mpm/dashboard/static/built/components/agent-hierarchy.js +0 -777
- claude_mpm/dashboard/static/built/components/agent-inference.js +0 -2
- claude_mpm/dashboard/static/built/components/build-tracker.js +0 -333
- claude_mpm/dashboard/static/built/components/code-simple.js +0 -857
- claude_mpm/dashboard/static/built/components/code-tree/tree-breadcrumb.js +0 -353
- claude_mpm/dashboard/static/built/components/code-tree/tree-constants.js +0 -235
- claude_mpm/dashboard/static/built/components/code-tree/tree-search.js +0 -409
- claude_mpm/dashboard/static/built/components/code-tree/tree-utils.js +0 -435
- claude_mpm/dashboard/static/built/components/code-tree.js +0 -2
- claude_mpm/dashboard/static/built/components/code-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/connection-debug.js +0 -654
- claude_mpm/dashboard/static/built/components/diff-viewer.js +0 -891
- claude_mpm/dashboard/static/built/components/event-processor.js +0 -2
- claude_mpm/dashboard/static/built/components/event-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/export-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/file-change-tracker.js +0 -443
- claude_mpm/dashboard/static/built/components/file-change-viewer.js +0 -690
- claude_mpm/dashboard/static/built/components/file-tool-tracker.js +0 -2
- claude_mpm/dashboard/static/built/components/file-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/hud-library-loader.js +0 -2
- claude_mpm/dashboard/static/built/components/hud-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/hud-visualizer.js +0 -2
- claude_mpm/dashboard/static/built/components/module-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/nav-bar.js +0 -145
- claude_mpm/dashboard/static/built/components/page-structure.js +0 -429
- claude_mpm/dashboard/static/built/components/session-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/socket-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/ui-state-manager.js +0 -2
- claude_mpm/dashboard/static/built/components/unified-data-viewer.js +0 -2
- claude_mpm/dashboard/static/built/components/working-directory.js +0 -2
- claude_mpm/dashboard/static/built/connection-manager.js +0 -536
- claude_mpm/dashboard/static/built/dashboard.js +0 -2
- claude_mpm/dashboard/static/built/extension-error-handler.js +0 -164
- claude_mpm/dashboard/static/built/react/events.js +0 -30
- claude_mpm/dashboard/static/built/shared/dom-helpers.js +0 -396
- claude_mpm/dashboard/static/built/shared/event-bus.js +0 -330
- claude_mpm/dashboard/static/built/shared/event-filter-service.js +0 -540
- claude_mpm/dashboard/static/built/shared/logger.js +0 -385
- claude_mpm/dashboard/static/built/shared/page-structure.js +0 -249
- claude_mpm/dashboard/static/built/shared/tooltip-service.js +0 -253
- claude_mpm/dashboard/static/built/socket-client.js +0 -2
- claude_mpm/dashboard/static/built/tab-isolation-fix.js +0 -185
- claude_mpm/dashboard/static/dist/assets/events.DjpNxWNo.css +0 -1
- claude_mpm/dashboard/static/dist/components/activity-tree.js +0 -2
- claude_mpm/dashboard/static/dist/components/agent-inference.js +0 -2
- claude_mpm/dashboard/static/dist/components/code-tree.js +0 -2
- claude_mpm/dashboard/static/dist/components/code-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/event-processor.js +0 -2
- claude_mpm/dashboard/static/dist/components/event-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/export-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/file-tool-tracker.js +0 -2
- claude_mpm/dashboard/static/dist/components/file-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/hud-library-loader.js +0 -2
- claude_mpm/dashboard/static/dist/components/hud-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/hud-visualizer.js +0 -2
- claude_mpm/dashboard/static/dist/components/module-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/session-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/socket-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/ui-state-manager.js +0 -2
- claude_mpm/dashboard/static/dist/components/unified-data-viewer.js +0 -2
- claude_mpm/dashboard/static/dist/components/working-directory.js +0 -2
- claude_mpm/dashboard/static/dist/dashboard.js +0 -2
- claude_mpm/dashboard/static/dist/react/events.js +0 -30
- claude_mpm/dashboard/static/dist/socket-client.js +0 -2
- claude_mpm/dashboard/static/events.html +0 -607
- claude_mpm/dashboard/static/index.html +0 -635
- claude_mpm/dashboard/static/js/shared/dom-helpers.js +0 -396
- claude_mpm/dashboard/static/js/shared/event-bus.js +0 -330
- claude_mpm/dashboard/static/js/shared/logger.js +0 -385
- claude_mpm/dashboard/static/js/shared/tooltip-service.js +0 -253
- claude_mpm/dashboard/static/js/stores/dashboard-store.js +0 -562
- claude_mpm/dashboard/static/legacy/activity.html +0 -736
- claude_mpm/dashboard/static/legacy/agents.html +0 -786
- claude_mpm/dashboard/static/legacy/files.html +0 -747
- claude_mpm/dashboard/static/legacy/tools.html +0 -831
- claude_mpm/dashboard/static/monitors.html +0 -431
- claude_mpm/dashboard/static/production/events.html +0 -659
- claude_mpm/dashboard/static/production/main.html +0 -698
- claude_mpm/dashboard/static/production/monitors.html +0 -483
- claude_mpm/dashboard/static/test-archive/dashboard.html +0 -635
- claude_mpm/dashboard/static/test-archive/debug-events.html +0 -147
- claude_mpm/dashboard/static/test-archive/test-navigation.html +0 -256
- claude_mpm/dashboard/static/test-archive/test-react-exports.html +0 -180
- claude_mpm/dashboard/static/test-archive/test_debug.html +0 -25
- claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +0 -79
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +0 -178
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/agent-prompts.md +0 -577
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/coordination-patterns.md +0 -467
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/examples.md +0 -537
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/troubleshooting.md +0 -730
- claude_mpm/skills/bundled/collaboration/requesting-code-review/SKILL.md +0 -112
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/code-reviewer-template.md +0 -146
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/review-examples.md +0 -412
- claude_mpm/skills/bundled/collaboration/writing-plans/SKILL.md +0 -81
- claude_mpm/skills/bundled/collaboration/writing-plans/references/best-practices.md +0 -362
- claude_mpm/skills/bundled/collaboration/writing-plans/references/plan-structure-templates.md +0 -312
- claude_mpm/skills/bundled/debugging/root-cause-tracing/SKILL.md +0 -152
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/advanced-techniques.md +0 -668
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/examples.md +0 -587
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/integration.md +0 -438
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/tracing-techniques.md +0 -391
- claude_mpm/skills/bundled/debugging/systematic-debugging/CREATION-LOG.md +0 -119
- claude_mpm/skills/bundled/debugging/systematic-debugging/SKILL.md +0 -148
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/anti-patterns.md +0 -483
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/examples.md +0 -452
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/troubleshooting.md +0 -449
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/workflow.md +0 -411
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-academic.md +0 -14
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-1.md +0 -58
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-2.md +0 -68
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-3.md +0 -69
- claude_mpm/skills/bundled/debugging/verification-before-completion/SKILL.md +0 -131
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/gate-function.md +0 -325
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/integration-and-workflows.md +0 -490
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/red-flags-and-failures.md +0 -425
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/verification-patterns.md +0 -499
- claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +0 -86
- claude_mpm/skills/bundled/main/internal-comms/SKILL.md +0 -43
- claude_mpm/skills/bundled/main/internal-comms/examples/3p-updates.md +0 -47
- claude_mpm/skills/bundled/main/internal-comms/examples/company-newsletter.md +0 -65
- claude_mpm/skills/bundled/main/internal-comms/examples/faq-answers.md +0 -30
- claude_mpm/skills/bundled/main/internal-comms/examples/general-comms.md +0 -16
- claude_mpm/skills/bundled/main/mcp-builder/SKILL.md +0 -160
- claude_mpm/skills/bundled/main/mcp-builder/reference/design_principles.md +0 -412
- claude_mpm/skills/bundled/main/mcp-builder/reference/evaluation.md +0 -602
- claude_mpm/skills/bundled/main/mcp-builder/reference/mcp_best_practices.md +0 -915
- claude_mpm/skills/bundled/main/mcp-builder/reference/node_mcp_server.md +0 -916
- claude_mpm/skills/bundled/main/mcp-builder/reference/python_mcp_server.md +0 -752
- claude_mpm/skills/bundled/main/mcp-builder/reference/workflow.md +0 -1237
- claude_mpm/skills/bundled/main/skill-creator/SKILL.md +0 -189
- claude_mpm/skills/bundled/main/skill-creator/references/best-practices.md +0 -500
- claude_mpm/skills/bundled/main/skill-creator/references/creation-workflow.md +0 -464
- claude_mpm/skills/bundled/main/skill-creator/references/examples.md +0 -619
- claude_mpm/skills/bundled/main/skill-creator/references/progressive-disclosure.md +0 -437
- claude_mpm/skills/bundled/main/skill-creator/references/skill-structure.md +0 -231
- claude_mpm/skills/bundled/php/espocrm-development/SKILL.md +0 -170
- claude_mpm/skills/bundled/php/espocrm-development/references/architecture.md +0 -602
- claude_mpm/skills/bundled/php/espocrm-development/references/common-tasks.md +0 -821
- claude_mpm/skills/bundled/php/espocrm-development/references/development-workflow.md +0 -742
- claude_mpm/skills/bundled/php/espocrm-development/references/frontend-customization.md +0 -726
- claude_mpm/skills/bundled/php/espocrm-development/references/hooks-and-services.md +0 -764
- claude_mpm/skills/bundled/php/espocrm-development/references/testing-debugging.md +0 -831
- claude_mpm/skills/bundled/rust/desktop-applications/SKILL.md +0 -226
- claude_mpm/skills/bundled/rust/desktop-applications/references/architecture-patterns.md +0 -901
- claude_mpm/skills/bundled/rust/desktop-applications/references/native-gui-frameworks.md +0 -901
- claude_mpm/skills/bundled/rust/desktop-applications/references/platform-integration.md +0 -775
- claude_mpm/skills/bundled/rust/desktop-applications/references/state-management.md +0 -937
- claude_mpm/skills/bundled/rust/desktop-applications/references/tauri-framework.md +0 -770
- claude_mpm/skills/bundled/rust/desktop-applications/references/testing-deployment.md +0 -961
- claude_mpm/skills/bundled/testing/condition-based-waiting/SKILL.md +0 -119
- claude_mpm/skills/bundled/testing/condition-based-waiting/references/patterns-and-implementation.md +0 -253
- claude_mpm/skills/bundled/testing/test-driven-development/SKILL.md +0 -145
- claude_mpm/skills/bundled/testing/test-driven-development/references/anti-patterns.md +0 -543
- claude_mpm/skills/bundled/testing/test-driven-development/references/examples.md +0 -741
- claude_mpm/skills/bundled/testing/test-driven-development/references/integration.md +0 -470
- claude_mpm/skills/bundled/testing/test-driven-development/references/philosophy.md +0 -458
- claude_mpm/skills/bundled/testing/test-driven-development/references/workflow.md +0 -639
- claude_mpm/skills/bundled/testing/testing-anti-patterns/SKILL.md +0 -140
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/completeness-anti-patterns.md +0 -572
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/core-anti-patterns.md +0 -411
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/detection-guide.md +0 -569
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/tdd-connection.md +0 -695
- claude_mpm/skills/bundled/testing/webapp-testing/SKILL.md +0 -184
- claude_mpm/skills/bundled/testing/webapp-testing/decision-tree.md +0 -459
- claude_mpm/skills/bundled/testing/webapp-testing/playwright-patterns.md +0 -479
- claude_mpm/skills/bundled/testing/webapp-testing/reconnaissance-pattern.md +0 -687
- claude_mpm/skills/bundled/testing/webapp-testing/server-management.md +0 -758
- claude_mpm/skills/bundled/testing/webapp-testing/troubleshooting.md +0 -868
- claude_mpm/tools/code_tree_analyzer.py +0 -1825
- /claude_mpm/agents/templates/{git_file_tracking.md → git-file-tracking.md} +0 -0
- /claude_mpm/agents/templates/{pm_examples.md → pm-examples.md} +0 -0
- /claude_mpm/agents/templates/{response_format.md → response-format.md} +0 -0
- /claude_mpm/agents/templates/{validation_templates.md → validation-templates.md} +0 -0
- {claude_mpm-4.21.0.dist-info → claude_mpm-5.0.2.dist-info}/WHEEL +0 -0
- {claude_mpm-4.21.0.dist-info → claude_mpm-5.0.2.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.21.0.dist-info → claude_mpm-5.0.2.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.21.0.dist-info → claude_mpm-5.0.2.dist-info}/top_level.txt +0 -0
claude_mpm/cli/startup.py
CHANGED
|
@@ -19,23 +19,34 @@ def setup_early_environment(argv):
|
|
|
19
19
|
WHY: Some commands need special environment handling before any logging
|
|
20
20
|
or service initialization occurs.
|
|
21
21
|
|
|
22
|
+
CRITICAL: Suppress ALL logging by default until setup_mcp_server_logging()
|
|
23
|
+
configures the user's preference. This prevents early loggers (like
|
|
24
|
+
ProjectInitializer and service.* loggers) from logging at INFO level before
|
|
25
|
+
we know the user's logging preference.
|
|
26
|
+
|
|
22
27
|
Args:
|
|
23
28
|
argv: Command line arguments
|
|
24
29
|
|
|
25
30
|
Returns:
|
|
26
31
|
Processed argv list
|
|
27
32
|
"""
|
|
33
|
+
import logging
|
|
34
|
+
|
|
28
35
|
# Disable telemetry and set cleanup flags early
|
|
29
36
|
os.environ.setdefault("DISABLE_TELEMETRY", "1")
|
|
30
37
|
os.environ.setdefault("CLAUDE_MPM_SKIP_CLEANUP", "0")
|
|
31
38
|
|
|
32
|
-
#
|
|
39
|
+
# CRITICAL: Suppress ALL logging by default
|
|
40
|
+
# This catches all loggers (claude_mpm.*, service.*, framework_loader, etc.)
|
|
41
|
+
# This will be overridden by setup_mcp_server_logging() based on user preference
|
|
42
|
+
logging.getLogger().setLevel(logging.CRITICAL + 1) # Root logger catches everything
|
|
43
|
+
|
|
44
|
+
# Process argv
|
|
33
45
|
if argv is None:
|
|
34
46
|
argv = sys.argv[1:]
|
|
35
|
-
if "configure" in argv or (len(argv) > 0 and argv[0] == "configure"):
|
|
36
|
-
import logging
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
# EARLY CHECK: Additional suppression for configure command
|
|
49
|
+
if "configure" in argv or (len(argv) > 0 and argv[0] == "configure"):
|
|
39
50
|
os.environ["CLAUDE_MPM_SKIP_CLEANUP"] = "1"
|
|
40
51
|
|
|
41
52
|
return argv
|
|
@@ -86,7 +97,7 @@ def deploy_bundled_skills():
|
|
|
86
97
|
WHY: Automatically deploy skills from the bundled/ directory to .claude/skills/
|
|
87
98
|
to ensure skills are available for agents without manual intervention.
|
|
88
99
|
|
|
89
|
-
DESIGN DECISION: Deployment happens
|
|
100
|
+
DESIGN DECISION: Deployment happens with minimal feedback (checkmark on success).
|
|
90
101
|
Failures are logged but don't block startup to ensure claude-mpm remains
|
|
91
102
|
functional even if skills deployment fails. Respects auto_deploy config setting.
|
|
92
103
|
"""
|
|
@@ -117,9 +128,13 @@ def deploy_bundled_skills():
|
|
|
117
128
|
logger = get_logger("cli")
|
|
118
129
|
|
|
119
130
|
if deployment_result.get("deployed"):
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
)
|
|
131
|
+
# Show simple feedback for deployed skills
|
|
132
|
+
deployed_count = len(deployment_result["deployed"])
|
|
133
|
+
print(f"✓ Bundled skills ready ({deployed_count} deployed)", flush=True)
|
|
134
|
+
logger.info(f"Skills: Deployed {deployed_count} skill(s)")
|
|
135
|
+
elif not deployment_result.get("errors"):
|
|
136
|
+
# No deployment needed, skills already present
|
|
137
|
+
print("✓ Bundled skills ready", flush=True)
|
|
123
138
|
|
|
124
139
|
if deployment_result.get("errors"):
|
|
125
140
|
logger.warning(
|
|
@@ -142,7 +157,8 @@ def discover_and_link_runtime_skills():
|
|
|
142
157
|
WHY: Automatically discover and link skills added to .claude/skills/
|
|
143
158
|
without requiring manual configuration.
|
|
144
159
|
|
|
145
|
-
DESIGN DECISION:
|
|
160
|
+
DESIGN DECISION: Provides simple feedback on completion.
|
|
161
|
+
Failures are logged but don't block startup to ensure
|
|
146
162
|
claude-mpm remains functional even if skills discovery fails.
|
|
147
163
|
"""
|
|
148
164
|
try:
|
|
@@ -151,6 +167,8 @@ def discover_and_link_runtime_skills():
|
|
|
151
167
|
)
|
|
152
168
|
|
|
153
169
|
discover_skills()
|
|
170
|
+
# Show simple success feedback
|
|
171
|
+
print("✓ Runtime skills linked", flush=True)
|
|
154
172
|
except Exception as e:
|
|
155
173
|
# Import logger here to avoid circular imports
|
|
156
174
|
from ..core.logger import get_logger
|
|
@@ -160,18 +178,431 @@ def discover_and_link_runtime_skills():
|
|
|
160
178
|
# Continue execution - skills discovery failure shouldn't block startup
|
|
161
179
|
|
|
162
180
|
|
|
181
|
+
def deploy_output_style_on_startup():
|
|
182
|
+
"""
|
|
183
|
+
Deploy claude-mpm output style to Claude Code on CLI startup.
|
|
184
|
+
|
|
185
|
+
WHY: Automatically deploy and activate the output style to ensure consistent,
|
|
186
|
+
professional communication without emojis and exclamation points. This ensures
|
|
187
|
+
the style is available even when using Claude Code directly (not via chat command).
|
|
188
|
+
|
|
189
|
+
DESIGN DECISION: This is non-blocking and idempotent. It uses OutputStyleManager
|
|
190
|
+
which handles version detection, file deployment, and settings activation.
|
|
191
|
+
Only works for Claude Code >= 1.0.83.
|
|
192
|
+
"""
|
|
193
|
+
try:
|
|
194
|
+
from pathlib import Path
|
|
195
|
+
|
|
196
|
+
from ..core.output_style_manager import OutputStyleManager
|
|
197
|
+
|
|
198
|
+
# Create OutputStyleManager instance
|
|
199
|
+
output_style_manager = OutputStyleManager()
|
|
200
|
+
|
|
201
|
+
# Check if Claude Code supports output styles
|
|
202
|
+
if not output_style_manager.supports_output_styles():
|
|
203
|
+
# Silently skip - version too old or Claude not installed
|
|
204
|
+
return
|
|
205
|
+
|
|
206
|
+
# Check if already deployed and active
|
|
207
|
+
settings_file = Path.home() / ".claude" / "settings.json"
|
|
208
|
+
output_style_file = Path.home() / ".claude" / "output-styles" / "claude-mpm.md"
|
|
209
|
+
|
|
210
|
+
already_configured = False
|
|
211
|
+
if settings_file.exists() and output_style_file.exists():
|
|
212
|
+
try:
|
|
213
|
+
import json
|
|
214
|
+
|
|
215
|
+
# Check if file has content (bug fix: was skipping empty files)
|
|
216
|
+
if output_style_file.stat().st_size == 0:
|
|
217
|
+
# File is empty, need to redeploy with content
|
|
218
|
+
pass # Fall through to deployment below
|
|
219
|
+
else:
|
|
220
|
+
# File has content, check if already active
|
|
221
|
+
settings = json.loads(settings_file.read_text())
|
|
222
|
+
if settings.get("activeOutputStyle") == "claude-mpm":
|
|
223
|
+
# Already deployed and active with content
|
|
224
|
+
already_configured = True
|
|
225
|
+
except Exception:
|
|
226
|
+
pass # Continue with deployment if we can't read settings
|
|
227
|
+
|
|
228
|
+
if already_configured:
|
|
229
|
+
# Show feedback that output style is ready
|
|
230
|
+
print("✓ Output style configured", flush=True)
|
|
231
|
+
return
|
|
232
|
+
|
|
233
|
+
# Read OUTPUT_STYLE.md content
|
|
234
|
+
output_style_path = Path(__file__).parent.parent / "agents" / "OUTPUT_STYLE.md"
|
|
235
|
+
|
|
236
|
+
if not output_style_path.exists():
|
|
237
|
+
# No output style file to deploy
|
|
238
|
+
return
|
|
239
|
+
|
|
240
|
+
output_style_content = output_style_path.read_text()
|
|
241
|
+
|
|
242
|
+
# Deploy the output style (deploys file and activates it)
|
|
243
|
+
output_style_manager.deploy_output_style(output_style_content)
|
|
244
|
+
print("✓ Output style configured", flush=True)
|
|
245
|
+
|
|
246
|
+
except Exception as e:
|
|
247
|
+
# Non-critical - log but don't fail startup
|
|
248
|
+
from ..core.logger import get_logger
|
|
249
|
+
|
|
250
|
+
logger = get_logger("cli")
|
|
251
|
+
logger.debug(f"Failed to deploy output style: {e}")
|
|
252
|
+
# Continue execution - output style deployment shouldn't block startup
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def sync_remote_agents_on_startup():
|
|
256
|
+
"""
|
|
257
|
+
Synchronize agent templates from remote sources on startup.
|
|
258
|
+
|
|
259
|
+
WHY: Ensures agents are up-to-date from remote Git sources (GitHub)
|
|
260
|
+
without manual intervention. Uses ETag-based caching for efficient
|
|
261
|
+
updates (95%+ bandwidth reduction).
|
|
262
|
+
|
|
263
|
+
DESIGN DECISION: Non-blocking synchronization that doesn't prevent
|
|
264
|
+
startup if network is unavailable. Failures are logged but don't
|
|
265
|
+
block startup to ensure claude-mpm remains functional.
|
|
266
|
+
|
|
267
|
+
Workflow:
|
|
268
|
+
1. Sync all enabled Git sources (download/cache files) - Phase 1 progress bar
|
|
269
|
+
2. Deploy agents to ~/.claude/agents/ - Phase 2 progress bar
|
|
270
|
+
3. Log deployment results
|
|
271
|
+
"""
|
|
272
|
+
try:
|
|
273
|
+
from ..services.agents.deployment.agent_deployment import AgentDeploymentService
|
|
274
|
+
from ..services.agents.startup_sync import sync_agents_on_startup
|
|
275
|
+
from ..utils.progress import ProgressBar
|
|
276
|
+
|
|
277
|
+
# Phase 1: Sync files from Git sources
|
|
278
|
+
result = sync_agents_on_startup()
|
|
279
|
+
|
|
280
|
+
# Only proceed with deployment if sync was enabled and ran
|
|
281
|
+
if result.get("enabled") and result.get("sources_synced", 0) > 0:
|
|
282
|
+
from ..core.logger import get_logger
|
|
283
|
+
|
|
284
|
+
logger = get_logger("cli")
|
|
285
|
+
|
|
286
|
+
downloaded = result.get("total_downloaded", 0)
|
|
287
|
+
cached = result.get("cache_hits", 0)
|
|
288
|
+
duration = result.get("duration_ms", 0)
|
|
289
|
+
|
|
290
|
+
if downloaded > 0 or cached > 0:
|
|
291
|
+
logger.debug(
|
|
292
|
+
f"Agent sync: {downloaded} updated, {cached} cached ({duration}ms)"
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
# Log errors if any
|
|
296
|
+
errors = result.get("errors", [])
|
|
297
|
+
if errors:
|
|
298
|
+
logger.warning(f"Agent sync completed with {len(errors)} errors")
|
|
299
|
+
|
|
300
|
+
# Phase 2: Deploy agents from cache to ~/.claude/agents/
|
|
301
|
+
# This mirrors the skills deployment pattern (lines 371-407)
|
|
302
|
+
try:
|
|
303
|
+
# Initialize deployment service
|
|
304
|
+
deployment_service = AgentDeploymentService()
|
|
305
|
+
|
|
306
|
+
# Count agents in cache to show accurate progress
|
|
307
|
+
from pathlib import Path
|
|
308
|
+
|
|
309
|
+
cache_dir = Path.home() / ".claude-mpm" / "cache" / "remote-agents"
|
|
310
|
+
agent_count = 0
|
|
311
|
+
|
|
312
|
+
if cache_dir.exists():
|
|
313
|
+
# Count MD files in cache (agent markdown files from Git)
|
|
314
|
+
# Only check root directory (avoid counting subdirectory duplicates)
|
|
315
|
+
# Exclude PM templates and BASE-AGENT - only count deployable agents
|
|
316
|
+
pm_templates = {
|
|
317
|
+
"base-agent.md",
|
|
318
|
+
"circuit_breakers.md",
|
|
319
|
+
"pm_examples.md",
|
|
320
|
+
"pm_red_flags.md",
|
|
321
|
+
"research_gate_examples.md",
|
|
322
|
+
"response_format.md",
|
|
323
|
+
"ticket_completeness_examples.md",
|
|
324
|
+
"validation_templates.md",
|
|
325
|
+
"git_file_tracking.md",
|
|
326
|
+
}
|
|
327
|
+
agent_files = [
|
|
328
|
+
f
|
|
329
|
+
for f in cache_dir.glob("*.md")
|
|
330
|
+
if f.name.lower() not in pm_templates
|
|
331
|
+
]
|
|
332
|
+
agent_count = len(agent_files)
|
|
333
|
+
|
|
334
|
+
if agent_count > 0:
|
|
335
|
+
# Create progress bar for deployment phase
|
|
336
|
+
deploy_progress = ProgressBar(
|
|
337
|
+
total=agent_count,
|
|
338
|
+
prefix="Deploying agents",
|
|
339
|
+
show_percentage=True,
|
|
340
|
+
show_counter=True,
|
|
341
|
+
)
|
|
342
|
+
|
|
343
|
+
# Deploy agents with progress callback
|
|
344
|
+
deploy_target = Path.home() / ".claude" / "agents"
|
|
345
|
+
deployment_result = deployment_service.deploy_agents(
|
|
346
|
+
target_dir=deploy_target,
|
|
347
|
+
force_rebuild=False, # Only deploy if versions differ
|
|
348
|
+
deployment_mode="update", # Version-aware updates
|
|
349
|
+
)
|
|
350
|
+
|
|
351
|
+
# Update progress bar (single increment since deploy_agents is batch)
|
|
352
|
+
deploy_progress.update(agent_count)
|
|
353
|
+
|
|
354
|
+
# Finish deployment progress bar
|
|
355
|
+
deployed = len(deployment_result.get("deployed", []))
|
|
356
|
+
updated = len(deployment_result.get("updated", []))
|
|
357
|
+
skipped = len(deployment_result.get("skipped", []))
|
|
358
|
+
total_available = deployed + updated + skipped
|
|
359
|
+
|
|
360
|
+
# Show total available agents (deployed + updated + already existing)
|
|
361
|
+
if deployed > 0 or updated > 0:
|
|
362
|
+
deploy_progress.finish(
|
|
363
|
+
f"Complete: {deployed} deployed, {updated} updated, {skipped} already present ({total_available} total)"
|
|
364
|
+
)
|
|
365
|
+
else:
|
|
366
|
+
deploy_progress.finish(
|
|
367
|
+
f"Complete: {total_available} agents ready (all up-to-date)"
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
# Display deployment errors to user (not just logs)
|
|
371
|
+
deploy_errors = deployment_result.get("errors", [])
|
|
372
|
+
if deploy_errors:
|
|
373
|
+
# Log for debugging
|
|
374
|
+
logger.warning(
|
|
375
|
+
f"Agent deployment completed with {len(deploy_errors)} errors: {deploy_errors}"
|
|
376
|
+
)
|
|
377
|
+
|
|
378
|
+
# Display errors to user with clear formatting
|
|
379
|
+
print("\n⚠️ Agent Deployment Errors:")
|
|
380
|
+
|
|
381
|
+
# Show first 10 errors to avoid overwhelming output
|
|
382
|
+
max_errors_to_show = 10
|
|
383
|
+
errors_to_display = deploy_errors[:max_errors_to_show]
|
|
384
|
+
|
|
385
|
+
for error in errors_to_display:
|
|
386
|
+
# Format error message for readability
|
|
387
|
+
# Errors typically come as strings like "agent.md: Error message"
|
|
388
|
+
print(f" - {error}")
|
|
389
|
+
|
|
390
|
+
# If more errors exist, show count
|
|
391
|
+
if len(deploy_errors) > max_errors_to_show:
|
|
392
|
+
remaining = len(deploy_errors) - max_errors_to_show
|
|
393
|
+
print(f" ... and {remaining} more error(s)")
|
|
394
|
+
|
|
395
|
+
# Show summary message
|
|
396
|
+
print(
|
|
397
|
+
f"\n❌ Failed to deploy {len(deploy_errors)} agent(s). Please check the error messages above."
|
|
398
|
+
)
|
|
399
|
+
print(" Run with --verbose for detailed error information.\n")
|
|
400
|
+
|
|
401
|
+
except Exception as e:
|
|
402
|
+
# Deployment failure shouldn't block startup
|
|
403
|
+
from ..core.logger import get_logger
|
|
404
|
+
|
|
405
|
+
logger = get_logger("cli")
|
|
406
|
+
logger.warning(f"Failed to deploy agents from cache: {e}")
|
|
407
|
+
|
|
408
|
+
except Exception as e:
|
|
409
|
+
# Non-critical - log but don't fail startup
|
|
410
|
+
from ..core.logger import get_logger
|
|
411
|
+
|
|
412
|
+
logger = get_logger("cli")
|
|
413
|
+
logger.debug(f"Failed to sync remote agents: {e}")
|
|
414
|
+
# Continue execution - agent sync failure shouldn't block startup
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
def sync_remote_skills_on_startup():
|
|
418
|
+
"""
|
|
419
|
+
Synchronize skill templates from remote sources on startup.
|
|
420
|
+
|
|
421
|
+
WHY: Ensures skills are up-to-date from remote Git sources (GitHub)
|
|
422
|
+
without manual intervention. Provides consistency with agent syncing.
|
|
423
|
+
|
|
424
|
+
DESIGN DECISION: Non-blocking synchronization that doesn't prevent
|
|
425
|
+
startup if network is unavailable. Failures are logged but don't
|
|
426
|
+
block startup to ensure claude-mpm remains functional.
|
|
427
|
+
|
|
428
|
+
Workflow:
|
|
429
|
+
1. Sync all enabled Git sources (download/cache files) - Phase 1 progress bar
|
|
430
|
+
2. Deploy skills to ~/.claude/skills/ with flat structure - Phase 2 progress bar
|
|
431
|
+
3. Log deployment results
|
|
432
|
+
"""
|
|
433
|
+
try:
|
|
434
|
+
from pathlib import Path
|
|
435
|
+
|
|
436
|
+
from ..config.skill_sources import SkillSourceConfiguration
|
|
437
|
+
from ..services.skills.git_skill_source_manager import GitSkillSourceManager
|
|
438
|
+
from ..utils.progress import ProgressBar
|
|
439
|
+
|
|
440
|
+
config = SkillSourceConfiguration()
|
|
441
|
+
manager = GitSkillSourceManager(config)
|
|
442
|
+
|
|
443
|
+
# Get enabled sources
|
|
444
|
+
enabled_sources = config.get_enabled_sources()
|
|
445
|
+
if not enabled_sources:
|
|
446
|
+
return # No sources enabled, nothing to sync
|
|
447
|
+
|
|
448
|
+
# Phase 1: Sync files from Git sources
|
|
449
|
+
# We need to discover file count first to show accurate progress
|
|
450
|
+
# This requires pre-scanning repositories via GitHub API
|
|
451
|
+
from ..core.logger import get_logger
|
|
452
|
+
|
|
453
|
+
logger = get_logger("cli")
|
|
454
|
+
|
|
455
|
+
# Discover total file count across all sources
|
|
456
|
+
total_file_count = 0
|
|
457
|
+
for source in enabled_sources:
|
|
458
|
+
try:
|
|
459
|
+
# Parse GitHub URL
|
|
460
|
+
url_parts = (
|
|
461
|
+
source.url.rstrip("/").replace(".git", "").split("github.com/")
|
|
462
|
+
)
|
|
463
|
+
if len(url_parts) == 2:
|
|
464
|
+
repo_path = url_parts[1].strip("/")
|
|
465
|
+
owner_repo = "/".join(repo_path.split("/")[:2])
|
|
466
|
+
|
|
467
|
+
# Use Tree API to discover all files
|
|
468
|
+
all_files = manager._discover_repository_files_via_tree_api(
|
|
469
|
+
owner_repo, source.branch
|
|
470
|
+
)
|
|
471
|
+
|
|
472
|
+
# Count relevant files (markdown, JSON)
|
|
473
|
+
relevant_files = [
|
|
474
|
+
f
|
|
475
|
+
for f in all_files
|
|
476
|
+
if f.endswith(".md") or f.endswith(".json") or f == ".gitignore"
|
|
477
|
+
]
|
|
478
|
+
total_file_count += len(relevant_files)
|
|
479
|
+
|
|
480
|
+
except Exception as e:
|
|
481
|
+
logger.debug(f"Failed to discover files for {source.id}: {e}")
|
|
482
|
+
# Use estimate if discovery fails
|
|
483
|
+
total_file_count += 150
|
|
484
|
+
|
|
485
|
+
# Create progress bar for sync phase with actual file count
|
|
486
|
+
sync_progress = ProgressBar(
|
|
487
|
+
total=total_file_count if total_file_count > 0 else 1,
|
|
488
|
+
prefix="Syncing skills",
|
|
489
|
+
show_percentage=True,
|
|
490
|
+
show_counter=True,
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
# Sync all sources with progress callback
|
|
494
|
+
results = manager.sync_all_sources(
|
|
495
|
+
force=False, progress_callback=sync_progress.update
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
# Finish sync progress bar with clear breakdown
|
|
499
|
+
downloaded = results["total_files_updated"]
|
|
500
|
+
cached = results["total_files_cached"]
|
|
501
|
+
total_files = downloaded + cached
|
|
502
|
+
|
|
503
|
+
if cached > 0:
|
|
504
|
+
sync_progress.finish(
|
|
505
|
+
f"Complete: {downloaded} downloaded, {cached} cached ({total_files} total)"
|
|
506
|
+
)
|
|
507
|
+
else:
|
|
508
|
+
# All new downloads (first sync)
|
|
509
|
+
sync_progress.finish(f"Complete: {downloaded} files downloaded")
|
|
510
|
+
|
|
511
|
+
# Phase 2: Deploy skills to ~/.claude/skills/
|
|
512
|
+
# This flattens nested Git structure (e.g., collaboration/parallel-agents/SKILL.md)
|
|
513
|
+
# into flat deployment (e.g., collaboration-dispatching-parallel-agents/SKILL.md)
|
|
514
|
+
if results["synced_count"] > 0:
|
|
515
|
+
# Get all skills to determine deployment count
|
|
516
|
+
all_skills = manager.get_all_skills()
|
|
517
|
+
skill_count = len(all_skills)
|
|
518
|
+
|
|
519
|
+
if skill_count > 0:
|
|
520
|
+
# Create progress bar for deployment phase
|
|
521
|
+
deploy_progress = ProgressBar(
|
|
522
|
+
total=skill_count,
|
|
523
|
+
prefix="Deploying skill directories",
|
|
524
|
+
show_percentage=True,
|
|
525
|
+
show_counter=True,
|
|
526
|
+
)
|
|
527
|
+
|
|
528
|
+
# Deploy skills with progress callback
|
|
529
|
+
# Deploy to project directory (like agents), not user directory
|
|
530
|
+
deployment_result = manager.deploy_skills(
|
|
531
|
+
target_dir=Path.cwd() / ".claude" / "skills",
|
|
532
|
+
force=False,
|
|
533
|
+
progress_callback=deploy_progress.update,
|
|
534
|
+
)
|
|
535
|
+
|
|
536
|
+
# Finish deployment progress bar
|
|
537
|
+
deployed = deployment_result.get("deployed_count", 0)
|
|
538
|
+
skipped = deployment_result.get("skipped_count", 0)
|
|
539
|
+
total_available = deployed + skipped
|
|
540
|
+
|
|
541
|
+
# Show total available skills (deployed + already existing)
|
|
542
|
+
# This is more user-friendly than just showing newly deployed count
|
|
543
|
+
if deployed > 0:
|
|
544
|
+
deploy_progress.finish(
|
|
545
|
+
f"Complete: {deployed} deployed, {skipped} already present ({total_available} total)"
|
|
546
|
+
)
|
|
547
|
+
else:
|
|
548
|
+
deploy_progress.finish(
|
|
549
|
+
f"Complete: {total_available} skills ready (all up-to-date)"
|
|
550
|
+
)
|
|
551
|
+
|
|
552
|
+
# Log deployment errors if any
|
|
553
|
+
from ..core.logger import get_logger
|
|
554
|
+
|
|
555
|
+
logger = get_logger("cli")
|
|
556
|
+
|
|
557
|
+
errors = deployment_result.get("errors", [])
|
|
558
|
+
if errors:
|
|
559
|
+
logger.warning(
|
|
560
|
+
f"Skill deployment completed with {len(errors)} errors: {errors}"
|
|
561
|
+
)
|
|
562
|
+
|
|
563
|
+
# Log sync errors if any
|
|
564
|
+
if results["failed_count"] > 0:
|
|
565
|
+
logger.warning(
|
|
566
|
+
f"Skill sync completed with {results['failed_count']} failures"
|
|
567
|
+
)
|
|
568
|
+
|
|
569
|
+
except Exception as e:
|
|
570
|
+
# Non-critical - log but don't fail startup
|
|
571
|
+
from ..core.logger import get_logger
|
|
572
|
+
|
|
573
|
+
logger = get_logger("cli")
|
|
574
|
+
logger.debug(f"Failed to sync remote skills: {e}")
|
|
575
|
+
# Continue execution - skill sync failure shouldn't block startup
|
|
576
|
+
|
|
577
|
+
|
|
163
578
|
def run_background_services():
|
|
164
579
|
"""
|
|
165
580
|
Initialize all background services on startup.
|
|
166
581
|
|
|
167
582
|
WHY: Centralizes all startup service initialization for cleaner main().
|
|
583
|
+
|
|
584
|
+
NOTE: System instructions (PM_INSTRUCTIONS.md, WORKFLOW.md, MEMORY.md) and
|
|
585
|
+
templates do NOT deploy automatically on startup. They only deploy when user
|
|
586
|
+
explicitly requests them via agent-manager commands. This prevents unwanted
|
|
587
|
+
file creation in project .claude/ directories.
|
|
588
|
+
See: SystemInstructionsDeployer and agent_deployment.py line 504-509
|
|
168
589
|
"""
|
|
169
590
|
initialize_project_registry()
|
|
170
591
|
check_mcp_auto_configuration()
|
|
171
592
|
verify_mcp_gateway_startup()
|
|
172
593
|
check_for_updates_async()
|
|
173
|
-
|
|
174
|
-
|
|
594
|
+
sync_remote_agents_on_startup() # Sync agents from remote sources
|
|
595
|
+
|
|
596
|
+
# Skills deployment order (precedence: remote > bundled)
|
|
597
|
+
# 1. Deploy bundled skills first (base layer from package)
|
|
598
|
+
# 2. Sync and deploy remote skills (Git sources, can override bundled)
|
|
599
|
+
# 3. Discover and link runtime skills (user-added skills)
|
|
600
|
+
# This ensures remote skills take precedence over bundled skills when names conflict
|
|
601
|
+
deploy_bundled_skills() # Base layer: package-bundled skills
|
|
602
|
+
sync_remote_skills_on_startup() # Override layer: Git-based skills (takes precedence)
|
|
603
|
+
discover_and_link_runtime_skills() # Discovery: user-added skills
|
|
604
|
+
|
|
605
|
+
deploy_output_style_on_startup()
|
|
175
606
|
|
|
176
607
|
|
|
177
608
|
def setup_mcp_server_logging(args):
|
|
@@ -247,12 +678,26 @@ def check_mcp_auto_configuration():
|
|
|
247
678
|
user consent.
|
|
248
679
|
|
|
249
680
|
DESIGN DECISION: This is blocking but quick - it only runs once and has
|
|
250
|
-
a 10-second timeout.
|
|
251
|
-
|
|
681
|
+
a 10-second timeout. Shows progress feedback during checks to avoid
|
|
682
|
+
appearing frozen.
|
|
683
|
+
|
|
684
|
+
OPTIMIZATION: Skip ALL MCP checks for doctor and configure commands to avoid
|
|
685
|
+
duplicate checks (doctor performs its own comprehensive check, configure
|
|
686
|
+
allows users to select services).
|
|
252
687
|
"""
|
|
688
|
+
# Skip MCP service checks for the doctor and configure commands
|
|
689
|
+
# The doctor command performs its own comprehensive MCP service check
|
|
690
|
+
# The configure command allows users to configure which services to enable
|
|
691
|
+
# Running both would cause duplicate checks and log messages (9 seconds apart)
|
|
692
|
+
if len(sys.argv) > 1 and sys.argv[1] in ("doctor", "configure"):
|
|
693
|
+
return
|
|
694
|
+
|
|
253
695
|
try:
|
|
254
696
|
from ..services.mcp_gateway.auto_configure import check_and_configure_mcp
|
|
255
697
|
|
|
698
|
+
# Show progress feedback - this operation can take 10+ seconds
|
|
699
|
+
print("Checking MCP configuration...", end="", flush=True)
|
|
700
|
+
|
|
256
701
|
# This function handles all the logic:
|
|
257
702
|
# - Checks if already configured
|
|
258
703
|
# - Checks if pipx installation
|
|
@@ -261,20 +706,19 @@ def check_mcp_auto_configuration():
|
|
|
261
706
|
# - Configures if user agrees
|
|
262
707
|
check_and_configure_mcp()
|
|
263
708
|
|
|
709
|
+
# Clear the "Checking..." message by overwriting with spaces
|
|
710
|
+
print("\r" + " " * 30 + "\r", end="", flush=True)
|
|
711
|
+
|
|
264
712
|
except Exception as e:
|
|
713
|
+
# Clear progress message on error
|
|
714
|
+
print("\r" + " " * 30 + "\r", end="", flush=True)
|
|
715
|
+
|
|
265
716
|
# Non-critical - log but don't fail
|
|
266
717
|
from ..core.logger import get_logger
|
|
267
718
|
|
|
268
719
|
logger = get_logger("cli")
|
|
269
720
|
logger.debug(f"MCP auto-configuration check failed: {e}")
|
|
270
721
|
|
|
271
|
-
# Skip MCP service fixes for the doctor and configure commands
|
|
272
|
-
# The doctor command performs its own comprehensive MCP service check
|
|
273
|
-
# The configure command allows users to configure which services to enable
|
|
274
|
-
# Running both would cause duplicate checks and log messages (9 seconds apart)
|
|
275
|
-
if len(sys.argv) > 1 and sys.argv[1] in ("doctor", "configure"):
|
|
276
|
-
return
|
|
277
|
-
|
|
278
722
|
# Also ensure MCP services are properly configured in ~/.claude.json
|
|
279
723
|
# This fixes incorrect paths and adds missing services
|
|
280
724
|
try:
|
|
@@ -285,14 +729,16 @@ def check_mcp_auto_configuration():
|
|
|
285
729
|
mcp_manager = MCPConfigManager()
|
|
286
730
|
|
|
287
731
|
# Fix any corrupted installations first
|
|
288
|
-
|
|
732
|
+
_fix_success, fix_message = mcp_manager.fix_mcp_service_issues()
|
|
289
733
|
if fix_message and "Fixed:" in fix_message:
|
|
290
734
|
logger.info(f"MCP service fixes applied: {fix_message}")
|
|
735
|
+
print("✓ MCP services fixed", flush=True)
|
|
291
736
|
|
|
292
737
|
# Ensure all services are configured correctly
|
|
293
|
-
|
|
738
|
+
_config_success, config_message = mcp_manager.ensure_mcp_services_configured()
|
|
294
739
|
if config_message and "Added MCP services" in config_message:
|
|
295
740
|
logger.info(f"MCP services configured: {config_message}")
|
|
741
|
+
print("✓ MCP services configured", flush=True)
|
|
296
742
|
|
|
297
743
|
except Exception as e:
|
|
298
744
|
# Non-critical - log but don't fail
|
|
@@ -328,7 +774,6 @@ def verify_mcp_gateway_startup():
|
|
|
328
774
|
|
|
329
775
|
try:
|
|
330
776
|
import asyncio
|
|
331
|
-
import time
|
|
332
777
|
|
|
333
778
|
from ..core.logger import get_logger
|
|
334
779
|
from ..services.mcp_gateway.core.startup_verification import (
|
|
@@ -343,68 +788,14 @@ def verify_mcp_gateway_startup():
|
|
|
343
788
|
|
|
344
789
|
# DISABLED: Pre-warming MCP servers can interfere with Claude Code's MCP management
|
|
345
790
|
# This was causing issues with MCP server initialization and stderr handling
|
|
346
|
-
#
|
|
347
|
-
#
|
|
348
|
-
# try:
|
|
349
|
-
# start_time = time.time()
|
|
350
|
-
# loop = asyncio.new_event_loop()
|
|
351
|
-
# asyncio.set_event_loop(loop)
|
|
352
|
-
#
|
|
353
|
-
# # Pre-warm MCP servers (especially vector search)
|
|
354
|
-
# logger.info("Pre-warming MCP servers to eliminate startup delay...")
|
|
355
|
-
# loop.run_until_complete(pre_warm_mcp_servers())
|
|
356
|
-
#
|
|
357
|
-
# pre_warm_time = time.time() - start_time
|
|
358
|
-
# if pre_warm_time > 1.0:
|
|
359
|
-
# logger.info(f"MCP servers pre-warmed in {pre_warm_time:.2f}s")
|
|
360
|
-
|
|
361
|
-
# Dummy function to maintain structure
|
|
362
|
-
def run_pre_warming():
|
|
363
|
-
loop = None
|
|
364
|
-
try:
|
|
365
|
-
time.time()
|
|
366
|
-
loop = asyncio.new_event_loop()
|
|
367
|
-
asyncio.set_event_loop(loop)
|
|
368
|
-
|
|
369
|
-
# Also run gateway verification if needed
|
|
370
|
-
if not gateway_configured:
|
|
371
|
-
loop.run_until_complete(verify_mcp_gateway_on_startup())
|
|
372
|
-
|
|
373
|
-
except Exception as e:
|
|
374
|
-
# Non-blocking - log but don't fail
|
|
375
|
-
logger.debug(f"MCP pre-warming error (non-critical): {e}")
|
|
376
|
-
finally:
|
|
377
|
-
# Properly clean up event loop to prevent kqueue warnings
|
|
378
|
-
if loop is not None:
|
|
379
|
-
try:
|
|
380
|
-
# Cancel all running tasks
|
|
381
|
-
pending = asyncio.all_tasks(loop)
|
|
382
|
-
for task in pending:
|
|
383
|
-
task.cancel()
|
|
384
|
-
# Wait for tasks to complete cancellation
|
|
385
|
-
if pending:
|
|
386
|
-
loop.run_until_complete(
|
|
387
|
-
asyncio.gather(*pending, return_exceptions=True)
|
|
388
|
-
)
|
|
389
|
-
except Exception:
|
|
390
|
-
pass # Ignore cleanup errors
|
|
391
|
-
finally:
|
|
392
|
-
loop.close()
|
|
393
|
-
# Clear the event loop reference to help with cleanup
|
|
394
|
-
asyncio.set_event_loop(None)
|
|
395
|
-
|
|
396
|
-
# Run pre-warming in background thread
|
|
397
|
-
import threading
|
|
398
|
-
|
|
399
|
-
pre_warm_thread = threading.Thread(target=run_pre_warming, daemon=True)
|
|
400
|
-
pre_warm_thread.start()
|
|
401
|
-
|
|
402
|
-
return
|
|
791
|
+
# Pre-warming functionality has been removed. Gateway verification only runs
|
|
792
|
+
# if MCP gateway is not already configured.
|
|
403
793
|
|
|
404
|
-
# Run
|
|
794
|
+
# Run gateway verification in background if not configured
|
|
405
795
|
if not gateway_configured:
|
|
406
|
-
|
|
796
|
+
|
|
407
797
|
def run_verification():
|
|
798
|
+
"""Background thread to verify MCP gateway configuration."""
|
|
408
799
|
loop = None
|
|
409
800
|
try:
|
|
410
801
|
loop = asyncio.new_event_loop()
|
|
@@ -471,7 +862,7 @@ def check_for_updates_async():
|
|
|
471
862
|
|
|
472
863
|
DESIGN DECISION: This is non-blocking and non-critical - failures are logged
|
|
473
864
|
but don't prevent startup. Only runs for pip/pipx/npm installations, skips
|
|
474
|
-
editable/development installations.
|
|
865
|
+
editable/development installations. Respects user configuration settings.
|
|
475
866
|
"""
|
|
476
867
|
|
|
477
868
|
def run_update_check():
|
|
@@ -480,11 +871,27 @@ def check_for_updates_async():
|
|
|
480
871
|
try:
|
|
481
872
|
import asyncio
|
|
482
873
|
|
|
874
|
+
from ..core.config import Config
|
|
483
875
|
from ..core.logger import get_logger
|
|
484
876
|
from ..services.self_upgrade_service import SelfUpgradeService
|
|
485
877
|
|
|
486
878
|
logger = get_logger("upgrade_check")
|
|
487
879
|
|
|
880
|
+
# Load configuration
|
|
881
|
+
config = Config()
|
|
882
|
+
updates_config = config.get("updates", {})
|
|
883
|
+
|
|
884
|
+
# Check if update checking is enabled
|
|
885
|
+
if not updates_config.get("check_enabled", True):
|
|
886
|
+
logger.debug("Update checking disabled in configuration")
|
|
887
|
+
return
|
|
888
|
+
|
|
889
|
+
# Check frequency setting
|
|
890
|
+
frequency = updates_config.get("check_frequency", "daily")
|
|
891
|
+
if frequency == "never":
|
|
892
|
+
logger.debug("Update checking frequency set to 'never'")
|
|
893
|
+
return
|
|
894
|
+
|
|
488
895
|
# Create new event loop for this thread
|
|
489
896
|
loop = asyncio.new_event_loop()
|
|
490
897
|
asyncio.set_event_loop(loop)
|
|
@@ -499,8 +906,16 @@ def check_for_updates_async():
|
|
|
499
906
|
logger.debug("Skipping version check for editable installation")
|
|
500
907
|
return
|
|
501
908
|
|
|
909
|
+
# Get configuration values
|
|
910
|
+
check_claude_code = updates_config.get("check_claude_code", True)
|
|
911
|
+
auto_upgrade = updates_config.get("auto_upgrade", False)
|
|
912
|
+
|
|
502
913
|
# Check and prompt for upgrade if available (non-blocking)
|
|
503
|
-
loop.run_until_complete(
|
|
914
|
+
loop.run_until_complete(
|
|
915
|
+
upgrade_service.check_and_prompt_on_startup(
|
|
916
|
+
auto_upgrade=auto_upgrade, check_claude_code=check_claude_code
|
|
917
|
+
)
|
|
918
|
+
)
|
|
504
919
|
|
|
505
920
|
except Exception as e:
|
|
506
921
|
# Non-critical - log but don't fail startup
|