@remnic/core 10.0.149 → 10.0.150

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 (160) hide show
  1. package/dist/access-admin-ops-surface.js +56 -55
  2. package/dist/access-cli.js +56 -55
  3. package/dist/access-cli.js.map +1 -1
  4. package/dist/access-extraction-force-flush-preempt.js +56 -55
  5. package/dist/access-extraction-force-flush.js +56 -55
  6. package/dist/access-http-briefing.js +56 -55
  7. package/dist/access-http-query.js +56 -55
  8. package/dist/access-http.js +56 -55
  9. package/dist/access-identity-continuity-surface.js +56 -55
  10. package/dist/access-lcm-surface.js +56 -55
  11. package/dist/access-mcp.js +56 -55
  12. package/dist/access-observe-write-surface.js +56 -55
  13. package/dist/access-operations-batch.js +56 -55
  14. package/dist/access-operations.js +56 -55
  15. package/dist/access-recall-concurrency.js +56 -55
  16. package/dist/access-recall-response.js +56 -55
  17. package/dist/access-recall-surface.js +56 -55
  18. package/dist/access-service.js +56 -55
  19. package/dist/active-recall.js +9 -9
  20. package/dist/adapters/index.js +4 -4
  21. package/dist/adapters/registry.js +2 -2
  22. package/dist/briefing.js +10 -10
  23. package/dist/causal-consolidation.js +11 -11
  24. package/dist/{chunk-XCJDDXJX.js → chunk-272GJCTZ.js} +2 -2
  25. package/dist/{chunk-E6VI7POW.js → chunk-3JZZ6WTA.js} +66 -66
  26. package/dist/{chunk-EIEANUBO.js → chunk-3YZYD5XJ.js} +7 -7
  27. package/dist/{chunk-66DUCUOC.js → chunk-4LF5E2LM.js} +4 -4
  28. package/dist/{chunk-5UYP5IQB.js → chunk-5N767BMB.js} +2 -2
  29. package/dist/{chunk-CA56BOUE.js → chunk-65B3XGQR.js} +3 -3
  30. package/dist/{chunk-DOFLNJZD.js → chunk-6ENFCUYH.js} +3 -3
  31. package/dist/{chunk-RSPPAPFI.js → chunk-6M3VJJON.js} +2 -2
  32. package/dist/{chunk-ORPYIVT3.js → chunk-ALNINIUB.js} +2 -2
  33. package/dist/{chunk-RQ6HMDA5.js → chunk-AMPTUYKS.js} +2 -2
  34. package/dist/{chunk-UMC6F3Y4.js → chunk-CAFF45W4.js} +3 -3
  35. package/dist/{chunk-AHNGWFNG.js → chunk-DPF7TX3D.js} +2 -2
  36. package/dist/{chunk-TVRUUT7U.js → chunk-EK3GC76D.js} +2 -2
  37. package/dist/{chunk-YCASWFI6.js → chunk-EUIWWY2F.js} +3 -3
  38. package/dist/{chunk-HUDPXTXW.js → chunk-GXL52YZA.js} +23 -14
  39. package/dist/chunk-GXL52YZA.js.map +1 -0
  40. package/dist/{chunk-7OWV3GVD.js → chunk-HAEMXLHX.js} +2 -2
  41. package/dist/{chunk-JPVUBL4L.js → chunk-HOENUZJ7.js} +2 -2
  42. package/dist/{chunk-Z3GZRG5Z.js → chunk-J2NQZJRG.js} +2 -2
  43. package/dist/chunk-JA2GJCOS.js +16 -0
  44. package/dist/chunk-JA2GJCOS.js.map +1 -0
  45. package/dist/{chunk-NQJAF2Q4.js → chunk-KZBUOWKB.js} +2 -2
  46. package/dist/{chunk-SLZJ7HQX.js → chunk-M7BJEWPQ.js} +2 -2
  47. package/dist/{chunk-3DJ6R4CC.js → chunk-MX5VGD6C.js} +4 -4
  48. package/dist/{chunk-AWZ5CWSR.js → chunk-MXMFRU45.js} +7 -7
  49. package/dist/{chunk-5ZSN2OFB.js → chunk-NQ2WFFPQ.js} +6 -6
  50. package/dist/{chunk-MBQVWTCS.js → chunk-O2677F2E.js} +2 -2
  51. package/dist/{chunk-ZG4GNPRE.js → chunk-PBE7NFB5.js} +5 -5
  52. package/dist/{chunk-DLR3SBOM.js → chunk-RJ5L6LRD.js} +4 -4
  53. package/dist/{chunk-HADCITEA.js → chunk-SENCYTQ2.js} +10 -10
  54. package/dist/{chunk-7QKZOZF4.js → chunk-T266H3RJ.js} +2 -2
  55. package/dist/{chunk-QGV6JVQ7.js → chunk-T2IKH7XD.js} +2 -2
  56. package/dist/{chunk-TQU2RB4B.js → chunk-UUY7OEO7.js} +2 -2
  57. package/dist/{chunk-B5MB2G3H.js → chunk-VZCX3DOD.js} +2 -2
  58. package/dist/{chunk-GCHM5BYL.js → chunk-WWQMZBDI.js} +4 -4
  59. package/dist/{chunk-4JKIOAOF.js → chunk-XSG2S43P.js} +3 -3
  60. package/dist/{chunk-5BKH4XG5.js → chunk-XTJUE2ON.js} +2 -2
  61. package/dist/{chunk-EYES6ALH.js → chunk-XYW5HHFS.js} +23 -19
  62. package/dist/chunk-XYW5HHFS.js.map +1 -0
  63. package/dist/{chunk-6S37C5UK.js → chunk-Z5QZHDG2.js} +2 -2
  64. package/dist/{chunk-K6RKNQRD.js → chunk-ZFGXIEQU.js} +2 -2
  65. package/dist/cli.js +56 -55
  66. package/dist/coding/export-okf-codegraph.js +9 -9
  67. package/dist/compounding/engine.js +11 -11
  68. package/dist/config.js +9 -9
  69. package/dist/connectors/codex-materialize-runner.js +10 -10
  70. package/dist/connectors/index.js +10 -10
  71. package/dist/convergence-refresh.js +12 -12
  72. package/dist/corpus-watermark.js +12 -12
  73. package/dist/entity-retrieval.js +10 -10
  74. package/dist/explicit-capture.js +56 -55
  75. package/dist/extraction.js +10 -10
  76. package/dist/harmonic-retrieval.d.ts.map +1 -1
  77. package/dist/harmonic-retrieval.js +12 -11
  78. package/dist/harmonic-source-lookup.d.ts.map +1 -1
  79. package/dist/harmonic-source-lookup.js +2 -1
  80. package/dist/index.js +94 -93
  81. package/dist/lcm/engine.js +2 -2
  82. package/dist/lcm/index.js +5 -5
  83. package/dist/location/index.js +11 -11
  84. package/dist/maintenance/memory-governance.js +10 -10
  85. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +10 -10
  86. package/dist/maintenance/rebuild-memory-projection-runner.js +12 -12
  87. package/dist/maintenance/rebuild-memory-projection.js +11 -11
  88. package/dist/map-in-batches.d.ts +10 -0
  89. package/dist/map-in-batches.d.ts.map +1 -0
  90. package/dist/map-in-batches.js +10 -0
  91. package/dist/map-in-batches.js.map +1 -0
  92. package/dist/namespaces/migrate.js +11 -11
  93. package/dist/namespaces/search.js +7 -7
  94. package/dist/namespaces/storage.js +10 -10
  95. package/dist/operator-doctor-corpus.js +13 -13
  96. package/dist/operator-toolkit.js +16 -16
  97. package/dist/orchestration/backlog-scheduler.js +57 -56
  98. package/dist/orchestration/backlog-scheduler.js.map +1 -1
  99. package/dist/orchestration/buffer-drain-runner.js +57 -56
  100. package/dist/orchestration/maintenance.js +18 -18
  101. package/dist/orchestrator.js +56 -55
  102. package/dist/recall-navigation.js +56 -55
  103. package/dist/resume-bundles.js +9 -9
  104. package/dist/search/factory.js +6 -6
  105. package/dist/search/index.js +11 -11
  106. package/dist/search/lancedb-backend.js +2 -2
  107. package/dist/search/meilisearch-backend.js +2 -2
  108. package/dist/search/orama-backend.js +2 -2
  109. package/dist/semantic-consolidation.js +11 -11
  110. package/dist/semantic-rule-promotion.js +10 -10
  111. package/dist/semantic-rule-verifier.js +10 -10
  112. package/dist/source-agent-qualifier.js +10 -10
  113. package/dist/standup/build.js +10 -10
  114. package/dist/storage.js +9 -9
  115. package/dist/transfer/export-okf.js +10 -10
  116. package/dist/verified-recall.js +10 -10
  117. package/dist/who-knows-cli.js +11 -11
  118. package/dist/who-knows.js +10 -10
  119. package/package.json +2 -2
  120. package/src/harmonic-retrieval-index.test.ts +56 -1
  121. package/src/harmonic-retrieval.ts +18 -16
  122. package/src/harmonic-source-lookup.ts +21 -15
  123. package/src/map-in-batches.ts +17 -0
  124. package/dist/chunk-EYES6ALH.js.map +0 -1
  125. package/dist/chunk-HUDPXTXW.js.map +0 -1
  126. /package/dist/{chunk-XCJDDXJX.js.map → chunk-272GJCTZ.js.map} +0 -0
  127. /package/dist/{chunk-E6VI7POW.js.map → chunk-3JZZ6WTA.js.map} +0 -0
  128. /package/dist/{chunk-EIEANUBO.js.map → chunk-3YZYD5XJ.js.map} +0 -0
  129. /package/dist/{chunk-66DUCUOC.js.map → chunk-4LF5E2LM.js.map} +0 -0
  130. /package/dist/{chunk-5UYP5IQB.js.map → chunk-5N767BMB.js.map} +0 -0
  131. /package/dist/{chunk-CA56BOUE.js.map → chunk-65B3XGQR.js.map} +0 -0
  132. /package/dist/{chunk-DOFLNJZD.js.map → chunk-6ENFCUYH.js.map} +0 -0
  133. /package/dist/{chunk-RSPPAPFI.js.map → chunk-6M3VJJON.js.map} +0 -0
  134. /package/dist/{chunk-ORPYIVT3.js.map → chunk-ALNINIUB.js.map} +0 -0
  135. /package/dist/{chunk-RQ6HMDA5.js.map → chunk-AMPTUYKS.js.map} +0 -0
  136. /package/dist/{chunk-UMC6F3Y4.js.map → chunk-CAFF45W4.js.map} +0 -0
  137. /package/dist/{chunk-AHNGWFNG.js.map → chunk-DPF7TX3D.js.map} +0 -0
  138. /package/dist/{chunk-TVRUUT7U.js.map → chunk-EK3GC76D.js.map} +0 -0
  139. /package/dist/{chunk-YCASWFI6.js.map → chunk-EUIWWY2F.js.map} +0 -0
  140. /package/dist/{chunk-7OWV3GVD.js.map → chunk-HAEMXLHX.js.map} +0 -0
  141. /package/dist/{chunk-JPVUBL4L.js.map → chunk-HOENUZJ7.js.map} +0 -0
  142. /package/dist/{chunk-Z3GZRG5Z.js.map → chunk-J2NQZJRG.js.map} +0 -0
  143. /package/dist/{chunk-NQJAF2Q4.js.map → chunk-KZBUOWKB.js.map} +0 -0
  144. /package/dist/{chunk-SLZJ7HQX.js.map → chunk-M7BJEWPQ.js.map} +0 -0
  145. /package/dist/{chunk-3DJ6R4CC.js.map → chunk-MX5VGD6C.js.map} +0 -0
  146. /package/dist/{chunk-AWZ5CWSR.js.map → chunk-MXMFRU45.js.map} +0 -0
  147. /package/dist/{chunk-5ZSN2OFB.js.map → chunk-NQ2WFFPQ.js.map} +0 -0
  148. /package/dist/{chunk-MBQVWTCS.js.map → chunk-O2677F2E.js.map} +0 -0
  149. /package/dist/{chunk-ZG4GNPRE.js.map → chunk-PBE7NFB5.js.map} +0 -0
  150. /package/dist/{chunk-DLR3SBOM.js.map → chunk-RJ5L6LRD.js.map} +0 -0
  151. /package/dist/{chunk-HADCITEA.js.map → chunk-SENCYTQ2.js.map} +0 -0
  152. /package/dist/{chunk-7QKZOZF4.js.map → chunk-T266H3RJ.js.map} +0 -0
  153. /package/dist/{chunk-QGV6JVQ7.js.map → chunk-T2IKH7XD.js.map} +0 -0
  154. /package/dist/{chunk-TQU2RB4B.js.map → chunk-UUY7OEO7.js.map} +0 -0
  155. /package/dist/{chunk-B5MB2G3H.js.map → chunk-VZCX3DOD.js.map} +0 -0
  156. /package/dist/{chunk-GCHM5BYL.js.map → chunk-WWQMZBDI.js.map} +0 -0
  157. /package/dist/{chunk-4JKIOAOF.js.map → chunk-XSG2S43P.js.map} +0 -0
  158. /package/dist/{chunk-5BKH4XG5.js.map → chunk-XTJUE2ON.js.map} +0 -0
  159. /package/dist/{chunk-6S37C5UK.js.map → chunk-Z5QZHDG2.js.map} +0 -0
  160. /package/dist/{chunk-K6RKNQRD.js.map → chunk-ZFGXIEQU.js.map} +0 -0
