- Add npm scripts for building Windows/Linux/macOS executables - Replace uuid package with crypto.randomUUID() for ESM compatibility - Use esbuild to pre-bundle code before pkg (fixes MCP SDK subpath exports) - Update CLI name from 'memory' to 'cortex' - Update USAGE.md with build instructions and standalone setup - Add bundle/ and build/ to .gitignore
59 lines
2.3 KiB
JSON
59 lines
2.3 KiB
JSON
{
|
|
"name": "cortex",
|
|
"version": "1.0.0",
|
|
"main": "index.js",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"dev": "tsc --watch",
|
|
"serve": "node dist/server/index.js",
|
|
"bundle": "npm run build && npm run bundle:cli && npm run bundle:mcp",
|
|
"bundle:cli": "esbuild dist/cli/index.js --bundle --platform=node --outfile=bundle/cli.js --external:better-sqlite3",
|
|
"bundle:mcp": "esbuild dist/mcp/index.js --bundle --platform=node --outfile=bundle/mcp.js --external:better-sqlite3",
|
|
"package": "npm run bundle && npm run package:cli && npm run package:mcp",
|
|
"package:cli": "pkg ./bundle/cli.js --targets node22-win-x64 --output build/cortex.exe --config package.json",
|
|
"package:mcp": "pkg ./bundle/mcp.js --targets node22-win-x64 --output build/cortex-mcp.exe --config package.json",
|
|
"package:win": "npm run bundle && npm run package:cli && npm run package:mcp",
|
|
"package:linux": "npm run bundle && pkg ./bundle/cli.js --targets node22-linux-x64 --output build/cortex --config package.json && pkg ./bundle/mcp.js --targets node22-linux-x64 --output build/cortex-mcp --config package.json",
|
|
"package:mac": "npm run bundle && pkg ./bundle/cli.js --targets node22-macos-x64 --output build/cortex --config package.json && pkg ./bundle/mcp.js --targets node22-macos-x64 --output build/cortex-mcp --config package.json"
|
|
},
|
|
"keywords": [],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"description": "AI project memory - knowledge graph backed by SQLite + Ollama embeddings",
|
|
"bin": {
|
|
"cortex": "./dist/cli/index.js",
|
|
"cortex-mcp": "./dist/mcp/index.js"
|
|
},
|
|
"pkg": {
|
|
"targets": [
|
|
"node22-win-x64"
|
|
],
|
|
"outputPath": "build",
|
|
"assets": [
|
|
"node_modules/better-sqlite3/build/Release/*.node",
|
|
"node_modules/better-sqlite3/prebuilds/**/*"
|
|
],
|
|
"scripts": [
|
|
"dist/**/*.js"
|
|
]
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
"better-sqlite3": "^12.6.2",
|
|
"chalk": "^4.1.2",
|
|
"commander": "^14.0.3",
|
|
"cors": "^2.8.6",
|
|
"express": "^5.2.1",
|
|
"zod": "^4.3.6"
|
|
},
|
|
"devDependencies": {
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"@types/cors": "^2.8.19",
|
|
"@types/express": "^5.0.6",
|
|
"@types/node": "^25.2.0",
|
|
"@yao-pkg/pkg": "^6.3.0",
|
|
"esbuild": "^0.27.2",
|
|
"typescript": "^5.9.3"
|
|
}
|
|
}
|