@askexenow/exe-os 0.8.62 → 0.8.63

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 (61) hide show
  1. package/dist/bin/backfill-conversations.js +2 -3
  2. package/dist/bin/backfill-responses.js +3 -4
  3. package/dist/bin/backfill-vectors.js +0 -1
  4. package/dist/bin/cleanup-stale-review-tasks.js +0 -1
  5. package/dist/bin/cli.js +47 -79
  6. package/dist/bin/exe-assign.js +0 -1
  7. package/dist/bin/exe-boot.js +40 -72
  8. package/dist/bin/exe-cloud.js +28 -60
  9. package/dist/bin/exe-dispatch.js +0 -1
  10. package/dist/bin/exe-doctor.js +0 -1
  11. package/dist/bin/exe-export-behaviors.js +1 -2
  12. package/dist/bin/exe-forget.js +0 -1
  13. package/dist/bin/exe-gateway.js +16 -17
  14. package/dist/bin/exe-heartbeat.js +1 -2
  15. package/dist/bin/exe-kill.js +2 -3
  16. package/dist/bin/exe-launch-agent.js +1 -2
  17. package/dist/bin/exe-link.js +28 -66
  18. package/dist/bin/exe-pending-messages.js +1 -2
  19. package/dist/bin/exe-pending-notifications.js +0 -1
  20. package/dist/bin/exe-pending-reviews.js +1 -2
  21. package/dist/bin/exe-review.js +0 -1
  22. package/dist/bin/exe-search.js +2 -3
  23. package/dist/bin/exe-session-cleanup.js +4 -5
  24. package/dist/bin/exe-status.js +0 -1
  25. package/dist/bin/exe-team.js +0 -1
  26. package/dist/bin/git-sweep.js +0 -1
  27. package/dist/bin/graph-backfill.js +5 -6
  28. package/dist/bin/graph-export.js +0 -1
  29. package/dist/bin/scan-tasks.js +0 -1
  30. package/dist/bin/setup.js +29 -61
  31. package/dist/bin/shard-migrate.js +0 -1
  32. package/dist/bin/wiki-sync.js +0 -1
  33. package/dist/gateway/index.js +16 -17
  34. package/dist/hooks/bug-report-worker.js +11 -12
  35. package/dist/hooks/commit-complete.js +0 -1
  36. package/dist/hooks/error-recall.js +2 -3
  37. package/dist/hooks/ingest-worker.js +14 -15
  38. package/dist/hooks/instructions-loaded.js +0 -1
  39. package/dist/hooks/notification.js +0 -1
  40. package/dist/hooks/post-compact.js +0 -1
  41. package/dist/hooks/pre-compact.js +2 -3
  42. package/dist/hooks/pre-tool-use.js +0 -1
  43. package/dist/hooks/prompt-ingest-worker.js +2 -3
  44. package/dist/hooks/prompt-submit.js +6 -7
  45. package/dist/hooks/response-ingest-worker.js +2 -3
  46. package/dist/hooks/session-end.js +3 -4
  47. package/dist/hooks/session-start.js +2 -3
  48. package/dist/hooks/stop.js +2 -3
  49. package/dist/hooks/subagent-stop.js +0 -1
  50. package/dist/hooks/summary-worker.js +30 -62
  51. package/dist/index.js +7 -8
  52. package/dist/lib/consolidation.js +0 -1
  53. package/dist/lib/exe-daemon.js +33 -65
  54. package/dist/lib/hybrid-search.js +2 -3
  55. package/dist/lib/keychain.js +19 -58
  56. package/dist/lib/schedules.js +2 -3
  57. package/dist/lib/store.js +0 -1
  58. package/dist/mcp/server.js +29 -30
  59. package/dist/runtime/index.js +2 -3
  60. package/dist/tui/App.js +24 -56
  61. package/package.json +1 -1
@@ -2583,7 +2583,7 @@ var init_embedder = __esm({
2583
2583
  });
2584
2584
 
2585
2585
  // src/lib/notifications.ts
2586
- import crypto2 from "crypto";
2586
+ import crypto from "crypto";
2587
2587
  import path12 from "path";
2588
2588
  import os6 from "os";
