@vfarcic/dot-ai 0.20.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.
@@ -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 and git
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;AAKH,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,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAyB5C;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,CAuBd"}
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"}
@@ -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 and git
22
+ * Get version information from package.json
24
23
  */
25
24
  function getVersionInfo() {
26
- // Read package.json version
27
- const packageJsonPath = (0, path_1.join)(process.cwd(), 'package.json');
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
- gitCommit = (0, child_process_1.execSync)('git rev-parse HEAD', { encoding: 'utf8' }).trim();
34
- gitBranch = (0, child_process_1.execSync)('git rev-parse --abbrev-ref HEAD', { encoding: 'utf8' }).trim();
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
- // Git info not available (e.g., not a git repo or git not installed)
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vfarcic/dot-ai",
3
- "version": "0.20.0",
3
+ "version": "0.21.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",