@askexenow/exe-os 0.8.61 → 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 (62) 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 +1654 -397
  6. package/dist/bin/exe-assign.js +0 -1
  7. package/dist/bin/exe-boot.js +61 -84
  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 +49 -78
  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 +1460 -115
  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 +51 -74
  51. package/dist/index.js +7 -8
  52. package/dist/lib/cloud-sync.js +21 -12
  53. package/dist/lib/consolidation.js +0 -1
  54. package/dist/lib/exe-daemon.js +33 -65
  55. package/dist/lib/hybrid-search.js +2 -3
  56. package/dist/lib/keychain.js +19 -58
  57. package/dist/lib/schedules.js +2 -3
  58. package/dist/lib/store.js +0 -1
  59. package/dist/mcp/server.js +29 -30
  60. package/dist/runtime/index.js +2 -3
  61. package/dist/tui/App.js +24 -56
  62. package/package.json +1 -1
@@ -1531,7 +1531,7 @@ ${p.content}`).join("\n\n");
1531
1531
 
1532
1532
  // src/lib/schedules.ts
1533
1533
  init_database();
1534
- import crypto2 from "crypto";
1534
+ import crypto from "crypto";
1535
1535
  import { execSync } from "child_process";
1536
1536
 
1537
1537
  // src/lib/store.ts
@@ -1542,7 +1542,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
1542
1542
  import { existsSync } from "fs";
1543
1543
  import path from "path";
1544
1544
  import os from "os";
1545
- import crypto from "crypto";
1546
1545
  var SERVICE = "exe-mem";
1547
1546
  var ACCOUNT = "master-key";
1548
1547
  function getKeyDir() {
@@ -1779,7 +1778,7 @@ function parseHumanCron(input) {
1779
1778
  async function createSchedule(input) {
1780
1779
  await ensureDb();
1781
1780
  const client = getClient();
1782
- const id = crypto2.randomUUID().slice(0, 8);
1781
+ const id = crypto.randomUUID().slice(0, 8);
1783
1782
  const now = (/* @__PURE__ */ new Date()).toISOString();
1784
1783
  const prompt = input.prompt ?? input.description;
1785
1784
  await client.execute({
package/dist/lib/store.js CHANGED
@@ -1545,7 +1545,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
1545
1545
  import { existsSync } from "fs";
1546
1546
  import path from "path";
1547
1547
  import os from "os";
1548
- import crypto from "crypto";
1549
1548
  var SERVICE = "exe-mem";
1550
1549
  var ACCOUNT = "master-key";
1551
1550
  function getKeyDir() {
@@ -1625,7 +1625,6 @@ import { readFile as readFile2, writeFile as writeFile2, unlink, mkdir as mkdir2
1625
1625
  import { existsSync as existsSync3 } from "fs";
1626
1626
  import path3 from "path";
1627
1627
  import os2 from "os";
1628
- import crypto from "crypto";
1629
1628
  function getKeyDir() {
1630
1629
  return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path3.join(os2.homedir(), ".exe-os");
1631
1630
  }
@@ -2783,7 +2782,7 @@ __export(file_grep_exports, {
2783
2782
  import { execSync as execSync2 } from "child_process";
2784
2783
  import { readFileSync as readFileSync3, readdirSync as readdirSync2, statSync as statSync2, existsSync as existsSync5 } from "fs";
2785
2784
  import path6 from "path";
2786
- import crypto2 from "crypto";
2785
+ import crypto from "crypto";
2787
2786
  function hasRipgrep() {
2788
2787
  if (_hasRg === null) {
2789
2788
  try {
@@ -2816,7 +2815,7 @@ async function grepProjectFiles(query, projectRoot, options) {
2816
2815
  const chunkCtx = getChunkContext(hit.filePath, hit.lineNumber);
2817
2816
  const prefix = chunkCtx ? `[file: ${hit.filePath}:${hit.lineNumber} in ${chunkCtx}]` : `[file: ${hit.filePath}:${hit.lineNumber}]`;
2818
2817
  return {
2819
- id: crypto2.createHash("sha256").update(`${hit.filePath}:${hit.lineNumber}`).digest("hex").slice(0, 36),
2818
+ id: crypto.createHash("sha256").update(`${hit.filePath}:${hit.lineNumber}`).digest("hex").slice(0, 36),
2820
2819
  agent_id: "project",
2821
2820
  agent_role: "file",
2822
2821
  session_id: "file-grep",
@@ -3935,7 +3934,7 @@ var init_plan_limits = __esm({
3935
3934
  });
3936
3935
 
3937
3936
  // src/lib/notifications.ts
3938
- import crypto5 from "crypto";
3937
+ import crypto4 from "crypto";
3939
3938
  import path14 from "path";
3940
3939
  import os3 from "os";
3941
3940
  import {
@@ -3948,7 +3947,7 @@ import {
3948
3947
  async function writeNotification(notification) {
3949
3948
  try {
3950
3949
  const client = getClient();
3951
- const id = crypto5.randomUUID();
3950
+ const id = crypto4.randomUUID();
3952
3951
  const now = (/* @__PURE__ */ new Date()).toISOString();
3953
3952
  await client.execute({
3954
3953
  sql: `INSERT INTO notifications (id, agent_id, agent_role, event, project, summary, task_file, read, created_at)
