@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
@@ -55,7 +55,16 @@ if [ "${1:-}" = "go" ]; then
55
55
  fi
56
56
 
57
57
  if tmux has-session -t "$SESSION" 2>/dev/null; then
58
- exec tmux attach -t "$SESSION"
58
+ # Detect if already inside the target session — prevent double-attach
59
+ CURRENT_SESSION="$(tmux display-message -p '#{session_name}' 2>/dev/null || true)"
60
+ if [ "$CURRENT_SESSION" = "$SESSION" ]; then
61
+ echo " Already inside ${SESSION}."
62
+ exit 0
63
+ fi
64
+ # Unset TMUX to allow attach from auto-tmux shells (common zsh/bash configs).
65
+ # -d detaches other clients to prevent status-bar-in-body rendering bug.
66
+ unset TMUX
67
+ exec tmux attach -d -t "$SESSION"
59
68
  else
60
69
  if [ "$NAME" = "$COO_NAME" ]; then
61
70
  echo " ${SESSION} is not running. Use ${COO_NAME}${NUM} to start a new session."
@@ -125,9 +134,12 @@ if tmux has-session -t "$SESSION" 2>/dev/null; then
125
134
  exit 1
126
135
  fi
127
136
 
137
+ # Unset TMUX to allow creating sessions from auto-tmux shells
138
+ unset TMUX
139
+
128
140
  # Create session and launch COO with full identity + behaviors + bypass permissions
129
141
  tmux new-session -d -s "$SESSION" -c "$PWD"
130
142
  tmux send-keys -t "$SESSION" "exe-launch-agent --agent $COO_NAME" Enter
131
143
 
132
- # Attach user to session
133
- exec tmux attach -t "$SESSION"
144
+ # Attach user to session (-d detaches other clients to prevent rendering conflict)
145
+ exec tmux attach -d -t "$SESSION"
@@ -1942,39 +1942,75 @@ var init_provider_table = __esm({
1942
1942
  }
1943
1943
  });
1944
1944
 
1945
- // src/lib/intercom-queue.ts
1946
- import { readFileSync as readFileSync3, writeFileSync as writeFileSync2, renameSync as renameSync3, existsSync as existsSync5, mkdirSync as mkdirSync2 } from "fs";
1945
+ // src/lib/runtime-table.ts
1946
+ var RUNTIME_TABLE;
1947
+ var init_runtime_table = __esm({
1948
+ "src/lib/runtime-table.ts"() {
1949
+ "use strict";
1950
+ RUNTIME_TABLE = {
1951
+ codex: {
1952
+ binary: "codex",
1953
+ launchMode: "exec",
1954
+ autoApproveFlag: "--full-auto",
1955
+ inlineFlag: "--no-alt-screen",
1956
+ apiKeyEnv: "OPENAI_API_KEY",
1957
+ defaultModel: "gpt-5.4"
1958
+ }
1959
+ };
1960
+ }
1961
+ });
1962
+
1963
+ // src/lib/agent-config.ts
1964
+ import { readFileSync as readFileSync3, writeFileSync as writeFileSync2, existsSync as existsSync5, mkdirSync as mkdirSync2 } from "fs";
1947
1965
  import path6 from "path";
1966
+ var AGENT_CONFIG_PATH, DEFAULT_MODELS;
1967
+ var init_agent_config = __esm({
1968
+ "src/lib/agent-config.ts"() {
1969
+ "use strict";
1970
+ init_config();
1971
+ init_runtime_table();
1972
+ AGENT_CONFIG_PATH = path6.join(EXE_AI_DIR, "agent-config.json");
1973
+ DEFAULT_MODELS = {
1974
+ claude: "claude-opus-4",
1975
+ codex: RUNTIME_TABLE.codex?.defaultModel ?? "gpt-5.4",
1976
+ opencode: "minimax-m2.7"
1977
+ };
1978
+ }
1979
+ });
1980
+
1981
+ // src/lib/intercom-queue.ts
1982
+ import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, renameSync as renameSync3, existsSync as existsSync6, mkdirSync as mkdirSync3 } from "fs";
1983
+ import path7 from "path";
1948
1984
  import os5 from "os";
1949
1985
  var QUEUE_PATH, TTL_MS, INTERCOM_LOG;
1950
1986
  var init_intercom_queue = __esm({
1951
1987
  "src/lib/intercom-queue.ts"() {
1952
1988
  "use strict";
1953
- QUEUE_PATH = path6.join(os5.homedir(), ".exe-os", "intercom-queue.json");
1989
+ QUEUE_PATH = path7.join(os5.homedir(), ".exe-os", "intercom-queue.json");
1954
1990
  TTL_MS = 60 * 60 * 1e3;
1955
- INTERCOM_LOG = path6.join(os5.homedir(), ".exe-os", "intercom.log");
1991
+ INTERCOM_LOG = path7.join(os5.homedir(), ".exe-os", "intercom.log");
1956
1992
  }
1957
1993
  });
