@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
@@ -431,17 +431,53 @@ var init_provider_table = __esm({
431
431
  }
432
432
  });
433
433
 
434
- // src/lib/intercom-queue.ts
435
- import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, renameSync as renameSync3, existsSync as existsSync3, mkdirSync as mkdirSync2 } from "fs";
434
+ // src/lib/runtime-table.ts
435
+ var RUNTIME_TABLE;
436
+ var init_runtime_table = __esm({
437
+ "src/lib/runtime-table.ts"() {
438
+ "use strict";
439
+ RUNTIME_TABLE = {
440
+ codex: {
441
+ binary: "codex",
442
+ launchMode: "exec",
443
+ autoApproveFlag: "--full-auto",
444
+ inlineFlag: "--no-alt-screen",
445
+ apiKeyEnv: "OPENAI_API_KEY",
446
+ defaultModel: "gpt-5.4"
447
+ }
448
+ };
449
+ }
450
+ });
451
+
452
+ // src/lib/agent-config.ts
453
+ import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, existsSync as existsSync3, mkdirSync as mkdirSync2 } from "fs";
436
454
  import path5 from "path";
455
+ var AGENT_CONFIG_PATH, DEFAULT_MODELS;
456
+ var init_agent_config = __esm({
457
+ "src/lib/agent-config.ts"() {
458
+ "use strict";
459
+ init_config();
460
+ init_runtime_table();
461
+ AGENT_CONFIG_PATH = path5.join(EXE_AI_DIR, "agent-config.json");
462
+ DEFAULT_MODELS = {
463
+ claude: "claude-opus-4",
464
+ codex: RUNTIME_TABLE.codex?.defaultModel ?? "gpt-5.4",
465
+ opencode: "minimax-m2.7"
466
+ };
467
+ }
468
+ });
469
+
470
+ // src/lib/intercom-queue.ts
471
+ import { readFileSync as readFileSync5, writeFileSync as writeFileSync4, renameSync as renameSync3, existsSync as existsSync4, mkdirSync as mkdirSync3 } from "fs";
472
+ import path6 from "path";
437
473
  import os4 from "os";
438
474
  var QUEUE_PATH, TTL_MS, INTERCOM_LOG;
439
475
  var init_intercom_queue = __esm({
440
476
  "src/lib/intercom-queue.ts"() {
441
477
  "use strict";
442
- QUEUE_PATH = path5.join(os4.homedir(), ".exe-os", "intercom-queue.json");
478
+ QUEUE_PATH = path6.join(os4.homedir(), ".exe-os", "intercom-queue.json");
443
479
  TTL_MS = 60 * 60 * 1e3;
444
- INTERCOM_LOG = path5.join(os4.homedir(), ".exe-os", "intercom.log");
480
+ INTERCOM_LOG = path6.join(os4.homedir(), ".exe-os", "intercom.log");
445
481
  }
446
482
  });
447
483
 
