mcp-adr-analysis-server 2.7.24 → 2.7.25

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 (38) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/src/tools/bootstrap-validation-loop-tool.d.ts +0 -178
  3. package/dist/src/tools/bootstrap-validation-loop-tool.d.ts.map +1 -1
  4. package/dist/src/tools/bootstrap-validation-loop-tool.js +0 -1580
  5. package/dist/src/tools/bootstrap-validation-loop-tool.js.map +1 -1
  6. package/package.json +1 -2
  7. package/dist/src/utils/dag-executor.d.ts +0 -106
  8. package/dist/src/utils/dag-executor.d.ts.map +0 -1
  9. package/dist/src/utils/dag-executor.js +0 -453
  10. package/dist/src/utils/dag-executor.js.map +0 -1
  11. package/dist/src/utils/deployment-task-integration.d.ts +0 -260
  12. package/dist/src/utils/deployment-task-integration.d.ts.map +0 -1
  13. package/dist/src/utils/deployment-task-integration.js +0 -393
  14. package/dist/src/utils/deployment-task-integration.js.map +0 -1
  15. package/dist/src/utils/dynamic-deployment-intelligence.d.ts +0 -117
  16. package/dist/src/utils/dynamic-deployment-intelligence.d.ts.map +0 -1
  17. package/dist/src/utils/dynamic-deployment-intelligence.js +0 -445
  18. package/dist/src/utils/dynamic-deployment-intelligence.js.map +0 -1
  19. package/dist/src/utils/pattern-contribution-helper.d.ts +0 -60
  20. package/dist/src/utils/pattern-contribution-helper.d.ts.map +0 -1
  21. package/dist/src/utils/pattern-contribution-helper.js +0 -308
  22. package/dist/src/utils/pattern-contribution-helper.js.map +0 -1
  23. package/dist/src/utils/pattern-loader.d.ts +0 -183
  24. package/dist/src/utils/pattern-loader.d.ts.map +0 -1
  25. package/dist/src/utils/pattern-loader.js +0 -198
  26. package/dist/src/utils/pattern-loader.js.map +0 -1
  27. package/dist/src/utils/pattern-to-dag-converter.d.ts +0 -62
  28. package/dist/src/utils/pattern-to-dag-converter.d.ts.map +0 -1
  29. package/dist/src/utils/pattern-to-dag-converter.js +0 -265
  30. package/dist/src/utils/pattern-to-dag-converter.js.map +0 -1
  31. package/dist/src/utils/resource-extractor.d.ts +0 -57
  32. package/dist/src/utils/resource-extractor.d.ts.map +0 -1
  33. package/dist/src/utils/resource-extractor.js +0 -323
  34. package/dist/src/utils/resource-extractor.js.map +0 -1
  35. package/dist/src/utils/system-card-manager.d.ts +0 -194
  36. package/dist/src/utils/system-card-manager.d.ts.map +0 -1
  37. package/dist/src/utils/system-card-manager.js +0 -336
  38. package/dist/src/utils/system-card-manager.js.map +0 -1
