@theglitchking/semantic-memory 1.5.0 → 1.5.2

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.
@@ -17,7 +17,7 @@ import {
17
17
  regenDirectoryIndex,
18
18
  regenIndexesForPaths,
19
19
  regenerateAgentsContract
20
- } from "../chunk-CSXZ7QUU.js";
20
+ } from "../chunk-JWPR2B2X.js";
21
21
  import {
22
22
  lintVault
23
23
  } from "../chunk-FM26NFTR.js";
@@ -53,10 +53,10 @@ import {
53
53
  GraphBuilder,
54
54
  TextSearch,
55
55
  VectorIndex
56
- } from "../chunk-25EIQWXL.js";
56
+ } from "../chunk-44BQDRXD.js";
57
57
  import {
58
58
  Indexer
59
- } from "../chunk-V45NJIHI.js";
59
+ } from "../chunk-IGHCVAAL.js";
60
60
  import {
61
61
  logEvent,
62
62
  logQuery
@@ -5771,7 +5771,7 @@ async function createServer(notesPath, options = {}) {
5771
5771
  await ctx.fullIndex();
5772
5772
  } else {
5773
5773
  ctx.tryLoadCachedIndex().then((cached) => {
5774
- if (!cached) ctx.backgroundIndex();
5774
+ if (!cached || ctx.getIndexState() === "stale") ctx.backgroundIndex();
5775
5775
  }).catch((err) => {
5776
5776
  process.stderr.write(`Startup error: ${err?.message ?? err}
5777
5777
  `);