claude-mpm 5.1.9__py3-none-any.whl → 5.4.22__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.

Files changed (176) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/__init__.py +4 -0
  3. claude_mpm/agents/CLAUDE_MPM_TEACHER_OUTPUT_STYLE.md +1 -1
  4. claude_mpm/agents/PM_INSTRUCTIONS.md +290 -34
  5. claude_mpm/agents/agent_loader.py +13 -44
  6. claude_mpm/agents/templates/circuit-breakers.md +138 -1
  7. claude_mpm/cli/__main__.py +4 -0
  8. claude_mpm/cli/chrome_devtools_installer.py +175 -0
  9. claude_mpm/cli/commands/agent_state_manager.py +8 -17
  10. claude_mpm/cli/commands/agents.py +0 -31
  11. claude_mpm/cli/commands/auto_configure.py +210 -25
  12. claude_mpm/cli/commands/config.py +88 -2
  13. claude_mpm/cli/commands/configure.py +1097 -158
  14. claude_mpm/cli/commands/configure_agent_display.py +15 -6
  15. claude_mpm/cli/commands/mpm_init/core.py +160 -46
  16. claude_mpm/cli/commands/mpm_init/knowledge_extractor.py +481 -0
  17. claude_mpm/cli/commands/mpm_init/prompts.py +280 -0
  18. claude_mpm/cli/commands/skills.py +214 -189
  19. claude_mpm/cli/commands/summarize.py +413 -0
  20. claude_mpm/cli/executor.py +11 -3
  21. claude_mpm/cli/parsers/agents_parser.py +0 -9
  22. claude_mpm/cli/parsers/auto_configure_parser.py +0 -138
  23. claude_mpm/cli/parsers/base_parser.py +5 -0
  24. claude_mpm/cli/parsers/config_parser.py +153 -83
  25. claude_mpm/cli/parsers/skills_parser.py +3 -2
  26. claude_mpm/cli/startup.py +550 -94
  27. claude_mpm/commands/mpm-config.md +265 -0
  28. claude_mpm/commands/mpm-help.md +14 -95
  29. claude_mpm/commands/mpm-organize.md +500 -0
  30. claude_mpm/config/agent_sources.py +27 -0
  31. claude_mpm/core/framework/formatters/content_formatter.py +3 -13
  32. claude_mpm/core/framework/loaders/agent_loader.py +8 -5
  33. claude_mpm/core/framework_loader.py +4 -2
  34. claude_mpm/core/logger.py +13 -0
  35. claude_mpm/core/socketio_pool.py +3 -3
  36. claude_mpm/core/unified_agent_registry.py +5 -15
  37. claude_mpm/hooks/claude_hooks/correlation_manager.py +60 -0
  38. claude_mpm/hooks/claude_hooks/event_handlers.py +211 -78
  39. claude_mpm/hooks/claude_hooks/hook_handler.py +6 -0
  40. claude_mpm/hooks/claude_hooks/installer.py +33 -10
  41. claude_mpm/hooks/claude_hooks/memory_integration.py +26 -9
  42. claude_mpm/hooks/claude_hooks/response_tracking.py +2 -3
  43. claude_mpm/hooks/claude_hooks/services/connection_manager.py +4 -0
  44. claude_mpm/hooks/memory_integration_hook.py +46 -1
  45. claude_mpm/init.py +0 -19
  46. claude_mpm/scripts/claude-hook-handler.sh +58 -18
  47. claude_mpm/scripts/launch_monitor.py +93 -13
  48. claude_mpm/scripts/start_activity_logging.py +0 -0
  49. claude_mpm/services/agents/agent_recommendation_service.py +278 -0
  50. claude_mpm/services/agents/agent_review_service.py +280 -0
  51. claude_mpm/services/agents/deployment/agent_discovery_service.py +2 -3
  52. claude_mpm/services/agents/deployment/agent_template_builder.py +4 -2
  53. claude_mpm/services/agents/deployment/multi_source_deployment_service.py +78 -9
  54. claude_mpm/services/agents/deployment/remote_agent_discovery_service.py +335 -53
  55. claude_mpm/services/agents/git_source_manager.py +34 -0
  56. claude_mpm/services/agents/loading/base_agent_manager.py +1 -13
  57. claude_mpm/services/agents/sources/git_source_sync_service.py +8 -1
  58. claude_mpm/services/agents/toolchain_detector.py +10 -6
  59. claude_mpm/services/analysis/__init__.py +11 -1
  60. claude_mpm/services/analysis/clone_detector.py +1030 -0
  61. claude_mpm/services/command_deployment_service.py +81 -10
  62. claude_mpm/services/event_bus/config.py +3 -1
  63. claude_mpm/services/git/git_operations_service.py +93 -8
  64. claude_mpm/services/monitor/daemon.py +9 -2
  65. claude_mpm/services/monitor/daemon_manager.py +39 -3
  66. claude_mpm/services/monitor/server.py +225 -19
  67. claude_mpm/services/self_upgrade_service.py +120 -12
  68. claude_mpm/services/skills/__init__.py +3 -0
  69. claude_mpm/services/skills/git_skill_source_manager.py +32 -2
  70. claude_mpm/services/skills/selective_skill_deployer.py +704 -0
  71. claude_mpm/services/skills/skill_to_agent_mapper.py +406 -0
  72. claude_mpm/services/skills_deployer.py +126 -9
  73. claude_mpm/services/socketio/event_normalizer.py +15 -1
  74. claude_mpm/services/socketio/server/core.py +160 -21
  75. claude_mpm/services/version_control/git_operations.py +103 -0
  76. claude_mpm/utils/agent_filters.py +17 -44
  77. {claude_mpm-5.1.9.dist-info → claude_mpm-5.4.22.dist-info}/METADATA +47 -84
  78. {claude_mpm-5.1.9.dist-info → claude_mpm-5.4.22.dist-info}/RECORD +82 -161
  79. claude_mpm-5.4.22.dist-info/entry_points.txt +5 -0
  80. claude_mpm-5.4.22.dist-info/licenses/LICENSE +94 -0
  81. claude_mpm-5.4.22.dist-info/licenses/LICENSE-FAQ.md +153 -0
  82. claude_mpm/agents/BASE_AGENT_TEMPLATE.md +0 -292
  83. claude_mpm/agents/BASE_DOCUMENTATION.md +0 -53
  84. claude_mpm/agents/BASE_ENGINEER.md +0 -658
  85. claude_mpm/agents/BASE_OPS.md +0 -219
  86. claude_mpm/agents/BASE_PM.md +0 -480
  87. claude_mpm/agents/BASE_PROMPT_ENGINEER.md +0 -787
  88. claude_mpm/agents/BASE_QA.md +0 -167
  89. claude_mpm/agents/BASE_RESEARCH.md +0 -53
  90. claude_mpm/agents/base_agent.json +0 -31
  91. claude_mpm/agents/base_agent_loader.py +0 -601
  92. claude_mpm/cli/commands/agents_detect.py +0 -380
  93. claude_mpm/cli/commands/agents_recommend.py +0 -309
  94. claude_mpm/cli/ticket_cli.py +0 -35
  95. claude_mpm/commands/mpm-agents-auto-configure.md +0 -278
  96. claude_mpm/commands/mpm-agents-detect.md +0 -177
  97. claude_mpm/commands/mpm-agents-list.md +0 -131
  98. claude_mpm/commands/mpm-agents-recommend.md +0 -223
  99. claude_mpm/commands/mpm-config-view.md +0 -150
  100. claude_mpm/commands/mpm-ticket-organize.md +0 -304
  101. claude_mpm/dashboard/analysis_runner.py +0 -455
  102. claude_mpm/dashboard/index.html +0 -13
  103. claude_mpm/dashboard/open_dashboard.py +0 -66
  104. claude_mpm/dashboard/static/css/activity.css +0 -1958
  105. claude_mpm/dashboard/static/css/connection-status.css +0 -370
  106. claude_mpm/dashboard/static/css/dashboard.css +0 -4701
  107. claude_mpm/dashboard/static/js/components/activity-tree.js +0 -1871
  108. claude_mpm/dashboard/static/js/components/agent-hierarchy.js +0 -777
  109. claude_mpm/dashboard/static/js/components/agent-inference.js +0 -956
  110. claude_mpm/dashboard/static/js/components/build-tracker.js +0 -333
  111. claude_mpm/dashboard/static/js/components/code-simple.js +0 -857
  112. claude_mpm/dashboard/static/js/components/connection-debug.js +0 -654
  113. claude_mpm/dashboard/static/js/components/diff-viewer.js +0 -891
  114. claude_mpm/dashboard/static/js/components/event-processor.js +0 -542
  115. claude_mpm/dashboard/static/js/components/event-viewer.js +0 -1155
  116. claude_mpm/dashboard/static/js/components/export-manager.js +0 -368
  117. claude_mpm/dashboard/static/js/components/file-change-tracker.js +0 -443
  118. claude_mpm/dashboard/static/js/components/file-change-viewer.js +0 -690
  119. claude_mpm/dashboard/static/js/components/file-tool-tracker.js +0 -724
  120. claude_mpm/dashboard/static/js/components/file-viewer.js +0 -580
  121. claude_mpm/dashboard/static/js/components/hud-library-loader.js +0 -211
  122. claude_mpm/dashboard/static/js/components/hud-manager.js +0 -671
  123. claude_mpm/dashboard/static/js/components/hud-visualizer.js +0 -1718
  124. claude_mpm/dashboard/static/js/components/module-viewer.js +0 -2764
  125. claude_mpm/dashboard/static/js/components/session-manager.js +0 -579
  126. claude_mpm/dashboard/static/js/components/socket-manager.js +0 -368
  127. claude_mpm/dashboard/static/js/components/ui-state-manager.js +0 -749
  128. claude_mpm/dashboard/static/js/components/unified-data-viewer.js +0 -1824
  129. claude_mpm/dashboard/static/js/components/working-directory.js +0 -920
  130. claude_mpm/dashboard/static/js/connection-manager.js +0 -536
  131. claude_mpm/dashboard/static/js/dashboard.js +0 -1914
  132. claude_mpm/dashboard/static/js/extension-error-handler.js +0 -164
  133. claude_mpm/dashboard/static/js/socket-client.js +0 -1474
  134. claude_mpm/dashboard/static/js/tab-isolation-fix.js +0 -185
  135. claude_mpm/dashboard/static/socket.io.min.js +0 -7
  136. claude_mpm/dashboard/static/socket.io.v4.8.1.backup.js +0 -7
  137. claude_mpm/dashboard/templates/code_simple.html +0 -153
  138. claude_mpm/dashboard/templates/index.html +0 -606
  139. claude_mpm/dashboard/test_dashboard.html +0 -372
  140. claude_mpm/scripts/mcp_server.py +0 -75
  141. claude_mpm/scripts/mcp_wrapper.py +0 -39
  142. claude_mpm/services/mcp_gateway/__init__.py +0 -159
  143. claude_mpm/services/mcp_gateway/auto_configure.py +0 -369
  144. claude_mpm/services/mcp_gateway/config/__init__.py +0 -17
  145. claude_mpm/services/mcp_gateway/config/config_loader.py +0 -296
  146. claude_mpm/services/mcp_gateway/config/config_schema.py +0 -243
  147. claude_mpm/services/mcp_gateway/config/configuration.py +0 -429
  148. claude_mpm/services/mcp_gateway/core/__init__.py +0 -43
  149. claude_mpm/services/mcp_gateway/core/base.py +0 -312
  150. claude_mpm/services/mcp_gateway/core/exceptions.py +0 -253
  151. claude_mpm/services/mcp_gateway/core/interfaces.py +0 -443
  152. claude_mpm/services/mcp_gateway/core/process_pool.py +0 -977
  153. claude_mpm/services/mcp_gateway/core/singleton_manager.py +0 -315
  154. claude_mpm/services/mcp_gateway/core/startup_verification.py +0 -316
  155. claude_mpm/services/mcp_gateway/main.py +0 -589
  156. claude_mpm/services/mcp_gateway/registry/__init__.py +0 -12
  157. claude_mpm/services/mcp_gateway/registry/service_registry.py +0 -412
  158. claude_mpm/services/mcp_gateway/registry/tool_registry.py +0 -489
  159. claude_mpm/services/mcp_gateway/server/__init__.py +0 -15
  160. claude_mpm/services/mcp_gateway/server/mcp_gateway.py +0 -414
  161. claude_mpm/services/mcp_gateway/server/stdio_handler.py +0 -372
  162. claude_mpm/services/mcp_gateway/server/stdio_server.py +0 -712
  163. claude_mpm/services/mcp_gateway/tools/__init__.py +0 -36
  164. claude_mpm/services/mcp_gateway/tools/base_adapter.py +0 -485
  165. claude_mpm/services/mcp_gateway/tools/document_summarizer.py +0 -789
  166. claude_mpm/services/mcp_gateway/tools/external_mcp_services.py +0 -654
  167. claude_mpm/services/mcp_gateway/tools/health_check_tool.py +0 -456
  168. claude_mpm/services/mcp_gateway/tools/hello_world.py +0 -551
  169. claude_mpm/services/mcp_gateway/tools/kuzu_memory_service.py +0 -555
  170. claude_mpm/services/mcp_gateway/utils/__init__.py +0 -14
  171. claude_mpm/services/mcp_gateway/utils/package_version_checker.py +0 -160
  172. claude_mpm/services/mcp_gateway/utils/update_preferences.py +0 -170
  173. claude_mpm-5.1.9.dist-info/entry_points.txt +0 -10
  174. claude_mpm-5.1.9.dist-info/licenses/LICENSE +0 -21
  175. {claude_mpm-5.1.9.dist-info → claude_mpm-5.4.22.dist-info}/WHEEL +0 -0
  176. {claude_mpm-5.1.9.dist-info → claude_mpm-5.4.22.dist-info}/top_level.txt +0 -0