2589
2589
  import {
@@ -2596,7 +2596,7 @@ import {
2596
2596
  async function writeNotification(notification) {
2597
2597
  try {
2598
2598
  const client = getClient();
2599
- const id = crypto2.randomUUID();
2599
+ const id = crypto.randomUUID();
2600
2600
  const now = (/* @__PURE__ */ new Date()).toISOString();
2601
2601
  await client.execute({
2602
2602
  sql: `INSERT INTO notifications (id, agent_id, agent_role, event, project, summary, task_file, read, created_at)
@@ -3140,7 +3140,7 @@ var init_worktree = __esm({
3140
3140
  });
3141
3141
 
3142
3142
  // src/bin/exe-session-cleanup.ts
3143
- import crypto3 from "crypto";
3143
+ import crypto2 from "crypto";
3144
3144
  import { execSync as execSync6 } from "child_process";
3145
3145
 
3146
3146
  // src/lib/store.ts
@@ -3152,7 +3152,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
3152
3152
  import { existsSync } from "fs";
3153
3153
  import path from "path";
3154
3154
  import os from "os";
3155
- import crypto from "crypto";
3156
3155
  var SERVICE = "exe-mem";
3157
3156
  var ACCOUNT = "master-key";
3158
3157
  function getKeyDir() {
@@ -3526,7 +3525,7 @@ try {
3526
3525
  } catch {
3527
3526
  }
3528
3527
  await writeMemory({
3529
- id: crypto3.randomUUID(),
3528
+ id: crypto2.randomUUID(),
3530
3529
  agent_id: agentName,
3531
3530
  agent_role: "employee",
3532
3531
  session_id: `cleanup-${Date.now()}`,
@@ -1933,7 +1933,6 @@ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3
1933
1933
  import { existsSync as existsSync3 } from "fs";
1934
1934
  import path3 from "path";
1935
1935
  import os2 from "os";
1936
- import crypto from "crypto";
1937
1936
  var SERVICE = "exe-mem";
1938
1937
  var ACCOUNT = "master-key";
1939
1938
  function getKeyDir() {
@@ -1554,7 +1554,6 @@ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3
1554
1554
  import { existsSync as existsSync3 } from "fs";
1555
1555
  import path3 from "path";
1556
1556
  import os2 from "os";
1557
- import crypto from "crypto";
1558
1557
  var SERVICE = "exe-mem";
1559
1558
  var ACCOUNT = "master-key";
1560
1559
  function getKeyDir() {
@@ -4067,7 +4067,6 @@ import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4
4067
4067
  import { existsSync as existsSync11 } from "fs";
4068
4068
  import path14 from "path";
4069
4069
  import os6 from "os";
4070
- import crypto6 from "crypto";
4071
4070
  function getKeyDir() {
4072
4071
  return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path14.join(os6.homedir(), ".exe-os");
4073
4072
  }
@@ -1543,7 +1543,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
1543
1543
  import { existsSync } from "fs";
1544
1544
  import path from "path";
1545
1545
  import os from "os";
1546
- import crypto from "crypto";
1547
1546
  var SERVICE = "exe-mem";
1548
1547
  var ACCOUNT = "master-key";
1549
1548
  function getKeyDir() {
@@ -1863,7 +1862,7 @@ function vectorToBlob(vector) {
1863
1862
  init_database();
1864
1863
 
1865
1864
  // src/lib/graph-rag.ts
1866
- import crypto2 from "crypto";
1865
+ import crypto from "crypto";
1867
1866
 
1868
1867
  // src/lib/code-chunker.ts
1869
1868
  import ts from "typescript";
@@ -2046,7 +2045,7 @@ function normalizeEntityName(name) {
2046
2045
  }
2047
2046
  function entityId(name, type) {
2048
2047
  const normalized = normalizeEntityName(name);
2049
- return crypto2.createHash("sha256").update(`${normalized}::${type.toLowerCase()}`).digest("hex").slice(0, 16);
2048
+ return crypto.createHash("sha256").update(`${normalized}::${type.toLowerCase()}`).digest("hex").slice(0, 16);
2050
2049
  }
2051
2050
  async function resolveAlias(client, name) {
2052
2051
  const normalized = normalizeEntityName(name);
@@ -2301,7 +2300,7 @@ async function storeExtraction(client, extraction, memoryId, timestamp) {
2301
2300
  const targetAlias = await resolveAlias(client, r.target);
2302
2301
  const sourceId = sourceAlias ?? entityId(r.source, r.sourceType);
2303
2302
  const targetId = targetAlias ?? entityId(r.target, r.targetType);
2304
- const relId = crypto2.randomUUID().slice(0, 16);
2303
+ const relId = crypto.randomUUID().slice(0, 16);
2305
2304
  try {
2306
2305
  await client.execute({
2307
2306
  sql: `INSERT OR IGNORE INTO entities (id, name, type, first_seen, last_seen)
@@ -2347,7 +2346,7 @@ async function storeExtraction(client, extraction, memoryId, timestamp) {
2347
2346
  }
2348
2347
  }
2349
2348
  for (const h of extraction.hyperedges) {
2350
- const hId = crypto2.randomUUID().slice(0, 16);
2349
+ const hId = crypto.randomUUID().slice(0, 16);
2351
2350
  try {
2352
2351
  await client.execute({
2353
2352
  sql: `INSERT OR IGNORE INTO hyperedges (id, label, relation, confidence, timestamp)
@@ -2411,7 +2410,7 @@ async function extractBatch(client, batchSize = 50, model = "claude-haiku-4-5-20
2411
2410
  totalEntities += stored.entitiesStored;
2412
2411
  totalRelationships += stored.relationshipsStored;
2413
2412
  }
2414
- const contentHash = crypto2.createHash("sha256").update(rawContent).digest("hex").slice(0, 32);
2413
+ const contentHash = crypto.createHash("sha256").update(rawContent).digest("hex").slice(0, 32);
2415
2414
  await client.execute({
2416
2415
  sql: "UPDATE memories SET graph_extracted = 1, content_hash = ?, graph_extracted_hash = ? WHERE id = ?",
2417
2416
  args: [contentHash, contentHash, memoryId]
@@ -1547,7 +1547,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
1547
1547
  import { existsSync } from "fs";
1548
1548
  import path from "path";
1549
1549
  import os from "os";
1550
- import crypto from "crypto";
1551
1550
  var SERVICE = "exe-mem";
1552
1551
  var ACCOUNT = "master-key";
1553
1552
  function getKeyDir() {
@@ -4061,7 +4061,6 @@ import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4
4061
4061
  import { existsSync as existsSync11 } from "fs";
4062
4062
  import path14 from "path";
4063
4063
  import os6 from "os";
4064
- import crypto6 from "crypto";
4065
4064
  function getKeyDir() {
4066
4065
  return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path14.join(os6.homedir(), ".exe-os");
4067
4066
  }
package/dist/bin/setup.js CHANGED
@@ -276,7 +276,6 @@ import { readFile as readFile2, writeFile as writeFile2, unlink, mkdir as mkdir2
276
276
  import { existsSync as existsSync2 } from "fs";
277
277
  import path2 from "path";
278
278
  import os2 from "os";
279
- import crypto from "crypto";
280
279
  function getKeyDir() {
281
280
  return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path2.join(os2.homedir(), ".exe-os");
282
281
  }
@@ -341,65 +340,34 @@ async function deleteMasterKey() {
341
340
  await unlink(keyPath);
342
341
  }
343
342
  }
344
- function exportMnemonic(key) {
345
- if (key.length !== 32) {
346
- throw new Error(`Key must be 32 bytes, got ${key.length}`);
347
- }
348
- const hash = crypto.createHash("sha256").update(key).digest();
349
- const checksumByte = hash[0];
350
- let bits = "";
351
- for (const byte of key) {
352
- bits += byte.toString(2).padStart(8, "0");
353
- }
354
- bits += checksumByte.toString(2).padStart(8, "0");
355
- const words = [];
356
- let wordlist;
343
+ async function loadBip39() {
357
344
  try {
358
- const bip39 = __require("bip39");
359
- wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
360
- if (!wordlist) throw new Error("no wordlist");
345
+ return await import("bip39");
361
346
  } catch {
362
- throw new Error("bip39 package required. Install with: npm install bip39");
347
+ throw new Error(
348
+ "bip39 package not found. Run: npm install -g bip39\nOr reinstall exe-os: npm install -g @askexenow/exe-os"
349
+ );
363
350
  }
364
- for (let i = 0; i < 264; i += 11) {
365
- const index = parseInt(bits.slice(i, i + 11), 2);
366
- words.push(wordlist[index]);
351
+ }
352
+ async function exportMnemonic(key) {
353
+ if (key.length !== 32) {
354
+ throw new Error(`Key must be 32 bytes, got ${key.length}`);
367
355
  }
368
- return words.join(" ");
356
+ const { entropyToMnemonic } = await loadBip39();
357
+ return entropyToMnemonic(key.toString("hex"));
369
358
  }
370
- function importMnemonic(mnemonic) {
371
- const words = mnemonic.trim().split(/\s+/);
359
+ async function importMnemonic(mnemonic) {
360
+ const trimmed = mnemonic.trim();
361
+ const words = trimmed.split(/\s+/);
372
362
  if (words.length !== 24) {
373
363
  throw new Error(`Expected 24 words, got ${words.length}`);
374
364
  }
375
- let wordlist;
376
- try {
377
- const bip39 = __require("bip39");
378
- wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
379
- if (!wordlist) throw new Error("no wordlist");
380
- } catch {
381
- throw new Error("bip39 package required. Install with: npm install bip39");
382
- }
383
- let bits = "";
384
- for (const word of words) {
385
- const index = wordlist.indexOf(word.toLowerCase());
386
- if (index === -1) {
387
- throw new Error(`Invalid BIP39 word: "${word}"`);
388
- }
389
- bits += index.toString(2).padStart(11, "0");
390
- }
391
- const entropyBits = bits.slice(0, 256);
392
- const checksumBits = bits.slice(256, 264);
393
- const key = Buffer.alloc(32);
394
- for (let i = 0; i < 32; i++) {
395
- key[i] = parseInt(entropyBits.slice(i * 8, (i + 1) * 8), 2);
396
- }
397
- const hash = crypto.createHash("sha256").update(key).digest();
398
- const expectedChecksum = hash[0].toString(2).padStart(8, "0");
399
- if (checksumBits !== expectedChecksum) {
400
- throw new Error("Invalid mnemonic checksum");
365
+ const { validateMnemonic, mnemonicToEntropy } = await loadBip39();
366
+ if (!validateMnemonic(trimmed)) {
367
+ throw new Error("Invalid mnemonic \u2014 check for typos or missing words");
401
368
  }
402
- return key;
369
+ const entropy = mnemonicToEntropy(trimmed);
370
+ return Buffer.from(entropy, "hex");
403
371
  }
404
372
  var SERVICE, ACCOUNT;
405
373
  var init_keychain = __esm({
@@ -1223,13 +1191,13 @@ __export(crypto_exports, {
1223
1191
  initSyncCrypto: () => initSyncCrypto,
1224
1192
  isSyncCryptoInitialized: () => isSyncCryptoInitialized
1225
1193
  });
1226
- import crypto2 from "crypto";
1194
+ import crypto from "crypto";
1227
1195
  function initSyncCrypto(masterKey) {
1228
1196
  if (masterKey.length !== 32) {
1229
1197
  throw new Error(`Master key must be 32 bytes, got ${masterKey.length}`);
1230
1198
  }
1231
1199
  _syncKey = Buffer.from(
1232
- crypto2.hkdfSync("sha256", masterKey, "", SYNC_HKDF_INFO, 32)
1200
+ crypto.hkdfSync("sha256", masterKey, "", SYNC_HKDF_INFO, 32)
1233
1201
  );
1234
1202
  }
1235
1203
  function isSyncCryptoInitialized() {
@@ -1243,8 +1211,8 @@ function requireSyncKey() {
1243
1211
  }
1244
1212
  function encryptSyncBlob(data) {
1245
1213
  const key = requireSyncKey();
1246
- const iv = crypto2.randomBytes(IV_LENGTH);
1247
- const cipher = crypto2.createCipheriv(ALGORITHM, key, iv);
1214
+ const iv = crypto.randomBytes(IV_LENGTH);
1215
+ const cipher = crypto.createCipheriv(ALGORITHM, key, iv);
1248
1216
  const encrypted = Buffer.concat([cipher.update(data), cipher.final()]);
1249
1217
  const tag = cipher.getAuthTag();
1250
1218
  return Buffer.concat([iv, encrypted, tag]).toString("base64");
@@ -1258,7 +1226,7 @@ function decryptSyncBlob(ciphertext) {
1258
1226
  const iv = combined.subarray(0, IV_LENGTH);
1259
1227
  const tag = combined.subarray(combined.length - TAG_LENGTH);
1260
1228
  const encrypted = combined.subarray(IV_LENGTH, combined.length - TAG_LENGTH);
1261
- const decipher = crypto2.createDecipheriv(ALGORITHM, key, iv);
1229
+ const decipher = crypto.createDecipheriv(ALGORITHM, key, iv);
1262
1230
  decipher.setAuthTag(tag);
1263
1231
  return Buffer.concat([decipher.update(encrypted), decipher.final()]);
1264
1232
  }
@@ -1484,7 +1452,7 @@ __export(cloud_sync_exports, {
1484
1452
  recordRosterDeletion: () => recordRosterDeletion
1485
1453
  });
1486
1454
  import { readFileSync as readFileSync5, writeFileSync as writeFileSync2, existsSync as existsSync7, readdirSync, mkdirSync as mkdirSync2, appendFileSync, unlinkSync as unlinkSync3, openSync as openSync2, closeSync as closeSync2 } from "fs";
1487
- import crypto3 from "crypto";
1455
+ import crypto2 from "crypto";
1488
1456
  import path7 from "path";
1489
1457
  import { homedir } from "os";
1490
1458
  function sqlSafe(v) {
@@ -1867,7 +1835,7 @@ function buildRosterBlob(paths) {
1867
1835
  }
1868
1836
  const deletedNames = consumeRosterDeletions();
1869
1837
  const content = JSON.stringify({ roster, identities, config, deletedNames });
1870
- const hash = crypto3.createHash("sha256").update(content).digest("hex").slice(0, 16);
1838
+ const hash = crypto2.createHash("sha256").update(content).digest("hex").slice(0, 16);
1871
1839
  return { roster, identities, config, deletedNames, version: hash };
1872
1840
  }
1873
1841
  async function cloudPushRoster(config) {
@@ -3976,7 +3944,7 @@ var init_session_wrappers = __esm({
3976
3944
  // src/lib/setup-wizard.ts
3977
3945
  init_config();
3978
3946
  init_keychain();
3979
- import crypto4 from "crypto";
3947
+ import crypto3 from "crypto";
3980
3948
  import { existsSync as existsSync10, mkdirSync as mkdirSync5, readFileSync as readFileSync8, writeFileSync as writeFileSync5, unlinkSync as unlinkSync5 } from "fs";
3981
3949
  import os3 from "os";
3982
3950
  import path10 from "path";
@@ -4148,7 +4116,7 @@ async function runSetupWizard(opts = {}) {
4148
4116
  const { importMnemonic: importMnemonic2 } = await Promise.resolve().then(() => (init_keychain(), keychain_exports));
4149
4117
  const mnemonic = await ask(rl, "Paste your 24-word recovery phrase: ");
4150
4118
  try {
4151
- const key = importMnemonic2(mnemonic);
4119
+ const key = await importMnemonic2(mnemonic);
4152
4120
  await setMasterKey(key);
4153
4121
  log("Master key imported and stored securely.");
4154
4122
  log("");
@@ -4206,7 +4174,7 @@ async function runSetupWizard(opts = {}) {
4206
4174
  log("Encryption key already exists \u2014 skipping generation.");
4207
4175
  } else {
4208
4176
  log("Generating 256-bit encryption key...");
4209
- const key = crypto4.randomBytes(32);
4177
+ const key = crypto3.randomBytes(32);
4210
4178
  await setMasterKey(key);
4211
4179
  log("Encryption key generated and stored securely.");
4212
4180
  }
@@ -1543,7 +1543,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
1543
1543
  import { existsSync } from "fs";
1544
1544
  import path from "path";
1545
1545
  import os from "os";
1546
- import crypto from "crypto";
1547
1546
  var SERVICE = "exe-mem";
1548
1547
  var ACCOUNT = "master-key";
1549
1548
  function getKeyDir() {
@@ -1543,7 +1543,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
1543
1543
  import { existsSync } from "fs";
1544
1544
  import path from "path";
1545
1545
  import os from "os";
1546
- import crypto from "crypto";
1547
1546
  var SERVICE = "exe-mem";
1548
1547
  var ACCOUNT = "master-key";
1549
1548
  function getKeyDir() {
@@ -1916,7 +1916,6 @@ import { readFile as readFile2, writeFile as writeFile2, unlink, mkdir as mkdir2
1916
1916
  import { existsSync as existsSync3 } from "fs";
1917
1917
  import path3 from "path";
1918
1918
  import os2 from "os";
1919
- import crypto from "crypto";
1920
1919
  function getKeyDir() {
1921
1920
  return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path3.join(os2.homedir(), ".exe-os");
1922
1921
  }
@@ -3499,7 +3498,7 @@ var init_plan_limits = __esm({
3499
3498
  });
3500
3499
 
3501
3500
  // src/lib/notifications.ts
3502
- import crypto3 from "crypto";
3501
+ import crypto2 from "crypto";
3503
3502
  import path11 from "path";
3504
3503
  import os6 from "os";
3505
3504
  import {
@@ -3512,7 +3511,7 @@ import {
3512
3511
  async function writeNotification(notification) {
3513
3512
  try {
3514
3513
  const client = getClient();
3515
- const id = crypto3.randomUUID();
3514
+ const id = crypto2.randomUUID();
3516
3515
  const now = (/* @__PURE__ */ new Date()).toISOString();
3517
3516
  await client.execute({
3518
3517
  sql: `INSERT INTO notifications (id, agent_id, agent_role, event, project, summary, task_file, read, created_at)
@@ -3551,7 +3550,7 @@ var init_notifications = __esm({
3551
3550
  });
3552
3551
 
3553
3552
  // src/lib/session-kill-telemetry.ts
3554
- import crypto4 from "crypto";
3553
+ import crypto3 from "crypto";
3555
3554
  async function recordSessionKill(input) {
3556
3555
  try {
3557
3556
  const client = getClient();
@@ -3561,7 +3560,7 @@ async function recordSessionKill(input) {
3561
3560
  ticks_idle, estimated_tokens_saved)
3562
3561
  VALUES (?, ?, ?, ?, ?, ?, ?)`,
3563
3562
  args: [
3564
- crypto4.randomUUID(),
3563
+ crypto3.randomUUID(),
3565
3564
  input.sessionName,
3566
3565
  input.agentId,
3567
3566
  (/* @__PURE__ */ new Date()).toISOString(),
@@ -3609,7 +3608,7 @@ var init_task_scope = __esm({
3609
3608
  });
3610
3609
 
3611
3610
  // src/lib/tasks-crud.ts
3612
- import crypto5 from "crypto";
3611
+ import crypto4 from "crypto";
3613
3612
  import path12 from "path";
3614
3613
  import { execSync as execSync4 } from "child_process";
3615
3614
  import { mkdir as mkdir4, writeFile as writeFile4, appendFile } from "fs/promises";
@@ -3700,7 +3699,7 @@ async function resolveTask(client, identifier, scopeSession) {
3700
3699
  }
3701
3700
  async function createTaskCore(input) {
3702
3701
  const client = getClient();
3703
- const id = crypto5.randomUUID();
3702
+ const id = crypto4.randomUUID();
3704
3703
  const now = (/* @__PURE__ */ new Date()).toISOString();
3705
3704
  const slug = slugify(input.title);
3706
3705
  const taskFile = input.taskFile ?? `exe/${input.assignedTo}/${slug}.md`;
@@ -4486,10 +4485,10 @@ var init_tasks_notify = __esm({
4486
4485
  });
4487
4486
 
4488
4487
  // src/lib/behaviors.ts
4489
- import crypto6 from "crypto";
4488
+ import crypto5 from "crypto";
4490
4489
  async function storeBehavior(opts) {
4491
4490
  const client = getClient();
4492
- const id = crypto6.randomUUID();
4491
+ const id = crypto5.randomUUID();
4493
4492
  const now = (/* @__PURE__ */ new Date()).toISOString();
4494
4493
  await client.execute({
4495
4494
  sql: `INSERT INTO behaviors (id, agent_id, project_name, domain, priority, content, active, created_at, updated_at)
@@ -4518,7 +4517,7 @@ __export(skill_learning_exports, {
4518
4517
  storeTrajectory: () => storeTrajectory,
4519
4518
  sweepTrajectories: () => sweepTrajectories
4520
4519
  });
4521
- import crypto7 from "crypto";
4520
+ import crypto6 from "crypto";
4522
4521
  async function extractTrajectory(taskId, agentId) {
4523
4522
  const client = getClient();
4524
4523
  const result = await client.execute({
@@ -4547,11 +4546,11 @@ async function extractTrajectory(taskId, agentId) {
4547
4546
  return signature;
4548
4547
  }
4549
4548
  function hashSignature(signature) {
4550
- return crypto7.createHash("sha256").update(signature.join("|")).digest("hex").slice(0, 16);
4549
+ return crypto6.createHash("sha256").update(signature.join("|")).digest("hex").slice(0, 16);
4551
4550
  }
4552
4551
  async function storeTrajectory(opts) {
4553
4552
  const client = getClient();
4554
- const id = crypto7.randomUUID();
4553
+ const id = crypto6.randomUUID();
4555
4554
  const now = (/* @__PURE__ */ new Date()).toISOString();
4556
4555
  const signatureHash = hashSignature(opts.signature);
4557
4556
  await client.execute({
@@ -5929,10 +5928,10 @@ __export(messaging_exports, {
5929
5928
  sendMessage: () => sendMessage,
5930
5929
  setWsClientSend: () => setWsClientSend
5931
5930
  });
5932
- import crypto8 from "crypto";
5931
+ import crypto7 from "crypto";
5933
5932
  function generateUlid() {
5934
5933
  const timestamp = Date.now().toString(36).padStart(10, "0");
5935
- const random = crypto8.randomBytes(10).toString("hex").slice(0, 16);
5934
+ const random = crypto7.randomBytes(10).toString("hex").slice(0, 16);
5936
5935
  return (timestamp + random).toUpperCase();
5937
5936
  }
5938
5937
  function rowToMessage(row) {
@@ -6355,11 +6354,11 @@ init_crm_bridge();
6355
6354
 
6356
6355
  // src/lib/pipeline-router.ts
6357
6356
  init_database();
6358
- import crypto2 from "crypto";
6357
+ import crypto from "crypto";
6359
6358
  async function sinkConversationStore(msg, agentResponse, agentName) {
6360
6359
  try {
6361
6360
  const client = getClient();
6362
- const id = crypto2.randomUUID();
6361
+ const id = crypto.randomUUID();
6363
6362
  const mediaJson = msg.media ? JSON.stringify(msg.media) : null;
6364
6363
  await client.execute({
6365
6364
  sql: `INSERT INTO conversations
@@ -6409,7 +6408,7 @@ async function sinkMemory(msg, agentResponse, agentName) {
6409
6408
  ].filter(Boolean).join("\n");
6410
6409
  const vector = await embed2(rawText);
6411
6410
  await writeMemory2({
6412
- id: crypto2.randomUUID(),
6411
+ id: crypto.randomUUID(),
6413
6412
  agent_id: agentName ?? "gateway",
6414
6413
  agent_role: "gateway",
6415
6414
  session_id: `gateway-${msg.platform}`,
@@ -1593,7 +1593,7 @@ ${p.content}`).join("\n\n");
1593
1593
  });
1594
1594
 
1595
1595
  // src/lib/notifications.ts
1596
- import crypto2 from "crypto";
1596
+ import crypto from "crypto";
1597
1597
  import path4 from "path";
1598
1598
  import os3 from "os";
1599
1599
  import {
@@ -1606,7 +1606,7 @@ import {
1606
1606
  async function writeNotification(notification) {
1607
1607
  try {
1608
1608
  const client = getClient();
1609
- const id = crypto2.randomUUID();
1609
+ const id = crypto.randomUUID();
1610
1610
  const now = (/* @__PURE__ */ new Date()).toISOString();
1611
1611
  await client.execute({
1612
1612
  sql: `INSERT INTO notifications (id, agent_id, agent_role, event, project, summary, task_file, read, created_at)
@@ -2181,7 +2181,7 @@ var init_plan_limits = __esm({
2181
2181
  });
2182
2182
 
2183
2183
  // src/lib/session-kill-telemetry.ts
2184
- import crypto3 from "crypto";
2184
+ import crypto2 from "crypto";
2185
2185
  async function recordSessionKill(input) {
2186
2186
  try {
2187
2187
  const client = getClient();
@@ -2191,7 +2191,7 @@ async function recordSessionKill(input) {
2191
2191
  ticks_idle, estimated_tokens_saved)
2192
2192
  VALUES (?, ?, ?, ?, ?, ?, ?)`,
2193
2193
  args: [
2194
- crypto3.randomUUID(),
2194
+ crypto2.randomUUID(),
2195
2195
  input.sessionName,
2196
2196
  input.agentId,
2197
2197
  (/* @__PURE__ */ new Date()).toISOString(),
@@ -3175,7 +3175,7 @@ var init_task_scope = __esm({
3175
3175
  });
3176
3176
 
3177
3177
  // src/lib/tasks-crud.ts
3178
- import crypto4 from "crypto";
3178
+ import crypto3 from "crypto";
3179
3179
  import path11 from "path";
3180
3180
  import { execSync as execSync5 } from "child_process";
3181
3181
  import { mkdir as mkdir4, writeFile as writeFile4, appendFile } from "fs/promises";
@@ -3266,7 +3266,7 @@ async function resolveTask(client, identifier, scopeSession) {
3266
3266
  }
3267
3267
  async function createTaskCore(input) {
3268
3268
  const client = getClient();
3269
- const id = crypto4.randomUUID();
3269
+ const id = crypto3.randomUUID();
3270
3270
  const now = (/* @__PURE__ */ new Date()).toISOString();
3271
3271
  const slug = slugify(input.title);
3272
3272
  const taskFile = input.taskFile ?? `exe/${input.assignedTo}/${slug}.md`;
@@ -4052,10 +4052,10 @@ var init_tasks_notify = __esm({
4052
4052
  });
4053
4053
 
4054
4054
  // src/lib/behaviors.ts
4055
- import crypto5 from "crypto";
4055
+ import crypto4 from "crypto";
4056
4056
  async function storeBehavior(opts) {
4057
4057
  const client = getClient();
4058
- const id = crypto5.randomUUID();
4058
+ const id = crypto4.randomUUID();
4059
4059
  const now = (/* @__PURE__ */ new Date()).toISOString();
4060
4060
  await client.execute({
4061
4061
  sql: `INSERT INTO behaviors (id, agent_id, project_name, domain, priority, content, active, created_at, updated_at)
@@ -4084,7 +4084,7 @@ __export(skill_learning_exports, {
4084
4084
  storeTrajectory: () => storeTrajectory,
4085
4085
  sweepTrajectories: () => sweepTrajectories
4086
4086
  });
4087
- import crypto6 from "crypto";
4087
+ import crypto5 from "crypto";
4088
4088
  async function extractTrajectory(taskId, agentId) {
4089
4089
  const client = getClient();
4090
4090
  const result = await client.execute({
@@ -4113,11 +4113,11 @@ async function extractTrajectory(taskId, agentId) {
4113
4113
  return signature;
4114
4114
  }
4115
4115
  function hashSignature(signature) {
4116
- return crypto6.createHash("sha256").update(signature.join("|")).digest("hex").slice(0, 16);
4116
+ return crypto5.createHash("sha256").update(signature.join("|")).digest("hex").slice(0, 16);
4117
4117
  }
4118
4118
  async function storeTrajectory(opts) {
4119
4119
  const client = getClient();
4120
- const id = crypto6.randomUUID();
4120
+ const id = crypto5.randomUUID();
4121
4121
  const now = (/* @__PURE__ */ new Date()).toISOString();
4122
4122
  const signatureHash = hashSignature(opts.signature);
4123
4123
  await client.execute({
@@ -4550,7 +4550,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
4550
4550
  import { existsSync } from "fs";
4551
4551
  import path from "path";
4552
4552
  import os from "os";
4553
- import crypto from "crypto";
4554
4553
  var SERVICE = "exe-mem";
4555
4554
  var ACCOUNT = "master-key";
4556
4555
  function getKeyDir() {
@@ -4066,7 +4066,6 @@ import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4
4066
4066
  import { existsSync as existsSync11 } from "fs";
4067
4067
  import path14 from "path";
4068
4068
  import os6 from "os";
4069
- import crypto6 from "crypto";
4070
4069
  function getKeyDir() {
4071
4070
  return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path14.join(os6.homedir(), ".exe-os");
4072
4071
  }
@@ -1185,7 +1185,6 @@ import { readFile as readFile2, writeFile as writeFile2, unlink, mkdir as mkdir2
1185
1185
  import { existsSync as existsSync2 } from "fs";
1186
1186
  import path2 from "path";
1187
1187
  import os2 from "os";
1188
- import crypto2 from "crypto";
1189
1188
  function getKeyDir() {
1190
1189
  return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path2.join(os2.homedir(), ".exe-os");
1191
1190
  }
@@ -2752,7 +2751,7 @@ __export(file_grep_exports, {
2752
2751
  import { execSync as execSync2 } from "child_process";
2753
2752
  import { readFileSync as readFileSync3, readdirSync as readdirSync2, statSync as statSync2, existsSync as existsSync5 } from "fs";
2754
2753
  import path6 from "path";
2755
- import crypto3 from "crypto";
2754
+ import crypto2 from "crypto";
2756
2755
  function hasRipgrep() {
2757
2756
  if (_hasRg === null) {
2758
2757
  try {
@@ -2785,7 +2784,7 @@ async function grepProjectFiles(query, projectRoot, options) {
2785
2784
  const chunkCtx = getChunkContext(hit.filePath, hit.lineNumber);
2786
2785
  const prefix = chunkCtx ? `[file: ${hit.filePath}:${hit.lineNumber} in ${chunkCtx}]` : `[file: ${hit.filePath}:${hit.lineNumber}]`;
2787
2786
  return {
2788
- id: crypto3.createHash("sha256").update(`${hit.filePath}:${hit.lineNumber}`).digest("hex").slice(0, 36),
2787
+ id: crypto2.createHash("sha256").update(`${hit.filePath}:${hit.lineNumber}`).digest("hex").slice(0, 36),
2789
2788
  agent_id: "project",
2790
2789
  agent_role: "file",
2791
2790
  session_id: "file-grep",