fix(cli): declare sqlite-vec and @huggingface/transformers as runtime dependencies

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.
This commit is contained in:
kelaocai authored and digua committed 2026-08-01 11:33:41 +08:00
1 parent 982f37ced6
commit d48745f00b
3 files changed
+11 -1

No files matched your search

+2
View File
@@ -50,6 +50,7 @@
"@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",
@@ -57,6 +58,7 @@
"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"
},