@askexenow/exe-os 0.8.64 → 0.8.68

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 (55) hide show
  1. package/dist/bin/cleanup-stale-review-tasks.js +8 -7
  2. package/dist/bin/cli.js +215 -120
  3. package/dist/bin/exe-assign.js +11 -10
  4. package/dist/bin/exe-boot.js +83 -78
  5. package/dist/bin/exe-call.js +33 -1
  6. package/dist/bin/exe-cloud.js +3 -2
  7. package/dist/bin/exe-dispatch.js +31 -30
  8. package/dist/bin/exe-gateway.js +33 -32
  9. package/dist/bin/exe-heartbeat.js +21 -20
  10. package/dist/bin/exe-launch-agent.js +48 -16
  11. package/dist/bin/exe-link.js +16 -11
  12. package/dist/bin/exe-new-employee.js +20 -19
  13. package/dist/bin/exe-pending-messages.js +7 -6
  14. package/dist/bin/exe-pending-reviews.js +16 -15
  15. package/dist/bin/exe-rename.js +12 -11
  16. package/dist/bin/exe-review.js +4 -3
  17. package/dist/bin/exe-session-cleanup.js +20 -19
  18. package/dist/bin/exe-settings.js +3 -2
  19. package/dist/bin/exe-start.sh +2 -2
  20. package/dist/bin/exe-status.js +16 -15
  21. package/dist/bin/exe-team.js +4 -3
  22. package/dist/bin/git-sweep.js +31 -30
  23. package/dist/bin/install.js +284 -113
  24. package/dist/bin/scan-tasks.js +33 -32
  25. package/dist/bin/setup.js +114 -30
  26. package/dist/gateway/index.js +32 -31
  27. package/dist/hooks/bug-report-worker.js +58 -26
  28. package/dist/hooks/commit-complete.js +31 -30
  29. package/dist/hooks/ingest-worker.js +58 -57
  30. package/dist/hooks/post-compact.js +10 -9
  31. package/dist/hooks/pre-compact.js +31 -30
  32. package/dist/hooks/pre-tool-use.js +46 -14
  33. package/dist/hooks/prompt-ingest-worker.js +15 -14
  34. package/dist/hooks/prompt-submit.js +15 -14
  35. package/dist/hooks/response-ingest-worker.js +8 -7
  36. package/dist/hooks/session-end.js +14 -13
  37. package/dist/hooks/session-start.js +10 -9
  38. package/dist/hooks/stop.js +10 -9
  39. package/dist/hooks/subagent-stop.js +10 -9
  40. package/dist/hooks/summary-worker.js +41 -36
  41. package/dist/index.js +43 -42
  42. package/dist/lib/cloud-sync.js +16 -11
  43. package/dist/lib/employees.js +33 -1
  44. package/dist/lib/exe-daemon.js +56 -55
  45. package/dist/lib/messaging.js +9 -8
  46. package/dist/lib/tasks.js +27 -26
  47. package/dist/lib/tmux-routing.js +29 -28
  48. package/dist/mcp/server.js +94 -62
  49. package/dist/mcp/tools/create-task.js +60 -28
  50. package/dist/mcp/tools/list-tasks.js +10 -9
  51. package/dist/mcp/tools/send-message.js +11 -10
  52. package/dist/mcp/tools/update-task.js +21 -20
  53. package/dist/runtime/index.js +31 -30
  54. package/dist/tui/App.js +67 -35
  55. package/package.json +1 -1
