@askexenow/exe-os 0.8.85 → 0.8.86

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 (57) hide show
  1. package/dist/bin/cleanup-stale-review-tasks.js +57 -19
  2. package/dist/bin/cli.js +507 -337
  3. package/dist/bin/exe-agent-config.js +242 -0
  4. package/dist/bin/exe-agent.js +3 -3
  5. package/dist/bin/exe-boot.js +344 -346
  6. package/dist/bin/exe-dispatch.js +375 -250
  7. package/dist/bin/exe-forget.js +5 -1
  8. package/dist/bin/exe-gateway.js +260 -135
  9. package/dist/bin/exe-healthcheck.js +133 -1
  10. package/dist/bin/exe-heartbeat.js +72 -31
  11. package/dist/bin/exe-link.js +25 -2
  12. package/dist/bin/exe-new-employee.js +22 -0
  13. package/dist/bin/exe-pending-messages.js +55 -17
  14. package/dist/bin/exe-pending-reviews.js +57 -19
  15. package/dist/bin/exe-search.js +6 -2
  16. package/dist/bin/exe-session-cleanup.js +260 -135
  17. package/dist/bin/exe-start-codex.js +2598 -0
  18. package/dist/bin/exe-start.sh +15 -3
  19. package/dist/bin/exe-status.js +57 -19
  20. package/dist/bin/git-sweep.js +391 -266
  21. package/dist/bin/install.js +22 -0
  22. package/dist/bin/scan-tasks.js +394 -269
  23. package/dist/bin/setup.js +47 -2
  24. package/dist/gateway/index.js +257 -132
  25. package/dist/hooks/bug-report-worker.js +242 -117
  26. package/dist/hooks/commit-complete.js +389 -264
  27. package/dist/hooks/error-recall.js +6 -2
  28. package/dist/hooks/ingest-worker.js +314 -193
  29. package/dist/hooks/post-compact.js +84 -46
  30. package/dist/hooks/pre-compact.js +272 -147
  31. package/dist/hooks/pre-tool-use.js +104 -66
  32. package/dist/hooks/prompt-submit.js +126 -66
  33. package/dist/hooks/session-end.js +277 -152
  34. package/dist/hooks/session-start.js +70 -28
  35. package/dist/hooks/stop.js +90 -52
  36. package/dist/hooks/subagent-stop.js +84 -46
  37. package/dist/hooks/summary-worker.js +175 -114
  38. package/dist/index.js +296 -171
  39. package/dist/lib/agent-config.js +167 -0
  40. package/dist/lib/cloud-sync.js +25 -2
  41. package/dist/lib/exe-daemon.js +338 -213
  42. package/dist/lib/hybrid-search.js +7 -2
  43. package/dist/lib/messaging.js +95 -39
  44. package/dist/lib/runtime-table.js +16 -0
  45. package/dist/lib/session-wrappers.js +22 -0
  46. package/dist/lib/tasks.js +242 -117
  47. package/dist/lib/tmux-routing.js +314 -189
  48. package/dist/mcp/server.js +573 -274
  49. package/dist/mcp/tools/create-task.js +260 -135
  50. package/dist/mcp/tools/list-tasks.js +68 -30
  51. package/dist/mcp/tools/send-message.js +100 -44
  52. package/dist/mcp/tools/update-task.js +123 -67
  53. package/dist/runtime/index.js +276 -151
  54. package/dist/tui/App.js +479 -354
  55. package/package.json +1 -1
  56. package/src/commands/exe/agent-config.md +27 -0
  57. package/src/commands/exe/cc-doctor.md +10 -0
@@ -424,17 +424,53 @@ var init_provider_table = __esm({
424
424
  }
425
425
  });
426
426
 
