@remnic/core 1.1.10 → 1.1.12

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 (299) hide show
  1. package/README.md +3 -3
  2. package/dist/access-cli.js +67 -59
  3. package/dist/access-cli.js.map +1 -1
  4. package/dist/access-http.d.ts +7 -4
  5. package/dist/access-http.js +30 -26
  6. package/dist/access-mcp.d.ts +9 -4
  7. package/dist/access-mcp.js +29 -25
  8. package/dist/access-schema.d.ts +188 -8
  9. package/dist/access-schema.js +12 -3
  10. package/dist/{access-service-BTTNyo1i.d.ts → access-service-DDjzFALq.d.ts} +54 -5
  11. package/dist/access-service.d.ts +7 -4
  12. package/dist/access-service.js +26 -23
  13. package/dist/action-confidence.d.ts +83 -0
  14. package/dist/action-confidence.js +22 -0
  15. package/dist/active-memory-bridge.d.ts +1 -1
  16. package/dist/active-recall.d.ts +1 -1
  17. package/dist/behavior-learner.d.ts +1 -1
  18. package/dist/behavior-signals.d.ts +1 -1
  19. package/dist/bootstrap.d.ts +4 -2
  20. package/dist/briefing.d.ts +1 -1
  21. package/dist/briefing.js +5 -5
  22. package/dist/buffer-surprise-report.d.ts +1 -1
  23. package/dist/buffer.d.ts +1 -1
  24. package/dist/calibration.d.ts +1 -1
  25. package/dist/calibration.js +4 -4
  26. package/dist/{capsule-export-LLEVB2RG.js → capsule-export-7QNCBZOQ.js} +3 -3
  27. package/dist/{capsule-import-UW45R2MZ.js → capsule-import-EPBHD2EN.js} +3 -3
  28. package/dist/causal-behavior.d.ts +1 -1
  29. package/dist/causal-consolidation.d.ts +1 -1
  30. package/dist/causal-consolidation.js +11 -11
  31. package/dist/{chunk-VQXK37XA.js → chunk-23ZZK64Y.js} +1 -1
  32. package/dist/chunk-23ZZK64Y.js.map +1 -0
  33. package/dist/{chunk-HJYHRE4S.js → chunk-242S3I2A.js} +2 -2
  34. package/dist/{chunk-MCC6KDQF.js → chunk-3B6KIRBH.js} +131 -13
  35. package/dist/chunk-3B6KIRBH.js.map +1 -0
  36. package/dist/chunk-4RA3C3EV.js +60 -0
  37. package/dist/chunk-4RA3C3EV.js.map +1 -0
  38. package/dist/{chunk-EYNQTST2.js → chunk-4YM32CRU.js} +4 -4
  39. package/dist/{chunk-6AUUAZEX.js → chunk-5NXIJZFX.js} +38 -8
  40. package/dist/chunk-5NXIJZFX.js.map +1 -0
  41. package/dist/chunk-6NKAQ74D.js +2237 -0
  42. package/dist/chunk-6NKAQ74D.js.map +1 -0
  43. package/dist/{chunk-PHNGXFQ6.js → chunk-7V22HTMD.js} +3 -3
  44. package/dist/{chunk-363MWCD3.js → chunk-7ZM3BFKK.js} +84 -62
  45. package/dist/chunk-7ZM3BFKK.js.map +1 -0
  46. package/dist/chunk-AC5LO7IU.js +308 -0
  47. package/dist/chunk-AC5LO7IU.js.map +1 -0
  48. package/dist/chunk-AH2JUU6X.js +336 -0
  49. package/dist/chunk-AH2JUU6X.js.map +1 -0
  50. package/dist/{chunk-VX2IUQFE.js → chunk-AQJNPMOA.js} +41 -11
  51. package/dist/chunk-AQJNPMOA.js.map +1 -0
  52. package/dist/{chunk-P73JTV34.js → chunk-BBE34QBJ.js} +4 -4
  53. package/dist/{chunk-5GCNE7CN.js → chunk-BZSQEPRW.js} +454 -140
  54. package/dist/chunk-BZSQEPRW.js.map +1 -0
  55. package/dist/chunk-C5BCH4ZS.js +317 -0
  56. package/dist/chunk-C5BCH4ZS.js.map +1 -0
  57. package/dist/{chunk-C5HUWVH2.js → chunk-CPKTBRS2.js} +6 -6
  58. package/dist/{chunk-IBX3VFOM.js → chunk-D4GAOFF6.js} +118 -2
  59. package/dist/chunk-D4GAOFF6.js.map +1 -0
  60. package/dist/chunk-DB5A3NHS.js +906 -0
  61. package/dist/chunk-DB5A3NHS.js.map +1 -0
  62. package/dist/{chunk-I6BQZSML.js → chunk-DZZPC36E.js} +10 -10
  63. package/dist/{chunk-O4XJUPSF.js → chunk-E2UCDP5S.js} +39 -2
  64. package/dist/chunk-E2UCDP5S.js.map +1 -0
  65. package/dist/{chunk-SRBJUAMP.js → chunk-FMEBPEAO.js} +11 -67
  66. package/dist/chunk-FMEBPEAO.js.map +1 -0
  67. package/dist/{chunk-4DXC6HQQ.js → chunk-FQDPCE3I.js} +5 -5
  68. package/dist/{chunk-NN3LPQ5D.js → chunk-HELQZFZO.js} +155 -16
  69. package/dist/chunk-HELQZFZO.js.map +1 -0
  70. package/dist/{chunk-57QNCUEZ.js → chunk-HL5LRPNA.js} +2 -2
  71. package/dist/{chunk-VTU2B4VF.js → chunk-HQZVVSVB.js} +2 -1
  72. package/dist/chunk-HQZVVSVB.js.map +1 -0
  73. package/dist/{chunk-6Z6UH6TK.js → chunk-HY3L4WKC.js} +69 -3
  74. package/dist/chunk-HY3L4WKC.js.map +1 -0
  75. package/dist/{chunk-QIGOEM65.js → chunk-IB3BFHGN.js} +5 -5
  76. package/dist/{chunk-RXTFCYQF.js → chunk-JESOB2HO.js} +6 -6
  77. package/dist/{chunk-2YMTO4ZJ.js → chunk-JKDVIE52.js} +9 -2
  78. package/dist/chunk-JKDVIE52.js.map +1 -0
  79. package/dist/{chunk-WGK4VHGP.js → chunk-MNU6ZBWT.js} +302 -140
  80. package/dist/chunk-MNU6ZBWT.js.map +1 -0
  81. package/dist/chunk-OAZ5MFUB.js +4124 -0
  82. package/dist/chunk-OAZ5MFUB.js.map +1 -0
  83. package/dist/{chunk-ZTSE2ZJ6.js → chunk-OIGNEXKZ.js} +50 -3
  84. package/dist/chunk-OIGNEXKZ.js.map +1 -0
  85. package/dist/chunk-OZKZ2TRP.js +3729 -0
  86. package/dist/chunk-OZKZ2TRP.js.map +1 -0
  87. package/dist/{chunk-GGD5W7TB.js → chunk-PD6O7AXF.js} +7 -2
  88. package/dist/chunk-PD6O7AXF.js.map +1 -0
  89. package/dist/{chunk-S3IP6R6K.js → chunk-PH4C2U43.js} +23 -3
  90. package/dist/chunk-PH4C2U43.js.map +1 -0
  91. package/dist/chunk-PYPOFEMK.js +294 -0
  92. package/dist/chunk-PYPOFEMK.js.map +1 -0
  93. package/dist/{chunk-EQINRHYR.js → chunk-QDZ2RLEC.js} +243 -7
  94. package/dist/chunk-QDZ2RLEC.js.map +1 -0
  95. package/dist/{chunk-KWBPHZUU.js → chunk-RK6F44Y6.js} +3 -2
  96. package/dist/chunk-RK6F44Y6.js.map +1 -0
  97. package/dist/{chunk-36CTNQY7.js → chunk-RVPLBATS.js} +42 -10
  98. package/dist/chunk-RVPLBATS.js.map +1 -0
  99. package/dist/chunk-SOAU2OE2.js +125 -0
  100. package/dist/chunk-SOAU2OE2.js.map +1 -0
  101. package/dist/{chunk-A4ACKWIW.js → chunk-U5JMRGKX.js} +55 -4
  102. package/dist/chunk-U5JMRGKX.js.map +1 -0
  103. package/dist/{chunk-LIO5X3CM.js → chunk-UVMUAWVT.js} +2 -2
  104. package/dist/chunk-VWT3F4IV.js +2161 -0
  105. package/dist/chunk-VWT3F4IV.js.map +1 -0
  106. package/dist/{chunk-PB5KW5PL.js → chunk-WEJG4TB5.js} +6 -6
  107. package/dist/{chunk-KBYWQWSB.js → chunk-X7HPGUVG.js} +2 -2
  108. package/dist/{chunk-Y5KDIOKF.js → chunk-XAMBKFQS.js} +383 -9
  109. package/dist/chunk-XAMBKFQS.js.map +1 -0
  110. package/dist/{chunk-ZL4S7ARC.js → chunk-Y3VMVTYX.js} +3 -3
  111. package/dist/{chunk-Z5S5HNGY.js → chunk-ZG7PTKBK.js} +21 -5
  112. package/dist/chunk-ZG7PTKBK.js.map +1 -0
  113. package/dist/{chunk-6XA7UN4Z.js → chunk-ZNQN6ZTA.js} +2 -2
  114. package/dist/{chunk-WTFWLUSX.js → chunk-ZVTKDVVM.js} +2 -2
  115. package/dist/{cli-BrEwQTnW.d.ts → cli-BR8KpIU0.d.ts} +2 -2
  116. package/dist/cli.d.ts +7 -4
  117. package/dist/cli.js +44 -40
  118. package/dist/codex-cli-fallback.d.ts +1 -0
  119. package/dist/codex-cli-fallback.js +1 -1
  120. package/dist/compression-optimizer.d.ts +1 -1
  121. package/dist/config.d.ts +1 -1
  122. package/dist/config.js +1 -1
  123. package/dist/consolidation-provenance-check.d.ts +1 -1
  124. package/dist/consolidation-undo.d.ts +1 -1
  125. package/dist/{contradiction-scan-3Z6YW7YA.js → contradiction-scan-QTXAMBUA.js} +3 -2
  126. package/dist/contradiction-scan-QTXAMBUA.js.map +1 -0
  127. package/dist/day-summary.d.ts +1 -1
  128. package/dist/delinearize.d.ts +1 -1
  129. package/dist/direct-answer-wiring.d.ts +1 -1
  130. package/dist/direct-answer-wiring.js +1 -1
  131. package/dist/direct-answer.d.ts +1 -1
  132. package/dist/embedding-fallback.d.ts +1 -1
  133. package/dist/{engine-FOC3IJLA.js → engine-35M5BKQ7.js} +7 -7
  134. package/dist/entity-retrieval.d.ts +1 -1
  135. package/dist/entity-retrieval.js +5 -5
  136. package/dist/entity-schema.d.ts +1 -1
  137. package/dist/event-order-recall.d.ts +17 -0
  138. package/dist/event-order-recall.js +11 -0
  139. package/dist/event-order-recall.js.map +1 -0
  140. package/dist/evidence-pack.d.ts +3 -1
  141. package/dist/evidence-pack.js +5 -3
  142. package/dist/explicit-capture.d.ts +4 -2
  143. package/dist/explicit-cue-recall.d.ts +19 -1
  144. package/dist/explicit-cue-recall.js +10 -4
  145. package/dist/extraction-judge-telemetry.d.ts +1 -1
  146. package/dist/extraction-judge-training.d.ts +1 -1
  147. package/dist/extraction-judge.d.ts +1 -1
  148. package/dist/extraction.d.ts +1 -1
  149. package/dist/extraction.js +8 -7
  150. package/dist/fallback-llm.d.ts +2 -1
  151. package/dist/fallback-llm.js +4 -4
  152. package/dist/focused-list-recall.d.ts +17 -0
  153. package/dist/focused-list-recall.js +11 -0
  154. package/dist/focused-list-recall.js.map +1 -0
  155. package/dist/identity-continuity.d.ts +1 -1
  156. package/dist/importance.d.ts +1 -1
  157. package/dist/{index-1qIcnbG1.d.ts → index-DJ9QWMw-.d.ts} +3 -2
  158. package/dist/index.d.ts +49 -12
  159. package/dist/index.js +289 -115
  160. package/dist/index.js.map +1 -1
  161. package/dist/intent.d.ts +1 -1
  162. package/dist/intent.js +1 -1
  163. package/dist/lifecycle.d.ts +1 -1
  164. package/dist/live-connectors-runner.d.ts +1 -1
  165. package/dist/local-llm.d.ts +8 -4
  166. package/dist/local-llm.js +1 -1
  167. package/dist/mcp-memory-inspector-app.d.ts +106 -0
  168. package/dist/mcp-memory-inspector-app.js +20 -0
  169. package/dist/mcp-memory-inspector-app.js.map +1 -0
  170. package/dist/memory-action-policy.d.ts +1 -1
  171. package/dist/memory-cache.d.ts +1 -1
  172. package/dist/{memory-governance-F3QOJGEY.js → memory-governance-IMPQZXFC.js} +7 -7
  173. package/dist/memory-governance-IMPQZXFC.js.map +1 -0
  174. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  175. package/dist/memory-projection-store.d.ts +1 -1
  176. package/dist/memory-provenance.d.ts +57 -0
  177. package/dist/memory-provenance.js +13 -0
  178. package/dist/memory-provenance.js.map +1 -0
  179. package/dist/memory-worth-outcomes.d.ts +1 -1
  180. package/dist/models-json.d.ts +1 -1
  181. package/dist/native-knowledge.d.ts +1 -1
  182. package/dist/objective-state-writers.d.ts +1 -1
  183. package/dist/objective-state-writers.js +2 -2
  184. package/dist/operator-toolkit.d.ts +1 -1
  185. package/dist/operator-toolkit.js +11 -11
  186. package/dist/{orchestrator-6IvQ-Phj.d.ts → orchestrator-DDMPqU6R.d.ts} +10 -1
  187. package/dist/orchestrator.d.ts +4 -2
  188. package/dist/orchestrator.js +53 -46
  189. package/dist/patterns-cli.d.ts +1 -1
  190. package/dist/policy-runtime.d.ts +1 -1
  191. package/dist/qmd-recall-cache.d.ts +1 -1
  192. package/dist/qmd.d.ts +1 -1
  193. package/dist/recall-disclosure-escalation.d.ts +1 -1
  194. package/dist/recall-explain-renderer.d.ts +3 -1
  195. package/dist/recall-explain-renderer.js +5 -3
  196. package/dist/recall-state.d.ts +1 -1
  197. package/dist/recall-tag-filter.d.ts +3 -1
  198. package/dist/recall-xray-cli.d.ts +3 -1
  199. package/dist/recall-xray-cli.js +6 -4
  200. package/dist/recall-xray-renderer.d.ts +3 -1
  201. package/dist/recall-xray-renderer.js +5 -3
  202. package/dist/recall-xray.d.ts +8 -1
  203. package/dist/recall-xray.js +4 -2
  204. package/dist/resolve-auth-token.d.ts +1 -1
  205. package/dist/resolve-provider-secret.js +1 -1
  206. package/dist/response-guidance-recall.d.ts +18 -0
  207. package/dist/response-guidance-recall.js +11 -0
  208. package/dist/response-guidance-recall.js.map +1 -0
  209. package/dist/resume-bundles.js +3 -3
  210. package/dist/retrieval-agents.d.ts +1 -1
  211. package/dist/retrieval-tiers.d.ts +1 -1
  212. package/dist/sdk-compat.d.ts +3 -2
  213. package/dist/sdk-compat.js.map +1 -1
  214. package/dist/semantic-consolidation.d.ts +1 -1
  215. package/dist/semantic-consolidation.js +6 -6
  216. package/dist/semantic-rule-promotion.js +5 -5
  217. package/dist/semantic-rule-verifier.d.ts +1 -1
  218. package/dist/semantic-rule-verifier.js +6 -6
  219. package/dist/session-observer-bands.d.ts +1 -1
  220. package/dist/session-observer-state.d.ts +1 -1
  221. package/dist/signal.d.ts +1 -1
  222. package/dist/storage.d.ts +3 -1
  223. package/dist/storage.js +4 -4
  224. package/dist/summarizer.d.ts +1 -1
  225. package/dist/summarizer.js +6 -6
  226. package/dist/summary-snapshot.d.ts +1 -1
  227. package/dist/targeted-fact-recall.d.ts +17 -0
  228. package/dist/targeted-fact-recall.js +11 -0
  229. package/dist/targeted-fact-recall.js.map +1 -0
  230. package/dist/telemetry-transcript.d.ts +7 -0
  231. package/dist/telemetry-transcript.js +16 -0
  232. package/dist/telemetry-transcript.js.map +1 -0
  233. package/dist/temporal-supersession.d.ts +1 -1
  234. package/dist/temporal-supersession.js +2 -1
  235. package/dist/temporal-validity.d.ts +1 -1
  236. package/dist/threading.d.ts +1 -1
  237. package/dist/tier-migration.d.ts +1 -1
  238. package/dist/tier-routing.d.ts +1 -1
  239. package/dist/tokens.js +1 -1
  240. package/dist/topics.d.ts +1 -1
  241. package/dist/transcript.d.ts +1 -1
  242. package/dist/trust-zones.d.ts +3 -2
  243. package/dist/trust-zones.js +1 -1
  244. package/dist/types.d.ts +60 -2
  245. package/dist/types.js +1 -1
  246. package/dist/user-model.d.ts +37 -0
  247. package/dist/user-model.js +28 -0
  248. package/dist/user-model.js.map +1 -0
  249. package/dist/utility-runtime.d.ts +1 -1
  250. package/dist/verified-recall.js +6 -6
  251. package/package.json +1 -1
  252. package/dist/chunk-2YMTO4ZJ.js.map +0 -1
  253. package/dist/chunk-363MWCD3.js.map +0 -1
  254. package/dist/chunk-36CTNQY7.js.map +0 -1
  255. package/dist/chunk-5GCNE7CN.js.map +0 -1
  256. package/dist/chunk-6AUUAZEX.js.map +0 -1
  257. package/dist/chunk-6Z6UH6TK.js.map +0 -1
  258. package/dist/chunk-74WWN7ZW.js +0 -82
  259. package/dist/chunk-74WWN7ZW.js.map +0 -1
  260. package/dist/chunk-A4ACKWIW.js.map +0 -1
  261. package/dist/chunk-EQINRHYR.js.map +0 -1
  262. package/dist/chunk-ERUDW6DU.js +0 -965
  263. package/dist/chunk-ERUDW6DU.js.map +0 -1
  264. package/dist/chunk-GGD5W7TB.js.map +0 -1
  265. package/dist/chunk-IBX3VFOM.js.map +0 -1
  266. package/dist/chunk-KWBPHZUU.js.map +0 -1
  267. package/dist/chunk-MCC6KDQF.js.map +0 -1
  268. package/dist/chunk-NN3LPQ5D.js.map +0 -1
  269. package/dist/chunk-O4XJUPSF.js.map +0 -1
  270. package/dist/chunk-S3IP6R6K.js.map +0 -1
  271. package/dist/chunk-SRBJUAMP.js.map +0 -1
  272. package/dist/chunk-VQXK37XA.js.map +0 -1
  273. package/dist/chunk-VTU2B4VF.js.map +0 -1
  274. package/dist/chunk-VX2IUQFE.js.map +0 -1
  275. package/dist/chunk-WGK4VHGP.js.map +0 -1
  276. package/dist/chunk-Y5KDIOKF.js.map +0 -1
  277. package/dist/chunk-Z5S5HNGY.js.map +0 -1
  278. package/dist/chunk-ZTSE2ZJ6.js.map +0 -1
  279. package/dist/contradiction-scan-3Z6YW7YA.js.map +0 -1
  280. /package/dist/{capsule-export-LLEVB2RG.js.map → action-confidence.js.map} +0 -0
  281. /package/dist/{capsule-import-UW45R2MZ.js.map → capsule-export-7QNCBZOQ.js.map} +0 -0
  282. /package/dist/{engine-FOC3IJLA.js.map → capsule-import-EPBHD2EN.js.map} +0 -0
  283. /package/dist/{chunk-HJYHRE4S.js.map → chunk-242S3I2A.js.map} +0 -0
  284. /package/dist/{chunk-EYNQTST2.js.map → chunk-4YM32CRU.js.map} +0 -0
  285. /package/dist/{chunk-PHNGXFQ6.js.map → chunk-7V22HTMD.js.map} +0 -0
  286. /package/dist/{chunk-P73JTV34.js.map → chunk-BBE34QBJ.js.map} +0 -0
  287. /package/dist/{chunk-C5HUWVH2.js.map → chunk-CPKTBRS2.js.map} +0 -0
  288. /package/dist/{chunk-I6BQZSML.js.map → chunk-DZZPC36E.js.map} +0 -0
  289. /package/dist/{chunk-4DXC6HQQ.js.map → chunk-FQDPCE3I.js.map} +0 -0
  290. /package/dist/{chunk-57QNCUEZ.js.map → chunk-HL5LRPNA.js.map} +0 -0
  291. /package/dist/{chunk-QIGOEM65.js.map → chunk-IB3BFHGN.js.map} +0 -0
  292. /package/dist/{chunk-RXTFCYQF.js.map → chunk-JESOB2HO.js.map} +0 -0
  293. /package/dist/{chunk-LIO5X3CM.js.map → chunk-UVMUAWVT.js.map} +0 -0
  294. /package/dist/{chunk-PB5KW5PL.js.map → chunk-WEJG4TB5.js.map} +0 -0
  295. /package/dist/{chunk-KBYWQWSB.js.map → chunk-X7HPGUVG.js.map} +0 -0
  296. /package/dist/{chunk-ZL4S7ARC.js.map → chunk-Y3VMVTYX.js.map} +0 -0
  297. /package/dist/{chunk-6XA7UN4Z.js.map → chunk-ZNQN6ZTA.js.map} +0 -0
  298. /package/dist/{chunk-WTFWLUSX.js.map → chunk-ZVTKDVVM.js.map} +0 -0
  299. /package/dist/{memory-governance-F3QOJGEY.js.map → engine-35M5BKQ7.js.map} +0 -0
