claude-mpm 3.4.10__py3-none-any.whl → 3.4.14__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 (29) hide show
  1. claude_mpm/cli/commands/run.py +10 -10
  2. claude_mpm/dashboard/index.html +13 -0
  3. claude_mpm/dashboard/static/css/dashboard.css +2722 -0
  4. claude_mpm/dashboard/static/js/components/agent-inference.js +619 -0
  5. claude_mpm/dashboard/static/js/components/event-processor.js +641 -0
  6. claude_mpm/dashboard/static/js/components/event-viewer.js +914 -0
  7. claude_mpm/dashboard/static/js/components/export-manager.js +362 -0
  8. claude_mpm/dashboard/static/js/components/file-tool-tracker.js +611 -0
  9. claude_mpm/dashboard/static/js/components/hud-library-loader.js +211 -0
  10. claude_mpm/dashboard/static/js/components/hud-manager.js +671 -0
  11. claude_mpm/dashboard/static/js/components/hud-visualizer.js +1718 -0
  12. claude_mpm/dashboard/static/js/components/module-viewer.js +2701 -0
  13. claude_mpm/dashboard/static/js/components/session-manager.js +520 -0
  14. claude_mpm/dashboard/static/js/components/socket-manager.js +343 -0
  15. claude_mpm/dashboard/static/js/components/ui-state-manager.js +427 -0
  16. claude_mpm/dashboard/static/js/components/working-directory.js +866 -0
  17. claude_mpm/dashboard/static/js/dashboard-original.js +4134 -0
  18. claude_mpm/dashboard/static/js/dashboard.js +1978 -0
  19. claude_mpm/dashboard/static/js/socket-client.js +537 -0
  20. claude_mpm/dashboard/templates/index.html +346 -0
  21. claude_mpm/dashboard/test_dashboard.html +372 -0
  22. claude_mpm/scripts/socketio_daemon.py +51 -6
  23. claude_mpm/services/socketio_server.py +41 -5
  24. {claude_mpm-3.4.10.dist-info → claude_mpm-3.4.14.dist-info}/METADATA +2 -1
  25. {claude_mpm-3.4.10.dist-info → claude_mpm-3.4.14.dist-info}/RECORD +29 -9
  26. {claude_mpm-3.4.10.dist-info → claude_mpm-3.4.14.dist-info}/WHEEL +0 -0
  27. {claude_mpm-3.4.10.dist-info → claude_mpm-3.4.14.dist-info}/entry_points.txt +0 -0
  28. {claude_mpm-3.4.10.dist-info → claude_mpm-3.4.14.dist-info}/licenses/LICENSE +0 -0
  29. {claude_mpm-3.4.10.dist-info → claude_mpm-3.4.14.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,211 @@
1
+ /**
2
+ * HUD Library Loader
3
+ * Handles lazy loading of Cytoscape.js and its dependencies with proper loading order
4
+ */
5
+
6
+ class HUDLibraryLoader {
7
+ constructor() {
8
+ this.loadedLibraries = new Set();
9
+ this.loadingPromises = new Map();
10
+ this.loadingCallbacks = new Map();
11
+
12
+ // Define library configurations with proper loading order
13
+ this.libraries = [
14
+ {
15
+ name: 'cytoscape',
16
+ url: 'https://unpkg.com/cytoscape@3.26.0/dist/cytoscape.min.js',
17
+ globalCheck: () => typeof window.cytoscape !== 'undefined',
18
+ dependencies: []
19
+ },
20
+ {
21
+ name: 'dagre',
22
+ url: 'https://unpkg.com/dagre@0.8.5/dist/dagre.min.js',
23
+ globalCheck: () => typeof window.dagre !== 'undefined',
24
+ dependencies: []
25
+ },
26
+ {
27
+ name: 'cytoscape-dagre',
28
+ url: 'https://unpkg.com/cytoscape-dagre@2.5.0/cytoscape-dagre.js',
29
+ globalCheck: () => typeof window.cytoscapeDagre !== 'undefined',
30
+ dependencies: ['cytoscape', 'dagre']
31
+ }
32
+ ];
33
+ }
34
+
35
+ /**
36
+ * Load a single library via script tag
37
+ * @param {Object} library - Library configuration object
38
+ * @returns {Promise} - Promise that resolves when library is loaded
39
+ */
40
+ loadLibrary(library) {
41
+ // Check if already loaded
42
+ if (library.globalCheck()) {
43
+ this.loadedLibraries.add(library.name);
44
+ return Promise.resolve();
45
+ }
46
+
47
+ // Check if already loading
48
+ if (this.loadingPromises.has(library.name)) {
49
+ return this.loadingPromises.get(library.name);
50
+ }
51
+
52
+ console.log(`Loading library: ${library.name} from ${library.url}`);
53
+
54
+ const promise = new Promise((resolve, reject) => {
55
+ const script = document.createElement('script');
56
+ script.src = library.url;
57
+ script.async = true;
58
+
59
+ script.onload = () => {
60
+ if (library.globalCheck()) {
61
+ console.log(`Successfully loaded library: ${library.name}`);
62
+ this.loadedLibraries.add(library.name);
63
+ this.loadingPromises.delete(library.name);
64
+ resolve();
65
+ } else {
66
+ const error = new Error(`Library ${library.name} failed global check after loading`);
67
+ console.error(error);
68
+ this.loadingPromises.delete(library.name);
69
+ reject(error);
70
+ }
71
+ };
72
+
73
+ script.onerror = () => {
74
+ const error = new Error(`Failed to load library: ${library.name} from ${library.url}`);
75
+ console.error(error);
76
+ this.loadingPromises.delete(library.name);
77
+ reject(error);
78
+ };
79
+
80
+ document.head.appendChild(script);
81
+ });
82
+
83
+ this.loadingPromises.set(library.name, promise);
84
+ return promise;
85
+ }
86
+
87
+ /**
88
+ * Load dependencies for a library
89
+ * @param {Array} dependencies - Array of dependency names
90
+ * @returns {Promise} - Promise that resolves when all dependencies are loaded
91
+ */
92
+ async loadDependencies(dependencies) {
93
+ const dependencyPromises = dependencies.map(depName => {
94
+ const depLibrary = this.libraries.find(lib => lib.name === depName);
95
+ if (!depLibrary) {
96
+ throw new Error(`Dependency ${depName} not found in library configuration`);
97
+ }
98
+ return this.loadLibraryWithDependencies(depLibrary);
99
+ });
100
+
101
+ return Promise.all(dependencyPromises);
102
+ }
103
+
104
+ /**
105
+ * Load a library and all its dependencies
106
+ * @param {Object} library - Library configuration object
107
+ * @returns {Promise} - Promise that resolves when library and dependencies are loaded
108
+ */
109
+ async loadLibraryWithDependencies(library) {
110
+ // Load dependencies first
111
+ if (library.dependencies.length > 0) {
112
+ await this.loadDependencies(library.dependencies);
113
+ }
114
+
115
+ // Then load the library itself
116
+ return this.loadLibrary(library);
117
+ }
118
+
119
+ /**
120
+ * Load all HUD visualization libraries in correct order
121
+ * @param {Function} onProgress - Optional progress callback
122
+ * @returns {Promise} - Promise that resolves when all libraries are loaded
123
+ */
124
+ async loadHUDLibraries(onProgress = null) {
125
+ console.log('Starting HUD libraries loading...');
126
+
127
+ try {
128
+ // Load libraries in dependency order
129
+ for (let i = 0; i < this.libraries.length; i++) {
130
+ const library = this.libraries[i];
131
+
132
+ if (onProgress) {
133
+ onProgress({
134
+ library: library.name,
135
+ current: i + 1,
136
+ total: this.libraries.length,
137
+ message: `Loading ${library.name}...`
138
+ });
139
+ }
140
+
141
+ await this.loadLibraryWithDependencies(library);
142
+ }
143
+
144
+ // Verify all libraries are loaded
145
+ const missingLibraries = this.libraries.filter(lib => !lib.globalCheck());
146
+ if (missingLibraries.length > 0) {
147
+ throw new Error(`Failed to load libraries: ${missingLibraries.map(lib => lib.name).join(', ')}`);
148
+ }
149
+
150
+ console.log('All HUD libraries loaded successfully');
151
+
152
+ if (onProgress) {
153
+ onProgress({
154
+ library: 'complete',
155
+ current: this.libraries.length,
156
+ total: this.libraries.length,
157
+ message: 'All libraries loaded successfully'
158
+ });
159
+ }
160
+
161
+ return true;
162
+ } catch (error) {
163
+ console.error('Failed to load HUD libraries:', error);
164
+
165
+ if (onProgress) {
166
+ onProgress({
167
+ library: 'error',
168
+ current: 0,
169
+ total: this.libraries.length,
170
+ message: `Error: ${error.message}`,
171
+ error: error
172
+ });
173
+ }
174
+
175
+ throw error;
176
+ }
177
+ }
178
+
179
+ /**
180
+ * Check if all HUD libraries are loaded
181
+ * @returns {boolean} - True if all libraries are loaded
182
+ */
183
+ areLibrariesLoaded() {
184
+ return this.libraries.every(lib => lib.globalCheck());
185
+ }
186
+
187
+ /**
188
+ * Get loading status for all libraries
189
+ * @returns {Object} - Status object with library loading states
190
+ */
191
+ getLoadingStatus() {
192
+ return {
193
+ loaded: Array.from(this.loadedLibraries),
194
+ loading: Array.from(this.loadingPromises.keys()),
195
+ total: this.libraries.length,
196
+ allLoaded: this.areLibrariesLoaded()
197
+ };
198
+ }
199
+
200
+ /**
201
+ * Reset loader state (for testing purposes)
202
+ */
203
+ reset() {
204
+ this.loadedLibraries.clear();
205
+ this.loadingPromises.clear();
206
+ this.loadingCallbacks.clear();
207
+ }
208
+ }
209
+
210
+ // Create singleton instance
211
+ window.HUDLibraryLoader = new HUDLibraryLoader();