@@ -2,7 +2,7 @@ import {
2
2
  WHO_KNOWS_DEFAULT_LIMIT,
3
3
  WHO_KNOWS_MAX_LIMIT,
4
4
  validateWhoKnowsInput
5
- } from "./chunk-RSPPAPFI.js";
5
+ } from "./chunk-6M3VJJON.js";
6
6
 
7
7
  // src/who-knows-cli.ts
8
8
  function extractWhoKnowsRawArgs(rest) {
@@ -74,4 +74,4 @@ export {
74
74
  renderWhoKnowsText,
75
75
  renderWhoKnows
76
76
  };
77
- //# sourceMappingURL=chunk-TVRUUT7U.js.map
77
+ //# sourceMappingURL=chunk-EK3GC76D.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  NamespaceStorageRouter
3
- } from "./chunk-7QKZOZF4.js";
3
+ } from "./chunk-T266H3RJ.js";
4
4
  import {
5
5
  namespaceCollectionName
6
- } from "./chunk-XCJDDXJX.js";
6
+ } from "./chunk-272GJCTZ.js";
7
7
  import {
8
8
  isSafeRouteNamespace
9
9
  } from "./chunk-PCXDUHQH.js";
@@ -213,4 +213,4 @@ export {
213
213
  verifyNamespaces,
214
214
  runNamespaceMigration
215
215
  };