package/dist/storage.d.ts CHANGED
@@ -2,7 +2,7 @@ import { VersioningConfig } from './page-versioning.js';
2
2
  import { ConsolidationOperator } from './consolidation-operator.js';
3
3
  import { PluginConfig, MemoryCategory, ImportanceScore, MemoryLink, MemoryFrontmatter, MemoryStatus, MemoryFile, EntityStructuredSection, BufferState, MetaState, MemoryActionEvent, MemoryLifecycleEvent, BufferSurpriseEvent, BehaviorSignalEvent, CompressionGuidelineOptimizerState, ContinuityIncidentOpenInput, ContinuityIncidentRecord, ContinuityIncidentCloseInput, ContinuityImprovementLoop, ContinuityLoopUpsertInput, ContinuityLoopReviewInput, FileHygieneConfig, EntityRelationship, EntityActivityEntry, EntityFile, AccessTrackingEntry, MemoryProjectionCurrentState, MemorySummary, TopicScore } from './types.js';
4
4
  import { P as ProjectedMemoryBrowseOptions, a as ProjectedMemoryBrowsePage, b as readProjectedGovernanceRecord } from './memory-projection-store-CY8TU40w.js';
5
- import './index-1qIcnbG1.js';
5
+ import './index-DJ9QWMw-.js';
6
6
  import 'better-sqlite3';
