@deeplake/hivemind 0.7.39 → 0.7.41

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.
@@ -6809,21 +6809,21 @@ __export(index_marker_store_exports, {
6809
6809
  hasFreshIndexMarker: () => hasFreshIndexMarker,
6810
6810
  writeIndexMarker: () => writeIndexMarker
6811
6811
  });
6812
- import { existsSync as existsSync2, mkdirSync as mkdirSync3, readFileSync as readFileSync4, writeFileSync as writeFileSync3 } from "node:fs";
6813
- import { join as join5 } from "node:path";
6812
+ import { existsSync as existsSync2, mkdirSync as mkdirSync4, readFileSync as readFileSync5, writeFileSync as writeFileSync4 } from "node:fs";
6813
+ import { join as join6 } from "node:path";
6814
6814
  import { tmpdir } from "node:os";
6815
6815
  function getIndexMarkerDir() {
6816
- return process.env.HIVEMIND_INDEX_MARKER_DIR ?? join5(tmpdir(), "hivemind-deeplake-indexes");
6816
+ return process.env.HIVEMIND_INDEX_MARKER_DIR ?? join6(tmpdir(), "hivemind-deeplake-indexes");
6817
6817
  }
6818
6818
  function buildIndexMarkerPath(workspaceId, orgId, table, suffix) {
6819
6819
  const markerKey = [workspaceId, orgId, table, suffix].join("__").replace(/[^a-zA-Z0-9_.-]/g, "_");
6820
- return join5(getIndexMarkerDir(), `${markerKey}.json`);
6820
+ return join6(getIndexMarkerDir(), `${markerKey}.json`);
6821
6821
  }