@@ -1,453 +0,0 @@
1
- /**
2
- * DAG Executor for Bootstrap Validation Loop
3
- *
4
- * Executes tasks in a Directed Acyclic Graph (DAG) with:
5
- * - Dependency resolution via topological sort
6
- * - Parallel execution within layers
7
- * - Fine-grained error handling and retry logic
8
- * - Task-level validation and timeout support
9
- */
10
- import { exec } from 'node:child_process';
11
- import { promisify } from 'util';
12
- import { EnhancedLogger } from './enhanced-logging.js';
13
- import { ResourceExtractor } from './resource-extractor.js';
14
- const execAsync = promisify(exec);
15
- /**
16
- * DAG Executor with dependency resolution and parallel execution
17
- */
18
- export class DAGExecutor {
19
- logger;
20
- maxParallelism;
21
- systemCardManager;
22
- resourceExtractor;
23
- constructor(maxParallelism = 5, systemCardManager) {
24
- this.logger = new EnhancedLogger();
25
- this.maxParallelism = maxParallelism;
26
- this.systemCardManager = systemCardManager;
27
- this.resourceExtractor = new ResourceExtractor();
28
- }
29
- /**
30
- * Execute DAG with topological sort and parallel execution
31
- */
32
- async execute(tasks) {
33
- const startTime = Date.now();
34
- this.logger.info(`🔄 Starting DAG execution with ${tasks.length} tasks`, 'DAGExecutor');
35
- // 1. Validate DAG structure
36
- this.validateDAG(tasks);
37
- // 2. Build dependency graph
38
- const graph = this.buildDependencyGraph(tasks);
39
- // 3. Topological sort to determine execution layers
40
- const sortedLayers = this.topologicalSort(graph);
41
- this.logger.info(`📊 DAG topology: ${sortedLayers.length} layers, max parallelism: ${this.maxParallelism}`, 'DAGExecutor');
42
- // 4. Execute layer by layer (parallel within layer)
43
- const results = new Map();
44
- const failedTasks = [];
45
- const skippedTasks = [];
46
- for (let layerIndex = 0; layerIndex < sortedLayers.length; layerIndex++) {
47
- const layer = sortedLayers[layerIndex];
48
- if (!layer) {
49
- continue;
50
- }
51
- this.logger.info(`🔹 Executing layer ${layerIndex + 1}/${sortedLayers.length} with ${layer.length} tasks`, 'DAGExecutor');
52
- // Execute all tasks in this layer in parallel (up to maxParallelism)
53
- const layerResults = await this.executeLayer(layer, results, tasks);
54
- for (const [taskId, result] of layerResults) {
55
- results.set(taskId, result);
56
- if (result.skipped) {
57
- skippedTasks.push(taskId);
58
- }
59
- else if (!result.success) {
60
- failedTasks.push(taskId);
61
- // Mark dependent tasks as skipped
62
- const task = tasks.find(t => t.id === taskId);
63
- if (task && !task.canFailSafely) {
64
- const dependents = this.getDependentTasks(taskId, tasks);
65
- for (const depId of dependents) {
66
- if (!results.has(depId)) {
67
- results.set(depId, {
68
- taskId: depId,
69
- success: false,
70
- stdout: '',
71
- stderr: '',
72
- duration: 0,
73
- skipped: true,
74
- skipReason: `Dependency ${taskId} failed`,
75
- });
76
- skippedTasks.push(depId);
77
- }
78
- }
79
- }
80
- }
81
- }
82
- // Stop if critical task failed
83
- const criticalTaskFailed = layer.some(task => !results.get(task.id)?.success && task.severity === 'critical');
84
- if (criticalTaskFailed) {
85
- this.logger.error('❌ Critical task failed, stopping DAG execution', 'DAGExecutor');
86
- // Mark other tasks in the same layer as skipped
87
- for (const task of layer) {
88
- const result = results.get(task.id);
89
- if (result && result.success && task.severity !== 'critical') {
90
- // Mark successful tasks in same layer as skipped when critical task fails
91
- const skippedResult = {
92
- ...result,
93
- skipped: true,
94
- skipReason: 'Critical task failed in same layer',
95
- };
96
- results.set(task.id, skippedResult);
97
- if (!skippedTasks.includes(task.id)) {
98
- skippedTasks.push(task.id);
99
- }
100
- }
101
- }
102
- // Mark remaining tasks (not yet executed) as skipped
103
- for (const task of tasks) {
104
- if (!results.has(task.id)) {
105
- results.set(task.id, {
106
- taskId: task.id,
107
- success: false,
108
- stdout: '',
109
- stderr: '',
110
- duration: 0,
111
- skipped: true,
112
- skipReason: 'Critical task failed in earlier layer',
113
- });
114
- skippedTasks.push(task.id);
115
- }
116
- }
117
- break;
118
- }
119
- }
120
- const duration = Date.now() - startTime;
121
- const executedTasks = Array.from(results.keys()).filter(id => !results.get(id)?.skipped);
122
- const success = failedTasks.length === 0;
123
- this.logger.info(`${success ? '✅' : '❌'} DAG execution ${success ? 'completed' : 'failed'}: ${executedTasks.length} executed, ${failedTasks.length} failed, ${skippedTasks.length} skipped (${duration}ms)`, 'DAGExecutor');
124
- return {
125
- success,
126
- executedTasks,
127
- failedTasks,
128
- skippedTasks,
129
- duration,
130
- taskResults: results,
131
- };
132
- }
133
- /**
134
- * Execute all tasks in a layer in parallel (with concurrency limit)
135
- */
136
- async executeLayer(layer, previousResults, allTasks) {
137
- const results = new Map();
138
- // Filter tasks whose dependencies are met
139
- const executableTasks = [];
140
- for (const task of layer) {
141
- const dependenciesMet = task.dependsOn.every(depId => {
142
- const depResult = previousResults.get(depId);
143
- if (!depResult)
144
- return false;
145
- // If dependency succeeded, it's met
146
- if (depResult.success === true)
147
- return true;
148
- // If dependency failed, check if it can fail safely
149
- const depTask = allTasks.find(t => t.id === depId);
150
- return depTask?.canFailSafely === true;
151
- });
152
- if (!dependenciesMet) {
153
- // Check if any dependency failed and wasn't safe to fail
154
- const failedDep = task.dependsOn.find(depId => {
155
- const depResult = previousResults.get(depId);
156
- if (!depResult || depResult.success)
157
- return false;
158
- // Check if this failed dependency can fail safely
159
- const depTask = allTasks.find(t => t.id === depId);
160
- return !depTask?.canFailSafely;
161
- });
162
- if (failedDep) {
163
- results.set(task.id, {
164
- taskId: task.id,
165
- success: false,
166
- stdout: '',
167
- stderr: `Dependencies not met: ${failedDep || 'unknown'}`,
168
- duration: 0,
169
- skipped: true,
170
- skipReason: `Dependency ${failedDep} failed`,
171
- });
172
- }
173
- else {
174
- // All failed dependencies can fail safely, so we can execute this task
175
- executableTasks.push(task);
176
- }
177
- }
178
- else {
179
- executableTasks.push(task);
180
- }
181
- }
182
- if (executableTasks.length === 0) {
183
- return results;
184
- }
185
- // Execute tasks with concurrency limit
186
- const taskResults = await this.executeWithConcurrencyLimit(executableTasks, this.maxParallelism);
187
- for (let i = 0; i < executableTasks.length; i++) {
188
- const task = executableTasks[i];
189
- const result = taskResults[i];
190
- if (task && result) {
191
- results.set(task.id, result);
192
- }
193
- }
194
- return results;
195
- }
196
- /**
197
- * Execute tasks with concurrency limit
198
- */
199
- async executeWithConcurrencyLimit(tasks, concurrencyLimit) {
200
- const promises = [];
201
- const executing = [];
202
- for (const task of tasks) {
203
- const promise = this.executeTask(task).then(result => {
204
- executing.splice(executing.indexOf(promise), 1);
205
- return result;
206
- });
207
- executing.push(promise);
208
- promises.push(promise);
209
- if (executing.length >= concurrencyLimit) {
210
- await Promise.race(executing);
211
- }
212
- }
213
- return Promise.all(promises);
214
- }
215
- /**
216
- * Execute a single task with retry logic
217
- */
218
- async executeTask(task) {
219
- const startTime = Date.now();
220
- this.logger.info(`▶️ Executing: ${task.name}`, 'DAGExecutor');
221
- try {
222
- if (!task.command) {
223
- throw new Error(`Task ${task.id} has no command defined`);
224
- }
225
- // Build full command
226
- const fullCommand = task.commandArgs
227
- ? `${task.command} ${task.commandArgs.join(' ')}`
228
- : task.command;
229
- // Execute command with timeout
230
- const timeout = task.timeout || 30000;
231
- const { stdout, stderr } = await this.executeCommand(fullCommand, timeout);
232
- const duration = Date.now() - startTime;
233
- // Check exit code (execAsync throws on non-zero exit)
234
- const success = true;
235
- // Run custom validation if defined
236
- let validationPassed = true;
237
- if (task.validationCheck) {
238
- validationPassed = task.validationCheck(stdout);
239
- if (!validationPassed) {
240
- this.logger.warn(`❌ Validation failed for task: ${task.name}`, 'DAGExecutor');
241
- }
242
- }
243
- const finalSuccess = success && validationPassed;
244
- if (finalSuccess) {
245
- this.logger.info(`✅ Completed: ${task.name} (${duration}ms)`, 'DAGExecutor');
246
- // Extract resources from command output and update SystemCard
247
- if (this.systemCardManager) {
248
- try {
249
- const extractionResult = this.resourceExtractor.extract(fullCommand, stdout, stderr, task.id);
250
- if (extractionResult.resources.length > 0) {
251
- await this.systemCardManager.addResources(extractionResult.resources, {
252
- phase: task.category,
253
- taskId: task.id,
254
- });
255
- this.logger.info(`📝 Tracked ${extractionResult.resources.length} resources from task: ${task.name}`, 'DAGExecutor');
256
- }
257
- if (extractionResult.warnings.length > 0) {
258
- this.logger.warn(`Resource extraction warnings: ${extractionResult.warnings.join(', ')}`, 'DAGExecutor');
259
- }
260
- }
261
- catch (error) {
262
- // Log but don't fail the task if resource extraction fails
263
- this.logger.warn(`Failed to extract resources from task ${task.name}: ${error.message}`, 'DAGExecutor');
264
- }
265
- }
266
- }
267
- else {
268
- this.logger.error(`❌ Failed: ${task.name} (${duration}ms)`, 'DAGExecutor');
269
- }
270
- return {
271
- taskId: task.id,
272
- success: finalSuccess,
273
- exitCode: 0,
274
- stdout,
275
- stderr,
276
- duration,
277
- };
278
- }
279
- catch (error) {
280
- const duration = Date.now() - startTime;
281
- // Retry logic
282
- if (task.retryCount && task.retryCount > 0) {
283
- this.logger.warn(`🔄 Task ${task.name} failed, retrying (${task.retryCount} retries left)...`, 'DAGExecutor');
284
- if (task.retryDelay) {
285
- await new Promise(resolve => setTimeout(resolve, task.retryDelay));
286
- }
287
- // Recursively retry with decremented retry count
288
- const retryTask = { ...task, retryCount: task.retryCount - 1 };
289
- return this.executeTask(retryTask);
290
- }
291
- this.logger.error(`❌ Task failed: ${task.name} - ${error.message}`, 'DAGExecutor');
292
- return {
293
- taskId: task.id,
294
- success: false,
295
- exitCode: error.code || 1,
296
- stdout: error.stdout || '',
297
- stderr: error.stderr || error.message,
298
- duration,
299
- error,
300
- };
301
- }
302
- }
303
- /**
304
- * Execute shell command with timeout
305
- */
306
- async executeCommand(command, timeout) {
307
- try {
308
- const { stdout, stderr } = await execAsync(command, {
309
- timeout,
310
- maxBuffer: 10 * 1024 * 1024, // 10MB
311
- });
312
- return { stdout, stderr };
313
- }
314
- catch (error) {
315
- // Re-throw with consistent structure
316
- throw {
317
- code: error.code,
318
- message: error.message,
319
- stdout: error.stdout || '',
320
- stderr: error.stderr || '',
321
- };
322
- }
323
- }
324
- /**
325
- * Validate DAG structure (no cycles, valid dependencies)
326
- */
327
- validateDAG(tasks) {
328
- const taskIds = new Set(tasks.map(t => t.id));
329
- // Check for duplicate task IDs
330
- if (taskIds.size !== tasks.length) {
331
- throw new Error('Duplicate task IDs detected in DAG');
332
- }
333
- // Check all dependencies exist
334
- for (const task of tasks) {
335
- for (const depId of task.dependsOn) {
336
- if (!taskIds.has(depId)) {
337
- throw new Error(`Task ${task.id} depends on non-existent task: ${depId}`);
338
- }
339
- }
340
- }
341
- // Check for cycles using depth-first search
342
- this.detectCycles(tasks);
343
- }
344
- /**
345
- * Detect cycles in DAG using DFS
346
- */
347
- detectCycles(tasks) {
348
- const visited = new Set();
349
- const recursionStack = new Set();
350
- const graph = this.buildDependencyGraph(tasks);
351
- const dfs = (taskId) => {
352
- visited.add(taskId);
353
- recursionStack.add(taskId);
354
- const task = graph.get(taskId);
355
- if (!task) {
356
- return false;
357
- }
358
- for (const depId of task.dependsOn) {
359
- if (!visited.has(depId)) {
360
- if (dfs(depId)) {
361
- return true;
362
- }
363
- }
364
- else if (recursionStack.has(depId)) {
365
- throw new Error(`Circular dependency detected: ${taskId} -> ${depId}`);
366
- }
367
- }
368
- recursionStack.delete(taskId);
369
- return false;
370
- };
371
- for (const task of tasks) {
372
- if (!visited.has(task.id)) {
373
- dfs(task.id);
374
- }
375
- }
376
- }
377
- /**
378
- * Build dependency graph from tasks
379
- */
380
- buildDependencyGraph(tasks) {
381
- const graph = new Map();
382
- for (const task of tasks) {
383
- graph.set(task.id, task);
384
- }
385
- return graph;
386
- }
387
- /**
388
- * Topological sort to determine execution order (Kahn's algorithm)
389
- */
390
- topologicalSort(graph) {
391
- const layers = [];
392
- const inDegree = new Map();
393
- const visited = new Set();
394
- // Calculate in-degrees
395
- for (const [id, task] of graph) {
396
- if (!inDegree.has(id)) {
397
- inDegree.set(id, 0);
398
- }
399
- for (const _depId of task.dependsOn) {
400
- inDegree.set(id, (inDegree.get(id) || 0) + 1);
401
- }
402
- }
403
- // Process nodes layer by layer
404
- while (visited.size < graph.size) {
405
- const layer = [];
406
- // Find all nodes with in-degree 0 (no unmet dependencies)
407
- for (const [id, task] of graph) {
408
- if (!visited.has(id) && (inDegree.get(id) || 0) === 0) {
409
- layer.push(task);
410
- }
411
- }
412
- if (layer.length === 0) {
413
- // This shouldn't happen if cycle detection works
414
- throw new Error('Cannot resolve DAG - circular dependency detected');
415
- }
416
- layers.push(layer);
417
- // Mark layer as visited and update in-degrees
418
- for (const task of layer) {
419
- visited.add(task.id);
420
- // Decrease in-degree for dependent tasks
421
- for (const [id, t] of graph) {
422
- if (t.dependsOn.includes(task.id)) {
423
- inDegree.set(id, (inDegree.get(id) || 0) - 1);
424
- }
425
- }
426
- }
427
- }
428
- return layers;
429
- }
430
- /**
431
- * Get all tasks that depend on the given task (recursively)
432
- */
433
- getDependentTasks(taskId, allTasks) {
434
- const dependents = [];
435
- const queue = [taskId];
436
- const visited = new Set();
437
- while (queue.length > 0) {
438
- const current = queue.shift();
439
- if (visited.has(current)) {
440
- continue;
441
- }
442
- visited.add(current);
443
- for (const task of allTasks) {
444
- if (task.dependsOn.includes(current) && !visited.has(task.id)) {
445
- dependents.push(task.id);
446
- queue.push(task.id);
447
- }
448
- }
449
- }
450
- return dependents;
451
- }
452
- }
453
- //# sourceMappingURL=dag-executor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dag-executor.js","sourceRoot":"","sources":["../../../src/utils/dag-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CA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