1958
1994
 
1959
1995
  // src/lib/license.ts
1960
- import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, existsSync as existsSync6, mkdirSync as mkdirSync3 } from "fs";
1996
+ import { readFileSync as readFileSync5, writeFileSync as writeFileSync4, existsSync as existsSync7, mkdirSync as mkdirSync4 } from "fs";
1961
1997
  import { randomUUID as randomUUID2 } from "crypto";
1962
- import path7 from "path";
1998
+ import path8 from "path";
1963
1999
  import { jwtVerify, importSPKI } from "jose";
1964
2000
  var LICENSE_PATH, CACHE_PATH, DEVICE_ID_PATH;
1965
2001
  var init_license = __esm({
1966
2002
  "src/lib/license.ts"() {
1967
2003
  "use strict";
1968
2004
  init_config();
1969
- LICENSE_PATH = path7.join(EXE_AI_DIR, "license.key");
1970
- CACHE_PATH = path7.join(EXE_AI_DIR, "license-cache.json");
1971
- DEVICE_ID_PATH = path7.join(EXE_AI_DIR, "device-id");
2005
+ LICENSE_PATH = path8.join(EXE_AI_DIR, "license.key");
2006
+ CACHE_PATH = path8.join(EXE_AI_DIR, "license-cache.json");
2007
+ DEVICE_ID_PATH = path8.join(EXE_AI_DIR, "device-id");
1972
2008
  }
1973
2009
  });
1974
2010
 
1975
2011
  // src/lib/plan-limits.ts
1976
- import { readFileSync as readFileSync5, existsSync as existsSync7 } from "fs";
1977
- import path8 from "path";
2012
+ import { readFileSync as readFileSync6, existsSync as existsSync8 } from "fs";
2013
+ import path9 from "path";
1978
2014
  var CACHE_PATH2;
1979
2015
  var init_plan_limits = __esm({
1980
2016
  "src/lib/plan-limits.ts"() {
@@ -1983,13 +2019,13 @@ var init_plan_limits = __esm({
1983
2019
  init_employees();
1984
2020
  init_license();
1985
2021
  init_config();
1986
- CACHE_PATH2 = path8.join(EXE_AI_DIR, "license-cache.json");
2022
+ CACHE_PATH2 = path9.join(EXE_AI_DIR, "license-cache.json");
1987
2023
  }
1988
2024
  });
1989
2025
 
1990
2026
  // src/lib/tmux-routing.ts
1991
- import { readFileSync as readFileSync6, writeFileSync as writeFileSync4, mkdirSync as mkdirSync4, existsSync as existsSync8, appendFileSync } from "fs";
1992
- import path9 from "path";
2027
+ import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, mkdirSync as mkdirSync5, existsSync as existsSync9, appendFileSync } from "fs";
2028
+ import path10 from "path";
1993
2029
  import os6 from "os";
1994
2030
  import { fileURLToPath as fileURLToPath2 } from "url";
1995
2031
  function getMySession() {
@@ -2003,7 +2039,7 @@ function extractRootExe(name) {
2003
2039
  }
2004
2040
  function getParentExe(sessionKey) {
2005
2041
  try {
2006
- const data = JSON.parse(readFileSync6(path9.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`), "utf8"));
2042
+ const data = JSON.parse(readFileSync7(path10.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`), "utf8"));
2007
2043
  return data.parentExe || null;
2008
2044
  } catch {
2009
2045
  return null;
@@ -2032,13 +2068,15 @@ var init_tmux_routing = __esm({
2032
2068
  init_cc_agent_support();
2033
2069
  init_mcp_prefix();
2034
2070
  init_provider_table();
2071
+ init_agent_config();
2072
+ init_runtime_table();
2035
2073
  init_intercom_queue();
2036
2074
  init_plan_limits();
2037
2075
  init_employees();
2038
- SPAWN_LOCK_DIR = path9.join(os6.homedir(), ".exe-os", "spawn-locks");
2039
- SESSION_CACHE = path9.join(os6.homedir(), ".exe-os", "session-cache");
2040
- INTERCOM_LOG2 = path9.join(os6.homedir(), ".exe-os", "intercom.log");
2041
- DEBOUNCE_FILE = path9.join(SESSION_CACHE, "intercom-debounce.json");
2076
+ SPAWN_LOCK_DIR = path10.join(os6.homedir(), ".exe-os", "spawn-locks");
2077
+ SESSION_CACHE = path10.join(os6.homedir(), ".exe-os", "session-cache");
2078
+ INTERCOM_LOG2 = path10.join(os6.homedir(), ".exe-os", "intercom.log");
2079
+ DEBOUNCE_FILE = path10.join(SESSION_CACHE, "intercom-debounce.json");
2042
2080
  DEBOUNCE_CLEANUP_AGE_MS = 5 * 60 * 1e3;
2043
2081
  }
2044
2082
  });