codebolt 1.11.3 → 1.11.5

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.
Files changed (2) hide show
  1. package/dist/index.js +45 -13
  2. 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 = __webpack_require__(90884);
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 = __webpack_require__(90884);
378137
+ const ort = requireOnnxRuntime();
378121
378138
  // Convert OnnxTensorData -> ort.Tensor
378122
378139
  const tensorInputs = {};
378123
378140
  for (const [name, data] of Object.entries(inputs)) {
@@ -378621,8 +378638,8 @@ async function main() {
378621
378638
  userMessage: prompt,
378622
378639
  type: 'messageResponse',
378623
378640
  templateType: 'userChat',
378624
- selectedAgent: agentName !== 'codebolt-agent' ? { id: agentName, name: agentName } : { id: '', name: '' },
378625
- mentionedAgents: agentName !== 'codebolt-agent' ? [{ name: agentName }] : [],
378641
+ selectedAgent: { id: agentName, name: agentName },
378642
+ mentionedAgents: [{ name: agentName }],
378626
378643
  mentionedFiles: [],
378627
378644
  mentionedFolders: [],
378628
378645
  mentionedMultiFile: [],
@@ -446188,6 +446205,8 @@ class ChannelManager extends events_1.EventEmitter {
446188
446205
  /**
446189
446206
  * Initialize the channel manager for a project.
446190
446207
  * Disconnects any channels from a previous project before loading new ones.
446208
+ * Only eagerly connects adapters when auto-connect channels exist;
446209
+ * otherwise the store is ready and adapters are created on demand.
446191
446210
  */
446192
446211
  async initialize(projectPath) {
446193
446212
  // Disconnect adapters from a previous project before switching
@@ -446197,8 +446216,12 @@ class ChannelManager extends events_1.EventEmitter {
446197
446216
  }
446198
446217
  await this.store.initialize(projectPath);
446199
446218
  this.initialized = true;
446200
- // Auto-connect channels
446219
+ // Only connect adapters when channels are configured with autoConnect
446201
446220
  const autoChannels = this.store.getAutoConnect();
446221
+ if (autoChannels.length === 0) {
446222
+ appLogger_1.default.info('[ChannelManager] Initialized — no auto-connect channels, skipping adapter setup');
446223
+ return;
446224
+ }
446202
446225
  for (const config of autoChannels) {
446203
446226
  try {
446204
446227
  await this.connect(config.id);
@@ -607587,6 +607610,7 @@ const readFileSync = (filePath) => {
607587
607610
  catch (error) {
607588
607611
  if (error.code === 'ENOENT') {
607589
607612
  try {
607613
+ fs_extra_1.default.mkdirSync(path_1.default.dirname(filePath), { recursive: true });
607590
607614
  fs_extra_1.default.writeFileSync(filePath, '', 'utf8');
607591
607615
  console.log(`File not found. Created new file at ${filePath}`);
607592
607616
  return '{}';
@@ -607609,6 +607633,7 @@ const getDatabasePath = () => {
607609
607633
  exports.getDatabasePath = getDatabasePath;
607610
607634
  const writeFileSync = (filePath, data) => {
607611
607635
  try {
607636
+ fs_extra_1.default.mkdirSync(path_1.default.dirname(filePath), { recursive: true });
607612
607637
  fs_extra_1.default.writeFileSync(filePath, data, 'utf8');
607613
607638
  }
607614
607639
  catch (error) {
@@ -619621,6 +619646,21 @@ exports.vectordbErrorResponseSchema = zod_1.z.object({ type: zod_1.z.literal('ve
619621
619646
  exports.vectordbServiceMessageSchema = exports.vectordbServiceSchema;
619622
619647
 
619623
619648
 
619649
+ /***/ },
619650
+
619651
+ /***/ 66589
619652
+ (module) {
619653
+
619654
+ function webpackEmptyContext(req) {
619655
+ var e = new Error("Cannot find module '" + req + "'");
619656
+ e.code = 'MODULE_NOT_FOUND';
619657
+ throw e;
619658
+ }
619659
+ webpackEmptyContext.keys = () => ([]);
619660
+ webpackEmptyContext.resolve = webpackEmptyContext;
619661
+ webpackEmptyContext.id = 66589;
619662
+ module.exports = webpackEmptyContext;
619663
+
619624
619664
  /***/ },
619625
619665
 
619626
619666
  /***/ 32205
@@ -619711,14 +619751,6 @@ module.exports = require("node-pty");
619711
619751
 
619712
619752
  /***/ },
619713
619753
 
619714
- /***/ 90884
619715
- (module) {
619716
-
619717
- "use strict";
619718
- module.exports = require("onnxruntime-node");
619719
-
619720
- /***/ },
619721
-
619722
619754
  /***/ 9288
619723
619755
  (module) {
619724
619756
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebolt",
3
- "version": "1.11.3",
3
+ "version": "1.11.5",
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.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",