claude-mpm 4.2.44__py3-none-any.whl → 4.3.0__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.
- claude_mpm/VERSION +1 -1
- claude_mpm/agents/BASE_PM.md +77 -405
- claude_mpm/agents/{INSTRUCTIONS.md → INSTRUCTIONS_OLD_DEPRECATED.md} +75 -1
- claude_mpm/agents/OUTPUT_STYLE.md +0 -39
- claude_mpm/agents/PM_INSTRUCTIONS.md +122 -0
- claude_mpm/agents/WORKFLOW.md +74 -323
- claude_mpm/agents/frontmatter_validator.py +20 -12
- claude_mpm/agents/templates/nextjs_engineer.json +277 -0
- claude_mpm/agents/templates/prompt-engineer.json +294 -0
- claude_mpm/agents/templates/python_engineer.json +289 -0
- claude_mpm/agents/templates/react_engineer.json +11 -3
- claude_mpm/agents/templates/security.json +50 -9
- claude_mpm/cli/commands/agents.py +2 -2
- claude_mpm/cli/commands/uninstall.py +1 -3
- claude_mpm/cli/interactive/agent_wizard.py +3 -3
- claude_mpm/cli/parsers/agent_manager_parser.py +3 -3
- claude_mpm/cli/parsers/agents_parser.py +1 -1
- claude_mpm/constants.py +1 -1
- claude_mpm/core/error_handler.py +2 -4
- claude_mpm/core/file_utils.py +4 -12
- claude_mpm/core/framework_loader.py +72 -24
- claude_mpm/core/log_manager.py +60 -5
- claude_mpm/core/logger.py +1 -1
- claude_mpm/core/logging_utils.py +36 -18
- claude_mpm/core/unified_agent_registry.py +18 -4
- claude_mpm/dashboard/react/components/DataInspector/DataInspector.module.css +188 -0
- claude_mpm/dashboard/react/components/EventViewer/EventViewer.module.css +156 -0
- claude_mpm/dashboard/react/components/shared/ConnectionStatus.module.css +38 -0
- claude_mpm/dashboard/react/components/shared/FilterBar.module.css +92 -0
- claude_mpm/dashboard/static/archive/activity_dashboard_fixed.html +248 -0
- claude_mpm/dashboard/static/archive/activity_dashboard_test.html +61 -0
- claude_mpm/dashboard/static/archive/test_activity_connection.html +179 -0
- claude_mpm/dashboard/static/archive/test_claude_tree_tab.html +68 -0
- claude_mpm/dashboard/static/archive/test_dashboard.html +409 -0
- claude_mpm/dashboard/static/archive/test_dashboard_fixed.html +519 -0
- claude_mpm/dashboard/static/archive/test_dashboard_verification.html +181 -0
- claude_mpm/dashboard/static/archive/test_file_data.html +315 -0
- claude_mpm/dashboard/static/archive/test_file_tree_empty_state.html +243 -0
- claude_mpm/dashboard/static/archive/test_file_tree_fix.html +234 -0
- claude_mpm/dashboard/static/archive/test_file_tree_rename.html +117 -0
- claude_mpm/dashboard/static/archive/test_file_tree_tab.html +115 -0
- claude_mpm/dashboard/static/archive/test_file_viewer.html +224 -0
- claude_mpm/dashboard/static/archive/test_final_activity.html +220 -0
- claude_mpm/dashboard/static/archive/test_tab_fix.html +139 -0
- claude_mpm/dashboard/static/built/assets/events.DjpNxWNo.css +1 -0
- claude_mpm/dashboard/static/built/components/activity-tree.js +1 -1
- claude_mpm/dashboard/static/built/components/agent-hierarchy.js +777 -0
- claude_mpm/dashboard/static/built/components/agent-inference.js +1 -1
- claude_mpm/dashboard/static/built/components/build-tracker.js +333 -0
- claude_mpm/dashboard/static/built/components/code-simple.js +857 -0
- claude_mpm/dashboard/static/built/components/code-tree/tree-breadcrumb.js +353 -0
- claude_mpm/dashboard/static/built/components/code-tree/tree-constants.js +235 -0
- claude_mpm/dashboard/static/built/components/code-tree/tree-search.js +409 -0
- claude_mpm/dashboard/static/built/components/code-tree/tree-utils.js +435 -0
- claude_mpm/dashboard/static/built/components/code-viewer.js +2 -1076
- claude_mpm/dashboard/static/built/components/connection-debug.js +654 -0
- claude_mpm/dashboard/static/built/components/diff-viewer.js +891 -0
- claude_mpm/dashboard/static/built/components/event-processor.js +1 -1
- claude_mpm/dashboard/static/built/components/event-viewer.js +1 -1
- claude_mpm/dashboard/static/built/components/export-manager.js +1 -1
- claude_mpm/dashboard/static/built/components/file-change-tracker.js +443 -0
- claude_mpm/dashboard/static/built/components/file-change-viewer.js +690 -0
- claude_mpm/dashboard/static/built/components/file-tool-tracker.js +1 -1
- claude_mpm/dashboard/static/built/components/module-viewer.js +1 -1
- claude_mpm/dashboard/static/built/components/nav-bar.js +145 -0
- claude_mpm/dashboard/static/built/components/page-structure.js +429 -0
- claude_mpm/dashboard/static/built/components/session-manager.js +1 -1
- claude_mpm/dashboard/static/built/components/ui-state-manager.js +2 -465
- claude_mpm/dashboard/static/built/components/working-directory.js +1 -1
- claude_mpm/dashboard/static/built/connection-manager.js +536 -0
- claude_mpm/dashboard/static/built/dashboard.js +1 -1
- claude_mpm/dashboard/static/built/extension-error-handler.js +164 -0
- claude_mpm/dashboard/static/built/react/events.js +30 -0
- claude_mpm/dashboard/static/built/shared/dom-helpers.js +396 -0
- claude_mpm/dashboard/static/built/shared/event-bus.js +330 -0
- claude_mpm/dashboard/static/built/shared/event-filter-service.js +540 -0
- claude_mpm/dashboard/static/built/shared/logger.js +385 -0
- claude_mpm/dashboard/static/built/shared/page-structure.js +251 -0
- claude_mpm/dashboard/static/built/shared/tooltip-service.js +253 -0
- claude_mpm/dashboard/static/built/socket-client.js +1 -1
- claude_mpm/dashboard/static/built/tab-isolation-fix.js +185 -0
- claude_mpm/dashboard/static/css/dashboard.css +28 -5
- claude_mpm/dashboard/static/dist/assets/events.DjpNxWNo.css +1 -0
- claude_mpm/dashboard/static/dist/components/activity-tree.js +1 -1
- claude_mpm/dashboard/static/dist/components/agent-inference.js +1 -1
- claude_mpm/dashboard/static/dist/components/code-viewer.js +2 -0
- claude_mpm/dashboard/static/dist/components/event-processor.js +1 -1
- claude_mpm/dashboard/static/dist/components/event-viewer.js +1 -1
- claude_mpm/dashboard/static/dist/components/export-manager.js +1 -1
- claude_mpm/dashboard/static/dist/components/file-tool-tracker.js +1 -1
- claude_mpm/dashboard/static/dist/components/module-viewer.js +1 -1
- claude_mpm/dashboard/static/dist/components/session-manager.js +1 -1
- claude_mpm/dashboard/static/dist/components/working-directory.js +1 -1
- claude_mpm/dashboard/static/dist/dashboard.js +1 -1
- claude_mpm/dashboard/static/dist/react/events.js +30 -0
- claude_mpm/dashboard/static/dist/socket-client.js +1 -1
- claude_mpm/dashboard/static/events.html +607 -0
- claude_mpm/dashboard/static/index.html +713 -0
- claude_mpm/dashboard/static/js/components/activity-tree.js +3 -17
- claude_mpm/dashboard/static/js/components/agent-hierarchy.js +4 -1
- claude_mpm/dashboard/static/js/components/agent-inference.js +3 -0
- claude_mpm/dashboard/static/js/components/build-tracker.js +8 -0
- claude_mpm/dashboard/static/js/components/code-viewer.js +306 -66
- claude_mpm/dashboard/static/js/components/event-processor.js +3 -0
- claude_mpm/dashboard/static/js/components/event-viewer.js +39 -2
- claude_mpm/dashboard/static/js/components/export-manager.js +3 -0
- claude_mpm/dashboard/static/js/components/file-tool-tracker.js +30 -10
- claude_mpm/dashboard/static/js/components/socket-manager.js +4 -0
- claude_mpm/dashboard/static/js/components/ui-state-manager.js +285 -85
- claude_mpm/dashboard/static/js/components/working-directory.js +3 -0
- claude_mpm/dashboard/static/js/dashboard.js +61 -33
- claude_mpm/dashboard/static/js/socket-client.js +12 -8
- claude_mpm/dashboard/static/js/stores/dashboard-store.js +562 -0
- claude_mpm/dashboard/static/js/tab-isolation-fix.js +185 -0
- claude_mpm/dashboard/static/legacy/activity.html +736 -0
- claude_mpm/dashboard/static/legacy/agents.html +786 -0
- claude_mpm/dashboard/static/legacy/files.html +747 -0
- claude_mpm/dashboard/static/legacy/tools.html +831 -0
- claude_mpm/dashboard/static/monitors-index.html +218 -0
- claude_mpm/dashboard/static/monitors.html +431 -0
- claude_mpm/dashboard/static/production/events.html +659 -0
- claude_mpm/dashboard/static/production/main.html +715 -0
- claude_mpm/dashboard/static/production/monitors.html +483 -0
- claude_mpm/dashboard/static/socket.io.min.js +7 -0
- claude_mpm/dashboard/static/socket.io.v4.8.1.backup.js +7 -0
- claude_mpm/dashboard/static/test-archive/dashboard.html +635 -0
- claude_mpm/dashboard/static/test-archive/debug-events.html +147 -0
- claude_mpm/dashboard/static/test-archive/test-navigation.html +256 -0
- claude_mpm/dashboard/static/test-archive/test-react-exports.html +180 -0
- claude_mpm/dashboard/templates/index.html +79 -9
- claude_mpm/hooks/claude_hooks/services/connection_manager_http.py +1 -1
- claude_mpm/services/agents/deployment/agent_discovery_service.py +3 -0
- claude_mpm/services/agents/deployment/agent_template_builder.py +285 -26
- claude_mpm/services/agents/deployment/agent_validator.py +3 -0
- claude_mpm/services/agents/deployment/validation/template_validator.py +13 -4
- claude_mpm/services/agents/local_template_manager.py +2 -7
- claude_mpm/services/monitor/daemon.py +1 -2
- claude_mpm/services/monitor/daemon_manager.py +2 -7
- claude_mpm/services/monitor/event_emitter.py +6 -2
- claude_mpm/services/monitor/handlers/code_analysis.py +4 -6
- claude_mpm/services/monitor/handlers/hooks.py +2 -6
- claude_mpm/services/monitor/server.py +27 -4
- claude_mpm/tools/code_tree_analyzer.py +2 -4
- claude_mpm/utils/log_cleanup.py +612 -0
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/METADATA +1 -1
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/RECORD +151 -83
- claude_mpm/dashboard/static/test-browser-monitor.html +0 -470
- claude_mpm/dashboard/static/test-simple.html +0 -97
- /claude_mpm/dashboard/static/{test_debug.html → test-archive/test_debug.html} +0 -0
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/WHEEL +0 -0
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/entry_points.txt +0 -0
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/licenses/LICENSE +0 -0
- {claude_mpm-4.2.44.dist-info → claude_mpm-4.3.0.dist-info}/top_level.txt +0 -0
|
@@ -115,7 +115,7 @@ class AsyncEventEmitter:
|
|
|
115
115
|
event: str,
|
|
116
116
|
data: Dict[str, Any],
|
|
117
117
|
force_http: bool = False,
|
|
118
|
-
endpoint: str = None,
|
|
118
|
+
endpoint: Optional[str] = None,
|
|
119
119
|
) -> bool:
|
|
120
120
|
"""
|
|
121
121
|
Emit event with optimal routing (direct calls vs HTTP).
|
|
@@ -186,7 +186,11 @@ class AsyncEventEmitter:
|
|
|
186
186
|
return False
|
|
187
187
|
|
|
188
188
|
async def _emit_http(
|
|
189
|
-
self,
|
|
189
|
+
self,
|
|
190
|
+
namespace: str,
|
|
191
|
+
event: str,
|
|
192
|
+
data: Dict[str, Any],
|
|
193
|
+
endpoint: Optional[str] = None,
|
|
190
194
|
) -> bool:
|
|
191
195
|
"""Emit event via HTTP with connection pooling."""
|
|
192
196
|
if not self._http_session:
|
|
@@ -248,14 +248,14 @@ class CodeAnalysisHandler:
|
|
|
248
248
|
self.logger.info("All analysis cache cleared")
|
|
249
249
|
elif cache_type == "file":
|
|
250
250
|
keys_to_remove = [
|
|
251
|
-
k for k in self.analysis_cache
|
|
251
|
+
k for k in self.analysis_cache if k.startswith("file:")
|
|
252
252
|
]
|
|
253
253
|
for key in keys_to_remove:
|
|
254
254
|
del self.analysis_cache[key]
|
|
255
255
|
self.logger.info("File analysis cache cleared")
|
|
256
256
|
elif cache_type == "directory":
|
|
257
257
|
keys_to_remove = [
|
|
258
|
-
k for k in self.analysis_cache
|
|
258
|
+
k for k in self.analysis_cache if k.startswith("dir:")
|
|
259
259
|
]
|
|
260
260
|
for key in keys_to_remove:
|
|
261
261
|
del self.analysis_cache[key]
|
|
@@ -281,10 +281,9 @@ class CodeAnalysisHandler:
|
|
|
281
281
|
try:
|
|
282
282
|
# Run analysis in thread pool to avoid blocking
|
|
283
283
|
loop = asyncio.get_event_loop()
|
|
284
|
-
|
|
284
|
+
return await loop.run_in_executor(
|
|
285
285
|
None, self.analyzer.analyze_file, file_path
|
|
286
286
|
)
|
|
287
|
-
return result
|
|
288
287
|
|
|
289
288
|
except Exception as e:
|
|
290
289
|
self.logger.error(f"Error in async file analysis: {e}")
|
|
@@ -305,10 +304,9 @@ class CodeAnalysisHandler:
|
|
|
305
304
|
try:
|
|
306
305
|
# Run tree building in thread pool
|
|
307
306
|
loop = asyncio.get_event_loop()
|
|
308
|
-
|
|
307
|
+
return await loop.run_in_executor(
|
|
309
308
|
None, self.builder.build_tree, dir_path, max_depth
|
|
310
309
|
)
|
|
311
|
-
return result
|
|
312
310
|
|
|
313
311
|
except Exception as e:
|
|
314
312
|
self.logger.error(f"Error in async directory tree building: {e}")
|
|
@@ -416,7 +416,7 @@ class HookHandler:
|
|
|
416
416
|
Returns:
|
|
417
417
|
Processed event data
|
|
418
418
|
"""
|
|
419
|
-
|
|
419
|
+
return {
|
|
420
420
|
"type": data.get("type", "hook"),
|
|
421
421
|
"subtype": data.get("subtype", "unknown"),
|
|
422
422
|
"timestamp": data.get("timestamp", asyncio.get_event_loop().time()),
|
|
@@ -428,8 +428,6 @@ class HookHandler:
|
|
|
428
428
|
"original_event": data, # Keep original for debugging
|
|
429
429
|
}
|
|
430
430
|
|
|
431
|
-
return processed
|
|
432
|
-
|
|
433
431
|
def _process_hook_event(self, data: Dict) -> Dict:
|
|
434
432
|
"""Process and normalize hook event data.
|
|
435
433
|
|
|
@@ -439,7 +437,7 @@ class HookHandler:
|
|
|
439
437
|
Returns:
|
|
440
438
|
Processed event data
|
|
441
439
|
"""
|
|
442
|
-
|
|
440
|
+
return {
|
|
443
441
|
"type": data.get("type"),
|
|
444
442
|
"timestamp": data.get("timestamp"),
|
|
445
443
|
"session_id": data.get("session_id"),
|
|
@@ -448,8 +446,6 @@ class HookHandler:
|
|
|
448
446
|
"processed_at": asyncio.get_event_loop().time(),
|
|
449
447
|
}
|
|
450
448
|
|
|
451
|
-
return processed
|
|
452
|
-
|
|
453
449
|
def _update_session_tracking(self, session_id: str, event: Dict):
|
|
454
450
|
"""Update session tracking with new event.
|
|
455
451
|
|
|
@@ -15,6 +15,7 @@ DESIGN DECISIONS:
|
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
import asyncio
|
|
18
|
+
import contextlib
|
|
18
19
|
import os
|
|
19
20
|
import threading
|
|
20
21
|
import time
|
|
@@ -348,7 +349,7 @@ class UnifiedMonitorServer:
|
|
|
348
349
|
data = await request.json()
|
|
349
350
|
|
|
350
351
|
# Extract event data
|
|
351
|
-
|
|
352
|
+
data.get("namespace", "hook")
|
|
352
353
|
event = data.get("event", "claude_event")
|
|
353
354
|
event_data = data.get("data", {})
|
|
354
355
|
|
|
@@ -508,6 +509,19 @@ class UnifiedMonitorServer:
|
|
|
508
509
|
{"working_directory": os.getcwd(), "success": True}
|
|
509
510
|
)
|
|
510
511
|
|
|
512
|
+
# Monitor page routes
|
|
513
|
+
async def monitor_page_handler(request):
|
|
514
|
+
"""Serve monitor HTML pages."""
|
|
515
|
+
page_name = request.match_info.get("page", "agents")
|
|
516
|
+
static_dir = dashboard_dir / "static"
|
|
517
|
+
file_path = static_dir / f"{page_name}.html"
|
|
518
|
+
|
|
519
|
+
if file_path.exists() and file_path.is_file():
|
|
520
|
+
with open(file_path, encoding="utf-8") as f:
|
|
521
|
+
content = f.read()
|
|
522
|
+
return web.Response(text=content, content_type="text/html")
|
|
523
|
+
return web.Response(text="Page not found", status=404)
|
|
524
|
+
|
|
511
525
|
# Register routes
|
|
512
526
|
self.app.router.add_get("/", dashboard_index)
|
|
513
527
|
self.app.router.add_get("/health", health_check)
|
|
@@ -518,6 +532,17 @@ class UnifiedMonitorServer:
|
|
|
518
532
|
self.app.router.add_post("/api/events", api_events_handler)
|
|
519
533
|
self.app.router.add_post("/api/file", api_file_handler)
|
|
520
534
|
|
|
535
|
+
# Monitor page routes
|
|
536
|
+
self.app.router.add_get("/monitor", lambda r: monitor_page_handler(r))
|
|
537
|
+
self.app.router.add_get(
|
|
538
|
+
"/monitor/agents", lambda r: monitor_page_handler(r)
|
|
539
|
+
)
|
|
540
|
+
self.app.router.add_get("/monitor/tools", lambda r: monitor_page_handler(r))
|
|
541
|
+
self.app.router.add_get("/monitor/files", lambda r: monitor_page_handler(r))
|
|
542
|
+
self.app.router.add_get(
|
|
543
|
+
"/monitor/events", lambda r: monitor_page_handler(r)
|
|
544
|
+
)
|
|
545
|
+
|
|
521
546
|
# Static files with cache busting headers for development
|
|
522
547
|
static_dir = dashboard_dir / "static"
|
|
523
548
|
if static_dir.exists():
|
|
@@ -666,10 +691,8 @@ class UnifiedMonitorServer:
|
|
|
666
691
|
# Cancel heartbeat task if running
|
|
667
692
|
if self.heartbeat_task and not self.heartbeat_task.done():
|
|
668
693
|
self.heartbeat_task.cancel()
|
|
669
|
-
|
|
694
|
+
with contextlib.suppress(asyncio.CancelledError):
|
|
670
695
|
await self.heartbeat_task
|
|
671
|
-
except asyncio.CancelledError:
|
|
672
|
-
pass
|
|
673
696
|
self.logger.debug("Heartbeat task cancelled")
|
|
674
697
|
|
|
675
698
|
# Close the Socket.IO server first to stop accepting new connections
|
|
@@ -1739,7 +1739,7 @@ class CodeTreeAnalyzer:
|
|
|
1739
1739
|
|
|
1740
1740
|
# Filter only very specific internal patterns
|
|
1741
1741
|
# Be more conservative - only filter obvious internal handlers
|
|
1742
|
-
if name_lower.startswith("handle_"
|
|
1742
|
+
if name_lower.startswith(("handle_", "on_")):
|
|
1743
1743
|
return True
|
|
1744
1744
|
|
|
1745
1745
|
# Filter Python magic methods except important ones
|
|
@@ -1756,9 +1756,7 @@ class CodeTreeAnalyzer:
|
|
|
1756
1756
|
return node.name not in important_magic
|
|
1757
1757
|
|
|
1758
1758
|
# Filter very generic getters/setters only if they're trivial
|
|
1759
|
-
if (name_lower.startswith("get_"
|
|
1760
|
-
node.name
|
|
1761
|
-
) <= 8:
|
|
1759
|
+
if (name_lower.startswith(("get_", "set_"))) and len(node.name) <= 8:
|
|
1762
1760
|
return True
|
|
1763
1761
|
|
|
1764
1762
|
# Don't filter single underscore functions - they're often important
|