@remnic/core 9.3.654 → 9.3.655

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 (246) hide show
  1. package/dist/access-cli.js +23 -23
  2. package/dist/access-http.d.ts +4 -4
  3. package/dist/access-http.js +16 -16
  4. package/dist/access-mcp.d.ts +4 -4
  5. package/dist/access-mcp.js +15 -15
  6. package/dist/{access-service-C8A5hoXJ.d.ts → access-service-BEJvriUt.d.ts} +2 -2
  7. package/dist/access-service.d.ts +4 -4
  8. package/dist/access-service.js +14 -14
  9. package/dist/action-confidence.d.ts +1 -1
  10. package/dist/active-memory-bridge.d.ts +1 -1
  11. package/dist/active-recall.d.ts +1 -1
  12. package/dist/active-recall.js +1 -1
  13. package/dist/behavior-learner.d.ts +1 -1
  14. package/dist/behavior-signals.d.ts +1 -1
  15. package/dist/bootstrap.d.ts +3 -3
  16. package/dist/briefing.d.ts +1 -1
  17. package/dist/briefing.js +3 -3
  18. package/dist/buffer-surprise-report.d.ts +1 -1
  19. package/dist/buffer.d.ts +1 -1
  20. package/dist/calibration.d.ts +1 -1
  21. package/dist/causal-behavior.d.ts +1 -1
  22. package/dist/causal-consolidation.d.ts +1 -1
  23. package/dist/causal-consolidation.js +4 -4
  24. package/dist/{chunk-BP2EV6W5.js → chunk-2RCGZ67B.js} +4 -4
  25. package/dist/{chunk-FVRBLJP6.js → chunk-54LOUIBE.js} +2 -2
  26. package/dist/{chunk-LJCEWTG3.js → chunk-55ZMNKMQ.js} +8 -8
  27. package/dist/{chunk-7WEB3FLJ.js → chunk-5PLUC5OB.js} +2 -2
  28. package/dist/{chunk-OL2364SB.js → chunk-5QD3QD76.js} +854 -223
  29. package/dist/chunk-5QD3QD76.js.map +1 -0
  30. package/dist/{chunk-DBM2BD22.js → chunk-67G4T7KI.js} +3 -3
  31. package/dist/{chunk-JX2RINDR.js → chunk-6G5JEN55.js} +2 -2
  32. package/dist/{chunk-2DSTAWNZ.js → chunk-A3Y37UWI.js} +3 -3
  33. package/dist/{chunk-T2C6QJG2.js → chunk-BGKXTVNG.js} +2 -2
  34. package/dist/{chunk-JYN7QNTA.js → chunk-COVZLGMR.js} +17 -17
  35. package/dist/{chunk-JVRPJ7D4.js → chunk-EKQMQQ3U.js} +48 -12
  36. package/dist/chunk-EKQMQQ3U.js.map +1 -0
  37. package/dist/{chunk-JBHXMCYN.js → chunk-GRYAECRV.js} +2 -2
  38. package/dist/{chunk-RGPUQ66K.js → chunk-IQ53ZSXV.js} +2 -2
  39. package/dist/{chunk-YLZLPVKK.js → chunk-KOI765XP.js} +104 -1
  40. package/dist/chunk-KOI765XP.js.map +1 -0
  41. package/dist/{chunk-QW6JZO5P.js → chunk-KZZ4YAEC.js} +2 -2
  42. package/dist/{chunk-2DGQLOOM.js → chunk-M3VYPE2H.js} +1 -1
  43. package/dist/{chunk-2DGQLOOM.js.map → chunk-M3VYPE2H.js.map} +1 -1
  44. package/dist/{chunk-QKK64Z6M.js → chunk-NCSJKK23.js} +2 -2
  45. package/dist/{chunk-NCGWXCSW.js → chunk-NRBGRZW4.js} +2 -2
  46. package/dist/{chunk-GPW2E4LN.js → chunk-OKW6F5S5.js} +3 -3
  47. package/dist/{chunk-Y2RIIF6H.js → chunk-PTMJ2FH2.js} +2 -2
  48. package/dist/{chunk-JMQSYGXS.js → chunk-PVE7KSQP.js} +2 -2
  49. package/dist/{chunk-NAZWHTYV.js → chunk-QDVQ4AN2.js} +4 -4
  50. package/dist/{chunk-PYWNNF2I.js → chunk-QRSKPI62.js} +99 -66
  51. package/dist/chunk-QRSKPI62.js.map +1 -0
  52. package/dist/{chunk-YM3LR4LS.js → chunk-SSSXWIBP.js} +5 -5
  53. package/dist/{chunk-NE2JBMLN.js → chunk-TDZSSJV4.js} +1 -1
  54. package/dist/chunk-TDZSSJV4.js.map +1 -0
  55. package/dist/{chunk-6CVI6BP6.js → chunk-TEO46GMM.js} +2 -2
  56. package/dist/{chunk-K6X553JB.js → chunk-UCEABZZN.js} +2 -2
  57. package/dist/{chunk-ENV6RDTD.js → chunk-UCEDY5M7.js} +2 -2
  58. package/dist/{chunk-ZCORQM74.js → chunk-UYNFWZWG.js} +2 -2
  59. package/dist/{chunk-XWQ6ERUG.js → chunk-WDTUYOLS.js} +2 -2
  60. package/dist/{chunk-Z5MQI7K2.js → chunk-XOFXKASO.js} +2 -2
  61. package/dist/{chunk-3RACUBII.js → chunk-XRKQOQLY.js} +2 -2
  62. package/dist/{chunk-BJA6DQOC.js → chunk-YYN3LIYA.js} +5 -5
  63. package/dist/{cli-uQgvDFNE.d.ts → cli-BGahB_d3.d.ts} +3 -3
  64. package/dist/cli.d.ts +5 -5
  65. package/dist/cli.js +28 -28
  66. package/dist/compounding/engine.d.ts +1 -1
  67. package/dist/compounding/engine.js +3 -3
  68. package/dist/compounding/preference-consolidator.d.ts +1 -1
  69. package/dist/compression-optimizer.d.ts +1 -1
  70. package/dist/config.d.ts +1 -1
  71. package/dist/config.js +1 -1
  72. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  73. package/dist/connectors/codex-materialize-runner.js +3 -3
  74. package/dist/connectors/codex-materialize.d.ts +1 -1
  75. package/dist/connectors/index.d.ts +1 -1
  76. package/dist/connectors/index.js +3 -3
  77. package/dist/consolidation-provenance-check.d.ts +1 -1
  78. package/dist/consolidation-undo.d.ts +1 -1
  79. package/dist/contradiction/index.d.ts +1 -1
  80. package/dist/conversation-index/backend.d.ts +1 -1
  81. package/dist/conversation-index/chunker.d.ts +1 -1
  82. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  83. package/dist/conversation-index/indexer.d.ts +1 -1
  84. package/dist/conversation-index/search.d.ts +1 -1
  85. package/dist/day-summary.d.ts +1 -1
  86. package/dist/delinearize.d.ts +1 -1
  87. package/dist/direct-answer-wiring.d.ts +1 -1
  88. package/dist/direct-answer.d.ts +1 -1
  89. package/dist/embedding-fallback.d.ts +1 -1
  90. package/dist/enrichment/index.d.ts +1 -1
  91. package/dist/entity-retrieval.d.ts +1 -1
  92. package/dist/entity-retrieval.js +3 -3
  93. package/dist/entity-schema.d.ts +1 -1
  94. package/dist/explicit-capture.d.ts +3 -3
  95. package/dist/extraction-judge-telemetry.d.ts +1 -1
  96. package/dist/extraction-judge-training.d.ts +1 -1
  97. package/dist/extraction-judge.d.ts +1 -1
  98. package/dist/extraction.d.ts +1 -1
  99. package/dist/fallback-llm.d.ts +1 -1
  100. package/dist/identity-continuity.d.ts +1 -1
  101. package/dist/importance.d.ts +1 -1
  102. package/dist/index.d.ts +8 -8
  103. package/dist/index.js +33 -33
  104. package/dist/intent.d.ts +1 -1
  105. package/dist/lcm/engine.d.ts +1 -1
  106. package/dist/lcm/index.d.ts +1 -1
  107. package/dist/lcm/tools.d.ts +1 -1
  108. package/dist/lifecycle.d.ts +1 -1
  109. package/dist/live-connectors-runner.d.ts +1 -1
  110. package/dist/local-llm.d.ts +1 -1
  111. package/dist/maintenance/memory-governance.d.ts +1 -1
  112. package/dist/maintenance/memory-governance.js +3 -3
  113. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
  114. package/dist/maintenance/rebuild-memory-projection.js +4 -4
  115. package/dist/mcp-memory-inspector-app.d.ts +4 -4
  116. package/dist/memory-action-policy.d.ts +1 -1
  117. package/dist/memory-cache.d.ts +1 -1
  118. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  119. package/dist/memory-projection-store.d.ts +1 -1
  120. package/dist/memory-provenance.d.ts +1 -1
  121. package/dist/memory-worth-outcomes.d.ts +1 -1
  122. package/dist/models-json.d.ts +1 -1
  123. package/dist/namespaces/migrate.d.ts +1 -1
  124. package/dist/namespaces/migrate.js +11 -11
  125. package/dist/namespaces/principal.d.ts +1 -1
  126. package/dist/namespaces/search.d.ts +15 -4
  127. package/dist/namespaces/search.js +7 -7
  128. package/dist/namespaces/storage.d.ts +1 -1
  129. package/dist/namespaces/storage.js +3 -3
  130. package/dist/native-knowledge.d.ts +1 -1
  131. package/dist/operator-toolkit.d.ts +1 -1
  132. package/dist/operator-toolkit.js +14 -14
  133. package/dist/{orchestrator-B4Y4sWQH.d.ts → orchestrator-BgzZlWxH.d.ts} +11 -14
  134. package/dist/orchestrator.d.ts +3 -3
  135. package/dist/orchestrator.js +19 -19
  136. package/dist/patterns-cli.d.ts +1 -1
  137. package/dist/policy-runtime.d.ts +1 -1
  138. package/dist/qmd-recall-cache.d.ts +1 -1
  139. package/dist/qmd.d.ts +5 -1
  140. package/dist/qmd.js +2 -2
  141. package/dist/recall-disclosure-escalation.d.ts +1 -1
  142. package/dist/recall-explain-renderer.d.ts +1 -1
  143. package/dist/recall-explain-renderer.js +3 -3
  144. package/dist/recall-planner-llm.d.ts +1 -1
  145. package/dist/recall-state.d.ts +1 -1
  146. package/dist/recall-tag-filter.d.ts +1 -1
  147. package/dist/recall-xray-cli.d.ts +1 -1
  148. package/dist/recall-xray-cli.js +4 -4
  149. package/dist/recall-xray-renderer.d.ts +1 -1
  150. package/dist/recall-xray-renderer.js +3 -3
  151. package/dist/recall-xray.d.ts +1 -1
  152. package/dist/recall-xray.js +2 -2
  153. package/dist/resolve-auth-token.d.ts +1 -1
  154. package/dist/resume-bundles.js +2 -2
  155. package/dist/retrieval-agents.d.ts +1 -1
  156. package/dist/retrieval-tiers.d.ts +1 -1
  157. package/dist/routing/engine.d.ts +1 -1
  158. package/dist/routing/store.d.ts +1 -1
  159. package/dist/schemas.d.ts +22 -22
  160. package/dist/search/embed-helper.d.ts +1 -1
  161. package/dist/search/factory.d.ts +1 -1
  162. package/dist/search/factory.js +6 -6
  163. package/dist/search/index.d.ts +1 -1
  164. package/dist/search/index.js +6 -6
  165. package/dist/search/lancedb-backend.d.ts +1 -1
  166. package/dist/search/lancedb-backend.js +2 -2
  167. package/dist/search/meilisearch-backend.d.ts +1 -1
  168. package/dist/search/meilisearch-backend.js +2 -2
  169. package/dist/search/noop-backend.d.ts +1 -1
  170. package/dist/search/orama-backend.d.ts +1 -1
  171. package/dist/search/orama-backend.js +2 -2
  172. package/dist/search/port.d.ts +17 -1
  173. package/dist/search/port.js +1 -1
  174. package/dist/search/remote-backend.d.ts +1 -1
  175. package/dist/{semantic-consolidation-BKd0Pype.d.ts → semantic-consolidation-Z8d_uMq8.d.ts} +1 -1
  176. package/dist/semantic-consolidation.d.ts +2 -2
  177. package/dist/semantic-consolidation.js +4 -4
  178. package/dist/semantic-rule-promotion.js +3 -3
  179. package/dist/semantic-rule-verifier.d.ts +1 -1
  180. package/dist/semantic-rule-verifier.js +3 -3
  181. package/dist/session-observer-bands.d.ts +1 -1
  182. package/dist/session-observer-state.d.ts +1 -1
  183. package/dist/shared-context/manager.d.ts +1 -1
  184. package/dist/signal.d.ts +1 -1
  185. package/dist/storage.d.ts +1 -1
  186. package/dist/storage.js +2 -2
  187. package/dist/summarizer.d.ts +1 -1
  188. package/dist/summary-snapshot.d.ts +1 -1
  189. package/dist/temporal-supersession.d.ts +1 -1
  190. package/dist/temporal-validity.d.ts +1 -1
  191. package/dist/threading.d.ts +1 -1
  192. package/dist/tier-migration.d.ts +1 -1
  193. package/dist/tier-routing.d.ts +1 -1
  194. package/dist/topics.d.ts +1 -1
  195. package/dist/transcript.d.ts +1 -1
  196. package/dist/transfer/types.d.ts +12 -12
  197. package/dist/{types-BgChEr0M.d.ts → types-2OPlQWJG.d.ts} +12 -0
  198. package/dist/types.d.ts +1 -1
  199. package/dist/types.js +1 -1
  200. package/dist/utility-runtime.d.ts +1 -1
  201. package/dist/verified-recall.js +3 -3
  202. package/package.json +1 -1
  203. package/src/config.test.ts +69 -0
  204. package/src/config.ts +135 -0
  205. package/src/maintenance/namespace-planner.test.ts +1120 -0
  206. package/src/maintenance/namespace-planner.ts +893 -0
  207. package/src/namespaces/search.test.ts +130 -2
  208. package/src/namespaces/search.ts +71 -10
  209. package/src/orchestrator-flush.test.ts +464 -44
  210. package/src/orchestrator.ts +97 -66
  211. package/src/qmd-client.test.ts +59 -0
  212. package/src/qmd.ts +124 -84
  213. package/src/search/port.ts +16 -0
  214. package/src/types.ts +12 -0
  215. package/dist/chunk-JVRPJ7D4.js.map +0 -1
  216. package/dist/chunk-NE2JBMLN.js.map +0 -1
  217. package/dist/chunk-OL2364SB.js.map +0 -1
  218. package/dist/chunk-PYWNNF2I.js.map +0 -1
  219. package/dist/chunk-YLZLPVKK.js.map +0 -1
  220. /package/dist/{chunk-BP2EV6W5.js.map → chunk-2RCGZ67B.js.map} +0 -0
  221. /package/dist/{chunk-FVRBLJP6.js.map → chunk-54LOUIBE.js.map} +0 -0
  222. /package/dist/{chunk-LJCEWTG3.js.map → chunk-55ZMNKMQ.js.map} +0 -0
  223. /package/dist/{chunk-7WEB3FLJ.js.map → chunk-5PLUC5OB.js.map} +0 -0
  224. /package/dist/{chunk-DBM2BD22.js.map → chunk-67G4T7KI.js.map} +0 -0
  225. /package/dist/{chunk-JX2RINDR.js.map → chunk-6G5JEN55.js.map} +0 -0
  226. /package/dist/{chunk-2DSTAWNZ.js.map → chunk-A3Y37UWI.js.map} +0 -0
  227. /package/dist/{chunk-T2C6QJG2.js.map → chunk-BGKXTVNG.js.map} +0 -0
  228. /package/dist/{chunk-JYN7QNTA.js.map → chunk-COVZLGMR.js.map} +0 -0
  229. /package/dist/{chunk-JBHXMCYN.js.map → chunk-GRYAECRV.js.map} +0 -0
  230. /package/dist/{chunk-RGPUQ66K.js.map → chunk-IQ53ZSXV.js.map} +0 -0
  231. /package/dist/{chunk-QW6JZO5P.js.map → chunk-KZZ4YAEC.js.map} +0 -0
  232. /package/dist/{chunk-QKK64Z6M.js.map → chunk-NCSJKK23.js.map} +0 -0
  233. /package/dist/{chunk-NCGWXCSW.js.map → chunk-NRBGRZW4.js.map} +0 -0
  234. /package/dist/{chunk-GPW2E4LN.js.map → chunk-OKW6F5S5.js.map} +0 -0
  235. /package/dist/{chunk-Y2RIIF6H.js.map → chunk-PTMJ2FH2.js.map} +0 -0
  236. /package/dist/{chunk-JMQSYGXS.js.map → chunk-PVE7KSQP.js.map} +0 -0
  237. /package/dist/{chunk-NAZWHTYV.js.map → chunk-QDVQ4AN2.js.map} +0 -0
  238. /package/dist/{chunk-YM3LR4LS.js.map → chunk-SSSXWIBP.js.map} +0 -0
  239. /package/dist/{chunk-6CVI6BP6.js.map → chunk-TEO46GMM.js.map} +0 -0
  240. /package/dist/{chunk-K6X553JB.js.map → chunk-UCEABZZN.js.map} +0 -0
  241. /package/dist/{chunk-ENV6RDTD.js.map → chunk-UCEDY5M7.js.map} +0 -0
  242. /package/dist/{chunk-ZCORQM74.js.map → chunk-UYNFWZWG.js.map} +0 -0
  243. /package/dist/{chunk-XWQ6ERUG.js.map → chunk-WDTUYOLS.js.map} +0 -0
  244. /package/dist/{chunk-Z5MQI7K2.js.map → chunk-XOFXKASO.js.map} +0 -0
  245. /package/dist/{chunk-3RACUBII.js.map → chunk-XRKQOQLY.js.map} +0 -0
  246. /package/dist/{chunk-BJA6DQOC.js.map → chunk-YYN3LIYA.js.map} +0 -0
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-3UXOZBHV.js";
8
8
  import {
9
9
  StorageManager
10
- } from "./chunk-6CVI6BP6.js";
10
+ } from "./chunk-TEO46GMM.js";
11
11
  import {
12
12
  isSafeRouteNamespace
13
13
  } from "./chunk-U3PN77QT.js";