216
- //# sourceMappingURL=chunk-YCASWFI6.js.map
216
+ //# sourceMappingURL=chunk-EUIWWY2F.js.map
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  readProjectedMemoryPaths
3
3
  } from "./chunk-AZEZSQ5R.js";
4
+ import {
5
+ mapInBatches
6
+ } from "./chunk-JA2GJCOS.js";
4
7
  import {
5
8
  throwIfAborted
6
9
  } from "./chunk-R2MBW2S4.js";
@@ -73,19 +76,18 @@ async function readUnresolvedHarmonicSources(options) {
73
76
  const cache = safeCache ? await readPathCache(cachePath, rebuiltAt, corpusVersion, nowMs) : /* @__PURE__ */ new Map();
74
77
  const found = /* @__PURE__ */ new Map();
75
78
  const pending = /* @__PURE__ */ new Set();
76
- for (const id of options.sourceMemoryIds) {
79
+ const probed = await mapInBatches(options.sourceMemoryIds, async (id) => {
77
80
  throwIfAborted(abortSignal, "harmonic retrieval aborted");
78
81
  const entry = cache.get(id);
79
- if (entry?.path === null) continue;
80
- if (entry?.path) {
81
- const candidate = path.resolve(storage.dir, entry.path);
82
- const memory = isCorpusPath(storage.dir, candidate) ? await readHarmonicSourceMemory(storage, rootReal, candidate, abortSignal) : null;
83
- if (memory?.frontmatter.id === id) {
84
- found.set(id, memory);
85
- continue;
86
- }
87
- }
88
- pending.add(id);
82
+ if (entry?.path === null || !entry?.path) return { id, memory: null, skip: entry?.path === null };
83
+ const candidate = path.resolve(storage.dir, entry.path);
84
+ const memory = isCorpusPath(storage.dir, candidate) ? await readHarmonicSourceMemory(storage, rootReal, candidate, abortSignal) : null;
85
+ return { id, memory: memory?.frontmatter.id === id ? memory : null, skip: false };
86
+ });
87
+ for (const { id, memory, skip } of probed) {
88
+ if (skip) continue;
89
+ if (memory) found.set(id, memory);
90
+ else pending.add(id);
89
91
  }
90
92
  if (pending.size === 0) return found;
91
93
  const inspectProjected = [...pending].some((id) => !isSafeLegacyPathSegment(id));
@@ -94,10 +96,17 @@ async function readUnresolvedHarmonicSources(options) {
94
96
  ...await storage.collectActiveMemoryPaths({ abortSignal, propagateReadErrors: true }),
95
97
  ...await storage.collectColdMemoryPaths({ abortSignal, propagateReadErrors: true })
96
98
  ];
97
- for (const filePath of walked) {
99
+ const toRead = walked.filter((filePath) => (
100
+ // Existing projected files need no parse unless their filename names a wanted id.
101
+ // New/imported files must be keyed by frontmatter id, not their basename (#3188).
102
+ inspectProjected || pending.has(path.basename(filePath, ".md")) || !projectedPaths?.has(filePath)
103
+ ));
104
+ const read = await mapInBatches(toRead, async (filePath) => {
98
105
  throwIfAborted(abortSignal, "harmonic retrieval aborted");
99
- if (!inspectProjected && !pending.has(path.basename(filePath, ".md")) && projectedPaths?.has(filePath)) continue;
100
106
  const memory = await readHarmonicSourceMemory(storage, rootReal, filePath, abortSignal);
107
+ return { filePath, memory: memory !== null && pending.has(memory.frontmatter.id) ? memory : null };
108
+ });
109
+ for (const { filePath, memory } of read) {
101
110
  if (!memory) continue;
102
111
  const id = memory.frontmatter.id;
103
112
  if (pending.has(id)) {
@@ -131,4 +140,4 @@ export {
131
140
  readHarmonicSourceMemory,
132
141
  readUnresolvedHarmonicSources
133
142
  };
134
- //# sourceMappingURL=chunk-HUDPXTXW.js.map
143
+ //# sourceMappingURL=chunk-GXL52YZA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/harmonic-source-lookup.ts"],"sourcesContent":["import path from \"node:path\";\nimport { existsSync } from \"node:fs\";\nimport { mkdir, realpath } from \"node:fs/promises\";\nimport { throwIfAborted } from \"./abort-error.js\";\nimport { readJsonFile, writeJsonFileAtomic } from \"./json-store.js\";\nimport { mapInBatches } from \"./map-in-batches.js\";\nimport { readProjectedMemoryPaths } from \"./memory-projection-batch.js\";\nimport { SecureStoreLockedError } from \"./secure-store/secure-fs.js\";\nimport { isPathInsideStorageRoot, isSafeLegacyPathSegment } from \"./storage-paths.js\";\nimport { isRecord } from \"./store-contract.js\";\nimport type { StorageManager } from \"./storage.js\";\nimport type { MemoryFile } from \"./types.js\";\nimport { RECALL_FALLBACK_DIRS } from \"./utils/category-dir.js\";\n\nconst LOOKUP_TTL_MS = 10 * 60_000;\nconst MAX_CACHE_ENTRIES = 4096;\ntype PathEntry = { path: string | null; expiresAt: number };\n\n/** Direct and cached probes must retain the walk's realpath containment check. */\nexport async function readHarmonicSourceMemory(\n storage: StorageManager,\n rootReal: string,\n filePath: string,\n abortSignal?: AbortSignal,\n): Promise<MemoryFile | null> {\n throwIfAborted(abortSignal, \"harmonic retrieval aborted\");\n if (!existsSync(filePath)) return null;\n try {\n if (!isPathInsideStorageRoot(rootReal, await realpath(filePath))) return null;\n return await storage.readMemoryByPath(filePath);\n } catch (err) {\n throwIfAborted(abortSignal, \"harmonic retrieval aborted\");\n if (err instanceof SecureStoreLockedError) throw err;\n return null;\n }\n}\n\nfunction isCorpusPath(memoryDir: string, filePath: string): boolean {\n if (!isPathInsideStorageRoot(memoryDir, filePath)) return false;\n const [dir] = path.relative(memoryDir, filePath).split(path.sep);\n return dir === \"cold\" || RECALL_FALLBACK_DIRS.includes(dir);\n}\n\n/** A cache miss is not authoritative: unreadable/invalid cache state keeps the walk. */\nasync function readPathCache(\n filePath: string, rebuiltAt: string, corpusVersion: string, nowMs: number,\n): Promise<Map<string, PathEntry>> {\n try {\n const raw = await readJsonFile(filePath);\n if (!isRecord(raw) || raw.rebuiltAt !== rebuiltAt || raw.corpusVersion !== corpusVersion || !Array.isArray(raw.entries)) return new Map();\n const entries = new Map<string, PathEntry>();\n for (const row of raw.entries) {\n if (!Array.isArray(row) || row.length !== 3) continue;\n const [id, storedPath, expiresAt] = row;\n if (typeof id !== \"string\" || (storedPath !== null && typeof storedPath !== \"string\")) continue;\n if (typeof expiresAt !== \"number\" || !Number.isFinite(expiresAt) || expiresAt <= nowMs || expiresAt > nowMs + LOOKUP_TTL_MS) continue;\n entries.set(id, { path: storedPath, expiresAt });\n }\n return entries;\n } catch {\n return new Map();\n }\n}\n\n/** Resolve only unresolved ids; persist paths/absence, never memory content. */\nexport async function readUnresolvedHarmonicSources(options: {\n storage: StorageManager;\n rootReal: string;\n rebuiltAt: string;\n sourceMemoryIds: string[];\n nowMs: number;\n abortSignal?: AbortSignal;\n}): Promise<Map<string, MemoryFile>> {\n const { storage, rootReal, rebuiltAt, nowMs, abortSignal } = options;\n throwIfAborted(abortSignal, \"harmonic retrieval aborted\");\n const corpusVersion = storage.getCorpusScanVersion();\n const stateDir = path.join(storage.dir, \"state\");\n const cachePath = path.join(stateDir, \"harmonic-source-paths.json\");\n const stateReal = await realpath(stateDir).catch(() => null);\n const safeCache = stateReal !== null && isPathInsideStorageRoot(rootReal, stateReal);\n const cache = safeCache ? await readPathCache(cachePath, rebuiltAt, corpusVersion, nowMs) : new Map<string, PathEntry>();\n const found = new Map<string, MemoryFile>();\n const pending = new Set<string>();\n const probed = await mapInBatches(options.sourceMemoryIds, async (id) => {\n throwIfAborted(abortSignal, \"harmonic retrieval aborted\");\n const entry = cache.get(id);\n if (entry?.path === null || !entry?.path) return { id, memory: null, skip: entry?.path === null };\n const candidate = path.resolve(storage.dir, entry.path);\n const memory = isCorpusPath(storage.dir, candidate)\n ? await readHarmonicSourceMemory(storage, rootReal, candidate, abortSignal) : null;\n return { id, memory: memory?.frontmatter.id === id ? memory : null, skip: false };\n });\n for (const { id, memory, skip } of probed) {\n if (skip) continue;\n if (memory) found.set(id, memory);\n else pending.add(id);\n }\n if (pending.size === 0) return found;\n\n // Opaque legacy ids previously used the full scan, including edited projected files.\n const inspectProjected = [...pending].some((id) => !isSafeLegacyPathSegment(id));\n const projectedPaths = readProjectedMemoryPaths(storage.dir);\n const walked = [\n ...(await storage.collectActiveMemoryPaths({ abortSignal, propagateReadErrors: true })),\n ...(await storage.collectColdMemoryPaths({ abortSignal, propagateReadErrors: true })),\n ];\n const toRead = walked.filter((filePath) =>\n // Existing projected files need no parse unless their filename names a wanted id.\n // New/imported files must be keyed by frontmatter id, not their basename (#3188).\n inspectProjected || pending.has(path.basename(filePath, \".md\")) || !projectedPaths?.has(filePath));\n const read = await mapInBatches(toRead, async (filePath) => {\n throwIfAborted(abortSignal, \"harmonic retrieval aborted\");\n const memory = await readHarmonicSourceMemory(storage, rootReal, filePath, abortSignal);\n // Drop non-matching parses inside the batch so a full-corpus walk does not\n // hold every MemoryFile until the last batch resolves.\n return { filePath, memory: memory !== null && pending.has(memory.frontmatter.id) ? memory : null };\n });\n for (const { filePath, memory } of read) {\n if (!memory) continue;\n const id = memory.frontmatter.id;\n if (pending.has(id)) {\n found.set(id, memory);\n cache.set(id, { path: path.relative(storage.dir, filePath), expiresAt: nowMs + LOOKUP_TTL_MS });\n }\n }\n for (const id of pending) {\n if (!found.has(id)) cache.set(id, { path: null, expiresAt: nowMs + LOOKUP_TTL_MS });\n }\n throwIfAborted(abortSignal, \"harmonic retrieval aborted\");\n // A concurrent mutation must not publish absence for a different corpus epoch.\n if (storage.getCorpusScanVersion() === corpusVersion) {\n try {\n await mkdir(stateDir, { recursive: true });\n if (isPathInsideStorageRoot(rootReal, await realpath(stateDir))) {\n throwIfAborted(abortSignal, \"harmonic retrieval aborted\");\n // ponytail: atomic last-writer-wins cache; contention can repeat a walk, not lose sources.\n await writeJsonFileAtomic(cachePath, {\n rebuiltAt, corpusVersion,\n entries: [...cache].slice(-MAX_CACHE_ENTRIES).map(([id, entry]) => [id, entry.path, entry.expiresAt]),\n });\n }\n } catch {\n throwIfAborted(abortSignal, \"harmonic retrieval aborted\");\n // Cache publication is optional; resolved memories remain usable on a read-only store.\n }\n }\n return found;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,OAAO,gBAAgB;AAYhC,IAAM,gBAAgB,KAAK;AAC3B,IAAM,oBAAoB;AAI1B,eAAsB,yBACpB,SACA,UACA,UACA,aAC4B;AAC5B,iBAAe,aAAa,4BAA4B;AACxD,MAAI,CAAC,WAAW,QAAQ,EAA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W;AAAA,UACnC;AAAA,UAAW;AAAA,UACX,SAAS,CAAC,GAAG,KAAK,EAAE,MAAM,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,MAAM,MAAM,MAAM,SAAS,CAAC;AAAA,QACtG,CAAC;AAAA,MACH;AAAA,IACF,QAAQ;AACN,qBAAe,aAAa,4BAA4B;AAAA,IAE1D;AAAA,EACF;AACA,SAAO;AACT;","names":[]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  resolveDefaultNamespaceRoot,
3
3
  resolveNamespaceStorageRoot
4
- } from "./chunk-7QKZOZF4.js";
4
+ } from "./chunk-T266H3RJ.js";
5
5
  import {
6
6
  getConfiguredNamespaces
7
7
  } from "./chunk-UPWOMMVU.js";
@@ -2308,4 +2308,4 @@ export {
2308
2308
  runNamespaceMaintenancePlan,
2309
2309
  runNamespaceMaintenanceBatchPlan
2310
2310
  };
2311
- //# sourceMappingURL=chunk-7OWV3GVD.js.map
2311
+ //# sourceMappingURL=chunk-HAEMXLHX.js.map
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-EKUI7I2X.js";
11
11
  import {
12
12
  StorageManager
13
- } from "./chunk-5ZSN2OFB.js";
13
+ } from "./chunk-NQ2WFFPQ.js";
14
14
  import {
15
15
  normalizeEntityName
16
16
  } from "./chunk-YXZG5TVN.js";
@@ -974,4 +974,4 @@ export {
974
974
  resolveBriefingSaveDir,
975
975
  briefingFilename
976
976
  };
977
- //# sourceMappingURL=chunk-JPVUBL4L.js.map
977
+ //# sourceMappingURL=chunk-HOENUZJ7.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  rebuildMemoryProjection,
3
3
  watchProjectionRebuildParent
4
- } from "./chunk-4JKIOAOF.js";
4
+ } from "./chunk-XSG2S43P.js";
5
5
  import {
6
6
  initLogger,
7
7
  log
@@ -77,4 +77,4 @@ if (invokedAsRunner) {
77
77
  export {
78
78
  PROJECTION_REBUILD_RUNNER_FLAG
79
79
  };
80
- //# sourceMappingURL=chunk-Z3GZRG5Z.js.map
80
+ //# sourceMappingURL=chunk-J2NQZJRG.js.map
@@ -0,0 +1,16 @@
1
+ // src/map-in-batches.ts
2
+ var HARMONIC_READ_BATCH_SIZE = 50;
3
+ async function mapInBatches(items, fn) {
4
+ const results = new Array(items.length);
5
+ for (let i = 0; i < items.length; i += HARMONIC_READ_BATCH_SIZE) {
6
+ const settled = await Promise.all(items.slice(i, i + HARMONIC_READ_BATCH_SIZE).map(fn));
7
+ for (let j = 0; j < settled.length; j++) results[i + j] = settled[j];
8
+ }
9
+ return results;
10
+ }
11
+
12
+ export {
13
+ HARMONIC_READ_BATCH_SIZE,
14
+ mapInBatches
15
+ };
16
+ //# sourceMappingURL=chunk-JA2GJCOS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/map-in-batches.ts"],"sourcesContent":["/**\n * Run `fn` over `items` in `size`-wide parallel batches. A harmonic graph build\n * resolves thousands of per-file reads (nodes, anchors, sources); awaiting\n * each in turn made builds take ~10-20 s on a real corpus, so every recall\n * that missed the cache paid the whole wait (issue #3450). The batch size\n * matches the corpus read path's (readParsedMemoriesFromPaths uses 50, #2307).\n */\nexport const HARMONIC_READ_BATCH_SIZE = 50;\n\nexport async function mapInBatches<T, R>(items: readonly T[], fn: (item: T) => Promise<R>): Promise<R[]> {\n const results: R[] = new Array(items.length);\n for (let i = 0; i < items.length; i += HARMONIC_READ_BATCH_SIZE) {\n const settled = await Promise.all(items.slice(i, i + HARMONIC_READ_BATCH_SIZE).map(fn));\n for (let j = 0; j < settled.length; j++) results[i + j] = settled[j];\n }\n return results;\n}\n"],"mappings":";AAOO,IAAM,2BAA2B;AAExC,eAAsB,aAAmB,OAAqB,IAA2C;AACvG,QAAM,UAAe,IAAI,MAAM,MAAM,MAAM;AAC3C,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,0BAA0B;AAC/D,UAAM,UAAU,MAAM,QAAQ,IAAI,MAAM,MAAM,GAAG,IAAI,wBAAwB,EAAE,IAAI,EAAE,CAAC;AACtF,aAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,IAAK,SAAQ,IAAI,CAAC,IAAI,QAAQ,CAAC;AAAA,EACrE;AACA,SAAO;AACT;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  listNamespaces
3
- } from "./chunk-YCASWFI6.js";
3
+ } from "./chunk-EUIWWY2F.js";
4
4
  import {
5
5
  corpusScanWorker
6
6
  } from "./chunk-4LZ7SVKM.js";