@@ -1584,9 +1584,10 @@ ${p.content}`).join("\n\n");
1584
1584
 
1585
1585
  // src/lib/employees.ts
1586
1586
  import { readFile as readFile3, writeFile as writeFile3, mkdir as mkdir3 } from "fs/promises";
1587
- import { existsSync as existsSync4, symlinkSync, readlinkSync, readFileSync as readFileSync2 } from "fs";
1587
+ import { existsSync as existsSync4, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
1588
1588
  import { execSync } from "child_process";
1589
1589
  import path4 from "path";
1590
+ import os3 from "os";
1590
1591
  var EMPLOYEES_PATH;
1591
1592
  var init_employees = __esm({
1592
1593
  "src/lib/employees.ts"() {
@@ -1599,11 +1600,11 @@ var init_employees = __esm({
1599
1600
  // src/lib/notifications.ts
1600
1601
  import crypto from "crypto";
1601
1602
  import path5 from "path";
1602
- import os3 from "os";
1603
+ import os4 from "os";
1603
1604
  import {
1604
1605
  readFileSync as readFileSync3,
1605
1606
  readdirSync as readdirSync2,
1606
- unlinkSync,
1607
+ unlinkSync as unlinkSync2,
1607
1608
  existsSync as existsSync5,
1608
1609
  rmdirSync
1609
1610
  } from "fs";
@@ -1616,12 +1617,12 @@ var init_notifications = __esm({
1616
1617
 
1617
1618
  // src/lib/session-registry.ts
1618
1619
  import path6 from "path";
1619
- import os4 from "os";
1620
+ import os5 from "os";
1620
1621
  var REGISTRY_PATH;
1621
1622
  var init_session_registry = __esm({
1622
1623
  "src/lib/session-registry.ts"() {
1623
1624
  "use strict";
1624
- REGISTRY_PATH = path6.join(os4.homedir(), ".exe-os", "session-registry.json");
1625
+ REGISTRY_PATH = path6.join(os5.homedir(), ".exe-os", "session-registry.json");
1625
1626
  }
1626
1627
  });
1627
1628
 
@@ -1670,21 +1671,21 @@ var init_provider_table = __esm({
1670
1671
  });
1671
1672
 
1672
1673
  // src/lib/intercom-queue.ts
1673
- import { readFileSync as readFileSync4, writeFileSync, renameSync as renameSync2, existsSync as existsSync6, mkdirSync as mkdirSync2 } from "fs";
1674
+ import { readFileSync as readFileSync4, writeFileSync as writeFileSync2, renameSync as renameSync3, existsSync as existsSync6, mkdirSync as mkdirSync2 } from "fs";
1674
1675
  import path7 from "path";
1675
- import os5 from "os";
1676
+ import os6 from "os";
1676
1677
  var QUEUE_PATH, TTL_MS, INTERCOM_LOG;
1677
1678
  var init_intercom_queue = __esm({
1678
1679
  "src/lib/intercom-queue.ts"() {
1679
1680
  "use strict";
1680
- QUEUE_PATH = path7.join(os5.homedir(), ".exe-os", "intercom-queue.json");
1681
+ QUEUE_PATH = path7.join(os6.homedir(), ".exe-os", "intercom-queue.json");
1681
1682
  TTL_MS = 60 * 60 * 1e3;
1682
- INTERCOM_LOG = path7.join(os5.homedir(), ".exe-os", "intercom.log");
1683
+ INTERCOM_LOG = path7.join(os6.homedir(), ".exe-os", "intercom.log");
1683
1684
  }
1684
1685
  });
1685
1686
 
1686
1687
  // src/lib/license.ts
1687
- import { readFileSync as readFileSync5, writeFileSync as writeFileSync2, existsSync as existsSync7, mkdirSync as mkdirSync3 } from "fs";
1688
+ import { readFileSync as readFileSync5, writeFileSync as writeFileSync3, existsSync as existsSync7, mkdirSync as mkdirSync3 } from "fs";
1688
1689
  import { randomUUID as randomUUID2 } from "crypto";
1689
1690
  import path8 from "path";
1690
1691
  import { jwtVerify, importSPKI } from "jose";
@@ -1716,7 +1717,7 @@ var init_plan_limits = __esm({
1716
1717
 
1717
1718
  // src/lib/tmux-routing.ts
1718
1719
  import path10 from "path";
1719
- import os6 from "os";
1720
+ import os7 from "os";
1720
1721
  import { fileURLToPath as fileURLToPath2 } from "url";
1721
1722
  var SPAWN_LOCK_DIR, SESSION_CACHE, INTERCOM_LOG2, DEBOUNCE_FILE, DEBOUNCE_CLEANUP_AGE_MS;
1722
1723
  var init_tmux_routing = __esm({
@@ -1730,9 +1731,9 @@ var init_tmux_routing = __esm({
1730
1731
  init_provider_table();
1731
1732
  init_intercom_queue();
1732
1733
  init_plan_limits();
1733
- SPAWN_LOCK_DIR = path10.join(os6.homedir(), ".exe-os", "spawn-locks");
1734
- SESSION_CACHE = path10.join(os6.homedir(), ".exe-os", "session-cache");
1735
- INTERCOM_LOG2 = path10.join(os6.homedir(), ".exe-os", "intercom.log");
1734
+ SPAWN_LOCK_DIR = path10.join(os7.homedir(), ".exe-os", "spawn-locks");
1735
+ SESSION_CACHE = path10.join(os7.homedir(), ".exe-os", "session-cache");
1736
+ INTERCOM_LOG2 = path10.join(os7.homedir(), ".exe-os", "intercom.log");
1736
1737
  DEBOUNCE_FILE = path10.join(SESSION_CACHE, "intercom-debounce.json");
1737
1738
  DEBOUNCE_CLEANUP_AGE_MS = 5 * 60 * 1e3;
1738
1739
  }
@@ -1740,7 +1741,7 @@ var init_tmux_routing = __esm({
1740
1741
 
1741
1742
  // src/lib/tasks-review.ts
1742
1743
  import path11 from "path";
1743
- import { existsSync as existsSync9, readdirSync as readdirSync3, unlinkSync as unlinkSync2 } from "fs";
1744
+ import { existsSync as existsSync9, readdirSync as readdirSync3, unlinkSync as unlinkSync3 } from "fs";
1744
1745
  async function listPendingReviews(limit, sessionScope) {
1745
1746
  const client = getClient();
1746
1747
  if (sessionScope) {
@@ -939,16 +939,17 @@ var init_database = __esm({
939
939
  });
940
940
 
941
941
  // src/bin/exe-rename.ts
942
- import { readFileSync as readFileSync3, writeFileSync, renameSync as renameSync2, unlinkSync, existsSync as existsSync3 } from "fs";
942
+ import { readFileSync as readFileSync3, writeFileSync as writeFileSync2, renameSync as renameSync3, unlinkSync as unlinkSync2, existsSync as existsSync3 } from "fs";
943
943
  import { execSync as execSync2 } from "child_process";
944
944
  import path3 from "path";
945
945
  import { homedir } from "os";
946
946
 
947
947
  // src/lib/employees.ts
948
948
  import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
949
- import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2 } from "fs";
949
+ import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
950
950
  import { execSync } from "child_process";
951
951
  import path2 from "path";
952
+ import os2 from "os";
952
953
 
953
954
  // src/lib/config.ts
954
955
  import { readFile, writeFile, mkdir, chmod } from "fs/promises";
@@ -1277,7 +1278,7 @@ async function renameEmployee(oldName, newName, opts = {}) {
1277
1278
  undo: () => {
1278
1279
  employee.name = originalName;
1279
1280
  employee.systemPrompt = originalPrompt;
1280
- writeFileSync(rosterPath, JSON.stringify(employees, null, 2) + "\n", "utf-8");
1281
+ writeFileSync2(rosterPath, JSON.stringify(employees, null, 2) + "\n", "utf-8");
1281
1282
  }
1282
1283
  });
1283
1284
  const oldIdentityPath = path3.join(identityDir, `${oldName}.md`);
@@ -1288,14 +1289,14 @@ async function renameEmployee(oldName, newName, opts = {}) {
1288
1289
  /^(agent_id:\s*)\S+/m,
1289
1290
  `$1${newName}`
1290
1291
  );
1291
- renameSync2(oldIdentityPath, newIdentityPath);
1292
- writeFileSync(newIdentityPath, updatedContent, "utf-8");
1292
+ renameSync3(oldIdentityPath, newIdentityPath);
1293
+ writeFileSync2(newIdentityPath, updatedContent, "utf-8");
1293
1294
  rollbackStack.push({
1294
1295
  description: "restore identity file",
1295
1296
  undo: () => {
1296
1297
  if (existsSync3(newIdentityPath)) {
1297
- writeFileSync(newIdentityPath, content, "utf-8");
1298
- renameSync2(newIdentityPath, oldIdentityPath);
1298
+ writeFileSync2(newIdentityPath, content, "utf-8");
1299
+ renameSync3(newIdentityPath, oldIdentityPath);
1299
1300
  }
1300
1301
  }
1301
1302
  });
@@ -1304,13 +1305,13 @@ async function renameEmployee(oldName, newName, opts = {}) {
1304
1305
  const newAgentPath = path3.join(agentsDir, `${newName}.md`);
1305
1306
  if (existsSync3(oldAgentPath)) {
1306
1307
  const agentContent = readFileSync3(oldAgentPath, "utf-8");
1307
- renameSync2(oldAgentPath, newAgentPath);
1308
+ renameSync3(oldAgentPath, newAgentPath);
1308
1309
  rollbackStack.push({
1309
1310
  description: "restore agent file",
1310
1311
  undo: () => {
1311
1312
  if (existsSync3(newAgentPath)) {
1312
- renameSync2(newAgentPath, oldAgentPath);
1313
- writeFileSync(oldAgentPath, agentContent, "utf-8");
1313
+ renameSync3(newAgentPath, oldAgentPath);
1314
+ writeFileSync2(oldAgentPath, agentContent, "utf-8");
1314
1315
  }
1315
1316
  }
1316
1317
  });
@@ -1393,7 +1394,7 @@ function removeOldSymlinks(name) {
1393
1394
  const linkPath = path3.join(binDir, `${name}${suffix}`);
1394
1395
  if (existsSync3(linkPath)) {
1395
1396
  try {
1396
- unlinkSync(linkPath);
1397
+ unlinkSync2(linkPath);
1397
1398
  } catch {
1398
1399
  }
1399
1400
  }
@@ -1533,9 +1533,10 @@ import { randomUUID as randomUUID2 } from "crypto";
1533
1533
  // src/lib/employees.ts
1534
1534
  init_config();
1535
1535
  import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
1536
- import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2 } from "fs";
1536
+ import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
1537
1537
  import { execSync } from "child_process";
1538
1538
  import path2 from "path";
1539
+ import os2 from "os";
1539
1540
  var EMPLOYEES_PATH = path2.join(EXE_AI_DIR, "exe-employees.json");
1540
1541
  async function loadEmployees(employeesPath = EMPLOYEES_PATH) {
1541
1542
  if (!existsSync2(employeesPath)) {
@@ -1562,11 +1563,11 @@ init_database();
1562
1563
  import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
1563
1564
  import { existsSync as existsSync3 } from "fs";
1564
1565
  import path3 from "path";
1565
- import os2 from "os";
1566
+ import os3 from "os";
1566
1567
  var SERVICE = "exe-mem";
1567
1568
  var ACCOUNT = "master-key";
1568
1569
  function getKeyDir() {
1569
- return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path3.join(os2.homedir(), ".exe-os");
1570
+ return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path3.join(os3.homedir(), ".exe-os");
1570
1571
  }
1571
1572
  function getKeyPath() {
1572
1573
  return path3.join(getKeyDir(), "master.key");
@@ -1894,9 +1894,10 @@ var init_intercom_queue = __esm({
1894
1894
 
1895
1895
  // src/lib/employees.ts
1896
1896
  import { readFile as readFile3, writeFile as writeFile3, mkdir as mkdir3 } from "fs/promises";
1897
- import { existsSync as existsSync5, symlinkSync, readlinkSync, readFileSync as readFileSync3 } from "fs";
1897
+ import { existsSync as existsSync5, symlinkSync, readlinkSync, readFileSync as readFileSync3, renameSync as renameSync3, unlinkSync, writeFileSync as writeFileSync2 } from "fs";
1898
1898
  import { execSync as execSync3 } from "child_process";
1899
1899
  import path6 from "path";
1900
+ import os5 from "os";
1900
1901
  async function loadEmployees(employeesPath = EMPLOYEES_PATH) {
1901
1902
  if (!existsSync5(employeesPath)) {
1902
1903
  return [];
@@ -1921,7 +1922,7 @@ var init_employees = __esm({
1921
1922
  });
1922
1923
 
1923
1924
  // src/lib/license.ts
1924
- import { readFileSync as readFileSync4, writeFileSync as writeFileSync2, existsSync as existsSync6, mkdirSync as mkdirSync3 } from "fs";
1925
+ import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, existsSync as existsSync6, mkdirSync as mkdirSync3 } from "fs";
1925
1926
  import { randomUUID as randomUUID2 } from "crypto";
1926
1927
  import path7 from "path";
1927
1928
  import { jwtVerify, importSPKI } from "jose";
@@ -1952,9 +1953,9 @@ var init_plan_limits = __esm({
1952
1953
  });
1953
1954
 
1954
1955
  // src/lib/tmux-routing.ts
1955
- import { readFileSync as readFileSync6, writeFileSync as writeFileSync3, mkdirSync as mkdirSync4, existsSync as existsSync8, appendFileSync } from "fs";
1956
+ import { readFileSync as readFileSync6, writeFileSync as writeFileSync4, mkdirSync as mkdirSync4, existsSync as existsSync8, appendFileSync } from "fs";
1956
1957
  import path9 from "path";
1957
- import os5 from "os";
1958
+ import os6 from "os";
1958
1959
  import { fileURLToPath } from "url";
1959
1960
  function getMySession() {
1960
1961
  return getTransport().getMySession();
@@ -1995,7 +1996,7 @@ function readDebounceState() {
1995
1996
  function writeDebounceState(state) {
1996
1997
  try {
1997
1998
  if (!existsSync8(SESSION_CACHE)) mkdirSync4(SESSION_CACHE, { recursive: true });
1998
- writeFileSync3(DEBOUNCE_FILE, JSON.stringify(state));
1999
+ writeFileSync4(DEBOUNCE_FILE, JSON.stringify(state));
1999
2000
  } catch {
2000
2001
  }
2001
2002
  }
@@ -2097,10 +2098,10 @@ var init_tmux_routing = __esm({
2097
2098
  init_provider_table();
2098
2099
  init_intercom_queue();
2099
2100
  init_plan_limits();
2100
- SPAWN_LOCK_DIR = path9.join(os5.homedir(), ".exe-os", "spawn-locks");
2101
- SESSION_CACHE = path9.join(os5.homedir(), ".exe-os", "session-cache");
2101
+ SPAWN_LOCK_DIR = path9.join(os6.homedir(), ".exe-os", "spawn-locks");
2102
+ SESSION_CACHE = path9.join(os6.homedir(), ".exe-os", "session-cache");
2102
2103
  INTERCOM_DEBOUNCE_MS = 3e4;
2103
- INTERCOM_LOG2 = path9.join(os5.homedir(), ".exe-os", "intercom.log");
2104
+ INTERCOM_LOG2 = path9.join(os6.homedir(), ".exe-os", "intercom.log");
2104
2105
  DEBOUNCE_FILE = path9.join(SESSION_CACHE, "intercom-debounce.json");
2105
2106
  DEBOUNCE_CLEANUP_AGE_MS = 5 * 60 * 1e3;
2106
2107
  BUSY_PATTERN = /[✻✽✶✳·].*…|Running…/;
@@ -2177,7 +2178,7 @@ var init_project_name = __esm({
2177
2178
  import net from "net";
2178
2179
  import { spawn } from "child_process";
2179
2180
  import { randomUUID as randomUUID3 } from "crypto";
2180
- import { existsSync as existsSync9, unlinkSync, readFileSync as readFileSync7, openSync, closeSync, statSync } from "fs";
2181
+ import { existsSync as existsSync9, unlinkSync as unlinkSync2, readFileSync as readFileSync7, openSync, closeSync, statSync } from "fs";
2181
2182
  import path11 from "path";
2182
2183
  import { fileURLToPath as fileURLToPath2 } from "url";
2183
2184
  function handleData(chunk) {
@@ -2217,11 +2218,11 @@ function cleanupStaleFiles() {
2217
2218
  } catch {
2218
2219
  }
2219
2220
  try {
2220
- unlinkSync(PID_PATH);
2221
+ unlinkSync2(PID_PATH);
2221
2222
  } catch {
2222
2223
  }
2223
2224
  try {
2224
- unlinkSync(SOCKET_PATH);
2225
+ unlinkSync2(SOCKET_PATH);
2225
2226
  } catch {
2226
2227
  }
2227
2228
  }
@@ -2283,7 +2284,7 @@ function acquireSpawnLock() {
2283
2284
  const stat = statSync(SPAWN_LOCK_PATH);
2284
2285
  if (Date.now() - stat.mtimeMs > SPAWN_LOCK_STALE_MS) {
2285
2286
  try {
2286
- unlinkSync(SPAWN_LOCK_PATH);
2287
+ unlinkSync2(SPAWN_LOCK_PATH);
2287
2288
  } catch {
2288
2289
  }
2289
2290
  try {
@@ -2300,7 +2301,7 @@ function acquireSpawnLock() {
2300
2301
  }
2301
2302
  function releaseSpawnLock() {
2302
2303
  try {
2303
- unlinkSync(SPAWN_LOCK_PATH);
2304
+ unlinkSync2(SPAWN_LOCK_PATH);
2304
2305
  } catch {
2305
2306
  }
2306
2307
  }
@@ -2431,11 +2432,11 @@ function killAndRespawnDaemon() {
2431
2432
  _connected = false;
2432
2433
  _buffer = "";
2433
2434
  try {
2434
- unlinkSync(PID_PATH);
2435
+ unlinkSync2(PID_PATH);
2435
2436
  } catch {
2436
2437
  }
2437
2438
  try {
2438
- unlinkSync(SOCKET_PATH);
2439
+ unlinkSync2(SOCKET_PATH);
2439
2440
  } catch {
2440
2441
  }
2441
2442
  spawnDaemon();
@@ -2585,11 +2586,11 @@ var init_embedder = __esm({
2585
2586
  // src/lib/notifications.ts
2586
2587
  import crypto from "crypto";
2587
2588
  import path12 from "path";
2588
- import os6 from "os";
2589
+ import os7 from "os";
2589
2590
  import {
2590
2591
  readFileSync as readFileSync8,
2591
2592
  readdirSync as readdirSync2,
2592
- unlinkSync as unlinkSync2,
2593
+ unlinkSync as unlinkSync3,
2593
2594
  existsSync as existsSync10,
2594
2595
  rmdirSync
2595
2596
  } from "fs";
@@ -2636,7 +2637,7 @@ __export(tasks_review_exports, {
2636
2637
  listPendingReviews: () => listPendingReviews
2637
2638
  });
2638
2639
  import path13 from "path";
2639
- import { existsSync as existsSync11, readdirSync as readdirSync3, unlinkSync as unlinkSync3 } from "fs";
2640
+ import { existsSync as existsSync11, readdirSync as readdirSync3, unlinkSync as unlinkSync4 } from "fs";
2640
2641
  async function countPendingReviews(sessionScope) {
2641
2642
  const client = getClient();
2642
2643
  if (sessionScope) {
@@ -2908,7 +2909,7 @@ async function cleanupReviewFile(row, taskFile, _baseDir) {
2908
2909
  if (existsSync11(cacheDir)) {
2909
2910
  for (const f of readdirSync3(cacheDir)) {
2910
2911
  if (f.startsWith("review-notified-")) {
2911
- unlinkSync3(path13.join(cacheDir, f));
2912
+ unlinkSync4(path13.join(cacheDir, f));
2912
2913
  }
2913
2914
  }
2914
2915
  }
@@ -208,7 +208,7 @@ function isMainModule(importMetaUrl) {
208
208
  }
209
209
 
210
210
  // src/lib/cloud-sync.ts
211
- import { readFileSync as readFileSync4, writeFileSync as writeFileSync2, existsSync as existsSync4, readdirSync, mkdirSync as mkdirSync2, appendFileSync, unlinkSync, openSync, closeSync } from "fs";
211
+ import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, existsSync as existsSync4, readdirSync, mkdirSync as mkdirSync2, appendFileSync, unlinkSync as unlinkSync2, openSync, closeSync } from "fs";
212
212
  import crypto2 from "crypto";
213
213
  import path4 from "path";
214
214
  import { homedir } from "os";
@@ -233,9 +233,10 @@ var DEVICE_ID_PATH = path2.join(EXE_AI_DIR, "device-id");
233
233
 
234
234
  // src/lib/employees.ts
235
235
  import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
236
- import { existsSync as existsSync3, symlinkSync, readlinkSync, readFileSync as readFileSync3 } from "fs";
236
+ import { existsSync as existsSync3, symlinkSync, readlinkSync, readFileSync as readFileSync3, renameSync as renameSync2, unlinkSync, writeFileSync as writeFileSync2 } from "fs";
237
237
  import { execSync } from "child_process";
238
238
  import path3 from "path";
239
+ import os2 from "os";
239
240
  var EMPLOYEES_PATH = path3.join(EXE_AI_DIR, "exe-employees.json");
240
241
 
241
242
  // src/lib/cloud-sync.ts
@@ -125,9 +125,9 @@ if tmux has-session -t "$SESSION" 2>/dev/null; then
125
125
  exit 1
126
126
  fi
127
127
 
128
- # Create session and launch COO
128
+ # Create session and launch COO with full identity + behaviors + bypass permissions
129
129
  tmux new-session -d -s "$SESSION" -c "$PWD"
130
- tmux send-keys -t "$SESSION" "$COO_NAME" Enter
130
+ tmux send-keys -t "$SESSION" "exe-launch-agent --agent $COO_NAME" Enter
131
131
 
132
132
  # Attach user to session
133
133
  exec tmux attach -t "$SESSION"
@@ -211,9 +211,10 @@ var init_config = __esm({
211
211
 
212
212
  // src/lib/employees.ts
213
213
  import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
214
- import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2 } from "fs";
214
+ import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
215
215
  import { execSync } from "child_process";
216
216
  import path2 from "path";
217
+ import os2 from "os";
217
218
  async function loadEmployees(employeesPath = EMPLOYEES_PATH) {
218
219
  if (!existsSync2(employeesPath)) {
219
220
  return [];
@@ -1620,12 +1621,12 @@ ${p.content}`).join("\n\n");
1620
1621
 
