@vfarcic/dot-ai 0.45.0 → 0.47.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/dist/core/cluster-utils.d.ts +12 -0
- package/dist/core/cluster-utils.d.ts.map +1 -0
- package/dist/core/cluster-utils.js +27 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +12 -0
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/mcp/server.js +7 -11
- package/dist/tools/deploy-manifests.d.ts.map +1 -1
- package/dist/tools/deploy-manifests.js +3 -0
- package/dist/tools/generate-manifests.d.ts.map +1 -1
- package/dist/tools/generate-manifests.js +3 -0
- package/dist/tools/recommend.d.ts +1 -1
- package/dist/tools/recommend.d.ts.map +1 -1
- package/dist/tools/recommend.js +5 -2
- package/package.json +1 -1
- package/prompts/concept-extraction.md +5 -1
- package/prompts/intent-validation.md +12 -3
- package/prompts/resource-selection.md +7 -2
- package/prompts/resource-solution-ranking.md +4 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cluster Connection Utilities
|
|
3
|
+
*
|
|
4
|
+
* Provides reusable functions for lazy cluster connectivity checking
|
|
5
|
+
*/
|
|
6
|
+
import { Logger } from './error-handling';
|
|
7
|
+
import { DotAI } from './index';
|
|
8
|
+
/**
|
|
9
|
+
* Ensures cluster connectivity and throws proper MCP-compatible errors
|
|
10
|
+
*/
|
|
11
|
+
export declare function ensureClusterConnection(dotAI: DotAI, logger: Logger, requestId: string, component: string): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=cluster-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cluster-utils.d.ts","sourceRoot":"","sources":["../../src/core/cluster-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAA8C,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CAqBf"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Cluster Connection Utilities
|
|
4
|
+
*
|
|
5
|
+
* Provides reusable functions for lazy cluster connectivity checking
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.ensureClusterConnection = ensureClusterConnection;
|
|
9
|
+
const error_handling_1 = require("./error-handling");
|
|
10
|
+
/**
|
|
11
|
+
* Ensures cluster connectivity and throws proper MCP-compatible errors
|
|
12
|
+
*/
|
|
13
|
+
async function ensureClusterConnection(dotAI, logger, requestId, component) {
|
|
14
|
+
logger.debug('Checking cluster connectivity', { requestId, component });
|
|
15
|
+
try {
|
|
16
|
+
await dotAI.discovery.connect();
|
|
17
|
+
logger.debug('Cluster connectivity verified', { requestId, component });
|
|
18
|
+
}
|
|
19
|
+
catch (clusterError) {
|
|
20
|
+
const errorMessage = clusterError instanceof Error ? clusterError.message : String(clusterError);
|
|
21
|
+
throw error_handling_1.ErrorHandler.createError(error_handling_1.ErrorCategory.KUBERNETES, error_handling_1.ErrorSeverity.HIGH, `Cluster connection failed: ${errorMessage}\n\nTroubleshooting:\n- Check KUBECONFIG environment variable\n- Verify cluster is running: kubectl cluster-info\n- Test kubectl connectivity: kubectl get nodes\n- Ensure cluster is accessible from this environment`, {
|
|
22
|
+
operation: 'cluster_connectivity_check',
|
|
23
|
+
component,
|
|
24
|
+
requestId
|
|
25
|
+
}, clusterError instanceof Error ? clusterError : new Error(String(clusterError)));
|
|
26
|
+
}
|
|
27
|
+
}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare class DotAI {
|
|
|
29
29
|
constructor(config?: CoreConfig);
|
|
30
30
|
private validateConfig;
|
|
31
31
|
initialize(): Promise<void>;
|
|
32
|
+
initializeWithoutCluster(): Promise<void>;
|
|
32
33
|
isInitialized(): boolean;
|
|
33
34
|
getVersion(): string;
|
|
34
35
|
getAnthropicApiKey(): string | undefined;
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEhF,MAAM,WAAW,UAAU;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,KAAK;IAChB,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,WAAW,CAAkB;IAErC,SAAgB,SAAS,EAAE,mBAAmB,CAAC;IAC/C,SAAgB,MAAM,EAAE,YAAY,CAAC;IACrC,SAAgB,QAAQ,EAAE,cAAc,CAAC;IACzC,SAAgB,MAAM,EAAE,iBAAiB,CAAC;IAC1C,SAAgB,MAAM,EAAE;QACtB,MAAM,EAAE,YAAY,CAAC;QACrB,SAAS,EAAE,iBAAiB,CAAC;QAC7B,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;QACnC,aAAa,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;QACtD,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,KA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AO,CAAC,IAAI,CAAC;IAc3B,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC;IAa/C,aAAa,IAAI,OAAO;IAIxB,UAAU,IAAI,MAAM;IAIpB,kBAAkB,IAAI,MAAM,GAAG,SAAS;CAGzC;AAGD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC5G,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC3G,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAGpH,eAAe,KAAK,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -95,6 +95,18 @@ class DotAI {
|
|
|
95
95
|
throw error;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
+
async initializeWithoutCluster() {
|
|
99
|
+
try {
|
|
100
|
+
// Initialize non-cluster modules only
|
|
101
|
+
await this.memory.initialize();
|
|
102
|
+
await this.workflow.initialize();
|
|
103
|
+
this.initialized = true;
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
this.initialized = false;
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
98
110
|
isInitialized() {
|
|
99
111
|
return this.initialized;
|
|
100
112
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/core/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAMlD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAIxD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,WA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O,CAAC,cAAc,CAAC,CAAuB;gBAElC,MAAM,EAAE,eAAe;IAcnC;;OAEG;IACG,iBAAiB,CACrB,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,EACrC,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GAClD,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAsB9B;;;OAGG;YACW,sBAAsB;IAwDpC;;OAEG;YACW,yBAAyB;IAgCvC;;OAEG;IACH,OAAO,CAAC,0BAA0B;IASlC;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAsClC;;OAEG;YACW,wBAAwB;IAkGtC;;OAEG;YACW,oBAAoB;IAgDlC;;OAEG;YACW,uBAAuB;IAarC;;OAEG;YACW,kBAAkB;IAuChC;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA0E/B;;OAEG;YACW,sBAAsB;IAiEpC;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAgCjC;;OAEG;YACW,uBAAuB;CA6EtC"}
|
package/dist/mcp/server.js
CHANGED
|
@@ -92,19 +92,15 @@ async function main() {
|
|
|
92
92
|
}
|
|
93
93
|
// Initialize DotAI - it will read KUBECONFIG and ANTHROPIC_API_KEY from environment
|
|
94
94
|
const dotAI = new index_js_1.DotAI();
|
|
95
|
-
//
|
|
96
|
-
process.stderr.write('
|
|
95
|
+
// Initialize without cluster connection (lazy connection)
|
|
96
|
+
process.stderr.write('Initializing DevOps AI Toolkit...\n');
|
|
97
97
|
try {
|
|
98
|
-
await dotAI.
|
|
99
|
-
|
|
100
|
-
process.stderr.write('Cluster connectivity
|
|
98
|
+
await dotAI.initializeWithoutCluster();
|
|
99
|
+
process.stderr.write('DevOps AI Toolkit initialized successfully\n');
|
|
100
|
+
process.stderr.write('Cluster connectivity will be checked when needed by individual tools\n');
|
|
101
101
|
}
|
|
102
|
-
catch (
|
|
103
|
-
process.stderr.write(`FATAL: Failed to
|
|
104
|
-
process.stderr.write('Troubleshooting:\n');
|
|
105
|
-
process.stderr.write('- Check KUBECONFIG environment variable\n');
|
|
106
|
-
process.stderr.write('- Verify cluster is running: kubectl cluster-info\n');
|
|
107
|
-
process.stderr.write('- Test kubectl connectivity: kubectl get nodes\n');
|
|
102
|
+
catch (initError) {
|
|
103
|
+
process.stderr.write(`FATAL: Failed to initialize DevOps AI Toolkit: ${initError}\n`);
|
|
108
104
|
process.exit(1);
|
|
109
105
|
}
|
|
110
106
|
// Create and configure MCP server
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-manifests.d.ts","sourceRoot":"","sources":["../../src/tools/deploy-manifests.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy-manifests.d.ts","sourceRoot":"","sources":["../../src/tools/deploy-manifests.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAIhD,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAC3D,eAAO,MAAM,gCAAgC,kFAAkF,CAAC;AAGhI,eAAO,MAAM,iCAAiC;;;CAG7C,CAAC;AAGF;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9C,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC,CAkExD"}
|
|
@@ -8,6 +8,7 @@ exports.handleDeployManifestsTool = handleDeployManifestsTool;
|
|
|
8
8
|
const zod_1 = require("zod");
|
|
9
9
|
const error_handling_1 = require("../core/error-handling");
|
|
10
10
|
const deploy_operation_1 = require("../core/deploy-operation");
|
|
11
|
+
const cluster_utils_1 = require("../core/cluster-utils");
|
|
11
12
|
// Tool metadata for direct MCP registration
|
|
12
13
|
exports.DEPLOYMANIFESTS_TOOL_NAME = 'deployManifests';
|
|
13
14
|
exports.DEPLOYMANIFESTS_TOOL_DESCRIPTION = 'Deploy Kubernetes manifests from generated solution with kubectl apply --wait';
|
|
@@ -28,6 +29,8 @@ async function handleDeployManifestsTool(args, dotAI, logger, requestId) {
|
|
|
28
29
|
});
|
|
29
30
|
// Input validation is handled automatically by MCP SDK with Zod schema
|
|
30
31
|
// args are already validated and typed when we reach this point
|
|
32
|
+
// Ensure cluster connectivity before proceeding
|
|
33
|
+
await (0, cluster_utils_1.ensureClusterConnection)(dotAI, logger, requestId, 'DeployManifestsTool');
|
|
31
34
|
const deployOp = new deploy_operation_1.DeployOperation();
|
|
32
35
|
const deployOptions = {
|
|
33
36
|
solutionId: args.solutionId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-manifests.d.ts","sourceRoot":"","sources":["../../src/tools/generate-manifests.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-manifests.d.ts","sourceRoot":"","sources":["../../src/tools/generate-manifests.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAUhD,eAAO,MAAM,2BAA2B,sBAAsB,CAAC;AAC/D,eAAO,MAAM,kCAAkC,+IAA+I,CAAC;AAG/L,eAAO,MAAM,mCAAmC;;CAE/C,CAAC;AA2VF;;GAEG;AACH,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,EAC5B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC,CAwMxD"}
|
|
@@ -41,6 +41,7 @@ exports.handleGenerateManifestsTool = handleGenerateManifestsTool;
|
|
|
41
41
|
const zod_1 = require("zod");
|
|
42
42
|
const error_handling_1 = require("../core/error-handling");
|
|
43
43
|
const claude_1 = require("../core/claude");
|
|
44
|
+
const cluster_utils_1 = require("../core/cluster-utils");
|
|
44
45
|
const fs = __importStar(require("fs"));
|
|
45
46
|
const path = __importStar(require("path"));
|
|
46
47
|
const yaml = __importStar(require("js-yaml"));
|
|
@@ -357,6 +358,8 @@ async function handleGenerateManifestsTool(args, dotAI, logger, requestId) {
|
|
|
357
358
|
]
|
|
358
359
|
});
|
|
359
360
|
}
|
|
361
|
+
// Ensure cluster connectivity before proceeding
|
|
362
|
+
await (0, cluster_utils_1.ensureClusterConnection)(dotAI, logger, requestId, 'GenerateManifestsTool');
|
|
360
363
|
// Load solution file
|
|
361
364
|
let solution;
|
|
362
365
|
try {
|
|
@@ -5,7 +5,7 @@ import { z } from 'zod';
|
|
|
5
5
|
import { DotAI } from '../core/index';
|
|
6
6
|
import { Logger } from '../core/error-handling';
|
|
7
7
|
export declare const RECOMMEND_TOOL_NAME = "recommend";
|
|
8
|
-
export declare const RECOMMEND_TOOL_DESCRIPTION = "Deploy, create,
|
|
8
|
+
export declare const RECOMMEND_TOOL_DESCRIPTION = "Deploy, create, setup, install, or run applications, infrastructure, and services on Kubernetes with AI recommendations. Describe what you want to deploy.";
|
|
9
9
|
export declare const RECOMMEND_TOOL_INPUT_SCHEMA: {
|
|
10
10
|
intent: z.ZodString;
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommend.d.ts","sourceRoot":"","sources":["../../src/tools/recommend.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"recommend.d.ts","sourceRoot":"","sources":["../../src/tools/recommend.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAQhD,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,0BAA0B,+JAA+J,CAAC;AAGvM,eAAO,MAAM,2BAA2B;;CAEvC,CAAC;AAyHF;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,EACxB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC,CAyOxD"}
|
package/dist/tools/recommend.js
CHANGED
|
@@ -42,16 +42,17 @@ const zod_1 = require("zod");
|
|
|
42
42
|
const error_handling_1 = require("../core/error-handling");
|
|
43
43
|
const schema_1 = require("../core/schema");
|
|
44
44
|
const claude_1 = require("../core/claude");
|
|
45
|
+
const cluster_utils_1 = require("../core/cluster-utils");
|
|
45
46
|
const fs = __importStar(require("fs"));
|
|
46
47
|
const path = __importStar(require("path"));
|
|
47
48
|
const crypto = __importStar(require("crypto"));
|
|
48
49
|
const session_utils_1 = require("../core/session-utils");
|
|
49
50
|
// Tool metadata for direct MCP registration
|
|
50
51
|
exports.RECOMMEND_TOOL_NAME = 'recommend';
|
|
51
|
-
exports.RECOMMEND_TOOL_DESCRIPTION = 'Deploy, create,
|
|
52
|
+
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.';
|
|
52
53
|
// Zod schema for MCP registration
|
|
53
54
|
exports.RECOMMEND_TOOL_INPUT_SCHEMA = {
|
|
54
|
-
intent: zod_1.z.string().min(1).max(1000).describe('What the user wants to deploy, create,
|
|
55
|
+
intent: zod_1.z.string().min(1).max(1000).describe('What the user wants to deploy, create, setup, install, or run on Kubernetes. Examples: "deploy web application", "create PostgreSQL database", "setup Redis cache", "install Prometheus monitoring", "configure Ingress controller", "provision storage volumes", "launch MongoDB operator", "run Node.js API", "setup CI/CD pipeline", "create load balancer", "install Grafana dashboard", "deploy React frontend"')
|
|
55
56
|
};
|
|
56
57
|
/**
|
|
57
58
|
* Validate intent meaningfulness using AI
|
|
@@ -196,6 +197,8 @@ async function handleRecommendTool(args, dotAI, logger, requestId) {
|
|
|
196
197
|
]
|
|
197
198
|
}, error instanceof Error ? error : new Error(String(error)));
|
|
198
199
|
}
|
|
200
|
+
// Ensure cluster connectivity before proceeding
|
|
201
|
+
await (0, cluster_utils_1.ensureClusterConnection)(dotAI, logger, requestId, 'RecommendTool');
|
|
199
202
|
logger.info('Starting resource recommendation process', {
|
|
200
203
|
requestId,
|
|
201
204
|
intent: args.intent,
|
package/package.json
CHANGED
|
@@ -16,8 +16,10 @@ Analyze the user intent and extract all relevant deployment concepts. Consider t
|
|
|
16
16
|
|
|
17
17
|
### **Infrastructure & Integration**
|
|
18
18
|
- Data storage: database, cache, persistent storage, file storage, object storage
|
|
19
|
+
- Database services: PostgreSQL, MongoDB, MySQL, Redis, Elasticsearch clusters
|
|
19
20
|
- Connectivity: external database, message queue, third-party API, service mesh
|
|
20
|
-
- Networking: public access, internal service, load balancing, ingress
|
|
21
|
+
- Networking: public access, internal service, load balancing, ingress, networking policies
|
|
22
|
+
- Infrastructure operators: monitoring, logging, backup, security operators
|
|
21
23
|
|
|
22
24
|
### **Operational Requirements**
|
|
23
25
|
- Scaling: auto-scaling, high availability, load balancing, horizontal scaling
|
|
@@ -29,6 +31,8 @@ Analyze the user intent and extract all relevant deployment concepts. Consider t
|
|
|
29
31
|
- Programming languages: golang, java, python, nodejs, react, angular
|
|
30
32
|
- Frameworks: spring boot, express, flask, django, rails
|
|
31
33
|
- Databases: postgresql, mysql, mongodb, redis, elasticsearch
|
|
34
|
+
- Infrastructure tools: prometheus, grafana, ingress-nginx, istio, knative
|
|
35
|
+
- Operators: database operators, monitoring operators, backup operators
|
|
32
36
|
|
|
33
37
|
## Response Format
|
|
34
38
|
|
|
@@ -14,9 +14,10 @@ An intent is **TOO VAGUE OR GENERIC** if it:
|
|
|
14
14
|
- Extremely short without any technical context (1-2 words like "database", "container")
|
|
15
15
|
|
|
16
16
|
An intent is **SPECIFIC ENOUGH** if it includes ANY of:
|
|
17
|
-
- Specific technology or framework (Node.js, PostgreSQL, Redis, React, Python, etc.)
|
|
18
|
-
- Clear architectural pattern (stateless app, microservice, web server, REST API, etc.)
|
|
19
|
-
- Application type or purpose (frontend, backend, database, cache, queue, etc.)
|
|
17
|
+
- Specific technology or framework (Node.js, PostgreSQL, Redis, React, Python, Prometheus, Grafana, etc.)
|
|
18
|
+
- Clear architectural pattern (stateless app, microservice, web server, REST API, operator, etc.)
|
|
19
|
+
- Application type or purpose (frontend, backend, database, cache, queue, monitoring, storage, etc.)
|
|
20
|
+
- Infrastructure component (load balancer, ingress controller, persistent storage, networking, etc.)
|
|
20
21
|
- Deployment context that helps understand Kubernetes resource needs
|
|
21
22
|
|
|
22
23
|
**IMPORTANT**: Be generous in accepting intents. Focus on rejecting only truly meaningless requests. Terms like "stateless app", "web application", "microservice", "database cluster" provide sufficient Kubernetes deployment context.
|
|
@@ -40,6 +41,14 @@ An intent is **SPECIFIC ENOUGH** if it includes ANY of:
|
|
|
40
41
|
- "Node.js application" (technology + type)
|
|
41
42
|
- "frontend service" (purpose + type)
|
|
42
43
|
- "cache service" (purpose + type)
|
|
44
|
+
- "PostgreSQL database" (technology + infrastructure type)
|
|
45
|
+
- "Redis cache" (technology + infrastructure purpose)
|
|
46
|
+
- "Prometheus monitoring" (technology + infrastructure purpose)
|
|
47
|
+
- "Ingress controller" (infrastructure component + type)
|
|
48
|
+
- "MongoDB operator" (technology + operator pattern)
|
|
49
|
+
- "load balancer" (infrastructure component)
|
|
50
|
+
- "persistent storage" (infrastructure capability)
|
|
51
|
+
- "CI/CD pipeline" (workflow automation)
|
|
43
52
|
|
|
44
53
|
## Response Format
|
|
45
54
|
|
|
@@ -14,14 +14,19 @@ You are a Kubernetes expert. Given this user intent and available resources, sel
|
|
|
14
14
|
## Instructions
|
|
15
15
|
|
|
16
16
|
Select all resources that could be relevant for this intent. Consider:
|
|
17
|
-
- Direct relevance to the user's needs
|
|
17
|
+
- Direct relevance to the user's needs (applications, infrastructure, operators, networking, storage)
|
|
18
18
|
- Common Kubernetes patterns and best practices
|
|
19
|
-
- **Organizational
|
|
19
|
+
- **PRIORITY: Organizational pattern resources** - If organizational patterns are provided above, ALWAYS include ALL resources from patterns that match this intent, even if individual resources don't seem directly relevant
|
|
20
|
+
- **Pattern resource completeness** - Organizational patterns represent complete, battle-tested solutions. Include entire pattern resource sets to avoid incomplete deployments
|
|
20
21
|
- Resource relationships and combinations
|
|
21
22
|
- Production deployment patterns
|
|
22
23
|
- Complex multi-component solutions
|
|
23
24
|
- **Custom Resource Definitions (CRDs)** that might provide higher-level abstractions or simpler alternatives
|
|
24
25
|
- Platform-specific resources (e.g., Crossplane, Knative, Istio, ArgoCD) that could simplify the deployment
|
|
26
|
+
- **Infrastructure components**: networking (Ingress, Service, NetworkPolicy), storage (PVC, StorageClass), security (RBAC, ServiceAccount)
|
|
27
|
+
- **Database operators**: PostgreSQL, MongoDB, MySQL, Redis operators that provide managed database services
|
|
28
|
+
- **Monitoring and observability**: Prometheus, Grafana, AlertManager, logging operators
|
|
29
|
+
- **Operator patterns**: Look for operators that provide simplified management of complex infrastructure
|
|
25
30
|
- **CRD Selection Priority**: If you see multiple CRDs from the same group with similar purposes (like "App" and "AppClaim"), include the namespace-scoped ones (marked as "Namespaced: true") rather than cluster-scoped ones, as they're more appropriate for application deployments
|
|
26
31
|
|
|
27
32
|
Don't limit yourself - if the intent is complex, select as many resources as needed. **Be extra inclusive** - the detailed schema analysis phase will filter out inappropriate resources, so it's better to include more candidates initially.
|
|
@@ -31,6 +31,8 @@ Analyze the user's intent and determine the best solution(s). **Provide multiple
|
|
|
31
31
|
- **Combine relevant patterns** - A single solution can be influenced by multiple patterns
|
|
32
32
|
- **Prioritize by specificity** - More specific patterns should have higher influence than generic ones
|
|
33
33
|
- **Layer pattern guidance** - Generic patterns provide baseline, specific patterns add requirements
|
|
34
|
+
- **Use complete patterns** - When a pattern is relevant, include ALL resources from that pattern unless you have a specific technical reason to exclude them
|
|
35
|
+
- **Pattern resource completeness** - Organizational patterns represent battle-tested, complete solutions. Missing pattern resources often leads to incomplete deployments
|
|
34
36
|
- **Avoid conflicts** - If patterns conflict, prioritize user intent and technical accuracy
|
|
35
37
|
|
|
36
38
|
**IMPORTANT**: Always provide at least 2-3 different solution alternatives when possible, even if some score lower than others. Users benefit from seeing multiple options to choose from.
|
|
@@ -39,6 +41,8 @@ Analyze the user's intent and determine the best solution(s). **Provide multiple
|
|
|
39
41
|
|
|
40
42
|
**Capability Verification**: For each resource in your solution, examine its schema fields to verify it can fulfill the user's requirements. Do not assume capabilities that aren't explicitly present in the schema fields.
|
|
41
43
|
|
|
44
|
+
**IMPORTANT - Pattern vs Individual Resource Validation**: When using organizational patterns, validate the PATTERN as a whole, not individual resources. Individual resources in a pattern may serve supporting roles and don't need to individually fulfill the complete user requirement - they work together as a complete solution.
|
|
45
|
+
|
|
42
46
|
**Complete Solutions**: Include ALL resource types needed for the solution to work. If your analysis mentions integration with other resources, include those resources in your resources array. For example, if a workload resource has built-in templates or references to other resource types, include those referenced resource types in your solution even if they're managed through the primary resource.
|
|
43
47
|
|
|
44
48
|
**Integration Validation**: For multi-resource solutions, verify that resources have schema fields to reference each other.
|