@@ -292,4 +292,4 @@ export {
292
292
  computeServiceCorpusWatermarks,
293
293
  computeServiceCorpusCensus
294
294
  };
295
- //# sourceMappingURL=chunk-NQJAF2Q4.js.map
295
+ //# sourceMappingURL=chunk-KZBUOWKB.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runPostConsolidationMaterialize
3
- } from "./chunk-TQU2RB4B.js";
3
+ } from "./chunk-UUY7OEO7.js";
4
4
  import {
5
5
  discoverMemoryExtensions,
6
6
  renderExtensionsBlock,
@@ -220,4 +220,4 @@ export {
220
220
  buildExtensionsBlockForConsolidation,
221
221
  materializeAfterSemanticConsolidation
222
222
  };
223
- //# sourceMappingURL=chunk-SLZJ7HQX.js.map
223
+ //# sourceMappingURL=chunk-M7BJEWPQ.js.map
@@ -1,10 +1,10 @@
1
- import {
2
- scanMemoryDir
3
- } from "./chunk-WNEVEMJ3.js";
4
1
  import {
5
2
  isSearchAborted,
6
3
  throwIfSearchAborted
7
4
  } from "./chunk-Y5NLBXPV.js";
5
+ import {
6
+ scanMemoryDir
7
+ } from "./chunk-WNEVEMJ3.js";
8
8
  import {
9
9
  reportSearchDegradation,
10
10
  resolveEnsureCollectionArgs
@@ -523,4 +523,4 @@ function isMissingVectorProviderColumnError(err) {
523
523
  export {
524
524
  LanceDbBackend
525
525
  };
526
- //# sourceMappingURL=chunk-3DJ6R4CC.js.map
526
+ //# sourceMappingURL=chunk-MX5VGD6C.js.map
@@ -3,7 +3,7 @@ import {
3
3
  readNamespaceMaintenanceLastRanStatuses,
4
4
  readNamespaceMaintenanceStatuses,
5
5
  runNamespaceMaintenancePlan
6
- } from "./chunk-7OWV3GVD.js";
6
+ } from "./chunk-HAEMXLHX.js";
7
7
  import {
8
8
  analyzeSessionIntegrity,
9
9
  applySessionRepair,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-CMTINOFS.js";
15
15
  import {
16
16
  summarizeCorpusAndReplica
17
- } from "./chunk-6S37C5UK.js";
17
+ } from "./chunk-Z5QZHDG2.js";
18
18
  import {
19
19
  readJudgeVerdictStats
20
20
  } from "./chunk-OZKOPQCM.js";
@@ -27,14 +27,14 @@ import {
27
27
  } from "./chunk-JKMIGCK6.js";
28
28
  import {
29
29
  resolveCorpusNamespaceRoots
30
- } from "./chunk-NQJAF2Q4.js";
30
+ } from "./chunk-KZBUOWKB.js";
31
31
  import {
32
32
  listNamespaces
33
- } from "./chunk-YCASWFI6.js";
33
+ } from "./chunk-EUIWWY2F.js";
34
34
  import {
35
35
  listMemoryGovernanceRuns,
36
36
  readMemoryGovernanceRunArtifact
37
- } from "./chunk-AHNGWFNG.js";
37
+ } from "./chunk-DPF7TX3D.js";
38
38
  import {
39
39
  resolveCuratedIncludeFilesStatePath,
40
40
  resolveNativeKnowledgeStatePath,
@@ -57,7 +57,7 @@ import {
57
57
  } from "./chunk-DURQZFVJ.js";
58
58
  import {
59
59
  StorageManager
60
- } from "./chunk-5ZSN2OFB.js";
60
+ } from "./chunk-NQ2WFFPQ.js";
61
61
  import {
62
62
  lintWorkspaceFiles
63
63
  } from "./chunk-DM2T26WE.js";