1621
1622
  // src/lib/session-registry.ts
1622
1623
  import path5 from "path";
1623
- import os3 from "os";
1624
+ import os4 from "os";
1624
1625
  var REGISTRY_PATH;
1625
1626
  var init_session_registry = __esm({
1626
1627
  "src/lib/session-registry.ts"() {
1627
1628
  "use strict";
1628
- REGISTRY_PATH = path5.join(os3.homedir(), ".exe-os", "session-registry.json");
1629
+ REGISTRY_PATH = path5.join(os4.homedir(), ".exe-os", "session-registry.json");
1629
1630
  }
1630
1631
  });
1631
1632
 
@@ -1801,21 +1802,21 @@ var init_provider_table = __esm({
1801
1802
  });
1802
1803
 
1803
1804
  // src/lib/intercom-queue.ts
1804
- import { readFileSync as readFileSync3, writeFileSync, renameSync as renameSync2, existsSync as existsSync5, mkdirSync as mkdirSync2 } from "fs";
1805
+ import { readFileSync as readFileSync3, writeFileSync as writeFileSync2, renameSync as renameSync3, existsSync as existsSync5, mkdirSync as mkdirSync2 } from "fs";
1805
1806
  import path6 from "path";
1806
- import os4 from "os";
1807
+ import os5 from "os";
1807
1808
  var QUEUE_PATH, TTL_MS, INTERCOM_LOG;
