@vfarcic/dot-ai 0.45.0 → 0.46.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.
@@ -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
+ }
@@ -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;
@@ -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,iBA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,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"}
@@ -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
  }
@@ -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
- // Test cluster connectivity immediately on startup
96
- process.stderr.write('Testing cluster connectivity...\n');
95
+ // Initialize without cluster connection (lazy connection)
96
+ process.stderr.write('Initializing DevOps AI Toolkit...\n');
97
97
  try {
98
- await dotAI.initialize();
99
- await dotAI.discovery.connect();
100
- process.stderr.write('Cluster connectivity verified successfully\n');
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 (connectError) {
103
- process.stderr.write(`FATAL: Failed to connect to Kubernetes cluster: ${connectError}\n`);
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;AAGhD,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,CA+DxD"}
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;AAShD,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,CAqMxD"}
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 {
@@ -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;AAOhD,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,0BAA0B,8KAA8K,CAAC;AAGtN,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,CAsOxD"}
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,8KAA8K,CAAC;AAGtN,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"}
@@ -42,6 +42,7 @@ 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"));
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vfarcic/dot-ai",
3
- "version": "0.45.0",
3
+ "version": "0.46.0",
4
4
  "description": "Universal Kubernetes application deployment agent with CLI and MCP interfaces",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",