spect8-mcp 0.2.0 → 0.2.1
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/package.json +2 -1
- package/scripts/preinstall.js +29 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spect8-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Spect8 local MCP server: captures tool events + token usage from Cursor and Claude Code, posts HMAC-signed batches to the Spect8 ingest API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/server.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"files": [
|
|
13
13
|
"dist",
|
|
14
14
|
"examples",
|
|
15
|
+
"scripts",
|
|
15
16
|
"README.md"
|
|
16
17
|
],
|
|
17
18
|
"scripts": {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Pre-install check for Spect8 MCP.
|
|
5
|
+
* Ensures the environment is ready and provides clear, human-readable
|
|
6
|
+
* guidance if any common issues are detected.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const nodeVersion = process.versions.node;
|
|
10
|
+
const majorVersion = parseInt(nodeVersion.split('.')[0], 10);
|
|
11
|
+
const isWindows = process.platform === 'win32';
|
|
12
|
+
|
|
13
|
+
console.log('--- Spect8 Environment Check ---');
|
|
14
|
+
|
|
15
|
+
if (majorVersion < 20) {
|
|
16
|
+
console.error('❌ Error: Node.js 20 or higher is required.');
|
|
17
|
+
console.error(` Your current version is: ${nodeVersion}`);
|
|
18
|
+
console.error(' Please upgrade at: https://nodejs.org');
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
if (isWindows && majorVersion >= 24) {
|
|
23
|
+
console.warn('⚠️ Notice: You are using Node 24 on Windows.');
|
|
24
|
+
console.warn(' This version is very new. We have removed all native dependencies');
|
|
25
|
+
console.warn(' to ensure it works, but if you encounter issues, Node 22 LTS is recommended.');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
console.log('✅ Environment compatible. Proceeding with installation...');
|
|
29
|
+
console.log('--------------------------------');
|