signetai 0.200.25 → 0.200.26

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/mcp-stdio.js CHANGED
@@ -6725,7 +6725,7 @@ var require_base64_js = __commonJS((exports) => {
6725
6725
  });
6726
6726
 
6727
6727
  // ../../platform/daemon/src/mcp-stdio.ts
6728
- import { existsSync as existsSync10, statSync as statSync3 } from "node:fs";
6728
+ import { existsSync as existsSync12, statSync as statSync3 } from "node:fs";
6729
6729
  import { isAbsolute } from "node:path";
6730
6730
 
6731
6731
  // ../../node_modules/.bun/@modelcontextprotocol+sdk@1.30.0/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
@@ -44336,6 +44336,154 @@ function pendingDreamingEvidenceContinuations(db, agentId, limit, kind) {
44336
44336
  });
44337
44337
  }
44338
44338
 
44339
+ // ../../platform/daemon/src/pipeline/dreaming-token-cache.ts
44340
+ import { existsSync as existsSync4 } from "node:fs";
44341
+ import { join as join6 } from "node:path";
44342
+ import { dirname as dirname6 } from "node:path";
44343
+ import { fileURLToPath as fileURLToPath2 } from "node:url";
44344
+ import { Worker } from "node:worker_threads";
44345
+
44346
+ // ../../platform/daemon/src/native-runtime-assets.ts
44347
+ import { createHash as createHash2 } from "node:crypto";
44348
+ import { chmodSync, existsSync as existsSync3, mkdirSync as mkdirSync4, writeFileSync } from "node:fs";
44349
+ import { tmpdir } from "node:os";
44350
+ import { dirname as dirname3, join as join5 } from "node:path";
44351
+ function nativeRuntimeAssets() {
44352
+ return globalThis.__SIGNET_NATIVE_RUNTIME_ASSETS__ ?? {};
44353
+ }
44354
+ function resolveEmbeddedWorkerPath(name) {
44355
+ const worker = (nativeRuntimeAssets().workers ?? []).find((asset) => asset.name === name);
44356
+ if (!worker)
44357
+ return null;
44358
+ const hash2 = createHash2("sha256").update(worker.contentBase64).digest("hex").slice(0, 16);
44359
+ const dir = join5(tmpdir(), "signet-native-workers");
44360
+ const path = join5(dir, `${name.replace(/[^a-zA-Z0-9_.-]/g, "_")}-${hash2}.mjs`);
44361
+ mkdirSync4(dir, { recursive: true });
44362
+ if (!existsSync3(path)) {
44363
+ writeFileSync(path, Buffer.from(worker.contentBase64, "base64"));
44364
+ }
44365
+ return path;
44366
+ }
44367
+
44368
+ // ../../platform/daemon/src/pipeline/dreaming-token-cache.ts
44369
+ function resolveWorkerPath() {
44370
+ const moduleDir = dirname6(fileURLToPath2(import.meta.url));
44371
+ const bundled = join6(moduleDir, "dreaming-token-worker.js");
44372
+ return existsSync4(bundled) ? bundled : resolveEmbeddedWorkerPath("dreaming-token-worker") ?? join6(moduleDir, "dreaming-token-worker.ts");
44373
+ }
44374
+
44375
+ class DreamingBacklogTokenCache {
44376
+ values = new Map;
44377
+ entries = new Map;
44378
+ entryValues = new Map;
44379
+ pending = new Map;
44380
+ inflight = new Map;
44381
+ worker = null;
44382
+ nextRequestId = 1;
44383
+ async refresh(agentId, entries) {
44384
+ const active = this.inflight.get(agentId);
44385
+ if (active !== undefined)
44386
+ return active;
44387
+ const promise3 = this.refreshNow(agentId, entries);
44388
+ this.inflight.set(agentId, promise3);
44389
+ try {
44390
+ return await promise3;
44391
+ } finally {
44392
+ this.inflight.delete(agentId);
44393
+ }
44394
+ }
44395
+ get(agentId) {
44396
+ return this.values.get(agentId) ?? 0;
44397
+ }
44398
+ hasValue(agentId) {
44399
+ return this.values.has(agentId);
44400
+ }
44401
+ stop() {
44402
+ const worker = this.worker;
44403
+ this.worker = null;
44404
+ if (worker !== null)
44405
+ worker.terminate();
44406
+ for (const pending of this.pending.values())
44407
+ pending.reject(new Error("Dreaming token worker stopped"));
44408
+ this.pending.clear();
44409
+ this.inflight.clear();
44410
+ }
44411
+ async refreshNow(agentId, entries) {
44412
+ const nextKeys = new Set(entries.map((entry) => entry.key));
44413
+ const agentEntries = this.entries.get(agentId) ?? new Map;
44414
+ const agentValues = this.entryValues.get(agentId) ?? new Map;
44415
+ this.entries.set(agentId, agentEntries);
44416
+ this.entryValues.set(agentId, agentValues);
44417
+ for (const key of agentEntries.keys()) {
44418
+ if (!nextKeys.has(key))
44419
+ agentEntries.delete(key);
44420
+ }
44421
+ const uncached = entries.filter((entry) => {
44422
+ const cached2 = agentEntries.get(entry.key);
44423
+ return cached2 === undefined || cached2.text !== entry.text;
44424
+ });
44425
+ if (uncached.length > 0) {
44426
+ const counts = await this.count(uncached);
44427
+ for (const entry of uncached) {
44428
+ const result = counts.find((item) => item.key === entry.key);
44429
+ if (result === undefined)
44430
+ throw new Error(`Dreaming token worker omitted ${entry.key}`);
44431
+ agentEntries.set(entry.key, entry);
44432
+ agentValues.set(entry.key, result.count);
44433
+ }
44434
+ }
44435
+ let total = 0;
44436
+ for (const entry of entries) {
44437
+ const count = agentValues.get(entry.key);
44438
+ if (count === undefined)
44439
+ throw new Error(`Missing cached Dreaming token count for ${entry.key}`);
44440
+ total += count;
44441
+ }
44442
+ for (const key of agentValues.keys()) {
44443
+ if (!nextKeys.has(key))
44444
+ agentValues.delete(key);
44445
+ }
44446
+ this.values.set(agentId, total);
44447
+ return total;
44448
+ }
44449
+ count(entries) {
44450
+ const worker = this.ensureWorker();
44451
+ const requestId = this.nextRequestId++;
44452
+ return new Promise((resolve, reject) => {
44453
+ this.pending.set(requestId, { resolve, reject });
44454
+ worker.postMessage({ type: "count", requestId, entries });
44455
+ });
44456
+ }
44457
+ ensureWorker() {
44458
+ if (this.worker !== null)
44459
+ return this.worker;
44460
+ const worker = new Worker(resolveWorkerPath());
44461
+ worker.unref?.();
44462
+ worker.on("message", (message) => {
44463
+ const pending = this.pending.get(message.requestId);
44464
+ if (pending === undefined)
44465
+ return;
44466
+ this.pending.delete(message.requestId);
44467
+ pending.resolve(message.counts);
44468
+ });
44469
+ const fail = (error51) => {
44470
+ for (const pending of this.pending.values())
44471
+ pending.reject(error51);
44472
+ this.pending.clear();
44473
+ this.worker = null;
44474
+ };
44475
+ worker.on("error", fail);
44476
+ worker.on("exit", (code) => {
44477
+ if (code !== 0)
44478
+ fail(new Error(`Dreaming token worker exited with code ${code}`));
44479
+ if (this.worker === worker)
44480
+ this.worker = null;
44481
+ });
44482
+ this.worker = worker;
44483
+ return worker;
44484
+ }
44485
+ }
44486
+
44339
44487
  // ../../node_modules/.bun/js-tiktoken@1.0.21/node_modules/js-tiktoken/dist/chunk-VL2OQCWN.js