1808
1809
  var init_intercom_queue = __esm({
1809
1810
  "src/lib/intercom-queue.ts"() {
1810
1811
  "use strict";
1811
- QUEUE_PATH = path6.join(os4.homedir(), ".exe-os", "intercom-queue.json");
1812
+ QUEUE_PATH = path6.join(os5.homedir(), ".exe-os", "intercom-queue.json");
1812
1813
  TTL_MS = 60 * 60 * 1e3;
1813
- INTERCOM_LOG = path6.join(os4.homedir(), ".exe-os", "intercom.log");
1814
+ INTERCOM_LOG = path6.join(os5.homedir(), ".exe-os", "intercom.log");
1814
1815
  }
1815
1816
  });
1816
1817
 
1817
1818
  // src/lib/license.ts
1818
- import { readFileSync as readFileSync4, writeFileSync as writeFileSync2, existsSync as existsSync6, mkdirSync as mkdirSync3 } from "fs";
1819
+ import { readFileSync as readFileSync4, writeFileSync as writeFileSync3, existsSync as existsSync6, mkdirSync as mkdirSync3 } from "fs";
1819
1820
  import { randomUUID as randomUUID2 } from "crypto";
1820
1821
  import path7 from "path";
1821
1822
  import { jwtVerify, importSPKI } from "jose";
