@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
package/dist/tui/App.js CHANGED
@@ -1204,6 +1204,8 @@ __export(license_exports, {
1204
1204
  loadLicense: () => loadLicense,
1205
1205
  mirrorLicenseKey: () => mirrorLicenseKey,
1206
1206
  saveLicense: () => saveLicense,
1207
+ startLicenseRevalidation: () => startLicenseRevalidation,
1208
+ stopLicenseRevalidation: () => stopLicenseRevalidation,
1207
1209
  validateLicense: () => validateLicense
1208
1210
  });
1209
1211
  import { readFileSync as readFileSync3, writeFileSync, existsSync as existsSync3, mkdirSync } from "fs";
@@ -1328,14 +1330,23 @@ async function validateLicense(apiKey, deviceId) {
1328
1330
  } catch {
1329
1331
  const cached = await getCachedLicense();
1330
1332
  if (cached) return cached;
1331
- return FREE_LICENSE;
1333
+ return { ...FREE_LICENSE, valid: false, error: "offline" };
1334
+ }
1335
+ }
1336
+ function getCacheAgeMs() {
1337
+ try {
1338
+ const { statSync } = __require("fs");
1339
+ const s = statSync(CACHE_PATH);
1340
+ return Date.now() - s.mtimeMs;
1341
+ } catch {
1342
+ return Infinity;
1332
1343
  }
1333
1344
  }
1334
1345
  async function checkLicense() {
1335
1346
  const key = loadLicense();
1336
1347
  if (!key) return FREE_LICENSE;
1337
1348
  const cached = await getCachedLicense();
1338
- if (cached) return cached;
1349
+ if (cached && getCacheAgeMs() < CACHE_MAX_AGE_MS) return cached;
1339
1350
  const deviceId = loadDeviceId();
1340
1351
  return validateLicense(key, deviceId);
1341
1352
  }
@@ -1456,7 +1467,28 @@ async function assertVpsLicense(opts) {
1456
1467
  `License validation unreachable for more than ${graceDays} days. Restore network connectivity to https://askexe.com/cloud and retry. This VPS image refuses to boot after the offline grace window.`
1457
1468
  );
1458
1469
  }
1459
- var LICENSE_PATH, CACHE_PATH, DEVICE_ID_PATH, API_BASE, LICENSE_PUBLIC_KEY_PEM, LICENSE_JWT_ALG, PLAN_LIMITS, FREE_LICENSE;
1470
+ function startLicenseRevalidation(intervalMs = 36e5) {
1471
+ if (_revalTimer) return;
1472
+ _revalTimer = setInterval(async () => {
1473
+ try {
1474
+ const license = await checkLicense();
1475
+ if (!license.valid) {
1476
+ process.stderr.write("[exe-os] License expired or invalid \u2014 features may be restricted\n");
1477
+ }
1478
+ } catch {
1479
+ }
1480
+ }, intervalMs);
1481
+ if (_revalTimer && typeof _revalTimer === "object" && "unref" in _revalTimer) {
1482
+ _revalTimer.unref();
1483
+ }
1484
+ }
1485
+ function stopLicenseRevalidation() {
1486
+ if (_revalTimer) {
1487
+ clearInterval(_revalTimer);
1488
+ _revalTimer = null;
1489
+ }
1490
+ }
1491
+ var LICENSE_PATH, CACHE_PATH, DEVICE_ID_PATH, API_BASE, LICENSE_PUBLIC_KEY_PEM, LICENSE_JWT_ALG, PLAN_LIMITS, FREE_LICENSE, CACHE_MAX_AGE_MS, _revalTimer;
1460
1492
  var init_license = __esm({
1461
1493
  "src/lib/license.ts"() {
1462
1494
  "use strict";
@@ -1486,6 +1518,8 @@ MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEeHztAMOpR/ZMh+rWuOASjEZ54CGY
1486
1518
  employeeLimit: 1,
1487
1519
  memoryLimit: 5e3
1488
1520
  };
1521
+ CACHE_MAX_AGE_MS = 36e5;
1522
+ _revalTimer = null;
1489
1523
  }
1490
1524
  });
1491
1525
 
@@ -7471,7 +7505,7 @@ __export(shard_manager_exports, {
7471
7505
  shardExists: () => shardExists
7472
7506
  });
7473
7507
  import path21 from "path";
7474
- import { existsSync as existsSync13, mkdirSync as mkdirSync6 } from "fs";
7508
+ import { existsSync as existsSync13, mkdirSync as mkdirSync6, readdirSync as readdirSync3 } from "fs";
7475
7509
  import { createClient as createClient2 } from "@libsql/client";
7476
7510
  function initShardManager(encryptionKey) {
7477
7511
  _encryptionKey = encryptionKey;
@@ -7510,7 +7544,6 @@ function shardExists(projectName) {
7510
7544
  }
7511
7545
  function listShards() {
7512
7546
  if (!existsSync13(SHARDS_DIR)) return [];
7513
- const { readdirSync: readdirSync3 } = __require("fs");
7514
7547
  return readdirSync3(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
7515
7548
  }
7516
7549
  async function ensureShardSchema(client) {
@@ -7794,6 +7827,12 @@ async function writeMemory(record) {
7794
7827
  supersedes_id: record.supersedes_id ?? null
7795
7828
  };
7796
7829
  _pendingRecords.push(dbRow);
7830
+ const MAX_PENDING = 1e3;
7831
+ if (_pendingRecords.length > MAX_PENDING) {
7832
+ const dropped = _pendingRecords.length - MAX_PENDING;
7833
+ _pendingRecords = _pendingRecords.slice(-MAX_PENDING);
7834
+ console.warn(`[store] Dropped ${dropped} oldest pending records (overflow)`);
7835
+ }
7797
7836
  if (_flushTimer === null) {
7798
7837
  _flushTimer = setInterval(() => {
7799
7838
  void flushBatch();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.8.37",
3
+ "version": "0.8.38",
4
4
  "description": "AI employee operating system — persistent memory, task management, and multi-agent coordination for Claude Code.",
5
5
  "license": "CC-BY-NC-4.0",
6
6
  "type": "module",
@@ -89,7 +89,6 @@
89
89
  "ink": "^6.8.0",
90
90
  "ink-text-input": "^6.0.0",
91
91
  "jose": "^6.2.2",
92
- "keytar": "^7.9.0",
93
92
  "node-llama-cpp": "^3.18.0",
94
93
  "nodemailer": "^8.0.5",
95
94
  "openai": "^6.33.0",
@@ -105,5 +104,8 @@
105
104
  "tsx": "^4.0.0",
106
105
  "typescript": "^5.0.0",
107
106
  "vitest": "^3.0.0"
107
+ },
108
+ "optionalDependencies": {
109
+ "keytar": "^7.9.0"
108
110
  }
109
111
  }