@askexenow/exe-os 0.9.85 → 0.9.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 (80) hide show
  1. package/dist/bin/agentic-ontology-backfill.js +32 -14
  2. package/dist/bin/agentic-reflection-backfill.js +32 -14
  3. package/dist/bin/agentic-semantic-label.js +32 -14
  4. package/dist/bin/backfill-conversations.js +32 -14
  5. package/dist/bin/backfill-responses.js +32 -14
  6. package/dist/bin/backfill-vectors.js +32 -14
  7. package/dist/bin/bulk-sync-postgres.js +32 -14
  8. package/dist/bin/cleanup-stale-review-tasks.js +35 -17
  9. package/dist/bin/cli.js +152 -77
  10. package/dist/bin/exe-assign.js +32 -14
  11. package/dist/bin/exe-boot.js +57 -39
  12. package/dist/bin/exe-cloud.js +22 -4
  13. package/dist/bin/exe-dispatch.js +43 -25
  14. package/dist/bin/exe-doctor.js +22 -4
  15. package/dist/bin/exe-export-behaviors.js +32 -14
  16. package/dist/bin/exe-forget.js +32 -14
  17. package/dist/bin/exe-gateway.js +47 -29
  18. package/dist/bin/exe-heartbeat.js +37 -19
  19. package/dist/bin/exe-kill.js +36 -18
  20. package/dist/bin/exe-launch-agent.js +40 -22
  21. package/dist/bin/exe-pending-messages.js +35 -17
  22. package/dist/bin/exe-pending-notifications.js +35 -17
  23. package/dist/bin/exe-pending-reviews.js +37 -19
  24. package/dist/bin/exe-rename.js +34 -16
  25. package/dist/bin/exe-review.js +32 -14
  26. package/dist/bin/exe-search.js +40 -22
  27. package/dist/bin/exe-session-cleanup.js +67 -44
  28. package/dist/bin/exe-start-codex.js +39 -21
  29. package/dist/bin/exe-start-opencode.js +37 -19
  30. package/dist/bin/exe-status.js +44 -26
  31. package/dist/bin/exe-team.js +32 -14
  32. package/dist/bin/git-sweep.js +45 -27
  33. package/dist/bin/graph-backfill.js +32 -14
  34. package/dist/bin/graph-export.js +32 -14
  35. package/dist/bin/intercom-check.js +49 -31
  36. package/dist/bin/scan-tasks.js +45 -27
  37. package/dist/bin/setup.js +29 -11
  38. package/dist/bin/shard-migrate.js +32 -14
  39. package/dist/bin/stack-update.js +59 -2
  40. package/dist/bin/update.js +1 -1
  41. package/dist/gateway/index.js +47 -29
  42. package/dist/hooks/bug-report-worker.js +47 -29
  43. package/dist/hooks/codex-stop-task-finalizer.js +41 -23
  44. package/dist/hooks/commit-complete.js +46 -28
  45. package/dist/hooks/error-recall.js +44 -26
  46. package/dist/hooks/ingest-worker.js +4 -4
  47. package/dist/hooks/ingest.js +38 -20
  48. package/dist/hooks/instructions-loaded.js +32 -14
  49. package/dist/hooks/notification.js +32 -14
  50. package/dist/hooks/post-compact.js +32 -14
  51. package/dist/hooks/post-tool-combined.js +45 -27
  52. package/dist/hooks/pre-compact.js +43 -25
  53. package/dist/hooks/pre-tool-use.js +40 -22
  54. package/dist/hooks/prompt-submit.js +60 -42
  55. package/dist/hooks/session-end.js +48 -30
  56. package/dist/hooks/session-start.js +50 -32
  57. package/dist/hooks/stop.js +35 -17
  58. package/dist/hooks/subagent-stop.js +32 -14
  59. package/dist/hooks/summary-worker.js +37 -19
  60. package/dist/index.js +43 -25
  61. package/dist/lib/cloud-sync.js +32 -14
  62. package/dist/lib/database.js +22 -4
  63. package/dist/lib/db-daemon-client.js +16 -4
  64. package/dist/lib/db.js +22 -4
  65. package/dist/lib/device-registry.js +22 -4
  66. package/dist/lib/embedder.js +16 -4
  67. package/dist/lib/exe-daemon-client.js +16 -4
  68. package/dist/lib/exe-daemon.js +165 -66
  69. package/dist/lib/hybrid-search.js +40 -22
  70. package/dist/lib/schedules.js +35 -17
  71. package/dist/lib/skill-learning.js +16 -4
  72. package/dist/lib/store.js +32 -14
  73. package/dist/lib/tasks.js +16 -4
  74. package/dist/lib/tmux-routing.js +18 -6
  75. package/dist/mcp/server.js +142 -60
  76. package/dist/mcp/tools/create-task.js +18 -6
  77. package/dist/mcp/tools/update-task.js +18 -6
  78. package/dist/runtime/index.js +43 -25
  79. package/dist/tui/App.js +73 -55
  80. package/package.json +1 -1
