@askexenow/exe-os 0.8.37 → 0.8.38

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 (66) hide show
  1. package/dist/bin/backfill-conversations.js +66 -60
  2. package/dist/bin/backfill-responses.js +7 -8
  3. package/dist/bin/backfill-vectors.js +1 -8
  4. package/dist/bin/cleanup-stale-review-tasks.js +1 -8
  5. package/dist/bin/cli.js +520 -325
  6. package/dist/bin/exe-assign.js +7 -8
  7. package/dist/bin/exe-boot.js +54 -21
  8. package/dist/bin/exe-call.js +9 -4
  9. package/dist/bin/exe-cloud.js +37 -3
  10. package/dist/bin/exe-doctor.js +1 -8
  11. package/dist/bin/exe-export-behaviors.js +4 -11
  12. package/dist/bin/exe-forget.js +1 -8
  13. package/dist/bin/exe-gateway.js +72 -30
  14. package/dist/bin/exe-heartbeat.js +4 -11
  15. package/dist/bin/exe-kill.js +1 -8
  16. package/dist/bin/exe-launch-agent.js +51 -14
  17. package/dist/bin/exe-link.js +13 -3
  18. package/dist/bin/exe-new-employee.js +35 -10
  19. package/dist/bin/exe-pending-messages.js +1 -8
  20. package/dist/bin/exe-pending-notifications.js +1 -8
  21. package/dist/bin/exe-pending-reviews.js +4 -11
  22. package/dist/bin/exe-review.js +7 -8
  23. package/dist/bin/exe-search.js +10 -11
  24. package/dist/bin/exe-session-cleanup.js +11 -12
  25. package/dist/bin/exe-status.js +1 -8
  26. package/dist/bin/exe-team.js +1 -8
  27. package/dist/bin/git-sweep.js +7 -8
  28. package/dist/bin/graph-backfill.js +1 -8
  29. package/dist/bin/graph-export.js +1 -8
  30. package/dist/bin/install.js +9 -0
  31. package/dist/bin/scan-tasks.js +7 -8
  32. package/dist/bin/setup.js +396 -245
  33. package/dist/bin/shard-migrate.js +1 -8
  34. package/dist/bin/wiki-sync.js +1 -8
  35. package/dist/gateway/index.js +30 -30
  36. package/dist/hooks/bug-report-worker.js +4 -11
  37. package/dist/hooks/commit-complete.js +7 -8
  38. package/dist/hooks/error-recall.js +11 -12
  39. package/dist/hooks/ingest-worker.js +24 -9
  40. package/dist/hooks/instructions-loaded.js +7 -8
  41. package/dist/hooks/notification.js +7 -8
  42. package/dist/hooks/post-compact.js +7 -8
  43. package/dist/hooks/pre-compact.js +7 -8
  44. package/dist/hooks/pre-tool-use.js +7 -8
  45. package/dist/hooks/prompt-ingest-worker.js +19 -4
  46. package/dist/hooks/prompt-submit.js +14 -9
  47. package/dist/hooks/response-ingest-worker.js +20 -5
  48. package/dist/hooks/session-end.js +11 -12
  49. package/dist/hooks/session-start.js +11 -12
  50. package/dist/hooks/stop.js +7 -8
  51. package/dist/hooks/subagent-stop.js +7 -8
  52. package/dist/hooks/summary-worker.js +24 -9
  53. package/dist/index.js +11 -5
  54. package/dist/lib/cloud-sync.js +19 -2
  55. package/dist/lib/employee-templates.js +5 -0
  56. package/dist/lib/exe-daemon.js +24 -8
  57. package/dist/lib/hybrid-search.js +10 -11
  58. package/dist/lib/identity-templates.js +16 -7
  59. package/dist/lib/license.js +43 -2
  60. package/dist/lib/schedules.js +1 -8
  61. package/dist/lib/store.js +7 -8
  62. package/dist/mcp/server.js +184 -113
  63. package/dist/mcp/tools/list-tasks.js +35 -27
  64. package/dist/runtime/index.js +7 -2
  65. package/dist/tui/App.js +44 -5
  66. package/package.json +4 -2