427
- // src/lib/intercom-queue.ts
428
- import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, renameSync as renameSync3, existsSync as existsSync3, mkdirSync as mkdirSync2 } from "fs";
427
+ // src/lib/runtime-table.ts
428
+ var RUNTIME_TABLE;
429
+ var init_runtime_table = __esm({
430
+ "src/lib/runtime-table.ts"() {
431
+ "use strict";
432
+ RUNTIME_TABLE = {
433
+ codex: {
434
+ binary: "codex",
435
+ launchMode: "exec",
436
+ autoApproveFlag: "--full-auto",
437
+ inlineFlag: "--no-alt-screen",
438
+ apiKeyEnv: "OPENAI_API_KEY",
439
+ defaultModel: "gpt-5.4"
440
+ }
441
+ };
442
+ }
443
+ });
444
+
445
+ // src/lib/agent-config.ts
446
+ import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, existsSync as existsSync3, mkdirSync as mkdirSync2 } from "fs";
429
447
  import path5 from "path";
448
+ var AGENT_CONFIG_PATH, DEFAULT_MODELS;
449
+ var init_agent_config = __esm({
450
+ "src/lib/agent-config.ts"() {
451
+ "use strict";
452
+ init_config();
453
+ init_runtime_table();
454
+ AGENT_CONFIG_PATH = path5.join(EXE_AI_DIR, "agent-config.json");
455
+ DEFAULT_MODELS = {
456
+ claude: "claude-opus-4",
457
+ codex: RUNTIME_TABLE.codex?.defaultModel ?? "gpt-5.4",
458
+ opencode: "minimax-m2.7"
459
+ };
460
+ }
461
+ });
462
+
463
+ // src/lib/intercom-queue.ts
464
+ import { readFileSync as readFileSync5, writeFileSync as writeFileSync4, renameSync as renameSync3, existsSync as existsSync4, mkdirSync as mkdirSync3 } from "fs";
465
+ import path6 from "path";
430
466
  import os4 from "os";
431
467
  var QUEUE_PATH, TTL_MS, INTERCOM_LOG;
432
468
  var init_intercom_queue = __esm({
433
469
  "src/lib/intercom-queue.ts"() {
434
470
  "use strict";
435
- QUEUE_PATH = path5.join(os4.homedir(), ".exe-os", "intercom-queue.json");
471
+ QUEUE_PATH = path6.join(os4.homedir(), ".exe-os", "intercom-queue.json");
436
472
  TTL_MS = 60 * 60 * 1e3;
437
- INTERCOM_LOG = path5.join(os4.homedir(), ".exe-os", "intercom.log");
473
+ INTERCOM_LOG = path6.join(os4.homedir(), ".exe-os", "intercom.log");
438
474
  }
439
475
  });
440
476
 