@@ -3639,7 +3639,7 @@ var init_daemon_auth = __esm({
3639
3639
  // src/lib/exe-daemon-client.ts
3640
3640
  import net from "net";
3641
3641
  import os11 from "os";
3642
- import { spawn } from "child_process";
3642
+ import { spawn, execSync as execSync7 } from "child_process";
3643
3643
  import { randomUUID as randomUUID2 } from "crypto";
3644
3644
  import { existsSync as existsSync15, unlinkSync as unlinkSync5, readFileSync as readFileSync12, openSync, closeSync, statSync } from "fs";
3645
3645
  import path17 from "path";
@@ -3669,6 +3669,14 @@ function handleData(chunk) {
3669
3669
  }
3670
3670
  }
3671
3671
  }
3672
+ function isZombie(pid) {
3673
+ try {
3674
+ const state = execSync7(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
3675
+ return state.startsWith("Z");
3676
+ } catch {
3677
+ return false;
3678
+ }
3679
+ }
3672
3680
  function cleanupStaleFiles() {
3673
3681
  if (existsSync15(PID_PATH)) {
3674
3682
  try {
@@ -3676,7 +3684,11 @@ function cleanupStaleFiles() {
3676
3684
  if (pid > 0) {
3677
3685
  try {
3678
3686
  process.kill(pid, 0);
3679
- return;
3687
+ if (!isZombie(pid)) {
3688
+ return;
3689
+ }
3690
+ process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
3691
+ `);
3680
3692
  } catch {
3681
3693
  }
3682
3694
  }
@@ -3704,8 +3716,8 @@ function findPackageRoot() {
3704
3716
  function getAvailableMemoryGB() {
3705
3717
  if (process.platform === "darwin") {
3706
3718
  try {
3707
- const { execSync: execSync8 } = __require("child_process");
3708
- const vmstat = execSync8("vm_stat", { encoding: "utf8" });
3719
+ const { execSync: execSync9 } = __require("child_process");
3720
+ const vmstat = execSync9("vm_stat", { encoding: "utf8" });
3709
3721
  const pageSize = 16384;
3710
3722
  const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
3711
3723
  const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
@@ -4677,7 +4689,7 @@ __export(active_agent_exports, {
4677
4689
  writeActiveAgent: () => writeActiveAgent
4678
4690
  });
4679
4691
  import { readFileSync as readFileSync13, writeFileSync as writeFileSync9, mkdirSync as mkdirSync8, unlinkSync as unlinkSync7, readdirSync as readdirSync4 } from "fs";
4680
- import { execSync as execSync7 } from "child_process";
4692
+ import { execSync as execSync8 } from "child_process";
4681
4693
  import path19 from "path";
4682
4694
  function isNameWithOptionalInstance(candidate, baseName) {
4683
4695
  if (candidate === baseName) return true;
@@ -4771,7 +4783,7 @@ function getActiveAgent() {
4771
4783
  } catch {
4772
4784
  }
4773
4785
  try {
4774
- const sessionName = execSync7(
4786
+ const sessionName = execSync8(
4775
4787
  "tmux display-message -p '#{session_name}' 2>/dev/null",
4776
4788
  { encoding: "utf8", timeout: 2e3 }
4777
4789
  ).trim();
@@ -1616,7 +1616,7 @@ var init_daemon_auth = __esm({
1616
1616
  // src/lib/exe-daemon-client.ts
1617
1617
  import net from "net";
1618
1618
  import os7 from "os";
1619
- import { spawn } from "child_process";
1619
+ import { spawn, execSync as execSync5 } from "child_process";
1620
1620
  import { randomUUID as randomUUID2 } from "crypto";
1621
1621
  import { existsSync as existsSync8, unlinkSync as unlinkSync2, readFileSync as readFileSync7, openSync, closeSync, statSync } from "fs";
1622
1622
  import path9 from "path";
@@ -1646,6 +1646,14 @@ function handleData(chunk) {
1646
1646
  }
1647
1647
  }
1648
1648
  }
1649
+ function isZombie(pid) {
1650
+ try {
1651
+ const state = execSync5(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
1652
+ return state.startsWith("Z");
1653
+ } catch {
1654
+ return false;
1655
+ }
1656
+ }
1649
1657
  function cleanupStaleFiles() {
1650
1658
  if (existsSync8(PID_PATH)) {
1651
1659
  try {
@@ -1653,7 +1661,11 @@ function cleanupStaleFiles() {
1653
1661
  if (pid > 0) {
1654
1662
  try {
1655
1663
  process.kill(pid, 0);
1656
- return;
1664
+ if (!isZombie(pid)) {
1665
+ return;
1666
+ }
1667
+ process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
1668
+ `);
1657
1669
  } catch {
1658
1670
  }
1659
1671
  }
@@ -1681,8 +1693,8 @@ function findPackageRoot() {
1681
1693
  function getAvailableMemoryGB() {
1682
1694
  if (process.platform === "darwin") {
1683
1695
  try {
1684
- const { execSync: execSync9 } = __require("child_process");
1685
- const vmstat = execSync9("vm_stat", { encoding: "utf8" });
1696
+ const { execSync: execSync10 } = __require("child_process");
1697
+ const vmstat = execSync10("vm_stat", { encoding: "utf8" });
1686
1698
  const pageSize = 16384;
1687
1699
  const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
1688
1700
  const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
@@ -3617,6 +3629,12 @@ async function disposeDatabase() {
3617
3629
  clearInterval(_walCheckpointTimer);
3618
3630
  _walCheckpointTimer = null;
3619
3631
  }
3632
+ if (_client) {
3633
+ try {
3634
+ await _client.execute("PRAGMA wal_checkpoint(PASSIVE)");
3635
+ } catch {
3636
+ }
3637
+ }
3620
3638
  if (_daemonClient) {
3621
3639
  _daemonClient.close();
3622
3640
  _daemonClient = null;
@@ -4004,7 +4022,7 @@ var init_state_bus = __esm({
4004
4022
  });
4005
4023
 
4006
4024
  // src/lib/project-name.ts
4007
- import { execSync as execSync5 } from "child_process";
4025
+ import { execSync as execSync6 } from "child_process";
4008
4026
  import path14 from "path";
4009
4027
  function getProjectName(cwd) {
4010
4028
  const dir = cwd ?? process.cwd();
@@ -4012,7 +4030,7 @@ function getProjectName(cwd) {
4012
4030
  try {
4013
4031
  let repoRoot;
4014
4032
  try {
4015
- const gitCommonDir = execSync5("git rev-parse --path-format=absolute --git-common-dir", {
4033
+ const gitCommonDir = execSync6("git rev-parse --path-format=absolute --git-common-dir", {
4016
4034
  cwd: dir,
4017
4035
  encoding: "utf8",
4018
4036
  timeout: 2e3,
@@ -4020,7 +4038,7 @@ function getProjectName(cwd) {
4020
4038
  }).trim();
4021
4039
  repoRoot = path14.dirname(gitCommonDir);
4022
4040
  } catch {
4023
- repoRoot = execSync5("git rev-parse --show-toplevel", {
4041
+ repoRoot = execSync6("git rev-parse --show-toplevel", {
4024
4042
  cwd: dir,
4025
4043
  encoding: "utf8",
4026
4044
  timeout: 2e3,
@@ -4111,7 +4129,7 @@ var init_session_scope = __esm({
4111
4129
  import crypto4 from "crypto";
4112
4130
  import path15 from "path";
4113
4131
  import os11 from "os";
4114
- import { execSync as execSync6 } from "child_process";
4132
+ import { execSync as execSync7 } from "child_process";
4115
4133
  import { mkdir as mkdir3, writeFile as writeFile3, appendFile } from "fs/promises";
4116
4134
  import { existsSync as existsSync13, readFileSync as readFileSync11 } from "fs";
4117
4135
  async function writeCheckpoint(input) {
@@ -4456,14 +4474,14 @@ function isTmuxSessionAlive(identifier) {
4456
4474
  if (!identifier || identifier === "unknown") return true;
4457
4475
  try {
4458
4476
  if (identifier.startsWith("%")) {
4459
- const output = execSync6("tmux list-panes -a -F '#{pane_id}'", {
4477
+ const output = execSync7("tmux list-panes -a -F '#{pane_id}'", {
4460
4478
  timeout: 2e3,
4461
4479
  encoding: "utf8",
4462
4480
  stdio: ["pipe", "pipe", "pipe"]
4463
4481
  });
4464
4482
  return output.split("\n").some((l) => l.trim() === identifier);
4465
4483
  } else {
4466
- execSync6(`tmux has-session -t ${JSON.stringify(identifier)}`, {
4484
+ execSync7(`tmux has-session -t ${JSON.stringify(identifier)}`, {
4467
4485
  timeout: 2e3,
4468
4486
  stdio: ["pipe", "pipe", "pipe"]
4469
4487
  });
@@ -4472,7 +4490,7 @@ function isTmuxSessionAlive(identifier) {
4472
4490
  } catch {
4473
4491
  if (identifier.startsWith("%")) return true;
4474
4492
  try {
4475
- execSync6("tmux list-sessions", {
4493
+ execSync7("tmux list-sessions", {
4476
4494
  timeout: 2e3,
4477
4495
  stdio: ["pipe", "pipe", "pipe"]
4478
4496
  });
@@ -4487,12 +4505,12 @@ function checkStaleCompletion(taskContext, taskCreatedAt) {
4487
4505
  if (!DELEGATION_KEYWORDS.test(taskContext)) return null;
4488
4506
  try {
4489
4507
  const since = new Date(taskCreatedAt).toISOString();
4490
- const branch = execSync6(
4508
+ const branch = execSync7(
4491
4509
  "git rev-parse --abbrev-ref HEAD 2>/dev/null",
4492
4510
  { encoding: "utf8", timeout: 3e3 }
4493
4511
  ).trim();
4494
4512
  const branchArg = branch && branch !== "HEAD" ? branch : "";
4495
- const commitCount = execSync6(
4513
+ const commitCount = execSync7(
4496
4514
  `git log --oneline --since="${since}" ${branchArg} 2>/dev/null | wc -l`,
4497
4515
  { encoding: "utf8", timeout: 5e3 }
4498
4516
  ).trim();
@@ -6162,7 +6180,7 @@ __export(tmux_routing_exports, {
6162
6180
  spawnEmployee: () => spawnEmployee,
6163
6181
  verifyPaneAtCapacity: () => verifyPaneAtCapacity
6164
6182
  });
6165
- import { execFileSync as execFileSync2, execSync as execSync7 } from "child_process";
6183
+ import { execFileSync as execFileSync2, execSync as execSync8 } from "child_process";
6166
6184
  import { readFileSync as readFileSync12, writeFileSync as writeFileSync8, mkdirSync as mkdirSync7, existsSync as existsSync15, appendFileSync, readdirSync as readdirSync3 } from "fs";
6167
6185
  import path19 from "path";
6168
6186
  import os12 from "os";
@@ -6883,7 +6901,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
6883
6901
  let booted = false;
6884
6902
  for (let i = 0; i < 30; i++) {
6885
6903
  try {
6886
- execSync7("sleep 0.5");
6904
+ execSync8("sleep 0.5");
6887
6905
  } catch {
6888
6906
  }
6889
6907
  try {
@@ -6962,7 +6980,7 @@ var init_tmux_routing = __esm({
6962
6980
  // src/lib/keychain.ts
6963
6981
  import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4, chmod as chmod2 } from "fs/promises";
6964
6982
  import { existsSync as existsSync16, statSync as statSync2 } from "fs";
6965
- import { execSync as execSync8 } from "child_process";
6983
+ import { execSync as execSync9 } from "child_process";
6966
6984
  import path20 from "path";
6967
6985
  import os13 from "os";
6968
6986
  function getKeyDir() {
@@ -6979,13 +6997,13 @@ function linuxSecretAvailable() {
6979
6997
  if (process.platform !== "linux") return false;
6980
6998
  if (linuxSecretAvailability !== null) return linuxSecretAvailability;
6981
6999
  try {
6982
- execSync8("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
7000
+ execSync9("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
6983
7001
  } catch {
6984
7002
  linuxSecretAvailability = false;
6985
7003
  return false;
6986
7004
  }
6987
7005
  try {
6988
- execSync8("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
7006
+ execSync9("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
6989
7007
  linuxSecretAvailability = true;
6990
7008
  } catch {
6991
7009
  linuxSecretAvailability = false;
@@ -7009,7 +7027,7 @@ function macKeychainGet(service = SERVICE) {
7009
7027
  if (!nativeKeychainAllowed()) return null;
7010
7028
  if (process.platform !== "darwin") return null;
7011
7029
  try {
7012
- return execSync8(
7030
+ return execSync9(
7013
7031
  `security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
7014
7032
  { encoding: "utf-8", timeout: 5e3 }
7015
7033
  ).trim();
@@ -7022,13 +7040,13 @@ function macKeychainSet(value, service = SERVICE) {
7022
7040
  if (process.platform !== "darwin") return false;
7023
7041
  try {
7024
7042
  try {
7025
- execSync8(
7043
+ execSync9(
7026
7044
  `security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
7027
7045
  { timeout: 5e3 }
7028
7046
  );
7029
7047
  } catch {
7030
7048
  }
7031
- execSync8(
7049
+ execSync9(
7032
7050
  `security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
7033
7051
  { timeout: 5e3 }
7034
7052
  );
@@ -7041,7 +7059,7 @@ function macKeychainDelete(service = SERVICE) {
7041
7059
  if (!nativeKeychainAllowed()) return false;
7042
7060
  if (process.platform !== "darwin") return false;
7043
7061
  try {
7044
- execSync8(
7062
+ execSync9(
7045
7063
  `security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
7046
7064
  { timeout: 5e3 }
7047
7065
  );
@@ -7053,7 +7071,7 @@ function macKeychainDelete(service = SERVICE) {
7053
7071
  function linuxSecretGet(service = SERVICE) {
7054
7072
  if (!linuxSecretAvailable()) return null;
7055
7073
  try {
7056
- return execSync8(
7074
+ return execSync9(
7057
7075
  `secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
7058
7076
  { encoding: "utf-8", timeout: 5e3 }
7059
7077
  ).trim();
@@ -7064,7 +7082,7 @@ function linuxSecretGet(service = SERVICE) {
7064
7082
  function linuxSecretSet(value, service = SERVICE) {
7065
7083
  if (!linuxSecretAvailable()) return false;
7066
7084
  try {
7067
- execSync8(
7085
+ execSync9(
7068
7086
  `echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
7069
7087
  { timeout: 5e3 }
7070
7088
  );
@@ -7077,7 +7095,7 @@ function linuxSecretDelete(service = SERVICE) {
7077
7095
  if (!nativeKeychainAllowed()) return false;
7078
7096
  if (process.platform !== "linux") return false;
7079
7097
  try {
7080
- execSync8(
7098
+ execSync9(
7081
7099
  `secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
7082
7100
  { timeout: 5e3 }
7083
7101
  );