@askexenow/exe-os 0.9.196 → 0.9.198

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.
@@ -580,19 +580,22 @@ async function loadModel() {
580
580
  } else {
581
581
  process.stderr.write(`[exed] Embed worker failed 3 times \u2014 running without embeddings.
582
582
  `);
583
- try {
584
- if (_storeInitialized) {
585
- const client = getClient();
586
- client.execute(
587
- `INSERT INTO notifications (id, agent_id, event_type, title, body, created_at)
588
- VALUES (lower(hex(randomblob(16))), 'exe', 'embed_failure',
589
- 'Embedding daemon offline \u2014 recall degraded to keyword-only',
590
- 'Embed worker crashed 3 times and will not restart. Semantic search is unavailable. Recall falls back to FTS keyword matching. Fix: check ~/.exe-os/logs/exed-launchd.log for embed worker errors, then restart daemon.',
591
- datetime(''now''))`
592
- );
583
+ void (async () => {
584
+ try {
585
+ if (_storeInitialized) {
586
+ const { getClient: getDbClient } = await import("./database.js");
587
+ const dbClient = getDbClient();
588
+ dbClient.execute(
589
+ `INSERT INTO notifications (id, agent_id, event_type, title, body, created_at)
590
+ VALUES (lower(hex(randomblob(16))), 'exe', 'embed_failure',
591
+ 'Embedding daemon offline \u2014 recall degraded to keyword-only',
592
+ 'Embed worker crashed 3 times and will not restart. Semantic search is unavailable. Recall falls back to FTS keyword matching. Fix: check ~/.exe-os/logs/exed-launchd.log for embed worker errors, then restart daemon.',
593
+ datetime(''now''))`
594
+ );
595
+ }
596
+ } catch {
593
597
  }
594
- } catch {
595
- }
598
+ })();
596
599
  }
597
600
  });
598
601
  } catch (err) {
@@ -798,8 +801,8 @@ async function shutdown() {
798
801
  `);
799
802
  }
800
803
  try {
801
- const { getClient: getClient2 } = await import("./database.js");
802
- const client = getClient2();
804
+ const { getClient } = await import("./database.js");
805
+ const client = getClient();
803
806
  await client.execute("PRAGMA wal_checkpoint(TRUNCATE)");
804
807
  process.stderr.write("[exed] WAL checkpoint complete \u2014 all writes flushed to DB.\n");
805
808
  } catch (e) {
@@ -900,8 +903,8 @@ async function handleDbExecute(socket, requestId, sql, args) {
900
903
  sendResponse(socket, { id: requestId, error: "DB not initialized" });
901
904
  return;
902
905
  }
903
- const { getClient: getClient2 } = await import("./database.js");
904
- const client = getClient2();
906
+ const { getClient } = await import("./database.js");
907
+ const client = getClient();
905
908
  const deserializedArgs = deserializeArgs(args);
906
909
  const result = await client.execute({ sql, args: deserializedArgs });
907
910
  _dbRequestsServed++;
@@ -926,8 +929,8 @@ async function handleDbBatch(socket, requestId, statements, mode) {
926
929
  sendResponse(socket, { id: requestId, error: "DB not initialized" });
927
930
  return;
928
931
  }
929
- const { getClient: getClient2 } = await import("./database.js");
930
- const client = getClient2();
932
+ const { getClient } = await import("./database.js");
933
+ const client = getClient();
931
934
  const stmts = statements.map((s) => ({
932
935
  sql: s.sql,
933
936
  args: deserializeArgs(s.args)
@@ -961,7 +964,7 @@ async function handleIngest(req) {
961
964
  project_name: req.projectName,
962
965
  has_error: req.hasError,
963
966
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
964
- task_id: req.taskId ?? null,
967
+ task_id: req.taskId ?? void 0,
965
968
  confidence: req.confidence,
966
969
  draft: req.draft,
967
970
  trajectory: req.trajectory ? JSON.stringify(req.trajectory) : void 0
@@ -1062,8 +1065,8 @@ async function _writeMemoryRecordInner(entry) {
1062
1065
  `);
1063
1066
  }
1064
1067
  }
1065
- const { getClient: getClient2 } = await import("./database.js");
1066
- const client = getClient2();
1068
+ const { getClient } = await import("./database.js");
1069
+ const client = getClient();
1067
1070
  const hasVector = vectorBlob !== null;
