@askexenow/exe-os 0.8.105 → 0.8.106

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 (71) hide show
  1. package/dist/bin/backfill-conversations.js +17 -15
  2. package/dist/bin/backfill-responses.js +17 -15
  3. package/dist/bin/backfill-vectors.js +17 -15
  4. package/dist/bin/cleanup-stale-review-tasks.js +56 -21
  5. package/dist/bin/cli.js +90 -51
  6. package/dist/bin/exe-assign.js +17 -15
  7. package/dist/bin/exe-boot.js +61 -30
  8. package/dist/bin/exe-call.js +5 -1
  9. package/dist/bin/exe-dispatch.js +58 -23
  10. package/dist/bin/exe-doctor.js +17 -15
  11. package/dist/bin/exe-export-behaviors.js +17 -15
  12. package/dist/bin/exe-forget.js +17 -15
  13. package/dist/bin/exe-gateway.js +58 -23
  14. package/dist/bin/exe-heartbeat.js +56 -21
  15. package/dist/bin/exe-kill.js +17 -15
  16. package/dist/bin/exe-launch-agent.js +68 -33
  17. package/dist/bin/exe-pending-messages.js +17 -15
  18. package/dist/bin/exe-pending-notifications.js +17 -15
  19. package/dist/bin/exe-pending-reviews.js +17 -15
  20. package/dist/bin/exe-review.js +17 -15
  21. package/dist/bin/exe-search.js +17 -15
  22. package/dist/bin/exe-session-cleanup.js +58 -23
  23. package/dist/bin/exe-start-codex.js +64 -33
  24. package/dist/bin/exe-start-opencode.js +63 -32
  25. package/dist/bin/exe-status.js +56 -21
  26. package/dist/bin/exe-team.js +17 -15
  27. package/dist/bin/git-sweep.js +58 -23
  28. package/dist/bin/graph-backfill.js +17 -15
  29. package/dist/bin/graph-export.js +17 -15
  30. package/dist/bin/scan-tasks.js +127 -61
  31. package/dist/bin/setup.js +16 -8
  32. package/dist/bin/shard-migrate.js +17 -15
  33. package/dist/bin/wiki-sync.js +17 -15
  34. package/dist/gateway/index.js +58 -23
  35. package/dist/hooks/bug-report-worker.js +58 -23
  36. package/dist/hooks/commit-complete.js +58 -23
  37. package/dist/hooks/error-recall.js +57 -22
  38. package/dist/hooks/exe-heartbeat-hook.js +40 -7
  39. package/dist/hooks/ingest-worker.js +58 -23
  40. package/dist/hooks/ingest.js +40 -7
  41. package/dist/hooks/instructions-loaded.js +57 -22
  42. package/dist/hooks/notification.js +57 -22
  43. package/dist/hooks/post-compact.js +59 -28
  44. package/dist/hooks/pre-compact.js +61 -30
  45. package/dist/hooks/pre-tool-use.js +62 -28
  46. package/dist/hooks/prompt-ingest-worker.js +17 -15
  47. package/dist/hooks/prompt-submit.js +127 -31
  48. package/dist/hooks/response-ingest-worker.js +17 -15
  49. package/dist/hooks/session-end.js +61 -30
  50. package/dist/hooks/session-start.js +2801 -2273
  51. package/dist/hooks/stop.js +59 -28
  52. package/dist/hooks/subagent-stop.js +59 -28
  53. package/dist/hooks/summary-worker.js +56 -21
  54. package/dist/index.js +58 -23
  55. package/dist/lib/exe-daemon.js +122 -25
  56. package/dist/lib/hybrid-search.js +17 -15
  57. package/dist/lib/messaging.js +40 -7
  58. package/dist/lib/schedules.js +17 -15
  59. package/dist/lib/store.js +17 -15
  60. package/dist/lib/tasks.js +41 -8
  61. package/dist/lib/tmux-routing.js +41 -8
  62. package/dist/mcp/server.js +75 -45
  63. package/dist/mcp/tools/create-task.js +44 -15
  64. package/dist/mcp/tools/deactivate-behavior.js +40 -7
  65. package/dist/mcp/tools/list-tasks.js +39 -6
  66. package/dist/mcp/tools/send-message.js +43 -14
  67. package/dist/mcp/tools/update-task.js +43 -18
  68. package/dist/runtime/index.js +58 -23
  69. package/dist/tui/App.js +60 -24
  70. package/package.json +1 -1
  71. package/src/commands/exe/call.md +2 -0
