mcp-adr-analysis-server 2.0.11 → 2.0.12
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/src/index.d.ts.map +1 -1
- package/dist/src/index.js +80 -28
- package/dist/src/index.js.map +1 -1
- package/dist/src/tools/smart-git-push-tool-v2.d.ts +55 -0
- package/dist/src/tools/smart-git-push-tool-v2.d.ts.map +1 -0
- package/dist/src/tools/smart-git-push-tool-v2.js +527 -0
- package/dist/src/tools/smart-git-push-tool-v2.js.map +1 -0
- package/dist/src/tools/smart-git-push-tool.d.ts +23 -15
- package/dist/src/tools/smart-git-push-tool.d.ts.map +1 -1
- package/dist/src/tools/smart-git-push-tool.js +401 -29
- package/dist/src/tools/smart-git-push-tool.js.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.d.ts +13 -0
- package/dist/src/utils/knowledge-graph-manager.d.ts.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.js +40 -0
- package/dist/src/utils/knowledge-graph-manager.js.map +1 -1
- package/package.json +1 -1
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AA2EH;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,aAAa,CAAM;IAC3B,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,SAAS,CAAwB;;IAyBzC;;OAEG;YACW,qBAAqB;IAUnC;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAKlC;;OAEG;IACH,OAAO,CAAC,aAAa;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AA2EH;;GAEG;AACH,qBAAa,oB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IAAI,CAAC;IAc5B;;OAEG;YACW,QAAQ;YAiCR,SAAS;YAqCT,aAAa;YAuCb,cAAc;YAiBd,0BAA0B;YAY1B,YAAY;YAYZ,0BAA0B;YAY1B,UAAU;CAWzB"}
|
package/dist/src/index.js
CHANGED
|
@@ -1513,7 +1513,7 @@ export class McpAdrAnalysisServer {
|
|
|
1513
1513
|
},
|
|
1514
1514
|
{
|
|
1515
1515
|
name: 'smart_git_push',
|
|
1516
|
-
description: '
|
|
1516
|
+
description: 'AI-driven security-focused git push with credential detection, file filtering, and deployment metrics tracking. Tests should be run by calling AI and results provided.',
|
|
1517
1517
|
inputSchema: {
|
|
1518
1518
|
type: 'object',
|
|
1519
1519
|
properties: {
|
|
@@ -1525,26 +1525,61 @@ export class McpAdrAnalysisServer {
|
|
|
1525
1525
|
type: 'string',
|
|
1526
1526
|
description: 'Commit message (optional, commits staged files if provided)'
|
|
1527
1527
|
},
|
|
1528
|
-
|
|
1529
|
-
type: '
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1528
|
+
testResults: {
|
|
1529
|
+
type: 'object',
|
|
1530
|
+
description: 'Test results from AI-executed tests (required for proper deployment tracking)',
|
|
1531
|
+
properties: {
|
|
1532
|
+
success: {
|
|
1533
|
+
type: 'boolean',
|
|
1534
|
+
description: 'Whether all tests passed'
|
|
1535
|
+
},
|
|
1536
|
+
testsRun: {
|
|
1537
|
+
type: 'number',
|
|
1538
|
+
description: 'Total number of tests executed'
|
|
1539
|
+
},
|
|
1540
|
+
testsPassed: {
|
|
1541
|
+
type: 'number',
|
|
1542
|
+
description: 'Number of tests that passed'
|
|
1543
|
+
},
|
|
1544
|
+
testsFailed: {
|
|
1545
|
+
type: 'number',
|
|
1546
|
+
description: 'Number of tests that failed'
|
|
1547
|
+
},
|
|
1548
|
+
duration: {
|
|
1549
|
+
type: 'number',
|
|
1550
|
+
description: 'Test execution duration in seconds'
|
|
1551
|
+
},
|
|
1552
|
+
command: {
|
|
1553
|
+
type: 'string',
|
|
1554
|
+
description: 'Test command that was executed by AI'
|
|
1555
|
+
},
|
|
1556
|
+
output: {
|
|
1557
|
+
type: 'string',
|
|
1558
|
+
description: 'Test execution output'
|
|
1559
|
+
},
|
|
1560
|
+
failureDetails: {
|
|
1561
|
+
type: 'array',
|
|
1562
|
+
items: { type: 'string' },
|
|
1563
|
+
description: 'Details of test failures'
|
|
1564
|
+
},
|
|
1565
|
+
testTypes: {
|
|
1566
|
+
type: 'object',
|
|
1567
|
+
description: 'Results broken down by test type (unit, integration, etc.)',
|
|
1568
|
+
additionalProperties: {
|
|
1569
|
+
type: 'object',
|
|
1570
|
+
properties: {
|
|
1571
|
+
passed: { type: 'number' },
|
|
1572
|
+
failed: { type: 'number' }
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
},
|
|
1577
|
+
required: ['success', 'testsRun', 'testsPassed', 'testsFailed']
|
|
1543
1578
|
},
|
|
1544
|
-
|
|
1579
|
+
skipSecurity: {
|
|
1545
1580
|
type: 'boolean',
|
|
1546
|
-
default:
|
|
1547
|
-
description: '
|
|
1581
|
+
default: false,
|
|
1582
|
+
description: 'Skip security scanning (NOT RECOMMENDED)'
|
|
1548
1583
|
},
|
|
1549
1584
|
dryRun: {
|
|
1550
1585
|
type: 'boolean',
|
|
@@ -1555,16 +1590,10 @@ export class McpAdrAnalysisServer {
|
|
|
1555
1590
|
type: 'string',
|
|
1556
1591
|
description: 'Path to project directory (defaults to current working directory)'
|
|
1557
1592
|
},
|
|
1558
|
-
|
|
1593
|
+
forceUnsafe: {
|
|
1559
1594
|
type: 'boolean',
|
|
1560
1595
|
default: false,
|
|
1561
|
-
description: '
|
|
1562
|
-
},
|
|
1563
|
-
releaseType: {
|
|
1564
|
-
type: 'string',
|
|
1565
|
-
enum: ['major', 'minor', 'patch'],
|
|
1566
|
-
default: 'minor',
|
|
1567
|
-
description: 'Type of release to check readiness for'
|
|
1596
|
+
description: 'Override security blocks and test failures (DANGEROUS)'
|
|
1568
1597
|
}
|
|
1569
1598
|
}
|
|
1570
1599
|
}
|
|
@@ -2675,6 +2704,27 @@ ${environmentResult.content[0].text}
|
|
|
2675
2704
|
temperature: 0.1,
|
|
2676
2705
|
maxTokens: 6000,
|
|
2677
2706
|
});
|
|
2707
|
+
// Step 6: Record project structure to knowledge graph
|
|
2708
|
+
try {
|
|
2709
|
+
this.logger.info('Recording project structure to knowledge graph');
|
|
2710
|
+
const projectStructureSnapshot = {
|
|
2711
|
+
projectPath,
|
|
2712
|
+
analysisDepth,
|
|
2713
|
+
recursiveDepth,
|
|
2714
|
+
technologyFocus,
|
|
2715
|
+
analysisScope,
|
|
2716
|
+
includeEnvironment,
|
|
2717
|
+
timestamp: new Date().toISOString(),
|
|
2718
|
+
structureData: baseProjectAnalysisPrompt.context || {}
|
|
2719
|
+
};
|
|
2720
|
+
await this.kgManager.recordProjectStructure(projectStructureSnapshot);
|
|
2721
|
+
this.logger.info('✅ Project structure recorded to knowledge graph');
|
|
2722
|
+
}
|
|
2723
|
+
catch (kgError) {
|
|
2724
|
+
this.logger.warn('Failed to record project structure to knowledge graph:', kgError);
|
|
2725
|
+
// Don't fail the entire analysis if KG recording fails
|
|
2726
|
+
}
|
|
2727
|
+
// Return appropriate response based on execution result
|
|
2678
2728
|
if (executionResult.isAIGenerated) {
|
|
2679
2729
|
// AI execution successful - return actual analysis results
|
|
2680
2730
|
return formatMCPResponse({
|
|
@@ -2693,6 +2743,7 @@ ${environmentResult.content[0].text}
|
|
|
2693
2743
|
- **Reflexion Learning**: ${enhancedMode && learningEnabled ? '✅ Enabled' : '❌ Disabled'}
|
|
2694
2744
|
- **Enhanced Mode**: ${enhancedMode ? '✅ Enabled' : '❌ Disabled'}
|
|
2695
2745
|
- **Technology Focus**: ${technologyFocus.length > 0 ? technologyFocus.join(', ') : 'Auto-detect'}
|
|
2746
|
+
- **Knowledge Graph**: ✅ Project structure recorded
|
|
2696
2747
|
|
|
2697
2748
|
${knowledgeContext}
|
|
2698
2749
|
|
|
@@ -2761,6 +2812,7 @@ This comprehensive analysis provides deep recursive project understanding with i
|
|
|
2761
2812
|
- **Enhanced Mode**: ${enhancedMode ? '✅ Enabled' : '❌ Disabled'}
|
|
2762
2813
|
- **Technology Focus**: ${technologyFocus.length > 0 ? technologyFocus.join(', ') : 'Auto-detect'}
|
|
2763
2814
|
- **Include Patterns**: ${includePatterns?.length ? includePatterns.join(', ') : 'Default patterns'}
|
|
2815
|
+
- **Knowledge Graph**: ✅ Project structure recorded
|
|
2764
2816
|
|
|
2765
2817
|
${knowledgeContext}
|
|
2766
2818
|
|
|
@@ -4556,7 +4608,7 @@ Please provide:
|
|
|
4556
4608
|
}
|
|
4557
4609
|
async smartGitPush(args) {
|
|
4558
4610
|
try {
|
|
4559
|
-
const { smartGitPush } = await import('./tools/smart-git-push-tool.js');
|
|
4611
|
+
const { smartGitPush } = await import('./tools/smart-git-push-tool-v2.js');
|
|
4560
4612
|
return await smartGitPush(args);
|
|
4561
4613
|
}
|
|
4562
4614
|
catch (error) {
|