@@ -118,4 +118,4 @@ export {
118
118
  runCodexMaterialize,
119
119
  runPostConsolidationMaterialize
120
120
  };
121
- //# sourceMappingURL=chunk-QW6JZO5P.js.map
121
+ //# sourceMappingURL=chunk-KZZ4YAEC.js.map
@@ -9,4 +9,4 @@ function resolveEnsureCollectionArgs(collectionOrExecution, execution) {
9
9
  export {
10
10
  resolveEnsureCollectionArgs
11
11
  };
12
- //# sourceMappingURL=chunk-2DGQLOOM.js.map
12
+ //# sourceMappingURL=chunk-M3VYPE2H.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/search/port.ts"],"sourcesContent":["import type { QmdSearchResult } from \"../types.js\";\n\n/** Alias so consumers don't need to reference \"Qmd\" in a backend-agnostic context. */\nexport type SearchResult = QmdSearchResult;\n\nexport interface SearchQueryOptions {\n intent?: string;\n explain?: boolean;\n candidateLimit?: number;\n rerank?: boolean;\n chunkStrategy?: \"auto\" | \"regex\";\n structuredSearches?: Array<{ type: \"lex\" | \"vec\" | \"hyde\"; query: string }>;\n}\n\nexport interface SearchExecutionOptions {\n signal?: AbortSignal;\n}\n\nexport function resolveEnsureCollectionArgs(\n collectionOrExecution?: string | SearchExecutionOptions,\n execution?: SearchExecutionOptions,\n): { collection?: string; execution?: SearchExecutionOptions } {\n if (typeof collectionOrExecution === \"string\") {\n return { collection: collectionOrExecution, execution };\n }\n return { collection: undefined, execution: collectionOrExecution ?? execution };\n}\n\n/**\n * Abstract search backend interface.\n *\n * Implementations:\n * - QmdClient (default, local hybrid BM25+vector+reranking)\n * - OramaBackend (embedded, pure JS, hybrid FTS+vector)\n * - LanceDbBackend (embedded, native Arrow bindings, RRF reranking)\n * - MeilisearchBackend (server-based SDK, hybrid search)\n * - RemoteSearchBackend (HTTP REST adapter)\n * - NoopSearchBackend (graceful degradation)\n *\n * See docs/writing-a-search-backend.md for the implementation guide.\n */\nexport interface SearchBackend {\n // ── Lifecycle ──\n probe(): Promise<boolean>;\n /**\n * Optional non-mutating availability probe for health/readiness checks.\n * Implementations must avoid auto-upgrades, collection creation, daemon\n * startup, or any other runtime-modifying side effects.\n */\n checkAvailability?(execution?: SearchExecutionOptions): Promise<boolean>;\n isAvailable(): boolean;\n debugStatus(): string;\n\n // ── Search ──\n search(\n query: string,\n collection?: string,\n maxResults?: number,\n options?: SearchQueryOptions,\n execution?: SearchExecutionOptions,\n ): Promise<SearchResult[]>;\n searchGlobal(query: string, maxResults?: number, execution?: SearchExecutionOptions): Promise<SearchResult[]>;\n bm25Search(\n query: string,\n collection?: string,\n maxResults?: number,\n execution?: SearchExecutionOptions,\n ): Promise<SearchResult[]>;\n vectorSearch(\n query: string,\n collection?: string,\n maxResults?: number,\n execution?: SearchExecutionOptions,\n ): Promise<SearchResult[]>;\n hybridSearch(\n query: string,\n collection?: string,\n maxResults?: number,\n execution?: SearchExecutionOptions,\n ): Promise<SearchResult[]>;\n\n // ── Maintenance ──\n update(execution?: SearchExecutionOptions): Promise<void>;\n updateCollection(collection: string, execution?: SearchExecutionOptions): Promise<void>;\n updateCollectionFromDir?(collection: string, memoryDir: string, execution?: SearchExecutionOptions): Promise<void>;\n /**\n * True when update() refreshes every indexed collection, not just this\n * backend's configured collection. Namespace routers use this to avoid\n * repeating the same expensive global update once per namespace.\n */\n updatesAllCollections?(): boolean;\n /**\n * Optional strict refresh used by callers that must know whether a collection\n * was actually refreshed before writing success markers. Ordinary update\n * calls remain fail-open for migration/maintenance resilience.\n */\n updateCollectionStrict?(collection: string, execution?: SearchExecutionOptions): Promise<void>;\n embed(): Promise<void>;\n embedCollection(collection: string): Promise<void>;\n\n // ── Collection management ──\n /**\n * Optional non-mutating collection probe. Backends that can distinguish a\n * missing collection from a transient probe failure should implement this so\n * callers can avoid auto-creating collections in unsafe layouts.\n */\n checkCollection?(\n collectionOrExecution?: string | SearchExecutionOptions,\n execution?: SearchExecutionOptions,\n ): Promise<\"present\" | \"missing\" | \"unknown\" | \"skipped\">;\n ensureCollection(\n memoryDir: string,\n execution?: SearchExecutionOptions,\n ): Promise<\"present\" | \"missing\" | \"unknown\" | \"skipped\">;\n ensureCollection(\n memoryDir: string,\n collection?: string,\n execution?: SearchExecutionOptions,\n ): Promise<\"present\" | \"missing\" | \"unknown\" | \"skipped\">;\n}\n"],"mappings":";AAkBO,SAAS,4BACd,uBACA,WAC6D;AAC7D,MAAI,OAAO,0BAA0B,UAAU;AAC7C,WAAO,EAAE,YAAY,uBAAuB,UAAU;AAAA,EACxD;AACA,SAAO,EAAE,YAAY,QAAW,WAAW,yBAAyB,UAAU;AAChF;","names":[]}
1
+ {"version":3,"sources":["../src/search/port.ts"],"sourcesContent":["import type { QmdSearchResult } from \"../types.js\";\n\n/** Alias so consumers don't need to reference \"Qmd\" in a backend-agnostic context. */\nexport type SearchResult = QmdSearchResult;\n\nexport interface SearchQueryOptions {\n intent?: string;\n explain?: boolean;\n candidateLimit?: number;\n rerank?: boolean;\n chunkStrategy?: \"auto\" | \"regex\";\n structuredSearches?: Array<{ type: \"lex\" | \"vec\" | \"hyde\"; query: string }>;\n}\n\nexport interface SearchExecutionOptions {\n signal?: AbortSignal;\n}\n\nexport function resolveEnsureCollectionArgs(\n collectionOrExecution?: string | SearchExecutionOptions,\n execution?: SearchExecutionOptions,\n): { collection?: string; execution?: SearchExecutionOptions } {\n if (typeof collectionOrExecution === \"string\") {\n return { collection: collectionOrExecution, execution };\n }\n return { collection: undefined, execution: collectionOrExecution ?? execution };\n}\n\n/**\n * Abstract search backend interface.\n *\n * Implementations:\n * - QmdClient (default, local hybrid BM25+vector+reranking)\n * - OramaBackend (embedded, pure JS, hybrid FTS+vector)\n * - LanceDbBackend (embedded, native Arrow bindings, RRF reranking)\n * - MeilisearchBackend (server-based SDK, hybrid search)\n * - RemoteSearchBackend (HTTP REST adapter)\n * - NoopSearchBackend (graceful degradation)\n *\n * See docs/writing-a-search-backend.md for the implementation guide.\n */\nexport interface SearchBackend {\n // ── Lifecycle ──\n probe(): Promise<boolean>;\n /**\n * Optional non-mutating availability probe for health/readiness checks.\n * Implementations must avoid auto-upgrades, collection creation, daemon\n * startup, or any other runtime-modifying side effects.\n */\n checkAvailability?(execution?: SearchExecutionOptions): Promise<boolean>;\n isAvailable(): boolean;\n debugStatus(): string;\n\n // ── Search ──\n search(\n query: string,\n collection?: string,\n maxResults?: number,\n options?: SearchQueryOptions,\n execution?: SearchExecutionOptions,\n ): Promise<SearchResult[]>;\n searchGlobal(query: string, maxResults?: number, execution?: SearchExecutionOptions): Promise<SearchResult[]>;\n bm25Search(\n query: string,\n collection?: string,\n maxResults?: number,\n execution?: SearchExecutionOptions,\n ): Promise<SearchResult[]>;\n vectorSearch(\n query: string,\n collection?: string,\n maxResults?: number,\n execution?: SearchExecutionOptions,\n ): Promise<SearchResult[]>;\n hybridSearch(\n query: string,\n collection?: string,\n maxResults?: number,\n execution?: SearchExecutionOptions,\n ): Promise<SearchResult[]>;\n\n // ── Maintenance ──\n update(execution?: SearchExecutionOptions): Promise<void>;\n /**\n * Optional strict refresh used by callers that must know whether the backend\n * was actually refreshed before writing success markers. Ordinary update\n * calls remain fail-open for migration/maintenance resilience.\n */\n updateStrict?(execution?: SearchExecutionOptions): Promise<void>;\n updateCollection(collection: string, execution?: SearchExecutionOptions): Promise<void>;\n updateCollectionFromDir?(collection: string, memoryDir: string, execution?: SearchExecutionOptions): Promise<void>;\n /**\n * True when update() refreshes every indexed collection, not just this\n * backend's configured collection. Namespace routers use this to avoid\n * repeating the same expensive global update once per namespace.\n */\n updatesAllCollections?(): boolean;\n /**\n * Optional strict refresh used by callers that must know whether a collection\n * was actually refreshed before writing success markers. Ordinary update\n * calls remain fail-open for migration/maintenance resilience.\n */\n updateCollectionStrict?(collection: string, execution?: SearchExecutionOptions): Promise<void>;\n embed(): Promise<void>;\n /**\n * Optional strict embed used by callers that must know vectors were actually\n * refreshed before writing success markers.\n */\n embedStrict?(): Promise<void>;\n embedCollection(collection: string): Promise<void>;\n /**\n * Optional strict collection embed used by callers that must know vectors were\n * actually refreshed before writing success markers.\n */\n embedCollectionStrict?(collection: string): Promise<void>;\n\n // ── Collection management ──\n /**\n * Optional non-mutating collection probe. Backends that can distinguish a\n * missing collection from a transient probe failure should implement this so\n * callers can avoid auto-creating collections in unsafe layouts.\n */\n checkCollection?(\n collectionOrExecution?: string | SearchExecutionOptions,\n execution?: SearchExecutionOptions,\n ): Promise<\"present\" | \"missing\" | \"unknown\" | \"skipped\">;\n ensureCollection(\n memoryDir: string,\n execution?: SearchExecutionOptions,\n ): Promise<\"present\" | \"missing\" | \"unknown\" | \"skipped\">;\n ensureCollection(\n memoryDir: string,\n collection?: string,\n execution?: SearchExecutionOptions,\n ): Promise<\"present\" | \"missing\" | \"unknown\" | \"skipped\">;\n}\n"],"mappings":";AAkBO,SAAS,4BACd,uBACA,WAC6D;AAC7D,MAAI,OAAO,0BAA0B,UAAU;AAC7C,WAAO,EAAE,YAAY,uBAAuB,UAAU;AAAA,EACxD;AACA,SAAO,EAAE,YAAY,QAAW,WAAW,yBAAyB,UAAU;AAChF;","names":[]}
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-HQ6NIBL6.js";
4
4
  import {
5
5
  StorageManager
6
- } from "./chunk-6CVI6BP6.js";
6
+ } from "./chunk-TEO46GMM.js";
7
7
  import {
8
8
  getCachedEpisodeMap,
9
9
  setCachedEpisodeMap
@@ -105,4 +105,4 @@ async function searchVerifiedEpisodes(options) {
105
105
  export {
106
106
  searchVerifiedEpisodes
107
107
  };
108
- //# sourceMappingURL=chunk-QKK64Z6M.js.map
108
+ //# sourceMappingURL=chunk-NCSJKK23.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  compareEntityTimestamps,
6
6
  normalizeEntityName
7
- } from "./chunk-6CVI6BP6.js";
7
+ } from "./chunk-TEO46GMM.js";
8
8
  import {
9
9
  sanitizeMemoryContent
10
10
  } from "./chunk-FVQJYWH7.js";