@@ -2222,21 +2222,23 @@ async function initStore(options) {
2222
2222
  encryptionKey: hexKey
2223
2223
  });
2224
2224
  await retryOnBusy2(() => ensureSchema(), "ensureSchema");
2225
- try {
2226
- const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
2227
- initShardManager2(hexKey);
2228
- } catch {
2229
- }
2230
- const client = getClient();
2231
- const vResult = await retryOnBusy2(
2232
- () => client.execute("SELECT MAX(version) as max_v FROM memories"),
2233
- "version-query"
2234
- );
2235
- _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
2236
- try {
2237
- const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
2238
- await loadGlobalProcedures2();
2239
- } catch {
2225
+ if (!options?.lightweight) {
2226
+ try {
2227
+ const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
2228
+ initShardManager2(hexKey);
2229
+ } catch {
2230
+ }
2231
+ const client = getClient();
2232
+ const vResult = await retryOnBusy2(
2233
+ () => client.execute("SELECT MAX(version) as max_v FROM memories"),
2234
+ "version-query"
2235
+ );
2236
+ _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
2237
+ try {
2238
+ const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
2239
+ await loadGlobalProcedures2();
2240
+ } catch {
2241
+ }
2240
2242
  }
2241
2243
  }
2242
2244
  function classifyTier(record) {
@@ -2221,21 +2221,23 @@ async function initStore(options) {
2221
2221
  encryptionKey: hexKey
2222
2222
  });
2223
2223
  await retryOnBusy2(() => ensureSchema(), "ensureSchema");
2224
- try {
2225
- const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
2226
- initShardManager2(hexKey);
2227
- } catch {
2228
- }
2229
- const client = getClient();
2230
- const vResult = await retryOnBusy2(
2231
- () => client.execute("SELECT MAX(version) as max_v FROM memories"),
2232
- "version-query"
2233
- );
2234
- _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
2235
- try {
2236
- const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
2237
- await loadGlobalProcedures2();
2238
- } catch {
2224
+ if (!options?.lightweight) {
2225
+ try {
2226
+ const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
2227
+ initShardManager2(hexKey);
2228
+ } catch {
2229
+ }
2230
+ const client = getClient();
2231
+ const vResult = await retryOnBusy2(
2232
+ () => client.execute("SELECT MAX(version) as max_v FROM memories"),
2233
+ "version-query"
2234
+ );
2235
+ _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
2236
+ try {
2237
+ const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
2238
+ await loadGlobalProcedures2();
2239
+ } catch {
2240
+ }
2239
2241
  }
2240
2242
  }
2241
2243
  function classifyTier(record) {
@@ -2210,21 +2210,23 @@ async function initStore(options) {
2210
2210
  encryptionKey: hexKey
2211
2211
  });
2212
2212
  await retryOnBusy2(() => ensureSchema(), "ensureSchema");
2213
- try {
2214
- const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
2215
- initShardManager2(hexKey);
2216
- } catch {
2217
- }
2218
- const client = getClient();
2219
- const vResult = await retryOnBusy2(
2220
- () => client.execute("SELECT MAX(version) as max_v FROM memories"),
2221
- "version-query"
2222
- );
2223
- _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
2224
- try {
2225
- const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
2226
- await loadGlobalProcedures2();
2227
- } catch {
2213
+ if (!options?.lightweight) {
2214
+ try {
2215
+ const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
2216
+ initShardManager2(hexKey);
2217
+ } catch {
2218
+ }
2219
+ const client = getClient();
2220
+ const vResult = await retryOnBusy2(
2221
+ () => client.execute("SELECT MAX(version) as max_v FROM memories"),
2222
+ "version-query"
2223
+ );
2224
+ _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
2225
+ try {
2226
+ const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
2227
+ await loadGlobalProcedures2();
2228
+ } catch {
2229
+ }
2228
2230
  }
2229
2231
  }