@@ -1,12 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
5
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
6
- }) : x)(function(x) {
7
- if (typeof require !== "undefined") return require.apply(this, arguments);
8
- throw Error('Dynamic require of "' + x + '" is not supported');
9
- });
10
4
  var __esm = (fn, res) => function __init() {
11
5
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
6
  };
@@ -218,7 +212,7 @@ __export(shard_manager_exports, {
218
212
  shardExists: () => shardExists
219
213
  });
220
214
  import path3 from "path";
221
- import { existsSync as existsSync3, mkdirSync } from "fs";
215
+ import { existsSync as existsSync3, mkdirSync, readdirSync } from "fs";
222
216
  import { createClient as createClient2 } from "@libsql/client";
223
217
  function initShardManager(encryptionKey) {
224
218
  _encryptionKey = encryptionKey;
@@ -257,7 +251,6 @@ function shardExists(projectName) {
257
251
  }
258
252
  function listShards() {
259
253
  if (!existsSync3(SHARDS_DIR)) return [];
260
- const { readdirSync } = __require("fs");
261
254
  return readdirSync(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
262
255
  }
263
256
  async function ensureShardSchema(client) {
@@ -1463,6 +1456,12 @@ async function writeMemory(record) {
1463
1456
  supersedes_id: record.supersedes_id ?? null
1464
1457
  };
1465
1458
  _pendingRecords.push(dbRow);
1459
+ const MAX_PENDING = 1e3;
1460
+ if (_pendingRecords.length > MAX_PENDING) {
1461
+ const dropped = _pendingRecords.length - MAX_PENDING;
1462
+ _pendingRecords = _pendingRecords.slice(-MAX_PENDING);
1463
+ console.warn(`[store] Dropped ${dropped} oldest pending records (overflow)`);
1464
+ }
1466
1465
  if (_flushTimer === null) {
1467
1466
  _flushTimer = setInterval(() => {
1468
1467
  void flushBatch();
@@ -2201,65 +2200,72 @@ async function backfillConversations(options) {
2201
2200
  process.stderr.write(`[backfill-conversations] Found ${files.length} JSONL files to process
2202
2201
  `);
2203
2202
  process.env.EXE_EMBED_PRIORITY = "low";
2204
- for (const file of files) {
2205
- stats.filesScanned++;
2206
- if (existingPaths.has(file)) {
2207
- stats.skippedDedup++;
2208
- continue;
2209
- }
2210
- const conv = await parseConversation(file);
2211
- if (conv.totalMessages < MIN_MESSAGES) {
2212
- stats.skippedTooShort++;
2213
- continue;
2214
- }
2215
- const summary = buildSummary(conv);
2216
- if (options.dryRun) {
2217
- process.stdout.write(`
2203
+ const BATCH_SIZE = 50;
2204
+ const MAX_DEDUP_SIZE = 5e4;
2205
+ for (let batchStart = 0; batchStart < files.length; batchStart += BATCH_SIZE) {
2206
+ const batch = files.slice(batchStart, batchStart + BATCH_SIZE);
2207
+ for (const file of batch) {
2208
+ stats.filesScanned++;
2209
+ if (existingPaths.size < MAX_DEDUP_SIZE && existingPaths.has(file)) {
2210
+ stats.skippedDedup++;
2211
+ continue;
2212
+ }
2213
+ const conv = await parseConversation(file);
2214
+ if (conv.totalMessages < MIN_MESSAGES) {
2215
+ stats.skippedTooShort++;
2216
+ continue;
2217
+ }
2218
+ const summary = buildSummary(conv);
2219
+ if (options.dryRun) {
2220
+ process.stdout.write(`
2218
2221
  \u2500\u2500\u2500 ${file} \u2500\u2500\u2500
2219
2222
  `);
2220
- process.stdout.write(`Project: ${conv.projectName} | Messages: ${conv.totalMessages}`);
2221
- process.stdout.write(` | Tools: ${Object.keys(conv.toolCounts).length}`);
2222
- process.stdout.write(` | Files: ${conv.filesTouched.size}
2223
+ process.stdout.write(`Project: ${conv.projectName} | Messages: ${conv.totalMessages}`);
2224
+ process.stdout.write(` | Tools: ${Object.keys(conv.toolCounts).length}`);
2225
+ process.stdout.write(` | Files: ${conv.filesTouched.size}
2223
2226
  `);
2224
- const firstPrompt = conv.userMessages[0];
2225
- if (firstPrompt) {
2226
- process.stdout.write(`First prompt: ${firstPrompt.slice(0, 120)}
2227
+ const firstPrompt = conv.userMessages[0];
2228
+ if (firstPrompt) {
2229
+ process.stdout.write(`First prompt: ${firstPrompt.slice(0, 120)}
2227
2230
  `);
2231
+ }
2232
+ stats.conversationsStored++;
2233
+ continue;
2228
2234
  }
2229
- stats.conversationsStored++;
2230
- continue;
2231
- }
2232
- let vector = null;
2233
- if (daemonConnected) {
2234
- try {
2235
- vector = await embedViaClient(summary, "low");
2236
- if (!vector) stats.embedFailed++;
2237
- } catch {
2238
- stats.embedFailed++;
2235
+ let vector = null;
2236
+ if (daemonConnected) {
2237
+ try {
2238
+ vector = await embedViaClient(summary, "low");
2239
+ if (!vector) stats.embedFailed++;
2240
+ } catch {
2241
+ stats.embedFailed++;
2242
+ }
2239
2243
  }
2240
- }
2241
- await writeMemory({
2242
- id: crypto2.randomUUID(),
2243
- agent_id: conv.agentId,
2244
- agent_role: conv.agentId === "exe" ? "COO" : "specialist",
2245
- session_id: conv.sessionId,
2246
- timestamp: conv.startTime ?? (/* @__PURE__ */ new Date()).toISOString(),
2247
- tool_name: TOOL_NAME,
2248
- project_name: conv.projectName,
2249
- has_error: conv.errorCount > 0,
2250
- raw_text: summary,
2251
- vector,
2252
- source_path: file,
2253
- source_type: "conversation"
2254
- });
2255
- existingPaths.add(file);
2256
- stats.conversationsStored++;
2257
- if (stats.filesScanned % 50 === 0) {
2258
- process.stderr.write(
2259
- `[backfill-conversations] Progress: ${stats.filesScanned}/${files.length} files, ${stats.conversationsStored} stored
2244
+ await writeMemory({
2245
+ id: crypto2.randomUUID(),
2246
+ agent_id: conv.agentId,
2247
+ agent_role: conv.agentId === "exe" ? "COO" : "specialist",
2248
+ session_id: conv.sessionId,
2249
+ timestamp: conv.startTime ?? (/* @__PURE__ */ new Date()).toISOString(),
2250
+ tool_name: TOOL_NAME,
2251
+ project_name: conv.projectName,
2252
+ has_error: conv.errorCount > 0,
2253
+ raw_text: summary,
2254
+ vector,
2255
+ source_path: file,
2256
+ source_type: "conversation"
2257
+ });
2258
+ if (existingPaths.size < MAX_DEDUP_SIZE) {
2259
+ existingPaths.add(file);
2260
+ }
2261
+ stats.conversationsStored++;
2262
+ if (stats.filesScanned % 50 === 0) {
2263
+ process.stderr.write(
2264
+ `[backfill-conversations] Progress: ${stats.filesScanned}/${files.length} files, ${stats.conversationsStored} stored
2260
2265
  `
2261
- );
2262
- await flushBatch();
2266
+ );
2267
+ await flushBatch();
2268
+ }
2263
2269
  }
2264
2270
  }
2265
2271
  if (!options.dryRun) {
@@ -1,12 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
5
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
6
- }) : x)(function(x) {
7
- if (typeof require !== "undefined") return require.apply(this, arguments);
8
- throw Error('Dynamic require of "' + x + '" is not supported');
9
- });
10
4
  var __esm = (fn, res) => function __init() {
11
5
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
6
  };
@@ -218,7 +212,7 @@ __export(shard_manager_exports, {
218
212
  shardExists: () => shardExists
219
213
  });
220
214
  import path3 from "path";
221
- import { existsSync as existsSync3, mkdirSync } from "fs";
215
+ import { existsSync as existsSync3, mkdirSync, readdirSync } from "fs";
222
216
  import { createClient as createClient2 } from "@libsql/client";
223
217
  function initShardManager(encryptionKey) {
224
218
  _encryptionKey = encryptionKey;
@@ -257,7 +251,6 @@ function shardExists(projectName) {
257
251
  }
258
252
  function listShards() {
259
253
  if (!existsSync3(SHARDS_DIR)) return [];
260
- const { readdirSync } = __require("fs");
261
254
  return readdirSync(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
262
255
  }
263
256
  async function ensureShardSchema(client) {
@@ -1462,6 +1455,12 @@ async function writeMemory(record) {
1462
1455
  supersedes_id: record.supersedes_id ?? null
1463
1456
  };
1464
1457
  _pendingRecords.push(dbRow);
1458
+ const MAX_PENDING = 1e3;
1459
+ if (_pendingRecords.length > MAX_PENDING) {
1460
+ const dropped = _pendingRecords.length - MAX_PENDING;
1461
+ _pendingRecords = _pendingRecords.slice(-MAX_PENDING);
1462
+ console.warn(`[store] Dropped ${dropped} oldest pending records (overflow)`);
1463
+ }
1465
1464
  if (_flushTimer === null) {
1466
1465
  _flushTimer = setInterval(() => {
1467
1466
  void flushBatch();
@@ -1,12 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
5
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
6
- }) : x)(function(x) {
7
- if (typeof require !== "undefined") return require.apply(this, arguments);
8
- throw Error('Dynamic require of "' + x + '" is not supported');
9
- });
10
4
  var __esm = (fn, res) => function __init() {
11
5
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
6
  };
@@ -218,7 +212,7 @@ __export(shard_manager_exports, {
218
212
  shardExists: () => shardExists
219
213
  });
220
214
  import path3 from "path";
221
- import { existsSync as existsSync3, mkdirSync } from "fs";
215
+ import { existsSync as existsSync3, mkdirSync, readdirSync } from "fs";
222
216
  import { createClient as createClient2 } from "@libsql/client";
223
217
  function initShardManager(encryptionKey) {
224
218
  _encryptionKey = encryptionKey;
@@ -257,7 +251,6 @@ function shardExists(projectName) {
257
251
  }
258
252
  function listShards() {
259
253
  if (!existsSync3(SHARDS_DIR)) return [];
260
- const { readdirSync } = __require("fs");
261
254
  return readdirSync(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
262
255
  }
263
256
  async function ensureShardSchema(client) {
@@ -1,12 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  var __defProp = Object.defineProperty;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
5
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
6
- }) : x)(function(x) {
7
- if (typeof require !== "undefined") return require.apply(this, arguments);
8
- throw Error('Dynamic require of "' + x + '" is not supported');
9
- });
10
4
  var __esm = (fn, res) => function __init() {
11
5
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
12
6
  };
@@ -218,7 +212,7 @@ __export(shard_manager_exports, {
218
212
  shardExists: () => shardExists
219
213
  });
220
214
  import path3 from "path";
221
- import { existsSync as existsSync3, mkdirSync } from "fs";
215
+ import { existsSync as existsSync3, mkdirSync, readdirSync } from "fs";
222
216
  import { createClient as createClient2 } from "@libsql/client";
223
217
  function initShardManager(encryptionKey) {
224
218
  _encryptionKey = encryptionKey;
@@ -257,7 +251,6 @@ function shardExists(projectName) {
257
251
  }
258
252
  function listShards() {
259
253
  if (!existsSync3(SHARDS_DIR)) return [];
260
- const { readdirSync } = __require("fs");
261
254
  return readdirSync(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
262
255
  }
263
256
  async function ensureShardSchema(client) {