@@ -677,4 +677,4 @@ export {
677
677
  entityIndexVersion,
678
678
  entityRecentTranscriptLookbackHours
679
679
  };
680
- //# sourceMappingURL=chunk-NCGWXCSW.js.map
680
+ //# sourceMappingURL=chunk-NRBGRZW4.js.map
@@ -11,13 +11,13 @@ import {
11
11
  } from "./chunk-D24OXEPB.js";
12
12
  import {
13
13
  EngramAccessInputError
14
- } from "./chunk-LJCEWTG3.js";
14
+ } from "./chunk-55ZMNKMQ.js";
15
15
  import {
16
16
  projectTagProjectId
17
17
  } from "./chunk-MMJANTJX.js";
18
18
  import {
19
19
  validateBriefingFormat
20
- } from "./chunk-Y2RIIF6H.js";
20
+ } from "./chunk-PTMJ2FH2.js";
21
21
  import {
22
22
  resolvePrincipal
23
23
  } from "./chunk-UZYLX7M6.js";
@@ -3117,4 +3117,4 @@ ${body}`;
3117
3117
  export {
3118
3118
  EngramMcpServer
3119
3119
  };
3120
- //# sourceMappingURL=chunk-GPW2E4LN.js.map
3120
+ //# sourceMappingURL=chunk-OKW6F5S5.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  StorageManager,
3
3
  normalizeEntityName
4
- } from "./chunk-6CVI6BP6.js";
4
+ } from "./chunk-TEO46GMM.js";
5
5
  import {
6
6
  extractJsonCandidates
7
7
  } from "./chunk-RGMVMVMF.js";
@@ -870,4 +870,4 @@ export {
870
870
  resolveBriefingSaveDir,
871
871
  briefingFilename
872
872
  };
873
- //# sourceMappingURL=chunk-Y2RIIF6H.js.map
873
+ //# sourceMappingURL=chunk-PTMJ2FH2.js.map
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-SFQ6QNL7.js";
7
7
  import {
8
8
  StorageManager
9
- } from "./chunk-6CVI6BP6.js";
9
+ } from "./chunk-TEO46GMM.js";
10
10
  import {
11
11
  buildLifecycleEventsForMemory,
12
12
  sortMemoryLifecycleEvents
@@ -74,4 +74,4 @@ export {
74
74
  backupExistingLedger,
75
75
  rebuildMemoryLifecycleLedger
76
76
  };
77
- //# sourceMappingURL=chunk-JMQSYGXS.js.map
77
+ //# sourceMappingURL=chunk-PVE7KSQP.js.map
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-7WV3F5DQ.js";
7
7
  import {
8
8
  EngramMcpServer
9
- } from "./chunk-GPW2E4LN.js";
9
+ } from "./chunk-OKW6F5S5.js";
10
10
  import {
11
11
  EngramAccessInputError
12
- } from "./chunk-LJCEWTG3.js";
12
+ } from "./chunk-55ZMNKMQ.js";
13
13
  import {
14
14
  projectTagProjectId
15
15
  } from "./chunk-MMJANTJX.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-DEUNUKTD.js";
22
22
  import {
23
23
  isRecallDisclosure
24
- } from "./chunk-NE2JBMLN.js";
24
+ } from "./chunk-TDZSSJV4.js";
25
25
  import {
26
26
  expandTildePath
27
27
  } from "./chunk-EYIEWJNI.js";
@@ -2030,4 +2030,4 @@ function positiveIntQueryParam(value, label) {
2030
2030
  export {
2031
2031
  EngramAccessHttpServer
2032
2032
  };
2033
- //# sourceMappingURL=chunk-NAZWHTYV.js.map
2033
+ //# sourceMappingURL=chunk-QDVQ4AN2.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveEnsureCollectionArgs
3
- } from "./chunk-2DGQLOOM.js";
3
+ } from "./chunk-M3VYPE2H.js";
4
4
  import {
5
5
  launchProcess
6
6
  } from "./chunk-O75CRYGF.js";
@@ -877,9 +877,14 @@ var QmdClient = class _QmdClient {
877
877
  resetUpdateThrottles() {
878
878
  this._lastUpdateFailAtMs = null;
879
879
  this.lastUpdateRunAtMs = null;
880
+ this.lastEmbedFailAtMs = null;
880
881
  const gs = getGlobalQmdState();
881
882
  gs.lastGlobalUpdateRunAtMs = null;
882
883
  gs.lastGlobalUpdateFailAtMs = null;
884
+ gs.lastGlobalEmbedRunAtMs = null;
885
+ gs.lastGlobalEmbedFailAtMs = null;
886
+ gs.lastEmbedByCollectionMs = {};
887
+ gs.lastEmbedFailByCollectionMs = {};
883
888
  }
884
889
  updateTimeoutMs;
885
890
  updateMinIntervalMs;
@@ -1814,6 +1819,13 @@ var QmdClient = class _QmdClient {
1814
1819
  execution?.signal
1815
1820
  );
1816
1821
  }
1822
+ async updateStrict(execution) {
1823
+ await this.runUpdateForCollection(
1824
+ this.collection,
1825
+ { perCollectionThrottle: false, strict: true },
1826
+ execution?.signal
1827
+ );
1828
+ }
1817
1829
  async updateCollection(collection, execution) {
1818
1830
  await this.runUpdateForCollection(
1819
1831
  collection,
@@ -1824,7 +1836,7 @@ var QmdClient = class _QmdClient {
1824
1836
  async updateCollectionStrict(collection, execution) {
1825
1837
  await this.runUpdateForCollection(
1826
1838
  collection,
1827
- { perCollectionThrottle: true, strict: true },
1839
+ { perCollectionThrottle: true, strict: true, force: true },
1828
1840
  execution?.signal
1829
1841
  );
1830
1842
  }
@@ -1847,36 +1859,43 @@ var QmdClient = class _QmdClient {
1847
1859
  }
1848
1860
  const globalState = getGlobalQmdState();
1849
1861
  const now = Date.now();
1850
- if (!options.strict && options.perCollectionThrottle) {
1862
+ if (!options.force && options.perCollectionThrottle) {
1851
1863
  if (globalState.lastGlobalUpdateFailAtMs && now - globalState.lastGlobalUpdateFailAtMs < QMD_UPDATE_BACKOFF_MS) {
1852
1864
  log.debug("QMD update: suppressed by global failure backoff");
1865
+ if (options.strict) throw new Error("QMD update skipped by global failure backoff");
1853
1866
  return;
1854
1867
  }
1855
1868
  const lastCollectionRun = globalState.lastUpdateByCollectionMs[name];
1856
1869
  if (Number.isFinite(lastCollectionRun) && now - lastCollectionRun < this.updateMinIntervalMs) {
1857
1870
  log.debug(`QMD update: suppressed by per-collection min-interval gate (${name})`);
1871
+ if (options.strict) throw new Error("QMD update skipped by per-collection min-interval gate");
1858
1872
  return;
1859
1873
  }
1860
1874
  const lastCollectionFail = globalState.lastUpdateFailByCollectionMs[name];
1861
1875
  if (Number.isFinite(lastCollectionFail) && now - lastCollectionFail < QMD_UPDATE_BACKOFF_MS) {
1862
1876
  log.debug(`QMD update: suppressed by per-collection failure backoff (${name})`);
1877
+ if (options.strict) throw new Error("QMD update skipped by per-collection failure backoff");
1863
1878
  return;
1864
1879
  }
1865
- } else if (!options.strict) {
1880
+ } else if (!options.force) {
1866
1881
  if (this.lastUpdateRunAtMs && now - this.lastUpdateRunAtMs < this.updateMinIntervalMs) {
1867
1882
  log.debug("QMD update: suppressed due to min-interval gate");
1883
+ if (options.strict) throw new Error("QMD update skipped by min-interval gate");
1868
1884
  return;
1869
1885
  }
1870
1886
  if (this._lastUpdateFailAtMs && now - this._lastUpdateFailAtMs < QMD_UPDATE_BACKOFF_MS) {
1871
1887
  log.debug("QMD update: suppressed due to recent failures (backoff)");
1888
+ if (options.strict) throw new Error("QMD update skipped by recent failure backoff");
1872
1889
  return;
1873
1890
  }
1874
1891
  if (globalState.lastGlobalUpdateRunAtMs && now - globalState.lastGlobalUpdateRunAtMs < this.updateMinIntervalMs) {
1875
1892
  log.debug("QMD update: suppressed by global min-interval gate");
1893
+ if (options.strict) throw new Error("QMD update skipped by global min-interval gate");
1876
1894
  return;
1877
1895
  }
1878
1896
  if (globalState.lastGlobalUpdateFailAtMs && now - globalState.lastGlobalUpdateFailAtMs < QMD_UPDATE_BACKOFF_MS) {
1879
1897
  log.debug("QMD update: suppressed by global failure backoff");
1898
+ if (options.strict) throw new Error("QMD update skipped by global failure backoff");
1880
1899
  return;
1881
1900
  }
1882
1901
  }
@@ -1919,98 +1938,112 @@ var QmdClient = class _QmdClient {
1919
1938
  }
1920
1939
  }
1921
1940
  async embed() {
1922
- if (this.available === false) return;
1923
- const globalState = getGlobalQmdState();
1924
- if (this.lastEmbedFailAtMs && Date.now() - this.lastEmbedFailAtMs < QMD_EMBED_BACKOFF_MS) {
1925
- log.debug("QMD embed: suppressed due to recent failures (backoff)");
1941
+ await this.runEmbedForCollection(this.collection, { perCollectionThrottle: false });
1942
+ }
1943
+ async embedStrict() {
1944
+ await this.runEmbedForCollection(this.collection, { perCollectionThrottle: false, strict: true });
1945
+ }
1946
+ async embedCollection(collection) {
1947
+ await this.runEmbedForCollection(collection, { perCollectionThrottle: true });
1948
+ }
1949
+ async embedCollectionStrict(collection) {
1950
+ await this.runEmbedForCollection(collection, { perCollectionThrottle: true, strict: true });
1951
+ }
1952
+ async runEmbedForCollection(collection, options) {
1953
+ if (this.available === false) {
1954
+ if (options.strict) throw new Error("QMD unavailable");
1926
1955
  return;
1927
1956
  }
1928
- if (globalState.lastGlobalEmbedRunAtMs && Date.now() - globalState.lastGlobalEmbedRunAtMs < this.updateMinIntervalMs) {
1929
- log.debug("QMD embed: suppressed by global min-interval gate");
1957
+ const name = collection.trim();
1958
+ if (!name) {
1959
+ if (options.strict) throw new Error("QMD collection name is required");
1930
1960
  return;
1931
1961
  }
1932
- if (globalState.lastGlobalEmbedFailAtMs && Date.now() - globalState.lastGlobalEmbedFailAtMs < QMD_EMBED_BACKOFF_MS) {
1933
- log.debug("QMD embed: suppressed by global failure backoff");
1934
- return;
1962
+ const globalState = getGlobalQmdState();
1963
+ const now = Date.now();
1964
+ if (options.perCollectionThrottle) {
1965
+ if (globalState.lastGlobalEmbedFailAtMs && now - globalState.lastGlobalEmbedFailAtMs < QMD_EMBED_BACKOFF_MS) {
1966
+ log.debug(`QMD embed: suppressed by global failure backoff (${name})`);
1967
+ if (options.strict) throw new Error("QMD embed skipped by global failure backoff");
1968
+ return;
1969
+ }
1970
+ const lastCollectionRun = globalState.lastEmbedByCollectionMs[name];
1971
+ if (Number.isFinite(lastCollectionRun) && now - lastCollectionRun < this.updateMinIntervalMs) {
1972
+ log.debug(`QMD embed: suppressed by per-collection min-interval gate (${name})`);
1973
+ if (options.strict) throw new Error("QMD embed skipped by per-collection min-interval gate");
1974
+ return;
1975
+ }
1976
+ const lastCollectionFail = globalState.lastEmbedFailByCollectionMs[name];
1977
+ if (Number.isFinite(lastCollectionFail) && now - lastCollectionFail < QMD_EMBED_BACKOFF_MS) {
1978
+ log.debug(`QMD embed: suppressed by per-collection failure backoff (${name})`);
1979
+ if (options.strict) throw new Error("QMD embed skipped by per-collection failure backoff");
1980
+ return;
1981
+ }
1982
+ } else {
1983
+ if (this.lastEmbedFailAtMs && now - this.lastEmbedFailAtMs < QMD_EMBED_BACKOFF_MS) {
1984
+ log.debug("QMD embed: suppressed due to recent failures (backoff)");
1985
+ if (options.strict) throw new Error("QMD embed skipped by recent failure backoff");
1986
+ return;
1987
+ }
1988
+ if (globalState.lastGlobalEmbedRunAtMs && now - globalState.lastGlobalEmbedRunAtMs < this.updateMinIntervalMs) {
1989
+ log.debug("QMD embed: suppressed by global min-interval gate");
1990
+ if (options.strict) throw new Error("QMD embed skipped by global min-interval gate");
1991
+ return;
1992
+ }
1993
+ if (globalState.lastGlobalEmbedFailAtMs && now - globalState.lastGlobalEmbedFailAtMs < QMD_EMBED_BACKOFF_MS) {
1994
+ log.debug("QMD embed: suppressed by global failure backoff");
1995
+ if (options.strict) throw new Error("QMD embed skipped by global failure backoff");
1996
+ return;
1997
+ }
1935
1998
  }
1936
1999
  try {
1937
2000
  const startedAtMs = Date.now();
1938
- await this.runQmdCommand(this.buildEmbedArgs(this.collection), 3e5);
2001
+ await this.runQmdCommand(this.buildEmbedArgs(name), 3e5);
1939
2002
  const durationMs = Date.now() - startedAtMs;
1940
2003
  if (this.slowLog?.enabled && durationMs >= this.slowLog.thresholdMs) {
1941
2004
  log.warn(`SLOW QMD embed: durationMs=${durationMs}`);
1942
2005
  }
1943
- globalState.lastGlobalEmbedRunAtMs = Date.now();
1944
- log.debug("QMD embed completed");
1945
- } catch (err) {
1946
- if (isVectorDimensionMismatchError(err)) {
1947
- try {
1948
- log.warn("QMD embed hit a vector dimension mismatch; retrying with force re-embed");
1949
- await this.runQmdCommand(this.buildEmbedArgs(this.collection, true), 3e5);
1950
- globalState.lastGlobalEmbedRunAtMs = Date.now();
1951
- this.lastEmbedFailAtMs = null;
1952
- globalState.lastGlobalEmbedFailAtMs = null;
1953
- log.warn("QMD embed recovered by forcing a full vector rebuild");
1954
- return;
1955
- } catch (retryErr) {
1956
- const retryMsg = retryErr instanceof Error ? retryErr.message : String(retryErr);
1957
- log.warn(`QMD force re-embed failed after dimension mismatch: ${retryMsg}`);
1958
- }
1959
- }
1960
- const now = Date.now();
1961
- this.lastEmbedFailAtMs = now;
1962
- globalState.lastGlobalEmbedFailAtMs = now;
1963
- const msg = err instanceof Error ? err.message : String(err);
1964
- log.warn(`QMD embed failed: ${msg}`);
1965
- }
1966
- }
1967
- async embedCollection(collection) {
1968
- if (this.available === false) return;
1969
- const name = collection.trim();
1970
- if (!name) return;
1971
- const globalState = getGlobalQmdState();
1972
- const now = Date.now();
1973
- if (globalState.lastGlobalEmbedFailAtMs && now - globalState.lastGlobalEmbedFailAtMs < QMD_EMBED_BACKOFF_MS) {
1974
- log.debug(`QMD embed: suppressed by global failure backoff (${name})`);
1975
- return;
1976
- }
1977
- const lastCollectionRun = globalState.lastEmbedByCollectionMs[name];
1978
- if (Number.isFinite(lastCollectionRun) && now - lastCollectionRun < this.updateMinIntervalMs) {
1979
- log.debug(`QMD embed: suppressed by per-collection min-interval gate (${name})`);
1980
- return;
1981
- }
1982
- const lastCollectionFail = globalState.lastEmbedFailByCollectionMs[name];
1983
- if (Number.isFinite(lastCollectionFail) && now - lastCollectionFail < QMD_EMBED_BACKOFF_MS) {
1984
- log.debug(`QMD embed: suppressed by per-collection failure backoff (${name})`);
1985
- return;
1986
- }
1987
- try {
1988
- await this.runQmdCommand(this.buildEmbedArgs(name), 3e5);
1989
2006
  const at = Date.now();
1990
- globalState.lastEmbedByCollectionMs[name] = at;
2007
+ if (options.perCollectionThrottle) {
2008
+ globalState.lastEmbedByCollectionMs[name] = at;
2009
+ }
1991
2010
  globalState.lastGlobalEmbedRunAtMs = at;
2011
+ log.debug(`QMD embed completed for collection=${name}`);
1992
2012
  } catch (err) {
2013
+ let failure = err;
1993
2014
  if (isVectorDimensionMismatchError(err)) {
1994
2015
  try {
1995
2016
  log.warn(`QMD embed for collection ${name} hit a vector dimension mismatch; retrying with force re-embed`);
1996
2017
  await this.runQmdCommand(this.buildEmbedArgs(name, true), 3e5);
1997
2018
  const recoveredAt = Date.now();
1998
- globalState.lastEmbedByCollectionMs[name] = recoveredAt;
2019
+ if (options.perCollectionThrottle) {
2020
+ globalState.lastEmbedByCollectionMs[name] = recoveredAt;
2021
+ delete globalState.lastEmbedFailByCollectionMs[name];
2022
+ } else {
2023
+ this.lastEmbedFailAtMs = null;
2024
+ }
1999
2025
  globalState.lastGlobalEmbedRunAtMs = recoveredAt;
2000
- delete globalState.lastEmbedFailByCollectionMs[name];
2001
2026
  globalState.lastGlobalEmbedFailAtMs = null;
2002
2027
  log.warn(`QMD embed for collection ${name} recovered by forcing a full vector rebuild`);
2003
2028
  return;
2004
2029
  } catch (retryErr) {
2030
+ failure = retryErr;
2005
2031
  const retryMsg = retryErr instanceof Error ? retryErr.message : String(retryErr);
2006
2032
  log.warn(`QMD force re-embed failed for collection ${name}: ${retryMsg}`);
2007
2033
  }
2008
2034
  }
2009
2035
  const at = Date.now();
2010
- globalState.lastEmbedFailByCollectionMs[name] = at;
2036
+ if (options.perCollectionThrottle) {
2037
+ globalState.lastEmbedFailByCollectionMs[name] = at;
2038
+ } else {
2039
+ this.lastEmbedFailAtMs = at;
2040
+ }
2011
2041
  globalState.lastGlobalEmbedFailAtMs = at;
2012
- const msg = err instanceof Error ? err.message : String(err);
2042
+ const msg = failure instanceof Error ? failure.message : String(failure);
2013
2043
  log.warn(`QMD embed failed for collection ${name}: ${msg}`);
2044
+ if (options.strict) {
2045
+ throw failure;
2046
+ }
2014
2047
  }
2015
2048
  }
2016
2049
  async checkCollection(collectionOrExecution, execution) {
@@ -2103,4 +2136,4 @@ export {
2103
2136
  getQmdCommandName,
2104
2137
  QmdClient
2105
2138
  };
2106
- //# sourceMappingURL=chunk-PYWNNF2I.js.map
2139
+ //# sourceMappingURL=chunk-QRSKPI62.js.map