1068
1071
  await client.execute({
1069
1072
  sql: hasVector ? `INSERT OR IGNORE INTO memories
@@ -2171,14 +2174,14 @@ async function startReviewPolling() {
2171
2174
  lastNudgeSent: /* @__PURE__ */ new Map(),
2172
2175
  intervalMs: REVIEW_POLL_INTERVAL_MS
2173
2176
  };
2174
- const { pollReviewNudge, createReviewNudgeRealDeps, loadNudgeState } = await import("../daemon-orchestration-MLB3WJHB.js");
2177
+ const { pollReviewNudge, createReviewNudgeRealDeps, loadNudgeState } = await import("../daemon-orchestration-ZBSS6VZR.js");
2175
2178
  const nudgeState = loadNudgeState();
2176
2179
  const tick = async () => {
2177
2180
  fired("review_polling");
2178
2181
  if (!await ensureStoreForPolling()) return;
2179
2182
  try {
2180
- const { getClient: getClient2 } = await import("./database.js");
2181
- const deps = polling.createRealDeps(getClient2);
2183
+ const { getClient } = await import("./database.js");
2184
+ const deps = polling.createRealDeps(getClient);
2182
2185
  const sent = await polling.pollPendingReviews(deps, state);
2183
2186
  if (sent.length > 0) acted("review_polling");
2184
2187
  for (const s of sent) {
@@ -2186,7 +2189,7 @@ async function startReviewPolling() {
2186
2189
  `);
2187
2190
  }
