@askexenow/exe-os 0.9.113 → 0.9.115

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 (86) hide show
  1. package/dist/bin/agentic-ontology-backfill.js +36 -12
  2. package/dist/bin/agentic-reflection-backfill.js +36 -12
  3. package/dist/bin/agentic-semantic-label.js +36 -12
  4. package/dist/bin/backfill-conversations.js +36 -12
  5. package/dist/bin/backfill-responses.js +36 -12
  6. package/dist/bin/backfill-vectors.js +36 -12
  7. package/dist/bin/bulk-sync-postgres.js +36 -12
  8. package/dist/bin/cleanup-stale-review-tasks.js +470 -113
  9. package/dist/bin/cli.js +413 -62
  10. package/dist/bin/exe-agent.js +27 -0
  11. package/dist/bin/exe-assign.js +36 -12
  12. package/dist/bin/exe-boot.js +246 -54
  13. package/dist/bin/exe-call.js +8 -0
  14. package/dist/bin/exe-cloud.js +47 -12
  15. package/dist/bin/exe-dispatch.js +348 -53
  16. package/dist/bin/exe-doctor.js +51 -13
  17. package/dist/bin/exe-export-behaviors.js +37 -12
  18. package/dist/bin/exe-forget.js +36 -12
  19. package/dist/bin/exe-gateway.js +348 -53
  20. package/dist/bin/exe-heartbeat.js +471 -113
  21. package/dist/bin/exe-kill.js +36 -12
  22. package/dist/bin/exe-launch-agent.js +117 -18
  23. package/dist/bin/exe-new-employee.js +9 -1
  24. package/dist/bin/exe-pending-messages.js +452 -95
  25. package/dist/bin/exe-pending-notifications.js +452 -95
  26. package/dist/bin/exe-pending-reviews.js +452 -95
  27. package/dist/bin/exe-rename.js +36 -12
  28. package/dist/bin/exe-review.js +36 -12
  29. package/dist/bin/exe-search.js +37 -12
  30. package/dist/bin/exe-session-cleanup.js +348 -53
  31. package/dist/bin/exe-settings.js +12 -0
  32. package/dist/bin/exe-start-codex.js +46 -13
  33. package/dist/bin/exe-start-opencode.js +46 -13
  34. package/dist/bin/exe-status.js +460 -114
  35. package/dist/bin/exe-support.js +12 -0
  36. package/dist/bin/exe-team.js +36 -12
  37. package/dist/bin/git-sweep.js +348 -53
  38. package/dist/bin/graph-backfill.js +36 -12
  39. package/dist/bin/graph-export.js +36 -12
  40. package/dist/bin/install.js +9 -1
  41. package/dist/bin/intercom-check.js +255 -53
  42. package/dist/bin/scan-tasks.js +348 -53
  43. package/dist/bin/setup.js +74 -12
  44. package/dist/bin/shard-migrate.js +36 -12
  45. package/dist/gateway/index.js +348 -53
  46. package/dist/hooks/bug-report-worker.js +348 -53
  47. package/dist/hooks/codex-stop-task-finalizer.js +308 -37
  48. package/dist/hooks/commit-complete.js +348 -53
  49. package/dist/hooks/error-recall.js +37 -12
  50. package/dist/hooks/ingest.js +363 -54
  51. package/dist/hooks/instructions-loaded.js +36 -12
  52. package/dist/hooks/notification.js +36 -12
  53. package/dist/hooks/post-compact.js +426 -72
  54. package/dist/hooks/post-tool-combined.js +501 -146
  55. package/dist/hooks/pre-compact.js +348 -53
  56. package/dist/hooks/pre-tool-use.js +92 -13
  57. package/dist/hooks/prompt-submit.js +348 -53
  58. package/dist/hooks/session-end.js +158 -53
  59. package/dist/hooks/session-start.js +66 -13
  60. package/dist/hooks/stop.js +420 -72
  61. package/dist/hooks/subagent-stop.js +419 -72
  62. package/dist/hooks/summary-worker.js +442 -121
  63. package/dist/index.js +375 -53
  64. package/dist/lib/agent-config.js +8 -0
  65. package/dist/lib/cloud-sync.js +35 -12
  66. package/dist/lib/config.js +13 -0
  67. package/dist/lib/consolidation.js +9 -1
  68. package/dist/lib/embedder.js +13 -0
  69. package/dist/lib/employees.js +8 -0
  70. package/dist/lib/exe-daemon.js +524 -60
  71. package/dist/lib/hybrid-search.js +37 -12
  72. package/dist/lib/keychain.js +25 -13
  73. package/dist/lib/messaging.js +395 -74
  74. package/dist/lib/schedules.js +36 -12
  75. package/dist/lib/skill-learning.js +21 -0
  76. package/dist/lib/store.js +36 -12
  77. package/dist/lib/tasks.js +324 -41
  78. package/dist/lib/tmux-routing.js +324 -41
  79. package/dist/mcp/server.js +374 -54
  80. package/dist/mcp/tools/create-task.js +324 -41
  81. package/dist/mcp/tools/list-tasks.js +406 -57
  82. package/dist/mcp/tools/send-message.js +395 -74
  83. package/dist/mcp/tools/update-task.js +324 -41
  84. package/dist/runtime/index.js +375 -53
  85. package/dist/tui/App.js +377 -55
  86. package/package.json +1 -1
