@askexenow/exe-os 0.9.85 → 0.9.87

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 +50 -14
  2. package/dist/bin/agentic-reflection-backfill.js +50 -14
  3. package/dist/bin/agentic-semantic-label.js +50 -14
  4. package/dist/bin/backfill-conversations.js +50 -14
  5. package/dist/bin/backfill-responses.js +50 -14
  6. package/dist/bin/backfill-vectors.js +50 -14
  7. package/dist/bin/bulk-sync-postgres.js +50 -14
  8. package/dist/bin/cleanup-stale-review-tasks.js +53 -17
  9. package/dist/bin/cli.js +339 -81
  10. package/dist/bin/exe-agent.js +18 -0
  11. package/dist/bin/exe-assign.js +50 -14
  12. package/dist/bin/exe-boot.js +75 -39
  13. package/dist/bin/exe-call.js +18 -0
  14. package/dist/bin/exe-cloud.js +40 -4
  15. package/dist/bin/exe-dispatch.js +61 -25
  16. package/dist/bin/exe-doctor.js +40 -4
  17. package/dist/bin/exe-export-behaviors.js +50 -14
  18. package/dist/bin/exe-forget.js +50 -14
  19. package/dist/bin/exe-gateway.js +65 -29
  20. package/dist/bin/exe-heartbeat.js +55 -19
  21. package/dist/bin/exe-kill.js +54 -18
  22. package/dist/bin/exe-launch-agent.js +58 -22
  23. package/dist/bin/exe-new-employee.js +33 -2
  24. package/dist/bin/exe-pending-messages.js +53 -17
  25. package/dist/bin/exe-pending-notifications.js +53 -17
  26. package/dist/bin/exe-pending-reviews.js +55 -19
  27. package/dist/bin/exe-rename.js +52 -16
  28. package/dist/bin/exe-review.js +50 -14
  29. package/dist/bin/exe-search.js +58 -22
  30. package/dist/bin/exe-session-cleanup.js +85 -44
  31. package/dist/bin/exe-start-codex.js +57 -21
  32. package/dist/bin/exe-start-opencode.js +55 -19
  33. package/dist/bin/exe-status.js +62 -26
  34. package/dist/bin/exe-team.js +50 -14
  35. package/dist/bin/git-sweep.js +63 -27
  36. package/dist/bin/graph-backfill.js +50 -14
  37. package/dist/bin/graph-export.js +50 -14
  38. package/dist/bin/install.js +9 -0
  39. package/dist/bin/intercom-check.js +67 -31
  40. package/dist/bin/scan-tasks.js +63 -27
  41. package/dist/bin/setup.js +53 -13
  42. package/dist/bin/shard-migrate.js +50 -14
  43. package/dist/bin/stack-update.js +59 -2
  44. package/dist/bin/update.js +1 -1
  45. package/dist/gateway/index.js +65 -29
  46. package/dist/hooks/bug-report-worker.js +65 -29
  47. package/dist/hooks/codex-stop-task-finalizer.js +59 -23
  48. package/dist/hooks/commit-complete.js +64 -28
  49. package/dist/hooks/error-recall.js +62 -26
  50. package/dist/hooks/ingest-worker.js +4 -4
  51. package/dist/hooks/ingest.js +56 -20
  52. package/dist/hooks/instructions-loaded.js +50 -14
  53. package/dist/hooks/notification.js +50 -14
  54. package/dist/hooks/post-compact.js +50 -14
  55. package/dist/hooks/post-tool-combined.js +63 -27
  56. package/dist/hooks/pre-compact.js +61 -25
  57. package/dist/hooks/pre-tool-use.js +58 -22
  58. package/dist/hooks/prompt-submit.js +78 -42
  59. package/dist/hooks/session-end.js +66 -30
  60. package/dist/hooks/session-start.js +68 -32
  61. package/dist/hooks/stop.js +53 -17
  62. package/dist/hooks/subagent-stop.js +50 -14
  63. package/dist/hooks/summary-worker.js +55 -19
  64. package/dist/index.js +61 -25
  65. package/dist/lib/cloud-sync.js +32 -14
  66. package/dist/lib/database.js +22 -4
  67. package/dist/lib/db-daemon-client.js +16 -4
  68. package/dist/lib/db.js +22 -4
  69. package/dist/lib/device-registry.js +22 -4
  70. package/dist/lib/embedder.js +16 -4
  71. package/dist/lib/employee-templates.js +18 -0
  72. package/dist/lib/exe-daemon-client.js +16 -4
  73. package/dist/lib/exe-daemon.js +874 -232
  74. package/dist/lib/hybrid-search.js +58 -22
  75. package/dist/lib/identity-templates.js +6 -2
  76. package/dist/lib/schedules.js +53 -17
  77. package/dist/lib/skill-learning.js +16 -4
  78. package/dist/lib/store.js +50 -14
  79. package/dist/lib/tasks.js +16 -4
  80. package/dist/lib/tmux-routing.js +18 -6
  81. package/dist/mcp/server.js +809 -200
  82. package/dist/mcp/tools/create-task.js +24 -8
  83. package/dist/mcp/tools/update-task.js +18 -6
  84. package/dist/runtime/index.js +61 -25
  85. package/dist/tui/App.js +91 -55
  86. package/package.json +1 -1
