@vfarcic/dot-ai 0.186.0 → 0.188.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.
Files changed (52) hide show
  1. package/dist/core/ai-provider-factory.d.ts.map +1 -1
  2. package/dist/core/ai-provider-factory.js +2 -1
  3. package/dist/core/capability-operations.d.ts.map +1 -1
  4. package/dist/core/capability-operations.js +3 -2
  5. package/dist/core/capability-tools.d.ts.map +1 -1
  6. package/dist/core/capability-tools.js +3 -2
  7. package/dist/core/constants/errors.d.ts +202 -0
  8. package/dist/core/constants/errors.d.ts.map +1 -0
  9. package/dist/core/constants/errors.js +206 -0
  10. package/dist/core/constants/index.d.ts +11 -0
  11. package/dist/core/constants/index.d.ts.map +1 -0
  12. package/dist/core/constants/index.js +26 -0
  13. package/dist/core/constants/investigation.d.ts +45 -0
  14. package/dist/core/constants/investigation.d.ts.map +1 -0
  15. package/dist/core/constants/investigation.js +47 -0
  16. package/dist/core/constants/stages.d.ts +38 -0
  17. package/dist/core/constants/stages.d.ts.map +1 -0
  18. package/dist/core/constants/stages.js +40 -0
  19. package/dist/core/constants/validation.d.ts +43 -0
  20. package/dist/core/constants/validation.d.ts.map +1 -0
  21. package/dist/core/constants/validation.js +45 -0
  22. package/dist/core/index.d.ts.map +1 -1
  23. package/dist/core/index.js +4 -3
  24. package/dist/core/kubectl-tools.d.ts.map +1 -1
  25. package/dist/core/kubectl-tools.js +10 -9
  26. package/dist/core/kubernetes-utils.d.ts.map +1 -1
  27. package/dist/core/kubernetes-utils.js +14 -13
  28. package/dist/core/pattern-operations.d.ts.map +1 -1
  29. package/dist/core/pattern-operations.js +2 -1
  30. package/dist/core/policy-operations.d.ts.map +1 -1
  31. package/dist/core/policy-operations.js +6 -4
  32. package/dist/core/providers/host-provider.d.ts.map +1 -1
  33. package/dist/core/providers/host-provider.js +2 -1
  34. package/dist/core/providers/noop-provider.d.ts.map +1 -1
  35. package/dist/core/providers/noop-provider.js +2 -2
  36. package/dist/core/providers/vercel-provider.d.ts.map +1 -1
  37. package/dist/core/providers/vercel-provider.js +5 -3
  38. package/dist/core/resource-tools.d.ts.map +1 -1
  39. package/dist/core/resource-tools.js +3 -2
  40. package/dist/core/schema.d.ts.map +1 -1
  41. package/dist/core/schema.js +2 -1
  42. package/dist/tools/answer-question.d.ts.map +1 -1
  43. package/dist/tools/answer-question.js +18 -17
  44. package/dist/tools/organizational-data.d.ts.map +1 -1
  45. package/dist/tools/organizational-data.js +3 -2
  46. package/dist/tools/prompts.d.ts.map +1 -1
  47. package/dist/tools/prompts.js +2 -1
  48. package/dist/tools/version.d.ts.map +1 -1
  49. package/dist/tools/version.js +2 -1
  50. package/package.json +1 -1
  51. package/scripts/dot-ai.nu +4 -3
  52. package/scripts/jaeger.nu +11 -7
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Stage-specific messages and instructions
3
+ *
4
+ * Messages used in question answering, configuration stages,
5
+ * and user guidance throughout different workflow phases.
6
+ */
7
+ /**
8
+ * Configuration stage messages
9
+ */
10
+ export declare const STAGE_MESSAGES: {
11
+ /**
12
+ * Stage-specific instructions
13
+ */
14
+ readonly REQUIRED_INSTRUCTIONS: "STAGE: REQUIRED - Present ALL questions to the user and collect answers. All questions must be answered before proceeding.";
15
+ readonly BASIC_INSTRUCTIONS: "STAGE: BASIC - Present ALL questions to the user. Show defaults where available but ask user to confirm or change each one. User must review all questions before proceeding to advanced stage.";
16
+ readonly ADVANCED_INSTRUCTIONS: "STAGE: ADVANCED - Present ALL questions to the user. Show defaults where available but ask user to confirm or change each one. User must review all questions before proceeding to open stage.";
17
+ readonly ADVANCED_INSTRUCTIONS_HELM: "STAGE: ADVANCED - Present ALL questions to the user. Show defaults where available but ask user to confirm or change each one. User must review all questions before proceeding to manifest generation.";
18
+ readonly OPEN_INSTRUCTIONS: "STAGE: OPEN - Final configuration stage. Ask user for any additional requirements or constraints. User can say \"N/A\" if none.";
19
+ readonly UNKNOWN_INSTRUCTIONS: "STAGE: UNKNOWN - Present questions to the user and wait for their response.";
20
+ /**
21
+ * User-facing stage messages
22
+ */
23
+ readonly REQUIRED_MESSAGE: "Please answer the required configuration questions.";
24
+ readonly BASIC_MESSAGE: "Would you like to configure basic settings?";
25
+ readonly ADVANCED_MESSAGE: "Would you like to configure advanced features?";
26
+ readonly OPEN_MESSAGE: "Any additional requirements or constraints?";
27
+ readonly UNKNOWN_MESSAGE: "Configuration stage unknown.";
28
+ /**
29
+ * Stage guidance
30
+ */
31
+ readonly REQUIRED_GUIDANCE: "Present all required questions to the user. All must be answered to proceed.";
32
+ readonly BASIC_GUIDANCE: "Present all basic questions to the user. Show default values as suggestions but ask user to confirm each one.";
33
+ readonly ADVANCED_GUIDANCE: "Present all advanced questions to the user. Show default values as suggestions but ask user to confirm each one. After this stage: open stage.";
34
+ readonly ADVANCED_GUIDANCE_HELM: "Present all advanced questions to the user. Show default values as suggestions but ask user to confirm each one. After this stage: manifest generation.";
35
+ readonly OPEN_GUIDANCE: "Ask user for any additional requirements or constraints. User can say \"N/A\" if none.";
36
+ readonly DEFAULT_GUIDANCE: "Present all questions to the user and collect their responses.";
37
+ };
38
+ //# sourceMappingURL=stages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stages.d.ts","sourceRoot":"","sources":["../../../src/core/constants/stages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;IACzB;;OAEG;;;;;;;IAQH;;OAEG;;;;;;IAOH;;OAEG;;;;;;;CAOK,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ /**
3
+ * Stage-specific messages and instructions
4
+ *
5
+ * Messages used in question answering, configuration stages,
6
+ * and user guidance throughout different workflow phases.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.STAGE_MESSAGES = void 0;
10
+ /**
11
+ * Configuration stage messages
12
+ */
13
+ exports.STAGE_MESSAGES = {
14
+ /**
15
+ * Stage-specific instructions
16
+ */
17
+ REQUIRED_INSTRUCTIONS: 'STAGE: REQUIRED - Present ALL questions to the user and collect answers. All questions must be answered before proceeding.',
18
+ BASIC_INSTRUCTIONS: 'STAGE: BASIC - Present ALL questions to the user. Show defaults where available but ask user to confirm or change each one. User must review all questions before proceeding to advanced stage.',
19
+ ADVANCED_INSTRUCTIONS: 'STAGE: ADVANCED - Present ALL questions to the user. Show defaults where available but ask user to confirm or change each one. User must review all questions before proceeding to open stage.',
20
+ ADVANCED_INSTRUCTIONS_HELM: 'STAGE: ADVANCED - Present ALL questions to the user. Show defaults where available but ask user to confirm or change each one. User must review all questions before proceeding to manifest generation.',
21
+ OPEN_INSTRUCTIONS: 'STAGE: OPEN - Final configuration stage. Ask user for any additional requirements or constraints. User can say "N/A" if none.',
22
+ UNKNOWN_INSTRUCTIONS: 'STAGE: UNKNOWN - Present questions to the user and wait for their response.',
23
+ /**
24
+ * User-facing stage messages
25
+ */
26
+ REQUIRED_MESSAGE: 'Please answer the required configuration questions.',
27
+ BASIC_MESSAGE: 'Would you like to configure basic settings?',
28
+ ADVANCED_MESSAGE: 'Would you like to configure advanced features?',
29
+ OPEN_MESSAGE: 'Any additional requirements or constraints?',
30
+ UNKNOWN_MESSAGE: 'Configuration stage unknown.',
31
+ /**
32
+ * Stage guidance
33
+ */
34
+ REQUIRED_GUIDANCE: 'Present all required questions to the user. All must be answered to proceed.',
35
+ BASIC_GUIDANCE: 'Present all basic questions to the user. Show default values as suggestions but ask user to confirm each one.',
36
+ ADVANCED_GUIDANCE: 'Present all advanced questions to the user. Show default values as suggestions but ask user to confirm each one. After this stage: open stage.',
37
+ ADVANCED_GUIDANCE_HELM: 'Present all advanced questions to the user. Show default values as suggestions but ask user to confirm each one. After this stage: manifest generation.',
38
+ OPEN_GUIDANCE: 'Ask user for any additional requirements or constraints. User can say "N/A" if none.',
39
+ DEFAULT_GUIDANCE: 'Present all questions to the user and collect their responses.'
40
+ };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Validation and error message constants
3
+ *
4
+ * Centralized validation messages, error templates, and parameter
5
+ * validation patterns used throughout the application.
6
+ */
7
+ /**
8
+ * Parameter validation messages
9
+ */
10
+ export declare const VALIDATION_MESSAGES: {
11
+ /**
12
+ * Missing parameter error template
13
+ * @param param - The name of the missing parameter
14
+ */
15
+ readonly MISSING_PARAMETER: (param: string) => string;
16
+ /**
17
+ * Missing parameter with context template
18
+ * @param param - The name of the missing parameter
19
+ * @param context - Additional context (e.g., "search query", "filter")
20
+ */
21
+ readonly MISSING_PARAMETER_WITH_CONTEXT: (param: string, context: string) => string;
22
+ /**
23
+ * Invalid format error template
24
+ * @param field - The field with invalid format
25
+ */
26
+ readonly INVALID_FORMAT: (field: string) => string;
27
+ /**
28
+ * Required field missing template
29
+ * @param field - The required field that is missing
30
+ */
31
+ readonly REQUIRED_FIELD: (field: string) => string;
32
+ /**
33
+ * Validation failed template
34
+ * @param reason - The reason validation failed
35
+ */
36
+ readonly VALIDATION_FAILED: (reason?: string) => string;
37
+ /**
38
+ * Invalid input provided template
39
+ * @param details - Details about the invalid input
40
+ */
41
+ readonly INVALID_INPUT: (details?: string) => string;
42
+ };
43
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/core/constants/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;IAC9B;;;OAGG;wCACwB,MAAM;IAEjC;;;;OAIG;qDACqC,MAAM,WAAW,MAAM;IAE/D;;;OAGG;qCACqB,MAAM;IAE9B;;;OAGG;qCACqB,MAAM;IAE9B;;;OAGG;0CAC0B,MAAM;IAEnC;;;OAGG;uCACuB,MAAM;CACxB,CAAC"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ /**
3
+ * Validation and error message constants
4
+ *
5
+ * Centralized validation messages, error templates, and parameter
6
+ * validation patterns used throughout the application.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.VALIDATION_MESSAGES = void 0;
10
+ /**
11
+ * Parameter validation messages
12
+ */
13
+ exports.VALIDATION_MESSAGES = {
14
+ /**
15
+ * Missing parameter error template
16
+ * @param param - The name of the missing parameter
17
+ */
18
+ MISSING_PARAMETER: (param) => `Missing required parameter: ${param}`,
19
+ /**
20
+ * Missing parameter with context template
21
+ * @param param - The name of the missing parameter
22
+ * @param context - Additional context (e.g., "search query", "filter")
23
+ */
24
+ MISSING_PARAMETER_WITH_CONTEXT: (param, context) => `Missing required parameter: ${param} (${context})`,
25
+ /**
26
+ * Invalid format error template
27
+ * @param field - The field with invalid format
28
+ */
29
+ INVALID_FORMAT: (field) => `Invalid format for field: ${field}`,
30
+ /**
31
+ * Required field missing template
32
+ * @param field - The required field that is missing
33
+ */
34
+ REQUIRED_FIELD: (field) => `Required field missing: ${field}`,
35
+ /**
36
+ * Validation failed template
37
+ * @param reason - The reason validation failed
38
+ */
39
+ VALIDATION_FAILED: (reason) => reason ? `Validation failed: ${reason}` : 'Validation failed',
40
+ /**
41
+ * Invalid input provided template
42
+ * @param details - Details about the invalid input
43
+ */
44
+ INVALID_INPUT: (details) => details ? `Invalid input provided: ${details}` : 'Invalid input provided'
45
+ };
@@ -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,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,WAAW,UAAU;IACzB,gBA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B,EAAE,MAAM,qBAAqB,CAAC;AACpH,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAGjI,eAAe,KAAK,CAAC"}
@@ -11,6 +11,7 @@ const memory_1 = require("./memory");
11
11
  const workflow_1 = require("./workflow");
