claude-mpm 4.16.0__py3-none-any.whl → 4.25.10__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.
Potentially problematic release.
This version of claude-mpm might be problematic. Click here for more details.
- claude_mpm/VERSION +1 -1
- claude_mpm/agents/BASE_ENGINEER.md +286 -0
- claude_mpm/agents/BASE_PM.md +272 -23
- claude_mpm/agents/OUTPUT_STYLE.md +3 -48
- claude_mpm/agents/PM_INSTRUCTIONS.md +1821 -32
- claude_mpm/agents/WORKFLOW.md +75 -2
- claude_mpm/agents/agent_loader.py +4 -4
- claude_mpm/agents/base_agent.json +6 -3
- claude_mpm/agents/frontmatter_validator.py +1 -1
- claude_mpm/agents/templates/api_qa.json +5 -2
- claude_mpm/agents/templates/circuit_breakers.md +108 -2
- claude_mpm/agents/templates/documentation.json +33 -6
- claude_mpm/agents/templates/engineer.json +5 -1
- claude_mpm/agents/templates/javascript_engineer_agent.json +380 -0
- claude_mpm/agents/templates/php-engineer.json +10 -4
- claude_mpm/agents/templates/pm_red_flags.md +89 -19
- claude_mpm/agents/templates/project_organizer.json +7 -3
- claude_mpm/agents/templates/python_engineer.json +8 -3
- claude_mpm/agents/templates/qa.json +2 -1
- claude_mpm/agents/templates/react_engineer.json +1 -0
- claude_mpm/agents/templates/research.json +82 -12
- claude_mpm/agents/templates/rust_engineer.json +12 -7
- claude_mpm/agents/templates/security.json +4 -4
- claude_mpm/agents/templates/svelte-engineer.json +225 -0
- claude_mpm/agents/templates/tauri_engineer.json +274 -0
- claude_mpm/agents/templates/ticketing.json +10 -6
- claude_mpm/agents/templates/version_control.json +4 -2
- claude_mpm/agents/templates/web_qa.json +2 -1
- claude_mpm/cli/README.md +253 -0
- claude_mpm/cli/__init__.py +11 -1
- claude_mpm/cli/commands/__init__.py +2 -0
- claude_mpm/cli/commands/aggregate.py +1 -1
- claude_mpm/cli/commands/analyze.py +3 -3
- claude_mpm/cli/commands/cleanup.py +1 -1
- claude_mpm/cli/commands/configure_agent_display.py +4 -4
- claude_mpm/cli/commands/debug.py +12 -12
- claude_mpm/cli/commands/hook_errors.py +277 -0
- claude_mpm/cli/commands/mcp_install_commands.py +1 -1
- claude_mpm/cli/commands/mcp_install_commands.py.backup +284 -0
- claude_mpm/cli/commands/mpm_init/README.md +365 -0
- claude_mpm/cli/commands/mpm_init/__init__.py +73 -0
- claude_mpm/cli/commands/mpm_init/core.py +573 -0
- claude_mpm/cli/commands/mpm_init/display.py +341 -0
- claude_mpm/cli/commands/mpm_init/git_activity.py +427 -0
- claude_mpm/cli/commands/mpm_init/modes.py +397 -0
- claude_mpm/cli/commands/mpm_init/prompts.py +442 -0
- claude_mpm/cli/commands/mpm_init_cli.py +396 -0
- claude_mpm/cli/commands/mpm_init_handler.py +67 -1
- claude_mpm/cli/commands/run.py +124 -128
- claude_mpm/cli/commands/skills.py +922 -0
- claude_mpm/cli/executor.py +58 -0
- claude_mpm/cli/interactive/agent_wizard.py +5 -5
- claude_mpm/cli/parsers/base_parser.py +35 -0
- claude_mpm/cli/parsers/mpm_init_parser.py +42 -0
- claude_mpm/cli/parsers/skills_parser.py +275 -0
- claude_mpm/cli/startup.py +168 -8
- 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/cli_module/refactoring_guide.md +253 -0
- claude_mpm/commands/mpm-auto-configure.md +52 -0
- claude_mpm/commands/mpm-help.md +6 -0
- claude_mpm/commands/mpm-init.md +130 -8
- claude_mpm/commands/mpm-resume.md +372 -0
- claude_mpm/commands/mpm-tickets.md +56 -7
- claude_mpm/commands/mpm-version.md +113 -0
- claude_mpm/commands/mpm.md +2 -0
- claude_mpm/config/agent_capabilities.yaml +658 -0
- claude_mpm/config/agent_config.py +2 -2
- claude_mpm/config/async_logging_config.yaml +145 -0
- claude_mpm/constants.py +24 -0
- claude_mpm/core/.claude-mpm/logs/hooks_20250730.log +34 -0
- claude_mpm/core/api_validator.py +1 -1
- claude_mpm/core/claude_runner.py +14 -1
- claude_mpm/core/config.py +50 -0
- claude_mpm/core/constants.py +1 -1
- claude_mpm/core/factories.py +1 -1
- 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 +48 -3
- claude_mpm/core/interfaces.py +56 -1
- claude_mpm/core/logger.py +3 -1
- claude_mpm/core/oneshot_session.py +39 -0
- claude_mpm/core/optimized_agent_loader.py +3 -3
- claude_mpm/d2/.gitignore +22 -0
- claude_mpm/d2/ARCHITECTURE_COMPARISON.md +273 -0
- claude_mpm/d2/FLASK_INTEGRATION.md +156 -0
- claude_mpm/d2/IMPLEMENTATION_SUMMARY.md +452 -0
- claude_mpm/d2/QUICKSTART.md +186 -0
- claude_mpm/d2/README.md +232 -0
- claude_mpm/d2/STORE_FIX_SUMMARY.md +167 -0
- claude_mpm/d2/SVELTE5_STORES_GUIDE.md +180 -0
- claude_mpm/d2/TESTING.md +288 -0
- claude_mpm/d2/index.html +118 -0
- claude_mpm/d2/package.json +19 -0
- claude_mpm/d2/src/App.svelte +110 -0
- claude_mpm/d2/src/components/Header.svelte +153 -0
- claude_mpm/d2/src/components/MainContent.svelte +74 -0
- claude_mpm/d2/src/components/Sidebar.svelte +85 -0
- claude_mpm/d2/src/components/tabs/EventsTab.svelte +326 -0
- claude_mpm/d2/src/lib/socketio.js +144 -0
- claude_mpm/d2/src/main.js +7 -0
- claude_mpm/d2/src/stores/events.js +114 -0
- claude_mpm/d2/src/stores/socket.js +108 -0
- claude_mpm/d2/src/stores/theme.js +65 -0
- claude_mpm/d2/svelte.config.js +12 -0
- claude_mpm/d2/vite.config.js +15 -0
- claude_mpm/dashboard/.claude-mpm/memories/README.md +36 -0
- claude_mpm/dashboard/BUILD_NUMBER +1 -0
- claude_mpm/dashboard/README.md +121 -0
- claude_mpm/dashboard/VERSION +1 -0
- claude_mpm/dashboard/react/components/DataInspector/DataInspector.tsx +273 -0
- claude_mpm/dashboard/react/components/ErrorBoundary.tsx +75 -0
- claude_mpm/dashboard/react/components/EventViewer/EventViewer.tsx +141 -0
- claude_mpm/dashboard/react/components/shared/ConnectionStatus.tsx +36 -0
- claude_mpm/dashboard/react/components/shared/FilterBar.tsx +89 -0
- claude_mpm/dashboard/react/contexts/DashboardContext.tsx +215 -0
- claude_mpm/dashboard/react/entries/events.tsx +165 -0
- claude_mpm/dashboard/react/hooks/useEvents.ts +191 -0
- claude_mpm/dashboard/react/hooks/useSocket.ts +225 -0
- claude_mpm/dashboard/static/built/REFACTORING_SUMMARY.md +170 -0
- claude_mpm/dashboard/static/built/components/activity-tree.js.map +1 -0
- claude_mpm/dashboard/static/built/components/agent-hierarchy.js +101 -101
- claude_mpm/dashboard/static/built/components/agent-inference.js.map +1 -0
- claude_mpm/dashboard/static/built/components/build-tracker.js +59 -59
- claude_mpm/dashboard/static/built/components/code-simple.js +107 -107
- claude_mpm/dashboard/static/built/components/code-tree/tree-breadcrumb.js +29 -29
- claude_mpm/dashboard/static/built/components/code-tree/tree-constants.js +24 -24
- claude_mpm/dashboard/static/built/components/code-tree/tree-search.js +27 -27
- claude_mpm/dashboard/static/built/components/code-tree/tree-utils.js +25 -25
- claude_mpm/dashboard/static/built/components/code-tree.js.map +1 -0
- claude_mpm/dashboard/static/built/components/code-viewer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/connection-debug.js +101 -101
- claude_mpm/dashboard/static/built/components/diff-viewer.js +113 -113
- claude_mpm/dashboard/static/built/components/event-processor.js.map +1 -0
- claude_mpm/dashboard/static/built/components/event-viewer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/export-manager.js.map +1 -0
- claude_mpm/dashboard/static/built/components/file-change-tracker.js +57 -57
- claude_mpm/dashboard/static/built/components/file-change-viewer.js +74 -74
- claude_mpm/dashboard/static/built/components/file-tool-tracker.js.map +1 -0
- claude_mpm/dashboard/static/built/components/file-viewer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/hud-library-loader.js.map +1 -0
- claude_mpm/dashboard/static/built/components/hud-manager.js.map +1 -0
- claude_mpm/dashboard/static/built/components/hud-visualizer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/module-viewer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/session-manager.js.map +1 -0
- claude_mpm/dashboard/static/built/components/socket-manager.js.map +1 -0
- claude_mpm/dashboard/static/built/components/ui-state-manager.js.map +1 -0
- claude_mpm/dashboard/static/built/components/unified-data-viewer.js.map +1 -0
- claude_mpm/dashboard/static/built/components/working-directory.js.map +1 -0
- claude_mpm/dashboard/static/built/connection-manager.js +76 -76
- claude_mpm/dashboard/static/built/dashboard.js.map +1 -0
- claude_mpm/dashboard/static/built/extension-error-handler.js +22 -22
- claude_mpm/dashboard/static/built/react/events.js.map +1 -0
- claude_mpm/dashboard/static/built/shared/dom-helpers.js +9 -9
- claude_mpm/dashboard/static/built/shared/event-bus.js +5 -5
- claude_mpm/dashboard/static/built/shared/logger.js +16 -16
- claude_mpm/dashboard/static/built/shared/tooltip-service.js +6 -6
- claude_mpm/dashboard/static/built/socket-client.js.map +1 -0
- 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/index.html +22 -22
- claude_mpm/dashboard/static/js/REFACTORING_SUMMARY.md +170 -0
- 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/shared/dom-helpers.js +9 -9
- claude_mpm/dashboard/static/js/shared/event-bus.js +5 -5
- claude_mpm/dashboard/static/js/shared/logger.js +16 -16
- claude_mpm/dashboard/static/js/shared/tooltip-service.js +6 -6
- claude_mpm/dashboard/static/js/socket-client.js +138 -121
- claude_mpm/dashboard/static/navigation-test-results.md +118 -0
- claude_mpm/dashboard/static/production/main.html +21 -21
- claude_mpm/dashboard/static/test-archive/dashboard.html +22 -22
- claude_mpm/dashboard/templates/.claude-mpm/memories/README.md +36 -0
- claude_mpm/dashboard/templates/.claude-mpm/memories/engineer_agent.md +39 -0
- claude_mpm/dashboard/templates/.claude-mpm/memories/version_control_agent.md +38 -0
- claude_mpm/dashboard/templates/code_simple.html +23 -23
- claude_mpm/dashboard/templates/index.html +18 -18
- claude_mpm/hooks/README.md +143 -0
- claude_mpm/hooks/__init__.py +8 -0
- 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/claude_hooks/response_tracking.py +35 -1
- claude_mpm/hooks/session_resume_hook.py +121 -0
- claude_mpm/hooks/templates/README.md +180 -0
- claude_mpm/hooks/templates/pre_tool_use_simple.py +78 -0
- claude_mpm/hooks/templates/pre_tool_use_template.py +323 -0
- claude_mpm/hooks/templates/settings.json.example +147 -0
- claude_mpm/models/resume_log.py +340 -0
- claude_mpm/schemas/agent_schema.json +596 -0
- claude_mpm/schemas/frontmatter_schema.json +165 -0
- claude_mpm/scripts/claude-hook-handler.sh +3 -3
- claude_mpm/scripts/start_activity_logging.py +3 -1
- claude_mpm/services/agents/auto_config_manager.py +1 -1
- claude_mpm/services/agents/deployment/agent_configuration_manager.py +1 -1
- claude_mpm/services/agents/deployment/agent_format_converter.py +1 -1
- claude_mpm/services/agents/deployment/agent_metrics_collector.py +3 -3
- claude_mpm/services/agents/deployment/agent_record_service.py +1 -1
- claude_mpm/services/agents/deployment/agent_validator.py +17 -1
- claude_mpm/services/agents/deployment/async_agent_deployment.py +1 -1
- claude_mpm/services/agents/deployment/facade/deployment_facade.py +3 -3
- claude_mpm/services/agents/deployment/local_template_deployment.py +1 -1
- claude_mpm/services/agents/deployment/pipeline/pipeline_executor.py +2 -2
- claude_mpm/services/agents/loading/framework_agent_loader.py +8 -8
- claude_mpm/services/agents/local_template_manager.py +4 -2
- claude_mpm/services/agents/recommender.py +47 -0
- claude_mpm/services/cli/resume_service.py +617 -0
- claude_mpm/services/cli/session_manager.py +87 -0
- claude_mpm/services/cli/session_pause_manager.py +504 -0
- claude_mpm/services/cli/session_resume_helper.py +372 -0
- claude_mpm/services/cli/unified_dashboard_manager.py +1 -1
- claude_mpm/services/core/base.py +26 -11
- claude_mpm/services/core/interfaces.py +56 -1
- claude_mpm/services/core/models/agent_config.py +3 -0
- claude_mpm/services/core/models/process.py +4 -0
- claude_mpm/services/core/path_resolver.py +1 -1
- claude_mpm/services/diagnostics/checks/agent_check.py +0 -2
- 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/doctor_reporter.py +6 -4
- claude_mpm/services/diagnostics/models.py +21 -0
- claude_mpm/services/event_bus/README.md +244 -0
- 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/README.md +303 -0
- claude_mpm/services/events/consumers/logging.py +1 -2
- claude_mpm/services/framework_claude_md_generator/README.md +119 -0
- claude_mpm/services/infrastructure/monitoring/resources.py +1 -1
- claude_mpm/services/infrastructure/resume_log_generator.py +439 -0
- claude_mpm/services/local_ops/__init__.py +2 -0
- claude_mpm/services/local_ops/process_manager.py +1 -1
- claude_mpm/services/local_ops/resource_monitor.py +2 -2
- claude_mpm/services/mcp_config_manager.py +7 -131
- claude_mpm/services/mcp_gateway/README.md +185 -0
- claude_mpm/services/mcp_gateway/auto_configure.py +31 -25
- claude_mpm/services/mcp_gateway/config/configuration.py +1 -1
- claude_mpm/services/mcp_gateway/core/process_pool.py +19 -10
- 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/external_mcp_services.py +26 -21
- 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/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/session_manager.py +205 -1
- 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/connection.py.backup +217 -0
- claude_mpm/services/socketio/handlers/git.py +2 -2
- claude_mpm/services/socketio/handlers/hook.py.backup +154 -0
- claude_mpm/services/static/.gitkeep +2 -0
- 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/local.py +1 -1
- claude_mpm/services/version_control/VERSION +1 -0
- claude_mpm/services/version_control/conflict_resolution.py +6 -4
- claude_mpm/services/version_service.py +104 -1
- claude_mpm/services/visualization/mermaid_generator.py +2 -3
- claude_mpm/skills/__init__.py +21 -0
- claude_mpm/skills/agent_skills_injector.py +324 -0
- claude_mpm/skills/bundled/.gitkeep +2 -0
- claude_mpm/skills/bundled/LICENSE_ATTRIBUTIONS.md +79 -0
- claude_mpm/skills/bundled/api-documentation.md +393 -0
- claude_mpm/skills/bundled/async-testing.md +571 -0
- claude_mpm/skills/bundled/code-review.md +143 -0
- claude_mpm/skills/bundled/collaboration/brainstorming/SKILL.md +79 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/SKILL.md +178 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/agent-prompts.md +577 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/coordination-patterns.md +467 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/examples.md +537 -0
- claude_mpm/skills/bundled/collaboration/dispatching-parallel-agents/references/troubleshooting.md +730 -0
- claude_mpm/skills/bundled/collaboration/git-worktrees.md +317 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/SKILL.md +112 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/code-reviewer-template.md +146 -0
- claude_mpm/skills/bundled/collaboration/requesting-code-review/references/review-examples.md +412 -0
- claude_mpm/skills/bundled/collaboration/stacked-prs.md +251 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/SKILL.md +81 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/references/best-practices.md +362 -0
- claude_mpm/skills/bundled/collaboration/writing-plans/references/plan-structure-templates.md +312 -0
- claude_mpm/skills/bundled/database-migration.md +199 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/SKILL.md +152 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/find-polluter.sh +63 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/advanced-techniques.md +668 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/examples.md +587 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/integration.md +438 -0
- claude_mpm/skills/bundled/debugging/root-cause-tracing/references/tracing-techniques.md +391 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/CREATION-LOG.md +119 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/SKILL.md +148 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/anti-patterns.md +483 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/examples.md +452 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/troubleshooting.md +449 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/references/workflow.md +411 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-academic.md +14 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-1.md +58 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-2.md +68 -0
- claude_mpm/skills/bundled/debugging/systematic-debugging/test-pressure-3.md +69 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/SKILL.md +131 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/gate-function.md +325 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/integration-and-workflows.md +490 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/red-flags-and-failures.md +425 -0
- claude_mpm/skills/bundled/debugging/verification-before-completion/references/verification-patterns.md +499 -0
- claude_mpm/skills/bundled/docker-containerization.md +194 -0
- claude_mpm/skills/bundled/express-local-dev.md +1429 -0
- claude_mpm/skills/bundled/fastapi-local-dev.md +1199 -0
- claude_mpm/skills/bundled/git-workflow.md +414 -0
- claude_mpm/skills/bundled/imagemagick.md +204 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/INTEGRATION.md +611 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/README.md +596 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/SKILL.md +260 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/examples/nextjs-env-structure.md +315 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/frameworks.md +436 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/security.md +433 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/synchronization.md +452 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/troubleshooting.md +404 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/references/validation.md +420 -0
- claude_mpm/skills/bundled/infrastructure/env-manager/scripts/validate_env.py +576 -0
- claude_mpm/skills/bundled/json-data-handling.md +223 -0
- claude_mpm/skills/bundled/main/artifacts-builder/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/main/artifacts-builder/SKILL.md +86 -0
- claude_mpm/skills/bundled/main/artifacts-builder/scripts/bundle-artifact.sh +54 -0
- claude_mpm/skills/bundled/main/artifacts-builder/scripts/init-artifact.sh +322 -0
- claude_mpm/skills/bundled/main/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- claude_mpm/skills/bundled/main/internal-comms/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/main/internal-comms/SKILL.md +43 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/3p-updates.md +47 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/company-newsletter.md +65 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/faq-answers.md +30 -0
- claude_mpm/skills/bundled/main/internal-comms/examples/general-comms.md +16 -0
- claude_mpm/skills/bundled/main/mcp-builder/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/main/mcp-builder/SKILL.md +160 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/design_principles.md +412 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/evaluation.md +602 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/mcp_best_practices.md +915 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/node_mcp_server.md +916 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/python_mcp_server.md +752 -0
- claude_mpm/skills/bundled/main/mcp-builder/reference/workflow.md +1237 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/connections.py +157 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/evaluation.py +425 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/example_evaluation.xml +22 -0
- claude_mpm/skills/bundled/main/mcp-builder/scripts/requirements.txt +2 -0
- claude_mpm/skills/bundled/main/skill-creator/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/main/skill-creator/SKILL.md +189 -0
- claude_mpm/skills/bundled/main/skill-creator/references/best-practices.md +500 -0
- claude_mpm/skills/bundled/main/skill-creator/references/creation-workflow.md +464 -0
- claude_mpm/skills/bundled/main/skill-creator/references/examples.md +619 -0
- claude_mpm/skills/bundled/main/skill-creator/references/progressive-disclosure.md +437 -0
- claude_mpm/skills/bundled/main/skill-creator/references/skill-structure.md +231 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/init_skill.py +303 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/package_skill.py +113 -0
- claude_mpm/skills/bundled/main/skill-creator/scripts/quick_validate.py +72 -0
- claude_mpm/skills/bundled/nextjs-local-dev.md +807 -0
- claude_mpm/skills/bundled/pdf.md +141 -0
- claude_mpm/skills/bundled/performance-profiling.md +573 -0
- claude_mpm/skills/bundled/php/espocrm-development/SKILL.md +170 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/architecture.md +602 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/common-tasks.md +821 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/development-workflow.md +742 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/frontend-customization.md +726 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/hooks-and-services.md +764 -0
- claude_mpm/skills/bundled/php/espocrm-development/references/testing-debugging.md +831 -0
- claude_mpm/skills/bundled/react/flexlayout-react.md +742 -0
- claude_mpm/skills/bundled/refactoring-patterns.md +180 -0
- claude_mpm/skills/bundled/rust/desktop-applications/SKILL.md +226 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/architecture-patterns.md +901 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/native-gui-frameworks.md +901 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/platform-integration.md +775 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/state-management.md +937 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/tauri-framework.md +770 -0
- claude_mpm/skills/bundled/rust/desktop-applications/references/testing-deployment.md +961 -0
- claude_mpm/skills/bundled/security-scanning.md +327 -0
- claude_mpm/skills/bundled/systematic-debugging.md +473 -0
- claude_mpm/skills/bundled/tauri/tauri-async-patterns.md +495 -0
- claude_mpm/skills/bundled/tauri/tauri-build-deploy.md +599 -0
- claude_mpm/skills/bundled/tauri/tauri-command-patterns.md +535 -0
- claude_mpm/skills/bundled/tauri/tauri-error-handling.md +613 -0
- claude_mpm/skills/bundled/tauri/tauri-event-system.md +648 -0
- claude_mpm/skills/bundled/tauri/tauri-file-system.md +673 -0
- claude_mpm/skills/bundled/tauri/tauri-frontend-integration.md +767 -0
- claude_mpm/skills/bundled/tauri/tauri-performance.md +669 -0
- claude_mpm/skills/bundled/tauri/tauri-state-management.md +573 -0
- claude_mpm/skills/bundled/tauri/tauri-testing.md +384 -0
- claude_mpm/skills/bundled/tauri/tauri-window-management.md +628 -0
- claude_mpm/skills/bundled/test-driven-development.md +378 -0
- claude_mpm/skills/bundled/testing/condition-based-waiting/SKILL.md +119 -0
- claude_mpm/skills/bundled/testing/condition-based-waiting/example.ts +158 -0
- claude_mpm/skills/bundled/testing/condition-based-waiting/references/patterns-and-implementation.md +253 -0
- claude_mpm/skills/bundled/testing/test-driven-development/SKILL.md +145 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/anti-patterns.md +543 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/examples.md +741 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/integration.md +470 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/philosophy.md +458 -0
- claude_mpm/skills/bundled/testing/test-driven-development/references/workflow.md +639 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/SKILL.md +458 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/examples/example-inspection-report.md +411 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/assertion-quality.md +317 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/inspection-checklist.md +270 -0
- claude_mpm/skills/bundled/testing/test-quality-inspector/references/red-flags.md +436 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/SKILL.md +140 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/completeness-anti-patterns.md +572 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/core-anti-patterns.md +411 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/detection-guide.md +569 -0
- claude_mpm/skills/bundled/testing/testing-anti-patterns/references/tdd-connection.md +695 -0
- claude_mpm/skills/bundled/testing/webapp-testing/LICENSE.txt +202 -0
- claude_mpm/skills/bundled/testing/webapp-testing/SKILL.md +184 -0
- claude_mpm/skills/bundled/testing/webapp-testing/decision-tree.md +459 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/console_logging.py +35 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/element_discovery.py +44 -0
- claude_mpm/skills/bundled/testing/webapp-testing/examples/static_html_automation.py +34 -0
- claude_mpm/skills/bundled/testing/webapp-testing/playwright-patterns.md +479 -0
- claude_mpm/skills/bundled/testing/webapp-testing/reconnaissance-pattern.md +687 -0
- claude_mpm/skills/bundled/testing/webapp-testing/scripts/with_server.py +129 -0
- claude_mpm/skills/bundled/testing/webapp-testing/server-management.md +758 -0
- claude_mpm/skills/bundled/testing/webapp-testing/troubleshooting.md +868 -0
- claude_mpm/skills/bundled/vite-local-dev.md +1061 -0
- claude_mpm/skills/bundled/web-performance-optimization.md +2305 -0
- claude_mpm/skills/bundled/xlsx.md +157 -0
- claude_mpm/skills/registry.py +97 -9
- claude_mpm/skills/skills_registry.py +347 -0
- claude_mpm/skills/skills_service.py +739 -0
- claude_mpm/templates/questions/EXAMPLES.md +501 -0
- claude_mpm/templates/questions/__init__.py +43 -0
- claude_mpm/templates/questions/base.py +193 -0
- claude_mpm/templates/questions/pr_strategy.py +314 -0
- claude_mpm/templates/questions/project_init.py +388 -0
- claude_mpm/templates/questions/ticket_mgmt.py +397 -0
- claude_mpm/tools/README_SOCKETIO_DEBUG.md +224 -0
- claude_mpm/tools/__main__.py +8 -8
- claude_mpm/tools/code_tree_analyzer/README.md +64 -0
- 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 +5 -5
- 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/robust_installer.py +3 -5
- claude_mpm/utils/structured_questions.py +619 -0
- claude_mpm-4.25.10.dist-info/METADATA +789 -0
- {claude_mpm-4.16.0.dist-info → claude_mpm-4.25.10.dist-info}/RECORD +485 -240
- claude_mpm/agents/INSTRUCTIONS_OLD_DEPRECATED.md +0 -602
- 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/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/cli/commands/mpm_init.py +0 -2008
- claude_mpm/dashboard/.claude-mpm/socketio-instances.json +0 -1
- 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/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/test-archive/test_debug.html +0 -25
- claude_mpm/tools/code_tree_analyzer.py +0 -1825
- claude_mpm-4.16.0.dist-info/METADATA +0 -453
- {claude_mpm-4.16.0.dist-info → claude_mpm-4.25.10.dist-info}/WHEEL +0 -0
- {claude_mpm-4.16.0.dist-info → claude_mpm-4.25.10.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.16.0.dist-info → claude_mpm-4.25.10.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.16.0.dist-info → claude_mpm-4.25.10.dist-info}/top_level.txt +0 -0
|
@@ -1130,139 +1130,15 @@ class MCPConfigManager:
|
|
|
1130
1130
|
"""
|
|
1131
1131
|
Detect and fix corrupted MCP service installations.
|
|
1132
1132
|
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
3. Fixes missing dependencies (like mcp-ticketer's gql)
|
|
1137
|
-
4. Validates fixes worked
|
|
1133
|
+
NOTE: Proactive health checking has been disabled.
|
|
1134
|
+
Each MCP service should stand on its own and handle its own issues.
|
|
1135
|
+
This function now only returns success without checking services.
|
|
1138
1136
|
|
|
1139
1137
|
Returns:
|
|
1140
1138
|
Tuple of (success, message)
|
|
1141
1139
|
"""
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
failed_services = []
|
|
1145
|
-
|
|
1146
|
-
# Check each service for issues
|
|
1147
|
-
for service_name in self.PIPX_SERVICES:
|
|
1148
|
-
# Check if service is enabled in config
|
|
1149
|
-
if not self.should_enable_service(service_name):
|
|
1150
|
-
self.logger.debug(f"Skipping {service_name} (disabled in config)")
|
|
1151
|
-
continue
|
|
1152
|
-
|
|
1153
|
-
self.logger.debug(f"🔍 Checking {service_name} for issues...")
|
|
1154
|
-
issue_type = self._detect_service_issue(service_name)
|
|
1155
|
-
if issue_type:
|
|
1156
|
-
services_to_fix.append((service_name, issue_type))
|
|
1157
|
-
self.logger.debug(f" ⚠️ Found issue with {service_name}: {issue_type}")
|
|
1158
|
-
else:
|
|
1159
|
-
self.logger.debug(f" ✅ {service_name} is functioning correctly")
|
|
1160
|
-
|
|
1161
|
-
if not services_to_fix:
|
|
1162
|
-
return True, "All MCP services are functioning correctly"
|
|
1163
|
-
|
|
1164
|
-
# Fix each problematic service
|
|
1165
|
-
for service_name, issue_type in services_to_fix:
|
|
1166
|
-
self.logger.info(f"🔧 Fixing {service_name}: {issue_type}")
|
|
1167
|
-
|
|
1168
|
-
if issue_type == "not_installed":
|
|
1169
|
-
# Install the service
|
|
1170
|
-
success, method = self._install_service_with_fallback(service_name)
|
|
1171
|
-
if success:
|
|
1172
|
-
fixed_services.append(f"{service_name} (installed via {method})")
|
|
1173
|
-
else:
|
|
1174
|
-
failed_services.append(f"{service_name} (installation failed)")
|
|
1175
|
-
|
|
1176
|
-
elif issue_type == "import_error":
|
|
1177
|
-
# Reinstall to fix corrupted installation
|
|
1178
|
-
self.logger.info(
|
|
1179
|
-
f" Reinstalling {service_name} to fix import errors..."
|
|
1180
|
-
)
|
|
1181
|
-
success = self._reinstall_service(service_name)
|
|
1182
|
-
if success:
|
|
1183
|
-
# NOTE: Removed automatic dependency injection workaround
|
|
1184
|
-
# Package maintainers should fix dependency declarations
|
|
1185
|
-
fixed_services.append(f"{service_name} (reinstalled)")
|
|
1186
|
-
else:
|
|
1187
|
-
failed_services.append(f"{service_name} (reinstall failed)")
|
|
1188
|
-
|
|
1189
|
-
elif issue_type == "missing_dependency":
|
|
1190
|
-
# Fix missing dependencies - try injection first, then reinstall if needed
|
|
1191
|
-
self.logger.info(
|
|
1192
|
-
f" {service_name} has missing dependencies - attempting fix..."
|
|
1193
|
-
)
|
|
1194
|
-
|
|
1195
|
-
# First try to inject dependencies without reinstalling
|
|
1196
|
-
injection_success = self._inject_missing_dependencies(service_name)
|
|
1197
|
-
|
|
1198
|
-
if injection_success:
|
|
1199
|
-
# Verify the fix worked
|
|
1200
|
-
issue_after_injection = self._detect_service_issue(service_name)
|
|
1201
|
-
if issue_after_injection is None:
|
|
1202
|
-
fixed_services.append(f"{service_name} (dependencies injected)")
|
|
1203
|
-
self.logger.info(
|
|
1204
|
-
f" ✅ Fixed {service_name} with dependency injection"
|
|
1205
|
-
)
|
|
1206
|
-
continue # Move to next service
|
|
1207
|
-
|
|
1208
|
-
# If injection alone didn't work, try full reinstall
|
|
1209
|
-
self.logger.info(
|
|
1210
|
-
" Dependency injection insufficient, trying full reinstall..."
|
|
1211
|
-
)
|
|
1212
|
-
success = self._auto_reinstall_mcp_service(service_name)
|
|
1213
|
-
if success:
|
|
1214
|
-
fixed_services.append(
|
|
1215
|
-
f"{service_name} (auto-reinstalled with dependencies)"
|
|
1216
|
-
)
|
|
1217
|
-
else:
|
|
1218
|
-
# Provide specific manual fix for known services
|
|
1219
|
-
if service_name == "mcp-ticketer":
|
|
1220
|
-
self.logger.warning(
|
|
1221
|
-
f" Auto-fix failed for {service_name}. Manual fix: "
|
|
1222
|
-
f"pipx uninstall {service_name} && pipx install {service_name} && pipx inject {service_name} gql"
|
|
1223
|
-
)
|
|
1224
|
-
else:
|
|
1225
|
-
self.logger.warning(
|
|
1226
|
-
f" Auto-reinstall failed for {service_name}. Manual fix: "
|
|
1227
|
-
f"pipx uninstall {service_name} && pipx install {service_name}"
|
|
1228
|
-
)
|
|
1229
|
-
failed_services.append(f"{service_name} (auto-reinstall failed)")
|
|
1230
|
-
|
|
1231
|
-
elif issue_type == "path_issue":
|
|
1232
|
-
# Path issues are handled by config updates
|
|
1233
|
-
self.logger.info(
|
|
1234
|
-
f" Path issue for {service_name} will be fixed by config update"
|
|
1235
|
-
)
|
|
1236
|
-
fixed_services.append(f"{service_name} (config updated)")
|
|
1237
|
-
|
|
1238
|
-
# Build result message
|
|
1239
|
-
messages = []
|
|
1240
|
-
if fixed_services:
|
|
1241
|
-
messages.append(f"✅ Fixed: {', '.join(fixed_services)}")
|
|
1242
|
-
if failed_services:
|
|
1243
|
-
messages.append(f"❌ Failed: {', '.join(failed_services)}")
|
|
1244
|
-
|
|
1245
|
-
# Return success if at least some services were fixed
|
|
1246
|
-
success = len(fixed_services) > 0 or len(failed_services) == 0
|
|
1247
|
-
message = " | ".join(messages) if messages else "No services needed fixing"
|
|
1248
|
-
|
|
1249
|
-
# Provide manual fix instructions if auto-fix failed
|
|
1250
|
-
if failed_services:
|
|
1251
|
-
message += "\n\n💡 Manual fix instructions:"
|
|
1252
|
-
for failed in failed_services:
|
|
1253
|
-
service = failed.split(" ")[0]
|
|
1254
|
-
if service in self.SERVICE_MISSING_DEPENDENCIES:
|
|
1255
|
-
deps = " ".join(
|
|
1256
|
-
[
|
|
1257
|
-
f"&& pipx inject {service} {dep}"
|
|
1258
|
-
for dep in self.SERVICE_MISSING_DEPENDENCIES[service]
|
|
1259
|
-
]
|
|
1260
|
-
)
|
|
1261
|
-
message += f"\n • {service}: pipx uninstall {service} && pipx install {service} {deps}"
|
|
1262
|
-
else:
|
|
1263
|
-
message += f"\n • {service}: pipx uninstall {service} && pipx install {service}"
|
|
1264
|
-
|
|
1265
|
-
return success, message
|
|
1140
|
+
# Services should stand on their own - no proactive health checking
|
|
1141
|
+
return True, "MCP services managing their own health"
|
|
1266
1142
|
|
|
1267
1143
|
def _detect_service_issue(self, service_name: str) -> Optional[str]:
|
|
1268
1144
|
"""
|
|
@@ -1497,7 +1373,7 @@ class MCPConfigManager:
|
|
|
1497
1373
|
)
|
|
1498
1374
|
|
|
1499
1375
|
if result.returncode == 0:
|
|
1500
|
-
self.logger.
|
|
1376
|
+
self.logger.debug(f" ✅ Successfully injected {dep}")
|
|
1501
1377
|
# Check if already injected (pipx will complain if package already exists)
|
|
1502
1378
|
elif (
|
|
1503
1379
|
"already satisfied" in result.stderr.lower()
|
|
@@ -1582,7 +1458,7 @@ class MCPConfigManager:
|
|
|
1582
1458
|
)
|
|
1583
1459
|
|
|
1584
1460
|
# Verify the reinstall worked
|
|
1585
|
-
self.logger.
|
|
1461
|
+
self.logger.debug(f" → Verifying {service_name} installation...")
|
|
1586
1462
|
issue = self._detect_service_issue(service_name)
|
|
1587
1463
|
|
|
1588
1464
|
if issue is None:
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# MCP Gateway Service
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The MCP Gateway is a standards-compliant implementation of the Model Context Protocol (MCP) for Claude MPM. It provides a simple, stdio-based server that enables seamless integration with Claude Code.
|
|
6
|
+
|
|
7
|
+
**NOTE: MCP is ONLY for Claude Code - NOT for Claude Code.**
|
|
8
|
+
Claude Code uses a different system for agent deployment via the `.claude/agents/` directory.
|
|
9
|
+
|
|
10
|
+
## Architecture
|
|
11
|
+
|
|
12
|
+
The MCP Gateway uses the official Anthropic MCP Python SDK with:
|
|
13
|
+
|
|
14
|
+
- **Standards compliance** with the official MCP specification
|
|
15
|
+
- **Stdio-based communication** for Claude Code integration
|
|
16
|
+
- **Simple JSON-RPC protocol** over stdin/stdout
|
|
17
|
+
- **Tool registry system** for extensible functionality
|
|
18
|
+
- **Comprehensive error handling** and logging
|
|
19
|
+
|
|
20
|
+
## Structure
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
mcp_gateway/
|
|
24
|
+
├── core/ # Core interfaces and base classes
|
|
25
|
+
│ ├── interfaces.py # MCP service interfaces
|
|
26
|
+
│ ├── base.py # Base MCP service class
|
|
27
|
+
│ └── exceptions.py # MCP-specific exceptions
|
|
28
|
+
├── config/ # Configuration management
|
|
29
|
+
│ ├── configuration.py # Main configuration service
|
|
30
|
+
│ ├── config_loader.py # Configuration discovery and loading
|
|
31
|
+
│ └── config_schema.py # Configuration validation
|
|
32
|
+
├── server/ # MCP server implementation (ISS-0035)
|
|
33
|
+
├── tools/ # Tool registry and adapters (ISS-0036)
|
|
34
|
+
└── registry/ # Service discovery and registration
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Features
|
|
38
|
+
|
|
39
|
+
### Implemented
|
|
40
|
+
- ✅ **Official MCP Server** - Standards-compliant implementation using Anthropic's MCP SDK
|
|
41
|
+
- ✅ **Tool Registry System** - Extensible tool management and discovery
|
|
42
|
+
- ✅ **Stdio Communication** - Standard MCP protocol over stdin/stdout
|
|
43
|
+
- ✅ **Configuration Management** - YAML-based configuration with validation
|
|
44
|
+
- ✅ **Built-in Tools** - Echo, calculator, and system info tools
|
|
45
|
+
- ✅ **CLI Integration** - Complete command-line interface for management
|
|
46
|
+
- ✅ **Error Handling** - Comprehensive error handling and logging
|
|
47
|
+
|
|
48
|
+
### Key Features
|
|
49
|
+
- **Protocol Handler** - Stdio-based MCP protocol handler, not a background service
|
|
50
|
+
- **Claude Code Ready** - Direct integration with Claude Code MCP client
|
|
51
|
+
- **Extensible** - Easy to add new tools and capabilities
|
|
52
|
+
- **Standards Compliant** - Follows official MCP specification exactly
|
|
53
|
+
|
|
54
|
+
## Quick Start
|
|
55
|
+
|
|
56
|
+
### 1. Check Status
|
|
57
|
+
```bash
|
|
58
|
+
claude-mpm mcp status
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 2. Test Tools
|
|
62
|
+
```bash
|
|
63
|
+
# Test echo tool
|
|
64
|
+
claude-mpm mcp test echo --args '{"message": "Hello MCP!"}'
|
|
65
|
+
|
|
66
|
+
# Test calculator
|
|
67
|
+
claude-mpm mcp test calculator --args '{"operation": "add", "a": 5, "b": 3}'
|
|
68
|
+
|
|
69
|
+
# Test system info
|
|
70
|
+
claude-mpm mcp test system_info
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 3. Start MCP Gateway Handler
|
|
74
|
+
```bash
|
|
75
|
+
# Start gateway handler for Claude Code integration
|
|
76
|
+
claude-mpm mcp start
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The gateway handler will listen for MCP protocol messages via stdin/stdout. This is typically invoked by Claude Code, not run directly by users.
|
|
80
|
+
|
|
81
|
+
### 4. Claude Code Integration
|
|
82
|
+
Add to your Claude Code configuration (~/.claude.json):
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"mcpServers": {
|
|
86
|
+
"claude-mpm": {
|
|
87
|
+
"command": "python",
|
|
88
|
+
"args": ["-m", "claude_mpm.cli", "mcp", "start"],
|
|
89
|
+
"cwd": "/path/to/claude-mpm"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Configuration
|
|
96
|
+
|
|
97
|
+
The MCP Gateway uses a hierarchical configuration system with the following priority:
|
|
98
|
+
|
|
99
|
+
1. Default configuration (built-in)
|
|
100
|
+
2. Configuration file (YAML)
|
|
101
|
+
3. Environment variables (highest priority)
|
|
102
|
+
|
|
103
|
+
### Configuration File Locations
|
|
104
|
+
|
|
105
|
+
The system searches for configuration in these locations (in order):
|
|
106
|
+
- `~/.claude/mcp/config.yaml` (user-specific)
|
|
107
|
+
- `~/.claude/mcp_gateway.yaml`
|
|
108
|
+
- `~/.config/claude-mpm/mcp_gateway.yaml`
|
|
109
|
+
- `./mcp_gateway.yaml` (project-specific)
|
|
110
|
+
- `./config/mcp_gateway.yaml`
|
|
111
|
+
- `./.claude/mcp_gateway.yaml`
|
|
112
|
+
- `/etc/claude-mpm/mcp_gateway.yaml` (system-wide)
|
|
113
|
+
|
|
114
|
+
### Environment Variables
|
|
115
|
+
|
|
116
|
+
Override configuration using environment variables:
|
|
117
|
+
```bash
|
|
118
|
+
export MCP_GATEWAY_SERVER_NAME=my-gateway
|
|
119
|
+
export MCP_GATEWAY_TOOLS_TIMEOUT_DEFAULT=60
|
|
120
|
+
export MCP_GATEWAY_LOGGING_LEVEL=DEBUG
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Usage
|
|
124
|
+
|
|
125
|
+
### Basic Setup
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
from claude_mpm.services.mcp_gateway import MCPConfiguration, MCPConfigLoader
|
|
129
|
+
|
|
130
|
+
# Load configuration
|
|
131
|
+
config_loader = MCPConfigLoader()
|
|
132
|
+
config = MCPConfiguration()
|
|
133
|
+
await config.initialize()
|
|
134
|
+
|
|
135
|
+
# Access configuration
|
|
136
|
+
server_name = config.get("mcp.server.name")
|
|
137
|
+
tools_enabled = config.get("mcp.tools.enabled")
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Service Registration
|
|
141
|
+
|
|
142
|
+
The MCP Gateway services are automatically registered with the claude-mpm service container:
|
|
143
|
+
|
|
144
|
+
```python
|
|
145
|
+
from claude_mpm.services import MCPConfiguration, BaseMCPService
|
|
146
|
+
|
|
147
|
+
# Services are available through lazy loading
|
|
148
|
+
config = MCPConfiguration()
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Development
|
|
152
|
+
|
|
153
|
+
### Adding New MCP Services
|
|
154
|
+
|
|
155
|
+
1. Define the interface in `core/interfaces.py`
|
|
156
|
+
2. Create base implementation in appropriate module
|
|
157
|
+
3. Register in service container if needed
|
|
158
|
+
4. Add lazy import to `__init__.py`
|
|
159
|
+
5. Update documentation
|
|
160
|
+
|
|
161
|
+
### Testing
|
|
162
|
+
|
|
163
|
+
Run tests with:
|
|
164
|
+
```bash
|
|
165
|
+
pytest tests/services/mcp_gateway/
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Dependencies
|
|
169
|
+
|
|
170
|
+
- Python 3.8+
|
|
171
|
+
- mcp>=0.1.0 (Anthropic's MCP package)
|
|
172
|
+
- PyYAML for configuration
|
|
173
|
+
- asyncio for async operations
|
|
174
|
+
|
|
175
|
+
## Related Issues
|
|
176
|
+
|
|
177
|
+
- ISS-0034: Infrastructure Setup (this implementation)
|
|
178
|
+
- ISS-0035: MCP Server Core Implementation
|
|
179
|
+
- ISS-0036: Tool Registry & Discovery System
|
|
180
|
+
- ISS-0037: stdio Communication Handler
|
|
181
|
+
- ISS-0038: Tool Adapter Framework
|
|
182
|
+
|
|
183
|
+
## Notes
|
|
184
|
+
|
|
185
|
+
This is the foundation implementation for the MCP Gateway. The actual server functionality, tool registry, and communication handlers will be implemented in subsequent tickets as part of the EP-0007 epic.
|
|
@@ -163,17 +163,21 @@ class MCPAutoConfigurator:
|
|
|
163
163
|
Returns:
|
|
164
164
|
True if user agrees, False if declines, None if timeout
|
|
165
165
|
"""
|
|
166
|
-
print("\n" + "=" * 60)
|
|
167
|
-
print("🔧 MCP Gateway Configuration")
|
|
168
|
-
print("=" * 60)
|
|
169
|
-
print(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
print(
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
print("
|
|
176
|
-
print(
|
|
166
|
+
print("\n" + "=" * 60, file=sys.stderr)
|
|
167
|
+
print("🔧 MCP Gateway Configuration", file=sys.stderr)
|
|
168
|
+
print("=" * 60, file=sys.stderr)
|
|
169
|
+
print(
|
|
170
|
+
"\nClaude MPM can automatically configure MCP Gateway for", file=sys.stderr
|
|
171
|
+
)
|
|
172
|
+
print(
|
|
173
|
+
"Claude Code integration. This enables advanced features:", file=sys.stderr
|
|
174
|
+
)
|
|
175
|
+
print(" • File analysis and summarization", file=sys.stderr)
|
|
176
|
+
print(" • System diagnostics", file=sys.stderr)
|
|
177
|
+
print(" • Ticket management", file=sys.stderr)
|
|
178
|
+
print(" • And more...", file=sys.stderr)
|
|
179
|
+
print("\nWould you like to configure it now? (y/n)", file=sys.stderr)
|
|
180
|
+
print(f"(Auto-declining in {timeout} seconds)", file=sys.stderr)
|
|
177
181
|
|
|
178
182
|
# Use threading for cross-platform timeout support
|
|
179
183
|
# Python 3.7+ has queue built-in - no need to check, we require 3.10+
|
|
@@ -203,7 +207,7 @@ class MCPAutoConfigurator:
|
|
|
203
207
|
|
|
204
208
|
if input_thread.is_alive():
|
|
205
209
|
# Timed out
|
|
206
|
-
print("\n(Timed out - declining)")
|
|
210
|
+
print("\n(Timed out - declining)", file=sys.stderr)
|
|
207
211
|
return None
|
|
208
212
|
# Got input
|
|
209
213
|
return user_input in ["y", "yes"]
|
|
@@ -220,7 +224,7 @@ class MCPAutoConfigurator:
|
|
|
220
224
|
if self.claude_config_path.exists():
|
|
221
225
|
backup_path = self._create_backup()
|
|
222
226
|
if backup_path:
|
|
223
|
-
print(f"✅ Backup created: {backup_path}")
|
|
227
|
+
print(f"✅ Backup created: {backup_path}", file=sys.stderr)
|
|
224
228
|
|
|
225
229
|
# Load or create configuration
|
|
226
230
|
config = self._load_or_create_config()
|
|
@@ -232,7 +236,7 @@ class MCPAutoConfigurator:
|
|
|
232
236
|
# Find claude-mpm executable
|
|
233
237
|
executable = self._find_claude_mpm_executable()
|
|
234
238
|
if not executable:
|
|
235
|
-
print("❌ Could not find claude-mpm executable")
|
|
239
|
+
print("❌ Could not find claude-mpm executable", file=sys.stderr)
|
|
236
240
|
return False
|
|
237
241
|
|
|
238
242
|
# Configure MCP server
|
|
@@ -246,20 +250,22 @@ class MCPAutoConfigurator:
|
|
|
246
250
|
with self.claude_config_path.open("w") as f:
|
|
247
251
|
json.dump(config, f, indent=2)
|
|
248
252
|
|
|
249
|
-
print(
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
print("
|
|
253
|
-
print("
|
|
254
|
-
print("
|
|
253
|
+
print(
|
|
254
|
+
f"✅ Configuration saved to: {self.claude_config_path}", file=sys.stderr
|
|
255
|
+
)
|
|
256
|
+
print("\n🎉 MCP Gateway configured successfully!", file=sys.stderr)
|
|
257
|
+
print("\nNext steps:", file=sys.stderr)
|
|
258
|
+
print("1. Restart Claude Code (if running)", file=sys.stderr)
|
|
259
|
+
print("2. Look for the MCP icon in the interface", file=sys.stderr)
|
|
260
|
+
print("3. Try @claude-mpm-gateway in a conversation", file=sys.stderr)
|
|
255
261
|
|
|
256
262
|
return True
|
|
257
263
|
|
|
258
264
|
except Exception as e:
|
|
259
265
|
self.logger.error(f"Auto-configuration failed: {e}")
|
|
260
|
-
print(f"❌ Configuration failed: {e}")
|
|
261
|
-
print("\nYou can configure manually with:")
|
|
262
|
-
print(" claude-mpm mcp install")
|
|
266
|
+
print(f"❌ Configuration failed: {e}", file=sys.stderr)
|
|
267
|
+
print("\nYou can configure manually with:", file=sys.stderr)
|
|
268
|
+
print(" claude-mpm mcp install", file=sys.stderr)
|
|
263
269
|
return False
|
|
264
270
|
|
|
265
271
|
def _create_backup(self) -> Optional[Path]:
|
|
@@ -344,8 +350,8 @@ class MCPAutoConfigurator:
|
|
|
344
350
|
if user_choice:
|
|
345
351
|
return self.auto_configure()
|
|
346
352
|
if user_choice is False: # User explicitly said no
|
|
347
|
-
print("\n📝 You can configure MCP later with:")
|
|
348
|
-
print(" claude-mpm mcp install")
|
|
353
|
+
print("\n📝 You can configure MCP later with:", file=sys.stderr)
|
|
354
|
+
print(" claude-mpm mcp install", file=sys.stderr)
|
|
349
355
|
# If timeout (None), don't show additional message
|
|
350
356
|
return False
|
|
351
357
|
|
|
@@ -215,7 +215,7 @@ class MCPConfiguration(BaseMCPService, IMCPConfiguration):
|
|
|
215
215
|
current[part] = {}
|
|
216
216
|
elif not isinstance(current[part], dict):
|
|
217
217
|
self.log_warning(
|
|
218
|
-
f"Cannot override non-dict config at {'.'.join(config_path[:i+1])}"
|
|
218
|
+
f"Cannot override non-dict config at {'.'.join(config_path[: i + 1])}"
|
|
219
219
|
)
|
|
220
220
|
break
|
|
221
221
|
current = current[part]
|
|
@@ -864,7 +864,7 @@ def _prompt_kuzu_update(current: str, latest: str) -> None:
|
|
|
864
864
|
# Check if running in a non-interactive context
|
|
865
865
|
try:
|
|
866
866
|
if confirm_operation(message):
|
|
867
|
-
print("🚀 Updating kuzu-memory...")
|
|
867
|
+
print("🚀 Updating kuzu-memory...", file=sys.stderr)
|
|
868
868
|
try:
|
|
869
869
|
result = subprocess.run(
|
|
870
870
|
["pipx", "upgrade", "kuzu-memory"],
|
|
@@ -874,28 +874,37 @@ def _prompt_kuzu_update(current: str, latest: str) -> None:
|
|
|
874
874
|
check=False,
|
|
875
875
|
)
|
|
876
876
|
if result.returncode == 0:
|
|
877
|
-
print("✅ Successfully updated kuzu-memory!")
|
|
877
|
+
print("✅ Successfully updated kuzu-memory!", file=sys.stderr)
|
|
878
878
|
logger.info(f"Updated kuzu-memory from {current} to {latest}")
|
|
879
879
|
else:
|
|
880
|
-
print(f"⚠️ Update failed: {result.stderr}")
|
|
880
|
+
print(f"⚠️ Update failed: {result.stderr}", file=sys.stderr)
|
|
881
881
|
logger.warning(f"kuzu-memory update failed: {result.stderr}")
|
|
882
882
|
except subprocess.TimeoutExpired:
|
|
883
|
-
print("⚠️ Update timed out. Please try again later.")
|
|
883
|
+
print("⚠️ Update timed out. Please try again later.", file=sys.stderr)
|
|
884
884
|
logger.warning("kuzu-memory update timed out")
|
|
885
885
|
except Exception as e:
|
|
886
|
-
print(f"⚠️ Update failed: {e}")
|
|
886
|
+
print(f"⚠️ Update failed: {e}", file=sys.stderr)
|
|
887
887
|
logger.warning(f"kuzu-memory update error: {e}")
|
|
888
888
|
else:
|
|
889
889
|
# User declined update
|
|
890
|
-
print("\n To skip this version permanently, run:")
|
|
891
|
-
print(
|
|
892
|
-
|
|
893
|
-
|
|
890
|
+
print("\n To skip this version permanently, run:", file=sys.stderr)
|
|
891
|
+
print(
|
|
892
|
+
f" claude-mpm config set-skip-version kuzu-memory {latest}",
|
|
893
|
+
file=sys.stderr,
|
|
894
|
+
)
|
|
895
|
+
print(" To disable update checks for kuzu-memory:", file=sys.stderr)
|
|
896
|
+
print(
|
|
897
|
+
" claude-mpm config disable-update-checks kuzu-memory",
|
|
898
|
+
file=sys.stderr,
|
|
899
|
+
)
|
|
894
900
|
|
|
895
901
|
# Ask if user wants to skip this version
|
|
896
902
|
if confirm_operation("\n Skip this version in future checks?"):
|
|
897
903
|
UpdatePreferences.set_skip_version("kuzu-memory", latest)
|
|
898
|
-
print(
|
|
904
|
+
print(
|
|
905
|
+
f" Version {latest} will be skipped in future checks.",
|
|
906
|
+
file=sys.stderr,
|
|
907
|
+
)
|
|
899
908
|
except (KeyboardInterrupt, EOFError):
|
|
900
909
|
# User interrupted or input not available
|
|
901
910
|
pass
|
|
@@ -65,7 +65,6 @@ def apply_backward_compatibility_patches():
|
|
|
65
65
|
and hasattr(request, "params")
|
|
66
66
|
and request.params is not None
|
|
67
67
|
):
|
|
68
|
-
|
|
69
68
|
# Convert params to dict to check for clientInfo
|
|
70
69
|
params_dict = request.params
|
|
71
70
|
if hasattr(params_dict, "model_dump"):
|
|
@@ -542,7 +541,6 @@ class SimpleMCPServer:
|
|
|
542
541
|
|
|
543
542
|
result = f"Python: {sys.version}"
|
|
544
543
|
elif info_type == "cwd":
|
|
545
|
-
|
|
546
544
|
result = f"Working Directory: {Path.cwd()}"
|
|
547
545
|
elif info_type == "all":
|
|
548
546
|
import datetime
|
|
@@ -73,7 +73,7 @@ class LRUCache:
|
|
|
73
73
|
if not self.cache:
|
|
74
74
|
break
|
|
75
75
|
# Remove least recently used item
|
|
76
|
-
|
|
76
|
+
_removed_key, removed_value = self.cache.popitem(last=False)
|
|
77
77
|
self.current_memory -= removed_value.get("size_bytes", 0)
|
|
78
78
|
|
|
79
79
|
# Add new item
|
|
@@ -161,12 +161,17 @@ class ExternalMCPService(BaseToolAdapter):
|
|
|
161
161
|
|
|
162
162
|
if interactive:
|
|
163
163
|
# Show user-friendly installation prompt
|
|
164
|
-
print(f"\n⚠️ {self.package_name} not found")
|
|
165
|
-
print(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
print("
|
|
164
|
+
print(f"\n⚠️ {self.package_name} not found", file=sys.stderr)
|
|
165
|
+
print(
|
|
166
|
+
"This package enables enhanced functionality (optional).",
|
|
167
|
+
file=sys.stderr,
|
|
168
|
+
)
|
|
169
|
+
print("\nInstallation options:", file=sys.stderr)
|
|
170
|
+
print(
|
|
171
|
+
"1. Install via pip (recommended for this project)", file=sys.stderr
|
|
172
|
+
)
|
|
173
|
+
print("2. Install via pipx (isolated, system-wide)", file=sys.stderr)
|
|
174
|
+
print("3. Skip (continue without this package)", file=sys.stderr)
|
|
170
175
|
|
|
171
176
|
try:
|
|
172
177
|
choice = input("\nChoose option (1/2/3) [1]: ").strip() or "1"
|
|
@@ -180,7 +185,7 @@ class ExternalMCPService(BaseToolAdapter):
|
|
|
180
185
|
)
|
|
181
186
|
return False
|
|
182
187
|
except (EOFError, KeyboardInterrupt):
|
|
183
|
-
print("\nInstallation cancelled")
|
|
188
|
+
print("\nInstallation cancelled", file=sys.stderr)
|
|
184
189
|
return False
|
|
185
190
|
else:
|
|
186
191
|
# Non-interactive: default to pip
|
|
@@ -201,7 +206,7 @@ class ExternalMCPService(BaseToolAdapter):
|
|
|
201
206
|
async def _install_via_pip(self) -> bool:
|
|
202
207
|
"""Install package via pip."""
|
|
203
208
|
try:
|
|
204
|
-
print(f"\n📦 Installing {self.package_name} via pip...")
|
|
209
|
+
print(f"\n📦 Installing {self.package_name} via pip...", file=sys.stderr)
|
|
205
210
|
result = subprocess.run(
|
|
206
211
|
[sys.executable, "-m", "pip", "install", self.package_name],
|
|
207
212
|
capture_output=True,
|
|
@@ -211,21 +216,21 @@ class ExternalMCPService(BaseToolAdapter):
|
|
|
211
216
|
)
|
|
212
217
|
|
|
213
218
|
if result.returncode == 0:
|
|
214
|
-
print(f"✓ Successfully installed {self.package_name}")
|
|
219
|
+
print(f"✓ Successfully installed {self.package_name}", file=sys.stderr)
|
|
215
220
|
self.logger.info(f"Successfully installed {self.package_name} via pip")
|
|
216
221
|
return True
|
|
217
222
|
|
|
218
223
|
error_msg = result.stderr.strip() if result.stderr else "Unknown error"
|
|
219
|
-
print(f"✗ Installation failed: {error_msg}")
|
|
224
|
+
print(f"✗ Installation failed: {error_msg}", file=sys.stderr)
|
|
220
225
|
self.logger.error(f"Failed to install {self.package_name}: {error_msg}")
|
|
221
226
|
return False
|
|
222
227
|
|
|
223
228
|
except subprocess.TimeoutExpired:
|
|
224
|
-
print("✗ Installation timed out")
|
|
229
|
+
print("✗ Installation timed out", file=sys.stderr)
|
|
225
230
|
self.logger.error(f"Installation of {self.package_name} timed out")
|
|
226
231
|
return False
|
|
227
232
|
except Exception as e:
|
|
228
|
-
print(f"✗ Installation error: {e}")
|
|
233
|
+
print(f"✗ Installation error: {e}", file=sys.stderr)
|
|
229
234
|
self.logger.error(f"Error installing {self.package_name}: {e}")
|
|
230
235
|
return False
|
|
231
236
|
|
|
@@ -242,12 +247,12 @@ class ExternalMCPService(BaseToolAdapter):
|
|
|
242
247
|
)
|
|
243
248
|
|
|
244
249
|
if pipx_check.returncode != 0:
|
|
245
|
-
print("✗ pipx is not installed")
|
|
246
|
-
print("Install pipx first: python -m pip install pipx")
|
|
250
|
+
print("✗ pipx is not installed", file=sys.stderr)
|
|
251
|
+
print("Install pipx first: python -m pip install pipx", file=sys.stderr)
|
|
247
252
|
self.logger.error("pipx not available for installation")
|
|
248
253
|
return False
|
|
249
254
|
|
|
250
|
-
print(f"\n📦 Installing {self.package_name} via pipx...")
|
|
255
|
+
print(f"\n📦 Installing {self.package_name} via pipx...", file=sys.stderr)
|
|
251
256
|
result = subprocess.run(
|
|
252
257
|
["pipx", "install", self.package_name],
|
|
253
258
|
capture_output=True,
|
|
@@ -257,26 +262,26 @@ class ExternalMCPService(BaseToolAdapter):
|
|
|
257
262
|
)
|
|
258
263
|
|
|
259
264
|
if result.returncode == 0:
|
|
260
|
-
print(f"✓ Successfully installed {self.package_name}")
|
|
265
|
+
print(f"✓ Successfully installed {self.package_name}", file=sys.stderr)
|
|
261
266
|
self.logger.info(f"Successfully installed {self.package_name} via pipx")
|
|
262
267
|
return True
|
|
263
268
|
|
|
264
269
|
error_msg = result.stderr.strip() if result.stderr else "Unknown error"
|
|
265
|
-
print(f"✗ Installation failed: {error_msg}")
|
|
270
|
+
print(f"✗ Installation failed: {error_msg}", file=sys.stderr)
|
|
266
271
|
self.logger.error(f"Failed to install {self.package_name}: {error_msg}")
|
|
267
272
|
return False
|
|
268
273
|
|
|
269
274
|
except FileNotFoundError:
|
|
270
|
-
print("✗ pipx command not found")
|
|
271
|
-
print("Install pipx first: python -m pip install pipx")
|
|
275
|
+
print("✗ pipx command not found", file=sys.stderr)
|
|
276
|
+
print("Install pipx first: python -m pip install pipx", file=sys.stderr)
|
|
272
277
|
self.logger.error("pipx command not found")
|
|
273
278
|
return False
|
|
274
279
|
except subprocess.TimeoutExpired:
|
|
275
|
-
print("✗ Installation timed out")
|
|
280
|
+
print("✗ Installation timed out", file=sys.stderr)
|
|
276
281
|
self.logger.error(f"Installation of {self.package_name} timed out")
|
|
277
282
|
return False
|
|
278
283
|
except Exception as e:
|
|
279
|
-
print(f"✗ Installation error: {e}")
|
|
284
|
+
print(f"✗ Installation error: {e}", file=sys.stderr)
|
|
280
285
|
self.logger.error(f"Error installing {self.package_name}: {e}")
|
|
281
286
|
return False
|
|
282
287
|
|