claude-mpm 3.4.3__tar.gz → 3.4.6__tar.gz

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 (225) hide show
  1. {claude_mpm-3.4.3/src/claude_mpm.egg-info → claude_mpm-3.4.6}/PKG-INFO +1 -1
  2. claude_mpm-3.4.6/VERSION +1 -0
  3. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/setup.py +2 -2
  4. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/INSTRUCTIONS.md +20 -3
  5. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/backups/INSTRUCTIONS.md +119 -5
  6. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli/__init__.py +3 -1
  7. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli/commands/__init__.py +3 -1
  8. claude_mpm-3.4.6/src/claude_mpm/cli/commands/monitor.py +328 -0
  9. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli/commands/run.py +9 -17
  10. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli/parser.py +69 -1
  11. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/constants.py +9 -0
  12. claude_mpm-3.4.6/src/claude_mpm/ticket_wrapper.py +29 -0
  13. {claude_mpm-3.4.3 → claude_mpm-3.4.6/src/claude_mpm.egg-info}/PKG-INFO +1 -1
  14. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm.egg-info/SOURCES.txt +2 -11
  15. claude_mpm-3.4.3/VERSION +0 -1
  16. claude_mpm-3.4.3/src/claude_mpm/scripts/__init__.py +0 -1
  17. claude_mpm-3.4.3/src/claude_mpm/scripts/claude-mpm-socketio +0 -32
  18. claude_mpm-3.4.3/src/claude_mpm/scripts/claude_mpm_monitor.html +0 -567
  19. claude_mpm-3.4.3/src/claude_mpm/scripts/install_socketio_server.py +0 -407
  20. claude_mpm-3.4.3/src/claude_mpm/scripts/launch_monitor.py +0 -132
  21. claude_mpm-3.4.3/src/claude_mpm/scripts/launch_socketio_dashboard.py +0 -261
  22. claude_mpm-3.4.3/src/claude_mpm/scripts/manage_version.py +0 -479
  23. claude_mpm-3.4.3/src/claude_mpm/scripts/socketio_daemon.py +0 -221
  24. claude_mpm-3.4.3/src/claude_mpm/scripts/socketio_server_manager.py +0 -753
  25. claude_mpm-3.4.3/src/claude_mpm/scripts/ticket.py +0 -269
  26. claude_mpm-3.4.3/ticket +0 -25
  27. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/CLAUDE.md +0 -0
  28. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/LICENSE +0 -0
  29. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/MANIFEST.in +0 -0
  30. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/README.md +0 -0
  31. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/claude-mpm +0 -0
  32. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/pyproject.toml +0 -0
  33. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/requirements.txt +0 -0
  34. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/scripts/run_mpm.py +0 -0
  35. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/scripts/ticket +0 -0
  36. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/setup.cfg +0 -0
  37. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/__init__.py +0 -0
  38. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/__main__.py +0 -0
  39. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/BASE_AGENT_TEMPLATE.md +0 -0
  40. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/__init__.py +0 -0
  41. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/agent_loader.py +0 -0
  42. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/agent_loader_integration.py +0 -0
  43. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/agents_metadata.py +0 -0
  44. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/base_agent.json +0 -0
  45. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/base_agent_loader.py +0 -0
  46. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/schema/agent_schema.json +0 -0
  47. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/system_agent_config.py +0 -0
  48. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/.claude-mpm/memories/README.md +0 -0
  49. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/__init__.py +0 -0
  50. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/backup/data_engineer_agent_20250726_234551.json +0 -0
  51. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/backup/documentation_agent_20250726_234551.json +0 -0
  52. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/backup/engineer_agent_20250726_234551.json +0 -0
  53. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/backup/ops_agent_20250726_234551.json +0 -0
  54. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/backup/qa_agent_20250726_234551.json +0 -0
  55. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/backup/research_agent_20250726_234551.json +0 -0
  56. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/backup/security_agent_20250726_234551.json +0 -0
  57. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/backup/version_control_agent_20250726_234551.json +0 -0
  58. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/data_engineer.json +0 -0
  59. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/documentation.json +0 -0
  60. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/engineer.json +0 -0
  61. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/ops.json +0 -0
  62. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/pm.json +0 -0
  63. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/qa.json +0 -0
  64. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/research.json +0 -0
  65. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/security.json +0 -0
  66. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/test_integration.json +0 -0
  67. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/agents/templates/version_control.json +0 -0
  68. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli/commands/agents.py +0 -0
  69. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli/commands/info.py +0 -0
  70. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli/commands/memory.py +0 -0
  71. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli/commands/tickets.py +0 -0
  72. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli/commands/ui.py +0 -0
  73. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli/utils.py +0 -0
  74. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli_module/__init__.py +0 -0
  75. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli_module/args.py +0 -0
  76. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli_module/commands.py +0 -0
  77. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/cli_module/migration_example.py +0 -0
  78. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/config/__init__.py +0 -0
  79. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/config/socketio_config.py +0 -0
  80. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/__init__.py +0 -0
  81. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/agent_name_normalizer.py +0 -0
  82. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/agent_registry.py +0 -0
  83. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/agent_session_manager.py +0 -0
  84. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/base_service.py +0 -0
  85. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/claude_runner.py +0 -0
  86. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/config.py +0 -0
  87. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/config_aliases.py +0 -0
  88. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/container.py +0 -0
  89. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/factories.py +0 -0
  90. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/framework_loader.py +0 -0
  91. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/hook_manager.py +0 -0
  92. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/injectable_service.py +0 -0
  93. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/interfaces.py +0 -0
  94. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/logger.py +0 -0
  95. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/minimal_framework_loader.py +0 -0
  96. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/mixins.py +0 -0
  97. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/pm_hook_interceptor.py +0 -0
  98. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/service_registry.py +0 -0
  99. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/session_manager.py +0 -0
  100. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/simple_runner.py +0 -0
  101. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/socketio_pool.py +0 -0
  102. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/core/tool_access_control.py +0 -0
  103. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/dashboard/open_dashboard.py +0 -0
  104. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/deployment_paths.py +0 -0
  105. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/experimental/cli_enhancements.py +0 -0
  106. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/generators/__init__.py +0 -0
  107. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/generators/agent_profile_generator.py +0 -0
  108. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/__init__.py +0 -0
  109. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/base_hook.py +0 -0
  110. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/builtin/__init__.py +0 -0
  111. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/builtin/logging_hook_example.py +0 -0
  112. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/builtin/memory_hooks_example.py +0 -0
  113. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/builtin/mpm_command_hook.py +0 -0
  114. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/builtin/post_delegation_hook_example.py +0 -0
  115. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/builtin/pre_delegation_hook_example.py +0 -0
  116. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/builtin/submit_hook_example.py +0 -0
  117. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/builtin/ticket_extraction_hook_example.py +0 -0
  118. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/builtin/todo_agent_prefix_hook.py +0 -0
  119. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/builtin/workflow_start_hook.py +0 -0
  120. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/claude_hooks/__init__.py +0 -0
  121. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/claude_hooks/hook_handler.py +0 -0
  122. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/claude_hooks/hook_wrapper.sh +0 -0
  123. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/memory_integration_hook.py +0 -0
  124. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/tool_call_interceptor.py +0 -0
  125. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/hooks/validation_hooks.py +0 -0
  126. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/init.py +0 -0
  127. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/models/__init__.py +0 -0
  128. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/models/agent_definition.py +0 -0
  129. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/__init__.py +0 -0
  130. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/direct_orchestrator.py +0 -0
  131. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/factory.py +0 -0
  132. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/hook_enabled_orchestrator.py +0 -0
  133. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/hook_integration_example.py +0 -0
  134. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/interactive_subprocess_orchestrator.py +0 -0
  135. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/orchestrator.py +0 -0
  136. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/pexpect_orchestrator.py +0 -0
  137. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/pty_orchestrator.py +0 -0
  138. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/simple_orchestrator.py +0 -0
  139. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/subprocess_orchestrator.py +0 -0
  140. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/system_prompt_orchestrator.py +0 -0
  141. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/orchestration/archive/wrapper_orchestrator.py +0 -0
  142. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/schemas/workflow_validator.py +0 -0
  143. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/__init__.py +0 -0
  144. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/agent_capabilities_generator.py +0 -0
  145. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/agent_deployment.py +0 -0
  146. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/agent_lifecycle_manager.py +0 -0
  147. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/agent_management_service.py +0 -0
  148. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/agent_memory_manager.py +0 -0
  149. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/agent_modification_tracker.py +0 -0
  150. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/agent_persistence_service.py +0 -0
  151. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/agent_profile_loader.py +0 -0
  152. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/agent_registry.py +0 -0
  153. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/agent_versioning.py +0 -0
  154. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/base_agent_manager.py +0 -0
  155. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/deployed_agent_discovery.py +0 -0
  156. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/exceptions.py +0 -0
  157. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_agent_loader.py +0 -0
  158. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/__init__.py +0 -0
  159. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/content_assembler.py +0 -0
  160. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/content_validator.py +0 -0
  161. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/deployment_manager.py +0 -0
  162. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/__init__.py +0 -0
  163. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/agents.py +0 -0
  164. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/claude_pm_init.py +0 -0
  165. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/core_responsibilities.py +0 -0
  166. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/delegation_constraints.py +0 -0
  167. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/environment_config.py +0 -0
  168. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/footer.py +0 -0
  169. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/header.py +0 -0
  170. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/orchestration_principles.py +0 -0
  171. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/role_designation.py +0 -0
  172. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/subprocess_validation.py +0 -0
  173. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/todo_task_tools.py +0 -0
  174. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_generators/troubleshooting.py +0 -0
  175. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/section_manager.py +0 -0
  176. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator/version_manager.py +0 -0
  177. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/framework_claude_md_generator.py +0 -0
  178. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/health_monitor.py +0 -0
  179. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/hook_service.py +0 -0
  180. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/memory_builder.py +0 -0
  181. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/memory_optimizer.py +0 -0
  182. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/memory_router.py +0 -0
  183. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/parent_directory_manager/__init__.py +0 -0
  184. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/parent_directory_manager/backup_manager.py +0 -0
  185. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/parent_directory_manager/config_manager.py +0 -0
  186. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/parent_directory_manager/deduplication_manager.py +0 -0
  187. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/parent_directory_manager/framework_protector.py +0 -0
  188. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/parent_directory_manager/operations.py +0 -0
  189. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/parent_directory_manager/state_manager.py +0 -0
  190. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/parent_directory_manager/template_deployer.py +0 -0
  191. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/parent_directory_manager/validation_manager.py +0 -0
  192. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/parent_directory_manager/version_control_helper.py +0 -0
  193. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/parent_directory_manager/version_manager.py +0 -0
  194. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/project_analyzer.py +0 -0
  195. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/recovery_manager.py +0 -0
  196. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/shared_prompt_cache.py +0 -0
  197. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/socketio_client_manager.py +0 -0
  198. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/socketio_server.py +0 -0
  199. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/standalone_socketio_server.py +0 -0
  200. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/ticket_manager.py +0 -0
  201. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/ticket_manager_di.py +0 -0
  202. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/ticketing_service_original.py +0 -0
  203. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/version_control/__init__.py +0 -0
  204. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/version_control/branch_strategy.py +0 -0
  205. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/version_control/conflict_resolution.py +0 -0
  206. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/version_control/git_operations.py +0 -0
  207. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/services/version_control/semantic_versioning.py +0 -0
  208. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/ui/__init__.py +0 -0
  209. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/ui/rich_terminal_ui.py +0 -0
  210. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/ui/terminal_ui.py +0 -0
  211. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/utils/__init__.py +0 -0
  212. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/utils/config_manager.py +0 -0
  213. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/utils/dependency_manager.py +0 -0
  214. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/utils/error_handler.py +0 -0
  215. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/utils/framework_detection.py +0 -0
  216. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/utils/import_migration_example.py +0 -0
  217. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/utils/imports.py +0 -0
  218. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/utils/path_operations.py +0 -0
  219. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/utils/paths.py +0 -0
  220. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/validation/__init__.py +0 -0
  221. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm/validation/agent_validator.py +0 -0
  222. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm.egg-info/dependency_links.txt +0 -0
  223. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm.egg-info/entry_points.txt +0 -0
  224. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm.egg-info/requires.txt +0 -0
  225. {claude_mpm-3.4.3 → claude_mpm-3.4.6}/src/claude_mpm.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: claude-mpm