6822
6822
  function hasFreshIndexMarker(markerPath) {
6823
6823
  if (!existsSync2(markerPath))
6824
6824
  return false;
6825
6825
  try {
6826
- const raw = JSON.parse(readFileSync4(markerPath, "utf-8"));
6826
+ const raw = JSON.parse(readFileSync5(markerPath, "utf-8"));
6827
6827
  const updatedAt = raw.updatedAt ? new Date(raw.updatedAt).getTime() : NaN;
6828
6828
  if (!Number.isFinite(updatedAt) || Date.now() - updatedAt > INDEX_MARKER_TTL_MS)
6829
6829
  return false;
@@ -6833,8 +6833,8 @@ function hasFreshIndexMarker(markerPath) {
6833
6833
  }
6834
6834
  }
6835
6835
  function writeIndexMarker(markerPath) {
6836
- mkdirSync3(getIndexMarkerDir(), { recursive: true });
6837
- writeFileSync3(markerPath, JSON.stringify({ updatedAt: (/* @__PURE__ */ new Date()).toISOString() }), "utf-8");
6836
+ mkdirSync4(getIndexMarkerDir(), { recursive: true });
6837
+ writeFileSync4(markerPath, JSON.stringify({ updatedAt: (/* @__PURE__ */ new Date()).toISOString() }), "utf-8");
6838
6838
  }
6839
6839
  var INDEX_MARKER_TTL_MS;
6840
6840
  var init_index_marker_store = __esm({
@@ -23277,35 +23277,41 @@ function deeplakeClientHeader() {
23277
23277
  return { [DEEPLAKE_CLIENT_HEADER]: deeplakeClientValue() };
23278
23278
  }
23279
23279
 
23280
- // dist/src/commands/auth-creds.js
23281
- import { readFileSync, writeFileSync, mkdirSync, unlinkSync } from "node:fs";
23280
+ // dist/src/commands/install-id.js
23281
+ import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
23282
23282
  import { join } from "node:path";
23283
23283
  import { homedir } from "node:os";
23284
+ import { randomUUID } from "node:crypto";
23285
+
23286
+ // dist/src/commands/auth-creds.js
23287
+ import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, mkdirSync as mkdirSync2, unlinkSync } from "node:fs";
23288
+ import { join as join2 } from "node:path";
23289
+ import { homedir as homedir2 } from "node:os";
23284
23290
  function configDir() {
23285
- return join(homedir(), ".deeplake");
23291
+ return join2(homedir2(), ".deeplake");
23286
23292
  }
23287
23293
  function credsPath() {
23288
- return join(configDir(), "credentials.json");
23294
+ return join2(configDir(), "credentials.json");
23289
23295
  }
23290
23296
  function loadCredentials() {
23291
23297
  try {
23292
- return JSON.parse(readFileSync(credsPath(), "utf-8"));
23298
+ return JSON.parse(readFileSync2(credsPath(), "utf-8"));
23293
23299
  } catch {
23294
23300
  return null;
23295
23301
  }
23296
23302
  }
23297
23303
 
23298
23304
  // dist/src/config.js
23299
- import { readFileSync as readFileSync2, existsSync } from "node:fs";
23300
- import { join as join2 } from "node:path";
23301
- import { homedir as homedir2, userInfo } from "node:os";
23305
+ import { readFileSync as readFileSync3, existsSync } from "node:fs";
23306
+ import { join as join3 } from "node:path";
23307
+ import { homedir as homedir3, userInfo } from "node:os";
23302
23308
  function loadConfig() {
23303
- const home = homedir2();
23304
- const credPath = join2(home, ".deeplake", "credentials.json");
23309
+ const home = homedir3();
23310
+ const credPath = join3(home, ".deeplake", "credentials.json");
23305
23311
  let creds = null;
23306
23312
  if (existsSync(credPath)) {
23307
23313
  try {
23308
- creds = JSON.parse(readFileSync2(credPath, "utf-8"));
23314
+ creds = JSON.parse(readFileSync3(credPath, "utf-8"));
23309
23315
  } catch {
23310
23316
  return null;
23311
23317
  }
@@ -23324,18 +23330,18 @@ function loadConfig() {
23324
23330
  tableName: process.env.HIVEMIND_TABLE ?? "memory",
23325
23331
  sessionsTableName: process.env.HIVEMIND_SESSIONS_TABLE ?? "sessions",
23326
23332
  skillsTableName: process.env.HIVEMIND_SKILLS_TABLE ?? "skills",
23327
- memoryPath: process.env.HIVEMIND_MEMORY_PATH ?? join2(home, ".deeplake", "memory")
23333
+ memoryPath: process.env.HIVEMIND_MEMORY_PATH ?? join3(home, ".deeplake", "memory")
23328
23334
  };
23329
23335
  }
23330
23336
 
23331
23337
  // dist/src/deeplake-api.js
23332
- import { randomUUID } from "node:crypto";
23338
+ import { randomUUID as randomUUID2 } from "node:crypto";
23333
23339
 
23334
23340
  // dist/src/utils/debug.js
23335
23341
  import { appendFileSync } from "node:fs";
23336
- import { join as join3 } from "node:path";
23337
- import { homedir as homedir3 } from "node:os";
23338
- var LOG = join3(homedir3(), ".deeplake", "hook-debug.log");
23342
+ import { join as join4 } from "node:path";
23343
+ import { homedir as homedir4 } from "node:os";
23344
+ var LOG = join4(homedir4(), ".deeplake", "hook-debug.log");
23339
23345
  function isDebug() {
23340
23346
  return process.env.HIVEMIND_DEBUG === "1";
23341
23347
  }
@@ -23481,23 +23487,23 @@ async function healMissingColumns(args) {
23481
23487
  }
23482
23488
 
23483
23489
  // dist/src/notifications/queue.js
23484
- import { readFileSync as readFileSync3, writeFileSync as writeFileSync2, renameSync, mkdirSync as mkdirSync2, openSync, closeSync, unlinkSync as unlinkSync2, statSync } from "node:fs";
23485
- import { join as join4, resolve } from "node:path";
23486
- import { homedir as homedir4 } from "node:os";
23490
+ import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, renameSync, mkdirSync as mkdirSync3, openSync, closeSync, unlinkSync as unlinkSync2, statSync } from "node:fs";
23491
+ import { join as join5, resolve } from "node:path";
23492
+ import { homedir as homedir5 } from "node:os";
23487
23493
  import { setTimeout as sleep } from "node:timers/promises";
23488
23494
  var log2 = (msg) => log("notifications-queue", msg);
23489
23495
  var LOCK_RETRY_MAX = 50;
23490
23496
  var LOCK_RETRY_BASE_MS = 5;
23491
23497
  var LOCK_STALE_MS = 5e3;
23492
23498
  function queuePath() {
23493
- return join4(homedir4(), ".deeplake", "notifications-queue.json");
23499
+ return join5(homedir5(), ".deeplake", "notifications-queue.json");
23494
23500
  }
23495
23501
  function lockPath() {
23496
23502
  return `${queuePath()}.lock`;
23497
23503
  }
23498
23504
  function readQueue() {
23499
23505
  try {
23500
- const raw = readFileSync3(queuePath(), "utf-8");
23506
+ const raw = readFileSync4(queuePath(), "utf-8");
23501
23507
  const parsed = JSON.parse(raw);
23502
23508
  if (!parsed || !Array.isArray(parsed.queue)) {
23503
23509
  log2(`queue malformed \u2192 treating as empty`);
@@ -23515,18 +23521,18 @@ function _isQueuePathInsideHome(path, home) {
23515
23521
  }
23516
23522
  function writeQueue(q) {
23517
23523
  const path = queuePath();
23518
- const home = resolve(homedir4());
23524
+ const home = resolve(homedir5());
23519
23525
  if (!_isQueuePathInsideHome(path, home)) {
23520
23526
  throw new Error(`notifications-queue write blocked: ${path} is outside ${home}`);
23521
23527
  }
23522
- mkdirSync2(join4(home, ".deeplake"), { recursive: true, mode: 448 });
23528
+ mkdirSync3(join5(home, ".deeplake"), { recursive: true, mode: 448 });
23523
23529
  const tmp = `${path}.${process.pid}.tmp`;
23524
- writeFileSync2(tmp, JSON.stringify(q, null, 2), { mode: 384 });
23530
+ writeFileSync3(tmp, JSON.stringify(q, null, 2), { mode: 384 });
23525
23531
  renameSync(tmp, path);
23526
23532
  }
23527
23533
  async function withQueueLock(fn) {
23528
23534
  const path = lockPath();
23529
- mkdirSync2(join4(homedir4(), ".deeplake"), { recursive: true, mode: 448 });
23535
+ mkdirSync3(join5(homedir5(), ".deeplake"), { recursive: true, mode: 448 });
23530
23536
  let fd = null;
23531
23537
  for (let attempt = 0; attempt < LOCK_RETRY_MAX; attempt++) {
23532
23538
  try {
@@ -23799,7 +23805,7 @@ var DeeplakeApi = class {
23799
23805
  setClauses += `, description = '${sqlStr(row.description)}'`;
23800
23806
  await this.query(`UPDATE "${this.tableName}" SET ${setClauses} WHERE path = '${sqlStr(row.path)}'`);
23801
23807
  } else {
23802
- const id = randomUUID();
23808
+ const id = randomUUID2();
23803
23809
  let cols = `id, path, filename, summary, ${SUMMARY_EMBEDDING_COL}, mime_type, size_bytes, creation_date, last_update_date`;
23804
23810
  let vals = `'${id}', '${sqlStr(row.path)}', '${sqlStr(row.filename)}', E'${sqlStr(row.contentText)}', NULL, '${sqlStr(row.mimeType)}', ${row.sizeBytes}, '${cd}', '${lud}'`;
23805
23811
  if (row.project !== void 0) {
@@ -24371,21 +24377,21 @@ function buildContentFilter(column, likeOp, patterns) {
24371
24377
  }
24372
24378
 
24373
24379
  // dist/src/cli/version.js
24374
- import { readFileSync as readFileSync6 } from "node:fs";
24375
- import { join as join7 } from "node:path";
24380
+ import { readFileSync as readFileSync7 } from "node:fs";
24381
+ import { join as join8 } from "node:path";
24376
24382
 
24377
24383
  // dist/src/cli/util.js
24378
- import { existsSync as existsSync3, mkdirSync as mkdirSync4, readFileSync as readFileSync5, writeFileSync as writeFileSync4, cpSync, symlinkSync, unlinkSync as unlinkSync3, lstatSync } from "node:fs";
24379
- import { join as join6, dirname } from "node:path";
24380
- import { homedir as homedir5 } from "node:os";
24384
+ import { existsSync as existsSync3, mkdirSync as mkdirSync5, readFileSync as readFileSync6, writeFileSync as writeFileSync5, cpSync, symlinkSync, unlinkSync as unlinkSync3, lstatSync } from "node:fs";
24385
+ import { join as join7, dirname } from "node:path";
24386
+ import { homedir as homedir6 } from "node:os";
24381
24387
  import { fileURLToPath } from "node:url";
24382
24388
  import { createInterface } from "node:readline";
24383
- var HOME = homedir5();
24389
+ var HOME = homedir6();
24384
24390
  function pkgRoot() {
24385
24391
  let dir = fileURLToPath(new URL(".", import.meta.url));
24386
24392
  for (let i = 0; i < 8; i++) {
24387
24393
  try {
24388
- const pkg = JSON.parse(readFileSync5(join6(dir, "package.json"), "utf-8"));
24394
+ const pkg = JSON.parse(readFileSync6(join7(dir, "package.json"), "utf-8"));
24389
24395
  if (pkg.name === "@deeplake/hivemind" || pkg.name === "hivemind")
24390
24396
  return dir;
24391
24397
  } catch {
@@ -24398,21 +24404,21 @@ function pkgRoot() {
24398
24404
  return fileURLToPath(new URL("..", import.meta.url));
24399
24405
  }
24400
24406
  var PLATFORM_MARKERS = [
24401
- { id: "claude", markerDir: join6(HOME, ".claude") },
24402
- { id: "codex", markerDir: join6(HOME, ".codex") },
24403
- { id: "claw", markerDir: join6(HOME, ".openclaw") },
24404
- { id: "cursor", markerDir: join6(HOME, ".cursor") },
24405
- { id: "hermes", markerDir: join6(HOME, ".hermes") },
24407
+ { id: "claude", markerDir: join7(HOME, ".claude") },
24408
+ { id: "codex", markerDir: join7(HOME, ".codex") },
24409
+ { id: "claw", markerDir: join7(HOME, ".openclaw") },
24410
+ { id: "cursor", markerDir: join7(HOME, ".cursor") },
24411
+ { id: "hermes", markerDir: join7(HOME, ".hermes") },
24406
24412
  // pi (badlogic/pi-mono coding-agent) — config at ~/.pi/agent/. pi exposes
24407
24413
  // a rich extension event API (session_start / input / tool_call /
24408
24414
  // tool_result / message_end / session_shutdown / etc.) — Tier 1 capable.
24409
- { id: "pi", markerDir: join6(HOME, ".pi") }
24415
+ { id: "pi", markerDir: join7(HOME, ".pi") }
24410
24416
  ];
24411
24417
 
24412
24418
  // dist/src/cli/version.js
24413
24419
  function getVersion() {
24414
24420
  try {
24415
- const pkg = JSON.parse(readFileSync6(join7(pkgRoot(), "package.json"), "utf-8"));
24421
+ const pkg = JSON.parse(readFileSync7(join8(pkgRoot(), "package.json"), "utf-8"));
24416
24422
  return pkg.version ?? "0.0.0";
24417
24423
  } catch {
24418
24424
  return "0.0.0";
@@ -17,6 +17,39 @@ function deeplakeClientHeader() {
17
17
  return { [DEEPLAKE_CLIENT_HEADER]: deeplakeClientValue() };
18
18
  }
19
19
 
20
+ // src/commands/install-id.ts
21
+ import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
22
+ import { join } from "node:path";
23
+ import { homedir } from "node:os";
24
+ import { randomUUID } from "node:crypto";
25
+ function configDir() {
26
+ return join(homedir(), ".deeplake");
27
+ }
28
+ function installIDPath() {
29
+ return join(configDir(), "install-id");
30
+ }
31
+ var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
32
+ function getOrCreateInstallID() {
33
+ try {
34
+ const value = readFileSync(installIDPath(), "utf-8").trim();
35
+ if (UUID_RE.test(value)) return value;
36
+ } catch {
37
+ }
38
+ const id = randomUUID();
39
+ try {
40
+ mkdirSync(configDir(), { recursive: true, mode: 448 });
41
+ writeFileSync(installIDPath(), id, { mode: 384 });
42
+ return id;
43
+ } catch {
44
+ return "";
45
+ }
46
+ }
47
+ function hivemindInstallIDHeader() {
48
+ const id = getOrCreateInstallID();
49
+ if (!id) return {};
50
+ return { "X-Hivemind-Install-Id": id };
51
+ }
52
+
20
53
  // src/commands/auth.ts
21
54
  var DEFAULT_API_URL = "https://api.deeplake.ai";
22
55
  async function apiGet(path, token, apiUrl, orgId) {
@@ -33,7 +66,11 @@ async function apiGet(path, token, apiUrl, orgId) {
33
66
  async function requestDeviceCode(apiUrl = DEFAULT_API_URL) {
34
67
  const resp = await fetch(`${apiUrl}/auth/device/code`, {
35
68
  method: "POST",
36
- headers: { "Content-Type": "application/json", ...deeplakeClientHeader() }
69
+ headers: {
70
+ "Content-Type": "application/json",
71
+ ...deeplakeClientHeader(),
72
+ ...hivemindInstallIDHeader()
73
+ }
37
74
  });
38
75
  if (!resp.ok) throw new Error(`Device flow unavailable: HTTP ${resp.status}`);
39
76
  return resp.json();
@@ -41,7 +78,11 @@ async function requestDeviceCode(apiUrl = DEFAULT_API_URL) {
41
78
  async function pollForToken(deviceCode, apiUrl = DEFAULT_API_URL) {
42
79
  const resp = await fetch(`${apiUrl}/auth/device/token`, {
43
80
  method: "POST",
44
- headers: { "Content-Type": "application/json", ...deeplakeClientHeader() },
81
+ headers: {
82
+ "Content-Type": "application/json",
83
+ ...deeplakeClientHeader(),
84
+ ...hivemindInstallIDHeader()
85
+ },
45
86
  body: JSON.stringify({ device_code: deviceCode })
46
87
  });
47
88
  if (resp.ok) return resp.json();
@@ -74,13 +115,13 @@ async function switchWorkspace(workspaceId) {
74
115
  }
75
116
 
76
117
  // src/deeplake-api.ts
77
- import { randomUUID } from "node:crypto";
118
+ import { randomUUID as randomUUID2 } from "node:crypto";
78
119
 
79
120
  // src/utils/debug.ts
80
121
  import { appendFileSync } from "node:fs";
81
- import { join } from "node:path";
82
- import { homedir } from "node:os";
83
- var LOG = join(homedir(), ".deeplake", "hook-debug.log");
122
+ import { join as join2 } from "node:path";
123
+ import { homedir as homedir2 } from "node:os";
124
+ var LOG = join2(homedir2(), ".deeplake", "hook-debug.log");
84
125
  function isDebug() {
85
126
  return globalThis.__hivemind_tuning__.HIVEMIND_DEBUG === "1";
86
127
  }
@@ -223,23 +264,23 @@ async function healMissingColumns(args) {
223
264
  }
224
265
 
225
266
  // src/notifications/queue.ts
226
- import { readFileSync, writeFileSync, renameSync, mkdirSync, openSync, closeSync, unlinkSync, statSync } from "node:fs";
227
- import { join as join2, resolve } from "node:path";
228
- import { homedir as homedir2 } from "node:os";
267
+ import { readFileSync as readFileSync2, writeFileSync as writeFileSync2, renameSync, mkdirSync as mkdirSync2, openSync, closeSync, unlinkSync, statSync } from "node:fs";
268
+ import { join as join3, resolve } from "node:path";
269
+ import { homedir as homedir3 } from "node:os";
229
270
  import { setTimeout as sleep } from "node:timers/promises";
230
271
  var log2 = (msg) => log("notifications-queue", msg);
231
272
  var LOCK_RETRY_MAX = 50;
232
273
  var LOCK_RETRY_BASE_MS = 5;
233
274
  var LOCK_STALE_MS = 5e3;
234
275
  function queuePath() {
235
- return join2(homedir2(), ".deeplake", "notifications-queue.json");
276
+ return join3(homedir3(), ".deeplake", "notifications-queue.json");
236
277
  }
237
278
  function lockPath() {
238
279
  return `${queuePath()}.lock`;
239
280
  }
240
281
  function readQueue() {
241
282
  try {
242
- const raw = readFileSync(queuePath(), "utf-8");
283
+ const raw = readFileSync2(queuePath(), "utf-8");
243
284
  const parsed = JSON.parse(raw);
244
285
  if (!parsed || !Array.isArray(parsed.queue)) {
245
286
  log2(`queue malformed \u2192 treating as empty`);
@@ -257,18 +298,18 @@ function _isQueuePathInsideHome(path, home) {
257
298
  }
258
299
  function writeQueue(q) {
259
300
  const path = queuePath();
260
- const home = resolve(homedir2());
301
+ const home = resolve(homedir3());
261
302
  if (!_isQueuePathInsideHome(path, home)) {
262
303
  throw new Error(`notifications-queue write blocked: ${path} is outside ${home}`);
263
304
  }
264
- mkdirSync(join2(home, ".deeplake"), { recursive: true, mode: 448 });
305
+ mkdirSync2(join3(home, ".deeplake"), { recursive: true, mode: 448 });
265
306
  const tmp = `${path}.${process.pid}.tmp`;
266
- writeFileSync(tmp, JSON.stringify(q, null, 2), { mode: 384 });
307
+ writeFileSync2(tmp, JSON.stringify(q, null, 2), { mode: 384 });
267
308
  renameSync(tmp, path);
268
309
  }
269
310
  async function withQueueLock(fn) {
270
311
  const path = lockPath();
271
- mkdirSync(join2(homedir2(), ".deeplake"), { recursive: true, mode: 448 });
312
+ mkdirSync2(join3(homedir3(), ".deeplake"), { recursive: true, mode: 448 });
272
313
  let fd = null;
273
314
  for (let attempt = 0; attempt < LOCK_RETRY_MAX; attempt++) {
274
315
  try {
@@ -535,7 +576,7 @@ var DeeplakeApi = class {
535
576
  `UPDATE "${this.tableName}" SET ${setClauses} WHERE path = '${sqlStr(row.path)}'`
536
577
  );
537
578
  } else {
538
- const id = randomUUID();
579
+ const id = randomUUID2();
539
580
  let cols = `id, path, filename, summary, ${SUMMARY_EMBEDDING_COL}, mime_type, size_bytes, creation_date, last_update_date`;
540
581
  let vals = `'${id}', '${sqlStr(row.path)}', '${sqlStr(row.filename)}', E'${sqlStr(row.contentText)}', NULL, '${sqlStr(row.mimeType)}', ${row.sizeBytes}, '${cd}', '${lud}'`;
541
582
  if (row.project !== void 0) {
@@ -1242,10 +1283,10 @@ import {
1242
1283
  writeSync,
1243
1284
  unlinkSync as unlinkSync2,
1244
1285
  existsSync,
1245
- readFileSync as readFileSync2
1286
+ readFileSync as readFileSync3
1246
1287
  } from "node:fs";
1247
- import { homedir as homedir3 } from "node:os";
1248
- import { join as join3 } from "node:path";
1288
+ import { homedir as homedir4 } from "node:os";
1289
+ import { join as join4 } from "node:path";
1249
1290
 
1250
1291
  // src/embeddings/protocol.ts
1251
1292
  var DEFAULT_SOCKET_DIR = "/tmp";
@@ -1259,7 +1300,7 @@ function pidPathFor(uid, dir = DEFAULT_SOCKET_DIR) {
1259
1300
  }
1260
1301
 
1261
1302
  // src/embeddings/standalone-embed-client.ts
1262
- var SHARED_DAEMON_PATH = join3(homedir3(), ".hivemind", "embed-deps", "embed-daemon.js");
1303
+ var SHARED_DAEMON_PATH = join4(homedir4(), ".hivemind", "embed-deps", "embed-daemon.js");
1263
1304
  var _spawn = spawn;
1264
1305
  function getUid() {
1265
1306
  const uid = typeof process.getuid === "function" ? process.getuid() : void 0;
@@ -1277,7 +1318,7 @@ function isPidAlive(pid) {
1277
1318
  function readPidFile(path) {
1278
1319
  let raw;
1279
1320
  try {
1280
- raw = readFileSync2(path, "utf-8").trim();
1321
+ raw = readFileSync3(path, "utf-8").trim();
1281
1322
  } catch {
1282
1323
  return null;
1283
1324
  }
@@ -1459,7 +1500,7 @@ function embeddingSqlLiteral(vec) {
1459
1500
  // openclaw/src/index.ts
1460
1501
  import { fileURLToPath } from "node:url";
1461
1502
  import { join as joinPath, dirname as dirnamePath } from "node:path";
1462
- import { homedir as homedir4, tmpdir } from "node:os";
1503
+ import { homedir as homedir5, tmpdir } from "node:os";
1463
1504
  import {
1464
1505
  existsSync as fsExists,
1465
1506
  mkdirSync as fsMkdir,
@@ -1543,7 +1584,7 @@ function extractLatestVersion(body) {
1543
1584
  return typeof v === "string" && v.length > 0 ? v : null;
1544
1585
  }
1545
1586
  function getInstalledVersion() {
1546
- return "0.7.39".length > 0 ? "0.7.39" : null;
1587
+ return "0.7.41".length > 0 ? "0.7.41" : null;
1547
1588
  }
1548
1589
  function isNewer(latest, current) {
1549
1590
  const parse = (v) => v.replace(/-.*$/, "").split(".").map(Number);
@@ -1650,8 +1691,8 @@ var skillifySpawnedFor = /* @__PURE__ */ new Set();
1650
1691
  var __openclaw_filename = fileURLToPath(import.meta.url);
1651
1692
  var __openclaw_dirname = dirnamePath(__openclaw_filename);
1652
1693
  var OPENCLAW_SKILLIFY_WORKER_PATH = joinPath(__openclaw_dirname, "skillify-worker.js");
1653
- var OPENCLAW_SKILLIFY_STATE_DIR = joinPath(homedir4(), ".deeplake", "state", "skillify");
1654
- var OPENCLAW_SKILLIFY_LEGACY_STATE_DIR = joinPath(homedir4(), ".deeplake", "state", "skilify");
1694
+ var OPENCLAW_SKILLIFY_STATE_DIR = joinPath(homedir5(), ".deeplake", "state", "skillify");
1695
+ var OPENCLAW_SKILLIFY_LEGACY_STATE_DIR = joinPath(homedir5(), ".deeplake", "state", "skilify");
1655
1696
  var openclawSkillifyMigrationAttempted = false;
1656
1697
  function migrateOpenclawSkillifyLegacyStateDir() {
1657
1698
  if (openclawSkillifyMigrationAttempted) return;
@@ -1767,7 +1808,7 @@ function spawnOpenclawSkillifyWorker(a) {
1767
1808
  sessionsTable,
1768
1809
  skillsTable,
1769
1810
  userName: a.userName,
1770
- cwd: homedir4(),
1811
+ cwd: homedir5(),
1771
1812
  // sentinel — only used by worker if install=project
1772
1813
  projectKey,
1773
1814
  project,
@@ -1783,7 +1824,7 @@ function spawnOpenclawSkillifyWorker(a) {
1783
1824
  cursorModel: void 0,
1784
1825
  hermesProvider: void 0,
1785
1826
  hermesModel: void 0,
1786
- skillifyLog: joinPath(homedir4(), ".deeplake", "hivemind-openclaw-skillify.log"),
1827
+ skillifyLog: joinPath(homedir5(), ".deeplake", "hivemind-openclaw-skillify.log"),
1787
1828
  currentSessionId: a.sessionId,
1788
1829
  // Pass the tuning dispatch through so the worker can repopulate its
1789
1830
  // own globalThis (each process has its own globalThis). The worker
@@ -52,5 +52,5 @@
52
52
  }
53
53
  }
54
54
  },
55
- "version": "0.7.39"
55
+ "version": "0.7.41"
56
56
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hivemind",
3
- "version": "0.7.39",
3
+ "version": "0.7.41",
4
4
  "type": "module",
5
5
  "description": "Hivemind — cloud-backed persistent shared memory for AI agents, powered by DeepLake",
6
6
  "license": "Apache-2.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deeplake/hivemind",
3
- "version": "0.7.39",
3
+ "version": "0.7.41",
4
4
  "description": "Cloud-backed persistent shared memory for AI agents powered by Deeplake",
5
5
  "type": "module",
6
6
  "repository": {