@@ -182,6 +182,17 @@ function normalizeOrchestration(raw) {
182
182
  const userOrg = raw.orchestration ?? {};
183
183
  raw.orchestration = { ...defaultOrg, ...userOrg };
184
184
  }
185
+ function normalizeCloudEndpoint(raw) {
186
+ const cloud = raw.cloud;
187
+ if (!cloud?.endpoint) return;
188
+ const ep = String(cloud.endpoint);
189
+ if (ep === "https://askexe.com/cloud" || ep === "https://askexe.com/cloud/") {
190
+ cloud.endpoint = "https://cloud.askexe.com";
191
+ process.stderr.write(
192
+ "[config] Auto-migrated cloud endpoint: askexe.com/cloud \u2192 cloud.askexe.com\n"
193
+ );
194
+ }
195
+ }
185
196
  async function loadConfig() {
186
197
  const dir = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? EXE_AI_DIR;
187
198
  await ensurePrivateDir(dir);
@@ -207,6 +218,7 @@ async function loadConfig() {
207
218
  normalizeSessionLifecycle(migratedCfg);
208
219
  normalizeAutoUpdate(migratedCfg);
209
220
  normalizeOrchestration(migratedCfg);
221
+ normalizeCloudEndpoint(migratedCfg);
210
222
  const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
211
223
  if (config.dbPath.startsWith("~")) {
212
224
  config.dbPath = config.dbPath.replace(/^~/, os.homedir());
@@ -129,6 +129,17 @@ function normalizeOrchestration(raw) {
129
129
  const userOrg = raw.orchestration ?? {};
130
130
  raw.orchestration = { ...defaultOrg, ...userOrg };
131
131
  }
132
+ function normalizeCloudEndpoint(raw) {
133
+ const cloud = raw.cloud;
134
+ if (!cloud?.endpoint) return;
135
+ const ep = String(cloud.endpoint);
136
+ if (ep === "https://askexe.com/cloud" || ep === "https://askexe.com/cloud/") {
137
+ cloud.endpoint = "https://cloud.askexe.com";
138
+ process.stderr.write(
139
+ "[config] Auto-migrated cloud endpoint: askexe.com/cloud \u2192 cloud.askexe.com\n"
140
+ );
141
+ }
142
+ }
132
143
  async function loadConfig() {
133
144
  const dir = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? EXE_AI_DIR;
134
145
  await ensurePrivateDir(dir);
@@ -154,6 +165,7 @@ async function loadConfig() {
154
165
  normalizeSessionLifecycle(migratedCfg);
155
166
  normalizeAutoUpdate(migratedCfg);
156
167
  normalizeOrchestration(migratedCfg);
168
+ normalizeCloudEndpoint(migratedCfg);
157
169
  const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
158
170
  if (config.dbPath.startsWith("~")) {
159
171
  config.dbPath = config.dbPath.replace(/^~/, os.homedir());
@@ -3327,7 +3339,7 @@ var init_database = __esm({
3327
3339
  });
3328
3340
 
3329
3341
  // src/lib/keychain.ts
3330
- import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
3342
+ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2, rename, copyFile } from "fs/promises";
3331
3343
  import { existsSync as existsSync7, statSync as statSync3 } from "fs";
3332
3344
  import { execSync as execSync3 } from "child_process";
3333
3345
  import path6 from "path";
@@ -3362,12 +3374,14 @@ function linuxSecretAvailable() {
3362
3374
  function isRootOnlyTrustedServerKeyFile(keyPath) {
3363
3375
  if (process.platform !== "linux") return false;
3364
3376
  try {
3365
- const uid = typeof os5.userInfo().uid === "number" ? os5.userInfo().uid : -1;
3366
3377
  const st = statSync3(keyPath);
3367
3378
  if (!st.isFile() || (st.mode & 63) !== 0) return false;
3379
+ const uid = typeof os5.userInfo().uid === "number" ? os5.userInfo().uid : -1;
3368
3380
  if (uid === 0) return true;
3369
3381
  const exeOsDir = process.env.EXE_OS_DIR;
3370
- return Boolean(exeOsDir && path6.resolve(keyPath).startsWith(path6.resolve(exeOsDir) + path6.sep));
3382
+ if (exeOsDir && path6.resolve(keyPath).startsWith(path6.resolve(exeOsDir) + path6.sep)) return true;
3383
+ if (!linuxSecretAvailable()) return true;
3384
+ return false;
3371
3385
  } catch {
3372
3386
  return false;
3373
3387
  }
@@ -3517,15 +3531,25 @@ async function writeMachineBoundFileFallback(b64) {
3517
3531
  await mkdir3(dir, { recursive: true });
3518
3532
  const keyPath = getKeyPath();
3519
3533
  const machineKey = deriveMachineKey();
3520
- if (machineKey) {
3521
- const encrypted = encryptWithMachineKey(b64, machineKey);
3522
- await writeFile3(keyPath, encrypted + "\n", "utf-8");
3523
- await chmod2(keyPath, 384);
3524
- return "encrypted";
3534
+ const content = machineKey ? encryptWithMachineKey(b64, machineKey) + "\n" : b64 + "\n";
3535
+ const result = machineKey ? "encrypted" : "plaintext";
3536
+ const tmpPath = keyPath + ".tmp";
3537
+ try {
3538
+ if (existsSync7(keyPath)) {
3539
+ await copyFile(keyPath, keyPath + ".bak").catch(() => {
3540
+ });
3541
+ }
3542
+ await writeFile3(tmpPath, content, "utf-8");
3543
+ await chmod2(tmpPath, 384);
3544
+ await rename(tmpPath, keyPath);
3545
+ } catch (err) {
3546
+ try {
3547
+ await unlink(tmpPath);
3548
+ } catch {
3549
+ }
3550
+ throw err;
3525
3551
  }
3526
- await writeFile3(keyPath, b64 + "\n", "utf-8");
3527
- await chmod2(keyPath, 384);
3528
- return "plaintext";
3552
+ return result;
3529
3553
  }
3530
3554
  async function getMasterKey() {
3531
3555
  let nativeValue = macKeychainGet() ?? linuxSecretGet();
@@ -3592,7 +3616,7 @@ async function getMasterKey() {
3592
3616
  b64Value = content;
3593
3617
  }
3594
3618
  const key = Buffer.from(b64Value, "base64");
3595
- if (!content.startsWith(ENCRYPTED_PREFIX) && isRootOnlyTrustedServerKeyFile(keyPath)) {
3619
+ if (isRootOnlyTrustedServerKeyFile(keyPath)) {
3596
3620
  return key;
3597
3621
  }
3598
3622
  const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);