claude-mpm 4.1.8__py3-none-any.whl → 4.1.11__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 (111) hide show
  1. claude_mpm/VERSION +1 -1
  2. claude_mpm/agents/INSTRUCTIONS.md +26 -1
  3. claude_mpm/agents/agents_metadata.py +57 -0
  4. claude_mpm/agents/templates/.claude-mpm/memories/README.md +17 -0
  5. claude_mpm/agents/templates/.claude-mpm/memories/engineer_memories.md +3 -0
  6. claude_mpm/agents/templates/agent-manager.json +263 -17
  7. claude_mpm/agents/templates/agentic_coder_optimizer.json +222 -0
  8. claude_mpm/agents/templates/code_analyzer.json +18 -8
  9. claude_mpm/agents/templates/engineer.json +1 -1
  10. claude_mpm/agents/templates/logs/prompts/agent_engineer_20250826_014258_728.md +39 -0
  11. claude_mpm/agents/templates/qa.json +1 -1
  12. claude_mpm/agents/templates/research.json +1 -1
  13. claude_mpm/cli/__init__.py +15 -0
  14. claude_mpm/cli/commands/__init__.py +6 -0
  15. claude_mpm/cli/commands/analyze.py +548 -0
  16. claude_mpm/cli/commands/analyze_code.py +524 -0
  17. claude_mpm/cli/commands/configure.py +78 -28
  18. claude_mpm/cli/commands/configure_tui.py +62 -60
  19. claude_mpm/cli/commands/dashboard.py +288 -0
  20. claude_mpm/cli/commands/debug.py +1386 -0
  21. claude_mpm/cli/commands/mpm_init.py +427 -0
  22. claude_mpm/cli/commands/mpm_init_handler.py +83 -0
  23. claude_mpm/cli/parsers/analyze_code_parser.py +170 -0
  24. claude_mpm/cli/parsers/analyze_parser.py +135 -0
  25. claude_mpm/cli/parsers/base_parser.py +44 -0
  26. claude_mpm/cli/parsers/dashboard_parser.py +113 -0
  27. claude_mpm/cli/parsers/debug_parser.py +319 -0
  28. claude_mpm/cli/parsers/mpm_init_parser.py +122 -0
  29. claude_mpm/constants.py +13 -1
  30. claude_mpm/core/framework_loader.py +148 -6
  31. claude_mpm/core/log_manager.py +16 -13
  32. claude_mpm/core/logger.py +1 -1
  33. claude_mpm/core/unified_agent_registry.py +1 -1
  34. claude_mpm/dashboard/.claude-mpm/socketio-instances.json +1 -0
  35. claude_mpm/dashboard/analysis_runner.py +455 -0
  36. claude_mpm/dashboard/static/built/components/activity-tree.js +2 -0
  37. claude_mpm/dashboard/static/built/components/agent-inference.js +1 -1
  38. claude_mpm/dashboard/static/built/components/code-tree.js +2 -0
  39. claude_mpm/dashboard/static/built/components/code-viewer.js +2 -0
  40. claude_mpm/dashboard/static/built/components/event-viewer.js +1 -1
  41. claude_mpm/dashboard/static/built/components/file-tool-tracker.js +1 -1
  42. claude_mpm/dashboard/static/built/components/module-viewer.js +1 -1
  43. claude_mpm/dashboard/static/built/components/session-manager.js +1 -1
  44. claude_mpm/dashboard/static/built/components/working-directory.js +1 -1
  45. claude_mpm/dashboard/static/built/dashboard.js +1 -1
  46. claude_mpm/dashboard/static/built/socket-client.js +1 -1
  47. claude_mpm/dashboard/static/css/activity.css +549 -0
  48. claude_mpm/dashboard/static/css/code-tree.css +1175 -0
  49. claude_mpm/dashboard/static/css/dashboard.css +245 -0
  50. claude_mpm/dashboard/static/dist/components/activity-tree.js +2 -0
  51. claude_mpm/dashboard/static/dist/components/code-tree.js +2 -0
  52. claude_mpm/dashboard/static/dist/components/code-viewer.js +2 -0
  53. claude_mpm/dashboard/static/dist/components/event-viewer.js +1 -1
  54. claude_mpm/dashboard/static/dist/components/session-manager.js +1 -1
  55. claude_mpm/dashboard/static/dist/components/working-directory.js +1 -1
  56. claude_mpm/dashboard/static/dist/dashboard.js +1 -1
  57. claude_mpm/dashboard/static/dist/socket-client.js +1 -1
  58. claude_mpm/dashboard/static/js/components/activity-tree.js +1338 -0
  59. claude_mpm/dashboard/static/js/components/code-tree.js +2535 -0
  60. claude_mpm/dashboard/static/js/components/code-viewer.js +480 -0
  61. claude_mpm/dashboard/static/js/components/event-viewer.js +59 -9
  62. claude_mpm/dashboard/static/js/components/session-manager.js +40 -4
  63. claude_mpm/dashboard/static/js/components/socket-manager.js +12 -0
  64. claude_mpm/dashboard/static/js/components/ui-state-manager.js +4 -0
  65. claude_mpm/dashboard/static/js/components/working-directory.js +17 -1
  66. claude_mpm/dashboard/static/js/dashboard.js +51 -0
  67. claude_mpm/dashboard/static/js/socket-client.js +465 -29
  68. claude_mpm/dashboard/templates/index.html +182 -4
  69. claude_mpm/hooks/claude_hooks/hook_handler.py +182 -5
  70. claude_mpm/hooks/claude_hooks/installer.py +386 -113
  71. claude_mpm/scripts/claude-hook-handler.sh +161 -0
  72. claude_mpm/scripts/socketio_daemon.py +121 -8
  73. claude_mpm/services/agents/deployment/agent_lifecycle_manager_refactored.py +2 -2
  74. claude_mpm/services/agents/deployment/agent_record_service.py +1 -2
  75. claude_mpm/services/agents/memory/memory_format_service.py +1 -3
  76. claude_mpm/services/cli/agent_cleanup_service.py +1 -5
  77. claude_mpm/services/cli/agent_dependency_service.py +1 -1
  78. claude_mpm/services/cli/agent_validation_service.py +3 -4
  79. claude_mpm/services/cli/dashboard_launcher.py +2 -3
  80. claude_mpm/services/cli/startup_checker.py +0 -11
  81. claude_mpm/services/core/cache_manager.py +1 -3
  82. claude_mpm/services/core/path_resolver.py +1 -4
  83. claude_mpm/services/core/service_container.py +2 -2
  84. claude_mpm/services/diagnostics/checks/instructions_check.py +1 -2
  85. claude_mpm/services/infrastructure/monitoring/__init__.py +11 -11
  86. claude_mpm/services/infrastructure/monitoring.py +11 -11
  87. claude_mpm/services/project/architecture_analyzer.py +1 -1
  88. claude_mpm/services/project/dependency_analyzer.py +4 -4
  89. claude_mpm/services/project/language_analyzer.py +3 -3
  90. claude_mpm/services/project/metrics_collector.py +3 -6
  91. claude_mpm/services/socketio/event_normalizer.py +64 -0
  92. claude_mpm/services/socketio/handlers/__init__.py +2 -0
  93. claude_mpm/services/socketio/handlers/code_analysis.py +672 -0
  94. claude_mpm/services/socketio/handlers/registry.py +2 -0
  95. claude_mpm/services/socketio/server/connection_manager.py +6 -4
  96. claude_mpm/services/socketio/server/core.py +100 -11
  97. claude_mpm/services/socketio/server/main.py +8 -2
  98. claude_mpm/services/visualization/__init__.py +19 -0
  99. claude_mpm/services/visualization/mermaid_generator.py +938 -0
  100. claude_mpm/tools/__main__.py +208 -0
  101. claude_mpm/tools/code_tree_analyzer.py +1596 -0
  102. claude_mpm/tools/code_tree_builder.py +631 -0
  103. claude_mpm/tools/code_tree_events.py +416 -0
  104. claude_mpm/tools/socketio_debug.py +671 -0
  105. {claude_mpm-4.1.8.dist-info → claude_mpm-4.1.11.dist-info}/METADATA +2 -1
  106. {claude_mpm-4.1.8.dist-info → claude_mpm-4.1.11.dist-info}/RECORD +110 -74
  107. claude_mpm/agents/schema/agent_schema.json +0 -314
  108. {claude_mpm-4.1.8.dist-info → claude_mpm-4.1.11.dist-info}/WHEEL +0 -0
  109. {claude_mpm-4.1.8.dist-info → claude_mpm-4.1.11.dist-info}/entry_points.txt +0 -0
  110. {claude_mpm-4.1.8.dist-info → claude_mpm-4.1.11.dist-info}/licenses/LICENSE +0 -0
  111. {claude_mpm-4.1.8.dist-info → claude_mpm-4.1.11.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,549 @@
1
+ /* Activity Tab Styles for D3.js Tree Visualization */
2
+
3
+ /* Container and Layout */
4
+ .activity-container {
5
+ padding: 20px;
6
+ height: calc(100vh - 280px);
7
+ display: flex;
8
+ flex-direction: column;
9
+ }
10
+
11
+ .activity-header {
12
+ display: flex;
13
+ justify-content: space-between;
14
+ align-items: center;
15
+ padding: 15px;
16
+ background: white;
17
+ border-radius: 8px;
18
+ margin-bottom: 15px;
19
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
20
+ }
21
+
22
+ .activity-controls {
23
+ display: flex;
24
+ gap: 10px;
25
+ align-items: center;
26
+ }
27
+
28
+ .activity-controls .btn-sm {
29
+ padding: 6px 12px;
30
+ font-size: 12px;
31
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
32
+ color: white;
33
+ border: none;
34
+ border-radius: 4px;
35
+ cursor: pointer;
36
+ transition: all 0.3s;
37
+ }
38
+
39
+ .activity-controls .btn-sm:hover {
40
+ transform: translateY(-1px);
41
+ box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
42
+ }
43
+
44
+ .activity-controls select {
45
+ padding: 6px 10px;
46
+ border: 1px solid #e2e8f0;
47
+ border-radius: 4px;
48
+ font-size: 12px;
49
+ background: white;
50
+ }
51
+
52
+ .activity-controls input {
53
+ padding: 6px 12px;
54
+ border: 1px solid #e2e8f0;
55
+ border-radius: 4px;
56
+ font-size: 12px;
57
+ width: 200px;
58
+ }
59
+
60
+ .activity-stats {
61
+ display: flex;
62
+ gap: 20px;
63
+ }
64
+
65
+ .stat-item {
66
+ display: flex;
67
+ align-items: center;
68
+ gap: 5px;
69
+ }
70
+
71
+ .stat-label {
72
+ font-size: 12px;
73
+ color: #718096;
74
+ font-weight: 600;
75
+ }
76
+
77
+ .stat-value {
78
+ font-size: 14px;
79
+ font-weight: bold;
80
+ color: #2d3748;
81
+ }
82
+
83
+ /* Tree Container */
84
+ .activity-tree-container {
85
+ flex: 1;
86
+ background: white;
87
+ border-radius: 8px;
88
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
89
+ position: relative;
90
+ overflow: hidden;
91
+ min-height: 400px;
92
+ }
93
+
94
+ #activity-tree {
95
+ width: 100%;
96
+ height: 100%;
97
+ min-height: 400px;
98
+ }
99
+
100
+ /* Ensure SVG fills container */
101
+ #activity-tree svg {
102
+ display: block;
103
+ width: 100%;
104
+ height: 100%;
105
+ }
106
+
107
+ /* Tree Legend */
108
+ .tree-legend {
109
+ position: absolute;
110
+ top: 15px;
111
+ right: 15px;
112
+ background: rgba(255, 255, 255, 0.95);
113
+ border: 1px solid #e2e8f0;
114
+ border-radius: 6px;
115
+ padding: 10px;
116
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
117
+ }
118
+
119
+ .legend-item {
120
+ display: flex;
121
+ align-items: center;
122
+ gap: 8px;
123
+ margin-bottom: 5px;
124
+ font-size: 12px;
125
+ color: #4a5568;
126
+ }
127
+
128
+ .legend-item:last-child {
129
+ margin-bottom: 0;
130
+ }
131
+
132
+ .legend-icon {
133
+ width: 14px;
134
+ height: 14px;
135
+ display: inline-block;
136
+ text-align: center;
137
+ }
138
+
139
+ .legend-icon.pm {
140
+ color: #4A90E2;
141
+ }
142
+
143
+ .legend-icon.todowrite {
144
+ color: #9B59B6;
145
+ }
146
+
147
+ .legend-icon.agent {
148
+ color: #27AE60;
149
+ }
150
+
151
+ .legend-icon.tool {
152
+ color: #E67E22;
153
+ }
154
+
155
+ .legend-icon.file {
156
+ color: #95A5A6;
157
+ }
158
+
159
+ /* Breadcrumb */
160
+ .activity-breadcrumb {
161
+ padding: 10px 15px;
162
+ background: #f8f9fa;
163
+ border-radius: 6px;
164
+ margin-top: 15px;
165
+ font-size: 13px;
166
+ color: #4a5568;
167
+ font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
168
+ }
169
+
170
+ /* D3 Tree Styles */
171
+ .node {
172
+ cursor: pointer;
173
+ }
174
+
175
+ .node circle,
176
+ .node-circle {
177
+ stroke-width: 2px;
178
+ transition: all 0.3s;
179
+ }
180
+
181
+ .node rect {
182
+ stroke-width: 2px;
183
+ transition: all 0.3s;
184
+ }
185
+
186
+ .node.pm circle {
187
+ fill: #4A90E2;
188
+ stroke: #2E6BC0;
189
+ }
190
+
191
+ .node.todowrite rect {
192
+ fill: #9B59B6;
193
+ stroke: #7E3E93;
194
+ rx: 4;
195
+ }
196
+
197
+ .node.agent circle {
198
+ fill: #27AE60;
199
+ stroke: #1A8847;
200
+ }
201
+
202
+ .node.tool circle {
203
+ fill: #E67E22;
204
+ stroke: #C35D0B;
205
+ }
206
+
207
+ .node.file circle,
208
+ .node.command circle {
209
+ fill: #95A5A6;
210
+ stroke: #728384;
211
+ r: 5;
212
+ }
213
+
214
+ /* Collapsed node indicator */
215
+ .node.collapsed circle {
216
+ fill: white !important;
217
+ stroke-width: 3px;
218
+ }
219
+
220
+ .node.collapsed rect {
221
+ fill: white !important;
222
+ stroke-width: 3px;
223
+ }
224
+
225
+ /* Active/In-progress animation */
226
+ @keyframes pulse {
227
+ 0% {
228
+ opacity: 1;
229
+ transform: scale(1);
230
+ }
231
+ 50% {
232
+ opacity: 0.7;
233
+ transform: scale(1.1);
234
+ }
235
+ 100% {
236
+ opacity: 1;
237
+ transform: scale(1);
238
+ }
239
+ }
240
+
241
+ .node.active circle,
242
+ .node.active rect {
243
+ animation: pulse 2s infinite;
244
+ }
245
+
246
+ .node.in-progress circle,
247
+ .node.in-progress rect {
248
+ animation: pulse 1.5s infinite;
249
+ stroke: #F39C12;
250
+ stroke-width: 3px;
251
+ }
252
+
253
+ /* Failed/Error state */
254
+ .node.failed circle,
255
+ .node.failed rect {
256
+ stroke: #E74C3C !important;
257
+ stroke-width: 3px;
258
+ fill: #FFE5E5 !important;
259
+ }
260
+
261
+ /* Node type specific circle colors */
262
+ .node-circle.pm {
263
+ fill: #4A90E2;
264
+ stroke: #2E6BC0;
265
+ }
266
+
267
+ .node-circle.todowrite {
268
+ fill: #9B59B6;
269
+ stroke: #7E3E93;
270
+ }
271
+
272
+ .node-circle.agent {
273
+ fill: #27AE60;
274
+ stroke: #1A8847;
275
+ }
276
+
277
+ .node-circle.tool {
278
+ fill: #E67E22;
279
+ stroke: #C35D0B;
280
+ }
281
+
282
+ .node-circle.file,
283
+ .node-circle.command,
284
+ .node-circle.url {
285
+ fill: #95A5A6;
286
+ stroke: #728384;
287
+ }
288
+
289
+ /* Pulsing animation for in-progress nodes */
290
+ .node-circle.pulsing {
291
+ animation: pulse 1.5s infinite;
292
+ }
293
+
294
+ /* Failed state */
295
+ .node-circle.failed {
296
+ stroke: #E74C3C !important;
297
+ stroke-width: 3px;
298
+ fill: #FFE5E5 !important;
299
+ }
300
+
301
+ /* Node text */
302
+ .node text {
303
+ font: 12px 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
304
+ pointer-events: none;
305
+ user-select: none;
306
+ }
307
+
308
+ /* Node icons and labels */
309
+ .node-icon {
310
+ font-size: 14px;
311
+ pointer-events: none;
312
+ }
313
+
314
+ .node-label {
315
+ fill: #2d3748;
316
+ font-size: 12px;
317
+ }
318
+
319
+ .node.pm text {
320
+ font-weight: bold;
321
+ font-size: 14px;
322
+ }
323
+
324
+ .node.todowrite text {
325
+ font-size: 11px;
326
+ }
327
+
328
+ /* Node hover effects */
329
+ .node:hover circle,
330
+ .node:hover rect {
331
+ stroke-width: 3px;
332
+ filter: brightness(1.1);
333
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
334
+ }
335
+
336
+ /* Links */
337
+ .link {
338
+ fill: none;
339
+ stroke: #cbd5e0;
340
+ stroke-width: 1.5px;
341
+ stroke-dasharray: none;
342
+ }
343
+
344
+ .link.delegation {
345
+ stroke: #9B59B6;
346
+ stroke-width: 2px;
347
+ stroke-dasharray: 5, 3;
348
+ }
349
+
350
+ /* Tooltip */
351
+ .activity-tooltip {
352
+ position: absolute;
353
+ text-align: left;
354
+ padding: 10px;
355
+ font-size: 12px;
356
+ background: rgba(0, 0, 0, 0.9);
357
+ color: white;
358
+ border-radius: 6px;
359
+ pointer-events: none;
360
+ max-width: 300px;
361
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
362
+ z-index: 1000;
363
+ }
364
+
365
+ .activity-tooltip .tooltip-title {
366
+ font-weight: bold;
367
+ margin-bottom: 5px;
368
+ padding-bottom: 5px;
369
+ border-bottom: 1px solid rgba(255, 255, 255, 0.2);
370
+ }
371
+
372
+ .activity-tooltip .tooltip-item {
373
+ margin: 3px 0;
374
+ }
375
+
376
+ .activity-tooltip .tooltip-label {
377
+ color: #9ca3af;
378
+ margin-right: 5px;
379
+ }
380
+
381
+ .activity-tooltip .tooltip-value {
382
+ color: #f3f4f6;
383
+ }
384
+
385
+ /* Count badges */
386
+ .node-count {
387
+ fill: #E74C3C;
388
+ font-size: 10px;
389
+ font-weight: bold;
390
+ text-anchor: middle;
391
+ }
392
+
393
+ .node-badge {
394
+ fill: #E74C3C;
395
+ stroke: white;
396
+ stroke-width: 2px;
397
+ }
398
+
399
+ /* Search highlighting */
400
+ .node.search-match circle,
401
+ .node.search-match rect {
402
+ stroke: #F39C12 !important;
403
+ stroke-width: 4px !important;
404
+ filter: drop-shadow(0 0 8px rgba(243, 156, 18, 0.6));
405
+ }
406
+
407
+ /* Zoom controls */
408
+ .zoom-controls {
409
+ position: absolute;
410
+ bottom: 15px;
411
+ right: 15px;
412
+ display: flex;
413
+ flex-direction: column;
414
+ gap: 5px;
415
+ }
416
+
417
+ .zoom-btn {
418
+ width: 36px;
419
+ height: 36px;
420
+ background: white;
421
+ border: 1px solid #e2e8f0;
422
+ border-radius: 6px;
423
+ cursor: pointer;
424
+ display: flex;
425
+ align-items: center;
426
+ justify-content: center;
427
+ font-size: 18px;
428
+ transition: all 0.2s;
429
+ }
430
+
431
+ .zoom-btn:hover {
432
+ background: #f8f9fa;
433
+ transform: scale(1.1);
434
+ }
435
+
436
+ /* Expand/Collapse indicators */
437
+ .expand-indicator {
438
+ fill: #718096;
439
+ font-size: 14px;
440
+ font-weight: bold;
441
+ text-anchor: middle;
442
+ pointer-events: none;
443
+ }
444
+
445
+ /* Performance optimization for large trees */
446
+ .node.hidden {
447
+ display: none;
448
+ }
449
+
450
+ .link.hidden {
451
+ display: none;
452
+ }
453
+
454
+ /* Tree grid background (optional) */
455
+ .tree-grid {
456
+ stroke: #f0f0f0;
457
+ stroke-width: 0.5px;
458
+ fill: none;
459
+ }
460
+
461
+ /* Time indicators */
462
+ .node-time {
463
+ fill: #718096;
464
+ font-size: 10px;
465
+ font-style: italic;
466
+ }
467
+
468
+ /* Status indicators */
469
+ .status-indicator {
470
+ stroke-width: 0;
471
+ }
472
+
473
+ .status-indicator.pending {
474
+ fill: #CBD5E0;
475
+ }
476
+
477
+ .status-indicator.in-progress {
478
+ fill: #F39C12;
479
+ }
480
+
481
+ .status-indicator.completed {
482
+ fill: #27AE60;
483
+ }
484
+
485
+ .status-indicator.failed {
486
+ fill: #E74C3C;
487
+ }
488
+
489
+ /* Responsive adjustments */
490
+ @media (max-width: 1024px) {
491
+ .activity-header {
492
+ flex-direction: column;
493
+ gap: 15px;
494
+ }
495
+
496
+ .activity-controls {
497
+ width: 100%;
498
+ flex-wrap: wrap;
499
+ }
500
+
501
+ .tree-legend {
502
+ top: auto;
503
+ bottom: 15px;
504
+ right: 15px;
505
+ }
506
+ }
507
+
508
+ /* Dark mode support */
509
+ @media (prefers-color-scheme: dark) {
510
+ .activity-tree-container {
511
+ background: #1a202c;
512
+ }
513
+
514
+ .activity-header {
515
+ background: #2d3748;
516
+ }
517
+
518
+ .activity-controls select,
519
+ .activity-controls input {
520
+ background: #2d3748;
521
+ color: #e2e8f0;
522
+ border-color: #4a5568;
523
+ }
524
+
525
+ .stat-label {
526
+ color: #a0aec0;
527
+ }
528
+
529
+ .stat-value {
530
+ color: #e2e8f0;
531
+ }
532
+
533
+ .tree-legend {
534
+ background: rgba(45, 55, 72, 0.95);
535
+ border-color: #4a5568;
536
+ }
537
+
538
+ .legend-item {
539
+ color: #e2e8f0;
540
+ }
541
+
542
+ .node text {
543
+ fill: #e2e8f0;
544
+ }
545
+
546
+ .link {
547
+ stroke: #4a5568;
548
+ }
549
+ }