3
- Version: 3.4.3
3
+ Version: 3.4.6
4
4
  Summary: Claude Multi-agent Project Manager - Clean orchestration with ticket management
5
5
  Home-page: https://github.com/bobmatnyc/claude-mpm
6
6
  Author: Claude MPM Team
@@ -0,0 +1 @@
1
+ 3.4.6
@@ -56,7 +56,7 @@ class PostInstallCommand(install):
56
56
  ticket_content = '''#!/usr/bin/env python3
57
57
  """Ticket command wrapper for claude-mpm."""
58
58
  import sys
59
- from claude_mpm.scripts.ticket import main
59
+ from claude_mpm.ticket_wrapper import main
60
60
 
61
61
  if __name__ == "__main__":
62
62
  sys.exit(main())
@@ -130,7 +130,7 @@ setup(
130
130
  entry_points={
131
131
  "console_scripts": [
132
132
  "claude-mpm=claude_mpm.cli:main",
133
- "ticket=claude_mpm.scripts.ticket:main",
133
+ "ticket=claude_mpm.ticket_wrapper:main",
134
134
  ],
135
135
  },
136
136
  cmdclass={
@@ -6,13 +6,20 @@
6
6
  ## Core Identity & Authority
7
7
  You are **Claude Multi-Agent Project Manager (claude-mpm)** - your **SOLE function** is **orchestration and delegation**. You are **FORBIDDEN** from direct work except:
8
8
  - **Task Tool** for delegation (primary function)
9
- - **TodoWrite** for tracking (with [Agent] prefixes)
9
+ - **TodoWrite** for tracking (with [Agent] prefixes, NEVER [PM] for implementation)
10
10
  - **WebSearch/WebFetch** only for delegation requirements
11
11
  - **Direct answers** for PM role/capability questions only
12
12
  - **Direct work** only when explicitly authorized: "do this yourself", "don't delegate", "implement directly"
13
13
 
14
14
  **ABSOLUTE RULE**: ALL other work must be delegated to specialized agents via Task Tool.
15
15
 
16
+ **CRITICAL**: You must NEVER create todos with [PM] prefix for implementation work such as:
17
+ - Updating files (delegate to appropriate agent)
18
+ - Creating documentation (delegate to Documentation Agent)
19
+ - Writing code (delegate to Engineer Agent)
20
+ - Configuring systems (delegate to Ops Agent)
21
+ - Creating roadmaps (delegate to Research Agent)
22
+
16
23
  ## BEHAVIOR RULES
17
24
 
18
25
  ### Professional Communication Standards
@@ -209,19 +216,29 @@ Context:
209
216
  {{capabilities-list}}
210
217
 
211
218
  ## TodoWrite Requirements
212
- **MANDATORY**: Always prefix tasks with [Agent]:
219
+ **MANDATORY**: Always prefix tasks with [Agent] - NEVER use [PM] prefix for implementation work:
213
220
  - `[Research] Analyze authentication patterns`
214
221
  - `[Engineer] Implement user registration`
215
222
  - `[QA] Test payment flow (BLOCKED - waiting for fix)`
216
223
  - `[Documentation] Update API docs after QA sign-off`
217
224
 
225
+ **FORBIDDEN [PM] todo examples** (these violate PM role):
226
+ - ❌ `[PM] Update CLAUDE.md with project requirements` - Should delegate to Documentation Agent
227
+ - ❌ `[PM] Create implementation roadmap` - Should delegate to Research Agent
228
+ - ❌ `[PM] Configure PM2 for local server` - Should delegate to Ops Agent
229
+ - ❌ `[PM] Update docs/OPS.md` - Should delegate to Documentation Agent
230
+
231
+ **ONLY acceptable PM todos** (orchestration/delegation only):
232
+ - ✅ `Building delegation context for [task]` (no prefix needed - internal PM work)
233
+ - ✅ `Aggregating results from agents` (no prefix needed - internal PM work)
234
+
218
235
  ## Error Handling Protocol
219
236
  **3-Attempt Process**:
220
237
  1. **First Failure**: Re-delegate with enhanced context
221
238
  2. **Second Failure**: Mark "ERROR - Attempt 2/3", escalate to Research if needed
222
239
  3. **Third Failure**: TodoWrite escalation:
223
240
  ```
224
- [PM] ERROR ESCALATION: [Task] - Blocked after 3 attempts
241
+ ERROR ESCALATION: [Task] - Blocked after 3 attempts
225
242
  Error Type: [Blocking/Non-blocking]
226
243
  User Decision Required: [Specific question]
227
244
  ```
@@ -6,15 +6,91 @@
6
6
  ## Core Identity & Authority
7
7
  You are **Claude Multi-Agent Project Manager (claude-mpm)** - your **SOLE function** is **orchestration and delegation**. You are **FORBIDDEN** from direct work except:
8
8
  - **Task Tool** for delegation (primary function)
9
- - **TodoWrite** for tracking (with [Agent] prefixes)
9
+ - **TodoWrite** for tracking (with [Agent] prefixes, NEVER [PM] for implementation)
10
10
  - **WebSearch/WebFetch** only for delegation requirements
11
11
  - **Direct answers** for PM role/capability questions only
12
12
  - **Direct work** only when explicitly authorized: "do this yourself", "don't delegate", "implement directly"
13
13
 
14
14
  **ABSOLUTE RULE**: ALL other work must be delegated to specialized agents via Task Tool.
15
15
 
16
- **BEHAVIOR RULES**:
17
- - **Response** always respond in a balanced fashion, avoid sycophancy. Never use "You're absolutely right" or overly solicitous phrases. Simple acknowledgement or agreement is sufficient
16
+ **CRITICAL**: You must NEVER create todos with [PM] prefix for implementation work such as:
17
+ - Updating files (delegate to appropriate agent)
18
+ - Creating documentation (delegate to Documentation Agent)
19
+ - Writing code (delegate to Engineer Agent)
20
+ - Configuring systems (delegate to Ops Agent)
21
+ - Creating roadmaps (delegate to Research Agent)
22
+
23
+ ## BEHAVIOR RULES
24
+
25
+ ### Professional Communication Standards
26
+ **Maintain neutral, professional tone as default** - avoid overeager enthusiasm that undermines credibility.
27
+
28
+ ### Prohibited Overeager Phrases
29
+ **NEVER use these excessive responses**:
30
+ - "You're absolutely right!" / "Absolutely!"
31
+ - "Excellent!" / "Perfect!" / "Brilliant!" / "Amazing!" / "Fantastic!"
32
+ - "Great idea!" / "Wonderful suggestion!" / "Outstanding!"
33
+ - "That's incredible!" / "Genius!" / "Superb!"
34
+ - Other overly enthusiastic or sycophantic responses
35
+
36
+ ### Appropriate Acknowledgments
37
+ **Use neutral, professional acknowledgments**:
38
+ - "Understood" / "I see" / "Acknowledged" / "Noted"
39
+ - "Yes" / "Correct" / "That's accurate" / "Confirmed"
40
+ - "I'll proceed with that approach" / "That makes sense"
41
+
42
+ ### Context-Sensitive Tone Guidelines
43
+ - **Default**: Professional neutrality for all interactions
44
+ - **Match urgency**: Respond appropriately to critical/time-sensitive requests
45
+ - **Reserve enthusiasm**: Only for genuinely exceptional achievements or milestones
46
+ - **Technical discussions**: Focus on accuracy and precision over emotional responses
47
+
48
+ ### Response Examples
49
+
50
+ **Bad Examples**:
51
+ ```
52
+ ❌ "You're absolutely right! That's a brilliant approach!"
53
+ ❌ "Excellent suggestion! This is going to be amazing!"
54
+ ❌ "Perfect! I love this idea - it's fantastic!"
55
+ ```
56
+
57
+ **Good Examples**:
58
+ ```
59
+ ✅ "Understood. I'll implement that approach."
60
+ ✅ "That's accurate. Proceeding with the research phase."
61
+ ✅ "Confirmed. This aligns with the project requirements."
62
+ ```
63
+
64
+ ### Production-Ready Implementation Standards
65
+ **PROHIBITED without explicit user instruction**:
66
+ - **Fallback to simpler solutions**: Never downgrade requirements or reduce scope
67
+ - **Mock implementations**: Never use mocks, stubs, or placeholder implementations outside test environments
68
+
69
+ **Why this matters**:
70
+ - Production systems require complete, robust implementations
71
+ - Simplified solutions create technical debt and security vulnerabilities
72
+ - Mock implementations mask integration issues and business logic gaps
73
+
74
+ **What NOT to do**:
75
+ ```
76
+ ❌ "I'll create a simple version first and we can enhance it later"
77
+ ❌ "Let me mock the database connection for now"
78
+ ❌ "I'll use a placeholder API call instead of the real implementation"
79
+ ❌ "This simplified approach should work for most cases"
80
+ ```
81
+
82
+ **What TO do instead**:
83
+ ```
84
+ ✅ "I need to research the full requirements before implementing"
85
+ ✅ "Let me analyze the production constraints and dependencies"
86
+ ✅ "I'll implement the complete solution including error handling"
87
+ ✅ "This requires integration with the actual database/API"
88
+ ```
89
+
90
+ **When simplification IS appropriate**:
91
+ - User explicitly requests: "make this simpler", "create a basic version", "prototype this"
92
+ - User explicitly authorizes: "use mocks for now", "skip error handling for this demo"
93
+ - Test environments: Unit tests, integration tests, development fixtures
18
94
 
19
95
 
20
96
  ## Memory Management
@@ -30,6 +106,33 @@ When users request to remember information ("remember that...", "make a note tha
30
106
  - **Delegate Storage**: Send memory task to appropriate agent with proper format
31
107
  - **Confirm Storage**: Verify memory was successfully added
32
108
 
109
+ ## Memory Evaluation Protocol
110
+ **MANDATORY for ALL user prompts** - Evaluate every user request for memory indicators:
111
+
112
+ **Memory Trigger Words/Phrases**:
113
+ - "remember", "don't forget", "keep in mind", "note that"
114
+ - "make sure to", "always", "never", "important"
115
+ - "going forward", "in the future", "from now on"
116
+ - "this pattern", "this approach", "this way"
117
+
118
+ **When Memory Indicators Detected**:
119
+ 1. **Extract Key Information**: Identify facts, patterns, or guidelines to preserve
120
+ 2. **Determine Agent & Type**:
121
+ - Code patterns/standards → Engineer Agent (type: pattern)
122
+ - Architecture decisions → Research Agent (type: architecture)
123
+ - Testing requirements → QA Agent (type: guideline)
124
+ - Security policies → Security Agent (type: guideline)
125
+ - Documentation standards → Documentation Agent (type: guideline)
126
+ 3. **Delegate Storage**: Use memory task format with appropriate agent
127
+ 4. **Confirm to User**: "I'm storing this information: [brief summary] for [agent]"
128
+
129
+ **Examples of Memory-Worthy Content**:
130
+ - "Always use async/await for database operations"
131
+ - "Remember our API uses JWT with 24-hour expiration"
132
+ - "Don't forget we're targeting Node.js 18+"
133
+ - "Keep in mind the client prefers TypeScript strict mode"
134
+ - "Note that all endpoints must validate input"
135
+
33
136
  ## Context-Aware Agent Selection
34
137
  - **PM role/capabilities questions**: Answer directly (only exception)
35
138
  - **Explanations/How-to questions**: Delegate to Documentation Agent
@@ -113,19 +216,29 @@ Context:
113
216
  {{capabilities-list}}
114
217
 
115
218
  ## TodoWrite Requirements
116
- **MANDATORY**: Always prefix tasks with [Agent]:
219
+ **MANDATORY**: Always prefix tasks with [Agent] - NEVER use [PM] prefix for implementation work:
117
220
  - `[Research] Analyze authentication patterns`
118
221
  - `[Engineer] Implement user registration`
119
222
  - `[QA] Test payment flow (BLOCKED - waiting for fix)`
120
223
  - `[Documentation] Update API docs after QA sign-off`
121
224
 
225
+ **FORBIDDEN [PM] todo examples** (these violate PM role):
226
+ - ❌ `[PM] Update CLAUDE.md with project requirements` - Should delegate to Documentation Agent
227
+ - ❌ `[PM] Create implementation roadmap` - Should delegate to Research Agent
228
+ - ❌ `[PM] Configure PM2 for local server` - Should delegate to Ops Agent
229
+ - ❌ `[PM] Update docs/OPS.md` - Should delegate to Documentation Agent
230
+
231
+ **ONLY acceptable PM todos** (orchestration/delegation only):
232
+ - ✅ `Building delegation context for [task]` (no prefix needed - internal PM work)
233
+ - ✅ `Aggregating results from agents` (no prefix needed - internal PM work)
234
+
122
235
  ## Error Handling Protocol
123
236
  **3-Attempt Process**:
124
237
  1. **First Failure**: Re-delegate with enhanced context
125
238
  2. **Second Failure**: Mark "ERROR - Attempt 2/3", escalate to Research if needed
126
239
  3. **Third Failure**: TodoWrite escalation:
127
240
  ```
128
- [PM] ERROR ESCALATION: [Task] - Blocked after 3 attempts
241
+ ERROR ESCALATION: [Task] - Blocked after 3 attempts
129
242
  Error Type: [Blocking/Non-blocking]
130
243
  User Decision Required: [Specific question]
131
244
  ```
@@ -141,6 +254,7 @@ Context:
141
254
 
142
255
  ## Standard Operating Procedure
143
256
  1. **Analysis**: Parse request, assess context completeness (NO TOOLS)
257
+ 1.5. **Memory Evaluation**: Check for memory indicators, extract key information, delegate storage if detected
144
258
  2. **Planning**: Agent selection, task breakdown, priority assignment, dependency mapping
145
259
  3. **Delegation**: Task Tool with enhanced format, context enrichment
146
260
  4. **Monitoring**: Track progress, handle errors, dynamic adjustment
@@ -23,7 +23,8 @@ from .commands import (
23
23
  show_info,
24
24
  manage_agents,
25
25
  run_terminal_ui,
26
- manage_memory
26
+ manage_memory,
27
+ manage_monitor
27
28
  )
28
29
 
29
30
  # Get version from VERSION file - single source of truth
@@ -149,6 +150,7 @@ def _execute_command(command: str, args) -> int:
149
150
  CLICommands.AGENTS.value: manage_agents,
150
151
  CLICommands.UI.value: run_terminal_ui,
151
152
  CLICommands.MEMORY.value: manage_memory,
153
+ CLICommands.MONITOR.value: manage_monitor,
152
154
  }
153
155
 
154
156
  # Execute command if found
@@ -11,6 +11,7 @@ from .info import show_info
11
11
  from .agents import manage_agents
12
12
  from .ui import run_terminal_ui
13
13
  from .memory import manage_memory
14
+ from .monitor import manage_monitor
14
15
 
15
16
  __all__ = [
16
17
  'run_session',
@@ -18,5 +19,6 @@ __all__ = [
18
19
  'show_info',
19
20
  'manage_agents',
20
21
  'run_terminal_ui',
21
- 'manage_memory'
22
+ 'manage_memory',
23
+ 'manage_monitor'
22
24
  ]
@@ -0,0 +1,328 @@
1
+ """
2
+ Monitor command implementation for claude-mpm.
3
+
4
+ WHY: This module provides CLI commands for managing the Socket.IO monitoring server,
5
+ allowing users to start, stop, restart, and check status of the monitoring infrastructure.
6
+
7
+ DESIGN DECISION: We follow the existing CLI pattern using a main function
8
+ that dispatches to specific subcommand handlers, maintaining consistency
9
+ with other command modules like agents.py and memory.py.
10
+ """
11
+
12
+ import sys
13
+ from pathlib import Path
14
+
15
+ from ...core.logger import get_logger
16
+ from ...constants import MonitorCommands
17
+
18
+
19
+ def manage_monitor(args):
20
+ """
21
+ Manage Socket.IO monitoring server.
22
+
23
+ WHY: The monitoring server provides real-time insights into Claude MPM sessions,
24
+ websocket connections, and system performance. This command provides a unified
25
+ interface for all monitor-related operations.
26
+
27
+ DESIGN DECISION: When no subcommand is provided, we show the server status
28
+ as the default action, giving users a quick overview of the monitoring system.
29
+
30
+ Args:
31
+ args: Parsed command line arguments with monitor_command attribute
32
+ """
33
+ logger = get_logger("cli")
34
+
35
+ try:
36
+ # Import ServerManager from socketio_server_manager.py
37
+ from ...scripts.socketio_server_manager import ServerManager
38
+ server_manager = ServerManager()
39
+
40
+ if not args.monitor_command:
41
+ # No subcommand - show help
42
+ # WHY: Since we removed status, show help instead when no subcommand is provided
43
+ print("Available monitor commands:")
44
+ print(" start - Start the Socket.IO monitoring server")
45
+ print(" stop - Stop the Socket.IO monitoring server")
46
+ print(" restart - Restart the Socket.IO monitoring server")
47
+ print(" port <N> - Start/restart on specific port")
48
+ print()
49
+ print("Use 'claude-mpm monitor <command> --help' for more information")
50
+ return 0
51
+
52
+ if args.monitor_command == MonitorCommands.START.value:
53
+ success = _start_server(args, server_manager)
54
+ return 0 if success else 1
55
+
56
+ elif args.monitor_command == MonitorCommands.STOP.value:
57
+ success = _stop_server(args, server_manager)
58
+ return 0 if success else 1
59
+
60
+ elif args.monitor_command == MonitorCommands.RESTART.value:
61
+ success = _restart_server(args, server_manager)
62
+ return 0 if success else 1
63
+
64
+ elif args.monitor_command == MonitorCommands.PORT.value:
65
+ success = _port_server(args, server_manager)
66
+ return 0 if success else 1
67
+
68
+ else:
69
+ logger.error(f"Unknown monitor command: {args.monitor_command}")
70
+ print(f"Unknown monitor command: {args.monitor_command}")
71
+ print("Available commands: start, stop, restart, port")
72
+ return 1
73
+
74
+ except ImportError as e:
75
+ logger.error(f"Server manager not available: {e}")
76
+ print("Error: Socket.IO server manager not available")
77
+ print("This may indicate a missing dependency or installation issue.")
78
+ return 1
79
+ except Exception as e:
80
+ logger.error(f"Error managing monitor: {e}")
81
+ print(f"Error: {e}")
82
+ return 1
83
+
84
+ return 0
85
+
86
+
87
+ def _port_server(args, server_manager):
88
+ """
89
+ Start or restart the Socket.IO monitoring server on a specific port.
90
+
91
+ WHY: Users need to be able to start/restart the monitoring server on a specific
92
+ port, either if no server is running (start) or if a server is already running
93
+ on a different port (restart).
94
+
95
+ Args:
96
+ args: Command arguments with required port and optional host
97
+ server_manager: ServerManager instance
98
+
99
+ Returns:
100
+ bool: True if server started/restarted successfully, False otherwise
101
+ """
102
+ port = args.port
103
+ host = getattr(args, 'host', 'localhost')
104
+
105
+ print(f"Managing Socket.IO monitoring server on port {port}...")
106
+ print(f"Target: {host}:{port}")
107
+ print()
108
+
109
+ try:
110
+ # Check if there are any running servers
111
+ running_servers = server_manager.list_running_servers()
112
+
113
+ # Check if server is already running on this port
114
+ server_on_port = any(server.get('port') == port for server in running_servers)
115
+
116
+ if server_on_port:
117
+ print(f"Server already running on port {port}. Restarting...")
118
+ success = server_manager.restart_server(port=port)
119
+ action = "restarted"
120
+ else:
121
+ # Check if servers are running on other ports
122
+ if running_servers:
123
+ print("Servers running on other ports:")
124
+ for server in running_servers:
125
+ server_port = server.get('port')
126
+ server_id = server.get('server_id', 'unknown')
127
+ print(f" • Server '{server_id}' on port {server_port}")
128
+ print()
129
+ print(f"Starting new server on port {port}...")
130
+ else:
131
+ print("No servers currently running. Starting new server...")
132
+
133
+ success = server_manager.start_server(port=port, host=host, server_id="monitor-server")
134
+ action = "started"
135
+
136
+ if success:
137
+ print()
138
+ print(f"Monitor server {action} successfully on port {port}")
139
+ print()
140
+ print("Server management commands:")
141
+ print(f" Status: ps aux | grep socketio")
142
+ print(f" Stop: claude-mpm monitor stop --port {port}")
143
+ print(f" Restart: claude-mpm monitor restart --port {port}")
144
+ print()
145
+ print(f"WebSocket URL: ws://{host}:{port}")
146
+ else:
147
+ print(f"Failed to {action.replace('ed', '')} server on port {port}")
148
+ print()
149
+ print("Troubleshooting:")
150
+ print(f" • Check if port {port} is available: lsof -i :{port}")
151
+ print(f" • Try a different port: claude-mpm monitor port {port + 1}")
152
+ print(" • Check system resources: free -h && df -h")
153
+
154
+ return success
155
+
156
+ except Exception as e:
157
+ print(f"Error managing server on port {port}: {e}")
158
+ print()
159
+ print("Troubleshooting:")
160
+ print(f" • Verify port {port} is valid and available")
161
+ print(" • Check system resources and permissions")
162
+ print(" • Try manual start/stop operations")
163
+ return False
164
+
165
+
166
+ def _start_server(args, server_manager):
167
+ """
168
+ Start the Socket.IO monitoring server.
169
+
170
+ WHY: Users need to start the monitoring server to enable real-time monitoring
171
+ of Claude MPM sessions and websocket connections.
172
+
173
+ Args:
174
+ args: Command arguments with optional port and host
175
+ server_manager: ServerManager instance
176
+
177
+ Returns:
178
+ bool: True if server started successfully, False otherwise
179
+ """
180
+ port = getattr(args, 'port', 8765)
181
+ host = getattr(args, 'host', 'localhost')
182
+
183
+ print(f"Starting Socket.IO monitoring server...")
184
+ print(f"Target: {host}:{port}")
185
+ print()
186
+
187
+ try:
188
+ success = server_manager.start_server(port=port, host=host, server_id="monitor-server")
189
+
190
+ if success:
191
+ print()
192
+ print("Monitor server management commands:")
193
+ print(f" Status: claude-mpm monitor status")
194
+ print(f" Stop: claude-mpm monitor stop")
195
+ print(f" Restart: claude-mpm monitor restart")
196
+ print()
197
+ print(f"WebSocket URL: ws://{host}:{port}")
198
+
199
+ return success
200
+
201
+ except Exception as e:
202
+ print(f"Failed to start monitoring server: {e}")
203
+ print()
204
+ print("Troubleshooting:")
205
+ print(f" • Check if port {port} is available: lsof -i :{port}")
206
+ print(f" • Try a different port: claude-mpm monitor start --port {port + 1}")
207
+ print(" • Check system resources: free -h && df -h")
208
+ return False
209
+
210
+
211
+ def _stop_server(args, server_manager):
212
+ """
213
+ Stop the Socket.IO monitoring server.
214
+
215
+ WHY: Users need to stop the monitoring server when it's no longer needed
216
+ or when troubleshooting connection issues.
217
+
218
+ Args:
219
+ args: Command arguments with optional port
220
+ server_manager: ServerManager instance
221
+
222
+ Returns:
223
+ bool: True if server stopped successfully, False otherwise
224
+ """
225
+ port = getattr(args, 'port', None)
226
+
227
+ print("Stopping Socket.IO monitoring server...")
228
+
229
+ try:
230
+ # If no port specified, try to find running servers and stop them
231
+ if port is None:
232
+ running_servers = server_manager.list_running_servers()
233
+ if not running_servers:
234
+ print("No running servers found to stop")
235
+ return True
236
+
237
+ # Stop the first server (or all if multiple)
238
+ success = True
239
+ for server in running_servers:
240
+ server_port = server.get('port')
241
+ server_id = server.get('server_id', 'unknown')
242
+ print(f"Stopping server '{server_id}' on port {server_port}...")
243
+
244
+ if not server_manager.stop_server(port=server_port):
245
+ print(f"Failed to stop server on port {server_port}")
246
+ success = False
247
+
248
+ return success
249
+ else:
250
+ # Stop specific server on given port
251
+ success = server_manager.stop_server(port=port)
252
+
253
+ if success:
254
+ print(f"Monitor server stopped on port {port}")
255
+ else:
256
+ print(f"Failed to stop server on port {port}")
257
+ print()
258
+ print("Troubleshooting:")
259
+ print(f" • Check if server is running: claude-mpm monitor status")
260
+ print(f" • Try force kill: kill $(lsof -ti :{port})")
261
+
262
+ return success
263
+
264
+ except Exception as e:
265
+ print(f"Error stopping server: {e}")
266
+ return False
267
+
268
+
269
+ def _restart_server(args, server_manager):
270
+ """
271
+ Restart the Socket.IO monitoring server.
272
+
273
+ WHY: Users need to restart the monitoring server to apply configuration
274
+ changes or recover from error states.
275
+
276
+ Args:
277
+ args: Command arguments with optional port
278
+ server_manager: ServerManager instance
279
+
280
+ Returns:
281
+ bool: True if server restarted successfully, False otherwise
282
+ """
283
+ port = getattr(args, 'port', None)
284
+
285
+ print("Restarting Socket.IO monitoring server...")
286
+
287
+ try:
288
+ # If no port specified, find running servers to restart
289
+ if port is None:
290
+ running_servers = server_manager.list_running_servers()
291
+ if not running_servers:
292
+ print("No running servers found. Starting new server on default port...")
293
+ return _start_server(args, server_manager)
294
+
295
+ # Restart the first server found
296
+ server = running_servers[0]
297
+ port = server.get('port', 8765)
298
+
299
+ print(f"Using port {port} for restart...")
300
+
301
+ # Use ServerManager's restart method
302
+ success = server_manager.restart_server(port=port)
303
+
304
+ if success:
305
+ print(f"Monitor server restarted successfully on port {port}")
306
+ print()
307
+ print("Server management commands:")
308
+ print(f" Status: claude-mpm monitor status")
309
+ print(f" Stop: claude-mpm monitor stop --port {port}")
310
+ print(f" Start: claude-mpm monitor start --port {port}")
311
+ else:
312
+ print(f"Failed to restart server on port {port}")
313
+ print()
314
+ print("Troubleshooting:")
315
+ print(" • Try stopping and starting manually:")
316
+ print(f" claude-mpm monitor stop --port {port}")
317
+ print(f" claude-mpm monitor start --port {port}")
318
+ print(" • Check server logs for errors")
319
+
320
+ return success
321
+
322
+ except Exception as e:
323
+ print(f"Error restarting server: {e}")
324
+ print()
325
+ print("Fallback options:")
326
+ print(" • Manual restart: stop then start")
327
+ print(" • Check system resources and try again")
328
+ return False
@@ -585,24 +585,16 @@ def _start_standalone_socketio_server(port, logger):
585
585
 
586
586
  logger.debug(f"Checking server readiness (attempt {attempt + 1}/{max_attempts}, waiting {delay}s)")
587
587
 
588
- # Check if thread is alive first
589
- if hasattr(server, 'thread') and server.thread and server.thread.is_alive():
590
- logger.debug("Server thread is alive, checking connectivity...")
591
-
592
- # Give it time for socket binding (progressive delay)
593
- time.sleep(delay)
594
-
595
- # Verify it's actually accepting connections
596
- if _check_socketio_server_running(port, logger):
597
- logger.info(f"✅ Standalone Socket.IO server started successfully on port {port}")
598
- logger.info(f"🕐 Server ready after {attempt + 1} attempts ({(attempt + 1) * delay:.1f}s)")
599
- return True
600
- else:
601
- logger.debug(f"Server not yet accepting connections on attempt {attempt + 1}")
588
+ # Give the daemon process time to initialize and bind to the socket
589
+ time.sleep(delay)
590
+
591
+ # Check if the daemon server is accepting connections
592
+ if _check_socketio_server_running(port, logger):
593
+ logger.info(f"✅ Standalone Socket.IO server started successfully on port {port}")
594
+ logger.info(f"🕐 Server ready after {attempt + 1} attempts ({(attempt + 1) * delay:.1f}s)")
595
+ return True
602
596
  else:
603
- logger.warning(f"Server thread not alive or not created on attempt {attempt + 1}")
604
- # Give thread more time to start
605
- time.sleep(delay)
597
+ logger.debug(f"Server not yet accepting connections on attempt {attempt + 1}")
606
598
 
607
599
  logger.error(f"❌ Socket.IO server failed to start properly on port {port} after {max_attempts} attempts")
608
600
  logger.error(f"💡 This may indicate a port conflict or dependency issue")