7
7
 
8
8
  interface ReextractJobRequest {
@@ -289,6 +289,7 @@ declare class StorageManager {
289
289
  sourceTurnId?: string;
290
290
  memoryKind?: MemoryFrontmatter["memoryKind"];
291
291
  expiresAt?: string;
292
+ validAt?: string;
292
293
  structuredAttributes?: Record<string, string>;
293
294
  /**
294
295
  * When provided, this string is used as the source for the fact-content
@@ -722,6 +723,7 @@ declare class StorageManager {
722
723
  intentActionType?: string;
723
724
  intentEntityTypes?: string[];
724
725
  memoryKind?: MemoryFrontmatter["memoryKind"];
726
+ validAt?: string;
725
727
  }): Promise<string>;
726
728
  /**
727
729
  * Get all chunks for a given parent memory ID.
package/dist/storage.js CHANGED
@@ -8,14 +8,14 @@ import {
8
8
  normalizeEntityName,
9
9
  parseEntityFile,
10
10
  serializeEntityFile
11
- } from "./chunk-MCC6KDQF.js";
11
+ } from "./chunk-3B6KIRBH.js";
12
12
  import "./chunk-YNJHCGDT.js";
13
13
  import "./chunk-NN2DKE4T.js";
14
- import "./chunk-VQXK37XA.js";
15
- import "./chunk-PFV5C235.js";
16
- import "./chunk-RULE4VG5.js";
14
+ import "./chunk-23ZZK64Y.js";
17
15
  import "./chunk-SCU65EZI.js";
18
16
  import "./chunk-XJKFSSDW.js";
17
+ import "./chunk-PFV5C235.js";
18
+ import "./chunk-RULE4VG5.js";
19
19
  import "./chunk-DM2T26WE.js";
20
20
  import "./chunk-QSVPYQPG.js";
21
21
  import "./chunk-FVQJYWH7.js";
@@ -1,7 +1,7 @@
1
1
  import { ModelRegistry } from './model-registry.js';
2
2
  import { PluginConfig, GatewayConfig, TranscriptEntry, HourlySummary } from './types.js';
3
3
  import { TranscriptManager } from './transcript.js';
4
- import './index-1qIcnbG1.js';
4
+ import './index-DJ9QWMw-.js';
5
5
  import './session-integrity.js';
6
6
 
7
7
  declare class HourlySummarizer {
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  HourlySummarizer
3
- } from "./chunk-PHNGXFQ6.js";
3
+ } from "./chunk-7V22HTMD.js";
4
4
  import "./chunk-ETOW6ACV.js";
5
5
  import "./chunk-QR3C7BKQ.js";
6
- import "./chunk-NN3LPQ5D.js";
7
- import "./chunk-VX2IUQFE.js";
8
- import "./chunk-S3IP6R6K.js";
9
- import "./chunk-L2EXJQJP.js";
6
+ import "./chunk-HELQZFZO.js";
7
+ import "./chunk-AQJNPMOA.js";
8
+ import "./chunk-PH4C2U43.js";
10
9
  import "./chunk-7SI52C65.js";
10
+ import "./chunk-L2EXJQJP.js";
11
11
  import "./chunk-UZB5KHKX.js";
12
- import "./chunk-KWBPHZUU.js";
12
+ import "./chunk-RK6F44Y6.js";
13
13
  import "./chunk-OR64ZGRZ.js";
14
14
  import "./chunk-IXEJRKCZ.js";
15
15
  import "./chunk-MARWOCVP.js";
@@ -1,5 +1,5 @@
1
1
  import { HourlySummary } from './types.js';
2
- import './index-1qIcnbG1.js';
2
+ import './index-DJ9QWMw-.js';
3
3
 
4
4
  declare function summarySnapshotPath(memoryDir: string, sessionKey: string): string;
5
5
  declare function readSummarySnapshot(memoryDir: string, sessionKey: string): Promise<HourlySummary[] | null>;
@@ -0,0 +1,17 @@
1
+ import { ExplicitCueRecallEngine } from './explicit-cue-recall.js';
2
+
3
+ interface TargetedFactRecallOptions {
4
+ engine: ExplicitCueRecallEngine | null | undefined;
5
+ sessionId?: string;
6
+ query: string;
7
+ maxChars: number;
8
+ maxItemChars?: number;
9
+ maxSearchResults?: number;
10
+ maxScanWindowTurns?: number;
11
+ maxScanWindowTokens?: number;
12
+ title?: string;
13
+ }
14
+ declare function shouldRecallTargetedFactEvidence(query: string): boolean;
15
+ declare function buildTargetedFactRecallSection(options: TargetedFactRecallOptions): Promise<string>;
16
+
17
+ export { type TargetedFactRecallOptions, buildTargetedFactRecallSection, shouldRecallTargetedFactEvidence };
@@ -0,0 +1,11 @@
1
+ import {
2
+ buildTargetedFactRecallSection,
3
+ shouldRecallTargetedFactEvidence
4
+ } from "./chunk-VWT3F4IV.js";
5
+ import "./chunk-PYPOFEMK.js";
6
+ import "./chunk-PZ5AY32C.js";
7
+ export {
8
+ buildTargetedFactRecallSection,
9
+ shouldRecallTargetedFactEvidence
10
+ };
11
+ //# sourceMappingURL=targeted-fact-recall.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ declare function stripRolePrefix(line: string): string;
2
+ declare function isTelemetryMarkerLine(line: string): boolean;
3
+ declare function isMechanicalTelemetryLine(line: string): boolean;
4
+ declare function hasDurableMemoryCue(conversation: string): boolean;
5
+ declare function looksLikeMechanicalTelemetryTranscript(conversation: string): boolean;
6
+
7
+ export { hasDurableMemoryCue, isMechanicalTelemetryLine, isTelemetryMarkerLine, looksLikeMechanicalTelemetryTranscript, stripRolePrefix };
@@ -0,0 +1,16 @@
1
+ import {
2
+ hasDurableMemoryCue,
3
+ isMechanicalTelemetryLine,
4
+ isTelemetryMarkerLine,
5
+ looksLikeMechanicalTelemetryTranscript,
6
+ stripRolePrefix
7
+ } from "./chunk-4RA3C3EV.js";
8
+ import "./chunk-PZ5AY32C.js";
9
+ export {
10
+ hasDurableMemoryCue,
11
+ isMechanicalTelemetryLine,
12
+ isTelemetryMarkerLine,
13
+ looksLikeMechanicalTelemetryTranscript,
14
+ stripRolePrefix
15
+ };
16
+ //# sourceMappingURL=telemetry-transcript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,6 +1,6 @@
1
1
  import { MemoryFrontmatter } from './types.js';
2
2
  import { StorageManager } from './storage.js';
3
- import './index-1qIcnbG1.js';
3
+ import './index-DJ9QWMw-.js';
4
4
  import './page-versioning.js';
5
5
  import './consolidation-operator.js';
6
6
  import './memory-projection-store-CY8TU40w.js';
@@ -6,7 +6,8 @@ import {
6
6
  shouldFilterSupersededFromRecall,
7
7
  shouldSupersedeExisting,
8
8
  supersessionKeysForFact
9
- } from "./chunk-ZTSE2ZJ6.js";
9
+ } from "./chunk-OIGNEXKZ.js";
10
+ import "./chunk-MDYG7VI7.js";
10
11
  import "./chunk-2ODBA7MQ.js";
11
12
  import "./chunk-PZ5AY32C.js";
12
13
  export {
@@ -1,5 +1,5 @@
1
1
  import { MemoryFrontmatter } from './types.js';
2
- import './index-1qIcnbG1.js';
2
+ import './index-DJ9QWMw-.js';
3
3
 
4
4
  /**
5
5
  * Temporal validity helpers (issue #680).
@@ -1,5 +1,5 @@
1
1
  import { BufferTurn, ConversationThread } from './types.js';
2
- import './index-1qIcnbG1.js';
2
+ import './index-DJ9QWMw-.js';
3
3
 
4
4
  /**
5
5
  * Conversation Threading (Phase 3B)
@@ -2,7 +2,7 @@ import { MemoryFile } from './types.js';
2
2
  import { StorageManager } from './storage.js';
3
3
  import { MemoryTier } from './tier-routing.js';
4
4
  import { S as SearchBackend } from './port-B6VEDIkC.js';
5
- import './index-1qIcnbG1.js';
5
+ import './index-DJ9QWMw-.js';
6
6
  import './page-versioning.js';
7
7
  import './consolidation-operator.js';
8
8
  import './memory-projection-store-CY8TU40w.js';
@@ -1,6 +1,6 @@
1
1
  import { MemoryFile } from './types.js';
2
2
  import { LifecycleSignals } from './lifecycle.js';
3
- import './index-1qIcnbG1.js';
3
+ import './index-DJ9QWMw-.js';
4
4
 
5
5
  type MemoryTier = "hot" | "cold";
6
6
  interface TierRoutingPolicy {
package/dist/tokens.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  resolveConnectorFromToken,
10
10
  revokeToken,
11
11
  saveTokenStore
12
- } from "./chunk-VTU2B4VF.js";
12
+ } from "./chunk-HQZVVSVB.js";
13
13
  import "./chunk-MARWOCVP.js";
14
14
  import "./chunk-PZ5AY32C.js";
15
15
  export {
package/dist/topics.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MemoryFile, TopicScore } from './types.js';
2
- import './index-1qIcnbG1.js';
2
+ import './index-DJ9QWMw-.js';
3
3
 
4
4
  /**
5
5
  * Topic Extraction (Phase 4B)
@@ -1,6 +1,6 @@
1
1
  import { PluginConfig, TranscriptEntry, Checkpoint } from './types.js';
2
2
  import { SessionIntegrityReport } from './session-integrity.js';
3
- import './index-1qIcnbG1.js';
3
+ import './index-DJ9QWMw-.js';
4
4
 
5
5
  /**
6
6
  * Manages conversation transcript storage, checkpointing, and recall formatting.
@@ -98,12 +98,13 @@ interface TrustZonePromotionReadiness {
98
98
  corroborationSourceClasses: TrustZoneSourceClass[];
99
99
  }
100
100
  interface TrustZoneDemoSeedResult {
101
- scenario: string;
101
+ scenario: TrustZoneDemoScenario;
102
102
  dryRun: boolean;
103
103
  recordsWritten: number;
104
104
  records: TrustZoneRecord[];
105
105
  filePaths: string[];
106
106
  }
107
+ type TrustZoneDemoScenario = "enterprise-buyer-v1" | "agentic-commerce-v1";
107
108
  declare function resolveTrustZoneStoreDir(memoryDir: string, overrideDir?: string): string;
108
109
  declare function validateTrustZoneRecord(raw: unknown): TrustZoneRecord;
109
110
  declare function recordTrustZoneRecord(options: {
@@ -167,4 +168,4 @@ declare function getTrustZoneStoreStatus(options: {
167
168
  poisoningDefenseEnabled: boolean;
168
169
  }): Promise<TrustZoneStoreStatus>;
169
170
 
170
- export { type TrustZoneDemoSeedResult, type TrustZoneListResult, type TrustZoneName, type TrustZonePromotionPlan, type TrustZonePromotionReadiness, type TrustZonePromotionResult, type TrustZoneProvenance, type TrustZoneProvenanceScore, type TrustZoneRecord, type TrustZoneRecordEntry, type TrustZoneRecordKind, type TrustZoneScoreBand, type TrustZoneSearchResult, type TrustZoneSourceClass, type TrustZoneStoreStatus, getTrustZoneStoreStatus, isTrustZoneName, listTrustZoneRecords, planTrustZonePromotion, promoteTrustZoneRecord, recordTrustZoneRecord, resolveTrustZoneStoreDir, scoreTrustZoneProvenance, searchTrustZoneRecords, seedTrustZoneDemoDataset, summarizeTrustZonePromotionReadiness, validateTrustZoneRecord };
171
+ export { type TrustZoneDemoScenario, type TrustZoneDemoSeedResult, type TrustZoneListResult, type TrustZoneName, type TrustZonePromotionPlan, type TrustZonePromotionReadiness, type TrustZonePromotionResult, type TrustZoneProvenance, type TrustZoneProvenanceScore, type TrustZoneRecord, type TrustZoneRecordEntry, type TrustZoneRecordKind, type TrustZoneScoreBand, type TrustZoneSearchResult, type TrustZoneSourceClass, type TrustZoneStoreStatus, getTrustZoneStoreStatus, isTrustZoneName, listTrustZoneRecords, planTrustZonePromotion, promoteTrustZoneRecord, recordTrustZoneRecord, resolveTrustZoneStoreDir, scoreTrustZoneProvenance, searchTrustZoneRecords, seedTrustZoneDemoDataset, summarizeTrustZonePromotionReadiness, validateTrustZoneRecord };
@@ -11,7 +11,7 @@ import {
11
11
  seedTrustZoneDemoDataset,
12
12
  summarizeTrustZonePromotionReadiness,
13
13
  validateTrustZoneRecord
14
- } from "./chunk-EQINRHYR.js";
14
+ } from "./chunk-QDZ2RLEC.js";
15
15
  import "./chunk-DT5TVLJE.js";
16
16
  import "./chunk-DGXUHMOV.js";
17
17
  import "./chunk-LPSF4OQH.js";
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { L as LcmMessagePartInput, M as MessagePartSourceFormat } from './index-1qIcnbG1.js';
1
+ import { L as LcmMessagePartInput, M as MessagePartSourceFormat } from './index-DJ9QWMw-.js';
2
2
 
3
3
  /**
4
4
  * dreams-ledger.ts — per-phase telemetry for the Dreams consolidation pipeline.
@@ -170,6 +170,7 @@ interface RecallSectionConfig {
170
170
  timeoutMs?: number;
171
171
  maxPatterns?: number;
172
172
  maxRubrics?: number;
173
+ forceGeneric?: boolean;
173
174
  }
174
175
  interface RecallPipelineConfig {
175
176
  recallBudgetChars: number;
@@ -1048,7 +1049,7 @@ interface PluginConfig {
1048
1049
  localLmsCliPath?: string;
1049
1050
  /** Optional bin directory prepended to PATH for LMS CLI execution. */
1050
1051
  localLmsBinDir?: string;
1051
- /** Hard timeout for local LLM requests (ms). */
1052
+ /** Hard timeout for local LLM and gateway fallback requests (ms). */
1052
1053
  localLlmTimeoutMs: number;
1053
1054
  /** Max context window for local LLM (override auto-detection). Set lower if your LLM server defaults to smaller contexts. */
1054
1055
  localLlmMaxContext?: number;
@@ -1073,6 +1074,19 @@ interface PluginConfig {
1073
1074
  extractionDedupeWindowMs: number;
1074
1075
  extractionMinChars: number;
1075
1076
  extractionMinUserTurns: number;
1077
+ /**
1078
+ * When true, skip semantic memory extraction for mechanical action/state
1079
+ * telemetry transcripts that have no durable-memory cue. Raw transcript
1080
+ * storage/recall still runs; this only prevents expensive low-value fact
1081
+ * extraction over state logs. Default true.
1082
+ */
1083
+ extractionTelemetryPrefilterEnabled: boolean;
1084
+ /**
1085
+ * When true, LCM uses deterministic compression instead of semantic LLM
1086
+ * summarization for mechanical action/state telemetry transcripts with no
1087
+ * durable-memory cue. Raw transcript storage/recall still runs. Default true.
1088
+ */
1089
+ lcmTelemetryPrefilterEnabled: boolean;
1076
1090
  extractionMaxTurnChars: number;
1077
1091
  extractionMaxFactsPerRun: number;
1078
1092
  extractionMaxEntitiesPerRun: number;
@@ -1450,6 +1464,46 @@ interface PluginConfig {
1450
1464
  explicitCueRecallMaxChars: number;
1451
1465
  /** Maximum query-visible cues expanded per recall. */
1452
1466
  explicitCueRecallMaxReferences: number;
1467
+ /** Enable targeted fact evidence recall for direct answer questions. */
1468
+ targetedFactRecallEnabled: boolean;
1469
+ /** Character budget for the targeted fact evidence section. */
1470
+ targetedFactRecallMaxChars: number;
1471
+ /** Maximum recalled items for targeted fact evidence. */
1472
+ targetedFactRecallMaxResults: number;
1473
+ /** Recent-turn scan window for targeted fact evidence. */
1474
+ targetedFactRecallScanWindowTurns: number;
1475
+ /** Recent-token scan window for targeted fact evidence. */
1476
+ targetedFactRecallScanWindowTokens: number;
1477
+ /** Enable focused list evidence recall for count, relation, and recommendation questions. */
1478
+ focusedListRecallEnabled: boolean;
1479
+ /** Character budget for the focused list evidence section. */
1480
+ focusedListRecallMaxChars: number;
1481
+ /** Maximum recalled items for focused list evidence. */
1482
+ focusedListRecallMaxResults: number;
1483
+ /** Recent-turn scan window for focused list evidence. */
1484
+ focusedListRecallScanWindowTurns: number;
1485
+ /** Recent-token scan window for focused list evidence. */
1486
+ focusedListRecallScanWindowTokens: number;
1487
+ /** Enable response guidance recall for user answer-shape preferences. */
1488
+ responseGuidanceRecallEnabled: boolean;
1489
+ /** Character budget for the response guidance recall section. */
1490
+ responseGuidanceRecallMaxChars: number;
1491
+ /** Maximum recalled items for response guidance. */
1492
+ responseGuidanceRecallMaxResults: number;
1493
+ /** Recent-turn scan window for response guidance. */
1494
+ responseGuidanceRecallScanWindowTurns: number;
1495
+ /** Recent-token scan window for response guidance. */
1496
+ responseGuidanceRecallScanWindowTokens: number;
1497
+ /** Enable event-order evidence recall for chronology questions. */
1498
+ eventOrderRecallEnabled: boolean;
1499
+ /** Character budget for the event-order evidence section. */
1500
+ eventOrderRecallMaxChars: number;
1501
+ /** Maximum recalled items for event-order evidence. */
1502
+ eventOrderRecallMaxResults: number;
1503
+ /** Recent-turn scan window for event-order evidence. */
1504
+ eventOrderRecallScanWindowTurns: number;
1505
+ /** Recent-token scan window for event-order evidence. */
1506
+ eventOrderRecallScanWindowTokens: number;
1453
1507
  lcmEnabled: boolean;
1454
1508
  lcmLeafBatchSize: number;
1455
1509
  lcmRollupFanIn: number;
@@ -1458,6 +1512,8 @@ interface PluginConfig {
1458
1512
  lcmRecallBudgetShare: number;
1459
1513
  lcmDeterministicMaxTokens: number;
1460
1514
  lcmArchiveRetentionDays: number;
1515
+ /** Max independent LCM observe jobs to process concurrently. Default 1. */
1516
+ lcmObserveConcurrency: number;
1461
1517
  /** Opt-in structured message-part capture/recall sidecar for LCM. Default false. */
1462
1518
  messagePartsEnabled: boolean;
1463
1519
  /** Max structured file/tool matches injected into recall. */
@@ -1808,11 +1864,13 @@ interface BufferTurn {
1808
1864
  role: "user" | "assistant";
1809
1865
  content: string;
1810
1866
  timestamp: string;
1867
+ sourceValidAt?: string;
1811
1868
  sessionKey?: string;
1812
1869
  logicalSessionKey?: string;
1813
1870
  providerThreadId?: string | null;
1814
1871
  turnFingerprint?: string;
1815
1872
  persistProcessedFingerprint?: boolean;
1873
+ extractionContextOnly?: boolean;
1816
1874
  parts?: LcmMessagePartInput[];
1817
1875
  rawContent?: unknown;
1818
1876
  sourceFormat?: MessagePartSourceFormat;
package/dist/types.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  SPECULATIVE_TTL_DAYS,
5
5
  confidenceTier,
6
6
  isRecallDisclosure
7
- } from "./chunk-VQXK37XA.js";
7
+ } from "./chunk-23ZZK64Y.js";
8
8
  import "./chunk-PZ5AY32C.js";
9
9
  export {
10
10
  DEFAULT_RECALL_DISCLOSURE,
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Host-agnostic user-model contract for user-aware agents.
3
+ *
4
+ * This is intentionally separate from the existing `MemoryScope` type, which
5
+ * still means extraction routing scope (`project` | `global`). User context
6
+ * scopes describe where a model facet is safe and useful to apply.
7
+ */
8
+ declare const USER_MODEL_CORE_QUESTION = "What does the agent need to understand about this user to act well right now?";
9
+ declare const USER_MODEL_DIMENSIONS: readonly ["preferences", "goals", "projects", "constraints", "current_priorities", "communication_style", "risk_tolerance", "people_relationships", "past_decisions", "definitions_of_good", "ask_before_rules", "do_not_use_outside_rules"];
10
+ type UserModelDimension = (typeof USER_MODEL_DIMENSIONS)[number];
11
+ declare const USER_CONTEXT_SCOPES: readonly ["personal", "work", "client", "project", "repo", "tool", "temporary", "private", "do-not-use-outside-this-context"];
12
+ type UserContextScope = (typeof USER_CONTEXT_SCOPES)[number];
13
+ declare const USER_BOUNDARY_SCOPES: readonly ["temporary", "private", "do-not-use-outside-this-context"];
14
+ type UserBoundaryScope = (typeof USER_BOUNDARY_SCOPES)[number];
15
+ interface UserModelFacet {
16
+ dimension: UserModelDimension;
17
+ statement: string;
18
+ scopes: UserContextScope[];
19
+ appliesTo?: string[];
20
+ sourceMemoryIds?: string[];
21
+ confidence?: number;
22
+ updatedAt?: string;
23
+ }
24
+ interface UserModelCoverage {
25
+ present: UserModelDimension[];
26
+ missing: UserModelDimension[];
27
+ byDimension: Record<UserModelDimension, UserModelFacet[]>;
28
+ }
29
+ declare function isUserModelDimension(value: unknown): value is UserModelDimension;
30
+ declare function normalizeUserModelDimension(value: unknown): UserModelDimension | null;
31
+ declare function isUserContextScope(value: unknown): value is UserContextScope;
32
+ declare function normalizeUserContextScope(value: unknown): UserContextScope | null;
33
+ declare function isUserBoundaryScope(value: unknown): value is UserBoundaryScope;
34
+ declare function facetHasBoundary(facet: Pick<UserModelFacet, "scopes">): boolean;
35
+ declare function summarizeUserModelCoverage(facets: readonly UserModelFacet[], requiredDimensions?: readonly UserModelDimension[]): UserModelCoverage;
36
+
37
+ export { USER_BOUNDARY_SCOPES, USER_CONTEXT_SCOPES, USER_MODEL_CORE_QUESTION, USER_MODEL_DIMENSIONS, type UserBoundaryScope, type UserContextScope, type UserModelCoverage, type UserModelDimension, type UserModelFacet, facetHasBoundary, isUserBoundaryScope, isUserContextScope, isUserModelDimension, normalizeUserContextScope, normalizeUserModelDimension, summarizeUserModelCoverage };
@@ -0,0 +1,28 @@
1
+ import {
2
+ USER_BOUNDARY_SCOPES,
3
+ USER_CONTEXT_SCOPES,
4
+ USER_MODEL_CORE_QUESTION,
5
+ USER_MODEL_DIMENSIONS,
6
+ facetHasBoundary,
7
+ isUserBoundaryScope,
8
+ isUserContextScope,
9
+ isUserModelDimension,
10
+ normalizeUserContextScope,
11
+ normalizeUserModelDimension,
12
+ summarizeUserModelCoverage
13
+ } from "./chunk-SOAU2OE2.js";
14
+ import "./chunk-PZ5AY32C.js";
15
+ export {
16
+ USER_BOUNDARY_SCOPES,
17
+ USER_CONTEXT_SCOPES,
18
+ USER_MODEL_CORE_QUESTION,
19
+ USER_MODEL_DIMENSIONS,
20
+ facetHasBoundary,
21
+ isUserBoundaryScope,
22
+ isUserContextScope,
23
+ isUserModelDimension,
24
+ normalizeUserContextScope,
25
+ normalizeUserModelDimension,
26
+ summarizeUserModelCoverage
27
+ };
28
+ //# sourceMappingURL=user-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,6 +1,6 @@
1
1
  import { TierRoutingPolicy } from './tier-routing.js';
2
2
  import './types.js';
3
- import './index-1qIcnbG1.js';
3
+ import './index-DJ9QWMw-.js';
4
4
  import './lifecycle.js';
5
5
 
6
6
  interface UtilityRuntimeValues {
@@ -1,22 +1,22 @@
1
1
  import {
2
2
  searchVerifiedEpisodes
3
- } from "./chunk-RXTFCYQF.js";
3
+ } from "./chunk-JESOB2HO.js";
4
4
  import "./chunk-URB2WSKZ.js";
5
- import "./chunk-DT5TVLJE.js";
6
- import "./chunk-MCC6KDQF.js";
5
+ import "./chunk-3B6KIRBH.js";
7
6
  import "./chunk-YNJHCGDT.js";
8
7
  import "./chunk-NN2DKE4T.js";
9
- import "./chunk-VQXK37XA.js";
10
- import "./chunk-PFV5C235.js";
11
- import "./chunk-RULE4VG5.js";
8
+ import "./chunk-23ZZK64Y.js";
12
9
  import "./chunk-SCU65EZI.js";
13
10
  import "./chunk-XJKFSSDW.js";
11
+ import "./chunk-PFV5C235.js";
12
+ import "./chunk-RULE4VG5.js";
14
13
  import "./chunk-DM2T26WE.js";
15
14
  import "./chunk-QSVPYQPG.js";
16
15
  import "./chunk-FVQJYWH7.js";
17
16
  import "./chunk-4DJQYKMN.js";
18
17
  import "./chunk-G7D6GZ5J.js";
19
18
  import "./chunk-FAAFWE4G.js";
19
+ import "./chunk-DT5TVLJE.js";
20
20
  import "./chunk-2ODBA7MQ.js";
21
21
  import "./chunk-A6XUJE5D.js";
22
22
  import "./chunk-PZ5AY32C.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "1.1.10",
3
+ "version": "1.1.12",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/recall-xray.ts"],"sourcesContent":["/**\n * Recall X-ray snapshot schema (issue #570, PR 1).\n *\n * The X-ray surface is the unified, per-result attribution document that\n * merges the tier that served each memory, its score decomposition, any\n * graph path, an audit entry id, and the exact filter/eligibility ladder\n * that either admitted or rejected each candidate. This file defines the\n * schema and an in-memory builder + builder-state helper.\n *\n * Scope for PR 1 (this slice):\n * - Types only + pure builder functions (no IO, no rendering).\n * - Orchestrator plumbing captures a snapshot when the caller passes\n * `xrayCapture: true`. No behavior change when the flag is absent.\n * - NO new public surfaces here — CLI/HTTP/MCP land in later slices.\n *\n * The shared renderer lands in PR 2 at `recall-xray-renderer.ts`. Do not\n * fork formatting logic into other surfaces; extend the renderer.\n */\n\nimport { randomUUID } from \"node:crypto\";\n\nimport type { RecallDisclosure, RecallTierExplain } from \"./types.js\";\nimport { isRecallDisclosure } from \"./types.js\";\n\n/**\n * Estimate token cost of a payload at the rough ~4 chars/token English\n * heuristic. Non-negative integer; returns 0 for empty / null input.\n * Used by recall surfaces to attach `estimatedTokens` to X-ray results\n * (issue #677 PR 3/4). Identical to the private heuristic in\n * `chunking.ts`; kept self-contained here so X-ray callers don't pull\n * in chunking internals.\n */\nexport function estimateRecallTokens(text: string | null | undefined): number {\n if (typeof text !== \"string\" || text.length === 0) return 0;\n return Math.ceil(text.length / 4);\n}\n\n/**\n * Aggregated per-disclosure token spend summary, computed by the\n * renderer from a snapshot's results. Non-negative integers.\n */\nexport interface RecallXrayDisclosureSummary {\n chunk: { count: number; estimatedTokens: number };\n section: { count: number; estimatedTokens: number };\n raw: { count: number; estimatedTokens: number };\n /** Number of results without a recorded disclosure level. */\n unspecified: { count: number; estimatedTokens: number };\n}\n\n/**\n * Which retrieval source produced a given result. This is the X-ray\n * tier ladder called out in issue #570 and is *distinct* from the\n * `RetrievalTier` enum (which describes issue #518's tier-explain\n * block). Keeping the sets separate lets the two observability\n * surfaces evolve without conflating their vocabularies:\n *\n * - `RetrievalTier` — direct-answer eligibility ladder.\n * - `RecallXrayServedBy` — which source materialized each result.\n */\nexport type RecallXrayServedBy =\n | \"direct-answer\"\n | \"hybrid\"\n | \"graph\"\n | \"recent-scan\"\n | \"procedural\"\n | \"review-context\"\n | \"lcm-file-parts\"\n | \"lcm-tool-parts\";\n\nexport const RECALL_XRAY_SERVED_BY_VALUES: readonly RecallXrayServedBy[] = [\n \"direct-answer\",\n \"hybrid\",\n \"graph\",\n \"recent-scan\",\n \"procedural\",\n \"review-context\",\n \"lcm-file-parts\",\n \"lcm-tool-parts\",\n] as const;\n\nexport function isRecallXrayServedBy(\n value: unknown,\n): value is RecallXrayServedBy {\n return (\n typeof value === \"string\" &&\n (RECALL_XRAY_SERVED_BY_VALUES as readonly string[]).includes(value)\n );\n}\n\n/**\n * Score decomposition for a single X-ray result.\n *\n * All fields are optional because different tiers populate different\n * terms: `hybrid` reports vector + bm25 + mmr penalty, `direct-answer`\n * reports importance + tier prior, etc. The only guaranteed field is\n * `final`, which is the post-combination score used for ordering.\n */\nexport interface RecallXrayScoreDecomposition {\n vector?: number;\n bm25?: number;\n importance?: number;\n mmrPenalty?: number;\n tierPrior?: number;\n /** Additive boost from `reinforcement_count` frontmatter (issue #687 PR 3/4). */\n reinforcementBoost?: number;\n final: number;\n}\n\n/**\n * Per-result breakdown inside an X-ray snapshot.\n */\nexport interface RecallXrayResult {\n memoryId: string;\n path: string;\n servedBy: RecallXrayServedBy;\n scoreDecomposition: RecallXrayScoreDecomposition;\n graphPath?: string[];\n /**\n * Issue #681 PR 3/3 — per-edge confidence values aligned with\n * `graphPath`. When present, `graphEdgeConfidences[i]` is the\n * confidence of the edge between `graphPath[i]` and `graphPath[i+1]`,\n * so the array length is one less than `graphPath`. Legacy edges\n * without a recorded confidence render as `1.0`. Operators use this\n * to attribute floor-pruning and PageRank ranking decisions back to\n * specific edges. The renderer drops the line when the array is\n * empty or absent so legacy snapshots round-trip cleanly.\n */\n graphEdgeConfidences?: number[];\n auditEntryId?: string;\n /** Human-readable list of filters the candidate *passed*. */\n admittedBy: string[];\n /**\n * First filter that *would have* rejected the candidate, or undefined\n * when the candidate was admitted without a rejection trace. When\n * present, `admittedBy` may still contain filters the candidate passed\n * before the rejecting gate; consumers should render both.\n */\n rejectedBy?: string;\n /**\n * Disclosure depth used to render this result's payload (issue #677\n * PR 3/4). Mirrors the per-result disclosure already exposed in the\n * recall response so X-ray consumers can attribute token spend to\n * the depth that produced it.\n */\n disclosure?: RecallDisclosure;\n /**\n * Estimated token cost of the rendered payload at the chosen\n * disclosure depth. Non-negative integer. Computed by callers via\n * `estimateRecallTokens(text)`; the renderer aggregates these into\n * a per-disclosure summary so operators can see where their budget\n * went.\n */\n estimatedTokens?: number;\n /**\n * Free-form tags from the memory's YAML frontmatter (issue #689 PR 3/3).\n * Populated by the X-ray capture path when the caller passes a `tags`\n * filter so per-result tags are available alongside the filter trace\n * in `snapshot.filters`. Also populated without a filter when the\n * orchestrator decorates results via `xrayCapture: true` so all X-ray\n * consumers can inspect memory labels without a separate storage read.\n * Absent (not `[]`) when the frontmatter has no tags or the memory\n * could not be read.\n */\n tags?: string[];\n}\n\n/**\n * Trace entry for a filter the orchestrator evaluated during recall.\n * Captures the name of the filter, how many candidates it saw, and how\n * many it let through. Used by X-ray consumers to render the filter\n * ladder above the per-result breakdown.\n */\nexport interface RecallFilterTrace {\n name: string;\n considered: number;\n admitted: number;\n /** Optional human-readable reason for any rejections. */\n reason?: string;\n}\n\n/**\n * Peer-profile injection annotation (issue #679 completion).\n *\n * When `peerProfileRecallEnabled` is true and a peer is registered for\n * the session, the orchestrator injects a `## Peer Profile` section into\n * the recall context. This annotation records which peer was injected and\n * how many profile fields were included so operators can correlate\n * retrieval quality with peer-context enrichment.\n *\n * `null` means no peer profile was injected (peer not registered, feature\n * disabled, or peer has no profile fields).\n */\nexport interface RecallXrayPeerProfileInjection {\n /** The peer id whose profile was injected. */\n peerId: string;\n /**\n * Number of profile fields included after the `peerProfileRecallMaxFields`\n * cap was applied. Zero means the profile existed but had no fields.\n */\n fieldsInjected: number;\n}\n\n/**\n * The unified X-ray snapshot. CLI, HTTP, and MCP surfaces all render\n * this same shape through the shared renderer (CLAUDE.md rule 22).\n */\nexport interface RecallXraySnapshot {\n /** Stable v1 tag so downstream consumers can version-gate their parsers. */\n schemaVersion: \"1\";\n query: string;\n /** UUID minted per capture; unique across snapshots within a process. */\n snapshotId: string;\n /** Epoch milliseconds the snapshot was captured. */\n capturedAt: number;\n /**\n * Tier-explain block from issue #518, carried verbatim when present.\n * `null` means direct-answer tier did not run (disabled, or another\n * tier served the query).\n */\n tierExplain: RecallTierExplain | null;\n results: RecallXrayResult[];\n filters: RecallFilterTrace[];\n /**\n * Character budget accounting for the final assembled recall payload.\n * `used` is the rendered-context length; `chars` is the cap. Both are\n * non-negative integers in `[0, 2**31)`.\n */\n budget: { chars: number; used: number };\n /** Optional session-scope fields carried for downstream filtering. */\n sessionKey?: string;\n namespace?: string;\n traceId?: string;\n /**\n * Peer-profile injection metadata (issue #679 completion).\n * Non-null when `peerProfileRecallEnabled` is true and a peer profile\n * was successfully injected into this recall's context. `null` (or\n * absent) means no peer profile was injected.\n */\n peerProfileInjection?: RecallXrayPeerProfileInjection | null;\n}\n\n// ─── Builder ──────────────────────────────────────────────────────────────\n\nexport interface BuildXraySnapshotInput {\n query: string;\n tierExplain?: RecallTierExplain | null;\n results?: RecallXrayResult[];\n filters?: RecallFilterTrace[];\n budget?: { chars?: number; used?: number };\n sessionKey?: string;\n namespace?: string;\n traceId?: string;\n /** Peer-profile injection metadata (issue #679 completion). */\n peerProfileInjection?: RecallXrayPeerProfileInjection | null;\n /** Optional injected timestamp for deterministic tests. */\n now?: () => number;\n /** Optional injected id generator for deterministic tests. */\n snapshotIdGenerator?: () => string;\n}\n\n/**\n * Build a `RecallXraySnapshot` from explicit input fields. Pure\n * function; safe to call from anywhere. All array/object inputs are\n * shallow-copied so caller mutation after build cannot tear the\n * returned snapshot.\n */\nexport function buildXraySnapshot(\n input: BuildXraySnapshotInput,\n): RecallXraySnapshot {\n const now = input.now ?? Date.now;\n const snapshotIdGenerator = input.snapshotIdGenerator ?? randomUUID;\n\n const results = Array.isArray(input.results)\n ? input.results.map(cloneResult)\n : [];\n const filters = Array.isArray(input.filters)\n ? input.filters.map(cloneFilter)\n : [];\n\n const budgetChars = nonNegativeInt(input.budget?.chars);\n const budgetUsed = nonNegativeInt(input.budget?.used);\n\n const tierExplain =\n input.tierExplain && typeof input.tierExplain === \"object\"\n ? cloneTierExplain(input.tierExplain)\n : null;\n\n // Peer-profile injection annotation (issue #679 completion).\n // Deep-copy via structuredClone so the caller can't mutate the snapshot\n // after build. Accept null explicitly (no injection) or a valid object.\n let peerProfileInjection: RecallXrayPeerProfileInjection | null | undefined;\n if (input.peerProfileInjection && typeof input.peerProfileInjection === \"object\") {\n const raw = input.peerProfileInjection;\n const peerId = nonEmptyString(raw.peerId);\n if (peerId !== undefined) {\n peerProfileInjection = {\n peerId,\n fieldsInjected: nonNegativeInt(raw.fieldsInjected),\n };\n }\n } else if (input.peerProfileInjection === null) {\n peerProfileInjection = null;\n }\n\n const out: RecallXraySnapshot = {\n schemaVersion: \"1\",\n query: typeof input.query === \"string\" ? input.query : \"\",\n snapshotId: snapshotIdGenerator(),\n capturedAt: now(),\n tierExplain,\n results,\n filters,\n budget: { chars: budgetChars, used: budgetUsed },\n sessionKey: nonEmptyString(input.sessionKey),\n namespace: nonEmptyString(input.namespace),\n traceId: nonEmptyString(input.traceId),\n };\n if (peerProfileInjection !== undefined) {\n out.peerProfileInjection = peerProfileInjection;\n }\n return out;\n}\n\n/**\n * Mutable builder used by the orchestrator to accumulate X-ray fields\n * as recall progresses. Call `build()` to get the finalized\n * immutable-ish snapshot. All inputs are validated at insert time so\n * a malformed entry cannot poison the snapshot later.\n */\nexport class RecallXrayBuilder {\n private readonly query: string;\n private readonly sessionKey: string | undefined;\n private namespace: string | undefined;\n private traceId: string | undefined;\n private tierExplain: RecallTierExplain | null = null;\n private readonly results: RecallXrayResult[] = [];\n private readonly filters: RecallFilterTrace[] = [];\n private budgetChars = 0;\n private budgetUsed = 0;\n private peerProfileInjection: RecallXrayPeerProfileInjection | null | undefined;\n\n constructor(opts: {\n query: string;\n sessionKey?: string;\n namespace?: string;\n traceId?: string;\n }) {\n this.query = typeof opts.query === \"string\" ? opts.query : \"\";\n this.sessionKey = nonEmptyString(opts.sessionKey);\n this.namespace = nonEmptyString(opts.namespace);\n this.traceId = nonEmptyString(opts.traceId);\n }\n\n setNamespace(namespace: string | undefined): void {\n this.namespace = nonEmptyString(namespace);\n }\n\n setTraceId(traceId: string | undefined): void {\n this.traceId = nonEmptyString(traceId);\n }\n\n setTierExplain(tierExplain: RecallTierExplain | null | undefined): void {\n this.tierExplain =\n tierExplain && typeof tierExplain === \"object\"\n ? cloneTierExplain(tierExplain)\n : null;\n }\n\n setBudget(budget: { chars?: number; used?: number }): void {\n this.budgetChars = nonNegativeInt(budget.chars);\n this.budgetUsed = nonNegativeInt(budget.used);\n }\n\n /**\n * Record peer-profile injection metadata for this recall snapshot\n * (issue #679 completion). Pass `null` to explicitly record that no\n * injection happened (feature enabled but no peer / no profile fields).\n */\n setPeerProfileInjection(\n injection: RecallXrayPeerProfileInjection | null,\n ): void {\n this.peerProfileInjection = injection;\n }\n\n recordResult(result: RecallXrayResult): void {\n this.results.push(cloneResult(result));\n }\n\n recordFilter(filter: RecallFilterTrace): void {\n this.filters.push(cloneFilter(filter));\n }\n\n build(opts: {\n now?: () => number;\n snapshotIdGenerator?: () => string;\n } = {}): RecallXraySnapshot {\n return buildXraySnapshot({\n query: this.query,\n tierExplain: this.tierExplain,\n results: this.results,\n filters: this.filters,\n budget: { chars: this.budgetChars, used: this.budgetUsed },\n sessionKey: this.sessionKey,\n namespace: this.namespace,\n traceId: this.traceId,\n peerProfileInjection: this.peerProfileInjection,\n now: opts.now,\n snapshotIdGenerator: opts.snapshotIdGenerator,\n });\n }\n}\n\n// ─── Internals ────────────────────────────────────────────────────────────\n\nfunction cloneResult(result: RecallXrayResult): RecallXrayResult {\n if (!result || typeof result !== \"object\") {\n throw new TypeError(\"RecallXrayResult must be an object\");\n }\n if (!isRecallXrayServedBy(result.servedBy)) {\n throw new TypeError(\n `RecallXrayResult.servedBy must be one of ${RECALL_XRAY_SERVED_BY_VALUES.join(\n \", \",\n )}; got ${JSON.stringify(result.servedBy)}`,\n );\n }\n const memoryId = typeof result.memoryId === \"string\" ? result.memoryId : \"\";\n const path = typeof result.path === \"string\" ? result.path : \"\";\n const admittedBy = Array.isArray(result.admittedBy)\n ? result.admittedBy.filter((x): x is string => typeof x === \"string\")\n : [];\n const graphPath = Array.isArray(result.graphPath)\n ? result.graphPath.filter((x): x is string => typeof x === \"string\")\n : undefined;\n // Issue #681 PR 3/3 — per-edge confidences alongside graph path.\n // Each entry is clamped into [0, 1]; the array is rejected wholesale\n // when alignment cannot be verified so downstream surfaces can rely\n // on `graphEdgeConfidences[i]` describing the edge between\n // `graphPath[i]` and `graphPath[i+1]`.\n //\n // Cursor review (#735): the input array length MUST match\n // `graphPath.length - 1` *before* any per-element filtering. The\n // earlier implementation skipped non-finite entries via `continue`\n // and then length-checked the cleaned array — that would silently\n // shift surviving values to earlier positions. Example: input\n // `[0.5, NaN, 0.7]` for a 3-edge path would collapse to\n // `[0.5, 0.7]`, length-check would pass against `expected = 2`, and\n // the renderer would mis-attribute `0.7` to edge B→C when it really\n // came from edge C→D. Reject on either size mismatch or any\n // non-finite entry so misalignment is impossible.\n let graphEdgeConfidences: number[] | undefined;\n if (Array.isArray(result.graphEdgeConfidences) && graphPath && graphPath.length > 1) {\n const expected = graphPath.length - 1;\n const raw = result.graphEdgeConfidences;\n if (raw.length === expected) {\n const cleaned: number[] = [];\n let allFinite = true;\n for (const value of raw) {\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n allFinite = false;\n break;\n }\n cleaned.push(Math.min(1, Math.max(0, value)));\n }\n if (allFinite) {\n graphEdgeConfidences = cleaned;\n }\n }\n }\n const auditEntryId = nonEmptyString(result.auditEntryId);\n const rejectedBy = nonEmptyString(result.rejectedBy);\n const scoreDecomposition = cloneScoreDecomposition(result.scoreDecomposition);\n const out: RecallXrayResult = {\n memoryId,\n path,\n servedBy: result.servedBy,\n scoreDecomposition,\n admittedBy,\n };\n if (graphPath !== undefined) out.graphPath = graphPath;\n if (graphEdgeConfidences !== undefined) {\n out.graphEdgeConfidences = graphEdgeConfidences;\n }\n if (auditEntryId !== undefined) out.auditEntryId = auditEntryId;\n if (rejectedBy !== undefined) out.rejectedBy = rejectedBy;\n // Disclosure + token telemetry (issue #677 PR 3/4). Only attach when\n // present and well-formed; unknown disclosure values are dropped so a\n // bad caller can't poison downstream renderers. Uses the shared\n // `isRecallDisclosure` guard so adding a fourth disclosure level\n // requires touching only `types.ts`.\n if (isRecallDisclosure(result.disclosure)) {\n out.disclosure = result.disclosure;\n }\n if (\n typeof result.estimatedTokens === \"number\" &&\n Number.isFinite(result.estimatedTokens) &&\n result.estimatedTokens >= 0\n ) {\n out.estimatedTokens = Math.floor(result.estimatedTokens);\n }\n // Tags from frontmatter (issue #689 PR 3/3). Normalize identically to\n // the recall-surface path: trim and drop empty strings so consumers can\n // compare tags directly without a secondary normalization step.\n if (Array.isArray(result.tags)) {\n const cleanedTags = result.tags\n .filter((t): t is string => typeof t === \"string\")\n .map((t) => t.trim())\n .filter((t) => t.length > 0);\n if (cleanedTags.length > 0) {\n out.tags = cleanedTags;\n }\n }\n return out;\n}\n\n/**\n * Summarize per-disclosure token spend across an X-ray snapshot's\n * results. Pure helper — used by the markdown renderer to print a\n * \"per-disclosure token spend\" line and exposed for tests / surfaces.\n */\nexport function summarizeDisclosureTokens(\n results: ReadonlyArray<RecallXrayResult>,\n): RecallXrayDisclosureSummary {\n const summary: RecallXrayDisclosureSummary = {\n chunk: { count: 0, estimatedTokens: 0 },\n section: { count: 0, estimatedTokens: 0 },\n raw: { count: 0, estimatedTokens: 0 },\n unspecified: { count: 0, estimatedTokens: 0 },\n };\n for (const result of results) {\n const tokens =\n typeof result.estimatedTokens === \"number\" &&\n Number.isFinite(result.estimatedTokens) &&\n result.estimatedTokens >= 0\n ? Math.floor(result.estimatedTokens)\n : 0;\n const bucket = isRecallDisclosure(result.disclosure)\n ? result.disclosure\n : \"unspecified\";\n summary[bucket].count += 1;\n summary[bucket].estimatedTokens += tokens;\n }\n return summary;\n}\n\nfunction cloneFilter(filter: RecallFilterTrace): RecallFilterTrace {\n if (!filter || typeof filter !== \"object\") {\n throw new TypeError(\"RecallFilterTrace must be an object\");\n }\n const out: RecallFilterTrace = {\n name: typeof filter.name === \"string\" ? filter.name : \"\",\n considered: nonNegativeInt(filter.considered),\n admitted: nonNegativeInt(filter.admitted),\n };\n const reason = nonEmptyString(filter.reason);\n if (reason !== undefined) out.reason = reason;\n return out;\n}\n\nfunction cloneScoreDecomposition(\n value: RecallXrayScoreDecomposition | undefined,\n): RecallXrayScoreDecomposition {\n if (!value || typeof value !== \"object\") {\n return { final: 0 };\n }\n const out: RecallXrayScoreDecomposition = {\n final: finiteNumber(value.final) ?? 0,\n };\n const vector = finiteNumber(value.vector);\n if (vector !== undefined) out.vector = vector;\n const bm25 = finiteNumber(value.bm25);\n if (bm25 !== undefined) out.bm25 = bm25;\n const importance = finiteNumber(value.importance);\n if (importance !== undefined) out.importance = importance;\n const mmrPenalty = finiteNumber(value.mmrPenalty);\n if (mmrPenalty !== undefined) out.mmrPenalty = mmrPenalty;\n const tierPrior = finiteNumber(value.tierPrior);\n if (tierPrior !== undefined) out.tierPrior = tierPrior;\n const reinforcementBoost = finiteNumber(value.reinforcementBoost);\n if (reinforcementBoost !== undefined && reinforcementBoost > 0) {\n out.reinforcementBoost = reinforcementBoost;\n }\n return out;\n}\n\nfunction cloneTierExplain(tierExplain: RecallTierExplain): RecallTierExplain {\n // Use structuredClone so future RecallTierExplain additions do not\n // silently share references through hand-enumerated fields. The\n // payload is JSON-shaped.\n return structuredClone(tierExplain);\n}\n\nfunction nonNegativeInt(value: unknown): number {\n if (typeof value !== \"number\" || !Number.isFinite(value)) return 0;\n if (value <= 0) return 0;\n return Math.floor(value);\n}\n\nfunction finiteNumber(value: unknown): number | undefined {\n if (typeof value !== \"number\" || !Number.isFinite(value)) return undefined;\n return value;\n}\n\nfunction nonEmptyString(value: unknown): string | undefined {\n if (typeof value !== \"string\") return undefined;\n const trimmed = value.trim();\n if (trimmed.length === 0) return undefined;\n return trimmed;\n}\n"],"mappings":";;;;;AAmBA,SAAS,kBAAkB;AAapB,SAAS,qBAAqB,MAAyC;AAC5E,MAAI,OAAO,SAAS,YAAY,KAAK,WAAW,EAAG,QAAO;AAC1D,SAAO,KAAK,KAAK,KAAK,SAAS,CAAC;AAClC;AAkCO,IAAM,+BAA8D;AAAA,EACzE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,qBACd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