12
12
  const ai_provider_factory_1 = require("./ai-provider-factory");
13
13
  const schema_1 = require("./schema");
14
+ const constants_1 = require("./constants");
14
15
  class DotAI {
15
16
  config;
16
17
  initialized = false;
@@ -64,7 +65,7 @@ class DotAI {
64
65
  },
65
66
  rankResources: async (intent) => {
66
67
  if (!ranker) {
67
- throw new Error('ResourceRanker not available. AI provider API key is required for AI-powered ranking.');
68
+ throw new Error(constants_1.AI_SERVICE_ERROR_TEMPLATES.RESOURCE_RANKER_UNAVAILABLE('AI-powered ranking'));
68
69
  }
69
70
  // Create discovery function with proper binding
70
71
  const explainResourceFn = async (resource) => await this.discovery.explainResource(resource);
@@ -72,13 +73,13 @@ class DotAI {
72
73
  },
73
74
  generateQuestionsForHelmChart: async (intent, chart, description, interaction_id) => {
74
75
  if (!ranker) {
75
- throw new Error('ResourceRanker not available. AI provider API key is required for question generation.');
76
+ throw new Error(constants_1.AI_SERVICE_ERROR_TEMPLATES.RESOURCE_RANKER_UNAVAILABLE('question generation'));
76
77
  }
77
78
  return await ranker.generateQuestionsForHelmChart(intent, chart, description, interaction_id);
78
79
  },
79
80
  fetchHelmChartContent: async (chart) => {
80
81
  if (!ranker) {
81
- throw new Error('ResourceRanker not available for fetching Helm chart content.');
82
+ throw new Error(constants_1.AI_SERVICE_ERROR_TEMPLATES.RESOURCE_RANKER_UNAVAILABLE('fetching Helm chart content'));
82
83
  }
83
84
  return await ranker.fetchHelmChartContent(chart);
84
85
  }
@@ -1 +1 @@
1
- {"version":3,"file":"kubectl-tools.d.ts","sourceRoot":"","sources":["../../src/core/kubectl-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;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C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAyBvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAiBvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,MAiBxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAazC,CAAC;AAEF;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAsRpF;AAED;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,EAU/C,CAAC"}
@@ -11,6 +11,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
11
11
  exports.KUBECTL_INVESTIGATION_TOOLS = exports.KUBECTL_GET_CRD_SCHEMA_TOOL = exports.KUBECTL_DELETE_DRYRUN_TOOL = exports.KUBECTL_APPLY_DRYRUN_TOOL = exports.KUBECTL_PATCH_DRYRUN_TOOL = exports.KUBECTL_EVENTS_TOOL = exports.KUBECTL_LOGS_TOOL = exports.KUBECTL_DESCRIBE_TOOL = exports.KUBECTL_GET_TOOL = exports.KUBECTL_API_RESOURCES_TOOL = void 0;
12
12
  exports.executeKubectlTools = executeKubectlTools;
13
13
  const kubernetes_utils_1 = require("./kubernetes-utils");
14
+ const validation_1 = require("./constants/validation");
14
15
  /**
15
16
  * Tool: kubectl_api_resources
16
17
  * Get list of all available Kubernetes API resources in the cluster
@@ -235,7 +236,7 @@ async function executeKubectlTools(toolName, input) {
235
236
  if (!resource) {
236
237
  return {
237
238
  success: false,
238
- error: 'Missing required parameter: resource',
239
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('resource'),
239
240
  message: 'kubectl_get requires a resource parameter'
240
241
  };
241
242
  }
@@ -271,7 +272,7 @@ async function executeKubectlTools(toolName, input) {
271
272
  if (!resource) {
272
273
  return {
273
274
  success: false,
274
- error: 'Missing required parameter: resource',
275
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('resource'),
275
276
  message: 'kubectl_describe requires a resource parameter'
276
277
  };
277
278
  }
@@ -293,14 +294,14 @@ async function executeKubectlTools(toolName, input) {
293
294
  if (!resource) {
294
295
  return {
295
296
  success: false,
296
- error: 'Missing required parameter: resource',
297
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('resource'),
297
298
  message: 'kubectl_logs requires a resource parameter'
298
299
  };
299
300
  }
300
301
  if (!namespace) {
301
302
  return {
302
303
  success: false,
303
- error: 'Missing required parameter: namespace',
304
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('namespace'),
304
305
  message: 'kubectl_logs requires a namespace parameter'
305
306
  };
306
307
  }
@@ -341,14 +342,14 @@ async function executeKubectlTools(toolName, input) {
341
342
  if (!resource) {
342
343
  return {
343
344
  success: false,
344
- error: 'Missing required parameter: resource',
345
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('resource'),
345
346
  message: 'kubectl_patch_dryrun requires a resource parameter'
346
347
  };
347
348
  }
348
349
  if (!patch) {
349
350
  return {
350
351
  success: false,
351
- error: 'Missing required parameter: patch',
352
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('patch'),
352
353
  message: 'kubectl_patch_dryrun requires a patch parameter'
353
354
  };
354
355
  }
@@ -380,7 +381,7 @@ async function executeKubectlTools(toolName, input) {
380
381
  if (!manifest) {
381
382
  return {
382
383
  success: false,
383
- error: 'Missing required parameter: manifest',
384
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('manifest'),
384
385
  message: 'kubectl_apply_dryrun requires a manifest parameter'
385
386
  };
386
387
  }
@@ -403,7 +404,7 @@ async function executeKubectlTools(toolName, input) {
403
404
  if (!resource) {
404
405
  return {
405
406
  success: false,
406
- error: 'Missing required parameter: resource',
407
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('resource'),
407
408
  message: 'kubectl_delete_dryrun requires a resource parameter'
408
409
  };
409
410
  }
@@ -425,7 +426,7 @@ async function executeKubectlTools(toolName, input) {
425
426
  if (!crdName) {
426
427
  return {
427
428
  success: false,
428
- error: 'Missing required parameter: crdName',
429
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('crdName'),
429
430
  message: 'kubectl_get_crd_schema requires a crdName parameter (e.g., "clusters.postgresql.cnpg.io")'
430
431
  };
431
432
  }
@@ -1 +1 @@
1
- {"version":3,"file":"kubernetes-utils.d.ts","sourceRoot":"","sources":["../../src/core/kubernetes-utils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CA0D5F;AAsBD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,CAAC,EAAE,aAAa,GAAG,MAAM,CAmBlF;AAGD,qBAAa,eAAe;IAC1B,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE;IA0D7E,OAAO,CAAC,MAAM,CAAC,cAAc;IAa7B,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAYpC,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAInC,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAIrC,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAMhC,OAAO,CAAC,MAAM,CAAC,2BAA2B;IAI1C,OAAO,CA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BAA0B;IAgBzC,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAYxC,OAAO,CAAC,MAAM,CAAC,2BAA2B;IAQ1C,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAYrC,OAAO,CAAC,MAAM,CAAC,gCAAgC;CAGhD"}
@@ -11,6 +11,7 @@ exports.buildKubectlCommand = buildKubectlCommand;
11
11
  const child_process_1 = require("child_process");
12
12
  const util_1 = require("util");
13
13
  const tracing_1 = require("./tracing");
14
+ const constants_1 = require("./constants");
14
15
  const execAsync = (0, util_1.promisify)(child_process_1.exec);
15
16
  /**
16
17
  * Execute kubectl command with proper configuration
@@ -203,42 +204,42 @@ class ErrorClassifier {
203
204
  }
204
205
  static enhanceAuthenticationError(message) {
205
206
  if (message.includes('invalid bearer token')) {
206
- return `Token may be expired: Bearer token authentication failed.\n\nTroubleshooting steps:\n- Token may be expired - refresh credentials\n- Check token format in kubeconfig\n- Re-authenticate with cluster: kubectl auth login\n- Verify service account token if applicable\n\nOriginal error: ${message}`;
207
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.AUTHENTICATION.INVALID_TOKEN(message);
207
208
  }
208
209
  if (message.includes('certificate')) {
209
- return `Certificate authentication failed: Client certificate validation error.\n\nTroubleshooting steps:\n- Verify certificate path in kubeconfig\n- Check certificate expiration date\n- Ensure certificate authority (CA) bundle is correct\n- Re-generate client certificates if needed\n\nOriginal error: ${message}`;
210
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.AUTHENTICATION.CERTIFICATE_FAILED(message);
210
211
  }
211
212
  if (message.includes('no Auth Provider found')) {
212
- return `Authentication provider not available: Required auth plugin missing.\n\nTroubleshooting steps:\n- Install required authentication plugin (e.g., OIDC)\n- Check kubectl config for auth provider configuration\n- Verify authentication method compatibility\n- Consult cluster administrator for auth setup\n\nOriginal error: ${message}`;
213
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.AUTHENTICATION.PROVIDER_MISSING(message);
213
214
  }
214
- return `Authentication failed: Invalid or missing credentials.\n\nTroubleshooting steps:\n- Verify credentials in kubeconfig\n- Re-authenticate with cluster\n- Check authentication method configuration\n- Contact cluster administrator if needed\n\nOriginal error: ${message}`;
215
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.AUTHENTICATION.GENERIC_FAILED(message);
215
216
  }
216
217
  static enhanceAuthorizationError(message) {
217
218
  if (message.includes('customresourcedefinitions')) {
218
- return `CRD discovery requires cluster-level permissions: Insufficient RBAC permissions.\n\nTroubleshooting steps:\n- CRD discovery requires admin privileges\n- Request cluster-admin role or CRD read permissions\n- Contact cluster administrator for permission escalation\n- Use 'kubectl auth can-i list customresourcedefinitions' to check permissions\n\nOriginal error: ${message}`;
219
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.AUTHORIZATION.CRD_PERMISSIONS(message);
219
220
  }
220
221
  if (message.includes('forbidden')) {
221
- return `Insufficient permissions: RBAC restrictions prevent this operation.\n\nTroubleshooting steps:\n- RBAC role required for resource access\n- Request appropriate permissions from cluster administrator\n- Check current permissions: kubectl auth can-i list <resource>\n- Consider using cluster-admin role for discovery operations\n\nOriginal error: ${message}`;
222
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.AUTHORIZATION.FORBIDDEN(message);
222
223
  }
223
- return `Permission denied: Insufficient RBAC permissions for cluster access.\n\nTroubleshooting steps:\n- Request appropriate RBAC permissions\n- Check current access: kubectl auth can-i list <resource>\n- Contact cluster administrator for role assignment\n- Verify service account permissions if applicable\n\nOriginal error: ${message}`;
224
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.AUTHORIZATION.PERMISSION_DENIED(message);
224
225
  }
225
226
  static enhanceAPIAvailabilityError(message) {
226
227
  if (message.includes('apps/v1beta1')) {
227
- return `API version not supported: Cluster doesn't support requested API version.\n\nTroubleshooting steps:\n- Try different API version (e.g., apps/v1 instead of apps/v1beta1)\n- Check available API versions: kubectl api-versions\n- Verify Kubernetes cluster version compatibility\n- Consult API migration guides for version changes\n\nOriginal error: ${message}`;
228
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.API.VERSION_UNSUPPORTED(message);
228
229
  }
229
- return `API resource not available: Requested resource type not found in cluster.\n\nTroubleshooting steps:\n- Check available resources: kubectl api-resources\n- Verify cluster supports required resource types\n- Check Kubernetes version compatibility\n- Confirm cluster configuration and enabled APIs\n\nOriginal error: ${message}`;
230
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.API.RESOURCE_UNAVAILABLE(message);
230
231
  }
231
232
  static enhanceKubeconfigError(message) {
232
233
  if (message.includes('context') && message.includes('does not exist')) {
233
- return `Context not found: Specified context doesn't exist in kubeconfig.\n\nTroubleshooting steps:\n- List available contexts: kubectl config get-contexts\n- Set correct context: kubectl config use-context <context-name>\n- Verify kubeconfig file contains required context\n- Check context name spelling and case sensitivity\n\nOriginal error: ${message}`;
234
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.KUBECONFIG.CONTEXT_NOT_FOUND(message);
234
235
  }
235
236
  if (message.includes('not found')) {
236
- return `Kubeconfig file not found: Cannot locate configuration file.\n\nTroubleshooting steps:\n- Check file path exists and is accessible\n- Verify kubeconfig file permissions\n- Set KUBECONFIG environment variable if needed\n- Create kubeconfig file or copy from cluster administrator\n\nOriginal error: ${message}`;
237
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.KUBECONFIG.FILE_NOT_FOUND(message);
237
238
  }
238
- return `Invalid kubeconfig format: Configuration file has syntax or format errors.\n\nTroubleshooting steps:\n- Validate YAML syntax in kubeconfig file\n- Check file structure: kubectl config view\n- Restore from backup or re-download from cluster\n- Verify all required sections (clusters, contexts, users)\n\nOriginal error: ${message}`;
239
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.KUBECONFIG.INVALID_FORMAT(message);
239
240
  }
240
241
  static enhanceVersionCompatibilityError(message) {
241
- return `Kubernetes version compatibility issue: Version mismatch detected.\n\nTroubleshooting steps:\n- Check cluster and client versions: kubectl version\n- Verify supported Kubernetes versions for this tool\n- Update kubectl client if needed\n- Consult compatibility matrix for version support\n\nOriginal error: ${message}`;
242
+ return constants_1.KUBERNETES_ERROR_TEMPLATES.VERSION_COMPATIBILITY(message);
242
243
  }
243
244
  }
244
245
  exports.ErrorClassifier = ErrorClassifier;
@@ -1 +1 @@
1
- {"version":3,"file":"pattern-operations.d.ts","sourceRoot":"","sources":["../../src/core/pattern-operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAA8C,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAEtF,OAAO,EAAmB,oBAAoB,EAA2B,MAAM,SAAS,CAAC;AASzF,wBAAgB,eAAe,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,EAAE,CA2BvE;AAGD,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,qBAAqB,CAwBlF;AAGD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAEvE;AAGD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,CAWtE;AAkBD;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,0BAA0B,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC,EAClJ,wBAAwB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC,GAC1G,OAAO,CAAC,GAAG,CAAC,CA0Yd"}
1
+ {"version":3,"file":"pattern-operations.d.ts","sourceRoot":"","sources":["../../src/core/pattern-operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE9E,OAAO,EAA8C,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAGtF,OAAO,EAAmB,oBAAoB,EAA2B,MAAM,SAAS,CAAC;AASzF,wBAAgB,eAAe,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,EAAE,CA2BvE;AAGD,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,qBAAqB,CAwBlF;AAGD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAEvE;AAGD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,qBAAqB,CAWtE;AAkBD;;;GAGG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,0BAA0B,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC,EAClJ,wBAAwB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC,GAC1G,OAAO,CAAC,GAAG,CAAC,CA0Yd"}
@@ -46,6 +46,7 @@ exports.deserializePattern = deserializePattern;
46
46
  exports.handlePatternOperation = handlePatternOperation;
47
47
  const crypto_1 = require("crypto");
48
48
  const error_handling_1 = require("./error-handling");
49
+ const constants_1 = require("./constants");
49
50
  const unified_creation_session_1 = require("./unified-creation-session");
50
51
  const index_1 = require("./index");
51
52
  const session_utils_1 = require("./session-utils");
@@ -157,7 +158,7 @@ async function handlePatternOperation(operation, args, logger, requestId, valida
157
158
  operation,
158
159
  dataType: 'pattern',
159
160
  error: embeddingCheck.error,
160
- message: 'OpenAI API key required for pattern management'
161
+ message: constants_1.AI_SERVICE_ERROR_TEMPLATES.OPENAI_KEY_REQUIRED('pattern management')
161
162
  };
162
163
  }
163
164
  }
@@ -1 +1 @@
1
- {"version":3,"file":"policy-operations.d.ts","sourceRoot":"","sources":["../../src/core/policy-operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAA8C,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAS9D;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAarE;AAGD;;GAEG;AACH,wBAAsB,6BAA6B,CACjD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,EAAE,CAAC,CAoChB;AAED;;GAEG;AACH,wBAAsB,sCAAsC,CAC1D,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,EAAE,CAAC,CAkChB;AAED;;GAEG;AACH,wBAAsB,+BAA+B,CACnD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,CAqCd;AAED;;GAEG;AACH,wBAAsB,wCAAwC,CAC5D,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,CAkCd;AAED;;GAEG;AACH,wBAAsB,kBAAkB,CACtC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,GAAG,EAClB,IAAI,EAAE,GAAG,EACT,M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"}
@@ -20,6 +20,8 @@ const vector_db_service_1 = require("./vector-db-service");
20
20
  const unified_creation_session_1 = require("./unified-creation-session");
21
21
  const kubernetes_utils_1 = require("./kubernetes-utils");
22
22
  const index_1 = require("./index");
23
+ const validation_1 = require("./constants/validation");
24
+ const constants_1 = require("./constants");
23
25
  // Note: validateVectorDBConnection and validateEmbeddingService are shared utilities
24
26
  // that remain in the main organizational-data.ts file as they're used by multiple domains
25
27
  /**
@@ -349,7 +351,7 @@ async function handlePolicyOperation(operation, args, logger, requestId, validat
349
351
  operation,
350
352
  dataType: 'policy',
351
353
  error: embeddingCheck.error,
352
- message: 'OpenAI API key required for policy management'
354
+ message: constants_1.AI_SERVICE_ERROR_TEMPLATES.OPENAI_KEY_REQUIRED('policy management')
353
355
  };
354
356
  }
355
357
  }
@@ -480,7 +482,7 @@ async function handlePolicyOperation(operation, args, logger, requestId, validat
480
482
  operation,
481
483
  dataType: 'policy',
482
484
  message: 'Policy intent ID is required for get operation',
483
- error: 'Missing required parameter: id'
485
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('id')
484
486
  };
485
487
  }
486
488
  const policyIntent = await policyService.getPolicyIntent(args.id);
@@ -508,7 +510,7 @@ async function handlePolicyOperation(operation, args, logger, requestId, validat
508
510
  operation,
509
511
  dataType: 'policy',
510
512
  message: 'Search query is required (use id parameter)',
511
- error: 'Missing required parameter: id (search query)'
513
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER_WITH_CONTEXT('id', 'search query')
512
514
  };
513
515
  }
514
516
  const limit = args.limit || 10;
@@ -532,7 +534,7 @@ async function handlePolicyOperation(operation, args, logger, requestId, validat
532
534
  operation,
533
535
  dataType: 'policy',
534
536
  message: 'Policy intent ID is required for delete operation',
535
- error: 'Missing required parameter: id'
537
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('id')
536
538
  };
537
539
  }
538
540
  return await handlePolicyDelete(args.id, policyService, args, logger, requestId);
@@ -1 +1 @@
1
- {"version":3,"file":"host-provider.d.ts","sourceRoot":"","sources":["../../../src/core/providers/host-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,cAAc,EACf,MAAM,0BAA0B,CAAC;AAkBlC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;CAClD;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;CAClD;AAED,MAAM,MAAM,eAAe,GAAG,CAC5B,QAAQ,EAAE,eAAe,EAAE,EAC3B,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,GAAG,KACV,OAAO,CAAC,cAAc,CAAC,CAAC;AAE7B,qBAAa,YAAa,YAAW,UAAU;IAC7C,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAkB;IACjD,OAAO,CAAC,SAAS,CAAU;;IAM3B,kBAAkB,CAAC,OAAO,EAAE,eAAe;IAI3C,aAAa,IAAI,OAAO;IAIxB,eAAe,IAAI,MAAM;IAIzB,eAAe,IAAI,MAAM;IAIzB,YAAY,IAAI,MAAM;IAItB,OAAO,CAAC,iBAAiB;IAwBnB,WAAW,CACf,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAAkB,EAC7B,iBAAiB,CAAC,EAAE;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,GACA,OAAO,CAAC,UAAU,CAAC;IA4HtB;;;;;;;;;;OAUG;IACG,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAmN/D"}
1
+ {"version":3,"file":"host-provider.d.ts","sourceRoot":"","sources":["../../../src/core/providers/host-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,cAAc,EACf,MAAM,0BAA0B,CAAC;AAmBlC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;CAClD;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC;CAClD;AAED,MAAM,MAAM,eAAe,GAAG,CAC5B,QAAQ,EAAE,eAAe,EAAE,EAC3B,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,GAAG,KACV,OAAO,CAAC,cAAc,CAAC,CAAC;AAE7B,qBAAa,YAAa,YAAW,UAAU;IAC7C,OAAO,CAAC,MAAM,CAAC,eAAe,CAAC,CAAkB;IACjD,OAAO,CAAC,SAAS,CAAU;;IAM3B,kBAAkB,CAAC,OAAO,EAAE,eAAe;IAI3C,aAAa,IAAI,OAAO;IAIxB,eAAe,IAAI,MAAM;IAIzB,eAAe,IAAI,MAAM;IAIzB,YAAY,IAAI,MAAM;IAItB,OAAO,CAAC,iBAAiB;IAwBnB,WAAW,CACf,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAAkB,EAC7B,iBAAiB,CAAC,EAAE;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,GACA,OAAO,CAAC,UAAU,CAAC;IA4HtB;;;;;;;;;;OAUG;IACG,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAmN/D"}
@@ -40,6 +40,7 @@ const model_config_1 = require("../model-config");
40
40
  const provider_debug_utils_1 = require("./provider-debug-utils");
41
41
  const ai_tracing_1 = require("../tracing/ai-tracing");
42
42
  const tool_utils_1 = require("./tool-utils");
43
+ const investigation_1 = require("../constants/investigation");
43
44
  class HostProvider {
44
45
  static samplingHandler;
45
46
  debugMode;
@@ -295,7 +296,7 @@ class HostProvider {
295
296
  }
296
297
  // Max iterations reached - make one final wrap-up call WITHOUT tools
297
298
  // to force the AI to summarize findings rather than continue investigating
298
- const wrapUpMessage = 'You have reached the maximum number of investigation steps. Please provide your final summary NOW in the required JSON format based on all findings gathered so far. Do not request any more tool calls.';
299
+ const wrapUpMessage = investigation_1.INVESTIGATION_MESSAGES.WRAP_UP;
299
300
  messages.push({
300
301
  role: 'user',
301
302
  content: { type: 'text', text: wrapUpMessage },
@@ -1 +1 @@
1
- {"version":3,"file":"noop-provider.d.ts","sourceRoot":"","sources":["../../../src/core/providers/noop-provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,cAAc,EACf,MAAM,0BAA0B,CAAC;AAElC,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAEgD;IAErF;;OAEG;;IAKH;;OAEG;IACH,aAAa,IAAI,OAAO;IAIxB;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACG,WAAW,CACf,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,kBAAkB,CAAC,EAAE;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,GACA,OAAO,CAAC,UAAU,CAAC;IAItB;;OAEG;IACG,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAGhE"}
1
+ {"version":3,"file":"noop-provider.d.ts","sourceRoot":"","sources":["../../../src/core/providers/noop-provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,cAAc,EACf,MAAM,0BAA0B,CAAC;AAGlC,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAqD;IAE1F;;OAEG;;IAKH;;OAEG;IACH,aAAa,IAAI,OAAO;IAIxB;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;OAEG;IACH,eAAe,IAAI,MAAM;IAIzB;;OAEG;IACH,YAAY,IAAI,MAAM;IAItB;;OAEG;IACG,WAAW,CACf,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,kBAAkB,CAAC,EAAE;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,GACA,OAAO,CAAC,UAAU,CAAC;IAItB;;OAEG;IACG,QAAQ,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAGhE"}
@@ -8,9 +8,9 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.NoOpAIProvider = void 0;
11
+ const constants_1 = require("../constants");
11
12
  class NoOpAIProvider {
12
- static ERROR_MESSAGE = 'AI provider is not available. No API keys configured. ' +
13
- 'Please set ANTHROPIC_API_KEY, OPENAI_API_KEY, or another supported provider key.';
13
+ static ERROR_MESSAGE = constants_1.AI_SERVICE_ERROR_TEMPLATES.PROVIDER_NOT_AVAILABLE;
14
14
  /**
15
15
  * Creates a NoOp provider that doesn't require API keys
16
16
  */
@@ -1 +1 @@
1
- {"version":3,"file":"vercel-provider.d.ts","sourceRoot":"","sources":["../../../src/core/providers/vercel-provider.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,OAAO,EACL,UAAU,EACV,UAAU,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AE,gBAAgB;IAWpC,OAAO,CAAC,qBAAqB;IAY7B,OAAO,CAAC,eAAe;IAsFvB,eAAe,IAAI,MAAM;IAIzB,eAAe,IAAI,MAAM;IAIzB,YAAY,IAAI,MAAM;IAItB,aAAa,IAAI,OAAO;IAIxB,OAAO,CAAC,iBAAiB;IAyBnB,WAAW,CACf,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAAkB,EAC7B,iBAAiB,CAAC,EAAE;QAClB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,GACA,OAAO,CAAC,UAAU,CAAC;IAoJtB;;;;;;;;;;;;OAYG;IACG,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA4a/D"}
@@ -14,8 +14,10 @@ const anthropic_1 = require("@ai-sdk/anthropic");
14
14
  const xai_1 = require("@ai-sdk/xai");
15
15
  const amazon_bedrock_1 = require("@ai-sdk/amazon-bedrock");
16
16
  const ai_sdk_provider_1 = require("@openrouter/ai-sdk-provider");
17
+ const constants_1 = require("../constants");
17
18
  const provider_debug_utils_1 = require("./provider-debug-utils");
18
19
  const model_config_1 = require("../model-config");
20
+ const investigation_1 = require("../constants/investigation");
19
21
  const ai_tracing_1 = require("../tracing/ai-tracing");
20
22
  // Get all supported provider keys dynamically from CURRENT_MODELS
21
23
  const SUPPORTED_PROVIDERS = Object.keys(model_config_1.CURRENT_MODELS);
@@ -37,10 +39,10 @@ class VercelProvider {
37
39
  }
38
40
  validateConfiguration() {
39
41
  if (!this.apiKey) {
40
- throw new Error(`API key is required for ${this.providerType} provider`);
42
+ throw new Error(constants_1.AI_SERVICE_ERROR_TEMPLATES.API_KEY_REQUIRED(this.providerType));
41
43
  }
42
44
  if (!SUPPORTED_PROVIDERS.includes(this.providerType)) {
43
- throw new Error(`Unsupported provider: ${this.providerType}. Must be one of: ${SUPPORTED_PROVIDERS.join(', ')}`);
45
+ throw new Error(constants_1.AI_SERVICE_ERROR_TEMPLATES.UNSUPPORTED_PROVIDER(this.providerType, SUPPORTED_PROVIDERS));
44
46
  }
45
47
  }
46
48
  initializeModel() {
@@ -544,7 +546,7 @@ class VercelProvider {
544
546
  // Add wrap-up instruction
545
547
  wrapUpMessages.push({
546
548
  role: 'user',
547
- content: 'You have reached the maximum number of investigation steps. Please provide your final summary NOW in the required JSON format based on all findings gathered so far. Do not request any more tool calls.',
549
+ content: investigation_1.INVESTIGATION_MESSAGES.WRAP_UP,
548
550
  });
549
551
  // Make final call WITHOUT tools
550
552
  const wrapUpConfig = {
@@ -1 +1 @@
1
- {"version":3,"file":"resource-tools.d.ts","sourceRoot":"","sources":["../../src/core/resource-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGjD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,MA8BnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAwClC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,EAGlC,CAAC;AAsBF;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CA0FrF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
1
+ {"version":3,"file":"resource-tools.d.ts","sourceRoot":"","sources":["../../src/core/resource-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAIjD;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,MA8BnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAwClC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,EAGlC,CAAC;AAsBF;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CA0FrF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
@@ -12,6 +12,7 @@ exports.RESOURCE_TOOLS = exports.QUERY_RESOURCES_TOOL = exports.SEARCH_RESOURCES
12
12
  exports.executeResourceTools = executeResourceTools;
13
13
  exports.resetResourceService = resetResourceService;
14
14
  const resource_vector_service_1 = require("./resource-vector-service");
15
+ const validation_1 = require("./constants/validation");
15
16
  /**
16
17
  * Tool: search_resources
17
18
  * Semantic search for cluster resources by name, kind, and labels
@@ -134,7 +135,7 @@ async function executeResourceTools(toolName, input) {
134
135
  if (!query) {
135
136
  return {
136
137
  success: false,
137
- error: 'Missing required parameter: query',
138
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('query'),
138
139
  message: 'search_resources requires a query parameter'
139
140
  };
140
141
  }
@@ -166,7 +167,7 @@ async function executeResourceTools(toolName, input) {
166
167
  if (!filter) {
167
168
  return {
168
169
  success: false,
169
- error: 'Missing required parameter: filter',
170
+ error: validation_1.VALIDATION_MESSAGES.MISSING_PARAMETER('filter'),
170
171
  message: 'query_resources requires a filter parameter with Qdrant filter syntax'
171
172
  };
172
173
  }