@@ -1846,9 +1847,9 @@ var init_plan_limits = __esm({
1846
1847
  });
1847
1848
 
1848
1849
  // src/lib/tmux-routing.ts
1849
- import { readFileSync as readFileSync6, writeFileSync as writeFileSync3, mkdirSync as mkdirSync4, existsSync as existsSync8, appendFileSync } from "fs";
1850
+ import { readFileSync as readFileSync6, writeFileSync as writeFileSync4, mkdirSync as mkdirSync4, existsSync as existsSync8, appendFileSync } from "fs";
1850
1851
  import path9 from "path";
1851
- import os5 from "os";
1852
+ import os6 from "os";
1852
1853
  import { fileURLToPath as fileURLToPath2 } from "url";
1853
1854
  function getMySession() {
1854
1855
  return getTransport().getMySession();
@@ -1890,9 +1891,9 @@ var init_tmux_routing = __esm({
1890
1891
  init_provider_table();
1891
1892
  init_intercom_queue();
1892
1893
  init_plan_limits();
1893
- SPAWN_LOCK_DIR = path9.join(os5.homedir(), ".exe-os", "spawn-locks");
1894
- SESSION_CACHE = path9.join(os5.homedir(), ".exe-os", "session-cache");
1895
- INTERCOM_LOG2 = path9.join(os5.homedir(), ".exe-os", "intercom.log");
1894
+ SPAWN_LOCK_DIR = path9.join(os6.homedir(), ".exe-os", "spawn-locks");
1895
+ SESSION_CACHE = path9.join(os6.homedir(), ".exe-os", "session-cache");
1896
+ INTERCOM_LOG2 = path9.join(os6.homedir(), ".exe-os", "intercom.log");
1896
1897
  DEBOUNCE_FILE = path9.join(SESSION_CACHE, "intercom-debounce.json");
1897
1898
  DEBOUNCE_CLEANUP_AGE_MS = 5 * 60 * 1e3;
1898
1899
  }
@@ -1932,11 +1933,11 @@ init_database();
1932
1933
  import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
1933
1934
  import { existsSync as existsSync3 } from "fs";
1934
1935
  import path3 from "path";
1935
- import os2 from "os";
1936
+ import os3 from "os";
1936
1937
  var SERVICE = "exe-mem";
1937
1938
  var ACCOUNT = "master-key";
1938
1939
  function getKeyDir() {
1939
- return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path3.join(os2.homedir(), ".exe-os");
1940
+ return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path3.join(os3.homedir(), ".exe-os");
1940
1941
  }
1941
1942
  function getKeyPath() {
1942
1943
  return path3.join(getKeyDir(), "master.key");
@@ -1530,9 +1530,10 @@ ${p.content}`).join("\n\n");
1530
1530
  // src/lib/employees.ts
1531
1531
  init_config();
1532
1532
  import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
1533
- import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2 } from "fs";
1533
+ import { existsSync as existsSync2, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
1534
1534
  import { execSync } from "child_process";
1535
1535
  import path2 from "path";
1536
+ import os2 from "os";
1536
1537
  var EMPLOYEES_PATH = path2.join(EXE_AI_DIR, "exe-employees.json");
1537
1538
  async function loadEmployees(employeesPath = EMPLOYEES_PATH) {
1538
1539
  if (!existsSync2(employeesPath)) {
@@ -1553,11 +1554,11 @@ init_database();
1553
1554
  import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
1554
1555
  import { existsSync as existsSync3 } from "fs";
1555
1556
  import path3 from "path";
1556
- import os2 from "os";
1557
+ import os3 from "os";
1557
1558
  var SERVICE = "exe-mem";
1558
1559
  var ACCOUNT = "master-key";
1559
1560
  function getKeyDir() {
1560
- return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path3.join(os2.homedir(), ".exe-os");
1561
+ return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path3.join(os3.homedir(), ".exe-os");
1561
1562
  }
1562
1563
  function getKeyPath() {
1563
1564
  return path3.join(getKeyDir(), "master.key");