@@ -1876,4 +1876,4 @@ export {
1876
1876
  runBenchmarkRecall,
1877
1877
  runOperatorRepair
1878
1878
  };
1879
- //# sourceMappingURL=chunk-AWZ5CWSR.js.map
1879
+ //# sourceMappingURL=chunk-MXMFRU45.js.map
@@ -26,7 +26,7 @@ import {
26
26
  import {
27
27
  normalizeQmdResultPath,
28
28
  resolveNamespaceResultPath
29
- } from "./chunk-XCJDDXJX.js";
29
+ } from "./chunk-272GJCTZ.js";
30
30
  import {
31
31
  withholdToolScopedFromSharedNamespace
32
32
  } from "./chunk-S2V7RUCL.js";
@@ -37,14 +37,14 @@ import {
37
37
  import {
38
38
  parseOfflineSyncDigestCache
39
39
  } from "./chunk-X3724WL4.js";
40
- import {
41
- rewriteProjectedEntityReferences,
42
- rewriteProjectedMemoryEntityReference
43
- } from "./chunk-MRPOZBJC.js";
44
40
  import {
45
41
  createMemorySnapshot,
46
42
  loadTimeStamps
47
43
  } from "./chunk-L76BQSWB.js";
44
+ import {
45
+ rewriteProjectedEntityReferences,
46
+ rewriteProjectedMemoryEntityReference
47
+ } from "./chunk-MRPOZBJC.js";
48
48
  import {
49
49
  closeContinuityIncidentRecord,
50
50
  createContinuityIncidentRecord,
@@ -13318,4 +13318,4 @@ export {
13318
13318
  isValidBufferSurpriseEvent,
13319
13319
  StorageManager3 as StorageManager
13320
13320
  };
13321
- //# sourceMappingURL=chunk-5ZSN2OFB.js.map
13321
+ //# sourceMappingURL=chunk-NQ2WFFPQ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseFrontmatter
3
- } from "./chunk-5ZSN2OFB.js";
3
+ } from "./chunk-NQ2WFFPQ.js";
4
4
  import {
5
5
  activityDigestPath,
6
6
  isValidActivityDate
@@ -199,4 +199,4 @@ export {
199
199
  buildStandup,
200
200
  standupHelp
201
201
  };
202
- //# sourceMappingURL=chunk-MBQVWTCS.js.map
202
+ //# sourceMappingURL=chunk-O2677F2E.js.map
@@ -1,3 +1,7 @@
1
+ import {
2
+ ensureLcmStateDir,
3
+ openLcmDatabase
4
+ } from "./chunk-DDA47TES.js";
1
5
  import {
2
6
  LcmSummarizer
3
7
  } from "./chunk-AQNHEDXP.js";
@@ -13,10 +17,6 @@ import {
13
17
  import {
14
18
  assembleCompressedHistoryWithTrace
15
19
  } from "./chunk-UXPUUL3G.js";
16
- import {
17
- ensureLcmStateDir,
18
- openLcmDatabase
19
- } from "./chunk-DDA47TES.js";
20
20
  import {
21
21
  nativeBindingRecoveryHint
22
22
  } from "./chunk-LD72P4YS.js";
@@ -768,4 +768,4 @@ export {
768
768
  extractLcmConfig,
769
769
  LcmEngine
770
770
  };
771
- //# sourceMappingURL=chunk-ZG4GNPRE.js.map
771
+ //# sourceMappingURL=chunk-PBE7NFB5.js.map
@@ -1,10 +1,10 @@
1
- import {
2
- scanMemoryDir
3
- } from "./chunk-WNEVEMJ3.js";
4
1
  import {
5
2
  isSearchAborted,
6
3
  throwIfSearchAborted
7
4
  } from "./chunk-Y5NLBXPV.js";
5
+ import {
6
+ scanMemoryDir
7
+ } from "./chunk-WNEVEMJ3.js";
8
8
  import {
9
9
  reportSearchDegradation,
10
10
  resolveEnsureCollectionArgs
@@ -789,4 +789,4 @@ export {
789
789
  resolveOramaCollectionDbFilePath,
790
790
  OramaBackend
791
791
  };
792
- //# sourceMappingURL=chunk-DLR3SBOM.js.map
792
+ //# sourceMappingURL=chunk-RJ5L6LRD.js.map
@@ -1,21 +1,21 @@
1
+ import {
2
+ RemoteSearchBackend
3
+ } from "./chunk-YCK26VSL.js";
4
+ import {
5
+ EmbedHelper
6
+ } from "./chunk-EXYT52NR.js";
1
7
  import {
2
8
  LanceDbBackend
3
- } from "./chunk-3DJ6R4CC.js";
9
+ } from "./chunk-MX5VGD6C.js";
4
10
  import {
5
11
  MeilisearchBackend
6
- } from "./chunk-66DUCUOC.js";
12
+ } from "./chunk-4LF5E2LM.js";
7
13
  import {
8
14
  NoopSearchBackend
9
15
  } from "./chunk-CYEPCZN5.js";
10
16
  import {
11
17
  OramaBackend
12
- } from "./chunk-DLR3SBOM.js";
13
- import {
14
- RemoteSearchBackend
15
- } from "./chunk-YCK26VSL.js";
16
- import {
17
- EmbedHelper
18
- } from "./chunk-EXYT52NR.js";
18
+ } from "./chunk-RJ5L6LRD.js";
19
19
  import {
20
20
  createConversationIndexBackend
21
21
  } from "./chunk-TFA6HPOA.js";