44340
44488
  var import_base64_js = __toESM(require_base64_js(), 1);
44341
44489
  var __defProp3 = Object.defineProperty;
@@ -44489,6 +44637,7 @@ function truncateToTokens(text, limit) {
44489
44637
  var EVIDENCE_WATERMARK_FLOOR_MS = Date.parse(EPISODIC_CAPTURED_AT_FLOOR);
44490
44638
  var FAILURE_BACKOFF_BASE_MS = 5 * 60 * 1000;
44491
44639
  var DREAMING_HALT_COOLDOWN_MS = 24 * 60 * 60 * 1000;
44640
+ var dreamingBacklogTokenCache = new DreamingBacklogTokenCache;
44492
44641
 
44493
44642
  // ../../platform/daemon/src/knowledge-graph.ts
44494
44643
  function toCanonicalName(raw) {
@@ -49313,9 +49462,9 @@ function getDreamingCapabilityManifest() {
49313
49462
 
49314
49463
  // ../../platform/daemon/src/graphiq.ts
49315
49464
  import { spawn } from "node:child_process";
49316
- import { constants, accessSync, existsSync as existsSync3 } from "node:fs";
49465
+ import { constants, accessSync, existsSync as existsSync6 } from "node:fs";
49317
49466
  import { homedir as homedir3 } from "node:os";
49318
- import { delimiter, join as join5 } from "node:path";
49467
+ import { delimiter, join as join8 } from "node:path";
49319
49468
  function getAgentsDir() {
49320
49469
  return resolveDefaultBasePath();
49321
49470
  }
@@ -49330,8 +49479,8 @@ function getActiveGraphiqDbPath() {
49330
49479
  }
49331
49480
  function resolveGraphiqBinary() {
49332
49481
  const path = process.env.PATH ?? "";
49333
- const candidates2 = path.split(delimiter).filter((entry) => entry.length > 0).map((entry) => join5(entry, "graphiq"));
49334
- candidates2.push(join5(homedir3(), ".local", "bin", "graphiq"));
49482
+ const candidates2 = path.split(delimiter).filter((entry) => entry.length > 0).map((entry) => join8(entry, "graphiq"));
49483
+ candidates2.push(join8(homedir3(), ".local", "bin", "graphiq"));
49335
49484
  for (const candidate of candidates2) {
49336
49485
  try {
49337
49486
  accessSync(candidate, constants.X_OK);
@@ -49345,7 +49494,7 @@ async function runGraphiqCli(args, timeoutMs = 15000) {
49345
49494
  if (!active) {
49346
49495
  throw new Error("GraphIQ has no active indexed project. Run `signet index <path>` first.");
49347
49496
  }
49348
- if (!existsSync3(active.dbPath)) {
49497
+ if (!existsSync6(active.dbPath)) {
49349
49498
  throw new Error(`GraphIQ database not found for active project: ${active.dbPath}`);
49350
49499
  }
49351
49500
  const binary = resolveGraphiqBinary();
@@ -49415,32 +49564,32 @@ function runCommand(command, args, timeoutMs, extraEnv) {
49415
49564
  }
49416
49565
 
49417
49566
  // ../../platform/daemon/src/plugins/index.ts
49418
- import { existsSync as existsSync9, readFileSync as readFileSync8 } from "node:fs";
49567
+ import { existsSync as existsSync11, readFileSync as readFileSync8 } from "node:fs";
49419
49568
 
49420
49569
  // ../../platform/daemon/src/secrets.ts
49421
49570
  import {
49422
- chmodSync,
49571
+ chmodSync as chmodSync2,
49423
49572
  closeSync,
49424
- existsSync as existsSync6,
49573
+ existsSync as existsSync9,
49425
49574
  fsyncSync,
49426
- mkdirSync as mkdirSync6,
49575
+ mkdirSync as mkdirSync7,
49427
49576
  openSync,
49428
49577
  readFileSync as readFileSync5,
49429
49578
  readdirSync as readdirSync3,
49430
49579
  renameSync as renameSync3,
49431
49580
  unlinkSync as unlinkSync3,
49432
- writeFileSync
49581
+ writeFileSync as writeFileSync3
49433
49582
  } from "node:fs";
49434
- import { join as join8 } from "node:path";
49583
+ import { join as join11 } from "node:path";
49435
49584
 
49436
49585
  // ../../platform/daemon/src/plugins/audit.ts
49437
- import { appendFileSync as appendFileSync2, existsSync as existsSync4, mkdirSync as mkdirSync4, readFileSync as readFileSync3 } from "node:fs";
49438
- import { dirname as dirname3, join as join6 } from "node:path";
49586
+ import { appendFileSync as appendFileSync2, existsSync as existsSync8, mkdirSync as mkdirSync6, readFileSync as readFileSync3 } from "node:fs";
49587
+ import { dirname as dirname8, join as join10 } from "node:path";
49439
49588
  var SENSITIVE_KEY_RE = /(^|[_-])(api-key|apikey|auth-token|authorization|bearer|client-secret|credential|credentials|password|private-key|refresh-token|secret|secret-value|token|value)([_-]|$)/i;
49440
49589
  var SENSITIVE_ASSIGNMENT_RE = /\b((?:access[_-]?token|api[_-]?key|auth(?:orization)?|bearer|client[_-]?secret|credential|password|refresh[_-]?token|secret|token)\s*[:=]\s*)(["']?)([^"'\s,;&]+)/gi;
49441
49590
  var KNOWN_SECRET_VALUE_RE = /\b(AKIA[0-9A-Z]{16}|github_pat_[A-Za-z0-9_]{20,}|gh[pousr]_[A-Za-z0-9_]{20,}|sk-[A-Za-z0-9_-]{12,}|xox[baprs]-[A-Za-z0-9-]{10,})\b/g;
49442
49591
  function getDefaultPluginAuditPath() {
49443
- return join6(resolveDefaultBasePath(), ".daemon", "plugins", "audit-v1.ndjson");
49592
+ return join10(resolveDefaultBasePath(), ".daemon", "plugins", "audit-v1.ndjson");
49444
49593
  }
49445
49594
  function recordPluginAuditEvent(input, auditPath) {
49446
49595
  if (auditPath === null)
@@ -49457,7 +49606,7 @@ function recordPluginAuditEvent(input, auditPath) {
49457
49606
  data: sanitizeAuditData(input.data ?? {})
49458
49607
  };
49459
49608
  try {
49460
- mkdirSync4(dirname3(path), { recursive: true });
49609
+ mkdirSync6(dirname8(path), { recursive: true });
49461
49610
  appendFileSync2(path, `${JSON.stringify(event)}
49462
49611
  `, { mode: 384 });
49463
49612
  } catch (err) {
@@ -49803,10 +49952,10 @@ function getAgentsDir2() {
49803
49952
  return resolveDefaultBasePath();
49804
49953
  }
49805
49954
  function getSecretsDir() {
49806
- return join8(getAgentsDir2(), ".secrets");
49955
+ return join11(getAgentsDir2(), ".secrets");
49807
49956
  }
49808
49957
  function getSecretsFile() {
49809
- return join8(getSecretsDir(), "secrets.enc");
49958
+ return join11(getSecretsDir(), "secrets.enc");
49810
49959
  }
49811
49960
  var DEFAULT_SECRET_EXEC_TIMEOUT_MS = 5 * 60000;
49812
49961
  var MAX_SECRET_EXEC_TIMEOUT_MS = 30 * 60000;
@@ -49841,14 +49990,14 @@ function cleanupStaleSecretStoreTemps() {
49841
49990
  if (!name.startsWith(SECRET_STORE_TEMP_PREFIX) || isSecretStoreTempProcessLive(name))
49842
49991
  continue;
49843
49992
  try {
49844
- unlinkSync3(join8(dir, name));
49993
+ unlinkSync3(join11(dir, name));
49845
49994
  } catch {}
49846
49995
  }
49847
49996
  }
49848
49997
  function loadStore() {
49849
49998
  cleanupStaleSecretStoreTemps();
49850
49999
  const file2 = getSecretsFile();
49851
- if (!existsSync6(file2)) {
50000
+ if (!existsSync9(file2)) {
49852
50001
  return { version: 1, secrets: {} };
49853
50002
  }
49854
50003
  try {
@@ -50113,8 +50262,8 @@ var signetGraphiqManifest = {
50113
50262
  };
50114
50263
 
50115
50264
  // ../../platform/daemon/src/plugins/host.ts
50116
- import { existsSync as existsSync8, mkdirSync as mkdirSync7, readFileSync as readFileSync7, writeFileSync as writeFileSync3 } from "node:fs";
50117
- import { dirname as dirname6, join as join10 } from "node:path";
50265
+ import { existsSync as existsSync10, mkdirSync as mkdirSync8, readFileSync as readFileSync7, writeFileSync as writeFileSync5 } from "node:fs";
50266
+ import { dirname as dirname9, join as join12 } from "node:path";
50118
50267
 
50119
50268
  // ../../platform/daemon/src/plugins/manifest.ts
50120
50269
  var PLUGIN_ID_RE = /^[a-z][a-z0-9-]*(\.[a-z][a-z0-9-]*)+$/;
@@ -50462,7 +50611,7 @@ class PluginHostV1 {
50462
50611
  };
50463
50612
  }
50464
50613
  loadStore() {
50465
- if (!this.storagePath || !existsSync8(this.storagePath)) {
50614
+ if (!this.storagePath || !existsSync10(this.storagePath)) {
50466
50615
  return { version: 1, plugins: {} };
50467
50616
  }
50468
50617
  try {
@@ -50490,13 +50639,13 @@ class PluginHostV1 {
50490
50639
  });
50491
50640
  return;
50492
50641
  }
50493
- mkdirSync7(dirname6(this.storagePath), { recursive: true });
50494
- writeFileSync3(this.storagePath, `${JSON.stringify(this.store, null, 2)}
50642
+ mkdirSync8(dirname9(this.storagePath), { recursive: true });
50643
+ writeFileSync5(this.storagePath, `${JSON.stringify(this.store, null, 2)}
50495
50644
  `, { mode: 384 });
50496
50645
  }
50497
50646
  }
50498
50647
  function getDefaultPluginRegistryPath() {
50499
- return join10(resolveDefaultBasePath(), SIGNET_PLUGIN_REGISTRY_DIR, SIGNET_PLUGIN_REGISTRY_FILE);
50648
+ return join12(resolveDefaultBasePath(), SIGNET_PLUGIN_REGISTRY_DIR, SIGNET_PLUGIN_REGISTRY_FILE);
50500
50649
  }
50501
50650
  function resolveState(manifest, enabled, health, validationErrors) {
50502
50651
  if (validationErrors.length > 0) {
@@ -50619,7 +50768,7 @@ function auditResultForRecord(record5) {
50619
50768
  // ../../platform/daemon/src/plugins/index.ts
50620
50769
  function resolveGraphiqEnabled() {
50621
50770
  const statePath = getGraphiqStatePath(getAgentsDir());
50622
- if (existsSync9(statePath)) {
50771
+ if (existsSync11(statePath)) {
50623
50772
  try {
50624
50773
  const parsed = JSON.parse(readFileSync8(statePath, "utf-8"));
50625
50774
  if (typeof parsed === "object" && parsed !== null && typeof parsed.enabled === "boolean") {
@@ -52714,7 +52863,7 @@ function isLocalDaemonUrl(url2) {
52714
52863
  }
52715
52864
  function isValidAgentsDir(dir) {
52716
52865
  try {
52717
- return isAbsolute(dir) && existsSync10(dir) && statSync3(dir).isDirectory();
52866
+ return isAbsolute(dir) && existsSync12(dir) && statSync3(dir).isDirectory();
52718
52867
  } catch {
52719
52868
  return false;
52720
52869
  }
@@ -1,43 +1,43 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.200.25",
3
+ "version": "0.200.26",
4
4
  "assets": [
5
5
  {
6
6
  "name": "signet-darwin-arm64",
7
7
  "platform": "darwin-arm64",
8
- "sha256": "bccc471166d060d39f7786d036c33a6cb7d9ce24b47735c564bd1daa10764b8f",
9
- "size": 125350432
8
+ "sha256": "fb67e16bdeecc02d8e3fb6d2ada09c174e78800f94654440c64d933a44791a99",
9
+ "size": 126820000
10
10
  },
11
11
  {
12
12
  "name": "signet-darwin-x64",
13
13
  "platform": "darwin-x64",
14
- "sha256": "c4d8bd1db8015210fdfff78accf0cb5a0bec7881551e421cadc1d595761f939a",
15
- "size": 130320960
14
+ "sha256": "1686a8f5a408a2e801786c2deaf8c6997d5b2e6249d5f162e495eeadb41a7427",
15
+ "size": 131795520
16
16
  },
17
17
  {
18
18
  "name": "signet-linux-arm64",
19
19
  "platform": "linux-arm64",
20
- "sha256": "0ecb4c8291e80900f0f90ca2b7d4245a9bf7fd3caf6c49d6d76858800582e104",
21
- "size": 169883492
20
+ "sha256": "148c0534ee0b3576518a382001ce0b1ed80812a8a99763737612c5840b2ac046",
21
+ "size": 171357544
22
22
  },
23
23
  {
24
24
  "name": "signet-linux-x64",
25
25
  "platform": "linux-x64",
26
- "sha256": "ce7a3976d9a1f9c9735aa28141e7c2bd5126c2fddda867c856912cb403d8c780",
27
- "size": 172258074
26
+ "sha256": "552ec0a18e0d897241690fd9a378e769dd3484f5f8bc60f0e0f3b152ab8829c8",
27
+ "size": 173732126
28
28
  },
29
29
  {
30
30
  "name": "signet-win32-x64.exe",
31
31
  "platform": "win32-x64",
32
- "sha256": "445a4dbfd02b5ea2de1456da79792e2d69f8d86933a73db497f78dfdcd346c51",
33
- "size": 180382720
32
+ "sha256": "0fa666d379aedb776ce1ee5fd743a987325b0bbb948742cb680aedc8a95364de",
33
+ "size": 181856768
34
34
  }
35
35
  ],
36
36
  "components": {
37
37
  "connectors": {
38
- "url": "signet-connectors-0.200.25.tar.gz",
39
- "sha256": "daadb726f1c8923459ec8ad64709c1224be8d0a4fea4a195b584a821af98ace5",
40
- "size": 21942
38
+ "url": "signet-connectors-0.200.26.tar.gz",
39
+ "sha256": "0fed5e65d53b0edaab4c9adae5b749bd6ebe9035386df550b87560f4a06f71d5",
40
+ "size": 21946
41
41
  }
42
42
  }
43
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signetai",
3
- "version": "0.200.25",
3
+ "version": "0.200.26",
4
4
  "description": "Signet native CLI installer wrapper",
5
5
  "type": "module",
6
6
  "bin": {
@@ -65,10 +65,10 @@
65
65
  "access": "public"
66
66
  },
67
67
  "optionalDependencies": {
68
- "signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.200.25/signetai-darwin-arm64-0.200.25.tgz",
69
- "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.200.25/signetai-darwin-x64-0.200.25.tgz",
70
- "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.200.25/signetai-linux-arm64-0.200.25.tgz",
71
- "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.200.25/signetai-linux-x64-0.200.25.tgz",
72
- "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.200.25/signetai-win32-x64-0.200.25.tgz"
68
+ "signetai-darwin-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.200.26/signetai-darwin-arm64-0.200.26.tgz",
69
+ "signetai-darwin-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.200.26/signetai-darwin-x64-0.200.26.tgz",
70
+ "signetai-linux-arm64": "https://github.com/Signet-AI/signetai/releases/download/v0.200.26/signetai-linux-arm64-0.200.26.tgz",
71
+ "signetai-linux-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.200.26/signetai-linux-x64-0.200.26.tgz",
72
+ "signetai-win32-x64": "https://github.com/Signet-AI/signetai/releases/download/v0.200.26/signetai-win32-x64-0.200.26.tgz"
73
73
  }
74
74
  }