package/dist/lib/store.js CHANGED
@@ -980,7 +980,7 @@ var init_daemon_auth = __esm({
980
980
  // src/lib/exe-daemon-client.ts
981
981
  import net from "net";
982
982
  import os4 from "os";
983
- import { spawn } from "child_process";
983
+ import { spawn, execSync as execSync2 } from "child_process";
984
984
  import { randomUUID } from "crypto";
985
985
  import { existsSync as existsSync5, unlinkSync as unlinkSync2, readFileSync as readFileSync4, openSync, closeSync, statSync } from "fs";
986
986
  import path5 from "path";
@@ -1010,6 +1010,14 @@ function handleData(chunk) {
1010
1010
  }
1011
1011
  }
1012
1012
  }
1013
+ function isZombie(pid) {
1014
+ try {
1015
+ const state = execSync2(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
1016
+ return state.startsWith("Z");
1017
+ } catch {
1018
+ return false;
1019
+ }
1020
+ }
1013
1021
  function cleanupStaleFiles() {
1014
1022
  if (existsSync5(PID_PATH)) {
1015
1023
  try {
@@ -1017,7 +1025,11 @@ function cleanupStaleFiles() {
1017
1025
  if (pid > 0) {
1018
1026
  try {
1019
1027
  process.kill(pid, 0);
1020
- return;
1028
+ if (!isZombie(pid)) {
1029
+ return;
1030
+ }
1031
+ process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
1032
+ `);
1021
1033
  } catch {
1022
1034
  }
1023
1035
  }
@@ -1045,8 +1057,8 @@ function findPackageRoot() {
1045
1057
  function getAvailableMemoryGB() {
1046
1058
  if (process.platform === "darwin") {
1047
1059
  try {
1048
- const { execSync: execSync3 } = __require("child_process");
1049
- const vmstat = execSync3("vm_stat", { encoding: "utf8" });
1060
+ const { execSync: execSync4 } = __require("child_process");
1061
+ const vmstat = execSync4("vm_stat", { encoding: "utf8" });
1050
1062
  const pageSize = 16384;
1051
1063
  const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
1052
1064
  const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
@@ -2832,6 +2844,12 @@ async function disposeDatabase() {
2832
2844
  clearInterval(_walCheckpointTimer);
2833
2845
  _walCheckpointTimer = null;
2834
2846
  }
2847
+ if (_client) {
2848
+ try {
2849
+ await _client.execute("PRAGMA wal_checkpoint(PASSIVE)");
2850
+ } catch {
2851
+ }
2852
+ }
2835
2853
  if (_daemonClient) {
2836
2854
  _daemonClient.close();
2837
2855
  _daemonClient = null;
@@ -3363,6 +3381,24 @@ var init_platform_procedures = __esm({
3363
3381
  priority: "p0",
3364
3382
  content: "When an agent encounters a suspected Exe OS bug, update breakage, MCP/tool failure, installer issue, memory/orchestration defect, or customer-local patch need, it MUST use create_bug_report. Do this before or alongside any local workaround so the report reaches AskExe support directly via the customer's license. Do NOT ask the founder for permission to file a required bug report. If create_bug_report is deferred/lazy-loaded, load it and call it. If it is unavailable in the live MCP surface, report 'create_bug_report unavailable in this session' and save a local report in exe/output \u2014 never claim the tool does not exist unless the live MCP surface was checked. If upstream delivery fails, call support_test (MCP) and include its result in the local report so AskExe can distinguish customer setup, license provisioning, and server intake issues; only ask the founder to run `exe-os support test` if MCP is disconnected/unavailable. Classify first: upstream_bug = reproducible exe-os/platform defect; customer_customization = identity, behavior, procedure, config, branding, workflow preference that belongs in customer-owned layers; emergency_hotfix = temporary local patch. For upstream bugs/emergency hotfixes include version, repro steps, expected/actual, files changed, workaround, and local diff summary. Avoid permanent platform-code patches unless founder approves; if a hotfix is unavoidable, document it in the bug report and re-check after npm update."
3365
3383
  },
3384
+ {
3385
+ title: "Bug report status check \u2014 surface available fixes on boot",
3386
+ domain: "support",
3387
+ priority: "p1",
3388
+ content: "Once per session (COO boot only, never repeat), call list_my_bug_reports to check if any previously filed bug reports have been fixed by AskExe. If any report has status 'fixed' with a fixed_version, surface it to the founder immediately: '\u{1F527} N bug fix(es) available \u2014 run exe-os update to get version X.Y.Z'. This is a one-time check at boot, not a recurring poll. If no reports exist or none are fixed, skip silently. If the MCP tool is unavailable or the network call fails, skip silently \u2014 this is informational, not blocking."
3389
+ },
3390
+ {
3391
+ title: "Feature request triage \u2014 upstream feature vs local customization",
3392
+ domain: "support",
3393
+ priority: "p0",
3394
+ content: "When an agent or founder identifies a desired capability that exe-os does not yet provide, the COO (or equivalent coordinator) must decide: is this a local customization (identity, behavior, procedure, config, branding, workflow preference that can be configured in customer-owned layers) or an upstream feature request (a platform capability that requires changes to exe-os code, shipped via npm update)? Local customizations: implement immediately using store_behavior, update_identity, company_procedure, or config changes. Upstream features: use create_feature_request to submit to AskExe. Include use case, business impact, and current workaround. Do NOT ask the founder for permission to file a feature request \u2014 file it proactively when the need is clear."
3395
+ },
3396
+ {
3397
+ title: "Feature request status check \u2014 surface shipped features on boot",
3398
+ domain: "support",
3399
+ priority: "p1",
3400
+ content: "Once per session (COO boot only, never repeat), call list_my_feature_requests to check if any previously filed feature requests have been shipped by AskExe. If any request has status 'shipped' with a shipped_version, surface it to the founder immediately: '\u{1F680} N feature(s) shipped \u2014 run exe-os update to get version X.Y.Z'. This is a one-time check at boot, not a recurring poll. If no requests exist or none are shipped, skip silently. If the MCP tool is unavailable or the network call fails, skip silently \u2014 this is informational, not blocking."
3401
+ },
3366
3402
  // --- Operations ---
3367
3403
  {
3368
3404
  title: "Managers must supervise deployed workers",
@@ -3986,7 +4022,7 @@ init_database();
3986
4022
  // src/lib/keychain.ts
3987
4023
  import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
3988
4024
  import { existsSync as existsSync6, statSync as statSync2 } from "fs";
3989
- import { execSync as execSync2 } from "child_process";
4025
+ import { execSync as execSync3 } from "child_process";
3990
4026
  import path6 from "path";
3991
4027
  import os5 from "os";
3992
4028
  var SERVICE = "exe-os";
@@ -4007,13 +4043,13 @@ function linuxSecretAvailable() {
4007
4043
  if (process.platform !== "linux") return false;
4008
4044
  if (linuxSecretAvailability !== null) return linuxSecretAvailability;
4009
4045
  try {
4010
- execSync2("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
4046
+ execSync3("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
4011
4047
  } catch {
4012
4048
  linuxSecretAvailability = false;
4013
4049
  return false;
4014
4050
  }
4015
4051
  try {
4016
- execSync2("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
4052
+ execSync3("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
4017
4053
  linuxSecretAvailability = true;
4018
4054
  } catch {
4019
4055
  linuxSecretAvailability = false;
@@ -4037,7 +4073,7 @@ function macKeychainGet(service = SERVICE) {
4037
4073
  if (!nativeKeychainAllowed()) return null;
4038
4074
  if (process.platform !== "darwin") return null;
4039
4075
  try {
4040
- return execSync2(
4076
+ return execSync3(
4041
4077
  `security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
4042
4078
  { encoding: "utf-8", timeout: 5e3 }
4043
4079
  ).trim();
@@ -4050,13 +4086,13 @@ function macKeychainSet(value, service = SERVICE) {
4050
4086
  if (process.platform !== "darwin") return false;
4051
4087
  try {
4052
4088
  try {
4053
- execSync2(
4089
+ execSync3(
4054
4090
  `security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
4055
4091
  { timeout: 5e3 }
4056
4092
  );
4057
4093
  } catch {
4058
4094
  }
4059
- execSync2(
4095
+ execSync3(
4060
4096
  `security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
4061
4097
  { timeout: 5e3 }
4062
4098
  );
@@ -4069,7 +4105,7 @@ function macKeychainDelete(service = SERVICE) {
4069
4105
  if (!nativeKeychainAllowed()) return false;
4070
4106
  if (process.platform !== "darwin") return false;
4071
4107
  try {
4072
- execSync2(
4108
+ execSync3(
4073
4109
  `security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
4074
4110
  { timeout: 5e3 }
4075
4111
  );
@@ -4081,7 +4117,7 @@ function macKeychainDelete(service = SERVICE) {
4081
4117
  function linuxSecretGet(service = SERVICE) {
4082
4118
  if (!linuxSecretAvailable()) return null;
4083
4119
  try {
4084
- return execSync2(
4120
+ return execSync3(
4085
4121
  `secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
4086
4122
  { encoding: "utf-8", timeout: 5e3 }
4087
4123
  ).trim();
@@ -4092,7 +4128,7 @@ function linuxSecretGet(service = SERVICE) {
4092
4128
  function linuxSecretSet(value, service = SERVICE) {
4093
4129
  if (!linuxSecretAvailable()) return false;
4094
4130
  try {
4095
- execSync2(
4131
+ execSync3(
4096
4132
  `echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
4097
4133
  { timeout: 5e3 }
4098
4134
  );
@@ -4105,7 +4141,7 @@ function linuxSecretDelete(service = SERVICE) {
4105
4141
  if (!nativeKeychainAllowed()) return false;
4106
4142
  if (process.platform !== "linux") return false;
4107
4143
  try {
4108
- execSync2(
4144
+ execSync3(
4109
4145
  `secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
4110
4146
  { timeout: 5e3 }
4111
4147
  );
package/dist/lib/tasks.js CHANGED
@@ -3636,7 +3636,7 @@ var init_daemon_auth = __esm({
3636
3636
  // src/lib/exe-daemon-client.ts
3637
3637
  import net from "net";
3638
3638
  import os11 from "os";
3639
- import { spawn } from "child_process";
3639
+ import { spawn, execSync as execSync7 } from "child_process";
3640
3640
  import { randomUUID as randomUUID2 } from "crypto";
3641
3641
  import { existsSync as existsSync15, unlinkSync as unlinkSync5, readFileSync as readFileSync12, openSync, closeSync, statSync } from "fs";
3642
3642
  import path17 from "path";
@@ -3666,6 +3666,14 @@ function handleData(chunk) {
3666
3666
  }
3667
3667
  }
3668
3668
  }
3669
+ function isZombie(pid) {
3670
+ try {
3671
+ const state = execSync7(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
3672
+ return state.startsWith("Z");
3673
+ } catch {
3674
+ return false;
3675
+ }
3676
+ }
3669
3677
  function cleanupStaleFiles() {
3670
3678
  if (existsSync15(PID_PATH)) {
3671
3679
  try {
@@ -3673,7 +3681,11 @@ function cleanupStaleFiles() {
3673
3681
  if (pid > 0) {
3674
3682
  try {
3675
3683
  process.kill(pid, 0);
3676
- return;
3684
+ if (!isZombie(pid)) {
3685
+ return;
3686
+ }
3687
+ process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
3688
+ `);
3677
3689
  } catch {
3678
3690
  }
3679
3691
  }
@@ -3701,8 +3713,8 @@ function findPackageRoot() {
3701
3713
  function getAvailableMemoryGB() {
3702
3714
  if (process.platform === "darwin") {
3703
3715
  try {
3704
- const { execSync: execSync7 } = __require("child_process");
3705
- const vmstat = execSync7("vm_stat", { encoding: "utf8" });
3716
+ const { execSync: execSync8 } = __require("child_process");
3717
+ const vmstat = execSync8("vm_stat", { encoding: "utf8" });
3706
3718
  const pageSize = 16384;
3707
3719
  const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
3708
3720
  const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
@@ -2529,7 +2529,7 @@ var init_daemon_auth = __esm({
2529
2529
  // src/lib/exe-daemon-client.ts
2530
2530
  import net from "net";
2531
2531
  import os10 from "os";
2532
- import { spawn } from "child_process";
2532
+ import { spawn, execSync as execSync6 } from "child_process";
2533
2533
  import { randomUUID as randomUUID2 } from "crypto";
2534
2534
  import { existsSync as existsSync14, unlinkSync as unlinkSync4, readFileSync as readFileSync11, openSync, closeSync, statSync } from "fs";
2535
2535
  import path16 from "path";
@@ -2559,6 +2559,14 @@ function handleData(chunk) {
2559
2559
  }
2560
2560
  }
2561
2561
  }
2562
+ function isZombie(pid) {
2563
+ try {
2564
+ const state = execSync6(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
2565
+ return state.startsWith("Z");
2566
+ } catch {
2567
+ return false;
2568
+ }
2569
+ }
2562
2570
  function cleanupStaleFiles() {
2563
2571
  if (existsSync14(PID_PATH)) {
2564
2572
  try {
@@ -2566,7 +2574,11 @@ function cleanupStaleFiles() {
2566
2574
  if (pid > 0) {
2567
2575
  try {
2568
2576
  process.kill(pid, 0);
2569
- return;
2577
+ if (!isZombie(pid)) {
2578
+ return;
2579
+ }
2580
+ process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
2581
+ `);
2570
2582
  } catch {
2571
2583
  }
2572
2584
  }
@@ -2594,8 +2606,8 @@ function findPackageRoot() {
2594
2606
  function getAvailableMemoryGB() {
2595
2607
  if (process.platform === "darwin") {
2596
2608
  try {
2597
- const { execSync: execSync7 } = __require("child_process");
2598
- const vmstat = execSync7("vm_stat", { encoding: "utf8" });
2609
+ const { execSync: execSync8 } = __require("child_process");
2610
+ const vmstat = execSync8("vm_stat", { encoding: "utf8" });
2599
2611
  const pageSize = 16384;
2600
2612
  const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
2601
2613
  const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
@@ -3853,7 +3865,7 @@ __export(tmux_routing_exports, {
3853
3865
  spawnEmployee: () => spawnEmployee,
3854
3866
  verifyPaneAtCapacity: () => verifyPaneAtCapacity
3855
3867
  });
3856
- import { execFileSync as execFileSync2, execSync as execSync6 } from "child_process";
3868
+ import { execFileSync as execFileSync2, execSync as execSync7 } from "child_process";
3857
3869
  import { readFileSync as readFileSync12, writeFileSync as writeFileSync8, mkdirSync as mkdirSync7, existsSync as existsSync15, appendFileSync, readdirSync as readdirSync3 } from "fs";
3858
3870
  import path18 from "path";
3859
3871
  import os11 from "os";
@@ -4574,7 +4586,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
4574
4586
  let booted = false;
4575
4587
  for (let i = 0; i < 30; i++) {
4576
4588
  try {
4577
- execSync6("sleep 0.5");
4589
+ execSync7("sleep 0.5");
4578
4590
  } catch {
4579
4591
  }
4580
4592
  try {