@@ -504,8 +540,8 @@ var init_db_retry = __esm({
504
540
  import net from "net";
505
541
  import { spawn } from "child_process";
506
542
  import { randomUUID } from "crypto";
507
- import { existsSync as existsSync4, unlinkSync as unlinkSync3, readFileSync as readFileSync5, openSync, closeSync, statSync } from "fs";
508
- import path6 from "path";
543
+ import { existsSync as existsSync5, unlinkSync as unlinkSync3, readFileSync as readFileSync6, openSync, closeSync, statSync } from "fs";
544
+ import path7 from "path";
509
545
  import { fileURLToPath } from "url";
510
546
  function handleData(chunk) {
511
547
  _buffer += chunk.toString();
@@ -533,9 +569,9 @@ function handleData(chunk) {
533
569
  }
534
570
  }
535
571
  function cleanupStaleFiles() {
536
- if (existsSync4(PID_PATH)) {
572
+ if (existsSync5(PID_PATH)) {
537
573
  try {
538
- const pid = parseInt(readFileSync5(PID_PATH, "utf8").trim(), 10);
574
+ const pid = parseInt(readFileSync6(PID_PATH, "utf8").trim(), 10);
539
575
  if (pid > 0) {
540
576
  try {
541
577
  process.kill(pid, 0);
@@ -556,11 +592,11 @@ function cleanupStaleFiles() {
556
592
  }
557
593
  }
558
594
  function findPackageRoot() {
559
- let dir = path6.dirname(fileURLToPath(import.meta.url));
560
- const { root } = path6.parse(dir);
595
+ let dir = path7.dirname(fileURLToPath(import.meta.url));
596
+ const { root } = path7.parse(dir);
561
597
  while (dir !== root) {
562
- if (existsSync4(path6.join(dir, "package.json"))) return dir;
563
- dir = path6.dirname(dir);
598
+ if (existsSync5(path7.join(dir, "package.json"))) return dir;
599
+ dir = path7.dirname(dir);
564
600
  }
565
601
  return null;
566
602
  }
@@ -570,8 +606,8 @@ function spawnDaemon() {
570
606
  process.stderr.write("[exed-client] WARN: cannot find package root\n");
571
607
  return;
572
608
  }
573
- const daemonPath = path6.join(pkgRoot, "dist", "lib", "exe-daemon.js");
574
- if (!existsSync4(daemonPath)) {
609
+ const daemonPath = path7.join(pkgRoot, "dist", "lib", "exe-daemon.js");
610
+ if (!existsSync5(daemonPath)) {
575
611
  process.stderr.write(`[exed-client] WARN: daemon script not found at ${daemonPath}
576
612
  `);
577
613
  return;
@@ -579,7 +615,7 @@ function spawnDaemon() {
579
615
  const resolvedPath = daemonPath;
580
616
  process.stderr.write(`[exed-client] Spawning daemon: ${resolvedPath}
581
617
  `);
582
- const logPath = path6.join(path6.dirname(SOCKET_PATH), "exed.log");
618
+ const logPath = path7.join(path7.dirname(SOCKET_PATH), "exed.log");
583
619
  let stderrFd = "ignore";
584
620
  try {
585
621
  stderrFd = openSync(logPath, "a");
@@ -724,9 +760,9 @@ var init_exe_daemon_client = __esm({
724
760
  "src/lib/exe-daemon-client.ts"() {
725
761
  "use strict";
726
762
  init_config();
727
- SOCKET_PATH = process.env.EXE_DAEMON_SOCK ?? process.env.EXE_EMBED_SOCK ?? path6.join(EXE_AI_DIR, "exed.sock");
728
- PID_PATH = process.env.EXE_DAEMON_PID ?? process.env.EXE_EMBED_PID ?? path6.join(EXE_AI_DIR, "exed.pid");
729
- SPAWN_LOCK_PATH = path6.join(EXE_AI_DIR, "exed-spawn.lock");
763
+ SOCKET_PATH = process.env.EXE_DAEMON_SOCK ?? process.env.EXE_EMBED_SOCK ?? path7.join(EXE_AI_DIR, "exed.sock");
764
+ PID_PATH = process.env.EXE_DAEMON_PID ?? process.env.EXE_EMBED_PID ?? path7.join(EXE_AI_DIR, "exed.pid");
765
+ SPAWN_LOCK_PATH = path7.join(EXE_AI_DIR, "exed-spawn.lock");
730
766
  SPAWN_LOCK_STALE_MS = 3e4;
731
767
  CONNECT_TIMEOUT_MS = 15e3;
732
768
  REQUEST_TIMEOUT_MS = 3e4;
@@ -1951,24 +1987,24 @@ var init_database = __esm({
1951
1987
  });
1952
1988
 
1953
1989
  // src/lib/license.ts
1954
- import { readFileSync as readFileSync6, writeFileSync as writeFileSync4, existsSync as existsSync5, mkdirSync as mkdirSync3 } from "fs";
1990
+ import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, existsSync as existsSync6, mkdirSync as mkdirSync4 } from "fs";
1955
1991
  import { randomUUID as randomUUID2 } from "crypto";
1956
- import path7 from "path";
1992
+ import path8 from "path";
1957
1993
  import { jwtVerify, importSPKI } from "jose";
1958
1994
  var LICENSE_PATH, CACHE_PATH, DEVICE_ID_PATH;
1959
1995
  var init_license = __esm({
1960
1996
  "src/lib/license.ts"() {
1961
1997
  "use strict";
1962
1998
  init_config();
1963
- LICENSE_PATH = path7.join(EXE_AI_DIR, "license.key");
1964
- CACHE_PATH = path7.join(EXE_AI_DIR, "license-cache.json");
1965
- DEVICE_ID_PATH = path7.join(EXE_AI_DIR, "device-id");
1999
+ LICENSE_PATH = path8.join(EXE_AI_DIR, "license.key");
2000
+ CACHE_PATH = path8.join(EXE_AI_DIR, "license-cache.json");
2001
+ DEVICE_ID_PATH = path8.join(EXE_AI_DIR, "device-id");
1966
2002
  }
1967
2003
  });
1968
2004
 
1969
2005
  // src/lib/plan-limits.ts
1970
- import { readFileSync as readFileSync7, existsSync as existsSync6 } from "fs";
1971
- import path8 from "path";
2006
+ import { readFileSync as readFileSync8, existsSync as existsSync7 } from "fs";
2007
+ import path9 from "path";
1972
2008
  var CACHE_PATH2;
1973
2009
  var init_plan_limits = __esm({
1974
2010
  "src/lib/plan-limits.ts"() {
@@ -1977,13 +2013,13 @@ var init_plan_limits = __esm({
1977
2013
  init_employees();
1978
2014
  init_license();
1979
2015
  init_config();
1980
- CACHE_PATH2 = path8.join(EXE_AI_DIR, "license-cache.json");
2016
+ CACHE_PATH2 = path9.join(EXE_AI_DIR, "license-cache.json");
1981
2017
  }
1982
2018
  });
1983
2019
 
1984
2020
  // src/lib/tmux-routing.ts
1985
- import { readFileSync as readFileSync8, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4, existsSync as existsSync7, appendFileSync } from "fs";
1986
- import path9 from "path";
2021
+ import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync8, appendFileSync } from "fs";
2022
+ import path10 from "path";
1987
2023
  import os5 from "os";
1988
2024
  import { fileURLToPath as fileURLToPath2 } from "url";
1989
2025
  function getMySession() {
@@ -1997,7 +2033,7 @@ function extractRootExe(name) {
1997
2033
  }
1998
2034
  function getParentExe(sessionKey) {
1999
2035
  try {
2000
- const data = JSON.parse(readFileSync8(path9.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`), "utf8"));
2036
+ const data = JSON.parse(readFileSync9(path10.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`), "utf8"));
2001
2037
  return data.parentExe || null;
2002
2038
  } catch {
2003
2039
  return null;
@@ -2026,13 +2062,15 @@ var init_tmux_routing = __esm({
2026
2062
  init_cc_agent_support();
2027
2063
  init_mcp_prefix();
2028
2064
  init_provider_table();
2065
+ init_agent_config();
2066
+ init_runtime_table();
2029
2067
  init_intercom_queue();
2030
2068
  init_plan_limits();
2031
2069
  init_employees();
2032
- SPAWN_LOCK_DIR = path9.join(os5.homedir(), ".exe-os", "spawn-locks");
2033
- SESSION_CACHE = path9.join(os5.homedir(), ".exe-os", "session-cache");
2034
- INTERCOM_LOG2 = path9.join(os5.homedir(), ".exe-os", "intercom.log");
2035
- DEBOUNCE_FILE = path9.join(SESSION_CACHE, "intercom-debounce.json");
2070
+ SPAWN_LOCK_DIR = path10.join(os5.homedir(), ".exe-os", "spawn-locks");
2071
+ SESSION_CACHE = path10.join(os5.homedir(), ".exe-os", "session-cache");
2072
+ INTERCOM_LOG2 = path10.join(os5.homedir(), ".exe-os", "intercom.log");
2073
+ DEBOUNCE_FILE = path10.join(SESSION_CACHE, "intercom-debounce.json");
2036
2074
  DEBOUNCE_CLEANUP_AGE_MS = 5 * 60 * 1e3;
2037
2075
  }
2038
2076
  });
@@ -2072,14 +2110,14 @@ var init_memory = __esm({
2072
2110
 
2073
2111
  // src/lib/keychain.ts
2074
2112
  import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
2075
- import { existsSync as existsSync8 } from "fs";
2076
- import path10 from "path";
2113
+ import { existsSync as existsSync9 } from "fs";
2114
+ import path11 from "path";
2077
2115
  import os6 from "os";
2078
2116
  function getKeyDir() {
2079
- return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path10.join(os6.homedir(), ".exe-os");
2117
+ return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path11.join(os6.homedir(), ".exe-os");
2080
2118
  }
2081
2119
  function getKeyPath() {
2082
- return path10.join(getKeyDir(), "master.key");
2120
+ return path11.join(getKeyDir(), "master.key");
2083
2121
  }
2084
2122
  async function tryKeytar() {
2085
2123
  try {
@@ -2100,7 +2138,7 @@ async function getMasterKey() {
2100
2138
  }
2101
2139
  }
2102
2140
  const keyPath = getKeyPath();
2103
- if (!existsSync8(keyPath)) {
2141
+ if (!existsSync9(keyPath)) {
2104
2142
  process.stderr.write(
2105
2143
  `[keychain] Key not found at ${keyPath} (HOME=${os6.homedir()}, EXE_OS_DIR=${process.env.EXE_OS_DIR ?? "unset"})
2106
2144
  `
@@ -2195,13 +2233,13 @@ __export(shard_manager_exports, {
2195
2233
  listShards: () => listShards,
2196
2234
  shardExists: () => shardExists
2197
2235
  });
2198
- import path11 from "path";
2199
- import { existsSync as existsSync9, mkdirSync as mkdirSync5, readdirSync as readdirSync2 } from "fs";
2236
+ import path12 from "path";
2237
+ import { existsSync as existsSync10, mkdirSync as mkdirSync6, readdirSync as readdirSync2 } from "fs";
2200
2238
  import { createClient as createClient2 } from "@libsql/client";
2201
2239
  function initShardManager(encryptionKey) {
2202
2240
  _encryptionKey = encryptionKey;
2203
- if (!existsSync9(SHARDS_DIR)) {
2204
- mkdirSync5(SHARDS_DIR, { recursive: true });
2241
+ if (!existsSync10(SHARDS_DIR)) {
2242
+ mkdirSync6(SHARDS_DIR, { recursive: true });
2205
2243
  }
2206
2244
  _shardingEnabled = true;
2207
2245
  }
@@ -2221,7 +2259,7 @@ function getShardClient(projectName) {
2221
2259
  }
2222
2260
  const cached = _shards.get(safeName);
2223
2261
  if (cached) return cached;
2224
- const dbPath = path11.join(SHARDS_DIR, `${safeName}.db`);
2262
+ const dbPath = path12.join(SHARDS_DIR, `${safeName}.db`);
2225
2263
  const client = createClient2({
2226
2264
  url: `file:${dbPath}`,
2227
2265
  encryptionKey: _encryptionKey
@@ -2231,10 +2269,10 @@ function getShardClient(projectName) {
2231
2269
  }
2232
2270
  function shardExists(projectName) {
2233
2271
  const safeName = projectName.replace(/[^a-zA-Z0-9_-]/g, "_");
2234
- return existsSync9(path11.join(SHARDS_DIR, `${safeName}.db`));
2272
+ return existsSync10(path12.join(SHARDS_DIR, `${safeName}.db`));
2235
2273
  }
2236
2274
  function listShards() {
2237
- if (!existsSync9(SHARDS_DIR)) return [];
2275
+ if (!existsSync10(SHARDS_DIR)) return [];
2238
2276
  return readdirSync2(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
2239
2277
  }
2240
2278
  async function ensureShardSchema(client) {
@@ -2420,7 +2458,7 @@ var init_shard_manager = __esm({
2420
2458
  "src/lib/shard-manager.ts"() {
2421
2459
  "use strict";
2422
2460
  init_config();
2423
- SHARDS_DIR = path11.join(EXE_AI_DIR, "shards");
2461
+ SHARDS_DIR = path12.join(EXE_AI_DIR, "shards");
2424
2462
  _shards = /* @__PURE__ */ new Map();
2425
2463
  _encryptionKey = null;
2426
2464
  _shardingEnabled = false;