claude-mpm 4.13.2__py3-none-any.whl → 4.18.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.
Files changed (250) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/agents/BASE_ENGINEER.md +286 -0
  3. claude_mpm/agents/BASE_PM.md +48 -17
  4. claude_mpm/agents/OUTPUT_STYLE.md +329 -11
  5. claude_mpm/agents/PM_INSTRUCTIONS.md +227 -8
  6. claude_mpm/agents/agent_loader.py +17 -5
  7. claude_mpm/agents/frontmatter_validator.py +284 -253
  8. claude_mpm/agents/templates/agentic-coder-optimizer.json +9 -2
  9. claude_mpm/agents/templates/api_qa.json +7 -1
  10. claude_mpm/agents/templates/clerk-ops.json +8 -1
  11. claude_mpm/agents/templates/code_analyzer.json +4 -1
  12. claude_mpm/agents/templates/dart_engineer.json +11 -1
  13. claude_mpm/agents/templates/data_engineer.json +11 -1
  14. claude_mpm/agents/templates/documentation.json +6 -1
  15. claude_mpm/agents/templates/engineer.json +18 -1
  16. claude_mpm/agents/templates/gcp_ops_agent.json +8 -1
  17. claude_mpm/agents/templates/golang_engineer.json +11 -1
  18. claude_mpm/agents/templates/java_engineer.json +12 -2
  19. claude_mpm/agents/templates/local_ops_agent.json +1217 -6
  20. claude_mpm/agents/templates/nextjs_engineer.json +11 -1
  21. claude_mpm/agents/templates/ops.json +8 -1
  22. claude_mpm/agents/templates/php-engineer.json +11 -1
  23. claude_mpm/agents/templates/project_organizer.json +10 -3
  24. claude_mpm/agents/templates/prompt-engineer.json +5 -1
  25. claude_mpm/agents/templates/python_engineer.json +11 -1
  26. claude_mpm/agents/templates/qa.json +7 -1
  27. claude_mpm/agents/templates/react_engineer.json +11 -1
  28. claude_mpm/agents/templates/refactoring_engineer.json +8 -1
  29. claude_mpm/agents/templates/research.json +4 -1
  30. claude_mpm/agents/templates/ruby-engineer.json +11 -1
  31. claude_mpm/agents/templates/rust_engineer.json +11 -1
  32. claude_mpm/agents/templates/security.json +6 -1
  33. claude_mpm/agents/templates/svelte-engineer.json +225 -0
  34. claude_mpm/agents/templates/ticketing.json +6 -1
  35. claude_mpm/agents/templates/typescript_engineer.json +11 -1
  36. claude_mpm/agents/templates/vercel_ops_agent.json +8 -1
  37. claude_mpm/agents/templates/version_control.json +8 -1
  38. claude_mpm/agents/templates/web_qa.json +7 -1
  39. claude_mpm/agents/templates/web_ui.json +11 -1
  40. claude_mpm/cli/__init__.py +34 -706
  41. claude_mpm/cli/commands/agent_manager.py +25 -12
  42. claude_mpm/cli/commands/agent_state_manager.py +186 -0
  43. claude_mpm/cli/commands/agents.py +204 -148
  44. claude_mpm/cli/commands/aggregate.py +7 -3
  45. claude_mpm/cli/commands/analyze.py +9 -4
  46. claude_mpm/cli/commands/analyze_code.py +7 -2
  47. claude_mpm/cli/commands/auto_configure.py +7 -9
  48. claude_mpm/cli/commands/config.py +47 -13
  49. claude_mpm/cli/commands/configure.py +294 -1788
  50. claude_mpm/cli/commands/configure_agent_display.py +261 -0
  51. claude_mpm/cli/commands/configure_behavior_manager.py +204 -0
  52. claude_mpm/cli/commands/configure_hook_manager.py +225 -0
  53. claude_mpm/cli/commands/configure_models.py +18 -0
  54. claude_mpm/cli/commands/configure_navigation.py +167 -0
  55. claude_mpm/cli/commands/configure_paths.py +104 -0
  56. claude_mpm/cli/commands/configure_persistence.py +254 -0
  57. claude_mpm/cli/commands/configure_startup_manager.py +646 -0
  58. claude_mpm/cli/commands/configure_template_editor.py +497 -0
  59. claude_mpm/cli/commands/configure_validators.py +73 -0
  60. claude_mpm/cli/commands/local_deploy.py +537 -0
  61. claude_mpm/cli/commands/memory.py +54 -20
  62. claude_mpm/cli/commands/mpm_init.py +39 -25
  63. claude_mpm/cli/commands/mpm_init_handler.py +8 -3
  64. claude_mpm/cli/executor.py +202 -0
  65. claude_mpm/cli/helpers.py +105 -0
  66. claude_mpm/cli/interactive/__init__.py +3 -0
  67. claude_mpm/cli/interactive/skills_wizard.py +491 -0
  68. claude_mpm/cli/parsers/__init__.py +7 -1
  69. claude_mpm/cli/parsers/base_parser.py +98 -3
  70. claude_mpm/cli/parsers/local_deploy_parser.py +227 -0
  71. claude_mpm/cli/shared/output_formatters.py +28 -19
  72. claude_mpm/cli/startup.py +481 -0
  73. claude_mpm/cli/utils.py +52 -1
  74. claude_mpm/commands/mpm-help.md +3 -0
  75. claude_mpm/commands/mpm-version.md +113 -0
  76. claude_mpm/commands/mpm.md +1 -0
  77. claude_mpm/config/agent_config.py +2 -2
  78. claude_mpm/config/model_config.py +428 -0
  79. claude_mpm/core/base_service.py +13 -12
  80. claude_mpm/core/enums.py +452 -0
  81. claude_mpm/core/factories.py +1 -1
  82. claude_mpm/core/instruction_reinforcement_hook.py +2 -1
  83. claude_mpm/core/interactive_session.py +9 -3
  84. claude_mpm/core/logging_config.py +6 -2
  85. claude_mpm/core/oneshot_session.py +8 -4
  86. claude_mpm/core/optimized_agent_loader.py +3 -3
  87. claude_mpm/core/output_style_manager.py +12 -192
  88. claude_mpm/core/service_registry.py +5 -1
  89. claude_mpm/core/types.py +2 -9
  90. claude_mpm/core/typing_utils.py +7 -6
  91. claude_mpm/dashboard/static/js/dashboard.js +0 -14
  92. claude_mpm/dashboard/templates/index.html +3 -41
  93. claude_mpm/hooks/claude_hooks/response_tracking.py +35 -1
  94. claude_mpm/hooks/instruction_reinforcement.py +7 -2
  95. claude_mpm/models/resume_log.py +340 -0
  96. claude_mpm/services/agents/auto_config_manager.py +10 -11
  97. claude_mpm/services/agents/deployment/agent_configuration_manager.py +1 -1
  98. claude_mpm/services/agents/deployment/agent_record_service.py +1 -1
  99. claude_mpm/services/agents/deployment/agent_validator.py +17 -1
  100. claude_mpm/services/agents/deployment/async_agent_deployment.py +1 -1
  101. claude_mpm/services/agents/deployment/interface_adapter.py +3 -2
  102. claude_mpm/services/agents/deployment/local_template_deployment.py +1 -1
  103. claude_mpm/services/agents/deployment/pipeline/steps/agent_processing_step.py +7 -6
  104. claude_mpm/services/agents/deployment/pipeline/steps/base_step.py +7 -16
  105. claude_mpm/services/agents/deployment/pipeline/steps/configuration_step.py +4 -3
  106. claude_mpm/services/agents/deployment/pipeline/steps/target_directory_step.py +5 -3
  107. claude_mpm/services/agents/deployment/pipeline/steps/validation_step.py +6 -5
  108. claude_mpm/services/agents/deployment/refactored_agent_deployment_service.py +9 -6
  109. claude_mpm/services/agents/deployment/validation/__init__.py +3 -1
  110. claude_mpm/services/agents/deployment/validation/validation_result.py +1 -9
  111. claude_mpm/services/agents/local_template_manager.py +1 -1
  112. claude_mpm/services/agents/memory/agent_memory_manager.py +5 -2
  113. claude_mpm/services/agents/registry/modification_tracker.py +5 -2
  114. claude_mpm/services/command_handler_service.py +11 -5
  115. claude_mpm/services/core/interfaces/__init__.py +74 -2
  116. claude_mpm/services/core/interfaces/health.py +172 -0
  117. claude_mpm/services/core/interfaces/model.py +281 -0
  118. claude_mpm/services/core/interfaces/process.py +372 -0
  119. claude_mpm/services/core/interfaces/restart.py +307 -0
  120. claude_mpm/services/core/interfaces/stability.py +260 -0
  121. claude_mpm/services/core/models/__init__.py +33 -0
  122. claude_mpm/services/core/models/agent_config.py +12 -28
  123. claude_mpm/services/core/models/health.py +162 -0
  124. claude_mpm/services/core/models/process.py +235 -0
  125. claude_mpm/services/core/models/restart.py +302 -0
  126. claude_mpm/services/core/models/stability.py +264 -0
  127. claude_mpm/services/core/path_resolver.py +23 -7
  128. claude_mpm/services/diagnostics/__init__.py +2 -2
  129. claude_mpm/services/diagnostics/checks/agent_check.py +25 -24
  130. claude_mpm/services/diagnostics/checks/claude_code_check.py +24 -23
  131. claude_mpm/services/diagnostics/checks/common_issues_check.py +25 -24
  132. claude_mpm/services/diagnostics/checks/configuration_check.py +24 -23
  133. claude_mpm/services/diagnostics/checks/filesystem_check.py +18 -17
  134. claude_mpm/services/diagnostics/checks/installation_check.py +30 -29
  135. claude_mpm/services/diagnostics/checks/instructions_check.py +20 -19
  136. claude_mpm/services/diagnostics/checks/mcp_check.py +50 -36
  137. claude_mpm/services/diagnostics/checks/mcp_services_check.py +36 -31
  138. claude_mpm/services/diagnostics/checks/monitor_check.py +23 -22
  139. claude_mpm/services/diagnostics/checks/startup_log_check.py +9 -8
  140. claude_mpm/services/diagnostics/diagnostic_runner.py +6 -5
  141. claude_mpm/services/diagnostics/doctor_reporter.py +28 -25
  142. claude_mpm/services/diagnostics/models.py +19 -24
  143. claude_mpm/services/infrastructure/monitoring/__init__.py +1 -1
  144. claude_mpm/services/infrastructure/monitoring/aggregator.py +12 -12
  145. claude_mpm/services/infrastructure/monitoring/base.py +5 -13
  146. claude_mpm/services/infrastructure/monitoring/network.py +7 -6
  147. claude_mpm/services/infrastructure/monitoring/process.py +13 -12
  148. claude_mpm/services/infrastructure/monitoring/resources.py +7 -6
  149. claude_mpm/services/infrastructure/monitoring/service.py +16 -15
  150. claude_mpm/services/infrastructure/resume_log_generator.py +439 -0
  151. claude_mpm/services/local_ops/__init__.py +163 -0
  152. claude_mpm/services/local_ops/crash_detector.py +257 -0
  153. claude_mpm/services/local_ops/health_checks/__init__.py +28 -0
  154. claude_mpm/services/local_ops/health_checks/http_check.py +224 -0
  155. claude_mpm/services/local_ops/health_checks/process_check.py +236 -0
  156. claude_mpm/services/local_ops/health_checks/resource_check.py +255 -0
  157. claude_mpm/services/local_ops/health_manager.py +430 -0
  158. claude_mpm/services/local_ops/log_monitor.py +396 -0
  159. claude_mpm/services/local_ops/memory_leak_detector.py +294 -0
  160. claude_mpm/services/local_ops/process_manager.py +595 -0
  161. claude_mpm/services/local_ops/resource_monitor.py +331 -0
  162. claude_mpm/services/local_ops/restart_manager.py +401 -0
  163. claude_mpm/services/local_ops/restart_policy.py +387 -0
  164. claude_mpm/services/local_ops/state_manager.py +372 -0
  165. claude_mpm/services/local_ops/unified_manager.py +600 -0
  166. claude_mpm/services/mcp_config_manager.py +9 -4
  167. claude_mpm/services/mcp_gateway/core/__init__.py +1 -2
  168. claude_mpm/services/mcp_gateway/core/base.py +18 -31
  169. claude_mpm/services/mcp_gateway/tools/external_mcp_services.py +71 -24
  170. claude_mpm/services/mcp_gateway/tools/health_check_tool.py +30 -28
  171. claude_mpm/services/memory_hook_service.py +4 -1
  172. claude_mpm/services/model/__init__.py +147 -0
  173. claude_mpm/services/model/base_provider.py +365 -0
  174. claude_mpm/services/model/claude_provider.py +412 -0
  175. claude_mpm/services/model/model_router.py +453 -0
  176. claude_mpm/services/model/ollama_provider.py +415 -0
  177. claude_mpm/services/monitor/daemon_manager.py +3 -2
  178. claude_mpm/services/monitor/handlers/dashboard.py +2 -1
  179. claude_mpm/services/monitor/handlers/hooks.py +2 -1
  180. claude_mpm/services/monitor/management/lifecycle.py +3 -2
  181. claude_mpm/services/monitor/server.py +2 -1
  182. claude_mpm/services/session_management_service.py +3 -2
  183. claude_mpm/services/session_manager.py +205 -1
  184. claude_mpm/services/shared/async_service_base.py +16 -27
  185. claude_mpm/services/shared/lifecycle_service_base.py +1 -14
  186. claude_mpm/services/socketio/handlers/__init__.py +5 -2
  187. claude_mpm/services/socketio/handlers/hook.py +13 -2
  188. claude_mpm/services/socketio/handlers/registry.py +4 -2
  189. claude_mpm/services/socketio/server/main.py +10 -8
  190. claude_mpm/services/subprocess_launcher_service.py +14 -5
  191. claude_mpm/services/unified/analyzer_strategies/code_analyzer.py +8 -7
  192. claude_mpm/services/unified/analyzer_strategies/dependency_analyzer.py +6 -5
  193. claude_mpm/services/unified/analyzer_strategies/performance_analyzer.py +8 -7
  194. claude_mpm/services/unified/analyzer_strategies/security_analyzer.py +7 -6
  195. claude_mpm/services/unified/analyzer_strategies/structure_analyzer.py +5 -4
  196. claude_mpm/services/unified/config_strategies/validation_strategy.py +13 -9
  197. claude_mpm/services/unified/deployment_strategies/cloud_strategies.py +10 -3
  198. claude_mpm/services/unified/deployment_strategies/local.py +6 -5
  199. claude_mpm/services/unified/deployment_strategies/utils.py +6 -5
  200. claude_mpm/services/unified/deployment_strategies/vercel.py +7 -6
  201. claude_mpm/services/unified/interfaces.py +3 -1
  202. claude_mpm/services/unified/unified_analyzer.py +14 -10
  203. claude_mpm/services/unified/unified_config.py +2 -1
  204. claude_mpm/services/unified/unified_deployment.py +9 -4
  205. claude_mpm/services/version_service.py +104 -1
  206. claude_mpm/skills/__init__.py +21 -0
  207. claude_mpm/skills/bundled/__init__.py +6 -0
  208. claude_mpm/skills/bundled/api-documentation.md +393 -0
  209. claude_mpm/skills/bundled/async-testing.md +571 -0
  210. claude_mpm/skills/bundled/code-review.md +143 -0
  211. claude_mpm/skills/bundled/database-migration.md +199 -0
  212. claude_mpm/skills/bundled/docker-containerization.md +194 -0
  213. claude_mpm/skills/bundled/express-local-dev.md +1429 -0
  214. claude_mpm/skills/bundled/fastapi-local-dev.md +1199 -0
  215. claude_mpm/skills/bundled/git-workflow.md +414 -0
  216. claude_mpm/skills/bundled/imagemagick.md +204 -0
  217. claude_mpm/skills/bundled/json-data-handling.md +223 -0
  218. claude_mpm/skills/bundled/nextjs-local-dev.md +807 -0
  219. claude_mpm/skills/bundled/pdf.md +141 -0
  220. claude_mpm/skills/bundled/performance-profiling.md +567 -0
  221. claude_mpm/skills/bundled/refactoring-patterns.md +180 -0
  222. claude_mpm/skills/bundled/security-scanning.md +327 -0
  223. claude_mpm/skills/bundled/systematic-debugging.md +473 -0
  224. claude_mpm/skills/bundled/test-driven-development.md +378 -0
  225. claude_mpm/skills/bundled/vite-local-dev.md +1061 -0
  226. claude_mpm/skills/bundled/web-performance-optimization.md +2305 -0
  227. claude_mpm/skills/bundled/xlsx.md +157 -0
  228. claude_mpm/skills/registry.py +286 -0
  229. claude_mpm/skills/skill_manager.py +310 -0
  230. claude_mpm/tools/code_tree_analyzer.py +177 -141
  231. claude_mpm/tools/code_tree_events.py +4 -2
  232. claude_mpm/utils/agent_dependency_loader.py +2 -2
  233. {claude_mpm-4.13.2.dist-info → claude_mpm-4.18.2.dist-info}/METADATA +117 -8
  234. {claude_mpm-4.13.2.dist-info → claude_mpm-4.18.2.dist-info}/RECORD +238 -174
  235. claude_mpm/dashboard/static/css/code-tree.css +0 -1639
  236. claude_mpm/dashboard/static/js/components/code-tree/tree-breadcrumb.js +0 -353
  237. claude_mpm/dashboard/static/js/components/code-tree/tree-constants.js +0 -235
  238. claude_mpm/dashboard/static/js/components/code-tree/tree-search.js +0 -409
  239. claude_mpm/dashboard/static/js/components/code-tree/tree-utils.js +0 -435
  240. claude_mpm/dashboard/static/js/components/code-tree.js +0 -5869
  241. claude_mpm/dashboard/static/js/components/code-viewer.js +0 -1386
  242. claude_mpm/hooks/claude_hooks/hook_handler_eventbus.py +0 -425
  243. claude_mpm/hooks/claude_hooks/hook_handler_original.py +0 -1041
  244. claude_mpm/hooks/claude_hooks/hook_handler_refactored.py +0 -347
  245. claude_mpm/services/agents/deployment/agent_lifecycle_manager_refactored.py +0 -575
  246. claude_mpm/services/project/analyzer_refactored.py +0 -450
  247. {claude_mpm-4.13.2.dist-info → claude_mpm-4.18.2.dist-info}/WHEEL +0 -0
  248. {claude_mpm-4.13.2.dist-info → claude_mpm-4.18.2.dist-info}/entry_points.txt +0 -0
  249. {claude_mpm-4.13.2.dist-info → claude_mpm-4.18.2.dist-info}/licenses/LICENSE +0 -0
  250. {claude_mpm-4.13.2.dist-info → claude_mpm-4.18.2.dist-info}/top_level.txt +0 -0
