@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
@@ -3289,7 +3289,7 @@ __export(keychain_exports, {
3289
3289
  importMnemonic: () => importMnemonic,
3290
3290
  setMasterKey: () => setMasterKey
3291
3291
  });
3292
- import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
3292
+ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2, rename, copyFile } from "fs/promises";
3293
3293
  import { existsSync as existsSync9, statSync as statSync3 } from "fs";
3294
3294
  import { execSync as execSync3 } from "child_process";
3295
3295
  import path8 from "path";
@@ -3324,12 +3324,14 @@ function linuxSecretAvailable() {
3324
3324
  function isRootOnlyTrustedServerKeyFile(keyPath) {
3325
3325
  if (process.platform !== "linux") return false;
3326
3326
  try {
3327
- const uid = typeof os6.userInfo().uid === "number" ? os6.userInfo().uid : -1;
3328
3327
  const st = statSync3(keyPath);
3329
3328
  if (!st.isFile() || (st.mode & 63) !== 0) return false;
3329
+ const uid = typeof os6.userInfo().uid === "number" ? os6.userInfo().uid : -1;
3330
3330
  if (uid === 0) return true;
3331
3331
  const exeOsDir = process.env.EXE_OS_DIR;
3332
- return Boolean(exeOsDir && path8.resolve(keyPath).startsWith(path8.resolve(exeOsDir) + path8.sep));
3332
+ if (exeOsDir && path8.resolve(keyPath).startsWith(path8.resolve(exeOsDir) + path8.sep)) return true;
3333
+ if (!linuxSecretAvailable()) return true;
3334
+ return false;
3333
3335
  } catch {
3334
3336
  return false;
3335
3337
  }
@@ -3479,15 +3481,25 @@ async function writeMachineBoundFileFallback(b64) {
3479
3481
  await mkdir3(dir, { recursive: true });
3480
3482
  const keyPath = getKeyPath();
3481
3483
  const machineKey = deriveMachineKey();
3482
- if (machineKey) {
3483
- const encrypted = encryptWithMachineKey(b64, machineKey);
3484
- await writeFile3(keyPath, encrypted + "\n", "utf-8");
3485
- await chmod2(keyPath, 384);
3486
- return "encrypted";
3484
+ const content = machineKey ? encryptWithMachineKey(b64, machineKey) + "\n" : b64 + "\n";
3485
+ const result = machineKey ? "encrypted" : "plaintext";
3486
+ const tmpPath = keyPath + ".tmp";
3487
+ try {
3488
+ if (existsSync9(keyPath)) {
3489
+ await copyFile(keyPath, keyPath + ".bak").catch(() => {
3490
+ });
3491
+ }
3492
+ await writeFile3(tmpPath, content, "utf-8");
3493
+ await chmod2(tmpPath, 384);
3494
+ await rename(tmpPath, keyPath);
3495
+ } catch (err) {
3496
+ try {
3497
+ await unlink(tmpPath);
3498
+ } catch {
3499
+ }
3500
+ throw err;
3487
3501
  }
3488
- await writeFile3(keyPath, b64 + "\n", "utf-8");
3489
- await chmod2(keyPath, 384);
3490
- return "plaintext";
3502
+ return result;
3491
3503
  }
3492
3504
  async function getMasterKey() {
3493
3505
  let nativeValue = macKeychainGet() ?? linuxSecretGet();
@@ -3554,7 +3566,7 @@ async function getMasterKey() {
3554
3566
  b64Value = content;
3555
3567
  }
3556
3568
  const key = Buffer.from(b64Value, "base64");
3557
- if (!content.startsWith(ENCRYPTED_PREFIX) && isRootOnlyTrustedServerKeyFile(keyPath)) {
3569
+ if (isRootOnlyTrustedServerKeyFile(keyPath)) {
3558
3570
  return key;
3559
3571
  }
3560
3572
  const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);
@@ -4156,6 +4168,15 @@ async function fetchWithRetry(url, init) {
4156
4168
  }
4157
4169
  throw lastError;
4158
4170
  }
4171
+ function migrateEndpoint(endpoint) {
4172
+ if (endpoint === "https://askexe.com/cloud" || endpoint === "https://askexe.com/cloud/") {
4173
+ process.stderr.write(
4174
+ "[cloud-sync] Auto-migrating endpoint from askexe.com/cloud to cloud.askexe.com (bypasses Cloudflare WAF for datacenter IPs)\n"
4175
+ );
4176
+ return "https://cloud.askexe.com";
4177
+ }
4178
+ return endpoint;
4179
+ }
4159
4180
  function assertSecureEndpoint(endpoint) {
4160
4181
  if (endpoint.startsWith("https://")) return;
4161
4182
  if (endpoint.startsWith("http://")) {
@@ -4294,6 +4315,7 @@ async function markCloudReuploadRequired(client = getClient()) {
4294
4315
  await client.execute("INSERT OR REPLACE INTO sync_meta (key, value) VALUES ('cloud_reupload_required', '1')");
4295
4316
  }
4296
4317
  async function cloudSync(config) {
4318
+ config = { ...config, endpoint: migrateEndpoint(config.endpoint) };
4297
4319
  if (!isSyncCryptoInitialized()) {
4298
4320
  try {
4299
4321
  const { getMasterKey: getMasterKey2 } = await Promise.resolve().then(() => (init_keychain(), keychain_exports));
@@ -5404,6 +5426,7 @@ export {
5404
5426
  markCloudReuploadRequired,
5405
5427
  mergeConfig,
5406
5428
  mergeRosterFromRemote,
5429
+ migrateEndpoint,
5407
5430
  pushToPostgres,
5408
5431
  recordRosterDeletion
5409
5432
  };
@@ -175,6 +175,17 @@ function normalizeOrchestration(raw) {
175
175
  const userOrg = raw.orchestration ?? {};
176
176
  raw.orchestration = { ...defaultOrg, ...userOrg };
177
177
  }
178
+ function normalizeCloudEndpoint(raw) {
179
+ const cloud = raw.cloud;
180
+ if (!cloud?.endpoint) return;
181
+ const ep = String(cloud.endpoint);
182
+ if (ep === "https://askexe.com/cloud" || ep === "https://askexe.com/cloud/") {
183
+ cloud.endpoint = "https://cloud.askexe.com";
184
+ process.stderr.write(
185
+ "[config] Auto-migrated cloud endpoint: askexe.com/cloud \u2192 cloud.askexe.com\n"
186
+ );
187
+ }
188
+ }
178
189
  async function loadConfig() {
179
190
  const dir = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? EXE_AI_DIR;
180
191
  await ensurePrivateDir(dir);
@@ -200,6 +211,7 @@ async function loadConfig() {
200
211
  normalizeSessionLifecycle(migratedCfg);
201
212
  normalizeAutoUpdate(migratedCfg);
202
213
  normalizeOrchestration(migratedCfg);
214
+ normalizeCloudEndpoint(migratedCfg);
203
215
  const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
204
216
  if (config.dbPath.startsWith("~")) {
205
217
  config.dbPath = config.dbPath.replace(/^~/, os.homedir());
@@ -228,6 +240,7 @@ function loadConfigSync() {
228
240
  normalizeSessionLifecycle(migratedCfg);
229
241
  normalizeAutoUpdate(migratedCfg);
230
242
  normalizeOrchestration(migratedCfg);
243
+ normalizeCloudEndpoint(migratedCfg);
231
244
  const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
232
245
  if (config.dbPath.startsWith("~")) {
233
246
  config.dbPath = config.dbPath.replace(/^~/, os.homedir());
@@ -183,6 +183,7 @@ __export(agent_config_exports, {
183
183
  clearAgentRuntime: () => clearAgentRuntime,
184
184
  getAgentRuntime: () => getAgentRuntime,
185
185
  loadAgentConfig: () => loadAgentConfig,
186
+ normalizeCcModelName: () => normalizeCcModelName,
186
187
  saveAgentConfig: () => saveAgentConfig,
187
188
  setAgentMcps: () => setAgentMcps,
188
189
  setAgentRuntime: () => setAgentRuntime
@@ -211,6 +212,13 @@ function getAgentRuntime(agentId) {
211
212
  if (orgDefault) return orgDefault;
212
213
  return { runtime: DEFAULT_RUNTIME, model: DEFAULT_MODELS[DEFAULT_RUNTIME] };
213
214
  }
215
+ function normalizeCcModelName(model) {
216
+ let ccModel = model.replace(/(\d+)\.(\d+)/g, "$1-$2");
217
+ if (/claude-(opus|sonnet)-4-[6-9]/.test(ccModel) && !ccModel.includes("[1m]")) {
218
+ ccModel += "[1m]";
219
+ }
220
+ return ccModel;
221
+ }
214
222
  function setAgentRuntime(agentId, runtime, model, reasoning_effort, mcps) {
215
223
  const knownModels = KNOWN_RUNTIMES[runtime];
216
224
  if (!knownModels) {
@@ -581,7 +589,7 @@ init_memory();
581
589
  init_database();
582
590
 
583
591
  // src/lib/keychain.ts
584
- import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
592
+ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2, rename, copyFile } from "fs/promises";
585
593
  import { existsSync as existsSync6, statSync as statSync2 } from "fs";
586
594
  import { execSync as execSync2 } from "child_process";
587
595
  import path5 from "path";
@@ -137,6 +137,17 @@ function normalizeOrchestration(raw) {
137
137
  const userOrg = raw.orchestration ?? {};
138
138
  raw.orchestration = { ...defaultOrg, ...userOrg };
139
139
  }
140
+ function normalizeCloudEndpoint(raw) {
141
+ const cloud = raw.cloud;
142
+ if (!cloud?.endpoint) return;
143
+ const ep = String(cloud.endpoint);
144
+ if (ep === "https://askexe.com/cloud" || ep === "https://askexe.com/cloud/") {
145
+ cloud.endpoint = "https://cloud.askexe.com";
146
+ process.stderr.write(
147
+ "[config] Auto-migrated cloud endpoint: askexe.com/cloud \u2192 cloud.askexe.com\n"
148
+ );
149
+ }
150
+ }
140
151
  async function loadConfig() {
141
152
  const dir = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? EXE_AI_DIR;
142
153
  await ensurePrivateDir(dir);
@@ -162,6 +173,7 @@ async function loadConfig() {
162
173
  normalizeSessionLifecycle(migratedCfg);
163
174
  normalizeAutoUpdate(migratedCfg);
164
175
  normalizeOrchestration(migratedCfg);
176
+ normalizeCloudEndpoint(migratedCfg);
165
177
  const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
166
178
  if (config.dbPath.startsWith("~")) {
167
179
  config.dbPath = config.dbPath.replace(/^~/, os.homedir());
@@ -190,6 +202,7 @@ function loadConfigSync() {
190
202
  normalizeSessionLifecycle(migratedCfg);
191
203
  normalizeAutoUpdate(migratedCfg);
192
204
  normalizeOrchestration(migratedCfg);
205
+ normalizeCloudEndpoint(migratedCfg);
193
206
  const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
194
207
  if (config.dbPath.startsWith("~")) {
195
208
  config.dbPath = config.dbPath.replace(/^~/, os.homedir());
@@ -169,6 +169,7 @@ __export(agent_config_exports, {
169
169
  clearAgentRuntime: () => clearAgentRuntime,
170
170
  getAgentRuntime: () => getAgentRuntime,
171
171
  loadAgentConfig: () => loadAgentConfig,
172
+ normalizeCcModelName: () => normalizeCcModelName,
172
173
  saveAgentConfig: () => saveAgentConfig,
173
174
  setAgentMcps: () => setAgentMcps,
174
175
  setAgentRuntime: () => setAgentRuntime
@@ -197,6 +198,13 @@ function getAgentRuntime(agentId) {
197
198
  if (orgDefault) return orgDefault;
198
199
  return { runtime: DEFAULT_RUNTIME, model: DEFAULT_MODELS[DEFAULT_RUNTIME] };
199
200
  }
201
+ function normalizeCcModelName(model) {
202
+ let ccModel = model.replace(/(\d+)\.(\d+)/g, "$1-$2");
203
+ if (/claude-(opus|sonnet)-4-[6-9]/.test(ccModel) && !ccModel.includes("[1m]")) {
204
+ ccModel += "[1m]";
205
+ }
206
+ return ccModel;
207
+ }
200
208
  function setAgentRuntime(agentId, runtime, model, reasoning_effort, mcps) {
201
209
  const knownModels = KNOWN_RUNTIMES[runtime];
202
210
  if (!knownModels) {