@signetai/core 0.219.3 → 0.219.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.
@@ -16,7 +16,6 @@ export declare class Database {
16
16
  private dbPath;
17
17
  private db;
18
18
  private options?;
19
- private vecEnabled;
20
19
  constructor(dbPath: string, options?: {
21
20
  readonly?: boolean;
22
21
  });
@@ -1 +1 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../src/database.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,KAAK,EAA2B,MAAM,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAsBxD,iBAAS,sBAAsB,IAAI,MAAM,GAAG,IAAI,CAiI/C;AAED,yEAAyE;AACzE,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAclD;AAcD,qBAAa,QAAQ;IACpB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,EAAE,CAA+B;IACzC,OAAO,CAAC,OAAO,CAAC,CAAyB;IACzC,OAAO,CAAC,UAAU,CAAS;gBAEf,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE;IAKtD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAmD3B,yDAAyD;IACzD,OAAO,CAAC,KAAK;IASb,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,CAAC,GAAG,MAAM;IAqCrF,WAAW,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE;IAUpC,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IAMxC,YAAY,CAAC,EAAE,EAA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AC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAsBxC,WAAW,IAAI,MAAM;IAkBrB,KAAK,IAAI,IAAI;CAKb"}
package/dist/index.js CHANGED
@@ -11532,6 +11532,7 @@ function emptyHookRecallResponse(query, extras) {
11532
11532
  }
11533
11533
 
11534
11534
  // src/database.ts
11535
+ import { execFileSync as execFileSync2 } from "node:child_process";
11535
11536
  import { existsSync, readdirSync } from "node:fs";
11536
11537
  import { homedir } from "node:os";
11537
11538
  import { dirname, join } from "node:path";
@@ -18587,24 +18588,38 @@ function getPlatformPackageName() {
18587
18588
  const os = platform === "win32" ? "windows" : platform;
18588
18589
  return `sqlite-vec-${os}-${arch === "x64" ? "x64" : arch}`;
18589
18590
  }
18591
+ var cachedNpmGlobalRoot;
18592
+ function findNpmGlobalRoot() {
18593
+ if (cachedNpmGlobalRoot !== undefined)
18594
+ return cachedNpmGlobalRoot;
18595
+ try {
18596
+ const command = platform === "win32" ? "npm.cmd" : "npm";
18597
+ const root = execFileSync2(command, ["root", "-g"], {
18598
+ encoding: "utf8",
18599
+ timeout: 3000,
18600
+ windowsHide: true
18601
+ }).trim();
18602
+ cachedNpmGlobalRoot = root || null;
18603
+ } catch {
18604
+ cachedNpmGlobalRoot = null;
18605
+ }
18606
+ return cachedNpmGlobalRoot;
18607
+ }
18590
18608
  function findSqliteVecExtension() {
18591
18609
  const envPath = process.env.SIGNET_VEC_PATH;
18592
18610
  if (envPath && existsSync(envPath))
18593
18611
  return envPath;
18594
18612
  const platformPkg = getPlatformPackageName();
18595
18613
  const extFile = `vec0.${getExtensionSuffix()}`;
18596
- try {
18597
- const { execFileSync: execFileSync2 } = __require("node:child_process");
18598
- const npmRoot = execFileSync2("npm", ["root", "-g"], { encoding: "utf8", timeout: 3000 }).trim();
18599
- if (npmRoot) {
18600
- const direct = join(npmRoot, platformPkg, extFile);
18601
- if (existsSync(direct))
18602
- return direct;
18603
- const nested = join(npmRoot, "signetai", "node_modules", platformPkg, extFile);
18604
- if (existsSync(nested))
18605
- return nested;
18606
- }
18607
- } catch {}
18614
+ const npmRoot = findNpmGlobalRoot();
18615
+ if (npmRoot) {
18616
+ const direct = join(npmRoot, platformPkg, extFile);
18617
+ if (existsSync(direct))
18618
+ return direct;
18619
+ const nested = join(npmRoot, "signetai", "node_modules", platformPkg, extFile);
18620
+ if (existsSync(nested))
18621
+ return nested;
18622
+ }
18608
18623
  const searchPaths = [
18609
18624
  join(dirname(dirname(dirname(process.execPath))), platformPkg, extFile),
18610
18625
  join(dirname(dirname(process.execPath)), "node_modules", platformPkg, extFile),
@@ -18670,7 +18685,6 @@ class Database {
18670
18685
  dbPath;
18671
18686
  db = null;
18672
18687
  options;
18673
- vecEnabled = false;
18674
18688
  constructor(dbPath, options) {
18675
18689
  this.dbPath = dbPath;
18676
18690
  this.options = options;
@@ -18694,7 +18708,7 @@ class Database {
18694
18708
  readonly: this.options?.readonly
18695
18709
  });
18696
18710
  }
18697
- this.vecEnabled = loadSqliteVec(this.db);
18711
+ loadSqliteVec(this.db);
18698
18712
  if (!this.options?.readonly) {
18699
18713
  this.getDb().exec("PRAGMA auto_vacuum = INCREMENTAL");
18700
18714
  const journal = resolveSqliteJournalConfig({ directory: dirname(this.dbPath) });
@@ -19283,7 +19297,7 @@ import { hostname } from "node:os";
19283
19297
  import { join as join4 } from "node:path";
19284
19298
 
19285
19299
  // src/secrets-keyring.ts
19286
- import { execFileSync as execFileSync2 } from "node:child_process";
19300
+ import { execFileSync as execFileSync3 } from "node:child_process";
19287
19301
  import { createHash as createHash2 } from "node:crypto";
19288
19302
  import { createRequire as createRequire2 } from "node:module";
19289
19303
  var SERVICE = "ai.signet.secrets";
@@ -19369,7 +19383,7 @@ function linuxKeyringAvailable() {
19369
19383
  };
19370
19384
  }
19371
19385
  try {
19372
- execFileSync2("busctl", ["--user", "status", "org.freedesktop.secrets"], {
19386
+ execFileSync3("busctl", ["--user", "status", "org.freedesktop.secrets"], {
19373
19387
  stdio: "ignore",
19374
19388
  timeout: 1000
19375
19389
  });
@@ -24186,7 +24200,7 @@ function importRelations(db, relationsJsonl) {
24186
24200
  return { imported, errors };
24187
24201
  }
24188
24202
  // src/identity.ts
24189
- import { execFileSync as execFileSync3 } from "node:child_process";
24203
+ import { execFileSync as execFileSync4 } from "node:child_process";
24190
24204
  import { existsSync as existsSync13, readFileSync as readFileSync11, readdirSync as readdirSync5, realpathSync, statSync as statSync7 } from "node:fs";
24191
24205
  import { homedir as homedir9 } from "node:os";
24192
24206
  import { dirname as dirname8, join as join13 } from "node:path";
@@ -24562,7 +24576,7 @@ function resolveHermesRepoPath() {
24562
24576
  return base;
24563
24577
  }
24564
24578
  try {
24565
- const hermesPath = execFileSync3("which", ["hermes"], {
24579
+ const hermesPath = execFileSync4("which", ["hermes"], {
24566
24580
  encoding: "utf-8",
24567
24581
  stdio: ["ignore", "pipe", "ignore"],
24568
24582
  timeout: 3000
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/core",
3
- "version": "0.219.3",
3
+ "version": "0.219.4",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Core library for Signet - portable AI agent identity",
6
6
  "type": "module",