@geminilight/mindos 0.6.5 → 0.6.7
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/app/app/api/mcp/restart/route.ts +41 -8
- package/app/app/api/monitoring/route.ts +1 -1
- package/bin/cli.js +1 -1
- package/bin/lib/mcp-spawn.js +11 -49
- package/bin/lib/stop.js +1 -1
- package/mcp/dist/index.cjs +409 -0
- package/mcp/package.json +4 -1
- package/package.json +2 -3
- package/scripts/postinstall.js +0 -39
package/mcp/package.json
CHANGED
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"
|
|
7
|
+
"build": "npx esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/index.cjs --target=node18 --minify",
|
|
8
|
+
"start": "node dist/index.cjs",
|
|
9
|
+
"dev": "npx tsx src/index.ts"
|
|
8
10
|
},
|
|
9
11
|
"dependencies": {
|
|
10
12
|
"@modelcontextprotocol/sdk": "^1.25.0",
|
|
@@ -13,6 +15,7 @@
|
|
|
13
15
|
},
|
|
14
16
|
"devDependencies": {
|
|
15
17
|
"@types/node": "^22",
|
|
18
|
+
"esbuild": "^0.25.0",
|
|
16
19
|
"typescript": "^5"
|
|
17
20
|
}
|
|
18
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geminilight/mindos",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "MindOS — Human-Agent Collaborative Mind System. Local-first knowledge base that syncs your mind to all AI Agents via MCP.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mindos",
|
|
@@ -52,13 +52,12 @@
|
|
|
52
52
|
"!assets/demo-flow-zh.html",
|
|
53
53
|
"!assets/images",
|
|
54
54
|
"!mcp/node_modules",
|
|
55
|
-
"!mcp/dist",
|
|
56
55
|
"!mcp/package-lock.json",
|
|
57
56
|
"!mcp/*.tgz",
|
|
58
57
|
"!app/package-lock.json"
|
|
59
58
|
],
|
|
60
59
|
"scripts": {
|
|
61
|
-
"
|
|
60
|
+
"prepack": "cd mcp && npm install --include=dev && npm run build",
|
|
62
61
|
"setup": "node scripts/setup.js",
|
|
63
62
|
"dev": "mindos dev",
|
|
64
63
|
"build": "mindos build",
|
package/scripts/postinstall.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* npm postinstall — ensure mcp/node_modules is present after `npm install -g`.
|
|
4
|
-
*
|
|
5
|
-
* The npm tarball excludes mcp/node_modules (too large, platform-specific native deps).
|
|
6
|
-
* Without this, Desktop users must wait for runtime auto-install, which fails on
|
|
7
|
-
* older Desktop builds that lack the first-install logic in ensureBundledMcpNodeModules().
|
|
8
|
-
*
|
|
9
|
-
* Belt-and-suspenders: CLI spawnMcp() and Desktop ensureBundledMcpNodeModules()
|
|
10
|
-
* also auto-install at runtime, but this postinstall eliminates the gap entirely.
|
|
11
|
-
*/
|
|
12
|
-
import { existsSync } from 'node:fs';
|
|
13
|
-
import { resolve, dirname } from 'node:path';
|
|
14
|
-
import { execSync } from 'node:child_process';
|
|
15
|
-
import { fileURLToPath } from 'node:url';
|
|
16
|
-
|
|
17
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
|
-
const ROOT = resolve(__dirname, '..');
|
|
19
|
-
const mcpDir = resolve(ROOT, 'mcp');
|
|
20
|
-
const sdkPkg = resolve(mcpDir, 'node_modules', '@modelcontextprotocol', 'sdk', 'package.json');
|
|
21
|
-
|
|
22
|
-
if (!existsSync(resolve(mcpDir, 'package.json'))) process.exit(0);
|
|
23
|
-
if (existsSync(sdkPkg)) process.exit(0);
|
|
24
|
-
|
|
25
|
-
console.log('[MindOS] Installing MCP dependencies...');
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
execSync('npm install --omit=dev --no-workspaces --prefer-offline', {
|
|
29
|
-
cwd: mcpDir, stdio: 'inherit',
|
|
30
|
-
});
|
|
31
|
-
} catch {
|
|
32
|
-
try {
|
|
33
|
-
execSync('npm install --omit=dev --no-workspaces', {
|
|
34
|
-
cwd: mcpDir, stdio: 'inherit',
|
|
35
|
-
});
|
|
36
|
-
} catch {
|
|
37
|
-
console.warn('[MindOS] MCP dependency install failed (non-fatal). Will retry on first run.');
|
|
38
|
-
}
|
|
39
|
-
}
|