mcp-adr-analysis-server 2.0.24 → 2.1.9
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/README.md +94 -839
- package/dist/.tsbuildinfo +1 -1
- package/dist/src/config/ai-config.d.ts.map +1 -1
- package/dist/src/config/ai-config.js +9 -9
- package/dist/src/config/ai-config.js.map +1 -1
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +218 -60
- package/dist/src/index.js.map +1 -1
- package/dist/src/prompts/analysis-prompts.d.ts +4 -1
- package/dist/src/prompts/analysis-prompts.d.ts.map +1 -1
- package/dist/src/prompts/analysis-prompts.js +61 -30
- package/dist/src/prompts/analysis-prompts.js.map +1 -1
- package/dist/src/prompts/index.d.ts +17 -1
- package/dist/src/prompts/index.d.ts.map +1 -1
- package/dist/src/prompts/index.js +325 -1
- package/dist/src/prompts/index.js.map +1 -1
- package/dist/src/prompts/rule-generation-prompts.d.ts +5 -1
- package/dist/src/prompts/rule-generation-prompts.d.ts.map +1 -1
- package/dist/src/prompts/rule-generation-prompts.js +5 -1
- package/dist/src/prompts/rule-generation-prompts.js.map +1 -1
- package/dist/src/prompts/security-prompts.d.ts +6 -1
- package/dist/src/prompts/security-prompts.d.ts.map +1 -1
- package/dist/src/prompts/security-prompts.js +6 -1
- package/dist/src/prompts/security-prompts.js.map +1 -1
- package/dist/src/prompts/todo-prompts.d.ts +49 -0
- package/dist/src/prompts/todo-prompts.d.ts.map +1 -0
- package/dist/src/prompts/todo-prompts.js +824 -0
- package/dist/src/prompts/todo-prompts.js.map +1 -0
- package/dist/src/resources/index.d.ts.map +1 -1
- package/dist/src/resources/index.js +9 -7
- package/dist/src/resources/index.js.map +1 -1
- package/dist/src/tools/adr-bootstrap-validation-tool.d.ts +47 -0
- package/dist/src/tools/adr-bootstrap-validation-tool.d.ts.map +1 -0
- package/dist/src/tools/adr-bootstrap-validation-tool.js +979 -0
- package/dist/src/tools/adr-bootstrap-validation-tool.js.map +1 -0
- package/dist/src/tools/adr-suggestion-tool.d.ts +1 -0
- package/dist/src/tools/adr-suggestion-tool.d.ts.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.js +298 -2
- package/dist/src/tools/adr-suggestion-tool.js.map +1 -1
- package/dist/src/tools/content-masking-tool.d.ts +1 -0
- package/dist/src/tools/content-masking-tool.d.ts.map +1 -1
- package/dist/src/tools/content-masking-tool.js +100 -0
- package/dist/src/tools/content-masking-tool.js.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.js +298 -36
- package/dist/src/tools/deployment-readiness-tool.js.map +1 -1
- package/dist/src/tools/interactive-adr-planning-tool.d.ts.map +1 -1
- package/dist/src/tools/interactive-adr-planning-tool.js +270 -108
- package/dist/src/tools/interactive-adr-planning-tool.js.map +1 -1
- package/dist/src/tools/mcp-planning-tool.d.ts.map +1 -1
- package/dist/src/tools/mcp-planning-tool.js +18 -10
- package/dist/src/tools/mcp-planning-tool.js.map +1 -1
- package/dist/src/tools/research-integration-tool.d.ts +4 -1
- package/dist/src/tools/research-integration-tool.d.ts.map +1 -1
- package/dist/src/tools/research-integration-tool.js +5 -1
- package/dist/src/tools/research-integration-tool.js.map +1 -1
- package/dist/src/tools/review-existing-adrs-tool.d.ts +19 -0
- package/dist/src/tools/review-existing-adrs-tool.d.ts.map +1 -0
- package/dist/src/tools/review-existing-adrs-tool.js +1204 -0
- package/dist/src/tools/review-existing-adrs-tool.js.map +1 -0
- package/dist/src/tools/rule-generation-tool.d.ts +2 -0
- package/dist/src/tools/rule-generation-tool.d.ts.map +1 -1
- package/dist/src/tools/rule-generation-tool.js +274 -33
- package/dist/src/tools/rule-generation-tool.js.map +1 -1
- package/dist/src/tools/smart-git-push-tool-v2.d.ts +4 -0
- package/dist/src/tools/smart-git-push-tool-v2.d.ts.map +1 -1
- package/dist/src/tools/smart-git-push-tool-v2.js +423 -229
- package/dist/src/tools/smart-git-push-tool-v2.js.map +1 -1
- package/dist/src/tools/smart-git-push-tool.d.ts.map +1 -1
- package/dist/src/tools/smart-git-push-tool.js +65 -13
- package/dist/src/tools/smart-git-push-tool.js.map +1 -1
- package/dist/src/tools/tool-chain-orchestrator.d.ts +2 -2
- package/dist/src/tools/tool-chain-orchestrator.d.ts.map +1 -1
- package/dist/src/tools/tool-chain-orchestrator.js +152 -93
- package/dist/src/tools/tool-chain-orchestrator.js.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts +6 -6
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js +154 -6
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js.map +1 -1
- package/dist/src/types/ape-framework.d.ts +93 -0
- package/dist/src/types/ape-framework.d.ts.map +1 -1
- package/dist/src/types/ape-framework.js +10 -10
- package/dist/src/types/ape-framework.js.map +1 -1
- package/dist/src/types/index.d.ts +129 -3
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/index.js +15 -0
- package/dist/src/types/index.js.map +1 -1
- package/dist/src/types/knowledge-generation.d.ts +78 -0
- package/dist/src/types/knowledge-generation.d.ts.map +1 -1
- package/dist/src/types/knowledge-generation.js +10 -6
- package/dist/src/types/knowledge-generation.js.map +1 -1
- package/dist/src/types/memory-entities.d.ts +36 -36
- package/dist/src/types/reflexion-framework.d.ts +44 -0
- package/dist/src/types/reflexion-framework.d.ts.map +1 -1
- package/dist/src/types/reflexion-framework.js +7 -7
- package/dist/src/types/reflexion-framework.js.map +1 -1
- package/dist/src/types/tool-arguments.d.ts +224 -0
- package/dist/src/types/tool-arguments.d.ts.map +1 -0
- package/dist/src/types/tool-arguments.js +6 -0
- package/dist/src/types/tool-arguments.js.map +1 -0
- package/dist/src/utils/actual-file-operations.d.ts.map +1 -1
- package/dist/src/utils/actual-file-operations.js +25 -9
- package/dist/src/utils/actual-file-operations.js.map +1 -1
- package/dist/src/utils/adr-discovery.d.ts +33 -1
- package/dist/src/utils/adr-discovery.d.ts.map +1 -1
- package/dist/src/utils/adr-discovery.js +14 -9
- package/dist/src/utils/adr-discovery.js.map +1 -1
- package/dist/src/utils/adr-suggestions.d.ts +72 -0
- package/dist/src/utils/adr-suggestions.d.ts.map +1 -1
- package/dist/src/utils/adr-suggestions.js +6 -0
- package/dist/src/utils/adr-suggestions.js.map +1 -1
- package/dist/src/utils/cache.d.ts.map +1 -1
- package/dist/src/utils/cache.js +22 -19
- package/dist/src/utils/cache.js.map +1 -1
- package/dist/src/utils/chain-of-thought-template.d.ts +13 -1
- package/dist/src/utils/chain-of-thought-template.d.ts.map +1 -1
- package/dist/src/utils/chain-of-thought-template.js +31 -22
- package/dist/src/utils/chain-of-thought-template.js.map +1 -1
- package/dist/src/utils/config.d.ts.map +1 -1
- package/dist/src/utils/config.js +1 -0
- package/dist/src/utils/config.js.map +1 -1
- package/dist/src/utils/directory-compat.js +1 -1
- package/dist/src/utils/directory-compat.js.map +1 -1
- package/dist/src/utils/file-system.d.ts +182 -34
- package/dist/src/utils/file-system.d.ts.map +1 -1
- package/dist/src/utils/file-system.js +648 -774
- package/dist/src/utils/file-system.js.map +1 -1
- package/dist/src/utils/gitleaks-detector.d.ts +50 -0
- package/dist/src/utils/gitleaks-detector.d.ts.map +1 -0
- package/dist/src/utils/gitleaks-detector.js +334 -0
- package/dist/src/utils/gitleaks-detector.js.map +1 -0
- package/dist/src/utils/interactive-approval.d.ts.map +1 -1
- package/dist/src/utils/interactive-approval.js +2 -1
- package/dist/src/utils/interactive-approval.js.map +1 -1
- package/dist/src/utils/json-safe.d.ts.map +1 -1
- package/dist/src/utils/json-safe.js +9 -6
- package/dist/src/utils/json-safe.js.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.d.ts +14 -0
- package/dist/src/utils/knowledge-graph-manager.d.ts.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.js +18 -1
- package/dist/src/utils/knowledge-graph-manager.js.map +1 -1
- package/dist/src/utils/location-filter.d.ts +35 -10
- package/dist/src/utils/location-filter.d.ts.map +1 -1
- package/dist/src/utils/location-filter.js +360 -94
- package/dist/src/utils/location-filter.js.map +1 -1
- package/dist/src/utils/mcp-response-validator.d.ts.map +1 -1
- package/dist/src/utils/mcp-response-validator.js +34 -19
- package/dist/src/utils/mcp-response-validator.js.map +1 -1
- package/dist/src/utils/memory-entity-manager.d.ts.map +1 -1
- package/dist/src/utils/memory-entity-manager.js +5 -2
- package/dist/src/utils/memory-entity-manager.js.map +1 -1
- package/dist/src/utils/memory-migration-manager.d.ts.map +1 -1
- package/dist/src/utils/memory-migration-manager.js +15 -7
- package/dist/src/utils/memory-migration-manager.js.map +1 -1
- package/dist/src/utils/memory-relationship-mapper.d.ts.map +1 -1
- package/dist/src/utils/memory-relationship-mapper.js +2 -1
- package/dist/src/utils/memory-relationship-mapper.js.map +1 -1
- package/dist/src/utils/memory-rollback-manager.d.ts +12 -0
- package/dist/src/utils/memory-rollback-manager.d.ts.map +1 -1
- package/dist/src/utils/memory-rollback-manager.js +36 -3
- package/dist/src/utils/memory-rollback-manager.js.map +1 -1
- package/dist/src/utils/output-masking.d.ts +12 -0
- package/dist/src/utils/output-masking.d.ts.map +1 -1
- package/dist/src/utils/output-masking.js +5 -0
- package/dist/src/utils/output-masking.js.map +1 -1
- package/dist/src/utils/release-readiness-detector.d.ts.map +1 -1
- package/dist/src/utils/release-readiness-detector.js +43 -42
- package/dist/src/utils/release-readiness-detector.js.map +1 -1
- package/dist/src/utils/research-integration.d.ts.map +1 -1
- package/dist/src/utils/research-integration.js +73 -44
- package/dist/src/utils/research-integration.js.map +1 -1
- package/dist/src/utils/research-questions.d.ts.map +1 -1
- package/dist/src/utils/research-questions.js +40 -14
- package/dist/src/utils/research-questions.js.map +1 -1
- package/dist/src/utils/ripgrep-wrapper.d.ts +84 -0
- package/dist/src/utils/ripgrep-wrapper.d.ts.map +1 -0
- package/dist/src/utils/ripgrep-wrapper.js +255 -0
- package/dist/src/utils/ripgrep-wrapper.js.map +1 -0
- package/dist/src/utils/rule-generation.d.ts.map +1 -1
- package/dist/src/utils/rule-generation.js +26 -15
- package/dist/src/utils/rule-generation.js.map +1 -1
- package/dist/src/utils/tree-sitter-analyzer.d.ts +185 -0
- package/dist/src/utils/tree-sitter-analyzer.d.ts.map +1 -0
- package/dist/src/utils/tree-sitter-analyzer.js +885 -0
- package/dist/src/utils/tree-sitter-analyzer.js.map +1 -0
- package/package.json +32 -7
- package/dist/src/utils/enhanced-sensitive-detector.d.ts +0 -61
- package/dist/src/utils/enhanced-sensitive-detector.d.ts.map +0 -1
- package/dist/src/utils/enhanced-sensitive-detector.js +0 -437
- package/dist/src/utils/enhanced-sensitive-detector.js.map +0 -1
package/dist/src/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { join } from 'path';
|
|
|
14
14
|
import { getCurrentDirCompat } from './utils/directory-compat.js';
|
|
15
15
|
import { McpAdrError } from './types/index.js';
|
|
16
16
|
import { CONVERSATION_CONTEXT_SCHEMA } from './types/conversation-context.js';
|
|
17
|
-
import { maskMcpResponse, createMaskingConfig } from './utils/output-masking.js';
|
|
17
|
+
import { maskMcpResponse, createMaskingConfig, } from './utils/output-masking.js';
|
|
18
18
|
import { loadConfig, validateProjectPath, createLogger, printConfigSummary, } from './utils/config.js';
|
|
19
19
|
import { KnowledgeGraphManager } from './utils/knowledge-graph-manager.js';
|
|
20
20
|
/**
|
|
@@ -99,7 +99,8 @@ export class McpAdrAnalysisServer {
|
|
|
99
99
|
this.logger.info(`Project path validated: ${this.config.projectPath}`);
|
|
100
100
|
}
|
|
101
101
|
catch (error) {
|
|
102
|
-
|
|
102
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
103
|
+
this.logger.error(`Configuration validation failed: ${errorMessage}`);
|
|
103
104
|
throw error;
|
|
104
105
|
}
|
|
105
106
|
}
|
|
@@ -686,6 +687,52 @@ export class McpAdrAnalysisServer {
|
|
|
686
687
|
required: ['decisionData'],
|
|
687
688
|
},
|
|
688
689
|
},
|
|
690
|
+
{
|
|
691
|
+
name: 'generate_adr_bootstrap',
|
|
692
|
+
description: 'Generate bootstrap.sh and validate_bootstrap.sh scripts to ensure deployed code follows ADR requirements',
|
|
693
|
+
inputSchema: {
|
|
694
|
+
type: 'object',
|
|
695
|
+
properties: {
|
|
696
|
+
projectPath: {
|
|
697
|
+
type: 'string',
|
|
698
|
+
description: 'Path to the project directory',
|
|
699
|
+
default: '.',
|
|
700
|
+
},
|
|
701
|
+
adrDirectory: {
|
|
702
|
+
type: 'string',
|
|
703
|
+
description: 'Directory where ADRs are stored',
|
|
704
|
+
default: 'docs/adrs',
|
|
705
|
+
},
|
|
706
|
+
outputPath: {
|
|
707
|
+
type: 'string',
|
|
708
|
+
description: 'Directory where to generate scripts',
|
|
709
|
+
default: '.',
|
|
710
|
+
},
|
|
711
|
+
scriptType: {
|
|
712
|
+
type: 'string',
|
|
713
|
+
enum: ['bootstrap', 'validate', 'both'],
|
|
714
|
+
description: 'Which scripts to generate',
|
|
715
|
+
default: 'both',
|
|
716
|
+
},
|
|
717
|
+
includeTests: {
|
|
718
|
+
type: 'boolean',
|
|
719
|
+
description: 'Include test execution in bootstrap',
|
|
720
|
+
default: true,
|
|
721
|
+
},
|
|
722
|
+
includeDeployment: {
|
|
723
|
+
type: 'boolean',
|
|
724
|
+
description: 'Include deployment steps in bootstrap',
|
|
725
|
+
default: true,
|
|
726
|
+
},
|
|
727
|
+
customValidations: {
|
|
728
|
+
type: 'array',
|
|
729
|
+
items: { type: 'string' },
|
|
730
|
+
description: 'Custom validation commands to include',
|
|
731
|
+
},
|
|
732
|
+
conversationContext: CONVERSATION_CONTEXT_SCHEMA,
|
|
733
|
+
},
|
|
734
|
+
},
|
|
735
|
+
},
|
|
689
736
|
{
|
|
690
737
|
name: 'discover_existing_adrs',
|
|
691
738
|
description: 'Discover and catalog existing ADRs in the project',
|
|
@@ -705,6 +752,46 @@ export class McpAdrAnalysisServer {
|
|
|
705
752
|
},
|
|
706
753
|
},
|
|
707
754
|
},
|
|
755
|
+
{
|
|
756
|
+
name: 'review_existing_adrs',
|
|
757
|
+
description: 'Review existing ADRs against actual code implementation with cloud/DevOps expertise',
|
|
758
|
+
inputSchema: {
|
|
759
|
+
type: 'object',
|
|
760
|
+
properties: {
|
|
761
|
+
adrDirectory: {
|
|
762
|
+
type: 'string',
|
|
763
|
+
description: 'Directory containing ADR files',
|
|
764
|
+
default: 'docs/adrs',
|
|
765
|
+
},
|
|
766
|
+
projectPath: {
|
|
767
|
+
type: 'string',
|
|
768
|
+
description: 'Path to the project directory',
|
|
769
|
+
default: '.',
|
|
770
|
+
},
|
|
771
|
+
specificAdr: {
|
|
772
|
+
type: 'string',
|
|
773
|
+
description: 'Specific ADR filename or title to review (optional)',
|
|
774
|
+
},
|
|
775
|
+
analysisDepth: {
|
|
776
|
+
type: 'string',
|
|
777
|
+
enum: ['basic', 'detailed', 'comprehensive'],
|
|
778
|
+
description: 'Depth of analysis to perform',
|
|
779
|
+
default: 'detailed',
|
|
780
|
+
},
|
|
781
|
+
includeTreeSitter: {
|
|
782
|
+
type: 'boolean',
|
|
783
|
+
description: 'Use tree-sitter for enhanced code analysis',
|
|
784
|
+
default: true,
|
|
785
|
+
},
|
|
786
|
+
generateUpdatePlan: {
|
|
787
|
+
type: 'boolean',
|
|
788
|
+
description: 'Generate action plan for updating non-compliant ADRs',
|
|
789
|
+
default: true,
|
|
790
|
+
},
|
|
791
|
+
conversationContext: CONVERSATION_CONTEXT_SCHEMA,
|
|
792
|
+
},
|
|
793
|
+
},
|
|
794
|
+
},
|
|
708
795
|
{
|
|
709
796
|
name: 'incorporate_research',
|
|
710
797
|
description: 'Incorporate research findings into architectural decisions',
|
|
@@ -2573,6 +2660,46 @@ export class McpAdrAnalysisServer {
|
|
|
2573
2660
|
},
|
|
2574
2661
|
},
|
|
2575
2662
|
},
|
|
2663
|
+
{
|
|
2664
|
+
name: 'tool_chain_orchestrator',
|
|
2665
|
+
description: 'AI-powered dynamic tool sequencing - intelligently analyze user requests and generate structured tool execution plans',
|
|
2666
|
+
inputSchema: {
|
|
2667
|
+
type: 'object',
|
|
2668
|
+
properties: {
|
|
2669
|
+
userRequest: {
|
|
2670
|
+
type: 'string',
|
|
2671
|
+
description: 'User request to analyze and create tool execution plan for',
|
|
2672
|
+
},
|
|
2673
|
+
availableTools: {
|
|
2674
|
+
type: 'array',
|
|
2675
|
+
items: { type: 'string' },
|
|
2676
|
+
description: 'List of available MCP tools to orchestrate',
|
|
2677
|
+
},
|
|
2678
|
+
executionMode: {
|
|
2679
|
+
type: 'string',
|
|
2680
|
+
enum: ['plan_only', 'plan_and_execute', 'validate_plan'],
|
|
2681
|
+
description: 'Orchestration mode',
|
|
2682
|
+
default: 'plan_only',
|
|
2683
|
+
},
|
|
2684
|
+
maxSteps: {
|
|
2685
|
+
type: 'number',
|
|
2686
|
+
description: 'Maximum number of steps in the execution plan',
|
|
2687
|
+
default: 10,
|
|
2688
|
+
},
|
|
2689
|
+
allowParallel: {
|
|
2690
|
+
type: 'boolean',
|
|
2691
|
+
description: 'Allow parallel execution of independent steps',
|
|
2692
|
+
default: true,
|
|
2693
|
+
},
|
|
2694
|
+
contextHints: {
|
|
2695
|
+
type: 'array',
|
|
2696
|
+
items: { type: 'string' },
|
|
2697
|
+
description: 'Additional context hints for better plan generation',
|
|
2698
|
+
},
|
|
2699
|
+
},
|
|
2700
|
+
required: ['userRequest'],
|
|
2701
|
+
},
|
|
2702
|
+
},
|
|
2576
2703
|
],
|
|
2577
2704
|
};
|
|
2578
2705
|
});
|
|
@@ -2581,123 +2708,133 @@ export class McpAdrAnalysisServer {
|
|
|
2581
2708
|
const { name, arguments: args } = request.params;
|
|
2582
2709
|
try {
|
|
2583
2710
|
let response;
|
|
2711
|
+
const safeArgs = args || {};
|
|
2584
2712
|
switch (name) {
|
|
2585
2713
|
case 'analyze_project_ecosystem':
|
|
2586
|
-
response = await this.analyzeProjectEcosystem(
|
|
2714
|
+
response = await this.analyzeProjectEcosystem(safeArgs);
|
|
2587
2715
|
break;
|
|
2588
2716
|
case 'get_architectural_context':
|
|
2589
|
-
response = await this.getArchitecturalContext(
|
|
2717
|
+
response = await this.getArchitecturalContext(safeArgs);
|
|
2590
2718
|
break;
|
|
2591
2719
|
case 'generate_adrs_from_prd':
|
|
2592
|
-
response = await this.generateAdrsFromPrd(
|
|
2720
|
+
response = await this.generateAdrsFromPrd(safeArgs);
|
|
2593
2721
|
break;
|
|
2594
2722
|
case 'generate_adr_todo':
|
|
2595
|
-
response = await this.generateAdrTodo(
|
|
2723
|
+
response = await this.generateAdrTodo(safeArgs);
|
|
2596
2724
|
break;
|
|
2597
2725
|
case 'compare_adr_progress':
|
|
2598
|
-
response = await this.compareAdrProgress(
|
|
2726
|
+
response = await this.compareAdrProgress(safeArgs);
|
|
2599
2727
|
break;
|
|
2600
2728
|
case 'analyze_content_security':
|
|
2601
|
-
response = await this.analyzeContentSecurity(
|
|
2729
|
+
response = await this.analyzeContentSecurity(safeArgs);
|
|
2602
2730
|
break;
|
|
2603
2731
|
case 'generate_content_masking':
|
|
2604
|
-
response = await this.generateContentMasking(
|
|
2732
|
+
response = await this.generateContentMasking(safeArgs);
|
|
2605
2733
|
break;
|
|
2606
2734
|
case 'configure_custom_patterns':
|
|
2607
|
-
response = await this.configureCustomPatterns(
|
|
2735
|
+
response = await this.configureCustomPatterns(safeArgs);
|
|
2608
2736
|
break;
|
|
2609
2737
|
case 'apply_basic_content_masking':
|
|
2610
|
-
response = await this.applyBasicContentMasking(
|
|
2738
|
+
response = await this.applyBasicContentMasking(safeArgs);
|
|
2611
2739
|
break;
|
|
2612
2740
|
case 'validate_content_masking':
|
|
2613
|
-
response = await this.validateContentMasking(
|
|
2741
|
+
response = await this.validateContentMasking(safeArgs);
|
|
2614
2742
|
break;
|
|
2615
2743
|
case 'manage_cache':
|
|
2616
|
-
response = await this.manageCache(
|
|
2744
|
+
response = await this.manageCache(safeArgs);
|
|
2617
2745
|
break;
|
|
2618
2746
|
case 'configure_output_masking':
|
|
2619
|
-
response = await this.configureOutputMasking(
|
|
2747
|
+
response = await this.configureOutputMasking(safeArgs);
|
|
2620
2748
|
break;
|
|
2621
2749
|
case 'suggest_adrs':
|
|
2622
|
-
response = await this.suggestAdrs(
|
|
2750
|
+
response = await this.suggestAdrs(safeArgs);
|
|
2623
2751
|
break;
|
|
2624
2752
|
case 'generate_adr_from_decision':
|
|
2625
|
-
response = await this.generateAdrFromDecision(
|
|
2753
|
+
response = await this.generateAdrFromDecision(safeArgs);
|
|
2754
|
+
break;
|
|
2755
|
+
case 'generate_adr_bootstrap':
|
|
2756
|
+
response = await this.generateAdrBootstrap(safeArgs);
|
|
2626
2757
|
break;
|
|
2627
2758
|
case 'discover_existing_adrs':
|
|
2628
|
-
response = await this.discoverExistingAdrs(
|
|
2759
|
+
response = await this.discoverExistingAdrs(safeArgs);
|
|
2760
|
+
break;
|
|
2761
|
+
case 'review_existing_adrs':
|
|
2762
|
+
response = await this.reviewExistingAdrs(safeArgs);
|
|
2629
2763
|
break;
|
|
2630
2764
|
case 'incorporate_research':
|
|
2631
|
-
response = await this.incorporateResearch(
|
|
2765
|
+
response = await this.incorporateResearch(safeArgs);
|
|
2632
2766
|
break;
|
|
2633
2767
|
case 'create_research_template':
|
|
2634
|
-
response = await this.createResearchTemplate(
|
|
2768
|
+
response = await this.createResearchTemplate(safeArgs);
|
|
2635
2769
|
break;
|
|
2636
2770
|
case 'request_action_confirmation':
|
|
2637
|
-
response = await this.requestActionConfirmation(
|
|
2771
|
+
response = await this.requestActionConfirmation(safeArgs);
|
|
2638
2772
|
break;
|
|
2639
2773
|
case 'generate_rules':
|
|
2640
|
-
response = await this.generateRules(
|
|
2774
|
+
response = await this.generateRules(safeArgs);
|
|
2641
2775
|
break;
|
|
2642
2776
|
case 'validate_rules':
|
|
2643
|
-
response = await this.validateRules(
|
|
2777
|
+
response = await this.validateRules(safeArgs);
|
|
2644
2778
|
break;
|
|
2645
2779
|
case 'create_rule_set':
|
|
2646
|
-
response = await this.createRuleSet(
|
|
2780
|
+
response = await this.createRuleSet(safeArgs);
|
|
2647
2781
|
break;
|
|
2648
2782
|
case 'analyze_environment':
|
|
2649
|
-
response = await this.analyzeEnvironment(
|
|
2783
|
+
response = await this.analyzeEnvironment(safeArgs);
|
|
2650
2784
|
break;
|
|
2651
2785
|
case 'generate_research_questions':
|
|
2652
|
-
response = await this.generateResearchQuestions(
|
|
2786
|
+
response = await this.generateResearchQuestions(safeArgs);
|
|
2653
2787
|
break;
|
|
2654
2788
|
case 'analyze_deployment_progress':
|
|
2655
|
-
response = await this.analyzeDeploymentProgress(
|
|
2789
|
+
response = await this.analyzeDeploymentProgress(safeArgs);
|
|
2656
2790
|
break;
|
|
2657
2791
|
case 'check_ai_execution_status':
|
|
2658
|
-
response = await this.checkAIExecutionStatus(
|
|
2792
|
+
response = await this.checkAIExecutionStatus(safeArgs);
|
|
2659
2793
|
break;
|
|
2660
2794
|
case 'get_workflow_guidance':
|
|
2661
|
-
response = await this.getWorkflowGuidance(
|
|
2795
|
+
response = await this.getWorkflowGuidance(safeArgs);
|
|
2662
2796
|
break;
|
|
2663
2797
|
case 'get_development_guidance':
|
|
2664
|
-
response = await this.getDevelopmentGuidance(
|
|
2798
|
+
response = await this.getDevelopmentGuidance(safeArgs);
|
|
2665
2799
|
break;
|
|
2666
2800
|
case 'read_file':
|
|
2667
|
-
response = await this.readFile(
|
|
2801
|
+
response = await this.readFile(safeArgs);
|
|
2668
2802
|
break;
|
|
2669
2803
|
case 'write_file':
|
|
2670
|
-
response = await this.writeFile(
|
|
2804
|
+
response = await this.writeFile(safeArgs);
|
|
2671
2805
|
break;
|
|
2672
2806
|
case 'list_directory':
|
|
2673
|
-
response = await this.listDirectory(
|
|
2807
|
+
response = await this.listDirectory(safeArgs);
|
|
2674
2808
|
break;
|
|
2675
2809
|
case 'manage_todo_json':
|
|
2676
|
-
response = await this.manageTodoJson(
|
|
2810
|
+
response = await this.manageTodoJson(safeArgs);
|
|
2677
2811
|
break;
|
|
2678
2812
|
case 'generate_deployment_guidance':
|
|
2679
|
-
response = await this.generateDeploymentGuidance(
|
|
2813
|
+
response = await this.generateDeploymentGuidance(safeArgs);
|
|
2680
2814
|
break;
|
|
2681
2815
|
case 'smart_git_push':
|
|
2682
|
-
response = await this.smartGitPush(
|
|
2816
|
+
response = await this.smartGitPush(safeArgs);
|
|
2683
2817
|
break;
|
|
2684
2818
|
case 'deployment_readiness':
|
|
2685
|
-
response = await this.deploymentReadiness(
|
|
2819
|
+
response = await this.deploymentReadiness(safeArgs);
|
|
2686
2820
|
break;
|
|
2687
2821
|
case 'troubleshoot_guided_workflow':
|
|
2688
|
-
response = await this.troubleshootGuidedWorkflow(
|
|
2822
|
+
response = await this.troubleshootGuidedWorkflow(safeArgs);
|
|
2689
2823
|
break;
|
|
2690
2824
|
case 'smart_score':
|
|
2691
|
-
response = await this.smartScore(
|
|
2825
|
+
response = await this.smartScore(safeArgs);
|
|
2692
2826
|
break;
|
|
2693
2827
|
case 'mcp_planning':
|
|
2694
|
-
response = await this.mcpPlanning(
|
|
2828
|
+
response = await this.mcpPlanning(safeArgs);
|
|
2695
2829
|
break;
|
|
2696
2830
|
case 'memory_loading':
|
|
2697
|
-
response = await this.memoryLoading(
|
|
2831
|
+
response = await this.memoryLoading(safeArgs);
|
|
2698
2832
|
break;
|
|
2699
2833
|
case 'interactive_adr_planning':
|
|
2700
|
-
response = await this.interactiveAdrPlanning(
|
|
2834
|
+
response = await this.interactiveAdrPlanning(safeArgs);
|
|
2835
|
+
break;
|
|
2836
|
+
case 'tool_chain_orchestrator':
|
|
2837
|
+
response = await this.toolChainOrchestrator(safeArgs);
|
|
2701
2838
|
break;
|
|
2702
2839
|
default:
|
|
2703
2840
|
throw new McpAdrError(`Unknown tool: ${name}`, 'UNKNOWN_TOOL');
|
|
@@ -3338,7 +3475,7 @@ This guidance ensures your development work is **architecturally aligned**, **qu
|
|
|
3338
3475
|
this.logger.info(`Analysis scope: ${analysisScope.length > 0 ? analysisScope.join(', ') : 'Full ecosystem analysis'}`);
|
|
3339
3476
|
try {
|
|
3340
3477
|
// Import utilities dynamically to avoid circular dependencies
|
|
3341
|
-
const { analyzeProjectStructure } = await import('./utils/file-system.js');
|
|
3478
|
+
const { analyzeProjectStructureCompat: analyzeProjectStructure } = await import('./utils/file-system.js');
|
|
3342
3479
|
// Import advanced prompting utilities if enhanced mode is enabled
|
|
3343
3480
|
let generateArchitecturalKnowledge = null;
|
|
3344
3481
|
let executeWithReflexion = null;
|
|
@@ -3654,7 +3791,7 @@ The enhanced analysis should provide:
|
|
|
3654
3791
|
async getArchitecturalContext(args) {
|
|
3655
3792
|
const { filePath, includeCompliance = true } = args;
|
|
3656
3793
|
try {
|
|
3657
|
-
const { analyzeProjectStructure, fileExists, ensureDirectory } = await import('./utils/file-system.js');
|
|
3794
|
+
const { analyzeProjectStructureCompat: analyzeProjectStructure, fileExistsCompat: fileExists, ensureDirectoryCompat: ensureDirectory, } = await import('./utils/file-system.js');
|
|
3658
3795
|
const path = await import('path');
|
|
3659
3796
|
// Determine project path
|
|
3660
3797
|
const projectPath = filePath
|
|
@@ -3894,11 +4031,11 @@ This **outcome-focused approach** ensures architectural work delivers **measurab
|
|
|
3894
4031
|
}
|
|
3895
4032
|
async generateAdrsFromPrd(args) {
|
|
3896
4033
|
const { prdPath, enhancedMode = true, promptOptimization = true, knowledgeEnhancement = true, prdType = 'general', } = args;
|
|
3897
|
-
const outputDirectory = args
|
|
4034
|
+
const outputDirectory = args['outputDirectory'] || this.config.adrDirectory;
|
|
3898
4035
|
this.logger.info(`Generating enhanced ADRs from PRD: ${prdPath} to ${outputDirectory}`);
|
|
3899
4036
|
this.logger.info(`Enhancement features - APE: ${promptOptimization}, Knowledge: ${knowledgeEnhancement}, Type: ${prdType}`);
|
|
3900
4037
|
try {
|
|
3901
|
-
const { readFileContent, fileExists } = await import('./utils/file-system.js');
|
|
4038
|
+
const { readFileContentCompat: readFileContent, fileExistsCompat: fileExists } = await import('./utils/file-system.js');
|
|
3902
4039
|
// Import advanced prompting utilities if enhanced mode is enabled
|
|
3903
4040
|
let generateArchitecturalKnowledge = null;
|
|
3904
4041
|
let optimizePromptWithAPE = null;
|
|
@@ -4167,11 +4304,11 @@ The enhanced process maintains full traceability from PRD requirements to genera
|
|
|
4167
4304
|
const { getAdrDirectoryPath } = await import('./utils/config.js');
|
|
4168
4305
|
const path = await import('path');
|
|
4169
4306
|
// Use absolute ADR path relative to project
|
|
4170
|
-
const absoluteAdrPath = args
|
|
4171
|
-
? path.resolve(this.config.projectPath, args
|
|
4307
|
+
const absoluteAdrPath = args['adrDirectory']
|
|
4308
|
+
? path.resolve(this.config.projectPath, args['adrDirectory'])
|
|
4172
4309
|
: getAdrDirectoryPath(this.config);
|
|
4173
4310
|
// Keep relative path for display purposes
|
|
4174
|
-
const adrDirectory = args
|
|
4311
|
+
const adrDirectory = args['adrDirectory'] || this.config.adrDirectory;
|
|
4175
4312
|
this.logger.info(`Generating JSON-first TODO for ADRs in: ${absoluteAdrPath} (phase: ${phase})`);
|
|
4176
4313
|
try {
|
|
4177
4314
|
// Always use JSON-first TODO system
|
|
@@ -4183,7 +4320,7 @@ The enhanced process maintains full traceability from PRD requirements to genera
|
|
|
4183
4320
|
try {
|
|
4184
4321
|
this.logger.info('Backup feature deprecated - use mcp-shrimp-task-manager for task management');
|
|
4185
4322
|
}
|
|
4186
|
-
catch
|
|
4323
|
+
catch {
|
|
4187
4324
|
// Continue if backup fails - might be first time setup
|
|
4188
4325
|
this.logger.debug('No existing JSON data to backup');
|
|
4189
4326
|
}
|
|
@@ -4329,16 +4466,16 @@ ${importResult.content?.[0]?.text || 'TODO management feature has been deprecate
|
|
|
4329
4466
|
discoveredAdrs: discoveryResult?.adrs || [],
|
|
4330
4467
|
adrDirectory: absoluteAdrPath,
|
|
4331
4468
|
projectStructure: projectStructure || null,
|
|
4332
|
-
projectPath,
|
|
4333
|
-
validationType,
|
|
4334
|
-
includeFileChecks,
|
|
4335
|
-
includeRuleValidation,
|
|
4336
|
-
deepCodeAnalysis,
|
|
4337
|
-
functionalValidation,
|
|
4338
|
-
strictMode,
|
|
4469
|
+
projectPath: projectPath,
|
|
4470
|
+
validationType: validationType,
|
|
4471
|
+
includeFileChecks: includeFileChecks,
|
|
4472
|
+
includeRuleValidation: includeRuleValidation,
|
|
4473
|
+
deepCodeAnalysis: deepCodeAnalysis,
|
|
4474
|
+
functionalValidation: functionalValidation,
|
|
4475
|
+
strictMode: strictMode,
|
|
4339
4476
|
environment: detectedEnvironment,
|
|
4340
4477
|
environmentConfig: finalEnvironmentConfig,
|
|
4341
|
-
environmentValidation,
|
|
4478
|
+
environmentValidation: environmentValidation,
|
|
4342
4479
|
});
|
|
4343
4480
|
return {
|
|
4344
4481
|
content: [
|
|
@@ -5168,7 +5305,8 @@ ${this.maskingConfig.enabled ? '✅ Output masking is ACTIVE' : '⚠️ Output m
|
|
|
5168
5305
|
if (typeof enabled === 'boolean') {
|
|
5169
5306
|
newConfig.enabled = enabled;
|
|
5170
5307
|
}
|
|
5171
|
-
if (strategy &&
|
|
5308
|
+
if (strategy &&
|
|
5309
|
+
['full', 'partial', 'placeholder', 'environment'].includes(strategy)) {
|
|
5172
5310
|
newConfig.strategy = strategy;
|
|
5173
5311
|
}
|
|
5174
5312
|
if (Array.isArray(customPatterns)) {
|
|
@@ -5402,10 +5540,18 @@ Please provide:
|
|
|
5402
5540
|
const { generateAdrFromDecision } = await import('./tools/adr-suggestion-tool.js');
|
|
5403
5541
|
return await generateAdrFromDecision(args);
|
|
5404
5542
|
}
|
|
5543
|
+
async generateAdrBootstrap(args) {
|
|
5544
|
+
const { default: generateAdrBootstrapScripts } = await import('./tools/adr-bootstrap-validation-tool.js');
|
|
5545
|
+
return await generateAdrBootstrapScripts(args);
|
|
5546
|
+
}
|
|
5405
5547
|
async discoverExistingAdrs(args) {
|
|
5406
5548
|
const { discoverExistingAdrs } = await import('./tools/adr-suggestion-tool.js');
|
|
5407
5549
|
return await discoverExistingAdrs(args);
|
|
5408
5550
|
}
|
|
5551
|
+
async reviewExistingAdrs(args) {
|
|
5552
|
+
const { reviewExistingAdrs } = await import('./tools/review-existing-adrs-tool.js');
|
|
5553
|
+
return await reviewExistingAdrs(args);
|
|
5554
|
+
}
|
|
5409
5555
|
/**
|
|
5410
5556
|
* Research integration tool implementations
|
|
5411
5557
|
*/
|
|
@@ -5751,7 +5897,7 @@ Please provide:
|
|
|
5751
5897
|
* File system tool implementations
|
|
5752
5898
|
*/
|
|
5753
5899
|
async readFile(args) {
|
|
5754
|
-
const {
|
|
5900
|
+
const { filePath } = args;
|
|
5755
5901
|
try {
|
|
5756
5902
|
const fs = await import('fs/promises');
|
|
5757
5903
|
const path = await import('path');
|
|
@@ -5776,7 +5922,7 @@ Please provide:
|
|
|
5776
5922
|
}
|
|
5777
5923
|
}
|
|
5778
5924
|
async writeFile(args) {
|
|
5779
|
-
const {
|
|
5925
|
+
const { filePath, content } = args;
|
|
5780
5926
|
try {
|
|
5781
5927
|
const fs = await import('fs/promises');
|
|
5782
5928
|
const path = await import('path');
|
|
@@ -5954,6 +6100,18 @@ This tool has been deprecated and replaced with memory-centric health scoring.
|
|
|
5954
6100
|
throw new McpAdrError(`Interactive ADR planning failed: ${error instanceof Error ? error.message : String(error)}`, 'INTERACTIVE_ADR_PLANNING_ERROR');
|
|
5955
6101
|
}
|
|
5956
6102
|
}
|
|
6103
|
+
/**
|
|
6104
|
+
* Tool chain orchestrator implementation
|
|
6105
|
+
*/
|
|
6106
|
+
async toolChainOrchestrator(args) {
|
|
6107
|
+
try {
|
|
6108
|
+
const { toolChainOrchestrator } = await import('./tools/tool-chain-orchestrator.js');
|
|
6109
|
+
return await toolChainOrchestrator(args);
|
|
6110
|
+
}
|
|
6111
|
+
catch (error) {
|
|
6112
|
+
throw new McpAdrError(`Tool chain orchestration failed: ${error instanceof Error ? error.message : String(error)}`, 'TOOL_CHAIN_ORCHESTRATOR_ERROR');
|
|
6113
|
+
}
|
|
6114
|
+
}
|
|
5957
6115
|
}
|
|
5958
6116
|
/**
|
|
5959
6117
|
* Main execution
|