2230
2232
  function vectorToBlob(vector) {
@@ -1779,8 +1779,21 @@ var init_session_registry = __esm({
1779
1779
 
1780
1780
  // src/lib/session-key.ts
1781
1781
  import { execSync as execSync2 } from "child_process";
1782
- function getSessionKey() {
1783
- if (_cached) return _cached;
1782
+ function normalizeCommand(command) {
1783
+ const trimmed = command.trim().toLowerCase();
1784
+ const parts = trimmed.split(/[\\/]/);
1785
+ return parts[parts.length - 1] ?? trimmed;
1786
+ }
1787
+ function detectRuntimeFromCommand(command) {
1788
+ const normalized = normalizeCommand(command);
1789
+ for (const [runtime, commands] of Object.entries(RUNTIME_COMMANDS)) {
1790
+ if (commands.includes(normalized)) {
1791
+ return runtime;
1792
+ }
1793
+ }
1794
+ return null;
1795
+ }
1796
+ function resolveRuntimeProcess() {
1784
1797
  let pid = process.ppid;
1785
1798
  for (let i = 0; i < 10; i++) {
1786
1799
  try {
@@ -1791,9 +1804,9 @@ function getSessionKey() {
1791
1804
  const match = info.match(/^\s*(\d+)\s+(.+)$/);
1792
1805
  if (!match) break;
1793
1806
  const [, ppid, cmd] = match;
1794
- if (cmd === "claude" || cmd.endsWith("/claude")) {
1795
- _cached = String(pid);
1796
- return _cached;
1807
+ const runtime = detectRuntimeFromCommand(cmd ?? "");
1808
+ if (runtime) {
1809
+ return { pid: String(pid), runtime };
1797
1810
  }
1798
1811
  pid = parseInt(ppid, 10);
1799
1812
  if (pid <= 1) break;
@@ -1801,14 +1814,34 @@ function getSessionKey() {
1801
1814
  break;
1802
1815
  }
1803
1816
  }
1817
+ return null;
1818
+ }
1819
+ function getSessionKey() {
1820
+ if (_cached) return _cached;
1821
+ if (process.env.EXE_SESSION_KEY) {
1822
+ _cached = process.env.EXE_SESSION_KEY;
1823
+ return _cached;
1824
+ }
1825
+ const resolved = resolveRuntimeProcess();
1826
+ if (resolved) {
1827
+ _cachedRuntime = resolved.runtime;
1828
+ _cached = resolved.pid;
1829
+ return _cached;
1830
+ }
1804
1831
  _cached = process.env.CLAUDE_CODE_SSE_PORT ?? String(process.ppid);
1805
1832
  return _cached;
1806
1833
  }
1807
- var _cached;
1834
+ var _cached, _cachedRuntime, RUNTIME_COMMANDS;
1808
1835
  var init_session_key = __esm({
1809
1836
  "src/lib/session-key.ts"() {
1810
1837
  "use strict";
1811
1838
  _cached = null;
1839
+ _cachedRuntime = null;
1840
+ RUNTIME_COMMANDS = {
1841
+ claude: ["claude", "claude.exe", "claude-native"],
1842
+ codex: ["codex"],
1843
+ opencode: ["opencode"]
1844
+ };
1812
1845
  }
1813
1846
  });
1814
1847
 
@@ -2236,21 +2269,23 @@ async function initStore(options) {
2236
2269
  encryptionKey: hexKey
2237
2270
  });
2238
2271
  await retryOnBusy2(() => ensureSchema(), "ensureSchema");
2239
- try {
2240
- const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
2241
- initShardManager2(hexKey);
2242
- } catch {
2243
- }
2244
- const client = getClient();
2245
- const vResult = await retryOnBusy2(
2246
- () => client.execute("SELECT MAX(version) as max_v FROM memories"),
2247
- "version-query"
2248
- );
2249
- _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
2250
- try {
2251
- const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
2252
- await loadGlobalProcedures2();
2253
- } catch {
2272
+ if (!options?.lightweight) {
2273
+ try {
2274
+ const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
2275
+ initShardManager2(hexKey);
2276
+ } catch {
2277
+ }
2278
+ const client = getClient();
2279
+ const vResult = await retryOnBusy2(
2280
+ () => client.execute("SELECT MAX(version) as max_v FROM memories"),
2281
+ "version-query"
2282
+ );
2283
+ _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
2284
+ try {
2285
+ const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
2286
+ await loadGlobalProcedures2();
2287
+ } catch {
2288
+ }
2254
2289
  }
2255
2290
  }
2256
2291
 
package/dist/bin/cli.js CHANGED
@@ -5548,21 +5548,23 @@ async function initStore(options) {
5548
5548
  encryptionKey: hexKey
5549
5549
  });
5550
5550
  await retryOnBusy2(() => ensureSchema(), "ensureSchema");
5551
- try {
5552
- const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
5553
- initShardManager2(hexKey);
5554
- } catch {
5555
- }
5556
- const client = getClient();
5557
- const vResult = await retryOnBusy2(
5558
- () => client.execute("SELECT MAX(version) as max_v FROM memories"),
5559
- "version-query"
5560
- );
5561
- _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
5562
- try {
5563
- const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
5564
- await loadGlobalProcedures2();
5565
- } catch {
5551
+ if (!options?.lightweight) {
5552
+ try {
5553
+ const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
5554
+ initShardManager2(hexKey);
5555
+ } catch {
5556
+ }
5557
+ const client = getClient();
5558
+ const vResult = await retryOnBusy2(
5559
+ () => client.execute("SELECT MAX(version) as max_v FROM memories"),
5560
+ "version-query"
5561
+ );
5562
+ _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
5563
+ try {
5564
+ const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
5565
+ await loadGlobalProcedures2();
5566
+ } catch {
5567
+ }
5566
5568
  }
5567
5569
  }
5568
5570
  function classifyTier(record) {
@@ -7060,8 +7062,21 @@ var init_session_registry = __esm({
7060
7062
 
7061
7063
  // src/lib/session-key.ts
7062
7064
  import { execSync as execSync4 } from "child_process";
7063
- function getSessionKey() {
7064
- if (_cached) return _cached;
7065
+ function normalizeCommand(command) {
7066
+ const trimmed = command.trim().toLowerCase();
7067
+ const parts = trimmed.split(/[\\/]/);
7068
+ return parts[parts.length - 1] ?? trimmed;
7069
+ }
7070
+ function detectRuntimeFromCommand(command) {
7071
+ const normalized = normalizeCommand(command);
7072
+ for (const [runtime, commands] of Object.entries(RUNTIME_COMMANDS)) {
7073
+ if (commands.includes(normalized)) {
7074
+ return runtime;
7075
+ }
7076
+ }
7077
+ return null;
7078
+ }
7079
+ function resolveRuntimeProcess() {
7065
7080
  let pid = process.ppid;
7066
7081
  for (let i = 0; i < 10; i++) {
7067
7082
  try {
@@ -7072,9 +7087,9 @@ function getSessionKey() {
7072
7087
  const match = info.match(/^\s*(\d+)\s+(.+)$/);
7073
7088
  if (!match) break;
7074
7089
  const [, ppid, cmd] = match;
7075
- if (cmd === "claude" || cmd.endsWith("/claude")) {
7076
- _cached = String(pid);
7077
- return _cached;
7090
+ const runtime = detectRuntimeFromCommand(cmd ?? "");
7091
+ if (runtime) {
7092
+ return { pid: String(pid), runtime };
7078
7093
  }
7079
7094
  pid = parseInt(ppid, 10);
7080
7095
  if (pid <= 1) break;
@@ -7082,14 +7097,34 @@ function getSessionKey() {
7082
7097
  break;
7083
7098
  }
7084
7099
  }
7100
+ return null;
7101
+ }
7102
+ function getSessionKey() {
7103
+ if (_cached) return _cached;
7104
+ if (process.env.EXE_SESSION_KEY) {
7105
+ _cached = process.env.EXE_SESSION_KEY;
7106
+ return _cached;
7107
+ }
7108
+ const resolved = resolveRuntimeProcess();
7109
+ if (resolved) {
7110
+ _cachedRuntime = resolved.runtime;
7111
+ _cached = resolved.pid;
7112
+ return _cached;
7113
+ }
7085
7114
  _cached = process.env.CLAUDE_CODE_SSE_PORT ?? String(process.ppid);
7086
7115
  return _cached;
7087
7116
  }
7088
- var _cached;
7117
+ var _cached, _cachedRuntime, RUNTIME_COMMANDS;
7089
7118
  var init_session_key = __esm({
7090
7119
  "src/lib/session-key.ts"() {
7091
7120
  "use strict";
7092
7121
  _cached = null;
7122
+ _cachedRuntime = null;
7123
+ RUNTIME_COMMANDS = {
7124
+ claude: ["claude", "claude.exe", "claude-native"],
7125
+ codex: ["codex"],
7126
+ opencode: ["opencode"]
7127
+ };
7093
7128
  }
7094
7129
  });
7095
7130
 
@@ -9268,7 +9303,7 @@ async function pollCapacityDead() {
9268
9303
  const transport = getTransport();
9269
9304
  const relaunched = [];
9270
9305
  const registered = listSessions().filter(
9271
- (s) => s.agentId !== "exe" && !isCoordinatorName(s.agentId)
9306
+ (s) => !isCoordinatorName(s.agentId)
9272
9307
  );
9273
9308
  if (registered.length === 0) return [];
9274
9309
  let liveSessions;
@@ -9758,7 +9793,7 @@ function sendIntercom(targetSession) {
9758
9793
  const agentName = targetSession.split("-")[0] ?? targetSession;
9759
9794
  const rtConfig = getAgentRuntime(agentName);
9760
9795
  if (rtConfig.runtime === "codex" || rtConfig.runtime === "opencode") {
9761
- transport.sendKeys(targetSession, "You have a new task assigned. Call list_tasks to see your open tasks, then get_task to read the highest priority one. Start working now.");
9796
+ transport.sendKeys(targetSession, "NEW TASK ASSIGNED. Call list_tasks now, then get_task on the highest priority open task. Start working immediately \u2014 do not ask for confirmation.");
9762
9797
  try {
9763
9798
  execSync8(`tmux send-keys -t ${targetSession} Tab`, { timeout: 2e3 });
9764
9799
  } catch {
@@ -10406,15 +10441,7 @@ var init_messaging = __esm({
10406
10441
  }
10407
10442
  });
10408
10443
 
10409
- // src/adapters/claude/session-key.ts
10410
- var init_session_key2 = __esm({
10411
- "src/adapters/claude/session-key.ts"() {
10412
- "use strict";
10413
- init_session_key();
10414
- }
10415
- });
10416
-
10417
- // src/adapters/claude/active-agent.ts
10444
+ // src/lib/active-agent.ts
10418
10445
  var active_agent_exports = {};
10419
10446
  __export(active_agent_exports, {
10420
10447
  cleanupSessionMarkers: () => cleanupSessionMarkers,
@@ -10579,10 +10606,10 @@ function cleanupSessionMarkers() {
10579
10606
  }
10580
10607
  var CACHE_DIR, STALE_MS;
10581
10608
  var init_active_agent = __esm({
10582
- "src/adapters/claude/active-agent.ts"() {
10609
+ "src/lib/active-agent.ts"() {
10583
10610
  "use strict";
10584
10611
  init_config();
10585
- init_session_key2();
10612
+ init_session_key();
10586
10613
  init_employees();
10587
10614
  CACHE_DIR = path23.join(EXE_AI_DIR, "session-cache");
10588
10615
  STALE_MS = 24 * 60 * 60 * 1e3;
@@ -12730,7 +12757,8 @@ async function runSetupWizard(opts = {}) {
12730
12757
  saveEmployees: saveEmployees2,
12731
12758
  addEmployee: addEmployee2,
12732
12759
  registerBinSymlinks: registerBinSymlinks2,
12733
- EMPLOYEES_PATH: EMPLOYEES_PATH2
12760
+ EMPLOYEES_PATH: EMPLOYEES_PATH2,
12761
+ DEFAULT_COORDINATOR_TEMPLATE_NAME: DEFAULT_COORDINATOR_TEMPLATE_NAME2
12734
12762
  } = await Promise.resolve().then(() => (init_employees(), employees_exports));
12735
12763
  const { getTemplateByRole: getTemplateByRole2 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
12736
12764
  const { identityPath: identityPath2 } = await Promise.resolve().then(() => (init_identity(), identity_exports));
@@ -12742,7 +12770,7 @@ async function runSetupWizard(opts = {}) {
12742
12770
  validateLicense: validateLicense2
12743
12771
  } = await Promise.resolve().then(() => (init_license(), license_exports));
12744
12772
  const createdEmployees = [];
12745
- let cooName = "exe";
12773
+ let cooName = DEFAULT_COORDINATOR_TEMPLATE_NAME2;
12746
12774
  if (pairingRosterPulled) {
12747
12775
  const roster = await loadEmployees2(EMPLOYEES_PATH2).catch(() => []);
12748
12776
  const existingCoo = roster.find((e) => e.role === "COO");
@@ -12827,17 +12855,24 @@ async function runSetupWizard(opts = {}) {
12827
12855
  log("your entire team. Engineers, marketers, specialists, all working");
12828
12856
  log("in parallel while you focus on what matters.");
12829
12857
  log("");
12830
- const cooNameInput = await ask2(rl, "Name your COO (default: exe): ");
12831
- cooName = (cooNameInput || "exe").toLowerCase();
12858
+ const cooNameInput = await ask2(
12859
+ rl,
12860
+ `Name your COO (default: ${DEFAULT_COORDINATOR_TEMPLATE_NAME2}): `
12861
+ );
12862
+ cooName = (cooNameInput || DEFAULT_COORDINATOR_TEMPLATE_NAME2).toLowerCase();
12832
12863
  let employees = await loadEmployees2(EMPLOYEES_PATH2).catch(() => []);
12833
12864
  if (!employees.some((e) => e.name === cooName)) {
12834
12865
  const { DEFAULT_EXE: DEFAULT_EXE2, personalizePrompt: personalizePrompt2 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
12835
12866
  const cooEmployee = {
12836
12867
  name: cooName,
12837
12868
  role: "COO",
12838
- systemPrompt: personalizePrompt2(DEFAULT_EXE2.systemPrompt, "exe", cooName),
12869
+ systemPrompt: personalizePrompt2(
12870
+ DEFAULT_EXE2.systemPrompt,
12871
+ DEFAULT_COORDINATOR_TEMPLATE_NAME2,
12872
+ cooName
12873
+ ),
12839
12874
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
12840
- templateName: "exe",
12875
+ templateName: DEFAULT_COORDINATOR_TEMPLATE_NAME2,
12841
12876
  templateVersion: 1
12842
12877
  };
12843
12878
  employees = addEmployee2(employees, cooEmployee);
@@ -12920,10 +12955,10 @@ async function runSetupWizard(opts = {}) {
12920
12955
  log("their domain \u2014 no context switching, no competing priorities.");
12921
12956
  log("");
12922
12957
  const ctoTemplate = getTemplateByRole2("CTO");
12923
- const ctoDefault = ctoTemplate?.name ?? "yoshi";
12958
+ const ctoDefault = ctoTemplate?.name ?? "cto";
12924
12959
  log(` CTO \u2014 engineering, architecture, code reviews (default: ${ctoDefault})`);
12925
12960
  const cmoTemplate = getTemplateByRole2("CMO");
12926
- const cmoDefault = cmoTemplate?.name ?? "mari";
12961
+ const cmoDefault = cmoTemplate?.name ?? "cmo";
12927
12962
  log(` CMO \u2014 design, brand, content, marketing (default: ${cmoDefault})`);
12928
12963
  log("");
12929
12964
  const ctoNameInput = await ask2(rl, `Name your CTO (default: ${ctoDefault}): `);
@@ -23851,7 +23886,7 @@ function useOrchestrator(enabled = true) {
23851
23886
  const [isLoading, setIsLoading] = useState8(true);
23852
23887
  const orchestratorRef = useRef5(null);
23853
23888
  const exeSessionRef = useRef5("exe1");
23854
- const coordinatorNameRef = useRef5("exe");
23889
+ const coordinatorNameRef = useRef5(DEFAULT_COORDINATOR_TEMPLATE_NAME);
23855
23890
  useEffect10(() => {
23856
23891
  if (!enabled) return;
23857
23892
  let cancelled = false;
@@ -23987,6 +24022,7 @@ var TICK_INTERVAL_MS;
23987
24022
  var init_useOrchestrator = __esm({
23988
24023
  "src/tui/hooks/useOrchestrator.ts"() {
23989
24024
  "use strict";
24025
+ init_employees();
23990
24026
  TICK_INTERVAL_MS = 3e4;
23991
24027
  }
23992
24028
  });
@@ -27851,7 +27887,8 @@ ID: ${result.id}`);
27851
27887
  }
27852
27888
  })();
27853
27889
  if (hasClaudeCode) {
27854
- let cooName = "exe";
27890
+ const { DEFAULT_COORDINATOR_TEMPLATE_NAME: DEFAULT_COORDINATOR_TEMPLATE_NAME2 } = await Promise.resolve().then(() => (init_employees(), employees_exports));
27891
+ let cooName = DEFAULT_COORDINATOR_TEMPLATE_NAME2;
27855
27892
  try {
27856
27893
  const rosterPath = path40.join(os16.homedir(), ".exe-os", "exe-employees.json");
27857
27894
  if (existsSync27(rosterPath)) {
@@ -28185,7 +28222,8 @@ async function runClaudeUninstall(flags = []) {
28185
28222
  const rosterPath = path40.join(exeOsDir, "exe-employees.json");
28186
28223
  if (existsSync27(rosterPath)) {
28187
28224
  const roster = JSON.parse(readFileSync23(rosterPath, "utf8"));
28188
- const coordinatorName = roster.find((e) => e.role?.toLowerCase() === "coo")?.name ?? "exe";
28225
+ const { DEFAULT_COORDINATOR_TEMPLATE_NAME: DEFAULT_COORDINATOR_TEMPLATE_NAME2 } = await Promise.resolve().then(() => (init_employees(), employees_exports));
28226
+ const coordinatorName = roster.find((e) => e.role?.toLowerCase() === "coo")?.name ?? DEFAULT_COORDINATOR_TEMPLATE_NAME2;
28189
28227
  for (const emp of roster) {
28190
28228
  if (emp.name === coordinatorName) continue;
28191
28229
  for (const suffix of ["", "-opencode"]) {
@@ -28248,7 +28286,7 @@ async function runActivate(key) {
28248
28286
  }
28249
28287
  const { saveLicense: saveLicense2, mirrorLicenseKey: mirrorLicenseKey2, validateLicense: validateLicense2 } = await Promise.resolve().then(() => (init_license(), license_exports));
28250
28288
  const { loadEmployees: loadEmployees2, saveEmployees: saveEmployees2, addEmployee: addEmployee2, registerBinSymlinks: registerBinSymlinks2 } = await Promise.resolve().then(() => (init_employees(), employees_exports));
28251
- const { getTemplate: getTemplate3, personalizePrompt: personalizePrompt2 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
28289
+ const { getTemplateByRole: getTemplateByRole2, personalizePrompt: personalizePrompt2 } = await Promise.resolve().then(() => (init_employee_templates(), employee_templates_exports));
28252
28290
  const { getTemplate: getIdentityTemplate } = await Promise.resolve().then(() => (init_identity_templates(), identity_templates_exports));
28253
28291
  const { identityPath: identityPath2 } = await Promise.resolve().then(() => (init_identity(), identity_exports));
28254
28292
  const { createInterface: createInterface5 } = await import("readline");
@@ -28271,14 +28309,15 @@ async function runActivate(key) {
28271
28309
  const ask3 = (prompt) => new Promise((resolve) => rl.question(prompt, (a) => resolve(a.trim())));
28272
28310
  let employees = await loadEmployees2();
28273
28311
  const existingNames = new Set(employees.map((e) => e.name));
28274
- const createSpecialist = async (defaultName, role, templateName, identityKey) => {
28312
+ const createSpecialist = async (role, identityKey) => {
28313
+ const template = getTemplateByRole2(role);
28314
+ if (!template) return;
28315
+ const defaultName = template.name;
28275
28316
  if (existingNames.has(defaultName)) return;
28276
28317
  const create3 = await ask3(`Create your ${role}? [Y/n]: `);
28277
28318
  if (create3.toLowerCase() === "n") return;
28278
28319
  const nameInput = await ask3(`Name your ${role} [${defaultName}]: `);
28279
28320
  const name = nameInput || defaultName;
28280
- const template = getTemplate3(templateName);
28281
- if (!template) return;
28282
28321
  const emp = { ...template, name, systemPrompt: personalizePrompt2(template.systemPrompt, template.name, name), createdAt: (/* @__PURE__ */ new Date()).toISOString() };
28283
28322
  employees = addEmployee2(employees, emp);
28284
28323
  await saveEmployees2(employees);
@@ -28293,8 +28332,8 @@ async function runActivate(key) {
28293
28332
  }
28294
28333
  console.log(`Created: ${name} (${role})`);
28295
28334
  };
28296
- await createSpecialist("yoshi", "CTO", "yoshi", "cto");
28297
- await createSpecialist("mari", "CMO", "mari", "cmo");
28335
+ await createSpecialist("CTO", "cto");
28336
+ await createSpecialist("CMO", "cmo");
28298
28337
  rl.close();
28299
28338
  console.log(`${employees.length} employees active.`);
28300
28339
  } catch (err) {
@@ -2366,21 +2366,23 @@ async function initStore(options) {
2366
2366
  encryptionKey: hexKey
2367
2367
  });
2368
2368
  await retryOnBusy2(() => ensureSchema(), "ensureSchema");
2369
- try {
2370
- const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
2371
- initShardManager2(hexKey);
2372
- } catch {
2373
- }
2374
- const client = getClient();
2375
- const vResult = await retryOnBusy2(
2376
- () => client.execute("SELECT MAX(version) as max_v FROM memories"),
2377
- "version-query"
2378
- );
2379
- _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
2380
- try {
2381
- const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
2382
- await loadGlobalProcedures2();
2383
- } catch {
2369
+ if (!options?.lightweight) {
2370
+ try {
2371
+ const { initShardManager: initShardManager2 } = await Promise.resolve().then(() => (init_shard_manager(), shard_manager_exports));
2372
+ initShardManager2(hexKey);
2373
+ } catch {
2374
+ }
2375
+ const client = getClient();
2376
+ const vResult = await retryOnBusy2(
2377
+ () => client.execute("SELECT MAX(version) as max_v FROM memories"),
2378
+ "version-query"
2379
+ );
2380
+ _nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
2381
+ try {
2382
+ const { loadGlobalProcedures: loadGlobalProcedures2 } = await Promise.resolve().then(() => (init_global_procedures(), global_procedures_exports));
2383
+ await loadGlobalProcedures2();
2384
+ } catch {
2385
+ }
2384
2386
  }
2385
2387
  }
2386
2388
  function classifyTier(record) {