codebolt 1.11.3 → 1.11.4
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/dist/index.js +34 -10
- package/package.json +2 -3
package/dist/index.js
CHANGED
|
@@ -377989,6 +377989,23 @@ async function getKuzuConnection(dbPath) {
|
|
|
377989
377989
|
// ONNX session cache (keyed by sessionKey)
|
|
377990
377990
|
const onnxSessions = new Map();
|
|
377991
377991
|
let onnxSessionCounter = 0;
|
|
377992
|
+
const ONNX_PACKAGE = 'onnxruntime-node';
|
|
377993
|
+
const ONNX_VERSION = '^1.20.1';
|
|
377994
|
+
let onnxModule = null;
|
|
377995
|
+
function requireOnnxRuntime() {
|
|
377996
|
+
if (onnxModule)
|
|
377997
|
+
return onnxModule;
|
|
377998
|
+
try {
|
|
377999
|
+
onnxModule = __webpack_require__(66589)(ONNX_PACKAGE);
|
|
378000
|
+
return onnxModule;
|
|
378001
|
+
}
|
|
378002
|
+
catch {
|
|
378003
|
+
console.log(`Installing ${ONNX_PACKAGE} (one-time setup, ~211 MB)...`);
|
|
378004
|
+
(0, child_process_1.execSync)(`npm install ${ONNX_PACKAGE}@${ONNX_VERSION}`, { stdio: 'inherit' });
|
|
378005
|
+
onnxModule = __webpack_require__(66589)(ONNX_PACKAGE);
|
|
378006
|
+
return onnxModule;
|
|
378007
|
+
}
|
|
378008
|
+
}
|
|
377992
378009
|
function getSqliteDb(dbPath) {
|
|
377993
378010
|
if (sqliteDbs.has(dbPath))
|
|
377994
378011
|
return sqliteDbs.get(dbPath);
|
|
@@ -378107,7 +378124,7 @@ function createCliHostBridge() {
|
|
|
378107
378124
|
}
|
|
378108
378125
|
},
|
|
378109
378126
|
async onnxCreateSession(modelPath, options) {
|
|
378110
|
-
const ort =
|
|
378127
|
+
const ort = requireOnnxRuntime();
|
|
378111
378128
|
const session = await ort.InferenceSession.create(modelPath, options || {});
|
|
378112
378129
|
const sessionKey = `onnx_${++onnxSessionCounter}_${Date.now()}`;
|
|
378113
378130
|
onnxSessions.set(sessionKey, { session, modelPath });
|
|
@@ -378117,7 +378134,7 @@ function createCliHostBridge() {
|
|
|
378117
378134
|
const entry = onnxSessions.get(sessionKey);
|
|
378118
378135
|
if (!entry)
|
|
378119
378136
|
throw new Error(`ONNX session not found: ${sessionKey}`);
|
|
378120
|
-
const ort =
|
|
378137
|
+
const ort = requireOnnxRuntime();
|
|
378121
378138
|
// Convert OnnxTensorData -> ort.Tensor
|
|
378122
378139
|
const tensorInputs = {};
|
|
378123
378140
|
for (const [name, data] of Object.entries(inputs)) {
|
|
@@ -619621,6 +619638,21 @@ exports.vectordbErrorResponseSchema = zod_1.z.object({ type: zod_1.z.literal('ve
|
|
|
619621
619638
|
exports.vectordbServiceMessageSchema = exports.vectordbServiceSchema;
|
|
619622
619639
|
|
|
619623
619640
|
|
|
619641
|
+
/***/ },
|
|
619642
|
+
|
|
619643
|
+
/***/ 66589
|
|
619644
|
+
(module) {
|
|
619645
|
+
|
|
619646
|
+
function webpackEmptyContext(req) {
|
|
619647
|
+
var e = new Error("Cannot find module '" + req + "'");
|
|
619648
|
+
e.code = 'MODULE_NOT_FOUND';
|
|
619649
|
+
throw e;
|
|
619650
|
+
}
|
|
619651
|
+
webpackEmptyContext.keys = () => ([]);
|
|
619652
|
+
webpackEmptyContext.resolve = webpackEmptyContext;
|
|
619653
|
+
webpackEmptyContext.id = 66589;
|
|
619654
|
+
module.exports = webpackEmptyContext;
|
|
619655
|
+
|
|
619624
619656
|
/***/ },
|
|
619625
619657
|
|
|
619626
619658
|
/***/ 32205
|
|
@@ -619711,14 +619743,6 @@ module.exports = require("node-pty");
|
|
|
619711
619743
|
|
|
619712
619744
|
/***/ },
|
|
619713
619745
|
|
|
619714
|
-
/***/ 90884
|
|
619715
|
-
(module) {
|
|
619716
|
-
|
|
619717
|
-
"use strict";
|
|
619718
|
-
module.exports = require("onnxruntime-node");
|
|
619719
|
-
|
|
619720
|
-
/***/ },
|
|
619721
|
-
|
|
619722
619746
|
/***/ 9288
|
|
619723
619747
|
(module) {
|
|
619724
619748
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codebolt",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.4",
|
|
4
4
|
"description": "CodeBolt headless server CLI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,8 +26,7 @@
|
|
|
26
26
|
"@codebolt/narrative": "1.11.0",
|
|
27
27
|
"@huggingface/tokenizers": "^0.1.2",
|
|
28
28
|
"@codebolt/kuzu": "^0.11.3",
|
|
29
|
-
"node-pty": "^1.0.
|
|
30
|
-
"onnxruntime-node": "^1.20.1",
|
|
29
|
+
"node-pty": "^1.2.0-beta.11",
|
|
31
30
|
"better-sqlite3": "^11.0.0",
|
|
32
31
|
"sqlite-vec": "^0.1.6",
|
|
33
32
|
"@vscode/ripgrep": "^1.17.0",
|