@vfarcic/dot-ai 0.21.0 → 0.23.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.map +1 -1
- package/dist/tools/version.js +18 -8
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,CAiCd"}
|
package/dist/tools/version.js
CHANGED
|
@@ -26,8 +26,8 @@ function getVersionInfo() {
|
|
|
26
26
|
let packageJson;
|
|
27
27
|
try {
|
|
28
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, '..');
|
|
29
|
+
// __dirname points to the compiled JS location (dist/tools/), go up two levels to find package.json
|
|
30
|
+
const mcpServerDir = (0, path_1.join)(__dirname, '..', '..');
|
|
31
31
|
const packageJsonPath = (0, path_1.join)(mcpServerDir, 'package.json');
|
|
32
32
|
packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, 'utf8'));
|
|
33
33
|
}
|
|
@@ -51,18 +51,28 @@ async function handleVersionTool(args, logger, requestId) {
|
|
|
51
51
|
const versionInfo = getVersionInfo();
|
|
52
52
|
logger.info('Version tool request completed', { requestId, version: versionInfo.version });
|
|
53
53
|
return {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
content: [{
|
|
55
|
+
type: 'text',
|
|
56
|
+
text: JSON.stringify({
|
|
57
|
+
status: 'success',
|
|
58
|
+
versionInfo,
|
|
59
|
+
timestamp: new Date().toISOString()
|
|
60
|
+
}, null, 2)
|
|
61
|
+
}]
|
|
57
62
|
};
|
|
58
63
|
}
|
|
59
64
|
catch (error) {
|
|
60
65
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
61
66
|
logger.error('Version tool request failed', error);
|
|
62
67
|
return {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
content: [{
|
|
69
|
+
type: 'text',
|
|
70
|
+
text: JSON.stringify({
|
|
71
|
+
status: 'error',
|
|
72
|
+
error: errorMessage,
|
|
73
|
+
timestamp: new Date().toISOString()
|
|
74
|
+
}, null, 2)
|
|
75
|
+
}]
|
|
66
76
|
};
|
|
67
77
|
}
|
|
68
78
|
}
|