mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-25 17:54:34 +08:00
The CLI tsup build inlines @openchatlab/node-runtime into dist chunks. Both sqlite-vec and @huggingface/transformers load platform-specific native packages at runtime (sqlite-vec-linux-arm64, onnxruntime-node, sharp), so inlining them breaks global/npm and Docker installs of chatlab-cli: the bundled chunks reference native packages that were never installed, and configuring the semantic index vector model fails with HTTP 500 (Cannot find package 'sqlite-vec-linux-arm64'). Declare both packages as chatlab-cli dependencies and mark them as tsup external so they are installed from npm with their native bindings, matching how better-sqlite3 and @node-rs/jieba are already handled.
83 lines
2.3 KiB
JSON
83 lines
2.3 KiB
JSON
{
|
|
"name": "chatlab-cli",
|
|
"version": "0.34.1",
|
|
"description": "ChatLab CLI & Service - Chat history analysis tool",
|
|
"type": "module",
|
|
"bin": {
|
|
"chatlab": "bin/chatlab.mjs",
|
|
"clb": "bin/chatlab.mjs"
|
|
},
|
|
"main": "./dist/index.mjs",
|
|
"files": [
|
|
"bin/",
|
|
"dist/",
|
|
"dist-cli-web/",
|
|
"LICENSE"
|
|
],
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"license": "AGPL-3.0",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/ChatLab/ChatLab.git",
|
|
"directory": "apps/cli"
|
|
},
|
|
"homepage": "https://github.com/ChatLab/ChatLab",
|
|
"keywords": [
|
|
"chatlab",
|
|
"chat",
|
|
"analysis",
|
|
"cli"
|
|
],
|
|
"scripts": {
|
|
"cli": "node scripts/ensure-native.mjs && tsx src/cli.ts",
|
|
"build": "tsup",
|
|
"build:full": "pnpm -w run build:cli-web && pnpm run build && pnpm run prepare:cli-web",
|
|
"prepare:cli-web": "rm -rf dist-cli-web && cp -r ../../dist-cli-web dist-cli-web",
|
|
"ensure-native": "node scripts/ensure-native.mjs",
|
|
"rebuild-native": "bash scripts/rebuild-native.sh",
|
|
"rebuild-sqlite": "npm rebuild better-sqlite3",
|
|
"prepack": "node scripts/sync-release-docs.mjs",
|
|
"postpack": "node scripts/clean-release-docs.mjs",
|
|
"prepublishOnly": "pnpm run build"
|
|
},
|
|
"dependencies": {
|
|
"@fastify/multipart": "^10.0.0",
|
|
"@fastify/static": "^9.1.3",
|
|
"@earendil-works/pi-agent-core": "0.74.2",
|
|
"@earendil-works/pi-ai": "0.74.2",
|
|
"@huggingface/transformers": "^4.2.0",
|
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
"better-sqlite3": "^12.4.6",
|
|
"commander": "^13.1.0",
|
|
"fastify": "^5.8.4",
|
|
"gray-matter": "^4.0.3",
|
|
"js-tiktoken": "^1.0.21",
|
|
"smol-toml": "^1.3.1",
|
|
"sqlite-vec": "^0.1.9",
|
|
"stream-json": "^1.9.1",
|
|
"zod": "^3.24.4"
|
|
},
|
|
"optionalDependencies": {
|
|
"@node-rs/jieba": "^2.0.1"
|
|
},
|
|
"devDependencies": {
|
|
"@openchatlab/config": "workspace:*",
|
|
"@openchatlab/core": "workspace:*",
|
|
"@openchatlab/http-routes": "workspace:*",
|
|
"@openchatlab/node-runtime": "workspace:*",
|
|
"@openchatlab/parser": "workspace:*",
|
|
"@openchatlab/shared-types": "workspace:*",
|
|
"@openchatlab/sync": "workspace:*",
|
|
"@openchatlab/tools": "workspace:*",
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"chatlab-mcp": "workspace:*",
|
|
"tsup": "^8.5.0",
|
|
"tsx": "^4.21.0"
|
|
}
|
|
}
|