mcp-adr-analysis-server 2.1.20 → 2.1.22
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 +1 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/src/config/ai-config.d.ts +54 -6
- package/dist/src/config/ai-config.d.ts.map +1 -1
- package/dist/src/config/ai-config.js +69 -6
- package/dist/src/config/ai-config.js.map +1 -1
- package/dist/src/config/ape-descriptions.d.ts +77 -0
- package/dist/src/config/ape-descriptions.d.ts.map +1 -0
- package/dist/src/config/ape-descriptions.js +177 -0
- package/dist/src/config/ape-descriptions.js.map +1 -0
- package/dist/src/index.d.ts +40 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +564 -8
- package/dist/src/index.js.map +1 -1
- package/dist/src/prompts/adr-suggestion-prompts.d.ts +5 -0
- package/dist/src/prompts/adr-suggestion-prompts.d.ts.map +1 -1
- package/dist/src/prompts/adr-suggestion-prompts.js +22 -1
- package/dist/src/prompts/adr-suggestion-prompts.js.map +1 -1
- package/dist/src/prompts/prompt-catalog.d.ts +95 -0
- package/dist/src/prompts/prompt-catalog.d.ts.map +1 -0
- package/dist/src/prompts/prompt-catalog.js +300 -0
- package/dist/src/prompts/prompt-catalog.js.map +1 -0
- package/dist/src/resources/adrs-discovered-resource.d.ts +124 -0
- package/dist/src/resources/adrs-discovered-resource.d.ts.map +1 -0
- package/dist/src/resources/adrs-discovered-resource.js +174 -0
- package/dist/src/resources/adrs-discovered-resource.js.map +1 -0
- package/dist/src/resources/adrs-review-resource.d.ts +82 -0
- package/dist/src/resources/adrs-review-resource.d.ts.map +1 -0
- package/dist/src/resources/adrs-review-resource.js +160 -0
- package/dist/src/resources/adrs-review-resource.js.map +1 -0
- package/dist/src/resources/architectural-context-resource.d.ts +95 -0
- package/dist/src/resources/architectural-context-resource.d.ts.map +1 -0
- package/dist/src/resources/architectural-context-resource.js +428 -0
- package/dist/src/resources/architectural-context-resource.js.map +1 -0
- package/dist/src/resources/conversation-snapshot-resource.d.ts +92 -0
- package/dist/src/resources/conversation-snapshot-resource.d.ts.map +1 -0
- package/dist/src/resources/conversation-snapshot-resource.js +122 -0
- package/dist/src/resources/conversation-snapshot-resource.js.map +1 -0
- package/dist/src/resources/deployment-status-resource.js +1 -1
- package/dist/src/resources/deployment-status-resource.js.map +1 -1
- package/dist/src/resources/environment-analysis-resource.js +1 -1
- package/dist/src/resources/environment-analysis-resource.js.map +1 -1
- package/dist/src/resources/knowledge-graph-resource.d.ts +129 -0
- package/dist/src/resources/knowledge-graph-resource.d.ts.map +1 -0
- package/dist/src/resources/knowledge-graph-resource.js +217 -0
- package/dist/src/resources/knowledge-graph-resource.js.map +1 -0
- package/dist/src/resources/memory-expand-resource.d.ts +90 -0
- package/dist/src/resources/memory-expand-resource.d.ts.map +1 -0
- package/dist/src/resources/memory-expand-resource.js +176 -0
- package/dist/src/resources/memory-expand-resource.js.map +1 -0
- package/dist/src/resources/memory-stats-resource.d.ts +77 -0
- package/dist/src/resources/memory-stats-resource.d.ts.map +1 -0
- package/dist/src/resources/memory-stats-resource.js +108 -0
- package/dist/src/resources/memory-stats-resource.js.map +1 -0
- package/dist/src/resources/project-metrics-resource.js +1 -1
- package/dist/src/resources/project-metrics-resource.js.map +1 -1
- package/dist/src/resources/resource-cache.d.ts.map +1 -1
- package/dist/src/resources/resource-cache.js +2 -1
- package/dist/src/resources/resource-cache.js.map +1 -1
- package/dist/src/resources/server-context-resource.d.ts +69 -0
- package/dist/src/resources/server-context-resource.d.ts.map +1 -0
- package/dist/src/resources/server-context-resource.js +104 -0
- package/dist/src/resources/server-context-resource.js.map +1 -0
- package/dist/src/resources/tool-catalog-resource.d.ts +122 -0
- package/dist/src/resources/tool-catalog-resource.d.ts.map +1 -0
- package/dist/src/resources/tool-catalog-resource.js +167 -0
- package/dist/src/resources/tool-catalog-resource.js.map +1 -0
- package/dist/src/tools/adr-bootstrap-validation-tool.d.ts.map +1 -1
- package/dist/src/tools/adr-bootstrap-validation-tool.js +7 -6
- package/dist/src/tools/adr-bootstrap-validation-tool.js.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.d.ts +5 -0
- package/dist/src/tools/adr-suggestion-tool.d.ts.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.js +40 -71
- package/dist/src/tools/adr-suggestion-tool.js.map +1 -1
- package/dist/src/tools/bootstrap-validation-loop-tool.d.ts +23 -1
- package/dist/src/tools/bootstrap-validation-loop-tool.d.ts.map +1 -1
- package/dist/src/tools/bootstrap-validation-loop-tool.js +15 -5
- package/dist/src/tools/bootstrap-validation-loop-tool.js.map +1 -1
- package/dist/src/tools/ce-mcp-tools.d.ts +291 -0
- package/dist/src/tools/ce-mcp-tools.d.ts.map +1 -0
- package/dist/src/tools/ce-mcp-tools.js +1188 -0
- package/dist/src/tools/ce-mcp-tools.js.map +1 -0
- package/dist/src/tools/content-masking-tool.d.ts +11 -0
- package/dist/src/tools/content-masking-tool.d.ts.map +1 -1
- package/dist/src/tools/content-masking-tool.js +13 -6
- package/dist/src/tools/content-masking-tool.js.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.d.ts +11 -0
- package/dist/src/tools/deployment-readiness-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.js +10 -4
- package/dist/src/tools/deployment-readiness-tool.js.map +1 -1
- package/dist/src/tools/environment-analysis-tool.d.ts +96 -1
- package/dist/src/tools/environment-analysis-tool.d.ts.map +1 -1
- package/dist/src/tools/environment-analysis-tool.js +38 -46
- package/dist/src/tools/environment-analysis-tool.js.map +1 -1
- package/dist/src/tools/research-question-tool.d.ts.map +1 -1
- package/dist/src/tools/research-question-tool.js +3 -2
- package/dist/src/tools/research-question-tool.js.map +1 -1
- package/dist/src/tools/review-existing-adrs-tool.d.ts +5 -0
- package/dist/src/tools/review-existing-adrs-tool.d.ts.map +1 -1
- package/dist/src/tools/review-existing-adrs-tool.js +123 -42
- package/dist/src/tools/review-existing-adrs-tool.js.map +1 -1
- package/dist/src/tools/rule-generation-tool.d.ts.map +1 -1
- package/dist/src/tools/rule-generation-tool.js +3 -5
- package/dist/src/tools/rule-generation-tool.js.map +1 -1
- package/dist/src/tools/search-codebase-tool.d.ts +148 -0
- package/dist/src/tools/search-codebase-tool.d.ts.map +1 -0
- package/dist/src/tools/search-codebase-tool.js +406 -0
- package/dist/src/tools/search-codebase-tool.js.map +1 -0
- package/dist/src/tools/smart-git-push-tool-v2.js +1 -1
- package/dist/src/tools/smart-git-push-tool-v2.js.map +1 -1
- package/dist/src/tools/tool-catalog.d.ts +134 -0
- package/dist/src/tools/tool-catalog.d.ts.map +1 -0
- package/dist/src/tools/tool-catalog.js +1431 -0
- package/dist/src/tools/tool-catalog.js.map +1 -0
- package/dist/src/tools/tool-chain-orchestrator.d.ts +11 -2
- package/dist/src/tools/tool-chain-orchestrator.d.ts.map +1 -1
- package/dist/src/tools/tool-chain-orchestrator.js +11 -2
- package/dist/src/tools/tool-chain-orchestrator.js.map +1 -1
- package/dist/src/tools/tool-dispatcher.d.ts +98 -0
- package/dist/src/tools/tool-dispatcher.d.ts.map +1 -0
- package/dist/src/tools/tool-dispatcher.js +225 -0
- package/dist/src/tools/tool-dispatcher.js.map +1 -0
- package/dist/src/tools/tree-sitter-code-tools.d.ts +184 -0
- package/dist/src/tools/tree-sitter-code-tools.d.ts.map +1 -0
- package/dist/src/tools/tree-sitter-code-tools.js +642 -0
- package/dist/src/tools/tree-sitter-code-tools.js.map +1 -0
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts +22 -0
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js +20 -3
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js.map +1 -1
- package/dist/src/tools/update-knowledge-tool.d.ts +89 -0
- package/dist/src/tools/update-knowledge-tool.d.ts.map +1 -0
- package/dist/src/tools/update-knowledge-tool.js +222 -0
- package/dist/src/tools/update-knowledge-tool.js.map +1 -0
- package/dist/src/types/ce-mcp.d.ts +248 -0
- package/dist/src/types/ce-mcp.d.ts.map +1 -0
- package/dist/src/types/ce-mcp.js +27 -0
- package/dist/src/types/ce-mcp.js.map +1 -0
- package/dist/src/utils/adr-context-detector.js +1 -1
- package/dist/src/utils/adr-context-detector.js.map +1 -1
- package/dist/src/utils/adr-planning-task-integration.d.ts +260 -0
- package/dist/src/utils/adr-planning-task-integration.d.ts.map +1 -0
- package/dist/src/utils/adr-planning-task-integration.js +466 -0
- package/dist/src/utils/adr-planning-task-integration.js.map +1 -0
- package/dist/src/utils/adr-timeline-extractor.d.ts.map +1 -1
- package/dist/src/utils/adr-timeline-extractor.js +3 -2
- package/dist/src/utils/adr-timeline-extractor.js.map +1 -1
- package/dist/src/utils/ai-executor.d.ts +10 -0
- package/dist/src/utils/ai-executor.d.ts.map +1 -1
- package/dist/src/utils/ai-executor.js +14 -3
- package/dist/src/utils/ai-executor.js.map +1 -1
- package/dist/src/utils/automatic-prompt-engineering.d.ts +5 -0
- package/dist/src/utils/automatic-prompt-engineering.d.ts.map +1 -1
- package/dist/src/utils/automatic-prompt-engineering.js +10 -90
- package/dist/src/utils/automatic-prompt-engineering.js.map +1 -1
- package/dist/src/utils/bootstrap-task-integration.d.ts +214 -0
- package/dist/src/utils/bootstrap-task-integration.d.ts.map +1 -0
- package/dist/src/utils/bootstrap-task-integration.js +365 -0
- package/dist/src/utils/bootstrap-task-integration.js.map +1 -0
- package/dist/src/utils/dag-executor.js +1 -1
- package/dist/src/utils/dag-executor.js.map +1 -1
- package/dist/src/utils/deployment-task-integration.d.ts +260 -0
- package/dist/src/utils/deployment-task-integration.d.ts.map +1 -0
- package/dist/src/utils/deployment-task-integration.js +393 -0
- package/dist/src/utils/deployment-task-integration.js.map +1 -0
- package/dist/src/utils/dynamic-deployment-intelligence.js +1 -1
- package/dist/src/utils/dynamic-deployment-intelligence.js.map +1 -1
- package/dist/src/utils/enhanced-logging.d.ts +3 -0
- package/dist/src/utils/enhanced-logging.d.ts.map +1 -1
- package/dist/src/utils/enhanced-logging.js +9 -30
- package/dist/src/utils/enhanced-logging.js.map +1 -1
- package/dist/src/utils/environment-capability-registry.js +1 -1
- package/dist/src/utils/environment-capability-registry.js.map +1 -1
- package/dist/src/utils/file-system.d.ts.map +1 -1
- package/dist/src/utils/file-system.js +33 -3
- package/dist/src/utils/file-system.js.map +1 -1
- package/dist/src/utils/gitleaks-detector.js +1 -1
- package/dist/src/utils/gitleaks-detector.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 +13 -0
- package/dist/src/utils/knowledge-graph-manager.js.map +1 -1
- package/dist/src/utils/prompt-execution.d.ts +29 -1
- package/dist/src/utils/prompt-execution.d.ts.map +1 -1
- package/dist/src/utils/prompt-execution.js +29 -1
- package/dist/src/utils/prompt-execution.js.map +1 -1
- package/dist/src/utils/research-orchestrator.d.ts +87 -1
- package/dist/src/utils/research-orchestrator.d.ts.map +1 -1
- package/dist/src/utils/research-orchestrator.js +121 -17
- package/dist/src/utils/research-orchestrator.js.map +1 -1
- package/dist/src/utils/research-task-integration.d.ts +297 -0
- package/dist/src/utils/research-task-integration.d.ts.map +1 -0
- package/dist/src/utils/research-task-integration.js +449 -0
- package/dist/src/utils/research-task-integration.js.map +1 -0
- package/dist/src/utils/ripgrep-wrapper.d.ts.map +1 -1
- package/dist/src/utils/ripgrep-wrapper.js +17 -3
- package/dist/src/utils/ripgrep-wrapper.js.map +1 -1
- package/dist/src/utils/sandbox-executor.d.ts +145 -0
- package/dist/src/utils/sandbox-executor.d.ts.map +1 -0
- package/dist/src/utils/sandbox-executor.js +642 -0
- package/dist/src/utils/sandbox-executor.js.map +1 -0
- package/dist/src/utils/server-context-generator.d.ts +5 -0
- package/dist/src/utils/server-context-generator.d.ts.map +1 -1
- package/dist/src/utils/server-context-generator.js +38 -0
- package/dist/src/utils/server-context-generator.js.map +1 -1
- package/dist/src/utils/task-manager.d.ts +239 -0
- package/dist/src/utils/task-manager.d.ts.map +1 -0
- package/dist/src/utils/task-manager.js +528 -0
- package/dist/src/utils/task-manager.js.map +1 -0
- package/dist/src/utils/task-persistence.d.ts +82 -0
- package/dist/src/utils/task-persistence.d.ts.map +1 -0
- package/dist/src/utils/task-persistence.js +248 -0
- package/dist/src/utils/task-persistence.js.map +1 -0
- package/dist/src/utils/test-aware-defaults.d.ts +57 -0
- package/dist/src/utils/test-aware-defaults.d.ts.map +1 -0
- package/dist/src/utils/test-aware-defaults.js +71 -0
- package/dist/src/utils/test-aware-defaults.js.map +1 -0
- package/dist/src/utils/tree-sitter-analyzer.d.ts +42 -5
- package/dist/src/utils/tree-sitter-analyzer.d.ts.map +1 -1
- package/dist/src/utils/tree-sitter-analyzer.js +499 -17
- package/dist/src/utils/tree-sitter-analyzer.js.map +1 -1
- package/package.json +24 -19
- package/dist/src/tools/smart-git-push-tool.d.ts +0 -55
- package/dist/src/tools/smart-git-push-tool.d.ts.map +0 -1
- package/dist/src/tools/smart-git-push-tool.js +0 -1011
- package/dist/src/tools/smart-git-push-tool.js.map +0 -1
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* AI Configuration for OpenRouter.ai Integration
|
|
2
|
+
* AI Configuration for OpenRouter.ai Integration and CE-MCP
|
|
3
3
|
*
|
|
4
4
|
* This module handles configuration for AI execution capabilities,
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* supporting both legacy OpenRouter execution and the new CE-MCP
|
|
6
|
+
* (Code Execution with MCP) paradigm.
|
|
7
|
+
*
|
|
8
|
+
* @see ADR-014: CE-MCP Architecture
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Execution mode for AI operations
|
|
12
|
+
*
|
|
13
|
+
* - 'full': Execute prompts via OpenRouter (legacy)
|
|
14
|
+
* - 'prompt-only': Return prompts without execution (legacy)
|
|
15
|
+
* - 'ce-mcp': Return orchestration directives for host LLM (recommended)
|
|
16
|
+
* - 'hybrid': Support both CE-MCP and OpenRouter fallback
|
|
7
17
|
*/
|
|
18
|
+
export type ExecutionMode = 'full' | 'prompt-only' | 'ce-mcp' | 'hybrid';
|
|
8
19
|
export interface AIConfig {
|
|
9
20
|
/** OpenRouter API key for authentication */
|
|
10
21
|
apiKey: string;
|
|
@@ -12,8 +23,8 @@ export interface AIConfig {
|
|
|
12
23
|
baseURL: string;
|
|
13
24
|
/** Default AI model to use for prompt execution */
|
|
14
25
|
defaultModel: string;
|
|
15
|
-
/** Execution mode
|
|
16
|
-
executionMode:
|
|
26
|
+
/** Execution mode */
|
|
27
|
+
executionMode: ExecutionMode;
|
|
17
28
|
/** Site URL for OpenRouter rankings (optional) */
|
|
18
29
|
siteUrl?: string;
|
|
19
30
|
/** Site name for OpenRouter rankings (optional) */
|
|
@@ -30,6 +41,27 @@ export interface AIConfig {
|
|
|
30
41
|
cacheEnabled: boolean;
|
|
31
42
|
/** Cache TTL in seconds */
|
|
32
43
|
cacheTTL: number;
|
|
44
|
+
/** CE-MCP specific configuration */
|
|
45
|
+
cemcp?: CEMCPSettings;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* CE-MCP specific settings
|
|
49
|
+
*/
|
|
50
|
+
export interface CEMCPSettings {
|
|
51
|
+
/** Enable sandbox execution */
|
|
52
|
+
sandboxEnabled: boolean;
|
|
53
|
+
/** Sandbox execution timeout in ms */
|
|
54
|
+
sandboxTimeout: number;
|
|
55
|
+
/** Sandbox memory limit in bytes */
|
|
56
|
+
sandboxMemoryLimit: number;
|
|
57
|
+
/** Maximum file system operations */
|
|
58
|
+
sandboxFsLimit: number;
|
|
59
|
+
/** Allow network access in sandbox */
|
|
60
|
+
sandboxNetworkAllowed: boolean;
|
|
61
|
+
/** Enable lazy prompt loading */
|
|
62
|
+
lazyPromptLoading: boolean;
|
|
63
|
+
/** Use OpenRouter as fallback when CE-MCP fails */
|
|
64
|
+
openRouterFallback: boolean;
|
|
33
65
|
}
|
|
34
66
|
export interface ModelConfig {
|
|
35
67
|
/** Model identifier for OpenRouter */
|
|
@@ -51,6 +83,10 @@ export interface ModelConfig {
|
|
|
51
83
|
* Available AI models for different use cases
|
|
52
84
|
*/
|
|
53
85
|
export declare const AVAILABLE_MODELS: Record<string, ModelConfig>;
|
|
86
|
+
/**
|
|
87
|
+
* Default CE-MCP settings
|
|
88
|
+
*/
|
|
89
|
+
export declare const DEFAULT_CEMCP_SETTINGS: CEMCPSettings;
|
|
54
90
|
/**
|
|
55
91
|
* Default AI configuration
|
|
56
92
|
*/
|
|
@@ -71,9 +107,21 @@ export declare function validateAIConfig(config: AIConfig): void;
|
|
|
71
107
|
*/
|
|
72
108
|
export declare function getModelConfig(modelId: string): ModelConfig | undefined;
|
|
73
109
|
/**
|
|
74
|
-
* Check if AI execution is enabled
|
|
110
|
+
* Check if AI execution is enabled (legacy OpenRouter mode)
|
|
75
111
|
*/
|
|
76
112
|
export declare function isAIExecutionEnabled(config: AIConfig): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Check if CE-MCP mode is enabled
|
|
115
|
+
*/
|
|
116
|
+
export declare function isCEMCPEnabled(config: AIConfig): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Check if OpenRouter fallback is available
|
|
119
|
+
*/
|
|
120
|
+
export declare function isOpenRouterFallbackAvailable(config: AIConfig): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Get the effective execution mode based on configuration and available resources
|
|
123
|
+
*/
|
|
124
|
+
export declare function getEffectiveExecutionMode(config: AIConfig): ExecutionMode;
|
|
77
125
|
/**
|
|
78
126
|
* Get recommended model for a specific use case
|
|
79
127
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-config.d.ts","sourceRoot":"","sources":["../../../src/config/ai-config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ai-config.d.ts","sourceRoot":"","sources":["../../../src/config/ai-config.ts"],"names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
|
|
|
1
1
|
/**
|
|
2
|
-
* AI Configuration for OpenRouter.ai Integration
|
|
2
|
+
* AI Configuration for OpenRouter.ai Integration and CE-MCP
|
|
3
3
|
*
|
|
4
4
|
* This module handles configuration for AI execution capabilities,
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* supporting both legacy OpenRouter execution and the new CE-MCP
|
|
6
|
+
* (Code Execution with MCP) paradigm.
|
|
7
|
+
*
|
|
8
|
+
* @see ADR-014: CE-MCP Architecture
|
|
7
9
|
*/
|
|
8
10
|
/**
|
|
9
11
|
* Available AI models for different use cases
|
|
@@ -46,6 +48,18 @@ export const AVAILABLE_MODELS = {
|
|
|
46
48
|
useCases: ['quick-analysis', 'simple-tasks', 'cost-effective'],
|
|
47
49
|
},
|
|
48
50
|
};
|
|
51
|
+
/**
|
|
52
|
+
* Default CE-MCP settings
|
|
53
|
+
*/
|
|
54
|
+
export const DEFAULT_CEMCP_SETTINGS = {
|
|
55
|
+
sandboxEnabled: true,
|
|
56
|
+
sandboxTimeout: 30000, // 30 seconds
|
|
57
|
+
sandboxMemoryLimit: 256 * 1024 * 1024, // 256 MB
|
|
58
|
+
sandboxFsLimit: 1000,
|
|
59
|
+
sandboxNetworkAllowed: false,
|
|
60
|
+
lazyPromptLoading: true,
|
|
61
|
+
openRouterFallback: true,
|
|
62
|
+
};
|
|
49
63
|
/**
|
|
50
64
|
* Default AI configuration
|
|
51
65
|
*/
|
|
@@ -53,7 +67,7 @@ export const DEFAULT_AI_CONFIG = {
|
|
|
53
67
|
apiKey: '',
|
|
54
68
|
baseURL: 'https://openrouter.ai/api/v1',
|
|
55
69
|
defaultModel: 'anthropic/claude-3-sonnet',
|
|
56
|
-
executionMode: 'full'
|
|
70
|
+
executionMode: 'ce-mcp', // Default to CE-MCP mode (was 'full')
|
|
57
71
|
siteUrl: 'https://github.com/tosin2013/mcp-adr-analysis-server',
|
|
58
72
|
siteName: 'MCP ADR Analysis Server',
|
|
59
73
|
timeout: 60000, // 60 seconds
|
|
@@ -62,11 +76,24 @@ export const DEFAULT_AI_CONFIG = {
|
|
|
62
76
|
maxTokens: 4000,
|
|
63
77
|
cacheEnabled: true,
|
|
64
78
|
cacheTTL: 3600, // 1 hour
|
|
79
|
+
cemcp: DEFAULT_CEMCP_SETTINGS,
|
|
65
80
|
};
|
|
66
81
|
/**
|
|
67
82
|
* Load AI configuration from environment variables
|
|
68
83
|
*/
|
|
69
84
|
export function loadAIConfig() {
|
|
85
|
+
// Load CE-MCP settings
|
|
86
|
+
const cemcpSettings = {
|
|
87
|
+
sandboxEnabled: process.env['CEMCP_SANDBOX_ENABLED'] !== 'false',
|
|
88
|
+
sandboxTimeout: parseInt(process.env['CEMCP_SANDBOX_TIMEOUT'] || '') || DEFAULT_CEMCP_SETTINGS.sandboxTimeout,
|
|
89
|
+
sandboxMemoryLimit: parseInt(process.env['CEMCP_SANDBOX_MEMORY'] || '') ||
|
|
90
|
+
DEFAULT_CEMCP_SETTINGS.sandboxMemoryLimit,
|
|
91
|
+
sandboxFsLimit: parseInt(process.env['CEMCP_SANDBOX_FS_LIMIT'] || '') ||
|
|
92
|
+
DEFAULT_CEMCP_SETTINGS.sandboxFsLimit,
|
|
93
|
+
sandboxNetworkAllowed: process.env['CEMCP_SANDBOX_NETWORK'] === 'true',
|
|
94
|
+
lazyPromptLoading: process.env['CEMCP_LAZY_PROMPTS'] !== 'false',
|
|
95
|
+
openRouterFallback: process.env['CEMCP_OPENROUTER_FALLBACK'] !== 'false',
|
|
96
|
+
};
|
|
70
97
|
const config = {
|
|
71
98
|
apiKey: process.env['OPENROUTER_API_KEY'] || '',
|
|
72
99
|
baseURL: 'https://openrouter.ai/api/v1',
|
|
@@ -80,6 +107,7 @@ export function loadAIConfig() {
|
|
|
80
107
|
maxTokens: parseInt(process.env['AI_MAX_TOKENS'] || '') || DEFAULT_AI_CONFIG.maxTokens,
|
|
81
108
|
cacheEnabled: process.env['AI_CACHE_ENABLED'] !== 'false',
|
|
82
109
|
cacheTTL: parseInt(process.env['AI_CACHE_TTL'] || '') || DEFAULT_AI_CONFIG.cacheTTL,
|
|
110
|
+
cemcp: cemcpSettings,
|
|
83
111
|
};
|
|
84
112
|
return config;
|
|
85
113
|
}
|
|
@@ -111,10 +139,45 @@ export function getModelConfig(modelId) {
|
|
|
111
139
|
return AVAILABLE_MODELS[normalizedId];
|
|
112
140
|
}
|
|
113
141
|
/**
|
|
114
|
-
* Check if AI execution is enabled
|
|
142
|
+
* Check if AI execution is enabled (legacy OpenRouter mode)
|
|
115
143
|
*/
|
|
116
144
|
export function isAIExecutionEnabled(config) {
|
|
117
|
-
return config.executionMode === 'full' && !!config.apiKey;
|
|
145
|
+
return (config.executionMode === 'full' || config.executionMode === 'hybrid') && !!config.apiKey;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Check if CE-MCP mode is enabled
|
|
149
|
+
*/
|
|
150
|
+
export function isCEMCPEnabled(config) {
|
|
151
|
+
return config.executionMode === 'ce-mcp' || config.executionMode === 'hybrid';
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Check if OpenRouter fallback is available
|
|
155
|
+
*/
|
|
156
|
+
export function isOpenRouterFallbackAvailable(config) {
|
|
157
|
+
return ((config.executionMode === 'hybrid' || config.cemcp?.openRouterFallback === true) &&
|
|
158
|
+
!!config.apiKey);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Get the effective execution mode based on configuration and available resources
|
|
162
|
+
*/
|
|
163
|
+
export function getEffectiveExecutionMode(config) {
|
|
164
|
+
if (config.executionMode === 'ce-mcp') {
|
|
165
|
+
// If CE-MCP is requested but sandbox is disabled, check for fallback
|
|
166
|
+
if (!config.cemcp?.sandboxEnabled) {
|
|
167
|
+
if (isOpenRouterFallbackAvailable(config)) {
|
|
168
|
+
return 'full';
|
|
169
|
+
}
|
|
170
|
+
return 'prompt-only';
|
|
171
|
+
}
|
|
172
|
+
return 'ce-mcp';
|
|
173
|
+
}
|
|
174
|
+
if (config.executionMode === 'hybrid') {
|
|
175
|
+
return 'hybrid';
|
|
176
|
+
}
|
|
177
|
+
if (config.executionMode === 'full' && !config.apiKey) {
|
|
178
|
+
return 'prompt-only';
|
|
179
|
+
}
|
|
180
|
+
return config.executionMode;
|
|
118
181
|
}
|
|
119
182
|
/**
|
|
120
183
|
* Get recommended model for a specific use case
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-config.js","sourceRoot":"","sources":["../../../src/config/ai-config.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ai-config.js","sourceRoot":"","sources":["../../../src/config/ai-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8EH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAgC;IAC3D,iBAAiB,EAAE;QACjB,EAAE,EAAE,2BAA2B;QAC/B,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,WAAW;QACrB,SAAS,EAAE,GAAG;QACd,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,iBAAiB,CAAC;KACvD;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,0BAA0B;QAC9B,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE,WAAW;QACrB,SAAS,EAAE,IAAI;QACf,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC;KAC7C;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,eAAe;QACnB,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,GAAG;QACd,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE,MAAM;QACrB,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,gBAAgB,CAAC;KACtD;IACD,aAAa,EAAE;QACb,EAAE,EAAE,oBAAoB;QACxB,IAA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AC;IAClB,CAAC;IAED,IAAI,MAAM,CAAC,aAAa,KAAK,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QACtD,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,OAAO,MAAM,CAAC,aAAa,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,gBAAyB,KAAK;IACjF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAE/C,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAClC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,CACjF,CAAC;IAEF,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,iBAAiB,CAAC,YAAY,CAAC;IACxC,CAAC;IAED,IAAI,aAAa,EAAE,CAAC;QAClB,qCAAqC;QACrC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAC3F,CAAC;IAED,OAAO,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,iBAAiB,CAAC,YAAY,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* APE (Automatic Prompt Engineering) Description Constants
|
|
3
|
+
*
|
|
4
|
+
* This file extracts hardcoded description maps from the APE module
|
|
5
|
+
* to reduce memory footprint and enable configuration reuse.
|
|
6
|
+
*
|
|
7
|
+
* Optimization Benefits:
|
|
8
|
+
* - Reduces memory churn by ~1.2KB per module load
|
|
9
|
+
* - Enables lazy loading of descriptions
|
|
10
|
+
* - Centralizes APE configuration for easier maintenance
|
|
11
|
+
* - Supports future internationalization
|
|
12
|
+
*
|
|
13
|
+
* @see ADR-015 for optimization rationale
|
|
14
|
+
*/
|
|
15
|
+
import type { GenerationStrategy, EvaluationCriterion, SelectionStrategy } from '../types/ape-framework.js';
|
|
16
|
+
/**
|
|
17
|
+
* Descriptions for prompt generation strategies
|
|
18
|
+
* Used in candidate generation to explain each strategy's approach
|
|
19
|
+
*/
|
|
20
|
+
export declare const STRATEGY_DESCRIPTIONS: Record<GenerationStrategy, string>;
|
|
21
|
+
/**
|
|
22
|
+
* Descriptions for prompt evaluation criteria
|
|
23
|
+
* Used to explain what each criterion measures during evaluation
|
|
24
|
+
*/
|
|
25
|
+
export declare const CRITERION_DESCRIPTIONS: Record<EvaluationCriterion, string>;
|
|
26
|
+
/**
|
|
27
|
+
* Descriptions for candidate selection strategies
|
|
28
|
+
* Explains how the best prompt candidate is selected
|
|
29
|
+
*/
|
|
30
|
+
export declare const SELECTION_STRATEGY_DESCRIPTIONS: Record<SelectionStrategy, string>;
|
|
31
|
+
/**
|
|
32
|
+
* Tool-specific optimization priorities for APE
|
|
33
|
+
* Defines what aspects to focus on when optimizing prompts for specific tools
|
|
34
|
+
*/
|
|
35
|
+
export declare const TOOL_OPTIMIZATION_PRIORITIES: Record<string, string[]>;
|
|
36
|
+
/**
|
|
37
|
+
* Default optimization priorities for tools not in the specific list
|
|
38
|
+
*/
|
|
39
|
+
export declare const DEFAULT_TOOL_PRIORITIES: string[];
|
|
40
|
+
/**
|
|
41
|
+
* Get description for a generation strategy with fallback
|
|
42
|
+
*/
|
|
43
|
+
export declare function getStrategyDescription(strategy: GenerationStrategy): string;
|
|
44
|
+
/**
|
|
45
|
+
* Get description for an evaluation criterion with fallback
|
|
46
|
+
*/
|
|
47
|
+
export declare function getCriterionDescription(criterion: EvaluationCriterion): string;
|
|
48
|
+
/**
|
|
49
|
+
* Get description for a selection strategy with fallback
|
|
50
|
+
*/
|
|
51
|
+
export declare function getSelectionStrategyDescription(strategy: SelectionStrategy): string;
|
|
52
|
+
/**
|
|
53
|
+
* Get tool-specific optimization priorities
|
|
54
|
+
* Returns formatted string for prompt inclusion
|
|
55
|
+
*/
|
|
56
|
+
export declare function getToolOptimizationPriorities(toolName: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* Get raw priorities array for a tool (for programmatic use)
|
|
59
|
+
*/
|
|
60
|
+
export declare function getToolPrioritiesArray(toolName: string): string[];
|
|
61
|
+
/**
|
|
62
|
+
* Get or create a cached template section
|
|
63
|
+
* Reduces regeneration of static template portions
|
|
64
|
+
*/
|
|
65
|
+
export declare function getCachedTemplateSection(sectionKey: string, generator: () => string): string;
|
|
66
|
+
/**
|
|
67
|
+
* Clear template cache (useful for testing or config updates)
|
|
68
|
+
*/
|
|
69
|
+
export declare function clearTemplateCache(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Get template cache statistics
|
|
72
|
+
*/
|
|
73
|
+
export declare function getTemplateCacheStats(): {
|
|
74
|
+
size: number;
|
|
75
|
+
keys: string[];
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=ape-descriptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ape-descriptions.d.ts","sourceRoot":"","sources":["../../../src/config/ape-descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAMnC;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAOpE,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAOtE,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAM7E,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA+BjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,EAK3C,CAAC;AAMF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,CAE3E;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,mBAAmB,GAAG,MAAM,CAE9E;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAEnF;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAEjE;AAYD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,GAAG,MAAM,CAO5F;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAKxE"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* APE (Automatic Prompt Engineering) Description Constants
|
|
3
|
+
*
|
|
4
|
+
* This file extracts hardcoded description maps from the APE module
|
|
5
|
+
* to reduce memory footprint and enable configuration reuse.
|
|
6
|
+
*
|
|
7
|
+
* Optimization Benefits:
|
|
8
|
+
* - Reduces memory churn by ~1.2KB per module load
|
|
9
|
+
* - Enables lazy loading of descriptions
|
|
10
|
+
* - Centralizes APE configuration for easier maintenance
|
|
11
|
+
* - Supports future internationalization
|
|
12
|
+
*
|
|
13
|
+
* @see ADR-015 for optimization rationale
|
|
14
|
+
*/
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Generation Strategy Descriptions
|
|
17
|
+
// ============================================================================
|
|
18
|
+
/**
|
|
19
|
+
* Descriptions for prompt generation strategies
|
|
20
|
+
* Used in candidate generation to explain each strategy's approach
|
|
21
|
+
*/
|
|
22
|
+
export const STRATEGY_DESCRIPTIONS = {
|
|
23
|
+
'template-variation': 'Use different prompt templates and structural formats',
|
|
24
|
+
'semantic-variation': 'Rephrase while preserving meaning and intent',
|
|
25
|
+
'style-variation': 'Adjust tone, formality, and communication style',
|
|
26
|
+
'length-variation': 'Create concise, detailed, and balanced versions',
|
|
27
|
+
'structure-variation': 'Reorganize content with different patterns',
|
|
28
|
+
'hybrid-approach': 'Combine multiple strategies for optimal results',
|
|
29
|
+
};
|
|
30
|
+
// ============================================================================
|
|
31
|
+
// Evaluation Criterion Descriptions
|
|
32
|
+
// ============================================================================
|
|
33
|
+
/**
|
|
34
|
+
* Descriptions for prompt evaluation criteria
|
|
35
|
+
* Used to explain what each criterion measures during evaluation
|
|
36
|
+
*/
|
|
37
|
+
export const CRITERION_DESCRIPTIONS = {
|
|
38
|
+
'task-completion': 'How well the prompt achieves the intended task outcome',
|
|
39
|
+
clarity: 'How clear, unambiguous, and easy to understand the prompt is',
|
|
40
|
+
specificity: 'How specific, actionable, and detailed the prompt is',
|
|
41
|
+
robustness: 'How well the prompt handles edge cases and variations',
|
|
42
|
+
efficiency: 'How concise yet comprehensive the prompt is',
|
|
43
|
+
'context-awareness': 'How well the prompt fits the specific context and domain',
|
|
44
|
+
};
|
|
45
|
+
// ============================================================================
|
|
46
|
+
// Selection Strategy Descriptions
|
|
47
|
+
// ============================================================================
|
|
48
|
+
/**
|
|
49
|
+
* Descriptions for candidate selection strategies
|
|
50
|
+
* Explains how the best prompt candidate is selected
|
|
51
|
+
*/
|
|
52
|
+
export const SELECTION_STRATEGY_DESCRIPTIONS = {
|
|
53
|
+
'highest-score': 'Select the candidate with the highest overall evaluation score',
|
|
54
|
+
'multi-criteria': 'Balance multiple evaluation criteria with appropriate weights',
|
|
55
|
+
ensemble: 'Combine strengths of multiple high-performing candidates',
|
|
56
|
+
'context-aware': 'Choose based on context-specific suitability and requirements',
|
|
57
|
+
balanced: 'Balance quality, diversity, and context appropriateness',
|
|
58
|
+
};
|
|
59
|
+
// ============================================================================
|
|
60
|
+
// Tool-Specific Optimization Priorities
|
|
61
|
+
// ============================================================================
|
|
62
|
+
/**
|
|
63
|
+
* Tool-specific optimization priorities for APE
|
|
64
|
+
* Defines what aspects to focus on when optimizing prompts for specific tools
|
|
65
|
+
*/
|
|
66
|
+
export const TOOL_OPTIMIZATION_PRIORITIES = {
|
|
67
|
+
generate_adrs_from_prd: [
|
|
68
|
+
'Context Analysis: Better understanding of PRD requirements and constraints',
|
|
69
|
+
'Decision Quality: Clearer architectural decision rationale and justification',
|
|
70
|
+
'Stakeholder Alignment: Improved ADR clarity and relevance for stakeholders',
|
|
71
|
+
'Technical Depth: Appropriate level of technical detail for the context',
|
|
72
|
+
],
|
|
73
|
+
suggest_adrs: [
|
|
74
|
+
'Relevance: Highly relevant ADR suggestions based on project context',
|
|
75
|
+
'Prioritization: Clear prioritization of suggested ADRs by importance',
|
|
76
|
+
'Feasibility: Realistic and implementable architectural decisions',
|
|
77
|
+
'Impact Assessment: Clear understanding of decision impacts and trade-offs',
|
|
78
|
+
],
|
|
79
|
+
analyze_project_ecosystem: [
|
|
80
|
+
'Technology Detection: Accurate identification of technologies and frameworks',
|
|
81
|
+
'Pattern Recognition: Better identification of architectural patterns',
|
|
82
|
+
'Context Understanding: Comprehensive project context analysis',
|
|
83
|
+
'Insight Generation: Valuable and actionable architectural insights',
|
|
84
|
+
],
|
|
85
|
+
generate_research_questions: [
|
|
86
|
+
'Question Quality: High-quality, targeted research questions',
|
|
87
|
+
'Relevance: Questions directly relevant to project needs',
|
|
88
|
+
'Depth: Appropriate depth and scope for research objectives',
|
|
89
|
+
'Actionability: Questions that lead to actionable insights',
|
|
90
|
+
],
|
|
91
|
+
incorporate_research: [
|
|
92
|
+
'Integration Quality: Effective integration of research findings',
|
|
93
|
+
'Synthesis: Good synthesis of multiple research sources',
|
|
94
|
+
'Relevance: Focus on most relevant research findings',
|
|
95
|
+
'Actionability: Clear actionable recommendations from research',
|
|
96
|
+
],
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Default optimization priorities for tools not in the specific list
|
|
100
|
+
*/
|
|
101
|
+
export const DEFAULT_TOOL_PRIORITIES = [
|
|
102
|
+
"Task Effectiveness: Optimize for the tool's primary task objectives",
|
|
103
|
+
'Context Awareness: Improve understanding of tool-specific context',
|
|
104
|
+
'Output Quality: Enhance the quality and relevance of tool outputs',
|
|
105
|
+
'User Experience: Improve clarity and usability of tool interactions',
|
|
106
|
+
];
|
|
107
|
+
// ============================================================================
|
|
108
|
+
// Helper Functions for Accessing Descriptions
|
|
109
|
+
// ============================================================================
|
|
110
|
+
/**
|
|
111
|
+
* Get description for a generation strategy with fallback
|
|
112
|
+
*/
|
|
113
|
+
export function getStrategyDescription(strategy) {
|
|
114
|
+
return STRATEGY_DESCRIPTIONS[strategy] || 'Apply the specified generation strategy';
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Get description for an evaluation criterion with fallback
|
|
118
|
+
*/
|
|
119
|
+
export function getCriterionDescription(criterion) {
|
|
120
|
+
return CRITERION_DESCRIPTIONS[criterion] || 'Evaluate based on this criterion';
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Get description for a selection strategy with fallback
|
|
124
|
+
*/
|
|
125
|
+
export function getSelectionStrategyDescription(strategy) {
|
|
126
|
+
return SELECTION_STRATEGY_DESCRIPTIONS[strategy] || 'Apply the specified selection strategy';
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Get tool-specific optimization priorities
|
|
130
|
+
* Returns formatted string for prompt inclusion
|
|
131
|
+
*/
|
|
132
|
+
export function getToolOptimizationPriorities(toolName) {
|
|
133
|
+
const priorities = TOOL_OPTIMIZATION_PRIORITIES[toolName] || DEFAULT_TOOL_PRIORITIES;
|
|
134
|
+
return priorities.map(p => `- **${p}**`).join('\n');
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Get raw priorities array for a tool (for programmatic use)
|
|
138
|
+
*/
|
|
139
|
+
export function getToolPrioritiesArray(toolName) {
|
|
140
|
+
return TOOL_OPTIMIZATION_PRIORITIES[toolName] || DEFAULT_TOOL_PRIORITIES;
|
|
141
|
+
}
|
|
142
|
+
// ============================================================================
|
|
143
|
+
// Template Caching Support
|
|
144
|
+
// ============================================================================
|
|
145
|
+
/**
|
|
146
|
+
* Cache for generated prompt templates
|
|
147
|
+
* Key format: `${templateType}:${configHash}`
|
|
148
|
+
*/
|
|
149
|
+
const templateCache = new Map();
|
|
150
|
+
/**
|
|
151
|
+
* Get or create a cached template section
|
|
152
|
+
* Reduces regeneration of static template portions
|
|
153
|
+
*/
|
|
154
|
+
export function getCachedTemplateSection(sectionKey, generator) {
|
|
155
|
+
if (templateCache.has(sectionKey)) {
|
|
156
|
+
return templateCache.get(sectionKey);
|
|
157
|
+
}
|
|
158
|
+
const content = generator();
|
|
159
|
+
templateCache.set(sectionKey, content);
|
|
160
|
+
return content;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Clear template cache (useful for testing or config updates)
|
|
164
|
+
*/
|
|
165
|
+
export function clearTemplateCache() {
|
|
166
|
+
templateCache.clear();
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get template cache statistics
|
|
170
|
+
*/
|
|
171
|
+
export function getTemplateCacheStats() {
|
|
172
|
+
return {
|
|
173
|
+
size: templateCache.size,
|
|
174
|
+
keys: Array.from(templateCache.keys()),
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=ape-descriptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ape-descriptions.js","sourceRoot":"","sources":["../../../src/config/ape-descri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C,UAAkB,EAAE,SAAuB;IAClF,IAAI,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;QAClC,OAAO,aAAa,CAAC,GAAG,CAAC,UAAU,CAAE,CAAC;IACxC,CAAC;IACD,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC;IAC5B,aAAa,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,aAAa,CAAC,KAAK,EAAE,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO;QACL,IAAI,EAAE,aAAa,CAAC,IAAI;QACxB,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;KACvC,CAAC;AACJ,CAAC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -147,6 +147,10 @@ export declare class McpAdrAnalysisServer {
|
|
|
147
147
|
* Perform research tool implementation
|
|
148
148
|
*/
|
|
149
149
|
private performResearch;
|
|
150
|
+
/**
|
|
151
|
+
* Search codebase tool implementation
|
|
152
|
+
*/
|
|
153
|
+
private searchCodebase;
|
|
150
154
|
/**
|
|
151
155
|
* LLM web search tool implementation
|
|
152
156
|
*/
|
|
@@ -243,10 +247,46 @@ export declare class McpAdrAnalysisServer {
|
|
|
243
247
|
* Retrieves conversation memory statistics
|
|
244
248
|
*/
|
|
245
249
|
private getMemoryStats;
|
|
250
|
+
/**
|
|
251
|
+
* Update Knowledge Tool (ADR-018)
|
|
252
|
+
* Simple CRUD operations for knowledge graph
|
|
253
|
+
*/
|
|
254
|
+
private updateKnowledge;
|
|
246
255
|
/**
|
|
247
256
|
* Get Server Context Tool
|
|
248
257
|
* Generates comprehensive server context file for LLM @ referencing
|
|
249
258
|
*/
|
|
250
259
|
private getServerContext;
|
|
260
|
+
/**
|
|
261
|
+
* Get Current Datetime Tool
|
|
262
|
+
* Returns the current date and time in various formats for ADR generation and timestamping
|
|
263
|
+
*/
|
|
264
|
+
private getCurrentDatetime;
|
|
265
|
+
/**
|
|
266
|
+
* Set Project Path Tool - Dynamic Session Configuration
|
|
267
|
+
*
|
|
268
|
+
* @description Dynamically sets the active project path for the current session.
|
|
269
|
+
* This allows switching between projects without restarting the server or modifying
|
|
270
|
+
* environment variables. Updates both the config and the RootManager.
|
|
271
|
+
*
|
|
272
|
+
* @param args - Set project path arguments
|
|
273
|
+
* @param args.path - Absolute path to the project directory
|
|
274
|
+
* @param args.validatePath - Whether to validate the path exists (default: true)
|
|
275
|
+
* @returns Promise<CallToolResult> - Confirmation of the path change
|
|
276
|
+
*/
|
|
277
|
+
private setProjectPath;
|
|
278
|
+
/**
|
|
279
|
+
* Load Prompt Tool - CE-MCP Phase 4 Lazy Loading
|
|
280
|
+
*
|
|
281
|
+
* @description Loads prompts on-demand instead of eagerly loading all prompts at startup.
|
|
282
|
+
* This reduces token usage by ~96% (from 28K tokens to ~1K on-demand).
|
|
283
|
+
*
|
|
284
|
+
* @param args - Load prompt arguments
|
|
285
|
+
* @param args.promptName - Name of the prompt to load
|
|
286
|
+
* @param args.section - Optional section within the prompt
|
|
287
|
+
* @param args.estimateOnly - If true, returns only token estimate
|
|
288
|
+
* @returns Promise<CallToolResult> - Loaded prompt content or estimate
|
|
289
|
+
*/
|
|
290
|
+
private loadPrompt;
|
|
251
291
|
}
|
|
252
292
|
//# sourceMappingURL=index.d.ts.map
|
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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AAgIH;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAS;IACvB,O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