@@ -179,4 +179,4 @@ export {
179
179
  createConversationSearchBackend,
180
180
  createConversationIndexRuntime
181
181
  };
182
- //# sourceMappingURL=chunk-HADCITEA.js.map
182
+ //# sourceMappingURL=chunk-SENCYTQ2.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-5ZSN2OFB.js";
3
+ } from "./chunk-NQ2WFFPQ.js";
4
4
  import {
5
5
  keyring_exports,
6
6
  secureStoreDir
@@ -416,4 +416,4 @@ export {
416
416
  resolveNamespaceStorageRoot,
417
417
  NamespaceStorageRouter
418
418
  };
419
- //# sourceMappingURL=chunk-7QKZOZF4.js.map
419
+ //# sourceMappingURL=chunk-T266H3RJ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rebuildMemoryProjection
3
- } from "./chunk-4JKIOAOF.js";
3
+ } from "./chunk-XSG2S43P.js";
4
4
 
5
5
  // src/convergence-refresh.ts
6
6
  async function refreshConvergedNamespaces(namespaces, namespaceSearchRouter, getStorage, searchEnabled) {
@@ -32,4 +32,4 @@ async function refreshConvergedNamespaces(namespaces, namespaceSearchRouter, get
32
32
  export {
33
33
  refreshConvergedNamespaces
34
34
  };
35
- //# sourceMappingURL=chunk-QGV6JVQ7.js.map
35
+ //# sourceMappingURL=chunk-T2IKH7XD.js.map
@@ -13,7 +13,7 @@ import {
13
13
  } from "./chunk-ZCUTSMR2.js";
14
14
  import {
15
15
  StorageManager
16
- } from "./chunk-5ZSN2OFB.js";
16
+ } from "./chunk-NQ2WFFPQ.js";
17
17
  import {
18
18
  excludeSupportPassportPrivateMemories
19
19
  } from "./chunk-TSUSHXBW.js";
@@ -134,4 +134,4 @@ export {
134
134
  runCodexMaterialize,
135
135
  runPostConsolidationMaterialize
136
136
  };
137
- //# sourceMappingURL=chunk-TQU2RB4B.js.map
137
+ //# sourceMappingURL=chunk-UUY7OEO7.js.map
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-3UXOZBHV.js";
15
15
  import {
16
16
  StorageManager
17
- } from "./chunk-5ZSN2OFB.js";
17
+ } from "./chunk-NQ2WFFPQ.js";
18
18
  import {
19
19
  OKF_PROFILE_TYPE,
20
20
  okfTypeForMemory
@@ -272,4 +272,4 @@ export {
272
272
  exportOkfBundle,
273
273
  firstHeading
274
274
  };
275
- //# sourceMappingURL=chunk-B5MB2G3H.js.map
275
+ //# sourceMappingURL=chunk-VZCX3DOD.js.map
@@ -1,3 +1,6 @@
1
+ import {
2
+ ReplitAdapter
3
+ } from "./chunk-SI36RWC3.js";
1
4
  import {
2
5
  ClaudeCodeAdapter
3
6
  } from "./chunk-3JKYQBLC.js";
@@ -10,9 +13,6 @@ import {
10
13
  import {
11
14
  HermesAdapter
12
15
  } from "./chunk-HCAGBFE7.js";
13
- import {
14
- ReplitAdapter
15
- } from "./chunk-SI36RWC3.js";
16
16
  import {
17
17
  headerValue
18
18
  } from "./chunk-NJAIR57U.js";
@@ -140,4 +140,4 @@ export {
140
140
  OpenCodeAdapter,
141
141
  AdapterRegistry
142
142
  };
143
- //# sourceMappingURL=chunk-GCHM5BYL.js.map
143
+ //# sourceMappingURL=chunk-WWQMZBDI.js.map
@@ -4,13 +4,13 @@ import {
4
4
  import {
5
5
  listMemoryGovernanceRuns,
6
6
  readMemoryGovernanceRunArtifact
7
- } from "./chunk-AHNGWFNG.js";
7
+ } from "./chunk-DPF7TX3D.js";
8
8
  import {
9
9
  loadPersistedNativeKnowledgeChunks
10
10
  } from "./chunk-2DQ2XREU.js";
11
11
  import {
12
12
  StorageManager
13
- } from "./chunk-5ZSN2OFB.js";
13
+ } from "./chunk-NQ2WFFPQ.js";
14
14
  import {
15
15
  normalizeProjectionPreview,
16
16
  normalizeProjectionTags
@@ -1156,4 +1156,4 @@ export {
1156
1156
  verifyMemoryProjection,
1157
1157
  repairMemoryProjection
1158
1158
  };
1159
- //# sourceMappingURL=chunk-4JKIOAOF.js.map
1159
+ //# sourceMappingURL=chunk-XSG2S43P.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-5ZSN2OFB.js";
3
+ } from "./chunk-NQ2WFFPQ.js";
4
4
  import {
5
5
  countRecallTokenOverlap,
6
6
  normalizeRecallTokens
@@ -119,4 +119,4 @@ export {
119
119
  compareVerifiedSemanticRuleResults,
120
120
  searchVerifiedSemanticRules
121
121
  };
122
- //# sourceMappingURL=chunk-5BKH4XG5.js.map
122
+ //# sourceMappingURL=chunk-XTJUE2ON.js.map
@@ -1,17 +1,20 @@
1
1
  import {
2
2
  readHarmonicSourceMemory,
3
3
  readUnresolvedHarmonicSources
4
- } from "./chunk-HUDPXTXW.js";
4
+ } from "./chunk-GXL52YZA.js";
5
5
  import {
6
6
  readProjectedMemoryStates
7
7
  } from "./chunk-AZEZSQ5R.js";
8
+ import {
9
+ mapInBatches
10
+ } from "./chunk-JA2GJCOS.js";
8
11
  import {
9
12
  resolveCueAnchorStoreDir,
10
13
  validateCueAnchor
11
14
  } from "./chunk-FYJYQ65N.js";
12
15
  import {
13
16
  StorageManager
14
- } from "./chunk-5ZSN2OFB.js";
17
+ } from "./chunk-NQ2WFFPQ.js";
15
18
  import {
16
19
  isValidityExpiredNow
17
20
  } from "./chunk-6CIAGZ6X.js";
