@fgv/ts-agent-memory 5.1.0-47 → 5.1.0-49

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 (376) hide show
  1. package/dist/packlets/ingest/orchestrator.js +11 -1
  2. package/dist/packlets/ingest/orchestrator.js.map +1 -1
  3. package/dist/packlets/observe/memoryObservationStore.js +6 -0
  4. package/dist/packlets/observe/memoryObservationStore.js.map +1 -1
  5. package/dist/packlets/observe/observer.js.map +1 -1
  6. package/dist/packlets/retrieve/linkTraversalRetriever.js +1 -1
  7. package/dist/packlets/retrieve/linkTraversalRetriever.js.map +1 -1
  8. package/dist/packlets/retrieve/recencyRetriever.js +1 -1
  9. package/dist/packlets/retrieve/recencyRetriever.js.map +1 -1
  10. package/dist/packlets/retrieve/retriever.js +11 -5
  11. package/dist/packlets/retrieve/retriever.js.map +1 -1
  12. package/dist/packlets/retrieve/structuredFilterRetriever.js +27 -5
  13. package/dist/packlets/retrieve/structuredFilterRetriever.js.map +1 -1
  14. package/dist/packlets/retrieve/tagRetriever.js +1 -1
  15. package/dist/packlets/retrieve/tagRetriever.js.map +1 -1
  16. package/dist/packlets/retrieve/temporalRetrievers.js +1 -1
  17. package/dist/packlets/retrieve/temporalRetrievers.js.map +1 -1
  18. package/dist/packlets/store/fileTreeMemoryStore.js +152 -132
  19. package/dist/packlets/store/fileTreeMemoryStore.js.map +1 -1
  20. package/dist/packlets/store/vectorMaintenance.js +251 -0
  21. package/dist/packlets/store/vectorMaintenance.js.map +1 -0
  22. package/dist/packlets/types/envelope.js.map +1 -1
  23. package/dist/packlets/vector/inMemoryCosineIndex.js +81 -18
  24. package/dist/packlets/vector/inMemoryCosineIndex.js.map +1 -1
  25. package/dist/packlets/vector/inMemoryFragmentCosineIndex.js +7 -0
  26. package/dist/packlets/vector/inMemoryFragmentCosineIndex.js.map +1 -1
  27. package/dist/packlets/vector/vectorIndex.js.map +1 -1
  28. package/dist/ts-agent-memory.d.ts +431 -79
  29. package/lib/packlets/ingest/orchestrator.d.ts.map +1 -1
  30. package/lib/packlets/ingest/orchestrator.js +11 -1
  31. package/lib/packlets/ingest/orchestrator.js.map +1 -1
  32. package/lib/packlets/observe/memoryObservationStore.d.ts.map +1 -1
  33. package/lib/packlets/observe/memoryObservationStore.js +6 -0
  34. package/lib/packlets/observe/memoryObservationStore.js.map +1 -1
  35. package/lib/packlets/observe/observer.d.ts +61 -0
  36. package/lib/packlets/observe/observer.d.ts.map +1 -1
  37. package/lib/packlets/observe/observer.js.map +1 -1
  38. package/lib/packlets/retrieve/linkTraversalRetriever.d.ts +1 -1
  39. package/lib/packlets/retrieve/linkTraversalRetriever.js +1 -1
  40. package/lib/packlets/retrieve/linkTraversalRetriever.js.map +1 -1
  41. package/lib/packlets/retrieve/recencyRetriever.d.ts +1 -1
  42. package/lib/packlets/retrieve/recencyRetriever.js +1 -1
  43. package/lib/packlets/retrieve/recencyRetriever.js.map +1 -1
  44. package/lib/packlets/retrieve/retriever.d.ts +26 -7
  45. package/lib/packlets/retrieve/retriever.d.ts.map +1 -1
  46. package/lib/packlets/retrieve/retriever.js +11 -5
  47. package/lib/packlets/retrieve/retriever.js.map +1 -1
  48. package/lib/packlets/retrieve/structuredFilterRetriever.d.ts +26 -4
  49. package/lib/packlets/retrieve/structuredFilterRetriever.d.ts.map +1 -1
  50. package/lib/packlets/retrieve/structuredFilterRetriever.js +27 -5
  51. package/lib/packlets/retrieve/structuredFilterRetriever.js.map +1 -1
  52. package/lib/packlets/retrieve/tagRetriever.d.ts +1 -1
  53. package/lib/packlets/retrieve/tagRetriever.js +1 -1
  54. package/lib/packlets/retrieve/tagRetriever.js.map +1 -1
  55. package/lib/packlets/retrieve/temporalRetrievers.js +1 -1
  56. package/lib/packlets/retrieve/temporalRetrievers.js.map +1 -1
  57. package/lib/packlets/store/fileTreeMemoryStore.d.ts +135 -59
  58. package/lib/packlets/store/fileTreeMemoryStore.d.ts.map +1 -1
  59. package/lib/packlets/store/fileTreeMemoryStore.js +151 -131
  60. package/lib/packlets/store/fileTreeMemoryStore.js.map +1 -1
  61. package/lib/packlets/store/vectorMaintenance.d.ts +149 -0
  62. package/lib/packlets/store/vectorMaintenance.d.ts.map +1 -0
  63. package/lib/packlets/store/vectorMaintenance.js +255 -0
  64. package/lib/packlets/store/vectorMaintenance.js.map +1 -0
  65. package/lib/packlets/types/envelope.d.ts +11 -0
  66. package/lib/packlets/types/envelope.d.ts.map +1 -1
  67. package/lib/packlets/types/envelope.js.map +1 -1
  68. package/lib/packlets/vector/inMemoryCosineIndex.d.ts +30 -7
  69. package/lib/packlets/vector/inMemoryCosineIndex.d.ts.map +1 -1
  70. package/lib/packlets/vector/inMemoryCosineIndex.js +80 -17
  71. package/lib/packlets/vector/inMemoryCosineIndex.js.map +1 -1
  72. package/lib/packlets/vector/inMemoryFragmentCosineIndex.d.ts +7 -0
  73. package/lib/packlets/vector/inMemoryFragmentCosineIndex.d.ts.map +1 -1
  74. package/lib/packlets/vector/inMemoryFragmentCosineIndex.js +7 -0
  75. package/lib/packlets/vector/inMemoryFragmentCosineIndex.js.map +1 -1
  76. package/lib/packlets/vector/vectorIndex.d.ts +129 -1
  77. package/lib/packlets/vector/vectorIndex.d.ts.map +1 -1
  78. package/lib/packlets/vector/vectorIndex.js.map +1 -1
  79. package/package.json +17 -7
  80. package/.rush/temp/5667e36f1c0cc503a5c20a3ebff76e7b9a702d41.tar.log +0 -468
  81. package/.rush/temp/chunked-rush-logs/ts-agent-memory.build.chunks.jsonl +0 -9
  82. package/.rush/temp/operation/build/all.log +0 -9
  83. package/.rush/temp/operation/build/log-chunks.jsonl +0 -9
  84. package/.rush/temp/operation/build/state.json +0 -3
  85. package/.rush/temp/shrinkwrap-deps.json +0 -689
  86. package/config/api-extractor.json +0 -343
  87. package/config/jest.config.json +0 -14
  88. package/config/rig.json +0 -4
  89. package/dist/test/unit/converters/antagonistRoundTrip.test.js +0 -95
  90. package/dist/test/unit/converters/antagonistRoundTrip.test.js.map +0 -1
  91. package/dist/test/unit/converters/bodyConverterRegistry.test.js +0 -72
  92. package/dist/test/unit/converters/bodyConverterRegistry.test.js.map +0 -1
  93. package/dist/test/unit/converters/envelopeConverter.test.js +0 -313
  94. package/dist/test/unit/converters/envelopeConverter.test.js.map +0 -1
  95. package/dist/test/unit/index/memoryIndex.test.js +0 -214
  96. package/dist/test/unit/index/memoryIndex.test.js.map +0 -1
  97. package/dist/test/unit/ingest/antagonistCycleAndParity.test.js +0 -277
  98. package/dist/test/unit/ingest/antagonistCycleAndParity.test.js.map +0 -1
  99. package/dist/test/unit/ingest/cycleGuard.test.js +0 -81
  100. package/dist/test/unit/ingest/cycleGuard.test.js.map +0 -1
  101. package/dist/test/unit/ingest/dedupScope.test.js +0 -434
  102. package/dist/test/unit/ingest/dedupScope.test.js.map +0 -1
  103. package/dist/test/unit/ingest/orchestrator.test.js +0 -1058
  104. package/dist/test/unit/ingest/orchestrator.test.js.map +0 -1
  105. package/dist/test/unit/observe/memoryObservationStore.test.js +0 -118
  106. package/dist/test/unit/observe/memoryObservationStore.test.js.map +0 -1
  107. package/dist/test/unit/retrieve/fragmentSemanticRetriever.test.js +0 -116
  108. package/dist/test/unit/retrieve/fragmentSemanticRetriever.test.js.map +0 -1
  109. package/dist/test/unit/retrieve/linkTraversalRetriever.test.js +0 -257
  110. package/dist/test/unit/retrieve/linkTraversalRetriever.test.js.map +0 -1
  111. package/dist/test/unit/retrieve/retrievers.test.js +0 -768
  112. package/dist/test/unit/retrieve/retrievers.test.js.map +0 -1
  113. package/dist/test/unit/retrieve/temporalRetrievers.test.js +0 -182
  114. package/dist/test/unit/retrieve/temporalRetrievers.test.js.map +0 -1
  115. package/dist/test/unit/store/antagonistTemporalBoundary.test.js +0 -120
  116. package/dist/test/unit/store/antagonistTemporalBoundary.test.js.map +0 -1
  117. package/dist/test/unit/store/embedOnWrite.test.js +0 -317
  118. package/dist/test/unit/store/embedOnWrite.test.js.map +0 -1
  119. package/dist/test/unit/store/fileTreeMemoryStore.test.js +0 -778
  120. package/dist/test/unit/store/fileTreeMemoryStore.test.js.map +0 -1
  121. package/dist/test/unit/store/fragmentEmbedOnWrite.test.js +0 -255
  122. package/dist/test/unit/store/fragmentEmbedOnWrite.test.js.map +0 -1
  123. package/dist/test/unit/store/indexInjection.test.js +0 -432
  124. package/dist/test/unit/store/indexInjection.test.js.map +0 -1
  125. package/dist/test/unit/store/lenientOpen.test.js +0 -248
  126. package/dist/test/unit/store/lenientOpen.test.js.map +0 -1
  127. package/dist/test/unit/store/listScoped.test.js +0 -109
  128. package/dist/test/unit/store/listScoped.test.js.map +0 -1
  129. package/dist/test/unit/store/observations.test.js +0 -239
  130. package/dist/test/unit/store/observations.test.js.map +0 -1
  131. package/dist/test/unit/store/rankAxis.test.js +0 -254
  132. package/dist/test/unit/store/rankAxis.test.js.map +0 -1
  133. package/dist/test/unit/store/scopeEncoding.test.js +0 -24
  134. package/dist/test/unit/store/scopeEncoding.test.js.map +0 -1
  135. package/dist/test/unit/store/temporalStore.test.js +0 -398
  136. package/dist/test/unit/store/temporalStore.test.js.map +0 -1
  137. package/dist/test/unit/tools/memoryTools.test.js +0 -842
  138. package/dist/test/unit/tools/memoryTools.test.js.map +0 -1
  139. package/dist/test/unit/types/identityCodec.test.js +0 -187
  140. package/dist/test/unit/types/identityCodec.test.js.map +0 -1
  141. package/dist/test/unit/types/ids.test.js +0 -84
  142. package/dist/test/unit/types/ids.test.js.map +0 -1
  143. package/dist/test/unit/types/temporalCodec.test.js +0 -203
  144. package/dist/test/unit/types/temporalCodec.test.js.map +0 -1
  145. package/dist/test/unit/types/temporalPolicy.test.js +0 -83
  146. package/dist/test/unit/types/temporalPolicy.test.js.map +0 -1
  147. package/dist/test/unit/types/writePolicy.test.js +0 -331
  148. package/dist/test/unit/types/writePolicy.test.js.map +0 -1
  149. package/dist/test/unit/vector/fragmentConverters.test.js +0 -58
  150. package/dist/test/unit/vector/fragmentConverters.test.js.map +0 -1
  151. package/dist/test/unit/vector/inMemoryCosineIndex.test.js +0 -252
  152. package/dist/test/unit/vector/inMemoryCosineIndex.test.js.map +0 -1
  153. package/dist/test/unit/vector/inMemoryFragmentCosineIndex.test.js +0 -362
  154. package/dist/test/unit/vector/inMemoryFragmentCosineIndex.test.js.map +0 -1
  155. package/dist/test/unit/vector/vectorIndex.test.js +0 -51
  156. package/dist/test/unit/vector/vectorIndex.test.js.map +0 -1
  157. package/eslint.config.js +0 -15
  158. package/etc/ts-agent-memory.api.md +0 -940
  159. package/lib/test/unit/converters/antagonistRoundTrip.test.d.ts +0 -10
  160. package/lib/test/unit/converters/antagonistRoundTrip.test.d.ts.map +0 -1
  161. package/lib/test/unit/converters/antagonistRoundTrip.test.js +0 -97
  162. package/lib/test/unit/converters/antagonistRoundTrip.test.js.map +0 -1
  163. package/lib/test/unit/converters/bodyConverterRegistry.test.d.ts +0 -2
  164. package/lib/test/unit/converters/bodyConverterRegistry.test.d.ts.map +0 -1
  165. package/lib/test/unit/converters/bodyConverterRegistry.test.js +0 -74
  166. package/lib/test/unit/converters/bodyConverterRegistry.test.js.map +0 -1
  167. package/lib/test/unit/converters/envelopeConverter.test.d.ts +0 -2
  168. package/lib/test/unit/converters/envelopeConverter.test.d.ts.map +0 -1
  169. package/lib/test/unit/converters/envelopeConverter.test.js +0 -315
  170. package/lib/test/unit/converters/envelopeConverter.test.js.map +0 -1
  171. package/lib/test/unit/index/memoryIndex.test.d.ts +0 -2
  172. package/lib/test/unit/index/memoryIndex.test.d.ts.map +0 -1
  173. package/lib/test/unit/index/memoryIndex.test.js +0 -216
  174. package/lib/test/unit/index/memoryIndex.test.js.map +0 -1
  175. package/lib/test/unit/ingest/antagonistCycleAndParity.test.d.ts +0 -9
  176. package/lib/test/unit/ingest/antagonistCycleAndParity.test.d.ts.map +0 -1
  177. package/lib/test/unit/ingest/antagonistCycleAndParity.test.js +0 -279
  178. package/lib/test/unit/ingest/antagonistCycleAndParity.test.js.map +0 -1
  179. package/lib/test/unit/ingest/cycleGuard.test.d.ts +0 -2
  180. package/lib/test/unit/ingest/cycleGuard.test.d.ts.map +0 -1
  181. package/lib/test/unit/ingest/cycleGuard.test.js +0 -83
  182. package/lib/test/unit/ingest/cycleGuard.test.js.map +0 -1
  183. package/lib/test/unit/ingest/dedupScope.test.d.ts +0 -2
  184. package/lib/test/unit/ingest/dedupScope.test.d.ts.map +0 -1
  185. package/lib/test/unit/ingest/dedupScope.test.js +0 -436
  186. package/lib/test/unit/ingest/dedupScope.test.js.map +0 -1
  187. package/lib/test/unit/ingest/orchestrator.test.d.ts +0 -2
  188. package/lib/test/unit/ingest/orchestrator.test.d.ts.map +0 -1
  189. package/lib/test/unit/ingest/orchestrator.test.js +0 -1060
  190. package/lib/test/unit/ingest/orchestrator.test.js.map +0 -1
  191. package/lib/test/unit/observe/memoryObservationStore.test.d.ts +0 -2
  192. package/lib/test/unit/observe/memoryObservationStore.test.d.ts.map +0 -1
  193. package/lib/test/unit/observe/memoryObservationStore.test.js +0 -120
  194. package/lib/test/unit/observe/memoryObservationStore.test.js.map +0 -1
  195. package/lib/test/unit/retrieve/fragmentSemanticRetriever.test.d.ts +0 -2
  196. package/lib/test/unit/retrieve/fragmentSemanticRetriever.test.d.ts.map +0 -1
  197. package/lib/test/unit/retrieve/fragmentSemanticRetriever.test.js +0 -118
  198. package/lib/test/unit/retrieve/fragmentSemanticRetriever.test.js.map +0 -1
  199. package/lib/test/unit/retrieve/linkTraversalRetriever.test.d.ts +0 -2
  200. package/lib/test/unit/retrieve/linkTraversalRetriever.test.d.ts.map +0 -1
  201. package/lib/test/unit/retrieve/linkTraversalRetriever.test.js +0 -259
  202. package/lib/test/unit/retrieve/linkTraversalRetriever.test.js.map +0 -1
  203. package/lib/test/unit/retrieve/retrievers.test.d.ts +0 -2
  204. package/lib/test/unit/retrieve/retrievers.test.d.ts.map +0 -1
  205. package/lib/test/unit/retrieve/retrievers.test.js +0 -770
  206. package/lib/test/unit/retrieve/retrievers.test.js.map +0 -1
  207. package/lib/test/unit/retrieve/temporalRetrievers.test.d.ts +0 -2
  208. package/lib/test/unit/retrieve/temporalRetrievers.test.d.ts.map +0 -1
  209. package/lib/test/unit/retrieve/temporalRetrievers.test.js +0 -184
  210. package/lib/test/unit/retrieve/temporalRetrievers.test.js.map +0 -1
  211. package/lib/test/unit/store/antagonistTemporalBoundary.test.d.ts +0 -9
  212. package/lib/test/unit/store/antagonistTemporalBoundary.test.d.ts.map +0 -1
  213. package/lib/test/unit/store/antagonistTemporalBoundary.test.js +0 -122
  214. package/lib/test/unit/store/antagonistTemporalBoundary.test.js.map +0 -1
  215. package/lib/test/unit/store/embedOnWrite.test.d.ts +0 -2
  216. package/lib/test/unit/store/embedOnWrite.test.d.ts.map +0 -1
  217. package/lib/test/unit/store/embedOnWrite.test.js +0 -319
  218. package/lib/test/unit/store/embedOnWrite.test.js.map +0 -1
  219. package/lib/test/unit/store/fileTreeMemoryStore.test.d.ts +0 -2
  220. package/lib/test/unit/store/fileTreeMemoryStore.test.d.ts.map +0 -1
  221. package/lib/test/unit/store/fileTreeMemoryStore.test.js +0 -780
  222. package/lib/test/unit/store/fileTreeMemoryStore.test.js.map +0 -1
  223. package/lib/test/unit/store/fragmentEmbedOnWrite.test.d.ts +0 -2
  224. package/lib/test/unit/store/fragmentEmbedOnWrite.test.d.ts.map +0 -1
  225. package/lib/test/unit/store/fragmentEmbedOnWrite.test.js +0 -257
  226. package/lib/test/unit/store/fragmentEmbedOnWrite.test.js.map +0 -1
  227. package/lib/test/unit/store/indexInjection.test.d.ts +0 -2
  228. package/lib/test/unit/store/indexInjection.test.d.ts.map +0 -1
  229. package/lib/test/unit/store/indexInjection.test.js +0 -434
  230. package/lib/test/unit/store/indexInjection.test.js.map +0 -1
  231. package/lib/test/unit/store/lenientOpen.test.d.ts +0 -2
  232. package/lib/test/unit/store/lenientOpen.test.d.ts.map +0 -1
  233. package/lib/test/unit/store/lenientOpen.test.js +0 -250
  234. package/lib/test/unit/store/lenientOpen.test.js.map +0 -1
  235. package/lib/test/unit/store/listScoped.test.d.ts +0 -2
  236. package/lib/test/unit/store/listScoped.test.d.ts.map +0 -1
  237. package/lib/test/unit/store/listScoped.test.js +0 -111
  238. package/lib/test/unit/store/listScoped.test.js.map +0 -1
  239. package/lib/test/unit/store/observations.test.d.ts +0 -2
  240. package/lib/test/unit/store/observations.test.d.ts.map +0 -1
  241. package/lib/test/unit/store/observations.test.js +0 -241
  242. package/lib/test/unit/store/observations.test.js.map +0 -1
  243. package/lib/test/unit/store/rankAxis.test.d.ts +0 -2
  244. package/lib/test/unit/store/rankAxis.test.d.ts.map +0 -1
  245. package/lib/test/unit/store/rankAxis.test.js +0 -256
  246. package/lib/test/unit/store/rankAxis.test.js.map +0 -1
  247. package/lib/test/unit/store/scopeEncoding.test.d.ts +0 -2
  248. package/lib/test/unit/store/scopeEncoding.test.d.ts.map +0 -1
  249. package/lib/test/unit/store/scopeEncoding.test.js +0 -26
  250. package/lib/test/unit/store/scopeEncoding.test.js.map +0 -1
  251. package/lib/test/unit/store/temporalStore.test.d.ts +0 -2
  252. package/lib/test/unit/store/temporalStore.test.d.ts.map +0 -1
  253. package/lib/test/unit/store/temporalStore.test.js +0 -400
  254. package/lib/test/unit/store/temporalStore.test.js.map +0 -1
  255. package/lib/test/unit/tools/memoryTools.test.d.ts +0 -2
  256. package/lib/test/unit/tools/memoryTools.test.d.ts.map +0 -1
  257. package/lib/test/unit/tools/memoryTools.test.js +0 -844
  258. package/lib/test/unit/tools/memoryTools.test.js.map +0 -1
  259. package/lib/test/unit/types/identityCodec.test.d.ts +0 -2
  260. package/lib/test/unit/types/identityCodec.test.d.ts.map +0 -1
  261. package/lib/test/unit/types/identityCodec.test.js +0 -189
  262. package/lib/test/unit/types/identityCodec.test.js.map +0 -1
  263. package/lib/test/unit/types/ids.test.d.ts +0 -2
  264. package/lib/test/unit/types/ids.test.d.ts.map +0 -1
  265. package/lib/test/unit/types/ids.test.js +0 -86
  266. package/lib/test/unit/types/ids.test.js.map +0 -1
  267. package/lib/test/unit/types/temporalCodec.test.d.ts +0 -2
  268. package/lib/test/unit/types/temporalCodec.test.d.ts.map +0 -1
  269. package/lib/test/unit/types/temporalCodec.test.js +0 -205
  270. package/lib/test/unit/types/temporalCodec.test.js.map +0 -1
  271. package/lib/test/unit/types/temporalPolicy.test.d.ts +0 -2
  272. package/lib/test/unit/types/temporalPolicy.test.d.ts.map +0 -1
  273. package/lib/test/unit/types/temporalPolicy.test.js +0 -85
  274. package/lib/test/unit/types/temporalPolicy.test.js.map +0 -1
  275. package/lib/test/unit/types/writePolicy.test.d.ts +0 -2
  276. package/lib/test/unit/types/writePolicy.test.d.ts.map +0 -1
  277. package/lib/test/unit/types/writePolicy.test.js +0 -333
  278. package/lib/test/unit/types/writePolicy.test.js.map +0 -1
  279. package/lib/test/unit/vector/fragmentConverters.test.d.ts +0 -2
  280. package/lib/test/unit/vector/fragmentConverters.test.d.ts.map +0 -1
  281. package/lib/test/unit/vector/fragmentConverters.test.js +0 -60
  282. package/lib/test/unit/vector/fragmentConverters.test.js.map +0 -1
  283. package/lib/test/unit/vector/inMemoryCosineIndex.test.d.ts +0 -2
  284. package/lib/test/unit/vector/inMemoryCosineIndex.test.d.ts.map +0 -1
  285. package/lib/test/unit/vector/inMemoryCosineIndex.test.js +0 -254
  286. package/lib/test/unit/vector/inMemoryCosineIndex.test.js.map +0 -1
  287. package/lib/test/unit/vector/inMemoryFragmentCosineIndex.test.d.ts +0 -2
  288. package/lib/test/unit/vector/inMemoryFragmentCosineIndex.test.d.ts.map +0 -1
  289. package/lib/test/unit/vector/inMemoryFragmentCosineIndex.test.js +0 -364
  290. package/lib/test/unit/vector/inMemoryFragmentCosineIndex.test.js.map +0 -1
  291. package/lib/test/unit/vector/vectorIndex.test.d.ts +0 -2
  292. package/lib/test/unit/vector/vectorIndex.test.d.ts.map +0 -1
  293. package/lib/test/unit/vector/vectorIndex.test.js +0 -53
  294. package/lib/test/unit/vector/vectorIndex.test.js.map +0 -1
  295. package/rush-logs/ts-agent-memory.build.cache.log +0 -3
  296. package/rush-logs/ts-agent-memory.build.log +0 -9
  297. package/src/index.ts +0 -14
  298. package/src/packlets/converters/bodyConverterRegistry.ts +0 -105
  299. package/src/packlets/converters/envelopeConverter.ts +0 -233
  300. package/src/packlets/converters/index.ts +0 -7
  301. package/src/packlets/index/index.ts +0 -6
  302. package/src/packlets/index/memoryIndex.ts +0 -332
  303. package/src/packlets/ingest/cycleGuard.ts +0 -153
  304. package/src/packlets/ingest/hostStages.ts +0 -111
  305. package/src/packlets/ingest/index.ts +0 -9
  306. package/src/packlets/ingest/model.ts +0 -195
  307. package/src/packlets/ingest/orchestrator.ts +0 -968
  308. package/src/packlets/observe/index.ts +0 -7
  309. package/src/packlets/observe/memoryObservationStore.ts +0 -153
  310. package/src/packlets/observe/observer.ts +0 -119
  311. package/src/packlets/retrieve/fragmentSemanticRetriever.ts +0 -138
  312. package/src/packlets/retrieve/hybridRetriever.ts +0 -194
  313. package/src/packlets/retrieve/index.ts +0 -14
  314. package/src/packlets/retrieve/linkTraversalRetriever.ts +0 -158
  315. package/src/packlets/retrieve/recencyRetriever.ts +0 -54
  316. package/src/packlets/retrieve/retriever.ts +0 -291
  317. package/src/packlets/retrieve/semanticRetriever.ts +0 -152
  318. package/src/packlets/retrieve/structuredFilterRetriever.ts +0 -58
  319. package/src/packlets/retrieve/tagRetriever.ts +0 -58
  320. package/src/packlets/retrieve/temporalRetrievers.ts +0 -210
  321. package/src/packlets/store/fileTreeMemoryStore.ts +0 -1872
  322. package/src/packlets/store/index.ts +0 -7
  323. package/src/packlets/store/scopeEncoding.ts +0 -36
  324. package/src/packlets/tools/index.ts +0 -6
  325. package/src/packlets/tools/memoryTools.ts +0 -706
  326. package/src/packlets/types/envelope.ts +0 -196
  327. package/src/packlets/types/filenameSafety.ts +0 -57
  328. package/src/packlets/types/identityCodec.ts +0 -447
  329. package/src/packlets/types/ids.ts +0 -124
  330. package/src/packlets/types/index.ts +0 -11
  331. package/src/packlets/types/temporal.ts +0 -96
  332. package/src/packlets/types/writePolicy.ts +0 -612
  333. package/src/packlets/vector/fragmentConverters.ts +0 -55
  334. package/src/packlets/vector/inMemoryCosineIndex.ts +0 -196
  335. package/src/packlets/vector/inMemoryFragmentCosineIndex.ts +0 -289
  336. package/src/packlets/vector/index.ts +0 -9
  337. package/src/packlets/vector/vectorIndex.ts +0 -273
  338. package/src/test/unit/converters/antagonistRoundTrip.test.ts +0 -110
  339. package/src/test/unit/converters/bodyConverterRegistry.test.ts +0 -89
  340. package/src/test/unit/converters/envelopeConverter.test.ts +0 -418
  341. package/src/test/unit/index/memoryIndex.test.ts +0 -272
  342. package/src/test/unit/ingest/antagonistCycleAndParity.test.ts +0 -367
  343. package/src/test/unit/ingest/cycleGuard.test.ts +0 -110
  344. package/src/test/unit/ingest/dedupScope.test.ts +0 -542
  345. package/src/test/unit/ingest/orchestrator.test.ts +0 -1355
  346. package/src/test/unit/observe/memoryObservationStore.test.ts +0 -158
  347. package/src/test/unit/retrieve/fragmentSemanticRetriever.test.ts +0 -163
  348. package/src/test/unit/retrieve/linkTraversalRetriever.test.ts +0 -329
  349. package/src/test/unit/retrieve/retrievers.test.ts +0 -1018
  350. package/src/test/unit/retrieve/temporalRetrievers.test.ts +0 -226
  351. package/src/test/unit/store/antagonistTemporalBoundary.test.ts +0 -158
  352. package/src/test/unit/store/embedOnWrite.test.ts +0 -418
  353. package/src/test/unit/store/fileTreeMemoryStore.test.ts +0 -1041
  354. package/src/test/unit/store/fragmentEmbedOnWrite.test.ts +0 -349
  355. package/src/test/unit/store/indexInjection.test.ts +0 -550
  356. package/src/test/unit/store/lenientOpen.test.ts +0 -292
  357. package/src/test/unit/store/listScoped.test.ts +0 -138
  358. package/src/test/unit/store/observations.test.ts +0 -290
  359. package/src/test/unit/store/rankAxis.test.ts +0 -349
  360. package/src/test/unit/store/scopeEncoding.test.ts +0 -37
  361. package/src/test/unit/store/temporalStore.test.ts +0 -469
  362. package/src/test/unit/tools/memoryTools.test.ts +0 -1121
  363. package/src/test/unit/types/identityCodec.test.ts +0 -266
  364. package/src/test/unit/types/ids.test.ts +0 -94
  365. package/src/test/unit/types/temporalCodec.test.ts +0 -259
  366. package/src/test/unit/types/temporalPolicy.test.ts +0 -124
  367. package/src/test/unit/types/writePolicy.test.ts +0 -446
  368. package/src/test/unit/vector/fragmentConverters.test.ts +0 -80
  369. package/src/test/unit/vector/inMemoryCosineIndex.test.ts +0 -318
  370. package/src/test/unit/vector/inMemoryFragmentCosineIndex.test.ts +0 -477
  371. package/src/test/unit/vector/vectorIndex.test.ts +0 -64
  372. package/temp/build/lint/_eslint-5eVG3S6w.json +0 -306
  373. package/temp/build/typescript/ts_8nwakTlr.json +0 -1
  374. package/temp/ts-agent-memory.api.json +0 -21030
  375. package/temp/ts-agent-memory.api.md +0 -940
  376. package/tsconfig.json +0 -8