@@ -4250,7 +4249,7 @@ var init_intercom_queue = __esm({
4250
4249
  });
4251
4250
 
4252
4251
  // src/lib/session-kill-telemetry.ts
4253
- import crypto6 from "crypto";
4252
+ import crypto5 from "crypto";
4254
4253
  async function recordSessionKill(input) {
4255
4254
  try {
4256
4255
  const client = getClient();
@@ -4260,7 +4259,7 @@ async function recordSessionKill(input) {
4260
4259
  ticks_idle, estimated_tokens_saved)
4261
4260
  VALUES (?, ?, ?, ?, ?, ?, ?)`,
4262
4261
  args: [
4263
- crypto6.randomUUID(),
4262
+ crypto5.randomUUID(),
4264
4263
  input.sessionName,
4265
4264
  input.agentId,
4266
4265
  (/* @__PURE__ */ new Date()).toISOString(),
@@ -5244,7 +5243,7 @@ var init_task_scope = __esm({
5244
5243
  });
5245
5244
 
5246
5245
  // src/lib/tasks-crud.ts
5247
- import crypto7 from "crypto";
5246
+ import crypto6 from "crypto";
5248
5247
  import path18 from "path";
5249
5248
  import { execSync as execSync8 } from "child_process";
5250
5249
  import { mkdir as mkdir4, writeFile as writeFile4, appendFile } from "fs/promises";
@@ -5335,7 +5334,7 @@ async function resolveTask(client, identifier, scopeSession) {
5335
5334
  }
5336
5335
  async function createTaskCore(input) {
5337
5336
  const client = getClient();
5338
- const id = crypto7.randomUUID();
5337
+ const id = crypto6.randomUUID();
5339
5338
  const now = (/* @__PURE__ */ new Date()).toISOString();
5340
5339
  const slug = slugify(input.title);
5341
5340
  const taskFile = input.taskFile ?? `exe/${input.assignedTo}/${slug}.md`;
@@ -6079,10 +6078,10 @@ var init_tasks_notify = __esm({
6079
6078
  });
6080
6079
 
6081
6080
  // src/lib/behaviors.ts
6082
- import crypto8 from "crypto";
6081
+ import crypto7 from "crypto";
6083
6082
  async function storeBehavior(opts) {
6084
6083
  const client = getClient();
6085
- const id = crypto8.randomUUID();
6084
+ const id = crypto7.randomUUID();
6086
6085
  const now = (/* @__PURE__ */ new Date()).toISOString();
6087
6086
  await client.execute({
6088
6087
  sql: `INSERT INTO behaviors (id, agent_id, project_name, domain, priority, content, active, created_at, updated_at)
@@ -6139,7 +6138,7 @@ __export(skill_learning_exports, {
6139
6138
  storeTrajectory: () => storeTrajectory,
6140
6139
  sweepTrajectories: () => sweepTrajectories
6141
6140
  });
6142
- import crypto9 from "crypto";
6141
+ import crypto8 from "crypto";
6143
6142
  async function extractTrajectory(taskId, agentId) {
6144
6143
  const client = getClient();
6145
6144
  const result = await client.execute({
@@ -6168,11 +6167,11 @@ async function extractTrajectory(taskId, agentId) {
6168
6167
  return signature;
6169
6168
  }
6170
6169
  function hashSignature(signature) {
6171
- return crypto9.createHash("sha256").update(signature.join("|")).digest("hex").slice(0, 16);
6170
+ return crypto8.createHash("sha256").update(signature.join("|")).digest("hex").slice(0, 16);
6172
6171
  }
6173
6172
  async function storeTrajectory(opts) {
6174
6173
  const client = getClient();
6175
- const id = crypto9.randomUUID();
6174
+ const id = crypto8.randomUUID();
6176
6175
  const now = (/* @__PURE__ */ new Date()).toISOString();
6177
6176
  const signatureHash = hashSignature(opts.signature);
6178
6177
  await client.execute({
@@ -6598,10 +6597,10 @@ var init_tasks = __esm({
6598
6597
  });
6599
6598
 
6600
6599
  // src/lib/messaging.ts
6601
- import crypto10 from "crypto";
6600
+ import crypto9 from "crypto";
6602
6601
  function generateUlid() {
6603
6602
  const timestamp = Date.now().toString(36).padStart(10, "0");
6604
- const random = crypto10.randomBytes(10).toString("hex").slice(0, 16);
6603
+ const random = crypto9.randomBytes(10).toString("hex").slice(0, 16);
6605
6604
  return (timestamp + random).toUpperCase();
6606
6605
  }
6607
6606
  function rowToMessage(row) {
@@ -7892,7 +7891,7 @@ init_store();
7892
7891
  init_active_agent();
7893
7892
  init_plan_limits();
7894
7893
  import { z as z4 } from "zod";
7895
- import crypto3 from "crypto";
7894
+ import crypto2 from "crypto";
7896
7895
  import { writeFileSync as writeFileSync3 } from "fs";
7897
7896
  import path12 from "path";
7898
7897
  function registerStoreMemory(server2) {
@@ -7943,7 +7942,7 @@ function registerStoreMemory(server2) {
7943
7942
  vector = null;
7944
7943
  needsBackfill = true;
7945
7944
  }
7946
- const memoryId = crypto3.randomUUID();
7945
+ const memoryId = crypto2.randomUUID();
7947
7946
  await writeMemory({
7948
7947
  id: memoryId,
7949
7948
  agent_id: agentId,
@@ -7985,7 +7984,7 @@ init_store();
7985
7984
  init_plan_limits();
7986
7985
  init_active_agent();
7987
7986
  import { z as z5 } from "zod";
7988
- import crypto4 from "crypto";
7987
+ import crypto3 from "crypto";
7989
7988
  import { writeFileSync as writeFileSync4 } from "fs";
7990
7989
  import path13 from "path";
7991
7990
  function registerCommitMemory(server2) {
@@ -8034,7 +8033,7 @@ function registerCommitMemory(server2) {
8034
8033
  vector = null;
8035
8034
  needsBackfill = true;
8036
8035
  }
8037
- const memoryId = crypto4.randomUUID();
8036
+ const memoryId = crypto3.randomUUID();
8038
8037
  await assertMemoryLimit();
8039
8038
  await writeMemory({
8040
8039
  id: memoryId,
@@ -9007,10 +9006,10 @@ import { z as z16 } from "zod";
9007
9006
 
9008
9007
  // src/lib/reminders.ts
9009
9008
  init_database();
9010
- import crypto11 from "crypto";
9009
+ import crypto10 from "crypto";
9011
9010
  async function createReminder(text, dueDate) {
9012
9011
  const client = getClient();
9013
- const id = crypto11.randomUUID();
9012
+ const id = crypto10.randomUUID();
9014
9013
  const now = (/* @__PURE__ */ new Date()).toISOString();
9015
9014
  await client.execute({
9016
9015
  sql: `INSERT INTO reminders (id, text, created_at, due_date) VALUES (?, ?, ?, ?)`,
@@ -9496,7 +9495,7 @@ import { z as z23 } from "zod";
9496
9495
  init_database();
9497
9496
  init_embedder();
9498
9497
  init_store();
9499
- import crypto12 from "crypto";
9498
+ import crypto11 from "crypto";
9500
9499
  var WIKI_AGENT_ID = "wiki";
9501
9500
  var WIKI_AGENT_ROLE = "Knowledge";
9502
9501
  var WIKI_TOOL_NAME = "ingest_document";
@@ -9550,7 +9549,7 @@ async function resolveWorkspace(slug_or_id, name) {
9550
9549
  if (existing.rows.length > 0) {
9551
9550
  return rowToWorkspace(existing.rows[0]);
9552
9551
  }
9553
- const id = crypto12.randomUUID();
9552
+ const id = crypto11.randomUUID();
9554
9553
  const now = (/* @__PURE__ */ new Date()).toISOString();
9555
9554
  const resolvedName = name ?? slug_or_id;
9556
9555
  await client.execute({
@@ -9641,13 +9640,13 @@ async function ingestDocument(input) {
9641
9640
  }));
9642
9641
  const vectors = await embedTexts(enrichedChunks.map((c) => c.text));
9643
9642
  const client = getClient();
9644
- const documentId = crypto12.randomUUID();
9643
+ const documentId = crypto11.randomUUID();
9645
9644
  const uploadedAt = (/* @__PURE__ */ new Date()).toISOString();
9646
9645
  const mime = input.mime ?? null;
9647
9646
  const sourceType = input.source_type ?? DEFAULT_SOURCE_TYPE;
9648
9647
  const userId = input.user_id ?? null;
9649
9648
  const documentMetadata = input.document_metadata != null ? JSON.stringify(input.document_metadata) : null;
9650
- const chunkIds = input.chunks.map(() => crypto12.randomUUID());
9649
+ const chunkIds = input.chunks.map(() => crypto11.randomUUID());
9651
9650
  const versions = reserveVersions(input.chunks.length);
9652
9651
  const documentStmt = {
9653
9652
  sql: `INSERT INTO documents
@@ -10317,7 +10316,7 @@ function isScheduledTrigger(trigger) {
10317
10316
  // src/lib/schedules.ts
10318
10317
  init_database();
10319
10318
  init_store();
10320
- import crypto13 from "crypto";
10319
+ import crypto12 from "crypto";
10321
10320
  import { execSync as execSync9 } from "child_process";
10322
10321
  async function ensureDb() {
10323
10322
  if (!isInitialized()) {
@@ -10386,7 +10385,7 @@ function parseHumanCron(input) {
10386
10385
  async function createSchedule(input) {
10387
10386
  await ensureDb();
10388
10387
  const client = getClient();
10389
- const id = crypto13.randomUUID().slice(0, 8);
10388
+ const id = crypto12.randomUUID().slice(0, 8);
10390
10389
  const now = (/* @__PURE__ */ new Date()).toISOString();
10391
10390
  const prompt = input.prompt ?? input.description;
10392
10391
  await client.execute({
@@ -11044,7 +11043,7 @@ init_database();
11044
11043
  import { z as z32 } from "zod";
11045
11044
 
11046
11045
  // src/lib/graph-rag.ts
11047
- import crypto14 from "crypto";
11046
+ import crypto13 from "crypto";
11048
11047
 
11049
11048
  // src/lib/code-chunker.ts
11050
11049
  import ts from "typescript";
@@ -11055,7 +11054,7 @@ function normalizeEntityName(name) {
11055
11054
  }
11056
11055
  function entityId(name, type) {
11057
11056
  const normalized = normalizeEntityName(name);
11058
- return crypto14.createHash("sha256").update(`${normalized}::${type.toLowerCase()}`).digest("hex").slice(0, 16);
11057
+ return crypto13.createHash("sha256").update(`${normalized}::${type.toLowerCase()}`).digest("hex").slice(0, 16);
11059
11058
  }
11060
11059
  async function registerAlias(client, alias, canonicalEntityId) {
11061
11060
  const normalized = normalizeEntityName(alias);
@@ -4160,7 +4160,6 @@ import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4
4160
4160
  import { existsSync as existsSync11 } from "fs";
4161
4161
  import path15 from "path";
4162
4162
  import os7 from "os";
4163
- import crypto6 from "crypto";
4164
4163
  function getKeyDir() {
4165
4164
  return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path15.join(os7.homedir(), ".exe-os");
4166
4165
  }
@@ -5320,7 +5319,7 @@ __export(error_detector_exports, {
5320
5319
  errorFingerprint: () => errorFingerprint,
5321
5320
  isExeOsError: () => isExeOsError
5322
5321
  });
5323
- import crypto7 from "crypto";
5322
+ import crypto6 from "crypto";
5324
5323
  function isRealStderr(stderr) {
5325
5324
  const lines = stderr.trim().split("\n");
5326
5325
  const meaningful = lines.filter(
@@ -5391,7 +5390,7 @@ function classifyError(errorText) {
5391
5390
  }
5392
5391
  function errorFingerprint(toolName, errorText) {
5393
5392
  const normalized = errorText.replace(/\d{4}-\d{2}-\d{2}T[\d:.]+Z/g, "TIMESTAMP").replace(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi, "UUID").replace(/\/Users\/[^\s]+/g, "PATH").replace(/:\d+:\d+/g, ":LINE:COL").slice(0, 200);
5394
- return crypto7.createHash("sha256").update(`${toolName}:${normalized}`).digest("hex").slice(0, 16);
5393
+ return crypto6.createHash("sha256").update(`${toolName}:${normalized}`).digest("hex").slice(0, 16);
5395
5394
  }
5396
5395
  var ERROR_PATTERNS, FILE_CONTENT_TOOLS, STDERR_IGNORE_PATTERNS, USER_ERROR_PATTERNS, SYSTEM_BUG_PATTERNS;
5397
5396
  var init_error_detector = __esm({
package/dist/tui/App.js CHANGED
@@ -7594,7 +7594,6 @@ import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4
7594
7594
  import { existsSync as existsSync12 } from "fs";
7595
7595
  import path22 from "path";
7596
7596
  import os7 from "os";
7597
- import crypto6 from "crypto";
7598
7597
  function getKeyDir() {
7599
7598
  return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path22.join(os7.homedir(), ".exe-os");
7600
7599
  }
@@ -7659,65 +7658,34 @@ async function deleteMasterKey() {
7659
7658
  await unlink(keyPath);
7660
7659
  }
7661
7660
  }
7662
- function exportMnemonic(key) {
7663
- if (key.length !== 32) {
7664
- throw new Error(`Key must be 32 bytes, got ${key.length}`);
7665
- }
7666
- const hash = crypto6.createHash("sha256").update(key).digest();
7667
- const checksumByte = hash[0];
7668
- let bits = "";
7669
- for (const byte of key) {
7670
- bits += byte.toString(2).padStart(8, "0");
7671
- }
7672
- bits += checksumByte.toString(2).padStart(8, "0");
7673
- const words = [];
7674
- let wordlist;
7661
+ async function loadBip39() {
7675
7662
  try {
7676
- const bip39 = __require("bip39");
7677
- wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
7678
- if (!wordlist) throw new Error("no wordlist");
7663
+ return await import("bip39");
7679
7664
  } catch {
7680
- throw new Error("bip39 package required. Install with: npm install bip39");
7665
+ throw new Error(
7666
+ "bip39 package not found. Run: npm install -g bip39\nOr reinstall exe-os: npm install -g @askexenow/exe-os"
7667
+ );
7681
7668
  }
7682
- for (let i = 0; i < 264; i += 11) {
7683
- const index = parseInt(bits.slice(i, i + 11), 2);
7684
- words.push(wordlist[index]);
7669
+ }
7670
+ async function exportMnemonic(key) {
7671
+ if (key.length !== 32) {
7672
+ throw new Error(`Key must be 32 bytes, got ${key.length}`);
7685
7673
  }
7686
- return words.join(" ");
7674
+ const { entropyToMnemonic } = await loadBip39();
7675
+ return entropyToMnemonic(key.toString("hex"));
7687
7676
  }
7688
- function importMnemonic(mnemonic) {
7689
- const words = mnemonic.trim().split(/\s+/);
7677
+ async function importMnemonic(mnemonic) {
7678
+ const trimmed = mnemonic.trim();
7679
+ const words = trimmed.split(/\s+/);
7690
7680
  if (words.length !== 24) {
7691
7681
  throw new Error(`Expected 24 words, got ${words.length}`);
7692
7682
  }
7693
- let wordlist;
7694
- try {
7695
- const bip39 = __require("bip39");
7696
- wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
7697
- if (!wordlist) throw new Error("no wordlist");
7698
- } catch {
7699
- throw new Error("bip39 package required. Install with: npm install bip39");
7700
- }
7701
- let bits = "";
7702
- for (const word of words) {
7703
- const index = wordlist.indexOf(word.toLowerCase());
7704
- if (index === -1) {
7705
- throw new Error(`Invalid BIP39 word: "${word}"`);
7706
- }
7707
- bits += index.toString(2).padStart(11, "0");
7683
+ const { validateMnemonic, mnemonicToEntropy } = await loadBip39();
7684
+ if (!validateMnemonic(trimmed)) {
7685
+ throw new Error("Invalid mnemonic \u2014 check for typos or missing words");
7708
7686
  }
7709
- const entropyBits = bits.slice(0, 256);
7710
- const checksumBits = bits.slice(256, 264);
7711
- const key = Buffer.alloc(32);
7712
- for (let i = 0; i < 32; i++) {
7713
- key[i] = parseInt(entropyBits.slice(i * 8, (i + 1) * 8), 2);
7714
- }
7715
- const hash = crypto6.createHash("sha256").update(key).digest();
7716
- const expectedChecksum = hash[0].toString(2).padStart(8, "0");
7717
- if (checksumBits !== expectedChecksum) {
7718
- throw new Error("Invalid mnemonic checksum");
7719
- }
7720
- return key;
7687
+ const entropy = mnemonicToEntropy(trimmed);
7688
+ return Buffer.from(entropy, "hex");
7721
7689
  }
7722
7690
  var SERVICE, ACCOUNT;
7723
7691
  var init_keychain = __esm({
@@ -7735,16 +7703,16 @@ __export(ws_auth_exports, {
7735
7703
  deriveWsAuthToken: () => deriveWsAuthToken,
7736
7704
  hashAuthToken: () => hashAuthToken
7737
7705
  });
7738
- import crypto7 from "crypto";
7706
+ import crypto6 from "crypto";
7739
7707
  function deriveWsAuthToken(masterKey) {
7740
- return Buffer.from(crypto7.hkdfSync("sha256", masterKey, "", WS_AUTH_HKDF_INFO, 32));
7708
+ return Buffer.from(crypto6.hkdfSync("sha256", masterKey, "", WS_AUTH_HKDF_INFO, 32));
7741
7709
  }
7742
7710
  function deriveOrgId(masterKey) {
7743
- const raw = Buffer.from(crypto7.hkdfSync("sha256", masterKey, "", ORG_ID_HKDF_INFO, 32));
7744
- return crypto7.createHash("sha256").update(raw).digest("hex").slice(0, 32);
7711
+ const raw = Buffer.from(crypto6.hkdfSync("sha256", masterKey, "", ORG_ID_HKDF_INFO, 32));
7712
+ return crypto6.createHash("sha256").update(raw).digest("hex").slice(0, 32);
7745
7713
  }
7746
7714
  function hashAuthToken(token) {
7747
- return crypto7.createHash("sha256").update(token).digest("hex");
7715
+ return crypto6.createHash("sha256").update(token).digest("hex");
7748
7716
  }
7749
7717
  var WS_AUTH_HKDF_INFO, ORG_ID_HKDF_INFO;
7750
7718
  var init_ws_auth = __esm({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.8.61",
3
+ "version": "0.8.63",
4
4
  "description": "AI employee operating system — persistent memory, task management, and multi-agent coordination for Claude Code.",
5
5
  "license": "CC-BY-NC-4.0",
6
6
  "type": "module",