@@ -94,7 +97,7 @@ async function readIndexedSourceMemories(options) {
94
97
  const days = utcDaysSince(rebuiltMs, options.nowMs);
95
98
  const sourceMemories = /* @__PURE__ */ new Map();
96
99
  const pending = [];
97
- for (const id of options.sourceMemoryIds) {
100
+ const resolved = await mapInBatches(options.sourceMemoryIds, async (id) => {
98
101
  const state = batch.states.get(id);
99
102
  let safeId = true;
100
103
  try {
@@ -103,15 +106,16 @@ async function readIndexedSourceMemories(options) {
103
106
  safeId = false;
104
107
  }
105
108
  const candidates = state ? [state.path, path.join(options.memoryDir, "cold", state.pathRel)] : safeId ? unprojectedCandidatePaths(options.memoryDir, id, days) : [];
106
- let found = false;
107
109
  for (const candidate of candidates) {
108
110
  const memory = await readHarmonicSourceMemory(storage, rootReal, candidate, options.abortSignal);
109
111
  if (memory?.frontmatter.id !== id) continue;
110
- sourceMemories.set(id, memory);
111
- found = true;
112
- break;
112
+ return { id, memory };
113
113
  }
114
- if (!found) pending.push(id);
114
+ return { id, memory: void 0 };
115
+ });
116
+ for (const { id, memory } of resolved) {
117
+ if (memory) sourceMemories.set(id, memory);
118
+ else pending.push(id);
115
119
  }
116
120
  if (pending.length === 0) return sourceMemories;
117
121
  const unresolved = await readUnresolvedHarmonicSources({
@@ -288,27 +292,27 @@ function scoreAnchor(anchor, queryTokens, eligibleNodeTags) {
288
292
  async function readAbstractionNodes(options) {
289
293
  const rootDir = resolveAbstractionNodeStoreDir(options.memoryDir, options.abstractionNodeStoreDir);
290
294
  const files = await listJsonFilesStrict(path.join(rootDir, "nodes"), { allowMissingDirectory: true });
291
- const nodes = [];
292
- for (const filePath of files) {
295
+ const parsed = await mapInBatches(files, async (filePath) => {
293
296
  try {
294
- nodes.push(validateAbstractionNode(await readJsonFile(filePath)));
297
+ return validateAbstractionNode(await readJsonFile(filePath));
295
298
  } catch {
299
+ return null;
296
300
  }
297
- }
298
- return nodes;
301
+ });
302
+ return parsed.filter((node) => node !== null);
299
303
  }
300
304
  async function readCueAnchors(options) {
301
305
  const abstractionRoot = resolveAbstractionNodeStoreDir(options.memoryDir, options.abstractionNodeStoreDir);
302
306
  const rootDir = resolveCueAnchorStoreDir(abstractionRoot);
303
307
  const files = await listJsonFilesStrict(rootDir, { allowMissingDirectory: true });
304
- const anchors = [];
305
- for (const filePath of files) {
308
+ const parsed = await mapInBatches(files, async (filePath) => {
306
309
  try {
307
- anchors.push(validateCueAnchor(await readJsonFile(filePath)));
310
+ return validateCueAnchor(await readJsonFile(filePath));
308
311
  } catch {
312
+ return null;
309
313
  }
310
- }
311
- return anchors;
314
+ });
315
+ return parsed.filter((anchor) => anchor !== null);
312
316
  }
313
317
  function earliestInvalidAtMs(sourceMemories, memoryDir, nowMs) {
314
318
  let earliest = Number.POSITIVE_INFINITY;
@@ -585,4 +589,4 @@ export {
585
589
  readProjectedHarmonicGraph,
586
590
  searchHarmonicRetrieval
587
591
  };
588
- //# sourceMappingURL=chunk-EYES6ALH.js.map
592
+ //# sourceMappingURL=chunk-XYW5HHFS.js.map