@@ -497,8 +533,8 @@ var init_db_retry = __esm({
497
533
  import net from "net";
498
534
  import { spawn } from "child_process";
499
535
  import { randomUUID } from "crypto";
500
- import { existsSync as existsSync4, unlinkSync as unlinkSync3, readFileSync as readFileSync5, openSync, closeSync, statSync } from "fs";
501
- import path6 from "path";
536
+ import { existsSync as existsSync5, unlinkSync as unlinkSync3, readFileSync as readFileSync6, openSync, closeSync, statSync } from "fs";
537
+ import path7 from "path";
502
538
  import { fileURLToPath } from "url";
503
539
  function handleData(chunk) {
504
540
  _buffer += chunk.toString();
@@ -526,9 +562,9 @@ function handleData(chunk) {
526
562
  }
527
563
  }
528
564
  function cleanupStaleFiles() {
529
- if (existsSync4(PID_PATH)) {
565
+ if (existsSync5(PID_PATH)) {
530
566
  try {
531
- const pid = parseInt(readFileSync5(PID_PATH, "utf8").trim(), 10);
567
+ const pid = parseInt(readFileSync6(PID_PATH, "utf8").trim(), 10);
532
568
  if (pid > 0) {
533
569
  try {
534
570
  process.kill(pid, 0);
@@ -549,11 +585,11 @@ function cleanupStaleFiles() {
549
585
  }
550
586
  }
551
587
  function findPackageRoot() {
552
- let dir = path6.dirname(fileURLToPath(import.meta.url));
553
- const { root } = path6.parse(dir);
588
+ let dir = path7.dirname(fileURLToPath(import.meta.url));
589
+ const { root } = path7.parse(dir);
554
590
  while (dir !== root) {
555
- if (existsSync4(path6.join(dir, "package.json"))) return dir;
556
- dir = path6.dirname(dir);
591
+ if (existsSync5(path7.join(dir, "package.json"))) return dir;
592
+ dir = path7.dirname(dir);
557
593
  }
558
594
  return null;
559
595
  }
@@ -563,8 +599,8 @@ function spawnDaemon() {
563
599
  process.stderr.write("[exed-client] WARN: cannot find package root\n");
564
600
  return;
565
601
  }
566
- const daemonPath = path6.join(pkgRoot, "dist", "lib", "exe-daemon.js");
567
- if (!existsSync4(daemonPath)) {
602
+ const daemonPath = path7.join(pkgRoot, "dist", "lib", "exe-daemon.js");
603
+ if (!existsSync5(daemonPath)) {
568
604
  process.stderr.write(`[exed-client] WARN: daemon script not found at ${daemonPath}
569
605
  `);
570
606
  return;
@@ -572,7 +608,7 @@ function spawnDaemon() {
572
608
  const resolvedPath = daemonPath;
573
609
  process.stderr.write(`[exed-client] Spawning daemon: ${resolvedPath}
574
610
  `);
575
- const logPath = path6.join(path6.dirname(SOCKET_PATH), "exed.log");
611
+ const logPath = path7.join(path7.dirname(SOCKET_PATH), "exed.log");
576
612
  let stderrFd = "ignore";
577
613
  try {
578
614
  stderrFd = openSync(logPath, "a");
@@ -717,9 +753,9 @@ var init_exe_daemon_client = __esm({
717
753
  "src/lib/exe-daemon-client.ts"() {
718
754
  "use strict";
719
755
  init_config();
720
- SOCKET_PATH = process.env.EXE_DAEMON_SOCK ?? process.env.EXE_EMBED_SOCK ?? path6.join(EXE_AI_DIR, "exed.sock");
721
- PID_PATH = process.env.EXE_DAEMON_PID ?? process.env.EXE_EMBED_PID ?? path6.join(EXE_AI_DIR, "exed.pid");
722
- SPAWN_LOCK_PATH = path6.join(EXE_AI_DIR, "exed-spawn.lock");
756
+ SOCKET_PATH = process.env.EXE_DAEMON_SOCK ?? process.env.EXE_EMBED_SOCK ?? path7.join(EXE_AI_DIR, "exed.sock");
757
+ PID_PATH = process.env.EXE_DAEMON_PID ?? process.env.EXE_EMBED_PID ?? path7.join(EXE_AI_DIR, "exed.pid");
758
+ SPAWN_LOCK_PATH = path7.join(EXE_AI_DIR, "exed-spawn.lock");
723
759
  SPAWN_LOCK_STALE_MS = 3e4;
724
760
  CONNECT_TIMEOUT_MS = 15e3;
725
761
  REQUEST_TIMEOUT_MS = 3e4;
@@ -1944,24 +1980,24 @@ var init_database = __esm({
1944
1980
  });
1945
1981
 
1946
1982
  // src/lib/license.ts
1947
- import { readFileSync as readFileSync6, writeFileSync as writeFileSync4, existsSync as existsSync5, mkdirSync as mkdirSync3 } from "fs";
1983
+ import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, existsSync as existsSync6, mkdirSync as mkdirSync4 } from "fs";
1948
1984
  import { randomUUID as randomUUID2 } from "crypto";
1949
- import path7 from "path";
1985
+ import path8 from "path";
1950
1986
  import { jwtVerify, importSPKI } from "jose";
1951
1987
  var LICENSE_PATH, CACHE_PATH, DEVICE_ID_PATH;
1952
1988
  var init_license = __esm({
1953
1989
  "src/lib/license.ts"() {
1954
1990
  "use strict";
1955
1991
  init_config();
1956
- LICENSE_PATH = path7.join(EXE_AI_DIR, "license.key");
1957
- CACHE_PATH = path7.join(EXE_AI_DIR, "license-cache.json");
1958
- DEVICE_ID_PATH = path7.join(EXE_AI_DIR, "device-id");
1992
+ LICENSE_PATH = path8.join(EXE_AI_DIR, "license.key");
1993
+ CACHE_PATH = path8.join(EXE_AI_DIR, "license-cache.json");
1994
+ DEVICE_ID_PATH = path8.join(EXE_AI_DIR, "device-id");
1959
1995
  }
1960
1996
  });
1961
1997
 
1962
1998
  // src/lib/plan-limits.ts
1963
- import { readFileSync as readFileSync7, existsSync as existsSync6 } from "fs";
1964
- import path8 from "path";
1999
+ import { readFileSync as readFileSync8, existsSync as existsSync7 } from "fs";
2000
+ import path9 from "path";
1965
2001
  var CACHE_PATH2;
1966
2002
  var init_plan_limits = __esm({
1967
2003
  "src/lib/plan-limits.ts"() {
@@ -1970,13 +2006,13 @@ var init_plan_limits = __esm({
1970
2006
  init_employees();
1971
2007
  init_license();
1972
2008
  init_config();
1973
- CACHE_PATH2 = path8.join(EXE_AI_DIR, "license-cache.json");
2009
+ CACHE_PATH2 = path9.join(EXE_AI_DIR, "license-cache.json");
1974
2010
  }
1975
2011
  });
1976
2012
 
1977
2013
  // src/lib/tmux-routing.ts
1978
- import { readFileSync as readFileSync8, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4, existsSync as existsSync7, appendFileSync } from "fs";
1979
- import path9 from "path";
2014
+ import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync8, appendFileSync } from "fs";
2015
+ import path10 from "path";
1980
2016
  import os5 from "os";
1981
2017
  import { fileURLToPath as fileURLToPath2 } from "url";
1982
2018
  function getMySession() {
@@ -1990,7 +2026,7 @@ function extractRootExe(name) {
1990
2026
  }
1991
2027
  function getParentExe(sessionKey) {
1992
2028
  try {
1993
- const data = JSON.parse(readFileSync8(path9.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`), "utf8"));
2029
+ const data = JSON.parse(readFileSync9(path10.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`), "utf8"));
1994
2030
  return data.parentExe || null;
1995
2031
  } catch {
1996
2032
  return null;
@@ -2019,13 +2055,15 @@ var init_tmux_routing = __esm({
2019
2055
  init_cc_agent_support();
2020
2056
  init_mcp_prefix();
2021
2057
  init_provider_table();
2058
+ init_agent_config();
2059
+ init_runtime_table();
2022
2060
  init_intercom_queue();
2023
2061
  init_plan_limits();
2024
2062
  init_employees();
2025
- SPAWN_LOCK_DIR = path9.join(os5.homedir(), ".exe-os", "spawn-locks");
2026
- SESSION_CACHE = path9.join(os5.homedir(), ".exe-os", "session-cache");
2027
- INTERCOM_LOG2 = path9.join(os5.homedir(), ".exe-os", "intercom.log");
2028
- DEBOUNCE_FILE = path9.join(SESSION_CACHE, "intercom-debounce.json");
2063
+ SPAWN_LOCK_DIR = path10.join(os5.homedir(), ".exe-os", "spawn-locks");
2064
+ SESSION_CACHE = path10.join(os5.homedir(), ".exe-os", "session-cache");
2065
+ INTERCOM_LOG2 = path10.join(os5.homedir(), ".exe-os", "intercom.log");
2066
+ DEBOUNCE_FILE = path10.join(SESSION_CACHE, "intercom-debounce.json");
2029
2067
  DEBOUNCE_CLEANUP_AGE_MS = 5 * 60 * 1e3;
2030
2068
  }
2031
2069
  });
@@ -2065,14 +2103,14 @@ var init_memory = __esm({
2065
2103
 
2066
2104
  // src/lib/keychain.ts
2067
2105
  import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
2068
- import { existsSync as existsSync8 } from "fs";
2069
- import path10 from "path";
2106
+ import { existsSync as existsSync9 } from "fs";
2107
+ import path11 from "path";
2070
2108
  import os6 from "os";
2071
2109
  function getKeyDir() {
2072
- return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path10.join(os6.homedir(), ".exe-os");
2110
+ return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path11.join(os6.homedir(), ".exe-os");
2073
2111
  }
2074
2112
  function getKeyPath() {
2075
- return path10.join(getKeyDir(), "master.key");
2113
+ return path11.join(getKeyDir(), "master.key");
2076
2114
  }
2077
2115
  async function tryKeytar() {
2078
2116
  try {
@@ -2093,7 +2131,7 @@ async function getMasterKey() {
2093
2131
  }
2094
2132
  }
2095
2133
  const keyPath = getKeyPath();
2096
- if (!existsSync8(keyPath)) {
2134
+ if (!existsSync9(keyPath)) {
2097
2135
  process.stderr.write(
2098
2136
  `[keychain] Key not found at ${keyPath} (HOME=${os6.homedir()}, EXE_OS_DIR=${process.env.EXE_OS_DIR ?? "unset"})
2099
2137
  `
@@ -2188,13 +2226,13 @@ __export(shard_manager_exports, {
2188
2226
  listShards: () => listShards,
2189
2227
  shardExists: () => shardExists
2190
2228
  });
2191
- import path11 from "path";
2192
- import { existsSync as existsSync9, mkdirSync as mkdirSync5, readdirSync as readdirSync2 } from "fs";
2229
+ import path12 from "path";
2230
+ import { existsSync as existsSync10, mkdirSync as mkdirSync6, readdirSync as readdirSync2 } from "fs";
2193
2231
  import { createClient as createClient2 } from "@libsql/client";
2194
2232
  function initShardManager(encryptionKey) {
2195
2233
  _encryptionKey = encryptionKey;
2196
- if (!existsSync9(SHARDS_DIR)) {
2197
- mkdirSync5(SHARDS_DIR, { recursive: true });
2234
+ if (!existsSync10(SHARDS_DIR)) {
2235
+ mkdirSync6(SHARDS_DIR, { recursive: true });
2198
2236
  }
2199
2237
  _shardingEnabled = true;
2200
2238
  }
@@ -2214,7 +2252,7 @@ function getShardClient(projectName) {
2214
2252
  }
2215
2253
  const cached = _shards.get(safeName);
2216
2254
  if (cached) return cached;
2217
- const dbPath = path11.join(SHARDS_DIR, `${safeName}.db`);
2255
+ const dbPath = path12.join(SHARDS_DIR, `${safeName}.db`);
2218
2256
  const client = createClient2({
2219
2257
  url: `file:${dbPath}`,
2220
2258
  encryptionKey: _encryptionKey
@@ -2224,10 +2262,10 @@ function getShardClient(projectName) {
2224
2262
  }
2225
2263
  function shardExists(projectName) {
2226
2264
  const safeName = projectName.replace(/[^a-zA-Z0-9_-]/g, "_");
2227
- return existsSync9(path11.join(SHARDS_DIR, `${safeName}.db`));
2265
+ return existsSync10(path12.join(SHARDS_DIR, `${safeName}.db`));
2228
2266
  }
2229
2267
  function listShards() {
2230
- if (!existsSync9(SHARDS_DIR)) return [];
2268
+ if (!existsSync10(SHARDS_DIR)) return [];
2231
2269
  return readdirSync2(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
2232
2270
  }
2233
2271
  async function ensureShardSchema(client) {
@@ -2413,7 +2451,7 @@ var init_shard_manager = __esm({
2413
2451
  "src/lib/shard-manager.ts"() {
2414
2452
  "use strict";
2415
2453
  init_config();
2416
- SHARDS_DIR = path11.join(EXE_AI_DIR, "shards");
2454
+ SHARDS_DIR = path12.join(EXE_AI_DIR, "shards");
2417
2455
  _shards = /* @__PURE__ */ new Map();
2418
2456
  _encryptionKey = null;
2419
2457
  _shardingEnabled = false;