@vfarcic/dot-ai 0.103.0 → 0.105.0
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 +14 -1
- package/dist/core/ai-provider-factory.d.ts +90 -0
- package/dist/core/ai-provider-factory.d.ts.map +1 -0
- package/dist/core/ai-provider-factory.js +187 -0
- package/dist/core/ai-provider.interface.d.ts +116 -0
- package/dist/core/ai-provider.interface.d.ts.map +1 -0
- package/dist/core/ai-provider.interface.js +14 -0
- package/dist/core/capabilities.d.ts +3 -3
- package/dist/core/capabilities.d.ts.map +1 -1
- package/dist/core/capabilities.js +4 -4
- package/dist/core/capability-scan-workflow.d.ts.map +1 -1
- package/dist/core/capability-scan-workflow.js +29 -14
- package/dist/core/doc-testing-session.d.ts +1 -1
- package/dist/core/doc-testing-session.js +1 -1
- package/dist/core/error-handling.js +2 -2
- package/dist/core/index.d.ts +4 -6
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +11 -22
- package/dist/core/nushell-runtime.d.ts +39 -0
- package/dist/core/nushell-runtime.d.ts.map +1 -0
- package/dist/core/nushell-runtime.js +103 -0
- package/dist/core/platform-operations.d.ts +76 -0
- package/dist/core/platform-operations.d.ts.map +1 -0
- package/dist/core/platform-operations.js +317 -0
- package/dist/core/providers/anthropic-provider.d.ts +32 -0
- package/dist/core/providers/anthropic-provider.d.ts.map +1 -0
- package/dist/core/providers/anthropic-provider.js +177 -0
- package/dist/core/providers/vercel-provider.d.ts +34 -0
- package/dist/core/providers/vercel-provider.d.ts.map +1 -0
- package/dist/core/providers/vercel-provider.js +202 -0
- package/dist/core/schema.d.ts +4 -7
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +13 -11
- package/dist/core/unified-creation-session.d.ts.map +1 -1
- package/dist/core/unified-creation-session.js +13 -14
- package/dist/interfaces/mcp.d.ts +1 -1
- package/dist/interfaces/mcp.d.ts.map +1 -1
- package/dist/interfaces/mcp.js +10 -2
- package/dist/interfaces/rest-api.js +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.js +2 -2
- package/dist/tools/answer-question.d.ts.map +1 -1
- package/dist/tools/answer-question.js +8 -10
- package/dist/tools/build-platform.d.ts +25 -0
- package/dist/tools/build-platform.d.ts.map +1 -0
- package/dist/tools/build-platform.js +277 -0
- package/dist/tools/generate-manifests.d.ts.map +1 -1
- package/dist/tools/generate-manifests.js +7 -8
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +6 -1
- package/dist/tools/organizational-data.d.ts.map +1 -1
- package/dist/tools/organizational-data.js +3 -2
- package/dist/tools/recommend.d.ts.map +1 -1
- package/dist/tools/recommend.js +50 -30
- package/dist/tools/remediate.d.ts.map +1 -1
- package/dist/tools/remediate.js +23 -39
- package/dist/tools/version.d.ts +10 -2
- package/dist/tools/version.d.ts.map +1 -1
- package/dist/tools/version.js +65 -24
- package/package.json +7 -3
- package/prompts/map-intent-to-operation.md +104 -0
- package/prompts/parse-script-operations.md +72 -0
- package/prompts/question-generation.md +31 -3
- package/scripts/ack.nu +195 -0
- package/scripts/anthropic.nu +24 -0
- package/scripts/argo-workflows.nu +47 -0
- package/scripts/argocd.nu +85 -0
- package/scripts/aso.nu +74 -0
- package/scripts/atlas.nu +15 -0
- package/scripts/backstage.nu +349 -0
- package/scripts/cert-manager.nu +13 -0
- package/scripts/cnpg.nu +14 -0
- package/scripts/common.nu +116 -0
- package/scripts/crossplane.nu +718 -0
- package/scripts/dot.nu +32 -0
- package/scripts/external-secrets.nu +110 -0
- package/scripts/gatekeeper.nu +19 -0
- package/scripts/github.nu +42 -0
- package/scripts/image.nu +67 -0
- package/scripts/ingress.nu +149 -0
- package/scripts/kro.nu +11 -0
- package/scripts/kubernetes.nu +609 -0
- package/scripts/kubevela.nu +22 -0
- package/scripts/kyverno.nu +16 -0
- package/scripts/mcp.nu +139 -0
- package/scripts/port.nu +71 -0
- package/scripts/prometheus.nu +21 -0
- package/scripts/registry.nu +55 -0
- package/scripts/storage.nu +210 -0
- package/scripts/tests.nu +12 -0
- package/scripts/toolhive.nu +21 -0
- package/scripts/velero.nu +45 -0
- package/dist/core/claude.d.ts +0 -88
- package/dist/core/claude.d.ts.map +0 -1
- package/dist/core/claude.js +0 -414
package/dist/tools/recommend.js
CHANGED
|
@@ -41,7 +41,6 @@ exports.handleRecommendTool = handleRecommendTool;
|
|
|
41
41
|
const zod_1 = require("zod");
|
|
42
42
|
const error_handling_1 = require("../core/error-handling");
|
|
43
43
|
const schema_1 = require("../core/schema");
|
|
44
|
-
const claude_1 = require("../core/claude");
|
|
45
44
|
const cluster_utils_1 = require("../core/cluster-utils");
|
|
46
45
|
const fs = __importStar(require("fs"));
|
|
47
46
|
const path = __importStar(require("path"));
|
|
@@ -51,6 +50,7 @@ const choose_solution_1 = require("./choose-solution");
|
|
|
51
50
|
const answer_question_1 = require("./answer-question");
|
|
52
51
|
const generate_manifests_1 = require("./generate-manifests");
|
|
53
52
|
const deploy_manifests_1 = require("./deploy-manifests");
|
|
53
|
+
const shared_prompt_loader_1 = require("../core/shared-prompt-loader");
|
|
54
54
|
// Tool metadata for direct MCP registration
|
|
55
55
|
exports.RECOMMEND_TOOL_NAME = 'recommend';
|
|
56
56
|
exports.RECOMMEND_TOOL_DESCRIPTION = 'Deploy, create, setup, install, or run applications, infrastructure, and services on Kubernetes with AI recommendations. Describe what you want to deploy. Does NOT handle policy creation, organizational patterns, or resource capabilities - use manageOrgData for those.';
|
|
@@ -68,28 +68,62 @@ exports.RECOMMEND_TOOL_INPUT_SCHEMA = {
|
|
|
68
68
|
};
|
|
69
69
|
/**
|
|
70
70
|
* Analyze intent for clarification opportunities using AI
|
|
71
|
+
*
|
|
72
|
+
* @param intent User's deployment intent
|
|
73
|
+
* @param aiProvider AI provider instance to use for analysis
|
|
74
|
+
* @param logger Logger for error reporting
|
|
75
|
+
* @param organizationalPatterns Optional organizational patterns context
|
|
76
|
+
* @returns Analysis result with clarification opportunities
|
|
71
77
|
*/
|
|
72
|
-
async function analyzeIntentForClarification(intent,
|
|
78
|
+
async function analyzeIntentForClarification(intent, aiProvider, logger, organizationalPatterns = '') {
|
|
73
79
|
try {
|
|
74
|
-
//
|
|
75
|
-
const
|
|
80
|
+
// Load intent analysis prompt template
|
|
81
|
+
const analysisPrompt = (0, shared_prompt_loader_1.loadPrompt)('intent-analysis', {
|
|
82
|
+
intent,
|
|
83
|
+
organizational_patterns: organizationalPatterns || 'No specific organizational patterns available'
|
|
84
|
+
});
|
|
85
|
+
// Send to AI for analysis
|
|
86
|
+
const response = await aiProvider.sendMessage(analysisPrompt, 'intent-analysis');
|
|
87
|
+
// Parse JSON response with robust error handling
|
|
88
|
+
let jsonContent = response.content;
|
|
89
|
+
// Try to find JSON object wrapped in code blocks
|
|
90
|
+
const codeBlockMatch = response.content.match(/```(?:json)?\s*(\{[\s\S]*?\})\s*```/);
|
|
91
|
+
if (codeBlockMatch) {
|
|
92
|
+
jsonContent = codeBlockMatch[1];
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
// Try to find JSON object that starts with { and find the matching closing }
|
|
96
|
+
const jsonMatch = response.content.match(/\{[\s\S]*\}/);
|
|
97
|
+
if (jsonMatch) {
|
|
98
|
+
jsonContent = jsonMatch[0];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
// Parse the JSON
|
|
102
|
+
const analysisResult = JSON.parse(jsonContent);
|
|
103
|
+
// Validate the response structure
|
|
104
|
+
if (!analysisResult.clarificationOpportunities || !Array.isArray(analysisResult.clarificationOpportunities)) {
|
|
105
|
+
throw new Error('Invalid analysis result structure: missing clarificationOpportunities array');
|
|
106
|
+
}
|
|
107
|
+
if (!analysisResult.overallAssessment || !analysisResult.intentQuality) {
|
|
108
|
+
throw new Error('Invalid analysis result structure: missing overallAssessment or intentQuality');
|
|
109
|
+
}
|
|
76
110
|
return analysisResult;
|
|
77
111
|
}
|
|
78
112
|
catch (error) {
|
|
79
|
-
|
|
113
|
+
// If parsing fails or API call fails, return a fallback minimal analysis
|
|
114
|
+
logger.warn?.('Intent analysis failed, returning minimal analysis', {
|
|
80
115
|
error: error instanceof Error ? error.message : String(error)
|
|
81
116
|
});
|
|
82
|
-
// Return minimal analysis that indicates no clarification available
|
|
83
117
|
return {
|
|
84
118
|
clarificationOpportunities: [],
|
|
85
119
|
overallAssessment: {
|
|
86
120
|
enhancementPotential: 'LOW',
|
|
87
121
|
primaryGaps: [],
|
|
88
|
-
recommendedFocus: '
|
|
122
|
+
recommendedFocus: 'Proceed with original intent - analysis unavailable'
|
|
89
123
|
},
|
|
90
124
|
intentQuality: {
|
|
91
|
-
currentSpecificity: '
|
|
92
|
-
strengthAreas: ['User provided deployment intent'],
|
|
125
|
+
currentSpecificity: 'Unable to analyze - using original intent',
|
|
126
|
+
strengthAreas: ['User provided clear deployment intent'],
|
|
93
127
|
improvementAreas: []
|
|
94
128
|
}
|
|
95
129
|
};
|
|
@@ -161,20 +195,7 @@ async function handleRecommendTool(args, dotAI, logger, requestId) {
|
|
|
161
195
|
// Default: recommend stage (original recommend logic)
|
|
162
196
|
// Input validation is handled automatically by MCP SDK with Zod schema
|
|
163
197
|
// args are already validated and typed when we reach this point
|
|
164
|
-
//
|
|
165
|
-
const claudeApiKey = dotAI.getAnthropicApiKey();
|
|
166
|
-
if (!claudeApiKey) {
|
|
167
|
-
throw error_handling_1.ErrorHandler.createError(error_handling_1.ErrorCategory.AI_SERVICE, error_handling_1.ErrorSeverity.HIGH, 'ANTHROPIC_API_KEY environment variable must be set for AI-powered resource recommendations', {
|
|
168
|
-
operation: 'api_key_check',
|
|
169
|
-
component: 'RecommendTool',
|
|
170
|
-
requestId,
|
|
171
|
-
suggestedActions: [
|
|
172
|
-
'Set ANTHROPIC_API_KEY environment variable',
|
|
173
|
-
'Verify the API key is valid and active',
|
|
174
|
-
'Check that the API key has sufficient credits'
|
|
175
|
-
]
|
|
176
|
-
});
|
|
177
|
-
}
|
|
198
|
+
// AI provider is already initialized and validated in dotAI.ai
|
|
178
199
|
// Validate session directory configuration
|
|
179
200
|
let sessionDir;
|
|
180
201
|
try {
|
|
@@ -196,14 +217,14 @@ async function handleRecommendTool(args, dotAI, logger, requestId) {
|
|
|
196
217
|
logger.info('Starting resource recommendation process', {
|
|
197
218
|
requestId,
|
|
198
219
|
intent: args.intent,
|
|
199
|
-
|
|
220
|
+
hasApiProvider: dotAI.ai.isInitialized()
|
|
200
221
|
});
|
|
201
|
-
// Initialize
|
|
202
|
-
const
|
|
222
|
+
// Initialize AI provider for potential clarification analysis
|
|
223
|
+
const aiProvider = dotAI.ai;
|
|
203
224
|
// Check if intent clarification is needed (unless final=true)
|
|
204
225
|
if (!args.final) {
|
|
205
226
|
logger.debug('Analyzing intent for clarification opportunities', { requestId, intent: args.intent });
|
|
206
|
-
const analysisResult = await analyzeIntentForClarification(args.intent,
|
|
227
|
+
const analysisResult = await analyzeIntentForClarification(args.intent, aiProvider, logger);
|
|
207
228
|
// If clarification opportunities exist, return them to the client agent
|
|
208
229
|
if (analysisResult.clarificationOpportunities &&
|
|
209
230
|
analysisResult.clarificationOpportunities.length > 0 &&
|
|
@@ -250,9 +271,8 @@ async function handleRecommendTool(args, dotAI, logger, requestId) {
|
|
|
250
271
|
}
|
|
251
272
|
// Ensure cluster connectivity before proceeding with recommendations
|
|
252
273
|
await (0, cluster_utils_1.ensureClusterConnection)(dotAI, logger, requestId, 'RecommendTool');
|
|
253
|
-
// Initialize AI-powered ResourceRecommender
|
|
254
|
-
const
|
|
255
|
-
const recommender = new schema_1.ResourceRecommender(rankingConfig);
|
|
274
|
+
// Initialize AI-powered ResourceRecommender with provider
|
|
275
|
+
const recommender = new schema_1.ResourceRecommender(dotAI.ai);
|
|
256
276
|
// Create discovery function
|
|
257
277
|
const explainResourceFn = async (resource) => {
|
|
258
278
|
logger.debug(`Explaining resource: ${resource}`, { requestId });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remediate.d.ts","sourceRoot":"","sources":["../../src/tools/remediate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"remediate.d.ts","sourceRoot":"","sources":["../../src/tools/remediate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,0BAA0B,yfAAwf,CAAC;AAGhiB,eAAO,MAAM,eAAe,kEAAmE,CAAC;AAChG,MAAM,MAAM,aAAa,GAAG,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AAgB3D,eAAO,MAAM,2BAA2B;;;;;;;;CAQvC,CAAC;AAGF,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC9B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,YAAY,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACrC,Q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Q,GAAG,MAAM,CAAC;KACjC,CAAC;IACF,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,uBAAuB,CAgDhF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG;IAAE,YAAY,EAAE,WAAW,EAAE,CAAC;IAAC,UAAU,EAAE,OAAO,CAAC;IAAC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAAC,cAAc,CAAC,EAAE,uBAAuB,CAAA;CAAE,CAkDnL;AAwqBD;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAsLjE"}
|
package/dist/tools/remediate.js
CHANGED
|
@@ -42,7 +42,7 @@ exports.parseAIResponse = parseAIResponse;
|
|
|
42
42
|
exports.handleRemediateTool = handleRemediateTool;
|
|
43
43
|
const zod_1 = require("zod");
|
|
44
44
|
const error_handling_1 = require("../core/error-handling");
|
|
45
|
-
const
|
|
45
|
+
const ai_provider_factory_1 = require("../core/ai-provider-factory");
|
|
46
46
|
const session_utils_1 = require("../core/session-utils");
|
|
47
47
|
const kubernetes_utils_1 = require("../core/kubernetes-utils");
|
|
48
48
|
const fs = __importStar(require("fs"));
|
|
@@ -116,7 +116,7 @@ function updateSessionFile(sessionDir, sessionId, updates) {
|
|
|
116
116
|
/**
|
|
117
117
|
* AI-driven investigation loop - iteratively gather data and analyze until complete
|
|
118
118
|
*/
|
|
119
|
-
async function conductInvestigation(session, sessionDir,
|
|
119
|
+
async function conductInvestigation(session, sessionDir, aiProvider, logger, requestId) {
|
|
120
120
|
const maxIterations = 20; // Allow more comprehensive investigations
|
|
121
121
|
let currentIteration = session.iterations.length;
|
|
122
122
|
logger.info('Starting AI investigation loop', {
|
|
@@ -128,7 +128,7 @@ async function conductInvestigation(session, sessionDir, claudeIntegration, logg
|
|
|
128
128
|
logger.debug(`Starting investigation iteration ${currentIteration + 1}`, { requestId, sessionId: session.sessionId });
|
|
129
129
|
try {
|
|
130
130
|
// Get AI analysis with investigation prompts
|
|
131
|
-
const aiAnalysis = await analyzeCurrentState(session,
|
|
131
|
+
const aiAnalysis = await analyzeCurrentState(session, aiProvider, logger, requestId);
|
|
132
132
|
// Parse AI response for data requests and completion status
|
|
133
133
|
const { dataRequests, isComplete, needsMoreSpecificInfo, parsedResponse } = parseAIResponse(aiAnalysis);
|
|
134
134
|
// Handle early termination when issue description is too vague
|
|
@@ -221,7 +221,7 @@ async function conductInvestigation(session, sessionDir, claudeIntegration, logg
|
|
|
221
221
|
/**
|
|
222
222
|
* Analyze current state using AI with investigation prompts
|
|
223
223
|
*/
|
|
224
|
-
async function analyzeCurrentState(session,
|
|
224
|
+
async function analyzeCurrentState(session, aiProvider, logger, requestId) {
|
|
225
225
|
logger.debug('Analyzing current state with AI', { requestId, sessionId: session.sessionId });
|
|
226
226
|
try {
|
|
227
227
|
// Load investigation prompt template
|
|
@@ -262,14 +262,14 @@ async function analyzeCurrentState(session, claudeIntegration, logger, requestId
|
|
|
262
262
|
.replace('{maxIterations}', maxIterations.toString())
|
|
263
263
|
.replace('{previousIterations}', previousIterationsJson)
|
|
264
264
|
.replace('{clusterApiResources}', clusterApiResources);
|
|
265
|
-
logger.debug('Sending investigation prompt to
|
|
265
|
+
logger.debug('Sending investigation prompt to AI', {
|
|
266
266
|
requestId,
|
|
267
267
|
sessionId: session.sessionId,
|
|
268
268
|
promptLength: investigationPrompt.length,
|
|
269
269
|
iteration: currentIteration
|
|
270
270
|
});
|
|
271
|
-
// Send to
|
|
272
|
-
const aiResponse = await
|
|
271
|
+
// Send to AI provider
|
|
272
|
+
const aiResponse = await aiProvider.sendMessage(investigationPrompt);
|
|
273
273
|
logger.debug('Received AI analysis response', {
|
|
274
274
|
requestId,
|
|
275
275
|
sessionId: session.sessionId,
|
|
@@ -285,9 +285,9 @@ async function analyzeCurrentState(session, claudeIntegration, logger, requestId
|
|
|
285
285
|
requestId,
|
|
286
286
|
sessionId: session.sessionId,
|
|
287
287
|
suggestedActions: [
|
|
288
|
-
'Check
|
|
288
|
+
'Check AI provider API key is set correctly',
|
|
289
289
|
'Verify prompts/remediate-investigation.md exists',
|
|
290
|
-
'Check network connectivity to
|
|
290
|
+
'Check network connectivity to AI provider'
|
|
291
291
|
]
|
|
292
292
|
});
|
|
293
293
|
}
|
|
@@ -505,17 +505,8 @@ function generateErrorSuggestion(errorMessage) {
|
|
|
505
505
|
async function generateFinalAnalysis(session, logger, requestId) {
|
|
506
506
|
logger.debug('Generating final analysis with AI', { requestId, sessionId: session.sessionId });
|
|
507
507
|
try {
|
|
508
|
-
// Initialize
|
|
509
|
-
const
|
|
510
|
-
if (!claudeApiKey) {
|
|
511
|
-
throw error_handling_1.ErrorHandler.createError(error_handling_1.ErrorCategory.CONFIGURATION, error_handling_1.ErrorSeverity.HIGH, 'ANTHROPIC_API_KEY environment variable not set for final analysis', {
|
|
512
|
-
operation: 'generateFinalAnalysis',
|
|
513
|
-
component: 'RemediateTool',
|
|
514
|
-
requestId,
|
|
515
|
-
sessionId: session.sessionId
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
const claudeIntegration = new claude_1.ClaudeIntegration(claudeApiKey);
|
|
508
|
+
// Initialize AI provider (will validate API key automatically)
|
|
509
|
+
const aiProvider = (0, ai_provider_factory_1.createAIProvider)();
|
|
519
510
|
// Load final analysis prompt template
|
|
520
511
|
const promptPath = path.join(__dirname, '..', '..', 'prompts', 'remediate-final-analysis.md');
|
|
521
512
|
const promptTemplate = fs.readFileSync(promptPath, 'utf8');
|
|
@@ -541,13 +532,13 @@ async function generateFinalAnalysis(session, logger, requestId) {
|
|
|
541
532
|
.replace('{iterations}', session.iterations.length.toString())
|
|
542
533
|
.replace('{dataSources}', dataSources.join(', '))
|
|
543
534
|
.replace('{completeInvestigationData}', JSON.stringify(completeInvestigationData, null, 2));
|
|
544
|
-
logger.debug('Sending final analysis request to
|
|
535
|
+
logger.debug('Sending final analysis request to AI provider', {
|
|
545
536
|
requestId,
|
|
546
537
|
sessionId: session.sessionId,
|
|
547
538
|
promptLength: finalAnalysisPrompt.length
|
|
548
539
|
});
|
|
549
|
-
// Send to
|
|
550
|
-
const aiResponse = await
|
|
540
|
+
// Send to AI provider
|
|
541
|
+
const aiResponse = await aiProvider.sendMessage(finalAnalysisPrompt);
|
|
551
542
|
logger.debug('Received AI final analysis response', {
|
|
552
543
|
requestId,
|
|
553
544
|
sessionId: session.sessionId,
|
|
@@ -650,9 +641,9 @@ async function generateFinalAnalysis(session, logger, requestId) {
|
|
|
650
641
|
requestId,
|
|
651
642
|
sessionId: session.sessionId,
|
|
652
643
|
suggestedActions: [
|
|
653
|
-
'Check
|
|
644
|
+
'Check AI provider API key is set correctly',
|
|
654
645
|
'Verify prompts/remediate-final-analysis.md exists',
|
|
655
|
-
'Check network connectivity to
|
|
646
|
+
'Check network connectivity to AI provider',
|
|
656
647
|
'Review AI response format for parsing issues'
|
|
657
648
|
]
|
|
658
649
|
});
|
|
@@ -739,8 +730,10 @@ async function executeRemediationCommands(session, sessionDir, logger, requestId
|
|
|
739
730
|
actionId,
|
|
740
731
|
command: action.command
|
|
741
732
|
});
|
|
742
|
-
// Execute the command
|
|
743
|
-
|
|
733
|
+
// Execute the command using shell
|
|
734
|
+
// Clean up escape sequences that some AI models incorrectly add to JSON parameters
|
|
735
|
+
let fullCommand = action.command || '';
|
|
736
|
+
fullCommand = fullCommand.replace(/\\"/g, '"');
|
|
744
737
|
const { exec } = require('child_process');
|
|
745
738
|
const { promisify } = require('util');
|
|
746
739
|
const execAsync = promisify(exec);
|
|
@@ -970,19 +963,10 @@ async function handleRemediateTool(args) {
|
|
|
970
963
|
// Write initial session file
|
|
971
964
|
writeSessionFile(sessionDir, sessionId, session);
|
|
972
965
|
logger.info('Investigation session created', { requestId, sessionId });
|
|
973
|
-
// Initialize
|
|
974
|
-
const
|
|
975
|
-
if (!claudeApiKey) {
|
|
976
|
-
throw error_handling_1.ErrorHandler.createError(error_handling_1.ErrorCategory.CONFIGURATION, error_handling_1.ErrorSeverity.HIGH, 'ANTHROPIC_API_KEY environment variable not set', {
|
|
977
|
-
operation: 'claude_initialization',
|
|
978
|
-
component: 'RemediateTool',
|
|
979
|
-
requestId,
|
|
980
|
-
suggestedActions: ['Set ANTHROPIC_API_KEY environment variable']
|
|
981
|
-
});
|
|
982
|
-
}
|
|
983
|
-
const claudeIntegration = new claude_1.ClaudeIntegration(claudeApiKey);
|
|
966
|
+
// Initialize AI provider (will validate API key automatically)
|
|
967
|
+
const aiProvider = (0, ai_provider_factory_1.createAIProvider)();
|
|
984
968
|
// Conduct AI-driven investigation
|
|
985
|
-
const finalAnalysis = await conductInvestigation(session, sessionDir,
|
|
969
|
+
const finalAnalysis = await conductInvestigation(session, sessionDir, aiProvider, logger, requestId);
|
|
986
970
|
logger.info('Remediation analysis completed', {
|
|
987
971
|
requestId,
|
|
988
972
|
sessionId,
|
package/dist/tools/version.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { Logger } from '../core/error-handling';
|
|
8
8
|
export declare const VERSION_TOOL_NAME = "version";
|
|
9
|
-
export declare const VERSION_TOOL_DESCRIPTION = "Get comprehensive system status including version information, Vector DB connection status, embedding service capabilities,
|
|
9
|
+
export declare const VERSION_TOOL_DESCRIPTION = "Get comprehensive system status including version information, Vector DB connection status, embedding service capabilities, AI provider connectivity, Kubernetes cluster connectivity, Kyverno policy engine status, and pattern management health check";
|
|
10
10
|
export declare const VERSION_TOOL_INPUT_SCHEMA: {};
|
|
11
11
|
export interface VersionInfo {
|
|
12
12
|
version: string;
|
|
@@ -45,9 +45,10 @@ export interface SystemStatus {
|
|
|
45
45
|
dimensions?: number;
|
|
46
46
|
reason?: string;
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
aiProvider: {
|
|
49
49
|
connected: boolean;
|
|
50
50
|
keyConfigured: boolean;
|
|
51
|
+
providerType?: string;
|
|
51
52
|
error?: string;
|
|
52
53
|
};
|
|
53
54
|
kubernetes: {
|
|
@@ -78,6 +79,13 @@ export interface SystemStatus {
|
|
|
78
79
|
error?: string;
|
|
79
80
|
reason?: string;
|
|
80
81
|
};
|
|
82
|
+
nushell: {
|
|
83
|
+
installed: boolean;
|
|
84
|
+
version?: string | null;
|
|
85
|
+
ready: boolean;
|
|
86
|
+
error?: string;
|
|
87
|
+
installationUrl?: string;
|
|
88
|
+
};
|
|
81
89
|
}
|
|
82
90
|
/**
|
|
83
91
|
* Test Kyverno installation and readiness for policy generation using shared client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/tools/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/tools/version.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAMhD,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,wBAAwB,6PAA6P,CAAC;AACnS,eAAO,MAAM,yBAAyB,IAAK,CAAC;AAE5C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE;QACR,SAAS,EAAE,OAAO,CAAC;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,EAAE;YACX,QAAQ,EAAE;gBACR,MAAM,EAAE,OAAO,CAAC;gBAChB,cAAc,CAAC,EAAE,MAAM,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AAC;QAClB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,OAAO,EAAE;QACP,SAAS,EAAE,OAAO,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,qBAAqB,EAAE,OAAO,CAAC;QAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,EAAE;QACP,SAAS,EAAE,OAAO,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,KAAK,EAAE,OAAO,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH;AAgOD;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CA8HzE;AAsHD;;GAEG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAqB5C;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,CAqFd"}
|
package/dist/tools/version.js
CHANGED
|
@@ -49,8 +49,9 @@ const k8s = __importStar(require("@kubernetes/client-node"));
|
|
|
49
49
|
const index_1 = require("../core/index");
|
|
50
50
|
const discovery_1 = require("../core/discovery");
|
|
51
51
|
const kubernetes_utils_1 = require("../core/kubernetes-utils");
|
|
52
|
+
const nushell_runtime_1 = require("../core/nushell-runtime");
|
|
52
53
|
exports.VERSION_TOOL_NAME = 'version';
|
|
53
|
-
exports.VERSION_TOOL_DESCRIPTION = 'Get comprehensive system status including version information, Vector DB connection status, embedding service capabilities,
|
|
54
|
+
exports.VERSION_TOOL_DESCRIPTION = 'Get comprehensive system status including version information, Vector DB connection status, embedding service capabilities, AI provider connectivity, Kubernetes cluster connectivity, Kyverno policy engine status, and pattern management health check';
|
|
54
55
|
exports.VERSION_TOOL_INPUT_SCHEMA = {};
|
|
55
56
|
/**
|
|
56
57
|
* Test Vector DB connectivity and get status for all collections
|
|
@@ -396,32 +397,68 @@ async function getKubernetesStatus() {
|
|
|
396
397
|
}
|
|
397
398
|
}
|
|
398
399
|
/**
|
|
399
|
-
* Test
|
|
400
|
+
* Test Nushell runtime availability
|
|
400
401
|
*/
|
|
401
|
-
async function
|
|
402
|
-
|
|
403
|
-
|
|
402
|
+
async function getNushellStatus() {
|
|
403
|
+
try {
|
|
404
|
+
const runtime = new nushell_runtime_1.NushellRuntime();
|
|
405
|
+
const validation = await runtime.validateRuntime();
|
|
404
406
|
return {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
407
|
+
installed: validation.versionInfo?.installed || false,
|
|
408
|
+
version: validation.versionInfo?.version,
|
|
409
|
+
ready: validation.ready,
|
|
410
|
+
error: validation.ready ? undefined : validation.message,
|
|
411
|
+
installationUrl: validation.installationUrl
|
|
408
412
|
};
|
|
409
413
|
}
|
|
414
|
+
catch (error) {
|
|
415
|
+
return {
|
|
416
|
+
installed: false,
|
|
417
|
+
ready: false,
|
|
418
|
+
error: error instanceof Error ? error.message : String(error),
|
|
419
|
+
installationUrl: 'https://www.nushell.sh/book/installation.html'
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Test AI provider connectivity
|
|
425
|
+
*/
|
|
426
|
+
async function getAIProviderStatus() {
|
|
410
427
|
try {
|
|
411
|
-
// Import
|
|
412
|
-
const {
|
|
413
|
-
const
|
|
428
|
+
// Import AI provider factory and test connectivity
|
|
429
|
+
const { createAIProvider } = await Promise.resolve().then(() => __importStar(require('../core/ai-provider-factory')));
|
|
430
|
+
const aiProvider = createAIProvider();
|
|
431
|
+
if (!aiProvider.isInitialized()) {
|
|
432
|
+
return {
|
|
433
|
+
connected: false,
|
|
434
|
+
keyConfigured: false,
|
|
435
|
+
providerType: aiProvider.getProviderType(),
|
|
436
|
+
error: 'AI provider API key not configured'
|
|
437
|
+
};
|
|
438
|
+
}
|
|
414
439
|
// Test with a minimal request to check connectivity
|
|
415
|
-
await
|
|
440
|
+
await aiProvider.sendMessage('test');
|
|
416
441
|
return {
|
|
417
442
|
connected: true,
|
|
418
|
-
keyConfigured: true
|
|
443
|
+
keyConfigured: true,
|
|
444
|
+
providerType: aiProvider.getProviderType()
|
|
419
445
|
};
|
|
420
446
|
}
|
|
421
447
|
catch (error) {
|
|
448
|
+
// Try to get provider type even on error
|
|
449
|
+
let providerType;
|
|
450
|
+
try {
|
|
451
|
+
const { createAIProvider } = await Promise.resolve().then(() => __importStar(require('../core/ai-provider-factory')));
|
|
452
|
+
const aiProvider = createAIProvider();
|
|
453
|
+
providerType = aiProvider.getProviderType();
|
|
454
|
+
}
|
|
455
|
+
catch {
|
|
456
|
+
providerType = undefined;
|
|
457
|
+
}
|
|
422
458
|
return {
|
|
423
459
|
connected: false,
|
|
424
|
-
keyConfigured:
|
|
460
|
+
keyConfigured: false,
|
|
461
|
+
providerType,
|
|
425
462
|
error: error instanceof Error ? error.message : String(error)
|
|
426
463
|
};
|
|
427
464
|
}
|
|
@@ -460,22 +497,24 @@ async function handleVersionTool(args, logger, requestId) {
|
|
|
460
497
|
const version = getVersionInfo();
|
|
461
498
|
// Run all diagnostics in parallel for better performance
|
|
462
499
|
logger.info('Running system diagnostics...', { requestId });
|
|
463
|
-
const [vectorDBStatus, embeddingStatus,
|
|
500
|
+
const [vectorDBStatus, embeddingStatus, aiProviderStatus, kubernetesStatus, capabilityStatus, kyvernoStatus, nushellStatus] = await Promise.all([
|
|
464
501
|
getVectorDBStatus(),
|
|
465
502
|
getEmbeddingStatus(),
|
|
466
|
-
|
|
503
|
+
getAIProviderStatus(),
|
|
467
504
|
getKubernetesStatus(),
|
|
468
505
|
getCapabilityStatus(),
|
|
469
|
-
getKyvernoStatus()
|
|
506
|
+
getKyvernoStatus(),
|
|
507
|
+
getNushellStatus()
|
|
470
508
|
]);
|
|
471
509
|
const systemStatus = {
|
|
472
510
|
version,
|
|
473
511
|
vectorDB: vectorDBStatus,
|
|
474
512
|
embedding: embeddingStatus,
|
|
475
|
-
|
|
513
|
+
aiProvider: aiProviderStatus,
|
|
476
514
|
kubernetes: kubernetesStatus,
|
|
477
515
|
capabilities: capabilityStatus,
|
|
478
|
-
kyverno: kyvernoStatus
|
|
516
|
+
kyverno: kyvernoStatus,
|
|
517
|
+
nushell: nushellStatus
|
|
479
518
|
};
|
|
480
519
|
// Log summary of system health
|
|
481
520
|
logger.info('System diagnostics completed', {
|
|
@@ -483,10 +522,11 @@ async function handleVersionTool(args, logger, requestId) {
|
|
|
483
522
|
version: version.version,
|
|
484
523
|
vectorDBConnected: vectorDBStatus.connected,
|
|
485
524
|
embeddingAvailable: embeddingStatus.available,
|
|
486
|
-
|
|
525
|
+
aiProviderConnected: aiProviderStatus.connected,
|
|
487
526
|
kubernetesConnected: kubernetesStatus.connected,
|
|
488
527
|
capabilitySystemReady: capabilityStatus.systemReady,
|
|
489
|
-
kyvernoReady: kyvernoStatus.policyGenerationReady
|
|
528
|
+
kyvernoReady: kyvernoStatus.policyGenerationReady,
|
|
529
|
+
nushellReady: nushellStatus.ready
|
|
490
530
|
});
|
|
491
531
|
return {
|
|
492
532
|
content: [{
|
|
@@ -495,7 +535,7 @@ async function handleVersionTool(args, logger, requestId) {
|
|
|
495
535
|
status: 'success',
|
|
496
536
|
system: systemStatus,
|
|
497
537
|
summary: {
|
|
498
|
-
overall: vectorDBStatus.connected &&
|
|
538
|
+
overall: vectorDBStatus.connected && aiProviderStatus.connected && kubernetesStatus.connected && capabilityStatus.systemReady ? 'healthy' : 'degraded',
|
|
499
539
|
patternSearch: embeddingStatus.available ? 'semantic+keyword' : 'keyword-only',
|
|
500
540
|
capabilityScanning: capabilityStatus.systemReady && kubernetesStatus.connected ? 'ready' : 'not-ready',
|
|
501
541
|
kubernetesAccess: kubernetesStatus.connected ? 'connected' : 'disconnected',
|
|
@@ -505,9 +545,10 @@ async function handleVersionTool(args, logger, requestId) {
|
|
|
505
545
|
vectorDBStatus.connected && vectorDBStatus.collections.policies.exists ? 'policy-management' : null,
|
|
506
546
|
capabilityStatus.systemReady && kubernetesStatus.connected ? 'capability-scanning' : null,
|
|
507
547
|
embeddingStatus.available ? 'semantic-search' : null,
|
|
508
|
-
|
|
548
|
+
aiProviderStatus.connected ? 'ai-recommendations' : null,
|
|
509
549
|
kubernetesStatus.connected ? 'kubernetes-integration' : null,
|
|
510
|
-
kyvernoStatus.policyGenerationReady ? 'policy-generation' : null
|
|
550
|
+
kyvernoStatus.policyGenerationReady ? 'policy-generation' : null,
|
|
551
|
+
nushellStatus.ready ? 'platform-scripting' : null
|
|
511
552
|
].filter(Boolean)
|
|
512
553
|
},
|
|
513
554
|
timestamp: new Date().toISOString()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vfarcic/dot-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.105.0",
|
|
4
4
|
"description": "AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance",
|
|
5
5
|
"mcpName": "io.github.vfarcic/dot-ai",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,10 +14,9 @@
|
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"test": "npm run test:integration",
|
|
17
|
-
"test:integration:setup": "./tests/integration/infrastructure/setup-cluster.sh",
|
|
18
17
|
"test:integration:teardown": "./tests/integration/infrastructure/teardown-cluster.sh",
|
|
19
18
|
"test:integration:server": "KUBECONFIG=./kubeconfig-test.yaml PORT=3456 DOT_AI_SESSION_DIR=./tmp/sessions TRANSPORT_TYPE=http QDRANT_URL=http://localhost:6335 QDRANT_CAPABILITIES_COLLECTION=capabilities-policies ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY OPENAI_API_KEY=$OPENAI_API_KEY node dist/mcp/server.js",
|
|
20
|
-
"test:integration": "
|
|
19
|
+
"test:integration": "./tests/integration/infrastructure/run-integration-tests.sh",
|
|
21
20
|
"test:integration:watch": "vitest --config=vitest.integration.config.ts --test-timeout=1200000",
|
|
22
21
|
"clean": "rm -rf dist",
|
|
23
22
|
"prebuild": "npm run clean && npm run lint",
|
|
@@ -65,6 +64,7 @@
|
|
|
65
64
|
"dist",
|
|
66
65
|
"prompts",
|
|
67
66
|
"shared-prompts",
|
|
67
|
+
"scripts",
|
|
68
68
|
"README.md",
|
|
69
69
|
"LICENSE"
|
|
70
70
|
],
|
|
@@ -81,10 +81,14 @@
|
|
|
81
81
|
"vitest": "^3.2.4"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
+
"@ai-sdk/anthropic": "^2.0.23",
|
|
85
|
+
"@ai-sdk/google": "^2.0.17",
|
|
86
|
+
"@ai-sdk/openai": "^2.0.42",
|
|
84
87
|
"@anthropic-ai/sdk": "^0.65.0",
|
|
85
88
|
"@kubernetes/client-node": "^1.3.0",
|
|
86
89
|
"@modelcontextprotocol/sdk": "^1.13.2",
|
|
87
90
|
"@qdrant/js-client-rest": "^1.15.0",
|
|
91
|
+
"ai": "^5.0.60",
|
|
88
92
|
"glob": "^11.0.3",
|
|
89
93
|
"openai": "^5.11.0",
|
|
90
94
|
"yaml": "^2.8.0",
|