2188
2191
  try {
2189
- const nudgeDeps = createReviewNudgeRealDeps(getClient2);
2192
+ const nudgeDeps = createReviewNudgeRealDeps(getClient);
2190
2193
  const nudged = await pollReviewNudge(nudgeDeps, nudgeState);
2191
2194
  for (const n of nudged) {
2192
2195
  process.stderr.write(`[exed] Review nudge pushed to idle coordinator: ${n}
@@ -2212,9 +2215,9 @@ function startSessionTTL() {
2212
2215
  fired("session_ttl");
2213
2216
  if (!await ensureStoreForPolling()) return;
2214
2217
  try {
2215
- const { getClient: getClient2 } = await import("./database.js");
2216
- const { checkSessionTTL, createSessionTTLRealDeps } = await import("../daemon-orchestration-MLB3WJHB.js");
2217
- const deps = createSessionTTLRealDeps(getClient2);
2218
+ const { getClient } = await import("./database.js");
2219
+ const { checkSessionTTL, createSessionTTLRealDeps } = await import("../daemon-orchestration-ZBSS6VZR.js");
2220
+ const deps = createSessionTTLRealDeps(getClient);
2218
2221
  const killed = await checkSessionTTL(deps);
2219
2222
  if (killed.length > 0) acted("session_ttl");
2220
2223
  } catch (err) {
@@ -2261,10 +2264,10 @@ function startIdleKill() {
2261
2264
  try {
2262
2265
  const cfg = await getCachedConfig();
2263
2266
  if (!cfg) return;
2264
- const { getClient: getClient2 } = await import("./database.js");
2265
- const { pollIdleKill, createIdleKillRealDeps } = await import("../daemon-orchestration-MLB3WJHB.js");
2267
+ const { getClient } = await import("./database.js");
2268
+ const { pollIdleKill, createIdleKillRealDeps } = await import("../daemon-orchestration-ZBSS6VZR.js");
2266
2269
  const deps = createIdleKillRealDeps(
2267
- getClient2,
2270
+ getClient,
2268
2271
  cfg.sessionLifecycle.idleKillIntercomAckWindowMs
2269
2272
  );
2270
2273
  const killed = await pollIdleKill(deps, _idleTickCounts, {
@@ -2298,8 +2301,8 @@ function startConsolidation() {
2298
2301
  if (!config.consolidationEnabled) return;
2299
2302
  if (!process.env.ANTHROPIC_API_KEY) return;
2300
2303
  if (!await ensureStoreForPolling()) return;
2301
- const { getClient: getClient2 } = await import("./database.js");
2302
- const client = getClient2();
2304
+ const { getClient } = await import("./database.js");
2305
+ const client = getClient();
2303
2306
  const { countUnconsolidated, isUserIdle, runConsolidation } = await import("./consolidation.js");
2304
2307
  const count = await countUnconsolidated(client);
2305
2308
  if (count < 20) {
@@ -2506,8 +2509,8 @@ function startGraphExtraction() {
2506
2509
  if (config.graphRagEnabled === false) return;
2507
2510
  if (!process.env.ANTHROPIC_API_KEY) return;
2508
2511
  if (!await ensureStoreForPolling()) return;
2509
- const { getClient: getClient2 } = await import("./database.js");
2510
- const client = getClient2();
2512
+ const { getClient } = await import("./database.js");
2513
+ const client = getClient();
2511
2514
  const { extractBatch } = await import("../graph-rag-G3EG5Q6L.js");
2512
2515
  const result = await extractBatch(client, 50, config.selfQueryModel);
2513
2516
  if (result.processed > 0) {
@@ -2534,8 +2537,8 @@ async function writeAgentStats() {
2534
2537
  if (!await ensureStoreForPolling()) return;
2535
2538
  try {
2536
2539
  acted("agent_stats");
2537
- const { getClient: getClient2 } = await import("./database.js");
2538
- const client = getClient2();
2540
+ const { getClient } = await import("./database.js");
2541
+ const client = getClient();
2539
2542
  const result = await client.execute({
2540
2543
  sql: `SELECT agent_id,
2541
2544
  COUNT(*) as total,
@@ -2607,8 +2610,8 @@ function startConfidenceDecay() {
2607
2610
  fired("confidence_decay");
2608
2611
  if (!await ensureStoreForPolling()) return;
2609
2612
  try {
2610
- const { getClient: getClient2 } = await import("./database.js");
2611
- const client = getClient2();
2613
+ const { getClient } = await import("./database.js");
2614
+ const client = getClient();
2612
2615
  const result = await client.execute({
2613
2616
  sql: `UPDATE memories
2614
2617
  SET confidence = MAX(0.3, COALESCE(confidence, 0.7) - 0.01)
@@ -2639,8 +2642,8 @@ function startReflectionSweep() {
2639
2642
  fired("reflection_sweep");
2640
2643
  if (!await ensureStoreForPolling()) return;
2641
2644
  try {
2642
- const { getClient: getClient2 } = await import("./database.js");
2643
- const client = getClient2();
2645
+ const { getClient } = await import("./database.js");
2646
+ const client = getClient();
2644
2647
  const agents = await client.execute(
2645
2648
  "SELECT DISTINCT agent_id FROM memory_cards WHERE active = 1 LIMIT 50"
2646
2649
  );
@@ -2749,9 +2752,9 @@ function startSoftDeletePurge() {
2749
2752
  fired("soft_delete_purge");
2750
2753
  if (!await ensureStoreForPolling()) return;
2751
2754
  try {
2752
- const { getClient: getClient2 } = await import("./database.js");
2755
+ const { getClient } = await import("./database.js");
2753
2756
  const { SOFT_DELETE_RETENTION_DAYS } = await import("./database.js");
2754
- const client = getClient2();
2757
+ const client = getClient();
2755
2758
  const cutoffDate = new Date(Date.now() - SOFT_DELETE_RETENTION_DAYS * 24 * 60 * 60 * 1e3).toISOString();
2756
2759
  const result = await client.execute({
2757
2760
  sql: `SELECT COUNT(*) as cnt FROM memories WHERE status = 'deleted' AND deleted_at IS NOT NULL AND deleted_at < ?`,
@@ -2819,7 +2822,7 @@ function startOrphanReaper() {
2819
2822
  const tick = async () => {
2820
2823
  fired("orphan_reaper");
2821
2824
  try {
2822
- const { reapOrphanedMcpProcesses, createOrphanReaperRealDeps } = await import("../daemon-orchestration-MLB3WJHB.js");
2825
+ const { reapOrphanedMcpProcesses, createOrphanReaperRealDeps } = await import("../daemon-orchestration-ZBSS6VZR.js");
2823
2826
  const deps = createOrphanReaperRealDeps();
2824
2827
  const reaped = await reapOrphanedMcpProcesses(deps);
2825
2828
  if (reaped.length > 0) acted("orphan_reaper");
@@ -2843,7 +2846,7 @@ function startZombieAgentReaper() {
2843
2846
  const tick = async () => {
2844
2847
  fired("zombie_agent_reaper");
2845
2848
  try {
2846
- const { reapZombieAgentProcesses, createZombieAgentReaperRealDeps } = await import("../daemon-orchestration-MLB3WJHB.js");
2849
+ const { reapZombieAgentProcesses, createZombieAgentReaperRealDeps } = await import("../daemon-orchestration-ZBSS6VZR.js");
2847
2850
  const deps = createZombieAgentReaperRealDeps();
2848
2851
  const reaped = reapZombieAgentProcesses(deps);
2849
2852
  if (reaped.length > 0) acted("zombie_agent_reaper");
@@ -2866,7 +2869,7 @@ function startWorktreeReaper() {
2866
2869
  const tick = async () => {
2867
2870
  fired("worktree_reaper");
2868
2871
  try {
2869
- const { reapOrphanedWorktrees, createWorktreeReaperRealDeps } = await import("../daemon-orchestration-MLB3WJHB.js");
2872
+ const { reapOrphanedWorktrees, createWorktreeReaperRealDeps } = await import("../daemon-orchestration-ZBSS6VZR.js");
2870
2873
  const deps = await createWorktreeReaperRealDeps();
2871
2874
  const result = await reapOrphanedWorktrees(deps);
2872
2875
  if (result.pruned.length > 0) {
@@ -2896,8 +2899,8 @@ function startWalCheckpoint() {
2896
2899
  fired("wal_checkpoint");
2897
2900
  if (!await ensureStoreForPolling()) return;
2898
2901
  try {
2899
- const { getClient: getClient2 } = await import("./database.js");
2900
- const client = getClient2();
2902
+ const { getClient } = await import("./database.js");
2903
+ const client = getClient();
2901
2904
  await client.execute("PRAGMA wal_checkpoint(TRUNCATE)");
2902
2905
  acted("wal_checkpoint");
2903
2906
  } catch {
@@ -2914,9 +2917,9 @@ function startStuckTaskRelease() {
2914
2917
  fired("stuck_task_release");
2915
2918
  if (!await ensureStoreForPolling()) return;
2916
2919
  try {
2917
- const { getClient: getClient2 } = await import("./database.js");
2918
- const { releaseStuckTasks, createStuckTaskRealDeps } = await import("../daemon-orchestration-MLB3WJHB.js");
2919
- const deps = createStuckTaskRealDeps(getClient2);
2920
+ const { getClient } = await import("./database.js");
2921
+ const { releaseStuckTasks, createStuckTaskRealDeps } = await import("../daemon-orchestration-ZBSS6VZR.js");
2922
+ const deps = createStuckTaskRealDeps(getClient);
2920
2923
  const released = await releaseStuckTasks(deps);
2921
2924
  if (released.length > 0) {
2922
2925
  acted("stuck_task_release");
@@ -2959,7 +2962,7 @@ function startTaskEnforcementScanner() {
2959
2962
  const { runTaskEnforcementTick } = await import("../task-enforcement-QYS2QEEO.js");
2960
2963
  const { getTransport } = await import("./transport.js");
2961
2964
  const { loadAgentConfig } = await import("./agent-config.js");
2962
- const { getClient: getClient2 } = await import("./database.js");
2965
+ const { getClient } = await import("./database.js");
2963
2966
  const { loadEmployeesSync } = await import("./employees.js");
2964
2967
  const { sessionScopeFilter } = await import("../task-scope-OS66ZD7O.js");
2965
2968
  const transport = getTransport();
@@ -2969,7 +2972,7 @@ function startTaskEnforcementScanner() {
2969
2972
  transport,
2970
2973
  agentConfig: loadAgentConfig(),
2971
2974
  employees: loadEmployeesSync(),
2972
- client: await getClient2(),
2975
+ client: await getClient(),
2973
2976
  scopeFilter: sessionScopeFilter(),
2974
2977
  capturePaneAsync,
2975
2978
  paneCache
@@ -3189,8 +3192,8 @@ function startBugAutoFix() {
3189
3192
  const tick = async () => {
3190
3193
  fired("bug_autofix");
3191
3194
  try {
3192
- const { getClient: getClient2 } = await import("./database.js");
3193
- const client = await getClient2();
3195
+ const { getClient } = await import("./database.js");
3196
+ const client = await getClient();
3194
3197
  const result = await client.execute({
3195
3198
  sql: `SELECT id, title, priority, assigned_to, status FROM tasks
3196
3199
  WHERE priority IN ('p0', 'p1')
@@ -3526,8 +3529,8 @@ try {
3526
3529
  try {
3527
3530
  if (!await ensureStoreForPolling()) return;
3528
3531
  const { readdirSync, readFileSync: rfs } = await import("fs");
3529
- const { getClient: getClient2 } = await import("./database.js");
3530
- const client = getClient2();
3532
+ const { getClient } = await import("./database.js");
3533
+ const client = getClient();
3531
3534
  const tasksRoot = path3.join(os2.homedir(), ".exe-os", "tasks");
3532
3535
  let synced = 0;
3533
3536
  const walk = (dir) => {
@@ -3594,9 +3597,9 @@ try {
3594
3597
  fired("intercom_dedup_cleanup");
3595
3598
  try {
3596
3599
  if (!await ensureStoreForPolling()) return;
3597
- const { getClient: getClient2 } = await import("./database.js");
3600
+ const { getClient } = await import("./database.js");
3598
3601
  const { deduplicateIntercomMemories } = await import("./consolidation.js");
3599
- const count = await deduplicateIntercomMemories(getClient2());
3602
+ const count = await deduplicateIntercomMemories(getClient());
3600
3603
  if (count > 0) {
3601
3604
  acted("intercom_dedup_cleanup");
3602
3605
  process.stderr.write(`[exed] Intercom dedup: archived ${count} duplicate intercom memories
@@ -3611,9 +3614,9 @@ try {
3611
3614
  fired("trace_ttl_sweep");
3612
3615
  try {
3613
3616
  if (!await ensureStoreForPolling()) return;
3614
- const { getClient: getClient2 } = await import("./database.js");
3617
+ const { getClient } = await import("./database.js");
3615
3618
  const { sweepExpiredTraces } = await import("./consolidation.js");
3616
- const count = await sweepExpiredTraces(getClient2());
3619
+ const count = await sweepExpiredTraces(getClient());
3617
3620
  if (count > 0) {
3618
3621
  acted("trace_ttl_sweep");
3619
3622
  process.stderr.write(`[exed] Trace TTL: deleted ${count} expired raw tool traces (>7d, importance<7)
@@ -3680,7 +3683,7 @@ try {
3680
3683
  const { createWsClient } = await import("./ws-client.js");
3681
3684
  const { initStore } = await import("./store.js");
3682
3685
  const { sendMessage, deliverLocalMessage, setWsClientSend } = await import("./messaging.js");
3683
- const { getClient: getClient2 } = await import("./database.js");
3686
+ const { getClient } = await import("./database.js");
3684
3687
  await initStore();
3685
3688
  const wsClient = createWsClient({
3686
3689
  endpoint: config.cloud.endpoint.replace(/^https?/, "wss") + "/ws",
@@ -3706,7 +3709,7 @@ try {
3706
3709
  },
3707
3710
  onRegistry: async (devices) => {
3708
3711
  try {
3709
- const client = getClient2();
3712
+ const client = getClient();
3710
3713
  const now = (/* @__PURE__ */ new Date()).toISOString();
3711
3714
  for (const d of devices) {
3712
3715
  await client.execute({
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  registerAllTools
3
- } from "../chunk-2OX3F2UQ.js";
3
+ } from "../chunk-CHZMPZJ3.js";
4
4
  import "../chunk-PLNYW6PA.js";
5
5
  import "../chunk-AFJWUI3Y.js";
6
- import "../chunk-OK5U45GK.js";
6
+ import "../chunk-62DAMAFL.js";
7
7
  import "../chunk-GHCVD7WV.js";
8
8
  import "../chunk-WZTQUBIE.js";
9
9
  import "../chunk-KH5Y6RR4.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-V4TZI6EO.js";
4
4
  import {
5
5
  registerAllTools
6
- } from "../chunk-2OX3F2UQ.js";
6
+ } from "../chunk-CHZMPZJ3.js";
7
7
  import {
8
8
  initLicenseGate
9
9
  } from "../chunk-PLNYW6PA.js";
@@ -11,7 +11,7 @@ import {
11
11
  startToolTelemetryFlush,
12
12
  wrapServerWithTelemetry
13
13
  } from "../chunk-AFJWUI3Y.js";
14
- import "../chunk-OK5U45GK.js";
14
+ import "../chunk-62DAMAFL.js";
15
15
  import "../chunk-GHCVD7WV.js";
16
16
  import "../chunk-WZTQUBIE.js";
17
17
  import "../chunk-KH5Y6RR4.js";
@@ -20,7 +20,7 @@ import {
20
20
  runStackUpdate,
21
21
  verifyReleaseHealth,
22
22
  verifyStackManifestSignature
23
- } from "./chunk-MJYXPMPW.js";
23
+ } from "./chunk-M7NGABPF.js";
24
24
  import "./chunk-MVMMULOJ.js";
25
25
  import "./chunk-4GXRETYL.js";
26
26
  import "./chunk-LYH5HE24.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.9.196",
3
+ "version": "0.9.198",
4
4
  "description": "AI employee operating system — persistent memory, task management, and multi-agent coordination for Claude Code.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",