@@ -1,372 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Claude MPM Dashboard Test</title>
7
- <link rel="icon" type="image/svg+xml" href="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHJ4PSI2IiBmaWxsPSIjNDI5OWUxIi8+CiAgPHRleHQgeD0iMTYiIHk9IjIxIiBmb250LWZhbWlseT0iSGVsdmV0aWNhLCBBcmlhbCwgc2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMCIgZm9udC13ZWlnaHQ9ImJvbGQiIGZpbGw9IndoaXRlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj5NUE08L3RleHQ+Cjwvc3ZnPgo=">
8
-
9
- <!-- Test version using relative paths for verification -->
10
- <script src="https://cdn.socket.io/4.7.5/socket.io.min.js"></script>
11
- <link rel="stylesheet" href="static/css/dashboard.css">
12
-
13
- <!-- Additional styles for file operations -->
14
- <style>
15
- .file-item {
16
- background: white;
17
- border-radius: 6px;
18
- padding: 12px;
19
- margin-bottom: 8px;
20
- border-left: 4px solid #4299e1;
21
- cursor: pointer;
22
- transition: all 0.2s;
23
- }
24
-
25
- .file-item:hover {
26
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
27
- transform: translateX(2px);
28
- }
29
-
30
- .file-header {
31
- display: flex;
32
- align-items: center;
33
- gap: 8px;
34
- margin-bottom: 4px;
35
- }
36
-
37
- .file-icon {
38
- font-size: 16px;
39
- min-width: 20px;
40
- }
41
-
42
- .file-path {
43
- flex: 1;
44
- font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
45
- font-size: 13px;
46
- color: #2d3748;
47
- word-break: break-all;
48
- }
49
-
50
- .file-timestamp {
51
- font-size: 12px;
52
- color: #718096;
53
- }
54
-
55
- .file-summary {
56
- font-size: 12px;
57
- color: #4a5568;
58
- margin-left: 28px;
59
- }
60
-
61
- .operation-item {
62
- background: #f8fafc;
63
- border: 1px solid #e2e8f0;
64
- border-radius: 6px;
65
- padding: 10px;
66
- margin-bottom: 8px;
67
- }
68
-
69
- .operation-header {
70
- display: flex;
71
- align-items: center;
72
- gap: 8px;
73
- margin-bottom: 6px;
74
- }
75
-
76
- .operation-icon {
77
- font-size: 14px;
78
- min-width: 16px;
79
- }
80
-
81
- .operation-type {
82
- font-weight: 600;
83
- color: #2d3748;
84
- }
85
-
86
- .operation-timestamp {
87
- margin-left: auto;
88
- font-size: 11px;
89
- color: #718096;
90
- }
91
-
92
- .operation-details {
93
- font-size: 12px;
94
- color: #4a5568;
95
- line-height: 1.4;
96
- }
97
-
98
- .file-details {
99
- background: white;
100
- border-radius: 6px;
101
- padding: 15px;
102
- }
103
-
104
- .file-path-display {
105
- font-size: 14px;
106
- margin-bottom: 15px;
107
- padding-bottom: 10px;
108
- border-bottom: 1px solid #e2e8f0;
109
- }
110
-
111
- .operations-list {
112
- max-height: 400px;
113
- overflow-y: auto;
114
- }
115
-
116
- .test-status {
117
- position: fixed;
118
- top: 20px;
119
- right: 20px;
120
- background: #f7fafc;
121
- border: 1px solid #e2e8f0;
122
- border-radius: 8px;
123
- padding: 15px;
124
- max-width: 300px;
125
- z-index: 1001;
126
- }
127
-
128
- .test-item {
129
- display: flex;
130
- align-items: center;
131
- gap: 8px;
132
- margin-bottom: 5px;
133
- font-size: 12px;
134
- }
135
-
136
- .test-pass { color: #38a169; }
137
- .test-fail { color: #e53e3e; }
138
- .test-pending { color: #d69e2e; }
139
- </style>
140
- </head>
141
- <body>
142
- <!-- Test Status Panel -->
143
- <div class="test-status">
144
- <h4>🧪 Module Test Status</h4>
145
- <div id="test-results">
146
- <div class="test-item test-pending">⏳ Loading modules...</div>
147
- </div>
148
- </div>
149
-
150
- <div class="container">
151
- <!-- Header Section -->
152
- <div class="header">
153
- <!-- Row 1: Title, Status, Metrics -->
154
- <div class="header-row">
155
- <div class="header-title">
156
- <h1>🚀 Claude MPM Monitor (Modular Test)</h1>
157
- <div id="connection-status" class="status-badge status-disconnected">
158
- <span>●</span> Disconnected
159
- </div>
160
- </div>
161
- <div class="metrics-widget">
162
- <div class="metric-mini">
163
- <div class="metric-mini-value" id="total-events">0</div>
164
- <div class="metric-mini-label">Events</div>
165
- </div>
166
- <div class="metric-mini">
167
- <div class="metric-mini-value" id="events-per-minute">0</div>
168
- <div class="metric-mini-label">Per Min</div>
169
- </div>
170
- <div class="metric-mini">
171
- <div class="metric-mini-value" id="unique-types">0</div>
172
- <div class="metric-mini-label">Types</div>
173
- </div>
174
- <div class="metric-mini">
175
- <div class="metric-mini-value" id="error-count">0</div>
176
- <div class="metric-mini-label">Errors</div>
177
- </div>
178
- </div>
179
- </div>
180
-
181
- <!-- Row 2: Connection Controls and Session Selection -->
182
- <div class="header-row">
183
- <div class="connection-controls">
184
- <button id="connect-btn">Connect</button>
185
- <button id="disconnect-btn" class="btn-secondary">Disconnect</button>
186
- <input type="text" id="port-input" value="8765" placeholder="Port">
187
- </div>
188
- <div class="session-group">
189
- <label>Session:</label>
190
- <select id="session-select" class="session-select">
191
- <option value="">All Sessions</option>
192
- </select>
193
- <button class="btn-secondary">Refresh</button>
194
- </div>
195
- <div class="action-buttons">
196
- <button class="btn-secondary">Clear</button>
197
- <button class="btn-success">Export</button>
198
- </div>
199
- </div>
200
- </div>
201
-
202
- <!-- Main Content Area -->
203
- <div class="events-wrapper">
204
- <!-- Split container for module viewer and tabbed content -->
205
- <div class="split-container">
206
- <!-- Left: Module Viewer -->
207
- <div class="module-viewer">
208
- <div class="module-header">
209
- <h4>📁 Event Analysis</h4>
210
- <button class="btn-secondary" style="font-size: 11px; padding: 4px 8px;">Clear</button>
211
- </div>
212
- <div class="module-content" id="module-content">
213
- <div class="module-empty">
214
- <p>Click on an event to view details</p>
215
- <p class="module-hint">Events are organized by class</p>
216
- </div>
217
- </div>
218
- </div>
219
-
220
- <!-- Right: Tabbed Content -->
221
- <div class="events-container">
222
- <!-- Tab Navigation -->
223
- <div class="tab-nav">
224
- <button class="tab-button active">📊 Events</button>
225
- <button class="tab-button">🤖 Agents</button>
226
- <button class="tab-button">🔧 Tools</button>
227
- <button class="tab-button">📁 Files</button>
228
- </div>
229
-
230
- <!-- Events Tab -->
231
- <div class="tab-content active" id="events-tab">
232
- <div class="tab-filters">
233
- <input type="text" id="events-search-input" placeholder="Search events...">
234
- <select id="events-type-filter">
235
- <option value="">All Events</option>
236
- <!-- Event types will be dynamically populated from actual event data -->
237
- </select>
238
- </div>
239
- <div class="events-list" id="events-list">
240
- <div class="no-events">
241
- Connect to Socket.IO server to see events...
242
- </div>
243
- </div>
244
- </div>
245
-
246
- <!-- Agents Tab -->
247
- <div class="tab-content" id="agents-tab">
248
- <div class="tab-filters">
249
- <input type="text" id="agents-search-input" placeholder="Search agents...">
250
- <select id="agents-type-filter">
251
- <option value="">All Agents</option>
252
- <option value="research">Research</option>
253
- <option value="engineer">Engineer</option>
254
- <option value="pm">Project Manager</option>
255
- <option value="ops">Operations</option>
256
- </select>
257
- </div>
258
- <div class="events-list" id="agents-list">
259
- <div class="no-events">
260
- No agent events found...
261
- </div>
262
- </div>
263
- </div>
264
-
265
- <!-- Tools Tab -->
266
- <div class="tab-content" id="tools-tab">
267
- <div class="tab-filters">
268
- <input type="text" id="tools-search-input" placeholder="Search tools...">
269
- <select id="tools-type-filter">
270
- <option value="">All Tools</option>
271
- <option value="Read">Read</option>
272
- <option value="Write">Write</option>
273
- <option value="Edit">Edit</option>
274
- <option value="Bash">Bash</option>
275
- <option value="Grep">Grep</option>
276
- <option value="Glob">Glob</option>
277
- </select>
278
- </div>
279
- <div class="events-list" id="tools-list">
280
- <div class="no-events">
281
- No tool events found...
282
- </div>
283
- </div>
284
- </div>
285
-
286
- <!-- Files Tab -->
287
- <div class="tab-content" id="files-tab">
288
- <div class="tab-filters">
289
- <input type="text" id="files-search-input" placeholder="Search files...">
290
- <select id="files-type-filter">
291
- <option value="">All Operations</option>
292
- <option value="read">Read</option>
293
- <option value="write">Write</option>
294
- <option value="edit">Edit</option>
295
- <option value="search">Search</option>
296
- </select>
297
- </div>
298
- <div class="events-list" id="files-list">
299
- <div class="no-events">
300
- No file operations found...
301
- </div>
302
- </div>
303
- </div>
304
- </div>
305
- </div>
306
- </div>
307
- </div>
308
-
309
- <!-- Footer -->
310
- <div class="footer">
311
- <div class="footer-content">
312
- <div class="footer-item">
313
- <span class="footer-label">Session:</span>
314
- <span class="footer-value" id="footer-session">All Sessions</span>
315
- </div>
316
- <span class="footer-divider">|</span>
317
- <div class="footer-item">
318
- <span class="footer-label">Directory:</span>
319
- <span class="footer-value" id="footer-working-dir">Unknown</span>
320
- </div>
321
- <span class="footer-divider">|</span>
322
- <div class="footer-item">
323
- <span class="footer-label">Branch:</span>
324
- <span class="footer-value" id="footer-git-branch">Unknown</span>
325
- </div>
326
- </div>
327
- </div>
328
-
329
- <!-- JavaScript Modules -->
330
- <script src="static/js/socket-client.js"></script>
331
- <script src="static/js/components/event-viewer.js"></script>
332
- <script src="static/js/components/module-viewer.js"></script>
333
- <script src="static/js/components/session-manager.js"></script>
334
- <script src="static/js/dashboard.js"></script>
335
-
336
- <!-- Test Script -->
337
- <script>
338
- // Simple test to verify modules loaded correctly
339
- setTimeout(() => {
340
- const results = document.getElementById('test-results');
341
- const tests = [
342
- { name: 'SocketClient', check: () => typeof SocketClient !== 'undefined' },
343
- { name: 'EventViewer', check: () => typeof EventViewer !== 'undefined' },
344
- { name: 'ModuleViewer', check: () => typeof ModuleViewer !== 'undefined' },
345
- { name: 'SessionManager', check: () => typeof SessionManager !== 'undefined' },
346
- { name: 'Dashboard', check: () => typeof Dashboard !== 'undefined' },
347
- { name: 'Dashboard Instance', check: () => typeof window.dashboard !== 'undefined' },
348
- { name: 'Global Functions', check: () => typeof connectSocket !== 'undefined' }
349
- ];
350
-
351
- let html = '';
352
- let allPass = true;
353
-
354
- tests.forEach(test => {
355
- const passed = test.check();
356
- const status = passed ? 'test-pass' : 'test-fail';
357
- const icon = passed ? '✅' : '❌';
358
- html += `<div class="test-item ${status}">${icon} ${test.name}</div>`;
359
- if (!passed) allPass = false;
360
- });
361
-
362
- if (allPass) {
363
- html += '<div class="test-item test-pass">🎉 All modules loaded successfully!</div>';
364
- } else {
365
- html += '<div class="test-item test-fail">⚠️ Some modules failed to load</div>';
366
- }
367
-
368
- results.innerHTML = html;
369
- }, 1000);
370
- </script>
371
- </body>
372
- </html>
@@ -1,75 +0,0 @@
1
- #!/usr/bin/env python3
2
- """MCP Server launcher script for Claude Code.
3
-
4
- This script launches the MCP gateway server for Claude Code integration.
5
- It handles proper Python path setup and error reporting to stderr.
6
- """
7
-
8
- import logging
9
- import sys
10
- from pathlib import Path
11
-
12
- # Since we're now in src/claude_mpm/scripts/, we need to go up 3 levels to reach the project root
13
- # Then down into src to add it to the path
14
- project_root = Path(Path(Path(__file__).parent.resolve().joinpath(), "..", "..", ".."))
15
- sys.path.insert(0, Path(project_root) / "src")
16
-
17
-
18
- def setup_logging():
19
- """Configure logging to stderr to avoid interfering with stdio protocol."""
20
- logging.basicConfig(
21
- level=logging.INFO,
22
- format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
23
- stream=sys.stderr,
24
- )
25
-
26
-
27
- def main():
28
- """Main entry point for the MCP server launcher."""
29
- try:
30
- # Setup logging first
31
- setup_logging()
32
- logger = logging.getLogger("MCPLauncher")
33
-
34
- # Import modules after path setup
35
- try:
36
- import asyncio
37
-
38
- from claude_mpm.services.mcp_gateway.server.stdio_server import (
39
- SimpleMCPServer,
40
- )
41
- except ImportError as e:
42
- logger.error(f"Failed to import required modules: {e}")
43
- logger.error("Make sure claude-mpm is properly installed")
44
- sys.exit(1)
45
-
46
- # Create and run server
47
- logger.info("Starting MCP Gateway Server...")
48
-
49
- async def run_server():
50
- """Async function to run the server."""
51
- try:
52
- server = SimpleMCPServer(name="claude-mpm-gateway", version="1.0.0")
53
- await server.run()
54
- except Exception as e:
55
- logger.error(f"Server runtime error: {e}")
56
- raise
57
-
58
- # Run the async server
59
- asyncio.run(run_server())
60
-
61
- except KeyboardInterrupt:
62
- # Clean shutdown on Ctrl+C
63
- logger.info("Server shutdown requested")
64
- sys.exit(0)
65
- except Exception as e:
66
- # Log any unexpected errors
67
- logger.error(f"Unexpected error: {e}")
68
- import traceback
69
-
70
- traceback.print_exc(file=sys.stderr)
71
- sys.exit(1)
72
-
73
-
74
- if __name__ == "__main__":
75
- main()
@@ -1,39 +0,0 @@
1
- """
2
- MCP Wrapper Module
3
- ==================
4
-
5
- This module provides an importable entry point for the MCP wrapper script.
6
- It delegates to the actual wrapper script in the scripts directory.
7
-
8
- WHY: We need this to make the wrapper accessible as a Python module entry point
9
- for the pyproject.toml scripts configuration.
10
- """
11
-
12
- import sys
13
- from pathlib import Path
14
-
15
-
16
- def entry_point():
17
- """Entry point that delegates to the actual wrapper script."""
18
- # Find the actual wrapper script
19
- current_file = Path(__file__).resolve()
20
- project_root = current_file.parent.parent.parent.parent
21
- wrapper_script = project_root / "scripts" / "mcp_wrapper.py"
22
-
23
- if not wrapper_script.exists():
24
- print(f"Error: Wrapper script not found at {wrapper_script}", file=sys.stderr)
25
- sys.exit(1)
26
-
27
- # Add the scripts directory to path and import the wrapper
28
- scripts_dir = str(wrapper_script.parent)
29
- if scripts_dir not in sys.path:
30
- sys.path.insert(0, scripts_dir)
31
-
32
- # Import and run the wrapper
33
- import mcp_wrapper
34
-
35
- mcp_wrapper.main()
36
-
37
-
38
- if __name__ == "__main__":
39
- entry_point()
@@ -1,159 +0,0 @@
1
- """
2
- MCP Gateway Service Module
3
- ==========================
4
-
5
- This module provides the Model Context Protocol (MCP) gateway implementation for Claude MPM.
6
- It enables integration with MCP-compatible tools and services through a standardized interface.
7
-
8
- Part of ISS-0034: Infrastructure Setup - MCP Gateway Project Foundation
9
-
10
- The MCP Gateway follows the claude-mpm service-oriented architecture with:
11
- - Interface-based contracts for all components
12
- - Dependency injection for service resolution
13
- - Lazy loading for performance optimization
14
- - Comprehensive error handling and logging
15
-
16
- Structure:
17
- - core/: Core interfaces and base classes for MCP services
18
- - server/: MCP server implementation and lifecycle management
19
- - tools/: Tool registry and tool adapter implementations
20
- - config/: Configuration management for MCP Gateway
21
- - registry/: Service discovery and registration
22
- """
23
-
24
- # Version information
25
- __version__ = "0.1.0"
26
-
27
-
28
- # Lazy imports to prevent circular dependencies and improve startup performance
29
- def __getattr__(name):
30
- """Lazy import mechanism for MCP Gateway components using dictionary-based mapping."""
31
- from importlib import import_module
32
-
33
- # Dictionary mapping: name -> (module_path, attribute_name)
34
- _LAZY_IMPORTS = {
35
- # Core interfaces and base classes
36
- "IMCPGateway": (
37
- "claude_mpm.services.mcp_gateway.core.interfaces",
38
- "IMCPGateway",
39
- ),
40
- "IMCPToolRegistry": (
41
- "claude_mpm.services.mcp_gateway.core.interfaces",
42
- "IMCPToolRegistry",
43
- ),
44
- "IMCPConfiguration": (
45
- "claude_mpm.services.mcp_gateway.core.interfaces",
46
- "IMCPConfiguration",
47
- ),
48
- "IMCPToolAdapter": (
49
- "claude_mpm.services.mcp_gateway.core.interfaces",
50
- "IMCPToolAdapter",
51
- ),
52
- "BaseMCPService": (
53
- "claude_mpm.services.mcp_gateway.core.base",
54
- "BaseMCPService",
55
- ),
56
- # Gateway implementations
57
- "MCPGateway": (
58
- "claude_mpm.services.mcp_gateway.server.mcp_gateway",
59
- "MCPGateway",
60
- ),
61
- "StdioHandler": (
62
- "claude_mpm.services.mcp_gateway.server.stdio_handler",
63
- "StdioHandler",
64
- ),
65
- "AlternativeStdioHandler": (
66
- "claude_mpm.services.mcp_gateway.server.stdio_handler",
67
- "AlternativeStdioHandler",
68
- ),
69
- # Tool registry and adapters
70
- "ToolRegistry": (
71
- "claude_mpm.services.mcp_gateway.registry.tool_registry",
72
- "ToolRegistry",
73
- ),
74
- "BaseToolAdapter": (
75
- "claude_mpm.services.mcp_gateway.tools.base_adapter",
76
- "BaseToolAdapter",
77
- ),
78
- "EchoToolAdapter": (
79
- "claude_mpm.services.mcp_gateway.tools.base_adapter",
80
- "EchoToolAdapter",
81
- ),
82
- "CalculatorToolAdapter": (
83
- "claude_mpm.services.mcp_gateway.tools.base_adapter",
84
- "CalculatorToolAdapter",
85
- ),
86
- "SystemInfoToolAdapter": (
87
- "claude_mpm.services.mcp_gateway.tools.base_adapter",
88
- "SystemInfoToolAdapter",
89
- ),
90
- # Configuration management
91
- "MCPConfiguration": (
92
- "claude_mpm.services.mcp_gateway.config.configuration",
93
- "MCPConfiguration",
94
- ),
95
- "MCPConfigLoader": (
96
- "claude_mpm.services.mcp_gateway.config.config_loader",
97
- "MCPConfigLoader",
98
- ),
99
- # Service registry
100
- "MCPServiceRegistry": (
101
- "claude_mpm.services.mcp_gateway.registry.service_registry",
102
- "MCPServiceRegistry",
103
- ),
104
- # Exceptions
105
- "MCPException": (
106
- "claude_mpm.services.mcp_gateway.core.exceptions",
107
- "MCPException",
108
- ),
109
- "MCPConfigurationError": (
110
- "claude_mpm.services.mcp_gateway.core.exceptions",
111
- "MCPConfigurationError",
112
- ),
113
- "MCPToolNotFoundError": (
114
- "claude_mpm.services.mcp_gateway.core.exceptions",
115
- "MCPToolNotFoundError",
116
- ),
117
- "MCPServerError": (
118
- "claude_mpm.services.mcp_gateway.core.exceptions",
119
- "MCPServerError",
120
- ),
121
- }
122
-
123
- if name in _LAZY_IMPORTS:
124
- module_path, attr_name = _LAZY_IMPORTS[name]
125
- module = import_module(module_path)
126
- return getattr(module, attr_name)
127
-
128
- raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
129
-
130
-
131
- # Public API exports
132
- __all__ = [
133
- "AlternativeStdioHandler",
134
- "BaseMCPService",
135
- "BaseToolAdapter",
136
- "CalculatorToolAdapter",
137
- "EchoToolAdapter",
138
- "IMCPConfiguration",
139
- # Core interfaces
140
- "IMCPGateway",
141
- "IMCPToolAdapter",
142
- "IMCPToolRegistry",
143
- "MCPConfigLoader",
144
- # Configuration
145
- "MCPConfiguration",
146
- "MCPConfigurationError",
147
- # Exceptions
148
- "MCPException",
149
- # Gateway implementations
150
- "MCPGateway",
151
- "MCPServerError",
152
- # Service registry
153
- "MCPServiceRegistry",
154
- "MCPToolNotFoundError",
155
- "StdioHandler",
156
- "SystemInfoToolAdapter",
157
- # Tool management
158
- "ToolRegistry",
159
- ]