@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
@@ -1583,7 +1583,7 @@ __export(exe_daemon_client_exports, {
1583
1583
  });
1584
1584
  import net from "net";
1585
1585
  import os7 from "os";
1586
- import { spawn } from "child_process";
1586
+ import { spawn, execSync as execSync5 } from "child_process";
1587
1587
  import { randomUUID } from "crypto";
1588
1588
  import { existsSync as existsSync9, unlinkSync as unlinkSync4, readFileSync as readFileSync9, openSync, closeSync, statSync } from "fs";
1589
1589
  import path10 from "path";
@@ -1613,6 +1613,14 @@ function handleData(chunk) {
1613
1613
  }
1614
1614
  }
1615
1615
  }
1616
+ function isZombie(pid) {
1617
+ try {
1618
+ const state = execSync5(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
1619
+ return state.startsWith("Z");
1620
+ } catch {
1621
+ return false;
1622
+ }
1623
+ }
1616
1624
  function cleanupStaleFiles() {
1617
1625
  if (existsSync9(PID_PATH)) {
1618
1626
  try {
@@ -1620,7 +1628,11 @@ function cleanupStaleFiles() {
1620
1628
  if (pid > 0) {
1621
1629
  try {
1622
1630
  process.kill(pid, 0);
1623
- return;
1631
+ if (!isZombie(pid)) {
1632
+ return;
1633
+ }
1634
+ process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
1635
+ `);
1624
1636
  } catch {
1625
1637
  }
1626
1638
  }
@@ -1648,8 +1660,8 @@ function findPackageRoot() {
1648
1660
  function getAvailableMemoryGB() {
1649
1661
  if (process.platform === "darwin") {
1650
1662
  try {
1651
- const { execSync: execSync11 } = __require("child_process");
1652
- const vmstat = execSync11("vm_stat", { encoding: "utf8" });
1663
+ const { execSync: execSync12 } = __require("child_process");
1664
+ const vmstat = execSync12("vm_stat", { encoding: "utf8" });
1653
1665
  const pageSize = 16384;
1654
1666
  const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
1655
1667
  const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
@@ -3639,6 +3651,12 @@ async function disposeDatabase() {
3639
3651
  clearInterval(_walCheckpointTimer);
3640
3652
  _walCheckpointTimer = null;
3641
3653
  }
3654
+ if (_client) {
3655
+ try {
3656
+ await _client.execute("PRAGMA wal_checkpoint(PASSIVE)");
3657
+ } catch {
3658
+ }
3659
+ }
3642
3660
  if (_daemonClient) {
3643
3661
  _daemonClient.close();
3644
3662
  _daemonClient = null;
@@ -4177,7 +4195,7 @@ var init_state_bus = __esm({
4177
4195
  });
4178
4196
 
4179
4197
  // src/lib/project-name.ts
4180
- import { execSync as execSync5 } from "child_process";
4198
+ import { execSync as execSync6 } from "child_process";
4181
4199
  import path15 from "path";
4182
4200
  function getProjectName(cwd) {
4183
4201
  const dir = cwd ?? process.cwd();
@@ -4185,7 +4203,7 @@ function getProjectName(cwd) {
4185
4203
  try {
4186
4204
  let repoRoot;
4187
4205
  try {
4188
- const gitCommonDir = execSync5("git rev-parse --path-format=absolute --git-common-dir", {
4206
+ const gitCommonDir = execSync6("git rev-parse --path-format=absolute --git-common-dir", {
4189
4207
  cwd: dir,
4190
4208
  encoding: "utf8",
4191
4209
  timeout: 2e3,
@@ -4193,7 +4211,7 @@ function getProjectName(cwd) {
4193
4211
  }).trim();
4194
4212
  repoRoot = path15.dirname(gitCommonDir);
4195
4213
  } catch {
4196
- repoRoot = execSync5("git rev-parse --show-toplevel", {
4214
+ repoRoot = execSync6("git rev-parse --show-toplevel", {
4197
4215
  cwd: dir,
4198
4216
  encoding: "utf8",
4199
4217
  timeout: 2e3,
@@ -4300,7 +4318,7 @@ __export(tasks_crud_exports, {
4300
4318
  import crypto4 from "crypto";
4301
4319
  import path16 from "path";
4302
4320
  import os11 from "os";
4303
- import { execSync as execSync6 } from "child_process";
4321
+ import { execSync as execSync7 } from "child_process";
4304
4322
  import { mkdir as mkdir3, writeFile as writeFile3, appendFile } from "fs/promises";
4305
4323
  import { existsSync as existsSync14, readFileSync as readFileSync13 } from "fs";
4306
4324
  async function writeCheckpoint(input2) {
@@ -4645,14 +4663,14 @@ function isTmuxSessionAlive(identifier) {
4645
4663
  if (!identifier || identifier === "unknown") return true;
4646
4664
  try {
4647
4665
  if (identifier.startsWith("%")) {
4648
- const output = execSync6("tmux list-panes -a -F '#{pane_id}'", {
4666
+ const output = execSync7("tmux list-panes -a -F '#{pane_id}'", {
4649
4667
  timeout: 2e3,
4650
4668
  encoding: "utf8",
4651
4669
  stdio: ["pipe", "pipe", "pipe"]
4652
4670
  });
4653
4671
  return output.split("\n").some((l) => l.trim() === identifier);
4654
4672
  } else {
4655
- execSync6(`tmux has-session -t ${JSON.stringify(identifier)}`, {
4673
+ execSync7(`tmux has-session -t ${JSON.stringify(identifier)}`, {
4656
4674
  timeout: 2e3,
4657
4675
  stdio: ["pipe", "pipe", "pipe"]
4658
4676
  });
@@ -4661,7 +4679,7 @@ function isTmuxSessionAlive(identifier) {
4661
4679
  } catch {
4662
4680
  if (identifier.startsWith("%")) return true;
4663
4681
  try {
4664
- execSync6("tmux list-sessions", {
4682
+ execSync7("tmux list-sessions", {
4665
4683
  timeout: 2e3,
4666
4684
  stdio: ["pipe", "pipe", "pipe"]
4667
4685
  });
@@ -4676,12 +4694,12 @@ function checkStaleCompletion(taskContext, taskCreatedAt) {
4676
4694
  if (!DELEGATION_KEYWORDS.test(taskContext)) return null;
4677
4695
  try {
4678
4696
  const since = new Date(taskCreatedAt).toISOString();
4679
- const branch = execSync6(
4697
+ const branch = execSync7(
4680
4698
  "git rev-parse --abbrev-ref HEAD 2>/dev/null",
4681
4699
  { encoding: "utf8", timeout: 3e3 }
4682
4700
  ).trim();
4683
4701
  const branchArg = branch && branch !== "HEAD" ? branch : "";
4684
- const commitCount = execSync6(
4702
+ const commitCount = execSync7(
4685
4703
  `git log --oneline --since="${since}" ${branchArg} 2>/dev/null | wc -l`,
4686
4704
  { encoding: "utf8", timeout: 5e3 }
4687
4705
  ).trim();
@@ -6280,7 +6298,7 @@ __export(tmux_routing_exports, {
6280
6298
  spawnEmployee: () => spawnEmployee,
6281
6299
  verifyPaneAtCapacity: () => verifyPaneAtCapacity
6282
6300
  });
6283
- import { execFileSync as execFileSync2, execSync as execSync7 } from "child_process";
6301
+ import { execFileSync as execFileSync2, execSync as execSync8 } from "child_process";
6284
6302
  import { readFileSync as readFileSync14, writeFileSync as writeFileSync10, mkdirSync as mkdirSync9, existsSync as existsSync16, appendFileSync, readdirSync as readdirSync4 } from "fs";
6285
6303
  import path20 from "path";
6286
6304
  import os12 from "os";
@@ -7001,7 +7019,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
7001
7019
  let booted = false;
7002
7020
  for (let i = 0; i < 30; i++) {
7003
7021
  try {
7004
- execSync7("sleep 0.5");
7022
+ execSync8("sleep 0.5");
7005
7023
  } catch {
7006
7024
  }
7007
7025
  try {
@@ -7113,7 +7131,7 @@ var init_task_scope = __esm({
7113
7131
  // src/lib/keychain.ts
7114
7132
  import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4, chmod as chmod2 } from "fs/promises";
7115
7133
  import { existsSync as existsSync18, statSync as statSync3 } from "fs";
7116
- import { execSync as execSync8 } from "child_process";
7134
+ import { execSync as execSync9 } from "child_process";
7117
7135
  import path22 from "path";
7118
7136
  import os13 from "os";
7119
7137
  function getKeyDir() {
@@ -7130,13 +7148,13 @@ function linuxSecretAvailable() {
7130
7148
  if (process.platform !== "linux") return false;
7131
7149
  if (linuxSecretAvailability !== null) return linuxSecretAvailability;
7132
7150
  try {
7133
- execSync8("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
7151
+ execSync9("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
7134
7152
  } catch {
7135
7153
  linuxSecretAvailability = false;
7136
7154
  return false;
7137
7155
  }
7138
7156
  try {
7139
- execSync8("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
7157
+ execSync9("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
7140
7158
  linuxSecretAvailability = true;
7141
7159
  } catch {
7142
7160
  linuxSecretAvailability = false;
@@ -7160,7 +7178,7 @@ function macKeychainGet(service = SERVICE) {
7160
7178
  if (!nativeKeychainAllowed()) return null;
7161
7179
  if (process.platform !== "darwin") return null;
7162
7180
  try {
7163
- return execSync8(
7181
+ return execSync9(
7164
7182
  `security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
7165
7183
  { encoding: "utf-8", timeout: 5e3 }
7166
7184
  ).trim();
@@ -7173,13 +7191,13 @@ function macKeychainSet(value, service = SERVICE) {
7173
7191
  if (process.platform !== "darwin") return false;
7174
7192
  try {
7175
7193
  try {
7176
- execSync8(
7194
+ execSync9(
7177
7195
  `security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
7178
7196
  { timeout: 5e3 }
7179
7197
  );
7180
7198
  } catch {
7181
7199
  }
7182
- execSync8(
7200
+ execSync9(
7183
7201
  `security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
7184
7202
  { timeout: 5e3 }
7185
7203
  );
@@ -7192,7 +7210,7 @@ function macKeychainDelete(service = SERVICE) {
7192
7210
  if (!nativeKeychainAllowed()) return false;
7193
7211
  if (process.platform !== "darwin") return false;
7194
7212
  try {
7195
- execSync8(
7213
+ execSync9(
7196
7214
  `security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
7197
7215
  { timeout: 5e3 }
7198
7216
  );
@@ -7204,7 +7222,7 @@ function macKeychainDelete(service = SERVICE) {
7204
7222
  function linuxSecretGet(service = SERVICE) {
7205
7223
  if (!linuxSecretAvailable()) return null;
7206
7224
  try {
7207
- return execSync8(
7225
+ return execSync9(
7208
7226
  `secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
7209
7227
  { encoding: "utf-8", timeout: 5e3 }
7210
7228
  ).trim();
@@ -7215,7 +7233,7 @@ function linuxSecretGet(service = SERVICE) {
7215
7233
  function linuxSecretSet(value, service = SERVICE) {
7216
7234
  if (!linuxSecretAvailable()) return false;
7217
7235
  try {
7218
- execSync8(
7236
+ execSync9(
7219
7237
  `echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
7220
7238
  { timeout: 5e3 }
7221
7239
  );
@@ -7228,7 +7246,7 @@ function linuxSecretDelete(service = SERVICE) {
7228
7246
  if (!nativeKeychainAllowed()) return false;
7229
7247
  if (process.platform !== "linux") return false;
7230
7248
  try {
7231
- execSync8(
7249
+ execSync9(
7232
7250
  `secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
7233
7251
  { timeout: 5e3 }
7234
7252
  );
@@ -9428,11 +9446,11 @@ __export(git_staleness_exports, {
9428
9446
  detectStaleFiles: () => detectStaleFiles,
9429
9447
  recordFileRead: () => recordFileRead
9430
9448
  });
9431
- import { execSync as execSync9 } from "child_process";
9449
+ import { execSync as execSync10 } from "child_process";
9432
9450
  import path24 from "path";
9433
9451
  function getHeadCommit(cwd) {
9434
9452
  try {
9435
- return execSync9("git rev-parse --short HEAD", {
9453
+ return execSync10("git rev-parse --short HEAD", {
9436
9454
  cwd,
9437
9455
  timeout: GIT_TIMEOUT_MS,
9438
9456
  encoding: "utf-8"
@@ -9495,7 +9513,7 @@ async function detectStaleFiles(agentId, cwd) {
9495
9513
  const readAt = String(record.read_at ?? "");
9496
9514
  if (!filePath || !readAt) continue;
9497
9515
  try {
9498
- const gitSummary = execSync9(
9516
+ const gitSummary = execSync10(
9499
9517
  `git log -1 --oneline --after=${JSON.stringify(readAt)} --format="%h %an: %s" -- ${JSON.stringify(filePath)}`,
9500
9518
  {
9501
9519
  cwd,
@@ -9539,7 +9557,7 @@ __export(git_task_sweep_exports, {
9539
9557
  matchScore: () => matchScore,
9540
9558
  sweepTasks: () => sweepTasks
9541
9559
  });
9542
- import { execSync as execSync10 } from "child_process";
9560
+ import { execSync as execSync11 } from "child_process";
9543
9561
  function extractKeywords(text) {
9544
9562
  return text.toLowerCase().replace(/[^a-z0-9\s-]/g, " ").split(/\s+/).filter((w) => w.length >= 3 && !STOP_WORDS.has(w));
9545
9563
  }
@@ -9568,7 +9586,7 @@ function matchScore(task, commitMessage, changedFiles) {
9568
9586
  function getRecentCommits(limit = DEFAULT_COMMIT_LIMIT) {
9569
9587
  try {
9570
9588
  const SEPARATOR = "<<SEP>>";
9571
- const output = execSync10(
9589
+ const output = execSync11(
9572
9590
  `git log --format="%h${SEPARATOR}%s${SEPARATOR}%aI" --name-only -n ${limit} -z`,
9573
9591
  { encoding: "utf8", timeout: 1e4 }
9574
9592
  );
@@ -1402,7 +1402,7 @@ __export(exe_daemon_client_exports, {
1402
1402
  });
1403
1403
  import net from "net";
1404
1404
  import os4 from "os";
1405
- import { spawn } from "child_process";
1405
+ import { spawn, execSync as execSync2 } from "child_process";
1406
1406
  import { randomUUID } from "crypto";
1407
1407
  import { existsSync as existsSync6, unlinkSync as unlinkSync2, readFileSync as readFileSync5, openSync, closeSync, statSync } from "fs";
1408
1408
  import path6 from "path";
@@ -1432,6 +1432,14 @@ function handleData(chunk) {
1432
1432
  }
1433
1433
  }
1434
1434
  }
1435
+ function isZombie(pid) {
1436
+ try {
1437
+ const state = execSync2(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
1438
+ return state.startsWith("Z");
1439
+ } catch {
1440
+ return false;
1441
+ }
1442
+ }
1435
1443
  function cleanupStaleFiles() {
1436
1444
  if (existsSync6(PID_PATH)) {
1437
1445
  try {
@@ -1439,7 +1447,11 @@ function cleanupStaleFiles() {
1439
1447
  if (pid > 0) {
1440
1448
  try {
1441
1449
  process.kill(pid, 0);
1442
- return;
1450
+ if (!isZombie(pid)) {
1451
+ return;
1452
+ }
1453
+ process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
1454
+ `);
1443
1455
  } catch {
1444
1456
  }
1445
1457
  }
@@ -1467,8 +1479,8 @@ function findPackageRoot() {
1467
1479
  function getAvailableMemoryGB() {
1468
1480
  if (process.platform === "darwin") {
1469
1481
  try {
1470
- const { execSync: execSync10 } = __require("child_process");
1471
- const vmstat = execSync10("vm_stat", { encoding: "utf8" });
1482
+ const { execSync: execSync11 } = __require("child_process");
1483
+ const vmstat = execSync11("vm_stat", { encoding: "utf8" });
1472
1484
  const pageSize = 16384;
1473
1485
  const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
1474
1486
  const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
@@ -3458,6 +3470,12 @@ async function disposeDatabase() {
3458
3470
  clearInterval(_walCheckpointTimer);
3459
3471
  _walCheckpointTimer = null;
3460
3472
  }
3473
+ if (_client) {
3474
+ try {
3475
+ await _client.execute("PRAGMA wal_checkpoint(PASSIVE)");
3476
+ } catch {
3477
+ }
3478
+ }
3461
3479
  if (_daemonClient) {
3462
3480
  _daemonClient.close();
3463
3481
  _daemonClient = null;
@@ -3494,7 +3512,7 @@ var init_database = __esm({
3494
3512
  // src/lib/keychain.ts
3495
3513
  import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
3496
3514
  import { existsSync as existsSync7, statSync as statSync2 } from "fs";
3497
- import { execSync as execSync2 } from "child_process";
3515
+ import { execSync as execSync3 } from "child_process";
3498
3516
  import path7 from "path";
3499
3517
  import os5 from "os";
3500
3518
  function getKeyDir() {
@@ -3511,13 +3529,13 @@ function linuxSecretAvailable() {
3511
3529
  if (process.platform !== "linux") return false;
3512
3530
  if (linuxSecretAvailability !== null) return linuxSecretAvailability;
3513
3531
  try {
3514
- execSync2("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
3532
+ execSync3("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
3515
3533
  } catch {
3516
3534
  linuxSecretAvailability = false;
3517
3535
  return false;
3518
3536
  }
3519
3537
  try {
3520
- execSync2("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
3538
+ execSync3("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
3521
3539
  linuxSecretAvailability = true;
3522
3540
  } catch {
3523
3541
  linuxSecretAvailability = false;
@@ -3541,7 +3559,7 @@ function macKeychainGet(service = SERVICE) {
3541
3559
  if (!nativeKeychainAllowed()) return null;
3542
3560
  if (process.platform !== "darwin") return null;
3543
3561
  try {
3544
- return execSync2(
3562
+ return execSync3(
3545
3563
  `security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
3546
3564
  { encoding: "utf-8", timeout: 5e3 }
3547
3565
  ).trim();
@@ -3554,13 +3572,13 @@ function macKeychainSet(value, service = SERVICE) {
3554
3572
  if (process.platform !== "darwin") return false;
3555
3573
  try {
3556
3574
  try {
3557
- execSync2(
3575
+ execSync3(
3558
3576
  `security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
3559
3577
  { timeout: 5e3 }
3560
3578
  );
3561
3579
  } catch {
3562
3580
  }
3563
- execSync2(
3581
+ execSync3(
3564
3582
  `security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
3565
3583
  { timeout: 5e3 }
3566
3584
  );
@@ -3573,7 +3591,7 @@ function macKeychainDelete(service = SERVICE) {
3573
3591
  if (!nativeKeychainAllowed()) return false;
3574
3592
  if (process.platform !== "darwin") return false;
3575
3593
  try {
3576
- execSync2(
3594
+ execSync3(
3577
3595
  `security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
3578
3596
  { timeout: 5e3 }
3579
3597
  );
@@ -3585,7 +3603,7 @@ function macKeychainDelete(service = SERVICE) {
3585
3603
  function linuxSecretGet(service = SERVICE) {
3586
3604
  if (!linuxSecretAvailable()) return null;
3587
3605
  try {
3588
- return execSync2(
3606
+ return execSync3(
3589
3607
  `secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
3590
3608
  { encoding: "utf-8", timeout: 5e3 }
3591
3609
  ).trim();
@@ -3596,7 +3614,7 @@ function linuxSecretGet(service = SERVICE) {
3596
3614
  function linuxSecretSet(value, service = SERVICE) {
3597
3615
  if (!linuxSecretAvailable()) return false;
3598
3616
  try {
3599
- execSync2(
3617
+ execSync3(
3600
3618
  `echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
3601
3619
  { timeout: 5e3 }
3602
3620
  );
@@ -3609,7 +3627,7 @@ function linuxSecretDelete(service = SERVICE) {
3609
3627
  if (!nativeKeychainAllowed()) return false;
3610
3628
  if (process.platform !== "linux") return false;
3611
3629
  try {
3612
- execSync2(
3630
+ execSync3(
3613
3631
  `secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
3614
3632
  { timeout: 5e3 }
3615
3633
  );
@@ -6077,7 +6095,7 @@ __export(project_name_exports, {
6077
6095
  _resetCache: () => _resetCache,
6078
6096
  getProjectName: () => getProjectName
6079
6097
  });
6080
- import { execSync as execSync3 } from "child_process";
6098
+ import { execSync as execSync4 } from "child_process";
6081
6099
  import path10 from "path";
6082
6100
  function getProjectName(cwd) {
6083
6101
  const dir = cwd ?? process.cwd();
@@ -6085,7 +6103,7 @@ function getProjectName(cwd) {
6085
6103
  try {
6086
6104
  let repoRoot;
6087
6105
  try {
6088
- const gitCommonDir = execSync3("git rev-parse --path-format=absolute --git-common-dir", {
6106
+ const gitCommonDir = execSync4("git rev-parse --path-format=absolute --git-common-dir", {
6089
6107
  cwd: dir,
6090
6108
  encoding: "utf8",
6091
6109
  timeout: 2e3,
@@ -6093,7 +6111,7 @@ function getProjectName(cwd) {
6093
6111
  }).trim();
6094
6112
  repoRoot = path10.dirname(gitCommonDir);
6095
6113
  } catch {
6096
- repoRoot = execSync3("git rev-parse --show-toplevel", {
6114
+ repoRoot = execSync4("git rev-parse --show-toplevel", {
6097
6115
  cwd: dir,
6098
6116
  encoding: "utf8",
6099
6117
  timeout: 2e3,
@@ -6127,14 +6145,14 @@ var file_grep_exports = {};
6127
6145
  __export(file_grep_exports, {
6128
6146
  grepProjectFiles: () => grepProjectFiles
6129
6147
  });
6130
- import { execSync as execSync4 } from "child_process";
6148
+ import { execSync as execSync5 } from "child_process";
6131
6149
  import { readFileSync as readFileSync6, readdirSync as readdirSync2, statSync as statSync4, existsSync as existsSync10 } from "fs";
6132
6150
  import path11 from "path";
6133
6151
  import crypto2 from "crypto";
6134
6152
  function hasRipgrep() {
6135
6153
  if (_hasRg === null) {
6136
6154
  try {
6137
- execSync4("rg --version", { stdio: "ignore", timeout: 2e3 });
6155
+ execSync5("rg --version", { stdio: "ignore", timeout: 2e3 });
6138
6156
  _hasRg = true;
6139
6157
  } catch {
6140
6158
  _hasRg = false;
@@ -6200,7 +6218,7 @@ function grepWithRipgrep(pattern, projectRoot, patterns) {
6200
6218
  const globs = (patterns ?? DEFAULT_PATTERNS).map((p) => `--glob '${p}'`).join(" ");
6201
6219
  const excludes = EXCLUDE_DIRS.map((d) => `--glob '!${d}'`).join(" ");
6202
6220
  const cmd = `rg -i -c --hidden --no-config --no-ignore '${pattern.replace(/'/g, "\\'")}' . ${globs} ${excludes} --max-filesize ${MAX_FILE_SIZE} 2>/dev/null || true`;
6203
- const output = execSync4(cmd, {
6221
+ const output = execSync5(cmd, {
6204
6222
  cwd: projectRoot,
6205
6223
  encoding: "utf8",
6206
6224
  timeout: 3e3,
@@ -6215,12 +6233,12 @@ function grepWithRipgrep(pattern, projectRoot, patterns) {
6215
6233
  const matchCount = parseInt(line.slice(colonIdx + 1));
6216
6234
  if (isNaN(matchCount) || matchCount === 0) continue;
6217
6235
  try {
6218
- const firstMatch = execSync4(
6236
+ const firstMatch = execSync5(
6219
6237
  `rg -i -n --hidden '${pattern.replace(/'/g, "\\'")}' '${filePath}' --max-count 1 2>/dev/null | head -1`,
6220
6238
  { cwd: projectRoot, encoding: "utf8", timeout: 1e3 }
6221
6239
  ).trim();
6222
6240
  const lineNum = parseInt(firstMatch.split(":")[0] ?? "1");
6223
- const totalLines = execSync4(`wc -l < '${filePath}'`, {
6241
+ const totalLines = execSync5(`wc -l < '${filePath}'`, {
6224
6242
  cwd: projectRoot,
6225
6243
  encoding: "utf8",
6226
6244
  timeout: 1e3
@@ -7571,7 +7589,7 @@ var init_hybrid_search = __esm({
7571
7589
  });
7572
7590
 
7573
7591
  // src/lib/session-key.ts
7574
- import { execSync as execSync5 } from "child_process";
7592
+ import { execSync as execSync6 } from "child_process";
7575
7593
  function normalizeCommand(command) {
7576
7594
  const trimmed = command.trim().toLowerCase();
7577
7595
  const parts = trimmed.split(/[\\/]/);
@@ -7590,7 +7608,7 @@ function resolveRuntimeProcess() {
7590
7608
  let pid = process.ppid;
7591
7609
  for (let i = 0; i < 10; i++) {
7592
7610
  try {
7593
- const info = execSync5(`ps -p ${pid} -o ppid=,comm=`, {
7611
+ const info = execSync6(`ps -p ${pid} -o ppid=,comm=`, {
7594
7612
  encoding: "utf8",
7595
7613
  timeout: 2e3
7596
7614
  }).trim();
@@ -7653,7 +7671,7 @@ var init_agent_context = __esm({
7653
7671
 
7654
7672
  // src/lib/active-agent.ts
7655
7673
  import { readFileSync as readFileSync7, writeFileSync as writeFileSync4, mkdirSync as mkdirSync3, unlinkSync as unlinkSync3, readdirSync as readdirSync3 } from "fs";
7656
- import { execSync as execSync6 } from "child_process";
7674
+ import { execSync as execSync7 } from "child_process";
7657
7675
  import path12 from "path";
7658
7676
  function isNameWithOptionalInstance(candidate, baseName) {
7659
7677
  if (candidate === baseName) return true;
@@ -7747,7 +7765,7 @@ function getActiveAgent() {
7747
7765
  } catch {
7748
7766
  }
7749
7767
  try {
7750
- const sessionName = execSync6(
7768
+ const sessionName = execSync7(
7751
7769
  "tmux display-message -p '#{session_name}' 2>/dev/null",
7752
7770
  { encoding: "utf8", timeout: 2e3 }
7753
7771
  ).trim();
@@ -7966,7 +7984,7 @@ var init_transport = __esm({
7966
7984
  });
7967
7985
 
7968
7986
  // src/lib/cc-agent-support.ts
7969
- import { execSync as execSync7 } from "child_process";
7987
+ import { execSync as execSync8 } from "child_process";
7970
7988
  var init_cc_agent_support = __esm({
7971
7989
  "src/lib/cc-agent-support.ts"() {
7972
7990
  "use strict";
@@ -8243,7 +8261,7 @@ var catchup_brief_exports = {};
8243
8261
  __export(catchup_brief_exports, {
8244
8262
  buildCatchupBrief: () => buildCatchupBrief
8245
8263
  });
8246
- import { execSync as execSync8 } from "child_process";
8264
+ import { execSync as execSync9 } from "child_process";
8247
8265
  function clipText(text, maxChars) {
8248
8266
  if (text.length <= maxChars) return text;
8249
8267
  if (maxChars <= 1) return "\u2026";
@@ -8289,7 +8307,7 @@ ${clipText(checkpoint.raw_text, MAX_CHECKPOINT_CHARS)}`
8289
8307
  } catch {
8290
8308
  }
8291
8309
  try {
8292
- const gitLog = execSync8(
8310
+ const gitLog = execSync9(
8293
8311
  `git log --oneline --since=${JSON.stringify(lastTimestamp)} --format="%h %an: %s" | head -10`,
8294
8312
  { cwd, timeout: 3e3, encoding: "utf-8" }
8295
8313
  ).trim();
@@ -8367,11 +8385,11 @@ __export(git_staleness_exports, {
8367
8385
  detectStaleFiles: () => detectStaleFiles,
8368
8386
  recordFileRead: () => recordFileRead
8369
8387
  });
8370
- import { execSync as execSync9 } from "child_process";
8388
+ import { execSync as execSync10 } from "child_process";
8371
8389
  import path19 from "path";
8372
8390
  function getHeadCommit(cwd) {
8373
8391
  try {
8374
- return execSync9("git rev-parse --short HEAD", {
8392
+ return execSync10("git rev-parse --short HEAD", {
8375
8393
  cwd,
8376
8394
  timeout: GIT_TIMEOUT_MS,
8377
8395
  encoding: "utf-8"
@@ -8434,7 +8452,7 @@ async function detectStaleFiles(agentId, cwd) {
8434
8452
  const readAt = String(record.read_at ?? "");
8435
8453
  if (!filePath || !readAt) continue;
8436
8454
  try {
8437
- const gitSummary = execSync9(
8455
+ const gitSummary = execSync10(
8438
8456
  `git log -1 --oneline --after=${JSON.stringify(readAt)} --format="%h %an: %s" -- ${JSON.stringify(filePath)}`,
8439
8457
  {
8440
8458
  cwd,