@vfarcic/dot-ai 0.19.0 → 0.21.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/tools/version.d.ts
CHANGED
|
@@ -14,15 +14,12 @@ export declare const VERSION_TOOL_INPUT_SCHEMA: {
|
|
|
14
14
|
};
|
|
15
15
|
export interface VersionInfo {
|
|
16
16
|
version: string;
|
|
17
|
-
gitCommit?: string;
|
|
18
|
-
gitBranch?: string;
|
|
19
|
-
buildTime: string;
|
|
20
17
|
nodeVersion: string;
|
|
21
18
|
platform: string;
|
|
22
19
|
arch: string;
|
|
23
20
|
}
|
|
24
21
|
/**
|
|
25
|
-
* Get version information from package.json
|
|
22
|
+
* Get version information from package.json
|
|
26
23
|
*/
|
|
27
24
|
export declare function getVersionInfo(): VersionInfo;
|
|
28
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/tools/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/tools/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,wBAAwB,iEAAiE,CAAC;AACvG,eAAO,MAAM,yBAAyB;;;;;CAKrC,CAAC;AAEF,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;;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,CAuBd"}
|
package/dist/tools/version.js
CHANGED
|
@@ -10,7 +10,6 @@ exports.getVersionInfo = getVersionInfo;
|
|
|
10
10
|
exports.handleVersionTool = handleVersionTool;
|
|
11
11
|
const fs_1 = require("fs");
|
|
12
12
|
const path_1 = require("path");
|
|
13
|
-
const child_process_1 = require("child_process");
|
|
14
13
|
exports.VERSION_TOOL_NAME = 'version';
|
|
15
14
|
exports.VERSION_TOOL_DESCRIPTION = 'Get version information for the DevOps AI Toolkit MCP server';
|
|
16
15
|
exports.VERSION_TOOL_INPUT_SCHEMA = {
|
|
@@ -20,27 +19,24 @@ exports.VERSION_TOOL_INPUT_SCHEMA = {
|
|
|
20
19
|
additionalProperties: false
|
|
21
20
|
};
|
|
22
21
|
/**
|
|
23
|
-
* Get version information from package.json
|
|
22
|
+
* Get version information from package.json
|
|
24
23
|
*/
|
|
25
24
|
function getVersionInfo() {
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
const packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, 'utf8'));
|
|
29
|
-
// Get git information
|
|
30
|
-
let gitCommit;
|
|
31
|
-
let gitBranch;
|
|
25
|
+
// Find package.json relative to this module's location (MCP server's installation)
|
|
26
|
+
let packageJson;
|
|
32
27
|
try {
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
// Get the directory where this module is installed
|
|
29
|
+
// __dirname points to the compiled JS location, go up to find package.json
|
|
30
|
+
const mcpServerDir = (0, path_1.join)(__dirname, '..');
|
|
31
|
+
const packageJsonPath = (0, path_1.join)(mcpServerDir, 'package.json');
|
|
32
|
+
packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, 'utf8'));
|
|
35
33
|
}
|
|
36
34
|
catch (error) {
|
|
37
|
-
//
|
|
35
|
+
// If package.json not found, use unknown version
|
|
36
|
+
packageJson = { version: 'unknown' };
|
|
38
37
|
}
|
|
39
38
|
return {
|
|
40
39
|
version: packageJson.version,
|
|
41
|
-
gitCommit,
|
|
42
|
-
gitBranch,
|
|
43
|
-
buildTime: new Date().toISOString(),
|
|
44
40
|
nodeVersion: process.version,
|
|
45
41
|
platform: process.platform,
|
|
46
42
|
arch: process.arch
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@ Select all resources that could be relevant for this intent. Consider:
|
|
|
20
20
|
- Platform-specific resources (e.g., Crossplane, Knative, Istio, ArgoCD) that could simplify the deployment
|
|
21
21
|
- **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
|
|
22
22
|
|
|
23
|
-
Don't limit yourself - if the intent is complex, select as many resources as needed.
|
|
23
|
+
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.
|
|
24
24
|
|
|
25
25
|
## Response Format
|
|
26
26
|
|
|
@@ -29,16 +29,48 @@ Consider:
|
|
|
29
29
|
- **Custom Resource Definitions (CRDs)** that may provide simpler, higher-level abstractions
|
|
30
30
|
- Platform operators (Crossplane, Knative, etc.) that might offer better user experience
|
|
31
31
|
- User experience - simpler declarative approaches often score higher than complex multi-resource solutions
|
|
32
|
+
- **Schema-based capability analysis**: Examine the actual resource schema fields to determine what capabilities each resource truly supports
|
|
33
|
+
|
|
34
|
+
## Schema-Based Capability Analysis
|
|
35
|
+
|
|
36
|
+
**CRITICAL**: Before scoring any solution, analyze all resource schemas in that solution to determine actual capabilities:
|
|
37
|
+
|
|
38
|
+
### Capability Detection Method
|
|
39
|
+
For each resource schema in the solution, examine field patterns that indicate capabilities:
|
|
40
|
+
- **Field names and types**: Look for schema fields whose names, descriptions, or types relate to the user's intent
|
|
41
|
+
- **Nested structures**: Check for complex objects that suggest advanced functionality
|
|
42
|
+
- **Reference patterns**: Identify fields that reference other resources or external systems
|
|
43
|
+
- **Configuration options**: Note fields that allow customization relevant to the user's needs
|
|
44
|
+
|
|
45
|
+
### Intent-Schema Matching Process
|
|
46
|
+
1. **Extract keywords** from user intent (e.g., "storage", "network", "scale", "database", "monitor")
|
|
47
|
+
2. **Search all schemas** in the solution for matching or related terminology in field names, descriptions, and types
|
|
48
|
+
3. **Evaluate field depth**: Complex nested structures often indicate more comprehensive capabilities
|
|
49
|
+
4. **Check for extension points**: Fields that allow custom configuration or references to external resources
|
|
50
|
+
|
|
51
|
+
### Solution Scoring Based on Schema Analysis
|
|
52
|
+
- **High relevance (80-100 points)**: Schemas contain multiple fields directly related to user intent
|
|
53
|
+
- **Medium relevance (50-79 points)**: Schemas contain some fields that could support user intent
|
|
54
|
+
- **Low relevance (20-49 points)**: Schemas have minimal or indirect support for user intent
|
|
55
|
+
- **Reject (0-19 points)**: Schemas lack any fields related to user intent - DO NOT include these solutions
|
|
32
56
|
|
|
33
57
|
## CRD Preference Guidelines
|
|
34
58
|
|
|
35
59
|
When evaluating CRDs vs standard Kubernetes resources:
|
|
36
|
-
- **Prefer CRDs with matching capabilities**: If a CRD's
|
|
37
|
-
- **Favor purpose-built solutions**: CRDs designed for specific use cases should score higher than generic resource combinations when the use case aligns
|
|
38
|
-
- **Value comprehensive functionality**: A single CRD that handles multiple related concerns
|
|
60
|
+
- **Prefer CRDs with matching capabilities**: If a CRD's schemas directly address the user's specific needs, it should score higher than manually combining multiple standard resources
|
|
61
|
+
- **Favor purpose-built solutions**: CRDs designed for specific use cases should score higher than generic resource combinations when the use case aligns AND the schemas support the required capabilities
|
|
62
|
+
- **Value comprehensive functionality**: A single CRD that handles multiple related concerns should score higher than manually orchestrating separate resources for the same outcome
|
|
39
63
|
- **Consider operational simplicity**: CRDs that provide intuitive, domain-specific interfaces should be preferred over complex multi-resource configurations
|
|
40
64
|
- **Give preference to platform abstractions**: For application deployment scenarios, purpose-built CRDs with comprehensive application platform features should be weighted more favorably than basic resources requiring manual orchestration
|
|
41
|
-
- **Match scope to intent**: Only prefer CRDs when their
|
|
65
|
+
- **Match scope to intent**: Only prefer CRDs when their schemas genuinely align with what the user is trying to achieve
|
|
66
|
+
|
|
67
|
+
## Solution Filtering Rules
|
|
68
|
+
|
|
69
|
+
**IMPORTANT**: To avoid rejecting all solutions:
|
|
70
|
+
- **Be inclusive initially**: The resource selection phase should identify MORE potential candidates, not fewer
|
|
71
|
+
- **Apply schema filtering here**: Only reject solutions where schemas completely lack relevant fields
|
|
72
|
+
- **Provide alternatives**: If rejecting solutions, always provide at least 2-3 viable alternatives
|
|
73
|
+
- **Explain rejections**: When scoring low, clearly explain which schema fields are missing
|
|
42
74
|
|
|
43
75
|
## Response Format
|
|
44
76
|
|