@@ -1 +0,0 @@
1
- {"version":3,"file":"cycleGuard.test.d.ts","sourceRoot":"","sources":["../../../../src/test/unit/ingest/cycleGuard.test.ts"],"names":[],"mappings":"AAKA,OAAO,oBAAoB,CAAC"}
@@ -1,83 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2026 Erik Fortune
4
- * SPDX-License-Identifier: MIT
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- require("@fgv/ts-utils-jest");
8
- const index_1 = require("../../../index");
9
- const rel = 'rel';
10
- const DEFAULT_SCOPE = 'exp';
11
- /** A scope-qualified node, `scope#id` or a bare id defaulting to {@link DEFAULT_SCOPE}. */
12
- function node(spec) {
13
- const hash = spec.indexOf('#');
14
- const scope = hash >= 0 ? spec.slice(0, hash) : DEFAULT_SCOPE;
15
- const id = hash >= 0 ? spec.slice(hash + 1) : spec;
16
- return { scope: scope, id: id };
17
- }
18
- function edge(source, target, type = rel) {
19
- return { source: node(source), target: node(target), type };
20
- }
21
- describe('buildCycleKey', () => {
22
- test('is deterministic for the same edge', () => {
23
- expect((0, index_1.buildCycleKey)(edge('a', 'b'))).toSucceedAndSatisfy((key) => {
24
- expect((0, index_1.buildCycleKey)(edge('a', 'b'))).toSucceedWith(key);
25
- });
26
- });
27
- test('differs by direction and type', () => {
28
- const forward = (0, index_1.buildCycleKey)(edge('a', 'b')).orThrow();
29
- const reverse = (0, index_1.buildCycleKey)(edge('b', 'a')).orThrow();
30
- const typed = (0, index_1.buildCycleKey)(edge('a', 'b', 'other')).orThrow();
31
- expect(forward).not.toBe(reverse);
32
- expect(forward).not.toBe(typed);
33
- });
34
- });
35
- describe('assertNoCycles', () => {
36
- test('accepts an acyclic graph', () => {
37
- expect((0, index_1.assertNoCycles)([edge('a', 'b')], [edge('b', 'c'), edge('c', 'd')])).toSucceed();
38
- });
39
- test('rejects a proposed edge that closes a cycle against existing edges', () => {
40
- expect((0, index_1.assertNoCycles)([edge('a', 'b'), edge('b', 'c')], [edge('c', 'a')])).toFailWith(/would create a cycle/);
41
- });
42
- test('rejects a cycle formed entirely within the proposed batch', () => {
43
- expect((0, index_1.assertNoCycles)([], [edge('a', 'b'), edge('b', 'a')])).toFailWith(/would create a cycle/);
44
- });
45
- test('rejects a self-loop', () => {
46
- expect((0, index_1.assertNoCycles)([], [edge('a', 'a')])).toFailWith(/self-loop/);
47
- });
48
- test('tolerates a duplicate proposed edge (deduped by canonical key)', () => {
49
- expect((0, index_1.assertNoCycles)([], [edge('a', 'b'), edge('a', 'b')])).toSucceed();
50
- });
51
- test('tolerates a duplicate existing edge', () => {
52
- expect((0, index_1.assertNoCycles)([edge('a', 'b'), edge('a', 'b')], [edge('b', 'c')])).toSucceed();
53
- });
54
- test('accepts a diamond (shared descendant is not a cycle)', () => {
55
- expect((0, index_1.assertNoCycles)([], [edge('a', 'b'), edge('a', 'c'), edge('b', 'd'), edge('c', 'd')])).toSucceed();
56
- });
57
- test('reachability tolerates a frontier node reached by two paths (revisit guard)', () => {
58
- // Existing graph: a->c, a->b, b->c. A proposed edge z->a runs reachability
59
- // from `a`, whose DFS pushes `c` twice before it is visited — exercising the
60
- // visited-node skip in the traversal.
61
- expect((0, index_1.assertNoCycles)([edge('a', 'c'), edge('a', 'b'), edge('b', 'c')], [edge('z', 'a')])).toSucceed();
62
- });
63
- describe('scope-qualified nodes', () => {
64
- test('does NOT conflate a stem shared across scopes into one node', () => {
65
- // ca#x -> cb#y and cb#x -> ca#z reuse the stem `x` across scopes ca/cb.
66
- // If the guard keyed on bare id, the two `x` nodes would merge and a false
67
- // cycle could appear; with scoped keys they are distinct and the graph is acyclic.
68
- expect((0, index_1.assertNoCycles)([], [edge('ca#x', 'cb#y'), edge('cb#x', 'ca#z')])).toSucceed();
69
- });
70
- test('still rejects a genuine within-scope cycle across the same stems', () => {
71
- expect((0, index_1.assertNoCycles)([], [edge('ca#x', 'ca#y'), edge('ca#y', 'ca#x')])).toFailWith(/would create a cycle/);
72
- });
73
- test('a self-loop is detected on the full scoped identity', () => {
74
- expect((0, index_1.assertNoCycles)([], [edge('ca#x', 'ca#x')])).toFailWith(/self-loop/);
75
- // Same stem, different scope is NOT a self-loop.
76
- expect((0, index_1.assertNoCycles)([], [edge('ca#x', 'cb#x')])).toSucceed();
77
- });
78
- test('names the scope in the diagnostic', () => {
79
- expect((0, index_1.assertNoCycles)([], [edge('ca#x', 'ca#x')])).toFailWith(/ca\/x/);
80
- });
81
- });
82
- });
83
- //# sourceMappingURL=cycleGuard.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cycleGuard.test.js","sourceRoot":"","sources":["../../../../src/test/unit/ingest/cycleGuard.test.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,8BAA4B;AAC5B,0CAQwB;AAExB,MAAM,GAAG,GAAa,KAAiB,CAAC;AACxC,MAAM,aAAa,GAAW,KAAK,CAAC;AAEpC,2FAA2F;AAC3F,SAAS,IAAI,CAAC,IAAY;IACxB,MAAM,IAAI,GAAW,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,KAAK,GAAW,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,C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U,CAAC,OAAO,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/*\n * Copyright (c) 2026 Erik Fortune\n * SPDX-License-Identifier: MIT\n */\n\nimport '@fgv/ts-utils-jest';\nimport {\n ICycleGuardEdge,\n IEdgeTarget,\n LinkType,\n MemoryId,\n MemoryScopeKey,\n assertNoCycles,\n buildCycleKey\n} from '../../../index';\n\nconst rel: LinkType = 'rel' as LinkType;\nconst DEFAULT_SCOPE: string = 'exp';\n\n/** A scope-qualified node, `scope#id` or a bare id defaulting to {@link DEFAULT_SCOPE}. */\nfunction node(spec: string): IEdgeTarget {\n const hash: number = spec.indexOf('#');\n const scope: string = hash >= 0 ? spec.slice(0, hash) : DEFAULT_SCOPE;\n const id: string = hash >= 0 ? spec.slice(hash + 1) : spec;\n return { scope: scope as MemoryScopeKey, id: id as MemoryId };\n}\n\nfunction edge(source: string, target: string, type: LinkType = rel): ICycleGuardEdge {\n return { source: node(source), target: node(target), type };\n}\n\ndescribe('buildCycleKey', () => {\n test('is deterministic for the same edge', () => {\n expect(buildCycleKey(edge('a', 'b'))).toSucceedAndSatisfy((key: string) => {\n expect(buildCycleKey(edge('a', 'b'))).toSucceedWith(key);\n });\n });\n\n test('differs by direction and type', () => {\n const forward = buildCycleKey(edge('a', 'b')).orThrow();\n const reverse = buildCycleKey(edge('b', 'a')).orThrow();\n const typed = buildCycleKey(edge('a', 'b', 'other' as LinkType)).orThrow();\n expect(forward).not.toBe(reverse);\n expect(forward).not.toBe(typed);\n });\n});\n\ndescribe('assertNoCycles', () => {\n test('accepts an acyclic graph', () => {\n expect(assertNoCycles([edge('a', 'b')], [edge('b', 'c'), edge('c', 'd')])).toSucceed();\n });\n\n test('rejects a proposed edge that closes a cycle against existing edges', () => {\n expect(assertNoCycles([edge('a', 'b'), edge('b', 'c')], [edge('c', 'a')])).toFailWith(\n /would create a cycle/\n );\n });\n\n test('rejects a cycle formed entirely within the proposed batch', () => {\n expect(assertNoCycles([], [edge('a', 'b'), edge('b', 'a')])).toFailWith(/would create a cycle/);\n });\n\n test('rejects a self-loop', () => {\n expect(assertNoCycles([], [edge('a', 'a')])).toFailWith(/self-loop/);\n });\n\n test('tolerates a duplicate proposed edge (deduped by canonical key)', () => {\n expect(assertNoCycles([], [edge('a', 'b'), edge('a', 'b')])).toSucceed();\n });\n\n test('tolerates a duplicate existing edge', () => {\n expect(assertNoCycles([edge('a', 'b'), edge('a', 'b')], [edge('b', 'c')])).toSucceed();\n });\n\n test('accepts a diamond (shared descendant is not a cycle)', () => {\n expect(assertNoCycles([], [edge('a', 'b'), edge('a', 'c'), edge('b', 'd'), edge('c', 'd')])).toSucceed();\n });\n\n test('reachability tolerates a frontier node reached by two paths (revisit guard)', () => {\n // Existing graph: a->c, a->b, b->c. A proposed edge z->a runs reachability\n // from `a`, whose DFS pushes `c` twice before it is visited — exercising the\n // visited-node skip in the traversal.\n expect(assertNoCycles([edge('a', 'c'), edge('a', 'b'), edge('b', 'c')], [edge('z', 'a')])).toSucceed();\n });\n\n describe('scope-qualified nodes', () => {\n test('does NOT conflate a stem shared across scopes into one node', () => {\n // ca#x -> cb#y and cb#x -> ca#z reuse the stem `x` across scopes ca/cb.\n // If the guard keyed on bare id, the two `x` nodes would merge and a false\n // cycle could appear; with scoped keys they are distinct and the graph is acyclic.\n expect(assertNoCycles([], [edge('ca#x', 'cb#y'), edge('cb#x', 'ca#z')])).toSucceed();\n });\n\n test('still rejects a genuine within-scope cycle across the same stems', () => {\n expect(assertNoCycles([], [edge('ca#x', 'ca#y'), edge('ca#y', 'ca#x')])).toFailWith(\n /would create a cycle/\n );\n });\n\n test('a self-loop is detected on the full scoped identity', () => {\n expect(assertNoCycles([], [edge('ca#x', 'ca#x')])).toFailWith(/self-loop/);\n // Same stem, different scope is NOT a self-loop.\n expect(assertNoCycles([], [edge('ca#x', 'cb#x')])).toSucceed();\n });\n\n test('names the scope in the diagnostic', () => {\n expect(assertNoCycles([], [edge('ca#x', 'ca#x')])).toFailWith(/ca\\/x/);\n });\n });\n});\n"]}
@@ -1,2 +0,0 @@
1
- import '@fgv/ts-utils-jest';
2
- //# sourceMappingURL=dedupScope.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dedupScope.test.d.ts","sourceRoot":"","sources":["../../../../src/test/unit/ingest/dedupScope.test.ts"],"names":[],"mappings":"AAKA,OAAO,oBAAoB,CAAC"}
@@ -1,436 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) 2026 Erik Fortune
4
- * SPDX-License-Identifier: MIT
5
- */
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- require("@fgv/ts-utils-jest");
8
- const ts_utils_1 = require("@fgv/ts-utils");
9
- const ts_json_base_1 = require("@fgv/ts-json-base");
10
- const index_1 = require("../../../index");
11
- // --- kinds --------------------------------------------------------------------
12
- // `mem` is the entity-scoped kind under test: a FLAT (non-versioned) kind whose
13
- // policy declares `dedupScope: 'entity'`. This is the shape the reporter runs —
14
- // an experience family — and the one whose ingest-path behavior this stream fixes.
15
- const memKind = 'mem';
16
- // `doc` is the content-scoped control: cross-id collapse is CORRECT for it and
17
- // must keep working exactly as before.
18
- const docKind = 'doc';
19
- // `claim` is the sibling candidate whose edge points at a collapsed candidate.
20
- // It has no registered policy, so it resolves through the store's DEFAULT policy.
21
- const claimKind = 'claim';
22
- // `turn` is the reporter's LITERAL shape: an MTM kind whose turns share one
23
- // conversation scope and differ only by idStem. This is where the bug bit.
24
- const turnKind = 'turn';
25
- // `evt` is a TEMPORAL entity-scoped kind. TemporalIdentityCodec gives each entity
26
- // its own scope (`<base>/entities/<id>`), so distinct temporal entities were
27
- // already isolated by the scope filter alone — see the test below.
28
- const evtKind = 'evt';
29
- const memScope = index_1.LtmIdentityCodec.scope;
30
- const docScope = index_1.KnowledgeIdentityCodec.scope;
31
- // --- fixtures -----------------------------------------------------------------
32
- const clock = () => 1000;
33
- function mutableRoot() {
34
- const tree = ts_json_base_1.FileTree.inMemory([], { mutable: true }).orThrow();
35
- const root = tree.getDirectory('/').orThrow();
36
- if (!ts_json_base_1.FileTree.isMutableDirectoryItem(root)) {
37
- throw new Error('expected a mutable root directory');
38
- }
39
- return root;
40
- }
41
- function registry() {
42
- const reg = index_1.BodyConverterRegistry.create().orThrow();
43
- reg.register(memKind, ts_utils_1.Converters.string);
44
- reg.register(docKind, ts_utils_1.Converters.string);
45
- reg.register(claimKind, ts_utils_1.Converters.string);
46
- reg.register(turnKind, ts_utils_1.Converters.string);
47
- reg.register(evtKind, ts_utils_1.Converters.string);
48
- return reg;
49
- }
50
- const codecs = new Map([
51
- [memKind, new index_1.LtmIdentityCodec()],
52
- [docKind, new index_1.KnowledgeIdentityCodec()],
53
- [claimKind, new index_1.KnowledgeIdentityCodec()],
54
- [turnKind, new index_1.MtmIdentityCodec()],
55
- [evtKind, index_1.TemporalIdentityCodec.create('events').orThrow()]
56
- ]);
57
- /**
58
- * `mem` declares `'entity'` (the experience family), `doc` declares `'content'`
59
- * (the knowledge family). `claim` is deliberately absent so it exercises the
60
- * store's default-policy fallback.
61
- */
62
- function policies() {
63
- return new Map([
64
- [
65
- memKind,
66
- index_1.MemoryCapCullPolicy.create({
67
- mutableFields: ['body', 'tags', 'links', 'provenance']
68
- }).orThrow()
69
- ],
70
- [docKind, index_1.KnowledgeLwwPolicy.create().orThrow()],
71
- [
72
- turnKind,
73
- index_1.MemoryCapCullPolicy.create({
74
- mutableFields: ['body', 'tags', 'links', 'provenance']
75
- }).orThrow()
76
- ],
77
- [evtKind, index_1.TemporalVersionedPolicy.create().orThrow()]
78
- ]);
79
- }
80
- /** A deterministic embedder: identical bodies embed identically (cosine 1.0). */
81
- const embed = (record) => {
82
- const vec = record.body === 'shared body' ? [1, 0, 0] : [0, 1, 0];
83
- return Promise.resolve((0, ts_utils_1.succeed)(Float32Array.from(vec)));
84
- };
85
- function buildStore(vectorIndex) {
86
- return index_1.FileTreeMemoryStore.create({
87
- root: mutableRoot(),
88
- registry: registry(),
89
- codecs,
90
- writePolicies: policies(),
91
- clock,
92
- vectorIndex,
93
- embed: vectorIndex !== undefined ? embed : undefined
94
- }).orThrow();
95
- }
96
- /**
97
- * Write a record straight through the store (the direct-put path). The envelope
98
- * `id` is the CODEC-DERIVED stem, which is not always the `entityId` — an MTM
99
- * entity `conv-1:2` addresses to `conversations/conv-1` + stem `turn-2`.
100
- */
101
- async function put(store, kind, entityId, body) {
102
- const idStem = codecs
103
- .get(kind)
104
- .encode(entityId)
105
- .orThrow().idStem;
106
- return store.put({
107
- envelope: {
108
- id: idStem,
109
- entityId: entityId,
110
- kind,
111
- tags: [],
112
- links: [],
113
- created: 0,
114
- updated: 0,
115
- seq: 0,
116
- contentHash: '',
117
- provenance: { source: 'agent' }
118
- },
119
- body
120
- });
121
- }
122
- function candidate(kind, entityId, body) {
123
- return {
124
- envelope: {
125
- entityId: entityId,
126
- kind,
127
- tags: [],
128
- links: [],
129
- provenance: { source: 'agent' }
130
- },
131
- body
132
- };
133
- }
134
- function target(scope, id) {
135
- return { scope, id: id };
136
- }
137
- const classifyMem = {
138
- classify: () => Promise.resolve((0, ts_utils_1.succeed)({ kind: memKind }))
139
- };
140
- function extractorFor(candidates) {
141
- return { extract: () => Promise.resolve((0, ts_utils_1.succeed)(candidates)) };
142
- }
143
- function relaterFor(edges) {
144
- return { relate: (__ctx) => Promise.resolve((0, ts_utils_1.succeed)(edges)) };
145
- }
146
- const noEdges = relaterFor([]);
147
- function buildOrchestrator(params) {
148
- return index_1.MemoryIngestOrchestrator.create({
149
- store: params.store,
150
- registry: registry(),
151
- codecs,
152
- classifier: classifyMem,
153
- extractor: extractorFor(params.candidates),
154
- relationExtractor: params.edges !== undefined ? relaterFor(params.edges) : noEdges,
155
- entityResolver: params.entityResolver,
156
- vectorIndex: params.vectorIndex,
157
- embed: params.vectorIndex !== undefined ? embed : undefined
158
- }).orThrow();
159
- }
160
- const item = { id: 'item-1', content: 'irrelevant' };
161
- /** The per-candidate outcome for `entityId`, or `undefined` when absent. */
162
- function outcomeFor(result, entityId) {
163
- return result.records.find((r) => r.candidate.envelope.entityId === entityId);
164
- }
165
- describe('dedupScope on the ingest path', () => {
166
- describe('IMemoryStore.dedupScopeFor (deliverable 1)', () => {
167
- test("reports 'entity' for a kind whose policy declares it", () => {
168
- expect(buildStore().dedupScopeFor(memKind)).toBe('entity');
169
- });
170
- test("reports 'content' for a kind whose policy declares it", () => {
171
- expect(buildStore().dedupScopeFor(docKind)).toBe('content');
172
- });
173
- test("reports 'content' for a kind with NO registered policy (the store's default policy is KnowledgeLwwPolicy)", () => {
174
- // Documents the real fallback: the store's default policy is a
175
- // KnowledgeLwwPolicy, which DECLARES 'content'. An unpoliced kind therefore
176
- // resolves to 'content' and never reaches DEFAULT_DEDUP_SCOPE ('entity').
177
- expect(buildStore().dedupScopeFor(claimKind)).toBe('content');
178
- expect(buildStore().dedupScopeFor('never-registered')).toBe('content');
179
- });
180
- test('agrees with what the write path actually does', async () => {
181
- // The accessor is not a parallel declaration — it is the same read the
182
- // store's own dedup branch performs. An 'entity' kind keeps two identical
183
- // bodies; a 'content' kind collapses them.
184
- const store = buildStore();
185
- const scopes = [store.dedupScopeFor(memKind), store.dedupScopeFor(docKind)];
186
- expect(scopes).toEqual(['entity', 'content']);
187
- });
188
- });
189
- describe('direct-put path (unchanged, the parity baseline)', () => {
190
- test("an 'entity' kind keeps two distinct entities with byte-identical bodies", async () => {
191
- const store = buildStore();
192
- expect(await put(store, memKind, 'turn-1', 'shared body')).toSucceed();
193
- expect(await put(store, memKind, 'turn-2', 'shared body')).toSucceedAndSatisfy((rec) => {
194
- expect(rec.envelope.id).toBe('turn-2');
195
- });
196
- expect(await store.list({ kind: memKind })).toSucceedAndSatisfy((records) => {
197
- expect(records).toHaveLength(2);
198
- });
199
- });
200
- test("a 'content' kind collapses two distinct entities with byte-identical bodies", async () => {
201
- const store = buildStore();
202
- expect(await put(store, docKind, 'doc-a', 'shared body')).toSucceed();
203
- expect(await put(store, docKind, 'doc-b', 'shared body')).toSucceedAndSatisfy((rec) => {
204
- // The existing record is returned unchanged — the cross-id collapse.
205
- expect(rec.envelope.id).toBe('doc-a');
206
- });
207
- expect(await store.list({ kind: docKind })).toSucceedAndSatisfy((records) => {
208
- expect(records).toHaveLength(1);
209
- });
210
- });
211
- });
212
- describe('layer-1 exact match honors dedupScope (deliverable 2)', () => {
213
- test("an 'entity' kind does NOT collapse a cross-id body collision (fails against pre-fix code)", async () => {
214
- const store = buildStore();
215
- expect(await put(store, memKind, 'turn-1', 'shared body')).toSucceed();
216
- const orchestrator = buildOrchestrator({
217
- store,
218
- candidates: [candidate(memKind, 'turn-2', 'shared body')]
219
- });
220
- expect(await orchestrator.ingestItem(item)).toSucceedAndSatisfy((result) => {
221
- const turn2 = outcomeFor(result, 'turn-2');
222
- // Pre-fix this was `deduped` against turn-1 — layer-1 ignored the
223
- // declaration and always behaved as 'content'.
224
- expect(turn2 === null || turn2 === void 0 ? void 0 : turn2.disposition).toBe('written');
225
- expect(turn2 === null || turn2 === void 0 ? void 0 : turn2.resolution.verdict).toBe('new');
226
- expect(turn2 === null || turn2 === void 0 ? void 0 : turn2.id).toBe('turn-2');
227
- });
228
- expect(await store.list({ kind: memKind })).toSucceedAndSatisfy((records) => {
229
- expect(records).toHaveLength(2);
230
- });
231
- });
232
- test("a 'content' kind still collapses a cross-id body collision", async () => {
233
- const store = buildStore();
234
- expect(await put(store, docKind, 'doc-a', 'shared body')).toSucceed();
235
- const orchestrator = buildOrchestrator({
236
- store,
237
- candidates: [candidate(docKind, 'doc-b', 'shared body')]
238
- });
239
- expect(await orchestrator.ingestItem(item)).toSucceedAndSatisfy((result) => {
240
- const docB = outcomeFor(result, 'doc-b');
241
- expect(docB === null || docB === void 0 ? void 0 : docB.disposition).toBe('deduped');
242
- expect(docB === null || docB === void 0 ? void 0 : docB.resolution).toEqual({
243
- verdict: 'duplicate-of',
244
- target: target(docScope, 'doc-a')
245
- });
246
- expect(docB === null || docB === void 0 ? void 0 : docB.id).toBe('doc-a');
247
- });
248
- expect(await store.list({ kind: docKind })).toSucceedAndSatisfy((records) => {
249
- expect(records).toHaveLength(1);
250
- });
251
- });
252
- test("an 'entity' kind still reports duplicate-of for a SAME-entity identical body (OQ-2)", async () => {
253
- const store = buildStore();
254
- expect(await put(store, memKind, 'turn-1', 'shared body')).toSucceed();
255
- const orchestrator = buildOrchestrator({
256
- store,
257
- candidates: [candidate(memKind, 'turn-1', 'shared body')]
258
- });
259
- expect(await orchestrator.ingestItem(item)).toSucceedAndSatisfy((result) => {
260
- const turn1 = outcomeFor(result, 'turn-1');
261
- // A genuine no-op the store would also collapse. Emitting the verdict
262
- // keeps it honest, and it is safe because the redirect (deliverable 3)
263
- // keeps the address resolvable for sibling edges.
264
- expect(turn1 === null || turn1 === void 0 ? void 0 : turn1.disposition).toBe('deduped');
265
- expect(turn1 === null || turn1 === void 0 ? void 0 : turn1.resolution).toEqual({
266
- verdict: 'duplicate-of',
267
- target: target(memScope, 'turn-1')
268
- });
269
- });
270
- });
271
- test("the reporter's literal shape: two MTM turns in ONE conversation scope with identical bodies", async () => {
272
- // MtmIdentityCodec puts every turn of a conversation in the SAME scope
273
- // (`conversations/<id>`), differing only by idStem (`turn-<n>`). That is
274
- // exactly where the bug bit: same kind, same scope, different entity, and
275
- // a body collision was enough to collapse one turn into the other.
276
- const store = buildStore();
277
- expect(await put(store, turnKind, 'conv-1:1', 'ok, thanks')).toSucceed();
278
- const orchestrator = buildOrchestrator({
279
- store,
280
- candidates: [candidate(turnKind, 'conv-1:2', 'ok, thanks')]
281
- });
282
- expect(await orchestrator.ingestItem(item)).toSucceedAndSatisfy((result) => {
283
- var _a;
284
- expect((_a = outcomeFor(result, 'conv-1:2')) === null || _a === void 0 ? void 0 : _a.disposition).toBe('written');
285
- });
286
- expect(await store.list({ kind: turnKind })).toSucceedAndSatisfy((records) => {
287
- // Both turns persist. Pre-fix, turn 2 was silently swallowed.
288
- expect(records).toHaveLength(2);
289
- });
290
- });
291
- test('a TEMPORAL entity kind keeps distinct entities apart (scope isolation, unchanged)', async () => {
292
- // TemporalIdentityCodec addresses each entity to its OWN scope
293
- // (`events/entities/<id>`), so two distinct temporal entities were never
294
- // in one exact-match cohort even before this change — the scope filter
295
- // alone separated them. Guarding it so the entity narrowing (which is a
296
- // no-op within a single entity's scope, where every version shares the
297
- // idStem) is never mistaken for what protects temporal kinds.
298
- const store = buildStore();
299
- expect(await put(store, evtKind, 'evt-1', 'shared body')).toSucceed();
300
- const orchestrator = buildOrchestrator({
301
- store,
302
- candidates: [candidate(evtKind, 'evt-2', 'shared body')]
303
- });
304
- expect(await orchestrator.ingestItem(item)).toSucceedAndSatisfy((result) => {
305
- var _a;
306
- expect((_a = outcomeFor(result, 'evt-2')) === null || _a === void 0 ? void 0 : _a.disposition).toBe('written');
307
- });
308
- });
309
- test("an 'entity' kind does not match across scopes", async () => {
310
- // A doc and a mem record can share a body without either seeing the other:
311
- // the cohort is scope-filtered before the entity narrowing applies.
312
- const store = buildStore();
313
- expect(await put(store, docKind, 'doc-a', 'shared body')).toSucceed();
314
- const orchestrator = buildOrchestrator({
315
- store,
316
- candidates: [candidate(memKind, 'turn-1', 'shared body')]
317
- });
318
- expect(await orchestrator.ingestItem(item)).toSucceedAndSatisfy((result) => {
319
- var _a;
320
- expect((_a = outcomeFor(result, 'turn-1')) === null || _a === void 0 ? void 0 : _a.disposition).toBe('written');
321
- });
322
- });
323
- });
324
- describe("the reporter's scenario end to end", () => {
325
- test('a cross-id body collision on an entity kind no longer fails the whole item, and the claim is written', async () => {
326
- // Two live records, same kind, same scope, byte-identical bodies, different
327
- // entity ids — plus a sibling edge to the second. Pre-fix: turn-2 collapsed
328
- // to turn-1, its address vanished from `refIds`, and the edge failed
329
- // validation, taking the WHOLE ingest item (claim included) down with it.
330
- const store = buildStore();
331
- expect(await put(store, memKind, 'turn-1', 'shared body')).toSucceed();
332
- const orchestrator = buildOrchestrator({
333
- store,
334
- candidates: [candidate(memKind, 'turn-2', 'shared body'), candidate(claimKind, 'c-1', 'a claim')],
335
- edges: [
336
- {
337
- source: target(docScope, 'c-1'),
338
- edge: { type: 'supports', target: target(memScope, 'turn-2') }
339
- }
340
- ]
341
- });
342
- expect(await orchestrator.ingestItem(item)).toSucceedAndSatisfy((result) => {
343
- var _a, _b;
344
- expect((_a = outcomeFor(result, 'turn-2')) === null || _a === void 0 ? void 0 : _a.disposition).toBe('written');
345
- const claim = outcomeFor(result, 'c-1');
346
- expect(claim === null || claim === void 0 ? void 0 : claim.disposition).toBe('written');
347
- // The claim's edge survived and still points at turn-2, which was written.
348
- expect((_b = claim === null || claim === void 0 ? void 0 : claim.record) === null || _b === void 0 ? void 0 : _b.envelope.links).toEqual([
349
- { type: 'supports', target: target(memScope, 'turn-2') }
350
- ]);
351
- });
352
- expect(await store.list({ kind: memKind })).toSucceedAndSatisfy((records) => {
353
- expect(records).toHaveLength(2);
354
- });
355
- });
356
- });
357
- describe('duplicate-of edge redirect (deliverable 3)', () => {
358
- test("a 'content' kind's collapse redirects a sibling edge to the collapse target", async () => {
359
- // The collapse is CORRECT here — doc-b really is doc-a. The ingest must
360
- // still not fail: the claim's edge is redirected onto doc-a.
361
- const store = buildStore();
362
- expect(await put(store, docKind, 'doc-a', 'shared body')).toSucceed();
363
- const orchestrator = buildOrchestrator({
364
- store,
365
- candidates: [candidate(docKind, 'doc-b', 'shared body'), candidate(claimKind, 'c-1', 'a claim')],
366
- edges: [
367
- {
368
- source: target(docScope, 'c-1'),
369
- edge: { type: 'supports', target: target(docScope, 'doc-b') }
370
- }
371
- ]
372
- });
373
- expect(await orchestrator.ingestItem(item)).toSucceedAndSatisfy((result) => {
374
- var _a, _b;
375
- expect((_a = outcomeFor(result, 'doc-b')) === null || _a === void 0 ? void 0 : _a.disposition).toBe('deduped');
376
- const claim = outcomeFor(result, 'c-1');
377
- expect(claim === null || claim === void 0 ? void 0 : claim.disposition).toBe('written');
378
- // Redirected from the collapsed doc-b to the record it collapsed into.
379
- expect((_b = claim === null || claim === void 0 ? void 0 : claim.record) === null || _b === void 0 ? void 0 : _b.envelope.links).toEqual([
380
- { type: 'supports', target: target(docScope, 'doc-a') }
381
- ]);
382
- });
383
- });
384
- test("an 'entity' kind's resolver-driven duplicate-of redirects a sibling edge", async () => {
385
- // Layer-1 no longer collapses cross-id on an entity kind, so the
386
- // duplicate-of here comes from the host resolver (layer 2) — the remaining
387
- // way an entity-scoped candidate legitimately collapses onto another entity.
388
- const vectorIndex = index_1.InMemoryCosineIndex.create().orThrow();
389
- const store = buildStore(vectorIndex);
390
- expect(await put(store, memKind, 'turn-1', 'shared body')).toSucceed();
391
- const entityResolver = {
392
- resolve: (__candidate, similar) => Promise.resolve((0, ts_utils_1.succeed)({ verdict: 'duplicate-of', target: similar[0].target }))
393
- };
394
- const orchestrator = buildOrchestrator({
395
- store,
396
- candidates: [candidate(memKind, 'turn-2', 'shared body'), candidate(claimKind, 'c-1', 'a claim')],
397
- edges: [
398
- {
399
- source: target(docScope, 'c-1'),
400
- edge: { type: 'supports', target: target(memScope, 'turn-2') }
401
- }
402
- ],
403
- entityResolver,
404
- vectorIndex
405
- });
406
- expect(await orchestrator.ingestItem(item)).toSucceedAndSatisfy((result) => {
407
- var _a, _b;
408
- expect((_a = outcomeFor(result, 'turn-2')) === null || _a === void 0 ? void 0 : _a.disposition).toBe('deduped');
409
- const claim = outcomeFor(result, 'c-1');
410
- expect(claim === null || claim === void 0 ? void 0 : claim.disposition).toBe('written');
411
- expect((_b = claim === null || claim === void 0 ? void 0 : claim.record) === null || _b === void 0 ? void 0 : _b.envelope.links).toEqual([
412
- { type: 'supports', target: target(memScope, 'turn-1') }
413
- ]);
414
- });
415
- });
416
- test('an edge SOURCED at a collapsed candidate is still rejected loudly', async () => {
417
- // Sources are the records an edge is written ONTO. A collapsed candidate is
418
- // never written, so silently relocating the edge would attribute a link the
419
- // host never asked for. The loud failure is the correct outcome here.
420
- const store = buildStore();
421
- expect(await put(store, docKind, 'doc-a', 'shared body')).toSucceed();
422
- const orchestrator = buildOrchestrator({
423
- store,
424
- candidates: [candidate(docKind, 'doc-b', 'shared body'), candidate(claimKind, 'c-1', 'a claim')],
425
- edges: [
426
- {
427
- source: target(docScope, 'doc-b'),
428
- edge: { type: 'supports', target: target(docScope, 'c-1') }
429
- }
430
- ]
431
- });
432
- expect(await orchestrator.ingestItem(item)).toFailWith(/is not a candidate being written/i);
433
- });
434
- });
435
- });
436
- //# sourceMappingURL=dedupScope.test.js.map