atlas-pipeline-mcp 1.0.20 → 1.0.21
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.
- package/dist/mcp.js +191 -0
- package/dist/mcp.js.map +1 -1
- package/dist/tools/dashboard.d.ts +107 -0
- package/dist/tools/dashboard.d.ts.map +1 -0
- package/dist/tools/dashboard.js +544 -0
- package/dist/tools/dashboard.js.map +1 -0
- package/dist/tools/dependencies.d.ts +105 -0
- package/dist/tools/dependencies.d.ts.map +1 -0
- package/dist/tools/dependencies.js +410 -0
- package/dist/tools/dependencies.js.map +1 -0
- package/dist/tools/profiler.d.ts +83 -0
- package/dist/tools/profiler.d.ts.map +1 -0
- package/dist/tools/profiler.js +385 -0
- package/dist/tools/profiler.js.map +1 -0
- package/dist/tools/refactor.d.ts +63 -0
- package/dist/tools/refactor.d.ts.map +1 -0
- package/dist/tools/refactor.js +308 -0
- package/dist/tools/refactor.js.map +1 -0
- package/dist/tools/review.d.ts +98 -0
- package/dist/tools/review.d.ts.map +1 -0
- package/dist/tools/review.js +428 -0
- package/dist/tools/review.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atlas Server - AI Code Review Assistant
|
|
3
|
+
*
|
|
4
|
+
* Comprehensive AI-powered code review capabilities:
|
|
5
|
+
* - Multi-dimensional code quality analysis
|
|
6
|
+
* - Best practices enforcement
|
|
7
|
+
* - Architectural pattern validation
|
|
8
|
+
* - Security vulnerability detection
|
|
9
|
+
* - Performance optimization suggestions
|
|
10
|
+
* - Test coverage recommendations
|
|
11
|
+
* - Documentation quality assessment
|
|
12
|
+
* - Team coding standards compliance
|
|
13
|
+
*
|
|
14
|
+
* @module review
|
|
15
|
+
* @author Nishant Unavane
|
|
16
|
+
* @version 1.0.0
|
|
17
|
+
*/
|
|
18
|
+
import { getActiveProvider, isNoLLMMode } from '../providers/index.js';
|
|
19
|
+
import { logger, createTimer } from '../utils.js';
|
|
20
|
+
import { z } from 'zod';
|
|
21
|
+
// ============================================================================
|
|
22
|
+
// Validation Schema
|
|
23
|
+
// ============================================================================
|
|
24
|
+
const CodeReviewOptionsSchema = z.object({
|
|
25
|
+
code: z.string().min(1).max(500000),
|
|
26
|
+
language: z.string().min(1),
|
|
27
|
+
filePath: z.string().optional(),
|
|
28
|
+
checkQuality: z.boolean().optional(),
|
|
29
|
+
checkSecurity: z.boolean().optional(),
|
|
30
|
+
checkPerformance: z.boolean().optional(),
|
|
31
|
+
checkArchitecture: z.boolean().optional(),
|
|
32
|
+
checkTests: z.boolean().optional(),
|
|
33
|
+
checkDocumentation: z.boolean().optional(),
|
|
34
|
+
framework: z.string().optional(),
|
|
35
|
+
teamStandards: z.string().optional(),
|
|
36
|
+
pullRequestContext: z.string().optional(),
|
|
37
|
+
changedFiles: z.array(z.string()).optional(),
|
|
38
|
+
});
|
|
39
|
+
// ============================================================================
|
|
40
|
+
// Static Analysis
|
|
41
|
+
// ============================================================================
|
|
42
|
+
/**
|
|
43
|
+
* Calculate quality metrics from code
|
|
44
|
+
*/
|
|
45
|
+
function calculateQualityMetrics(code, language) {
|
|
46
|
+
const lines = code.split('\n');
|
|
47
|
+
const codeLines = lines.filter(l => {
|
|
48
|
+
const trimmed = l.trim();
|
|
49
|
+
return trimmed.length > 0 && !trimmed.startsWith('//') && !trimmed.startsWith('/*') && !trimmed.startsWith('*') && !trimmed.startsWith('#');
|
|
50
|
+
});
|
|
51
|
+
const commentLines = lines.filter(l => {
|
|
52
|
+
const trimmed = l.trim();
|
|
53
|
+
return trimmed.startsWith('//') || trimmed.startsWith('/*') || trimmed.startsWith('*') || trimmed.startsWith('#');
|
|
54
|
+
});
|
|
55
|
+
const blankLines = lines.filter(l => l.trim().length === 0);
|
|
56
|
+
// Calculate average complexity (simplified)
|
|
57
|
+
const decisionPoints = (code.match(/\b(if|else|for|while|case|catch|\?|&&|\|\|)\b/g) || []).length;
|
|
58
|
+
const functions = (code.match(/\b(function|def|fn|func)\s+\w+/g) || []).length || 1;
|
|
59
|
+
const averageComplexity = decisionPoints / functions;
|
|
60
|
+
// Detect duplicated code (very simplified - just looks for repeated lines)
|
|
61
|
+
const lineSet = new Set(codeLines.map(l => l.trim()));
|
|
62
|
+
const duplicatedCodeRatio = 1 - (lineSet.size / (codeLines.length || 1));
|
|
63
|
+
// Check documentation coverage (count documented functions vs total)
|
|
64
|
+
const totalFunctions = (code.match(/\b(function|def|fn|func|class|interface)\s+\w+/g) || []).length;
|
|
65
|
+
const documentedFunctions = (code.match(/\/\*\*[\s\S]*?\*\/\s*(?:export\s+)?(?:async\s+)?(?:function|class|interface)\s+\w+/g) || []).length;
|
|
66
|
+
const documentationCoverage = totalFunctions > 0 ? documentedFunctions / totalFunctions : 0;
|
|
67
|
+
return {
|
|
68
|
+
totalLines: lines.length,
|
|
69
|
+
codeLines: codeLines.length,
|
|
70
|
+
commentLines: commentLines.length,
|
|
71
|
+
blankLines: blankLines.length,
|
|
72
|
+
commentRatio: commentLines.length / (codeLines.length || 1),
|
|
73
|
+
averageComplexity,
|
|
74
|
+
duplicatedCodeRatio,
|
|
75
|
+
documentationCoverage,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Detect common code issues automatically
|
|
80
|
+
*/
|
|
81
|
+
function detectIssues(code, language) {
|
|
82
|
+
const findings = [];
|
|
83
|
+
// Security: SQL Injection risk
|
|
84
|
+
if (code.match(/\bquery\s*\+\s*\w+|SELECT.*\+|sql\s*=\s*['"`].*\+/i)) {
|
|
85
|
+
findings.push({
|
|
86
|
+
severity: 'critical',
|
|
87
|
+
category: 'security',
|
|
88
|
+
title: 'Potential SQL Injection',
|
|
89
|
+
description: 'String concatenation detected in SQL queries',
|
|
90
|
+
suggestion: 'Use parameterized queries or prepared statements',
|
|
91
|
+
autoFixable: false,
|
|
92
|
+
references: ['https://owasp.org/www-community/attacks/SQL_Injection'],
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
// Security: Eval usage
|
|
96
|
+
if (code.match(/\beval\s*\(/)) {
|
|
97
|
+
findings.push({
|
|
98
|
+
severity: 'critical',
|
|
99
|
+
category: 'security',
|
|
100
|
+
title: 'Dangerous eval() usage',
|
|
101
|
+
description: 'eval() can execute arbitrary code and is a security risk',
|
|
102
|
+
suggestion: 'Avoid eval() - use safer alternatives like JSON.parse() or Function constructor',
|
|
103
|
+
autoFixable: false,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// Performance: Console.log in production
|
|
107
|
+
if (code.match(/console\.(log|debug|info)/)) {
|
|
108
|
+
findings.push({
|
|
109
|
+
severity: 'minor',
|
|
110
|
+
category: 'performance',
|
|
111
|
+
title: 'Console logging in code',
|
|
112
|
+
description: 'Console statements can impact performance in production',
|
|
113
|
+
suggestion: 'Use a proper logger with log levels or remove before production',
|
|
114
|
+
autoFixable: true,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
// Correctness: Comparison with ==
|
|
118
|
+
if (language === 'javascript' || language === 'typescript') {
|
|
119
|
+
if (code.match(/[^=!]={2}[^=]/)) {
|
|
120
|
+
findings.push({
|
|
121
|
+
severity: 'minor',
|
|
122
|
+
category: 'best-practices',
|
|
123
|
+
title: 'Loose equality (==) instead of strict equality (===)',
|
|
124
|
+
description: 'Using == can lead to unexpected type coercion',
|
|
125
|
+
suggestion: 'Use === for strict equality checks',
|
|
126
|
+
autoFixable: true,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// Maintainability: Magic numbers
|
|
131
|
+
const magicNumbers = code.match(/\b\d{3,}\b/g) || [];
|
|
132
|
+
if (magicNumbers.length > 5) {
|
|
133
|
+
findings.push({
|
|
134
|
+
severity: 'minor',
|
|
135
|
+
category: 'maintainability',
|
|
136
|
+
title: 'Too many magic numbers',
|
|
137
|
+
description: `${magicNumbers.length} numeric literals found without explanation`,
|
|
138
|
+
suggestion: 'Extract magic numbers to named constants',
|
|
139
|
+
autoFixable: false,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
// Reliability: Missing error handling
|
|
143
|
+
if (code.match(/\bawait\s+\w+/) && !code.match(/try\s*{[\s\S]*}catch/)) {
|
|
144
|
+
findings.push({
|
|
145
|
+
severity: 'major',
|
|
146
|
+
category: 'reliability',
|
|
147
|
+
title: 'Missing error handling for async code',
|
|
148
|
+
description: 'Async operations without try-catch can cause unhandled rejections',
|
|
149
|
+
suggestion: 'Wrap async code in try-catch blocks',
|
|
150
|
+
autoFixable: false,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
// Architecture: God function
|
|
154
|
+
const functionBodies = code.match(/(?:function|def|fn)\s+\w+[^{]*{([^}]{1000,})}/gs) || [];
|
|
155
|
+
if (functionBodies.length > 0) {
|
|
156
|
+
findings.push({
|
|
157
|
+
severity: 'major',
|
|
158
|
+
category: 'architecture',
|
|
159
|
+
title: 'Overly long function(s)',
|
|
160
|
+
description: `${functionBodies.length} function(s) exceed 50 lines`,
|
|
161
|
+
suggestion: 'Break down large functions into smaller, focused ones',
|
|
162
|
+
autoFixable: false,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
// Documentation: Missing JSDoc
|
|
166
|
+
const publicFunctions = (code.match(/\bexport\s+(?:async\s+)?function\s+\w+/g) || []).length;
|
|
167
|
+
const documentedExports = (code.match(/\/\*\*[\s\S]*?\*\/\s*export\s+(?:async\s+)?function\s+\w+/g) || []).length;
|
|
168
|
+
if (publicFunctions > documentedExports && publicFunctions > 0) {
|
|
169
|
+
findings.push({
|
|
170
|
+
severity: 'minor',
|
|
171
|
+
category: 'documentation',
|
|
172
|
+
title: 'Missing documentation for public APIs',
|
|
173
|
+
description: `${publicFunctions - documentedExports} exported functions lack documentation`,
|
|
174
|
+
suggestion: 'Add JSDoc comments to all public functions',
|
|
175
|
+
autoFixable: false,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
return findings;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Calculate grade from score
|
|
182
|
+
*/
|
|
183
|
+
function scoreToGrade(score) {
|
|
184
|
+
if (score >= 97)
|
|
185
|
+
return 'A+';
|
|
186
|
+
if (score >= 90)
|
|
187
|
+
return 'A';
|
|
188
|
+
if (score >= 80)
|
|
189
|
+
return 'B';
|
|
190
|
+
if (score >= 70)
|
|
191
|
+
return 'C';
|
|
192
|
+
if (score >= 60)
|
|
193
|
+
return 'D';
|
|
194
|
+
return 'F';
|
|
195
|
+
}
|
|
196
|
+
// ============================================================================
|
|
197
|
+
// Main Review Function
|
|
198
|
+
// ============================================================================
|
|
199
|
+
/**
|
|
200
|
+
* Comprehensive AI-powered code review
|
|
201
|
+
*/
|
|
202
|
+
export async function reviewCode(options) {
|
|
203
|
+
const timer = createTimer();
|
|
204
|
+
const { code, language, filePath, checkQuality = true, checkSecurity = true, checkPerformance = true, checkArchitecture = true, checkTests = false, checkDocumentation = true, framework, teamStandards, pullRequestContext, } = CodeReviewOptionsSchema.parse(options);
|
|
205
|
+
logger.info({ language, filePath }, 'Starting code review');
|
|
206
|
+
const warnings = [];
|
|
207
|
+
// Static analysis
|
|
208
|
+
const metrics = calculateQualityMetrics(code, language);
|
|
209
|
+
const staticFindings = detectIssues(code, language);
|
|
210
|
+
// Build review prompt
|
|
211
|
+
const aspects = [];
|
|
212
|
+
if (checkQuality)
|
|
213
|
+
aspects.push('code quality');
|
|
214
|
+
if (checkSecurity)
|
|
215
|
+
aspects.push('security vulnerabilities');
|
|
216
|
+
if (checkPerformance)
|
|
217
|
+
aspects.push('performance optimization');
|
|
218
|
+
if (checkArchitecture)
|
|
219
|
+
aspects.push('architecture and design patterns');
|
|
220
|
+
if (checkTests)
|
|
221
|
+
aspects.push('test coverage and quality');
|
|
222
|
+
if (checkDocumentation)
|
|
223
|
+
aspects.push('documentation quality');
|
|
224
|
+
const prompt = `You are a senior code reviewer with 50 years of experience conducting PR reviews. Review this ${language} code.
|
|
225
|
+
|
|
226
|
+
**Code:**
|
|
227
|
+
\`\`\`${language}
|
|
228
|
+
${code}
|
|
229
|
+
\`\`\`
|
|
230
|
+
|
|
231
|
+
**Context:**
|
|
232
|
+
${filePath ? `- File: ${filePath}` : ''}
|
|
233
|
+
${framework ? `- Framework: ${framework}` : ''}
|
|
234
|
+
${pullRequestContext ? `- PR Context: ${pullRequestContext}` : ''}
|
|
235
|
+
${teamStandards ? `- Team Standards:\n${teamStandards}` : ''}
|
|
236
|
+
|
|
237
|
+
**Metrics:**
|
|
238
|
+
- Total Lines: ${metrics.totalLines}
|
|
239
|
+
- Code Lines: ${metrics.codeLines}
|
|
240
|
+
- Comment Ratio: ${(metrics.commentRatio * 100).toFixed(1)}%
|
|
241
|
+
- Average Complexity: ${metrics.averageComplexity.toFixed(1)}
|
|
242
|
+
- Documentation Coverage: ${(metrics.documentationCoverage * 100).toFixed(1)}%
|
|
243
|
+
|
|
244
|
+
**Review Focus:** ${aspects.join(', ')}
|
|
245
|
+
|
|
246
|
+
**Static Analysis Findings:** ${staticFindings.length} issues detected
|
|
247
|
+
|
|
248
|
+
**Instructions:**
|
|
249
|
+
Provide a comprehensive code review covering:
|
|
250
|
+
1. **Quality** (readability, maintainability, complexity)
|
|
251
|
+
2. **Security** (vulnerabilities, input validation, auth)
|
|
252
|
+
3. **Performance** (algorithmic efficiency, resource usage)
|
|
253
|
+
4. **Architecture** (design patterns, separation of concerns)
|
|
254
|
+
5. **Testing** (testability, edge cases)
|
|
255
|
+
6. **Documentation** (clarity, completeness)
|
|
256
|
+
|
|
257
|
+
For each aspect, provide:
|
|
258
|
+
- Score (0-100)
|
|
259
|
+
- Key strengths
|
|
260
|
+
- Key weaknesses
|
|
261
|
+
- Specific findings with severity
|
|
262
|
+
|
|
263
|
+
**Format your response as:**
|
|
264
|
+
|
|
265
|
+
QUALITY: [score]
|
|
266
|
+
Strengths: [strength 1], [strength 2]
|
|
267
|
+
Weaknesses: [weakness 1], [weakness 2]
|
|
268
|
+
|
|
269
|
+
SECURITY: [score]
|
|
270
|
+
Strengths: [strength 1]
|
|
271
|
+
Weaknesses: [weakness 1]
|
|
272
|
+
|
|
273
|
+
PERFORMANCE: [score]
|
|
274
|
+
Strengths: [strength 1]
|
|
275
|
+
Weaknesses: [weakness 1]
|
|
276
|
+
|
|
277
|
+
ARCHITECTURE: [score]
|
|
278
|
+
Strengths: [strength 1]
|
|
279
|
+
Weaknesses: [weakness 1]
|
|
280
|
+
|
|
281
|
+
TESTS: [score]
|
|
282
|
+
Strengths: [strength 1]
|
|
283
|
+
Weaknesses: [weakness 1]
|
|
284
|
+
|
|
285
|
+
DOCUMENTATION: [score]
|
|
286
|
+
Strengths: [strength 1]
|
|
287
|
+
Weaknesses: [weakness 1]
|
|
288
|
+
|
|
289
|
+
FINDINGS:
|
|
290
|
+
- [SEVERITY] [CATEGORY]: [description] - Suggestion: [fix]
|
|
291
|
+
...
|
|
292
|
+
|
|
293
|
+
SUMMARY:
|
|
294
|
+
[2-3 sentence overall assessment]`;
|
|
295
|
+
let allFindings = [...staticFindings];
|
|
296
|
+
let suggestions = [];
|
|
297
|
+
let grades = {
|
|
298
|
+
quality: { score: 70, letter: 'C', issues: 0, strengths: [], weaknesses: [] },
|
|
299
|
+
security: { score: 70, letter: 'C', issues: 0, strengths: [], weaknesses: [] },
|
|
300
|
+
performance: { score: 70, letter: 'C', issues: 0, strengths: [], weaknesses: [] },
|
|
301
|
+
architecture: { score: 70, letter: 'C', issues: 0, strengths: [], weaknesses: [] },
|
|
302
|
+
tests: { score: 0, letter: 'F', issues: 0, strengths: [], weaknesses: [] },
|
|
303
|
+
documentation: { score: Math.round(metrics.documentationCoverage * 100), letter: scoreToGrade(metrics.documentationCoverage * 100), issues: 0, strengths: [], weaknesses: [] },
|
|
304
|
+
};
|
|
305
|
+
let summary = 'Code review completed with static analysis only.';
|
|
306
|
+
if (isNoLLMMode()) {
|
|
307
|
+
warnings.push('No LLM provider - using static analysis only');
|
|
308
|
+
summary = `Static analysis detected ${staticFindings.length} issues. Install an LLM provider for comprehensive AI-powered review.`;
|
|
309
|
+
}
|
|
310
|
+
else {
|
|
311
|
+
const provider = await getActiveProvider();
|
|
312
|
+
try {
|
|
313
|
+
const response = await provider.complete(prompt, {
|
|
314
|
+
maxTokens: 3000,
|
|
315
|
+
temperature: 0.3,
|
|
316
|
+
});
|
|
317
|
+
const responseText = response.text;
|
|
318
|
+
// Parse grades
|
|
319
|
+
const gradePattern = /(\w+):\s*(\d+)\s*Strengths:\s*([^\n]+)\s*Weaknesses:\s*([^\n]+)/gi;
|
|
320
|
+
let match;
|
|
321
|
+
while ((match = gradePattern.exec(responseText)) !== null) {
|
|
322
|
+
const aspect = match[1]?.toLowerCase() || '';
|
|
323
|
+
const score = parseInt(match[2] || '70');
|
|
324
|
+
const strengths = (match[3] || '').split(',').map(s => s.trim()).filter(Boolean);
|
|
325
|
+
const weaknesses = (match[4] || '').split(',').map(s => s.trim()).filter(Boolean);
|
|
326
|
+
const grade = {
|
|
327
|
+
score,
|
|
328
|
+
letter: scoreToGrade(score),
|
|
329
|
+
issues: weaknesses.length,
|
|
330
|
+
strengths,
|
|
331
|
+
weaknesses,
|
|
332
|
+
};
|
|
333
|
+
if (aspect in grades) {
|
|
334
|
+
grades[aspect] = grade;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
// Parse findings
|
|
338
|
+
const findingsSection = responseText.match(/FINDINGS:\s*([\s\S]*?)(?:SUMMARY:|$)/i);
|
|
339
|
+
if (findingsSection && findingsSection[1]) {
|
|
340
|
+
const findingLines = findingsSection[1].trim().split('\n')
|
|
341
|
+
.filter((line) => line.trim().startsWith('-'));
|
|
342
|
+
for (const line of findingLines) {
|
|
343
|
+
const cleanLine = line.replace(/^-\s*/, '').trim();
|
|
344
|
+
const parts = cleanLine.split(' - Suggestion: ');
|
|
345
|
+
if (parts.length >= 2 && parts[0]) {
|
|
346
|
+
const [firstPart, suggestion] = parts;
|
|
347
|
+
const [severityCategory, ...descParts] = firstPart.split(': ');
|
|
348
|
+
const [severityStr, categoryStr] = (severityCategory || '').split(' ');
|
|
349
|
+
allFindings.push({
|
|
350
|
+
severity: severityStr?.toLowerCase() || 'minor',
|
|
351
|
+
category: categoryStr?.toLowerCase() || 'best-practices',
|
|
352
|
+
title: descParts.join(': '),
|
|
353
|
+
description: descParts.join(': '),
|
|
354
|
+
suggestion: suggestion || '',
|
|
355
|
+
autoFixable: false,
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
// Parse summary
|
|
361
|
+
const summaryMatch = responseText.match(/SUMMARY:\s*([\s\S]+?)$/i);
|
|
362
|
+
if (summaryMatch && summaryMatch[1]) {
|
|
363
|
+
summary = summaryMatch[1].trim();
|
|
364
|
+
}
|
|
365
|
+
// Generate suggestions
|
|
366
|
+
const criticalIssues = allFindings.filter(f => f.severity === 'blocker' || f.severity === 'critical');
|
|
367
|
+
if (criticalIssues.length > 0) {
|
|
368
|
+
suggestions.push({
|
|
369
|
+
priority: 'must',
|
|
370
|
+
category: 'Critical Issues',
|
|
371
|
+
description: `Fix ${criticalIssues.length} critical/blocker issues before merging`,
|
|
372
|
+
rationale: 'These issues pose security or correctness risks',
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
if (metrics.averageComplexity > 10) {
|
|
376
|
+
suggestions.push({
|
|
377
|
+
priority: 'should',
|
|
378
|
+
category: 'Complexity',
|
|
379
|
+
description: 'Reduce cyclomatic complexity',
|
|
380
|
+
rationale: 'High complexity makes code harder to test and maintain',
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
if (metrics.documentationCoverage < 0.5) {
|
|
384
|
+
suggestions.push({
|
|
385
|
+
priority: 'should',
|
|
386
|
+
category: 'Documentation',
|
|
387
|
+
description: 'Improve documentation coverage',
|
|
388
|
+
rationale: 'Well-documented code is easier for team members to understand',
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
catch (error) {
|
|
393
|
+
logger.error({ error }, 'Review failed');
|
|
394
|
+
warnings.push(`LLM error: ${error instanceof Error ? error.message : 'Unknown'}`);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
// Calculate overall score
|
|
398
|
+
const scores = [
|
|
399
|
+
grades.quality.score,
|
|
400
|
+
grades.security.score,
|
|
401
|
+
grades.performance.score,
|
|
402
|
+
grades.architecture.score,
|
|
403
|
+
grades.documentation.score,
|
|
404
|
+
];
|
|
405
|
+
const overallScore = Math.round(scores.reduce((a, b) => a + b, 0) / scores.length);
|
|
406
|
+
const executionTimeMs = timer.elapsed();
|
|
407
|
+
logger.info({
|
|
408
|
+
overallScore,
|
|
409
|
+
findings: allFindings.length,
|
|
410
|
+
executionTimeMs
|
|
411
|
+
}, 'Code review completed');
|
|
412
|
+
return {
|
|
413
|
+
code,
|
|
414
|
+
overallScore,
|
|
415
|
+
grades,
|
|
416
|
+
findings: allFindings,
|
|
417
|
+
suggestions,
|
|
418
|
+
metrics,
|
|
419
|
+
summary,
|
|
420
|
+
executionTimeMs,
|
|
421
|
+
warnings,
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
// ============================================================================
|
|
425
|
+
// Export
|
|
426
|
+
// ============================================================================
|
|
427
|
+
export default reviewCode;
|
|
428
|
+
//# sourceMappingURL=review.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"review.js","sourceRoot":"","sources":["../../src/tools/review.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAwGxB,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EA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
4
|
"mcpName": "io.github.IamNishant51/atlas-pipeline",
|
|
5
5
|
"description": "Model Context Protocol server with multi-stage AI pipeline - works with any LLM provider (Ollama, OpenAI, Anthropic). Compatible with Cursor, GitHub Copilot, Windsurf, and more. Features 15 tools including security scanning, test generation, code explanation, debugging assistance, and advanced sequential thinking.",
|
|
6
6
|
"main": "dist/server.js",
|