@@ -14,7 +14,8 @@ from typing import Dict, List, Optional, Tuple
14
14
 
15
15
  from claude_mpm.core.logger import get_logger
16
16
 
17
- from ..models import DiagnosticResult, DiagnosticStatus
17
+ from ....core.enums import OperationResult, ValidationSeverity
18
+ from ..models import DiagnosticResult
18
19
  from .base_check import BaseDiagnosticCheck
19
20
 
20
21
 
@@ -116,7 +117,9 @@ class MCPServicesCheck(BaseDiagnosticCheck):
116
117
  fix_result = DiagnosticResult(
117
118
  category="MCP Service Fixes",
118
119
  status=(
119
- DiagnosticStatus.OK if fix_success else DiagnosticStatus.WARNING
120
+ OperationResult.SUCCESS
121
+ if fix_success
122
+ else ValidationSeverity.WARNING
120
123
  ),
121
124
  message=fix_message,
122
125
  details={"auto_fix_applied": True},
@@ -134,9 +137,9 @@ class MCPServicesCheck(BaseDiagnosticCheck):
134
137
  config_result = DiagnosticResult(
135
138
  category="MCP Configuration Update",
136
139
  status=(
137
- DiagnosticStatus.OK
140
+ OperationResult.SUCCESS
138
141
  if config_success
139
- else DiagnosticStatus.WARNING
142
+ else ValidationSeverity.WARNING
140
143
  ),
141
144
  message=config_message,
142
145
  details={"auto_config_applied": True},
@@ -191,32 +194,34 @@ class MCPServicesCheck(BaseDiagnosticCheck):
191
194
  details["connected_count"] = connected_count
192
195
  details["total_services"] = total_services
193
196
  details["total_tools_discovered"] = total_tools
194
- details["gateway_configured"] = gateway_result.status == DiagnosticStatus.OK
197
+ details["gateway_configured"] = (
198
+ gateway_result.status == OperationResult.SUCCESS
199
+ )
195
200
 
196
201
  # Determine overall status
197
- errors = [r for r in sub_results if r.status == DiagnosticStatus.ERROR]
198
- [r for r in sub_results if r.status == DiagnosticStatus.WARNING]
202
+ errors = [r for r in sub_results if r.status == ValidationSeverity.ERROR]
203
+ [r for r in sub_results if r.status == ValidationSeverity.WARNING]
199
204
 
200
205
  if errors:
201
- status = DiagnosticStatus.ERROR
206
+ status = ValidationSeverity.ERROR
202
207
  message = f"Critical issues with {len(errors)} MCP service(s)"
203
208
  elif installed_count == 0:
204
- status = DiagnosticStatus.WARNING
209
+ status = ValidationSeverity.WARNING
205
210
  message = "No MCP services installed"
206
211
  elif connected_count == total_services:
207
- status = DiagnosticStatus.OK
212
+ status = OperationResult.SUCCESS
208
213
  message = f"All {total_services} MCP services connected ({total_tools} tools available)"
209
214
  elif connected_count > 0:
210
- status = DiagnosticStatus.WARNING
215
+ status = ValidationSeverity.WARNING
211
216
  message = f"{connected_count}/{total_services} MCP services connected, {installed_count} installed"
212
217
  elif accessible_count < installed_count:
213
- status = DiagnosticStatus.WARNING
218
+ status = ValidationSeverity.WARNING
214
219
  message = f"{installed_count}/{total_services} services installed, {accessible_count} accessible"
215
220
  elif installed_count < total_services:
216
- status = DiagnosticStatus.WARNING
221
+ status = ValidationSeverity.WARNING
217
222
  message = f"{installed_count}/{total_services} MCP services installed"
218
223
  else:
219
- status = DiagnosticStatus.WARNING
224
+ status = ValidationSeverity.WARNING
220
225
  message = f"All {total_services} MCP services installed but connections not tested"
221
226
 
222
227
  return DiagnosticResult(
@@ -230,7 +235,7 @@ class MCPServicesCheck(BaseDiagnosticCheck):
230
235
  except Exception as e:
231
236
  return DiagnosticResult(
232
237
  category=self.category,
233
- status=DiagnosticStatus.ERROR,
238
+ status=ValidationSeverity.ERROR,
234
239
  message=f"MCP services check failed: {e!s}",
235
240
  details={"error": str(e)},
236
241
  )
@@ -543,7 +548,7 @@ class MCPServicesCheck(BaseDiagnosticCheck):
543
548
  if not (pipx_installed or accessible):
544
549
  return DiagnosticResult(
545
550
  category=f"MCP Service: {service_name}",
546
- status=DiagnosticStatus.WARNING,
551
+ status=ValidationSeverity.WARNING,
547
552
  message=f"Not installed: {config['description']}",
548
553
  details=details,
549
554
  fix_command=f"pipx install {config['package']}",
@@ -565,16 +570,16 @@ class MCPServicesCheck(BaseDiagnosticCheck):
565
570
  return DiagnosticResult(
566
571
  category=f"MCP Service: {service_name}",
567
572
  status=(
568
- DiagnosticStatus.OK
573
+ OperationResult.SUCCESS
569
574
  if connection_info.get("connected")
570
- else DiagnosticStatus.WARNING
575
+ else ValidationSeverity.WARNING
571
576
  ),
572
577
  message=message,
573
578
  details=details,
574
579
  )
575
580
  return DiagnosticResult(
576
581
  category=f"MCP Service: {service_name}",
577
- status=DiagnosticStatus.WARNING,
582
+ status=ValidationSeverity.WARNING,
578
583
  message="Installed via pipx but not in PATH",
579
584
  details=details,
580
585
  fix_command="pipx ensurepath",
@@ -588,14 +593,14 @@ class MCPServicesCheck(BaseDiagnosticCheck):
588
593
  response_time = connection_info.get("response_time_ms")
589
594
  tools_count = connection_info.get("tools_discovered", 0)
590
595
  message = f"Installed, accessible, connection OK ({tools_count} tools, {response_time}ms)"
591
- status = DiagnosticStatus.OK
596
+ status = OperationResult.SUCCESS
592
597
  else:
593
598
  error = connection_info.get("error", "Unknown error")
594
599
  message = f"Installed but connection failed: {error}"
595
- status = DiagnosticStatus.WARNING
600
+ status = ValidationSeverity.WARNING
596
601
  else:
597
602
  message = "Installed and accessible"
598
- status = DiagnosticStatus.OK
603
+ status = OperationResult.SUCCESS
599
604
 
600
605
  return DiagnosticResult(
601
606
  category=f"MCP Service: {service_name}",
@@ -826,7 +831,7 @@ class MCPServicesCheck(BaseDiagnosticCheck):
826
831
  if fixed:
827
832
  return DiagnosticResult(
828
833
  category="kuzu-memory Configuration Fix",
829
- status=DiagnosticStatus.OK,
834
+ status=OperationResult.SUCCESS,
830
835
  message="Fixed kuzu-memory configuration to use correct args",
831
836
  details={
832
837
  "old_args": args,
@@ -837,7 +842,7 @@ class MCPServicesCheck(BaseDiagnosticCheck):
837
842
  )
838
843
  return DiagnosticResult(
839
844
  category="kuzu-memory Configuration",
840
- status=DiagnosticStatus.WARNING,
845
+ status=ValidationSeverity.WARNING,
841
846
  message="kuzu-memory has incorrect configuration",
842
847
  details={
843
848
  "current_args": args,
@@ -931,7 +936,7 @@ class MCPServicesCheck(BaseDiagnosticCheck):
931
936
  if not config_file.exists():
932
937
  return DiagnosticResult(
933
938
  category="MCP Gateway Configuration",
934
- status=DiagnosticStatus.WARNING,
939
+ status=ValidationSeverity.WARNING,
935
940
  message="Claude configuration file not found",
936
941
  details={"config_path": str(config_file), "exists": False},
937
942
  fix_command="claude-mpm configure --mcp",
@@ -951,7 +956,7 @@ class MCPServicesCheck(BaseDiagnosticCheck):
951
956
  if current_project not in projects:
952
957
  return DiagnosticResult(
953
958
  category="MCP Gateway Configuration",
954
- status=DiagnosticStatus.WARNING,
959
+ status=ValidationSeverity.WARNING,
955
960
  message="Current project not configured in Claude",
956
961
  details={
957
962
  "config_path": str(config_file),
@@ -982,7 +987,7 @@ class MCPServicesCheck(BaseDiagnosticCheck):
982
987
  if not configured_services:
983
988
  return DiagnosticResult(
984
989
  category="MCP Gateway Configuration",
985
- status=DiagnosticStatus.WARNING,
990
+ status=ValidationSeverity.WARNING,
986
991
  message="No MCP services configured in gateway",
987
992
  details=details,
988
993
  fix_command="claude-mpm configure --mcp --add-services",
@@ -992,14 +997,14 @@ class MCPServicesCheck(BaseDiagnosticCheck):
992
997
  if missing_services:
993
998
  return DiagnosticResult(
994
999
  category="MCP Gateway Configuration",
995
- status=DiagnosticStatus.WARNING,
1000
+ status=ValidationSeverity.WARNING,
996
1001
  message=f"{len(configured_services)} services configured, {len(missing_services)} missing",
997
1002
  details=details,
998
1003
  )
999
1004
 
1000
1005
  return DiagnosticResult(
1001
1006
  category="MCP Gateway Configuration",
1002
- status=DiagnosticStatus.OK,
1007
+ status=OperationResult.SUCCESS,
1003
1008
  message=f"All {len(configured_services)} services configured",
1004
1009
  details=details,
1005
1010
  )
@@ -1007,14 +1012,14 @@ class MCPServicesCheck(BaseDiagnosticCheck):
1007
1012
  except json.JSONDecodeError as e:
1008
1013
  return DiagnosticResult(
1009
1014
  category="MCP Gateway Configuration",
1010
- status=DiagnosticStatus.ERROR,
1015
+ status=ValidationSeverity.ERROR,
1011
1016
  message="Invalid JSON in MCP configuration",
1012
1017
  details={"error": str(e)},
1013
1018
  )
1014
1019
  except Exception as e:
1015
1020
  return DiagnosticResult(
1016
1021
  category="MCP Gateway Configuration",
1017
- status=DiagnosticStatus.WARNING,
1022
+ status=ValidationSeverity.WARNING,
1018
1023
  message=f"Could not check configuration: {e!s}",
1019
1024
  details={"error": str(e)},
1020
1025
  )
@@ -7,7 +7,8 @@ properly configured and accessible for real-time updates.
7
7
 
8
8
  import socket
9
9
 
10
- from ..models import DiagnosticResult, DiagnosticStatus
10
+ from ....core.enums import OperationResult, ValidationSeverity
11
+ from ..models import DiagnosticResult
11
12
  from .base_check import BaseDiagnosticCheck
12
13
 
13
14
 
@@ -33,7 +34,7 @@ class MonitorCheck(BaseDiagnosticCheck):
33
34
  socketio_result = self._check_socketio()
34
35
  sub_results.append(socketio_result)
35
36
  details["socketio_available"] = (
36
- socketio_result.status == DiagnosticStatus.OK
37
+ socketio_result.status == OperationResult.SUCCESS
37
38
  )
38
39
 
39
40
  # Check port availability
@@ -49,17 +50,17 @@ class MonitorCheck(BaseDiagnosticCheck):
49
50
  # Check hook service
50
51
  hook_result = self._check_hook_service()
51
52
  sub_results.append(hook_result)
52
- details["hooks_enabled"] = hook_result.status == DiagnosticStatus.OK
53
+ details["hooks_enabled"] = hook_result.status == OperationResult.SUCCESS
53
54
 
54
55
  # Determine overall status
55
- if any(r.status == DiagnosticStatus.ERROR for r in sub_results):
56
- status = DiagnosticStatus.ERROR
56
+ if any(r.status == ValidationSeverity.ERROR for r in sub_results):
57
+ status = ValidationSeverity.ERROR
57
58
  message = "Monitoring has critical issues"
58
- elif any(r.status == DiagnosticStatus.WARNING for r in sub_results):
59
- status = DiagnosticStatus.WARNING
59
+ elif any(r.status == ValidationSeverity.WARNING for r in sub_results):
60
+ status = ValidationSeverity.WARNING
60
61
  message = "Monitoring has minor issues"
61
62
  else:
62
- status = DiagnosticStatus.OK
63
+ status = OperationResult.SUCCESS
63
64
  message = "Monitoring properly configured"
64
65
 
65
66
  return DiagnosticResult(
@@ -73,7 +74,7 @@ class MonitorCheck(BaseDiagnosticCheck):
73
74
  except Exception as e:
74
75
  return DiagnosticResult(
75
76
  category=self.category,
76
- status=DiagnosticStatus.ERROR,
77
+ status=ValidationSeverity.ERROR,
77
78
  message=f"Monitor check failed: {e!s}",
78
79
  details={"error": str(e)},
79
80
  )
@@ -85,7 +86,7 @@ class MonitorCheck(BaseDiagnosticCheck):
85
86
 
86
87
  return DiagnosticResult(
87
88
  category="SocketIO",
88
- status=DiagnosticStatus.OK,
89
+ status=OperationResult.SUCCESS,
89
90
  message="SocketIO library available",
90
91
  details={
91
92
  "available": True,
@@ -95,7 +96,7 @@ class MonitorCheck(BaseDiagnosticCheck):
95
96
  except ImportError:
96
97
  return DiagnosticResult(
97
98
  category="SocketIO",
98
- status=DiagnosticStatus.WARNING,
99
+ status=ValidationSeverity.WARNING,
99
100
  message="SocketIO not installed",
100
101
  details={"available": False},
101
102
  fix_command="pip install python-socketio[asyncio]",
@@ -122,7 +123,7 @@ class MonitorCheck(BaseDiagnosticCheck):
122
123
  if not available_ports:
123
124
  return DiagnosticResult(
124
125
  category="Port Availability",
125
- status=DiagnosticStatus.ERROR,
126
+ status=ValidationSeverity.ERROR,
126
127
  message="No monitoring ports available (8765-8785)",
127
128
  details={
128
129
  "available": [],
@@ -137,7 +138,7 @@ class MonitorCheck(BaseDiagnosticCheck):
137
138
  if default_port not in available_ports:
138
139
  return DiagnosticResult(
139
140
  category="Port Availability",
140
- status=DiagnosticStatus.WARNING,
141
+ status=ValidationSeverity.WARNING,
141
142
  message=f"Default port {default_port} in use, but alternatives available",
142
143
  details={
143
144
  "available": available_ports,
@@ -148,7 +149,7 @@ class MonitorCheck(BaseDiagnosticCheck):
148
149
 
149
150
  return DiagnosticResult(
150
151
  category="Port Availability",
151
- status=DiagnosticStatus.OK,
152
+ status=OperationResult.SUCCESS,
152
153
  message=f"{len(available_ports)} monitoring port(s) available",
153
154
  details={
154
155
  "available": available_ports,
@@ -160,7 +161,7 @@ class MonitorCheck(BaseDiagnosticCheck):
160
161
  except Exception as e:
161
162
  return DiagnosticResult(
162
163
  category="Port Availability",
163
- status=DiagnosticStatus.WARNING,
164
+ status=ValidationSeverity.WARNING,
164
165
  message=f"Could not check ports: {e!s}",
165
166
  details={"error": str(e)},
166
167
  )
@@ -209,7 +210,7 @@ class MonitorCheck(BaseDiagnosticCheck):
209
210
  if not response_logging_enabled:
210
211
  return DiagnosticResult(
211
212
  category="Response Logging",
212
- status=DiagnosticStatus.OK,
213
+ status=OperationResult.SUCCESS,
213
214
  message="Response logging disabled (default)",
214
215
  details={"enabled": False},
215
216
  )
@@ -219,7 +220,7 @@ class MonitorCheck(BaseDiagnosticCheck):
219
220
  if not log_dir.exists():
220
221
  return DiagnosticResult(
221
222
  category="Response Logging",
222
- status=DiagnosticStatus.WARNING,
223
+ status=ValidationSeverity.WARNING,
223
224
  message="Response logging enabled but directory missing",
224
225
  details={"enabled": True, "path": str(log_dir), "exists": False},
225
226
  fix_command=f"mkdir -p {log_dir}",
@@ -231,7 +232,7 @@ class MonitorCheck(BaseDiagnosticCheck):
231
232
  if not os.access(log_dir, os.W_OK):
232
233
  return DiagnosticResult(
233
234
  category="Response Logging",
234
- status=DiagnosticStatus.WARNING,
235
+ status=ValidationSeverity.WARNING,
235
236
  message="Response logging directory not writable",
236
237
  details={"enabled": True, "path": str(log_dir), "writable": False},
237
238
  fix_command=f"chmod 755 {log_dir}",
@@ -240,7 +241,7 @@ class MonitorCheck(BaseDiagnosticCheck):
240
241
 
241
242
  return DiagnosticResult(
242
243
  category="Response Logging",
243
- status=DiagnosticStatus.OK,
244
+ status=OperationResult.SUCCESS,
244
245
  message="Response logging enabled and configured",
245
246
  details={
246
247
  "enabled": True,
@@ -260,7 +261,7 @@ class MonitorCheck(BaseDiagnosticCheck):
260
261
 
261
262
  return DiagnosticResult(
262
263
  category="Hook Service",
263
- status=DiagnosticStatus.OK,
264
+ status=OperationResult.SUCCESS,
264
265
  message="Hook service available",
265
266
  details={"available": True},
266
267
  )
@@ -268,14 +269,14 @@ class MonitorCheck(BaseDiagnosticCheck):
268
269
  except ImportError:
269
270
  return DiagnosticResult(
270
271
  category="Hook Service",
271
- status=DiagnosticStatus.WARNING,
272
+ status=ValidationSeverity.WARNING,
272
273
  message="Hook service not available",
273
274
  details={"available": False},
274
275
  )
275
276
  except Exception as e:
276
277
  return DiagnosticResult(
277
278
  category="Hook Service",
278
- status=DiagnosticStatus.WARNING,
279
+ status=ValidationSeverity.WARNING,
279
280
  message=f"Hook service error: {e!s}",
280
281
  details={"available": False, "error": str(e)},
281
282
  )
@@ -17,7 +17,8 @@ from datetime import datetime
17
17
  from pathlib import Path
18
18
  from typing import Any, ClassVar, Dict, Optional
19
19
 
20
- from ..models import DiagnosticResult, DiagnosticStatus
20
+ from ....core.enums import OperationResult, ValidationSeverity
21
+ from ..models import DiagnosticResult
21
22
  from .base_check import BaseDiagnosticCheck
22
23
 
23
24
 
@@ -94,7 +95,7 @@ class StartupLogCheck(BaseDiagnosticCheck):
94
95
  if not log_file:
95
96
  return DiagnosticResult(
96
97
  category=self.category,
97
- status=DiagnosticStatus.WARNING,
98
+ status=ValidationSeverity.WARNING,
98
99
  message="No startup logs found",
99
100
  details={
100
101
  "recommendation": "Startup logging will be created on next run"
@@ -135,7 +136,7 @@ class StartupLogCheck(BaseDiagnosticCheck):
135
136
  sub_results.append(
136
137
  DiagnosticResult(
137
138
  category="Error",
138
- status=DiagnosticStatus.ERROR,
139
+ status=ValidationSeverity.ERROR,
139
140
  message=error_type,
140
141
  details={"fix": fix},
141
142
  )
@@ -153,7 +154,7 @@ class StartupLogCheck(BaseDiagnosticCheck):
153
154
  except Exception as e:
154
155
  return DiagnosticResult(
155
156
  category=self.category,
156
- status=DiagnosticStatus.ERROR,
157
+ status=ValidationSeverity.ERROR,
157
158
  message=f"Startup log check failed: {e!s}",
158
159
  details={"error": str(e)},
159
160
  )
@@ -280,13 +281,13 @@ class StartupLogCheck(BaseDiagnosticCheck):
280
281
 
281
282
  analysis["recommendations"] = recommendations
282
283
 
283
- def _determine_status(self, analysis: Dict[str, Any]) -> DiagnosticStatus:
284
+ def _determine_status(self, analysis: Dict[str, Any]):
284
285
  """Determine overall status based on analysis."""
285
286
  if analysis["error_count"] > 0:
286
- return DiagnosticStatus.ERROR
287
+ return ValidationSeverity.ERROR
287
288
  if analysis["warning_count"] > 3 or analysis["warning_count"] > 0:
288
- return DiagnosticStatus.WARNING
289
- return DiagnosticStatus.OK
289
+ return ValidationSeverity.WARNING
290
+ return OperationResult.SUCCESS
290
291
 
291
292
  def _create_message(self, analysis: Dict[str, Any]) -> str:
292
293
  """Create summary message based on analysis."""
@@ -9,6 +9,7 @@ import asyncio
9
9
  from concurrent.futures import ThreadPoolExecutor, as_completed
10
10
  from typing import List, Type
11
11
 
12
+ from claude_mpm.core.enums import ValidationSeverity
12
13
  from claude_mpm.core.logging_utils import get_logger
13
14
 
14
15
  from .checks import (
@@ -25,7 +26,7 @@ from .checks import (
25
26
  MonitorCheck,
26
27
  StartupLogCheck,
27
28
  )
28
- from .models import DiagnosticResult, DiagnosticStatus, DiagnosticSummary
29
+ from .models import DiagnosticResult, DiagnosticSummary
29
30
 
30
31
  logger = get_logger(__name__)
31
32
 
@@ -92,7 +93,7 @@ class DiagnosticRunner:
92
93
  self.logger.error(f"Check {check_class.__name__} failed: {e}")
93
94
  error_result = DiagnosticResult(
94
95
  category=check_class.__name__.replace("Check", ""),
95
- status=DiagnosticStatus.ERROR,
96
+ status=ValidationSeverity.ERROR,
96
97
  message=f"Check failed: {e!s}",
97
98
  details={"error": str(e)},
98
99
  )
@@ -167,7 +168,7 @@ class DiagnosticRunner:
167
168
  results.append(
168
169
  DiagnosticResult(
169
170
  category=check_class.__name__.replace("Check", ""),
170
- status=DiagnosticStatus.ERROR,
171
+ status=ValidationSeverity.ERROR,
171
172
  message=f"Check initialization failed: {e!s}",
172
173
  details={"error": str(e)},
173
174
  )
@@ -183,7 +184,7 @@ class DiagnosticRunner:
183
184
  results.append(
184
185
  DiagnosticResult(
185
186
  category=check_name.replace("Check", ""),
186
- status=DiagnosticStatus.ERROR,
187
+ status=ValidationSeverity.ERROR,
187
188
  message=f"Check execution failed: {e!s}",
188
189
  details={"error": str(e)},
189
190
  )
@@ -238,7 +239,7 @@ class DiagnosticRunner:
238
239
  self.logger.error(f"Check {name} failed: {e}")
239
240
  error_result = DiagnosticResult(
240
241
  category=check_class.__name__.replace("Check", ""),
241
- status=DiagnosticStatus.ERROR,
242
+ status=ValidationSeverity.ERROR,
242
243
  message=f"Check failed: {e!s}",
243
244
  details={"error": str(e)},
244
245
  )
@@ -8,7 +8,9 @@ formatting for terminal display and JSON export.
8
8
  import json
9
9
  import sys
10
10
 
11
- from .models import DiagnosticResult, DiagnosticStatus, DiagnosticSummary
11
+ from claude_mpm.core.enums import OperationResult, ValidationSeverity
12
+
13
+ from .models import DiagnosticResult, DiagnosticSummary
12
14
 
13
15
 
14
16
  class DoctorReporter:
@@ -20,10 +22,10 @@ class DoctorReporter:
20
22
 
21
23
  # Status symbols and colors
22
24
  STATUS_SYMBOLS = {
23
- DiagnosticStatus.OK: "✅",
24
- DiagnosticStatus.WARNING: "⚠️ ",
25
- DiagnosticStatus.ERROR: "❌",
26
- DiagnosticStatus.SKIPPED: "⏭️ ",
25
+ OperationResult.SUCCESS: "✅",
26
+ ValidationSeverity.WARNING: "⚠️ ",
27
+ ValidationSeverity.ERROR: "❌",
28
+ OperationResult.SKIPPED: "⏭️ ",
27
29
  }
28
30
 
29
31
  # ANSI color codes
@@ -94,11 +96,11 @@ class DoctorReporter:
94
96
  # Main result line
95
97
  line = f"{indent_str}{symbol} {result.category}: "
96
98
 
97
- if result.status == DiagnosticStatus.OK:
99
+ if result.status == OperationResult.SUCCESS:
98
100
  line += self._color("OK", color)
99
- elif result.status == DiagnosticStatus.WARNING:
101
+ elif result.status == ValidationSeverity.WARNING:
100
102
  line += self._color("Warning", color)
101
- elif result.status == DiagnosticStatus.ERROR:
103
+ elif result.status == ValidationSeverity.ERROR:
102
104
  line += self._color("Error", color)
103
105
  else:
104
106
  line += self._color("Skipped", color)
@@ -163,9 +165,9 @@ class DoctorReporter:
163
165
 
164
166
  # Overall health
165
167
  overall = summary.overall_status
166
- if overall == DiagnosticStatus.OK:
168
+ if overall == OperationResult.SUCCESS:
167
169
  print(self._color("\n✅ System is healthy!", "green"))
168
- elif overall == DiagnosticStatus.WARNING:
170
+ elif overall == ValidationSeverity.WARNING:
169
171
  print(
170
172
  self._color(
171
173
  "\n⚠️ System has minor issues that should be addressed.", "yellow"
@@ -283,10 +285,10 @@ class DoctorReporter:
283
285
 
284
286
  # Overall Health Status
285
287
  overall = summary.overall_status
286
- if overall == DiagnosticStatus.OK:
288
+ if overall == OperationResult.SUCCESS:
287
289
  print("### 🎉 Overall Status: **Healthy**")
288
290
  print("Your Claude MPM installation is functioning properly.\n")
289
- elif overall == DiagnosticStatus.WARNING:
291
+ elif overall == ValidationSeverity.WARNING:
290
292
  print("### ⚠️ Overall Status: **Needs Attention**")
291
293
  print("Your installation has minor issues that should be addressed.\n")
292
294
  else:
@@ -344,13 +346,13 @@ class DoctorReporter:
344
346
  reset_code = self.COLORS["reset"]
345
347
  return f"{color_code}{text}{reset_code}"
346
348
 
347
- def _get_status_color(self, status: DiagnosticStatus) -> str:
349
+ def _get_status_color(self, status) -> str:
348
350
  """Get color for a status."""
349
351
  color_map = {
350
- DiagnosticStatus.OK: "green",
351
- DiagnosticStatus.WARNING: "yellow",
352
- DiagnosticStatus.ERROR: "red",
353
- DiagnosticStatus.SKIPPED: "gray",
352
+ OperationResult.SUCCESS: "green",
353
+ ValidationSeverity.WARNING: "yellow",
354
+ ValidationSeverity.ERROR: "red",
355
+ OperationResult.SKIPPED: "gray",
354
356
  }
355
357
  return color_map.get(status, "reset")
356
358
 
@@ -475,12 +477,13 @@ class DoctorReporter:
475
477
  print(f"### {symbol} {result.category}\n")
476
478
 
477
479
  # Status badge
478
- status_badge = {
479
- DiagnosticStatus.OK: "![OK](https://img.shields.io/badge/status-OK-green)",
480
- DiagnosticStatus.WARNING: "![Warning](https://img.shields.io/badge/status-Warning-yellow)",
481
- DiagnosticStatus.ERROR: "![Error](https://img.shields.io/badge/status-Error-red)",
482
- DiagnosticStatus.SKIPPED: "![Skipped](https://img.shields.io/badge/status-Skipped-gray)",
483
- }.get(result.status, "")
480
+ status_badge_map = {
481
+ OperationResult.SUCCESS: "![OK](https://img.shields.io/badge/status-OK-green)",
482
+ ValidationSeverity.WARNING: "![Warning](https://img.shields.io/badge/status-Warning-yellow)",
483
+ ValidationSeverity.ERROR: "![Error](https://img.shields.io/badge/status-Error-red)",
484
+ OperationResult.SKIPPED: "![Skipped](https://img.shields.io/badge/status-Skipped-gray)",
485
+ }
486
+ status_badge = status_badge_map.get(result.status, "")
484
487
 
485
488
  print(f"{status_badge}")
486
489
  print(f"\n**Message:** {result.message}\n")
@@ -513,7 +516,7 @@ class DoctorReporter:
513
516
  for result in summary.results:
514
517
  if (
515
518
  result.category == "Installation"
516
- and result.status != DiagnosticStatus.OK
519
+ and result.status != OperationResult.SUCCESS
517
520
  ):
518
521
  if "pipx" not in str(result.details.get("installation_method", "")):
519
522
  recommendations.append(
@@ -532,7 +535,7 @@ class DoctorReporter:
532
535
 
533
536
  if (
534
537
  result.category == "Claude Code"
535
- and result.status == DiagnosticStatus.WARNING
538
+ and result.status == ValidationSeverity.WARNING
536
539
  ):
537
540
  recommendations.append(
538
541
  "Update Claude Code (CLI) to the latest version for best compatibility"