@remnic/core 9.49.0 → 9.50.0

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 (606) hide show
  1. package/dist/abstraction-nodes.d.ts +12 -1
  2. package/dist/abstraction-nodes.js +9 -2
  3. package/dist/access-admin-ops-surface.d.ts +10 -10
  4. package/dist/access-admin-ops-surface.js +48 -48
  5. package/dist/access-authorization-probe.d.ts +10 -10
  6. package/dist/access-authorization-probe.js +49 -49
  7. package/dist/access-boundary.d.ts +10 -10
  8. package/dist/access-boundary.js +48 -48
  9. package/dist/access-cli.js +132 -127
  10. package/dist/access-cli.js.map +1 -1
  11. package/dist/access-coding-context-resolution.d.ts +1 -1
  12. package/dist/access-extraction-force-flush.d.ts +10 -10
  13. package/dist/access-extraction-force-flush.js +48 -48
  14. package/dist/access-health-types.d.ts +1 -1
  15. package/dist/access-http-lcm-compaction.d.ts +10 -10
  16. package/dist/access-http-lifecycle-flush.d.ts +10 -10
  17. package/dist/access-http-offline-stream.d.ts +10 -10
  18. package/dist/access-http-query.js +48 -48
  19. package/dist/access-http.d.ts +10 -10
  20. package/dist/access-http.js +60 -60
  21. package/dist/access-identity-continuity-surface.d.ts +8 -8
  22. package/dist/access-identity-continuity-surface.js +48 -48
  23. package/dist/access-lcm-surface.d.ts +10 -10
  24. package/dist/access-lcm-surface.js +48 -48
  25. package/dist/access-mcp.d.ts +10 -10
  26. package/dist/access-mcp.js +55 -55
  27. package/dist/access-memory-search-fanout.d.ts +2 -2
  28. package/dist/{access-namespace-preflight--H6HwN85.d.ts → access-namespace-preflight-DuDU301-.d.ts} +1 -1
  29. package/dist/access-namespace-preflight.d.ts +3 -3
  30. package/dist/access-namespace-preflight.js +48 -48
  31. package/dist/access-observe-write-surface.d.ts +10 -10
  32. package/dist/access-observe-write-surface.js +48 -48
  33. package/dist/access-offline-manifest.d.ts +8 -8
  34. package/dist/access-offline-manifest.js +3 -3
  35. package/dist/access-operations-batch.js +51 -51
  36. package/dist/access-operations.d.ts +13 -13
  37. package/dist/access-operations.js +54 -54
  38. package/dist/access-recall-concurrency.d.ts +10 -10
  39. package/dist/access-recall-concurrency.js +48 -48
  40. package/dist/access-recall-response.d.ts +10 -10
  41. package/dist/access-recall-response.js +48 -48
  42. package/dist/access-recall-surface.d.ts +10 -10
  43. package/dist/access-recall-surface.js +48 -48
  44. package/dist/access-schema.d.ts +105 -105
  45. package/dist/access-schema.js +4 -4
  46. package/dist/{access-service-DvXOzCrM.d.ts → access-service--_3T_v23.d.ts} +7 -7
  47. package/dist/access-service-helpers.d.ts +10 -10
  48. package/dist/access-service.d.ts +10 -10
  49. package/dist/access-service.js +48 -48
  50. package/dist/access-surface-catalog.d.ts +10 -10
  51. package/dist/access-wearables-meetings-surface.d.ts +3 -3
  52. package/dist/action-confidence.d.ts +1 -1
  53. package/dist/active-memory-bridge.d.ts +1 -1
  54. package/dist/active-recall.d.ts +1 -1
  55. package/dist/active-recall.js +3 -2
  56. package/dist/active-recall.js.map +1 -1
  57. package/dist/adapters/index.js +4 -4
  58. package/dist/adapters/registry.js +2 -2
  59. package/dist/ambient-provenance.d.ts +1 -1
  60. package/dist/artifact-search.d.ts +1 -1
  61. package/dist/{auto-sync-7O6RP2RT.js → auto-sync-QFQGOEO2.js} +4 -4
  62. package/dist/behavior-learner.d.ts +1 -1
  63. package/dist/behavior-signals.d.ts +1 -1
  64. package/dist/bootstrap.d.ts +8 -8
  65. package/dist/briefing.d.ts +2 -2
  66. package/dist/briefing.js +12 -12
  67. package/dist/buffer-surprise-report.d.ts +1 -1
  68. package/dist/buffer-turn-helpers.d.ts +1 -1
  69. package/dist/buffer.d.ts +2 -2
  70. package/dist/buffer.js +4 -4
  71. package/dist/bulk-import/index.d.ts +3 -3
  72. package/dist/calibration.d.ts +1 -1
  73. package/dist/calibration.js +1 -1
  74. package/dist/capabilities.d.ts +1 -1
  75. package/dist/{capsule-crypto-YO5QJ6L3.js → capsule-crypto-7FJQINUR.js} +2 -2
  76. package/dist/{capsule-merge-6GFHWECG.js → capsule-merge-KXTRZ23Z.js} +4 -4
  77. package/dist/{catalog-Iwbk9h5E.d.ts → catalog-DjUmUIal.d.ts} +1 -1
  78. package/dist/causal-behavior.d.ts +1 -1
  79. package/dist/causal-behavior.js +3 -3
  80. package/dist/causal-chain.js +3 -3
  81. package/dist/causal-consolidation.d.ts +1 -1
  82. package/dist/causal-consolidation.js +16 -16
  83. package/dist/causal-retrieval.js +3 -3
  84. package/dist/causal-trajectory-graph.d.ts +1 -1
  85. package/dist/causal-trajectory.d.ts +51 -2
  86. package/dist/causal-trajectory.js +8 -2
  87. package/dist/{chunk-EY64JLOM.js → chunk-24BKGKGO.js} +30 -19
  88. package/dist/chunk-24BKGKGO.js.map +1 -0
  89. package/dist/{chunk-ICP53SKG.js → chunk-2HIJHXB3.js} +2 -2
  90. package/dist/{chunk-BXLOS5AJ.js → chunk-2NLLXCJG.js} +2 -2
  91. package/dist/{chunk-LZGCJSQR.js → chunk-3LD4N2TF.js} +151 -37
  92. package/dist/chunk-3LD4N2TF.js.map +1 -0
  93. package/dist/{chunk-5JRC6BYS.js → chunk-47J4EDGR.js} +11 -11
  94. package/dist/{chunk-2VHLLPTX.js → chunk-4EABKPZS.js} +4 -4
  95. package/dist/{chunk-RJV6Q2FT.js → chunk-4JWJMRPJ.js} +2 -2
  96. package/dist/{chunk-MXPB6PJQ.js → chunk-4S3ECH3U.js} +2 -2
  97. package/dist/{chunk-CGASUJVP.js → chunk-5V6IXHPI.js} +4 -4
  98. package/dist/{chunk-R5IGA2NH.js → chunk-5XCN4XBU.js} +4 -4
  99. package/dist/{chunk-2RPJ4NEE.js → chunk-64BHFFKZ.js} +2 -2
  100. package/dist/{chunk-FQC3DHH2.js → chunk-66SE3BNH.js} +2 -2
  101. package/dist/{chunk-TERNBNJB.js → chunk-6FC3IZ26.js} +2 -2
  102. package/dist/{chunk-K7VKAHFE.js → chunk-6XGEBQ3R.js} +4 -4
  103. package/dist/{chunk-JFLOOTXU.js → chunk-7BLWBSRL.js} +3 -3
  104. package/dist/{chunk-ABR2HEJO.js → chunk-7NDM2PNK.js} +3 -3
  105. package/dist/{chunk-JXZ7NLYH.js → chunk-7VWZ4LRW.js} +2 -2
  106. package/dist/{chunk-RN53QBM4.js → chunk-A4QMKFFO.js} +5 -1
  107. package/dist/chunk-A4QMKFFO.js.map +1 -0
  108. package/dist/chunk-ACPCA4NO.js +321 -0
  109. package/dist/chunk-ACPCA4NO.js.map +1 -0
  110. package/dist/chunk-AMTEYNYK.js +72 -0
  111. package/dist/chunk-AMTEYNYK.js.map +1 -0
  112. package/dist/{chunk-R6YJI3HE.js → chunk-AW4QUFQF.js} +1 -1
  113. package/dist/{chunk-P65YJEEL.js → chunk-AXFWMRKI.js} +2 -2
  114. package/dist/{chunk-WG5HSQ4P.js → chunk-BAKXNQ3C.js} +2 -2
  115. package/dist/{chunk-NM2WP3B7.js → chunk-BJYET5TX.js} +2 -2
  116. package/dist/{chunk-HLKPRWF4.js → chunk-DATDLJAO.js} +6 -6
  117. package/dist/chunk-DJUKBGAD.js +260 -0
  118. package/dist/chunk-DJUKBGAD.js.map +1 -0
  119. package/dist/{chunk-DX3XRGLH.js → chunk-DQTCGVFK.js} +2 -2
  120. package/dist/{chunk-IPBNC77A.js → chunk-E633OXMH.js} +11 -11
  121. package/dist/{chunk-J7T4MX7P.js → chunk-EEAMSNSG.js} +12 -1
  122. package/dist/chunk-EEAMSNSG.js.map +1 -0
  123. package/dist/{chunk-Z5UC3OKB.js → chunk-ELQCS47S.js} +7 -7
  124. package/dist/{chunk-FMXJ555A.js → chunk-EURCX6PS.js} +2 -2
  125. package/dist/{chunk-MZZR3J6M.js → chunk-FV7YQTN3.js} +2 -2
  126. package/dist/chunk-G73MCJKL.js +20 -0
  127. package/dist/chunk-G73MCJKL.js.map +1 -0
  128. package/dist/{chunk-3R6D33UF.js → chunk-GGBSF2X7.js} +2 -2
  129. package/dist/{chunk-SYUBB3WM.js → chunk-GKEYXXKX.js} +2 -2
  130. package/dist/{chunk-5AGR7SAI.js → chunk-GSEPRIZC.js} +3 -3
  131. package/dist/{chunk-UTVZKHJK.js → chunk-GUKBW4HL.js} +2 -2
  132. package/dist/chunk-GXSOUIA4.js +293 -0
  133. package/dist/chunk-GXSOUIA4.js.map +1 -0
  134. package/dist/{chunk-2F6NP3NT.js → chunk-HDQUQBPW.js} +2 -2
  135. package/dist/{chunk-6HMYUWXR.js → chunk-HTP6XRUI.js} +2 -2
  136. package/dist/{chunk-UYUYZ4WY.js → chunk-IARXXZU4.js} +2 -2
  137. package/dist/{chunk-MNB5RMAY.js → chunk-IIFFC3RL.js} +2 -2
  138. package/dist/{chunk-VDX2J7OX.js → chunk-IPLYGWQF.js} +6 -6
  139. package/dist/{chunk-NZBZ7IS2.js → chunk-JDCQK3C5.js} +2 -2
  140. package/dist/{chunk-C3KVFJH5.js → chunk-JI62YGPI.js} +2 -2
  141. package/dist/{chunk-LULR4IUW.js → chunk-KATEWTQJ.js} +2 -2
  142. package/dist/{chunk-BMCHFWGX.js → chunk-KMWYZTIE.js} +2 -2
  143. package/dist/{chunk-JGSKJHF7.js → chunk-KQS72GCR.js} +2 -2
  144. package/dist/{chunk-3S63QIFQ.js → chunk-LAQ33B5D.js} +1 -1
  145. package/dist/chunk-LAQ33B5D.js.map +1 -0
  146. package/dist/chunk-LNTUXKBT.js +224 -0
  147. package/dist/chunk-LNTUXKBT.js.map +1 -0
  148. package/dist/{chunk-2RIWJUSQ.js → chunk-LQKXVQZR.js} +12 -12
  149. package/dist/{chunk-LQL7ARIC.js → chunk-LTOAJXZB.js} +4 -4
  150. package/dist/{chunk-QKD65RGL.js → chunk-LYMNZZIM.js} +2 -2
  151. package/dist/{chunk-W4FBGYGK.js → chunk-M4MP34AQ.js} +189 -5
  152. package/dist/chunk-M4MP34AQ.js.map +1 -0
  153. package/dist/{chunk-3PY7VHV7.js → chunk-MCA2X4WH.js} +2 -2
  154. package/dist/{chunk-S5NZBKKQ.js → chunk-N3CXAYPJ.js} +3 -3
  155. package/dist/{chunk-WQIHRA5F.js → chunk-N3LL5NEU.js} +2 -2
  156. package/dist/{chunk-Z4U6U3M3.js → chunk-NKL25FCF.js} +2 -2
  157. package/dist/{chunk-LMDRGRJ2.js → chunk-NOB2T2FC.js} +2 -2
  158. package/dist/{chunk-P2OTGMTR.js → chunk-NSGU76YO.js} +2 -2
  159. package/dist/{chunk-L6DCVUCA.js → chunk-O76MWTVS.js} +2 -2
  160. package/dist/{chunk-WZFAPHIK.js → chunk-OIOZ6MOP.js} +3 -3
  161. package/dist/{chunk-DNHVPZOD.js → chunk-P26YHAQH.js} +201 -1
  162. package/dist/chunk-P26YHAQH.js.map +1 -0
  163. package/dist/{chunk-UMOO7IY7.js → chunk-P2KBDJJ6.js} +2 -2
  164. package/dist/{chunk-KVJRXN2E.js → chunk-P4QOYG52.js} +125 -13
  165. package/dist/chunk-P4QOYG52.js.map +1 -0
  166. package/dist/chunk-P77QX3ID.js +332 -0
  167. package/dist/chunk-P77QX3ID.js.map +1 -0
  168. package/dist/{chunk-SXWHN7GC.js → chunk-PDEKQWDV.js} +2 -2
  169. package/dist/{chunk-ENEA47UC.js → chunk-PLCHU56K.js} +3 -3
  170. package/dist/{chunk-IXPKESVP.js → chunk-PWIMF7LP.js} +37 -37
  171. package/dist/{chunk-RHTO4HTL.js → chunk-PWLB4TRK.js} +2 -2
  172. package/dist/{chunk-RVYVMQK4.js → chunk-QSYL5CXK.js} +3 -3
  173. package/dist/{chunk-B6KGGRUL.js → chunk-QWLW3VQH.js} +2 -2
  174. package/dist/{chunk-YQIVWS7Y.js → chunk-RBPH3GZV.js} +405 -101
  175. package/dist/chunk-RBPH3GZV.js.map +1 -0
  176. package/dist/{chunk-JBPKEARU.js → chunk-RKNJBZ55.js} +4 -4
  177. package/dist/{chunk-QCECHYZL.js → chunk-RVO6TCTU.js} +6 -6
  178. package/dist/{chunk-SHDZNSK4.js → chunk-S2SJEOTM.js} +2 -2
  179. package/dist/{chunk-ULWHRQEQ.js → chunk-S75UQ3T3.js} +3 -3
  180. package/dist/{chunk-LXOM6IQU.js → chunk-SEF4IOFE.js} +2 -2
  181. package/dist/{chunk-I3YHVVT4.js → chunk-SHYIMIX5.js} +2 -2
  182. package/dist/{chunk-IZANPXMV.js → chunk-T35UJI5R.js} +86 -82
  183. package/dist/chunk-T35UJI5R.js.map +1 -0
  184. package/dist/{chunk-G5OB4XZX.js → chunk-VANZKHTN.js} +4 -4
  185. package/dist/{chunk-I4TQST3L.js → chunk-VFS3MK5F.js} +2 -2
  186. package/dist/chunk-VUDMT5CP.js +86 -0
  187. package/dist/chunk-VUDMT5CP.js.map +1 -0
  188. package/dist/{chunk-CMQZNEIF.js → chunk-WFLBP5GC.js} +8 -1
  189. package/dist/chunk-WFLBP5GC.js.map +1 -0
  190. package/dist/{chunk-SMPVHGHG.js → chunk-WPZX7MEA.js} +3 -3
  191. package/dist/{chunk-ZRWB5D4H.js → chunk-WT6UL3UA.js} +2 -2
  192. package/dist/{chunk-DQEMWVMT.js → chunk-X7Y7WX73.js} +1 -1
  193. package/dist/{chunk-JHMAYABJ.js → chunk-XL3TATMJ.js} +4 -4
  194. package/dist/{chunk-MC6XO7T4.js → chunk-YLBE6PLR.js} +2 -2
  195. package/dist/{chunk-OLX2HJFW.js → chunk-YLHM5BQQ.js} +4 -4
  196. package/dist/{chunk-EZ25VE3G.js → chunk-YNDLCWXS.js} +4 -4
  197. package/dist/{chunk-GF22HWS2.js → chunk-Z54EM5YZ.js} +4 -4
  198. package/dist/{chunk-GVX3NAUU.js → chunk-ZDAYWJV6.js} +2 -2
  199. package/dist/{chunk-EYAIZBLM.js → chunk-ZJIFYUJI.js} +5 -5
  200. package/dist/{chunk-CNQQMB67.js → chunk-ZN4EYMKJ.js} +2 -2
  201. package/dist/{cli-PyAUaozE.d.ts → cli-BLNmNEMT.d.ts} +16 -14
  202. package/dist/cli.d.ts +13 -13
  203. package/dist/cli.js +96 -94
  204. package/dist/coding/pre-action-gate.d.ts +66 -0
  205. package/dist/coding/pre-action-gate.js +22 -0
  206. package/dist/commitment-ledger.js +2 -2
  207. package/dist/compounding/engine.d.ts +2 -2
  208. package/dist/compounding/engine.js +13 -13
  209. package/dist/compounding/preference-consolidator.d.ts +1 -1
  210. package/dist/compression-optimizer.d.ts +1 -1
  211. package/dist/config.d.ts +1 -1
  212. package/dist/config.js +3 -2
  213. package/dist/connectors/codex-materialize-runner.d.ts +1 -1
  214. package/dist/connectors/codex-materialize-runner.js +12 -12
  215. package/dist/connectors/codex-materialize.d.ts +1 -1
  216. package/dist/connectors/index.d.ts +1 -1
  217. package/dist/connectors/index.js +12 -12
  218. package/dist/consolidation-provenance-check.d.ts +2 -2
  219. package/dist/consolidation-provenance-check.js +4 -4
  220. package/dist/consolidation-undo.d.ts +2 -2
  221. package/dist/consolidation-undo.js +3 -3
  222. package/dist/contradiction/index.d.ts +2 -2
  223. package/dist/contradiction/index.js +3 -3
  224. package/dist/converge-config.d.ts +1 -1
  225. package/dist/convergence-refresh.d.ts +2 -2
  226. package/dist/convergence-refresh.js +15 -15
  227. package/dist/conversation-index/backend.d.ts +1 -1
  228. package/dist/conversation-index/chunker.d.ts +1 -1
  229. package/dist/conversation-index/faiss-adapter.d.ts +1 -1
  230. package/dist/conversation-index/indexer.d.ts +1 -1
  231. package/dist/conversation-index/search.d.ts +1 -1
  232. package/dist/corpus-watermark.d.ts +1 -1
  233. package/dist/corpus-watermark.js +23 -23
  234. package/dist/cue-anchors.d.ts +19 -1
  235. package/dist/cue-anchors.js +10 -2
  236. package/dist/dashboard-runtime.js +2 -2
  237. package/dist/day-summary.d.ts +1 -1
  238. package/dist/delinearize.d.ts +1 -1
  239. package/dist/dependency-propagation-config.d.ts +10 -0
  240. package/dist/dependency-propagation-config.js +10 -0
  241. package/dist/dependency-propagation-config.js.map +1 -0
  242. package/dist/deterministic-order.d.ts +4 -0
  243. package/dist/deterministic-order.js +10 -0
  244. package/dist/deterministic-order.js.map +1 -0
  245. package/dist/direct-answer-wiring.d.ts +1 -1
  246. package/dist/direct-answer.d.ts +1 -1
  247. package/dist/embedding-fallback.d.ts +1 -1
  248. package/dist/enrichment/index.d.ts +1 -1
  249. package/dist/entity-retrieval.d.ts +2 -2
  250. package/dist/entity-retrieval.js +12 -12
  251. package/dist/entity-schema.d.ts +1 -1
  252. package/dist/evals.js +2 -2
  253. package/dist/explicit-capture.d.ts +8 -8
  254. package/dist/explicit-capture.js +6 -6
  255. package/dist/external-wiki-access.d.ts +10 -10
  256. package/dist/external-wiki-access.js +49 -49
  257. package/dist/external-wiki-collection-registration.d.ts +1 -1
  258. package/dist/external-wiki-collection.d.ts +1 -1
  259. package/dist/external-wiki-mcp-tools.d.ts +10 -10
  260. package/dist/extraction-error-classification.d.ts +1 -1
  261. package/dist/extraction-faithfulness.d.ts +1 -1
  262. package/dist/extraction-judge-telemetry.d.ts +1 -1
  263. package/dist/extraction-judge-training.d.ts +1 -1
  264. package/dist/extraction-judge.d.ts +1 -1
  265. package/dist/extraction-liveness.d.ts +1 -1
  266. package/dist/extraction-normalization.d.ts +14 -0
  267. package/dist/extraction-normalization.js +22 -0
  268. package/dist/extraction-normalization.js.map +1 -0
  269. package/dist/extraction-prompt.d.ts +4 -3
  270. package/dist/extraction-prompt.js +3 -1
  271. package/dist/extraction-source-grounding-rules.d.ts +1 -1
  272. package/dist/extraction-source-grounding.d.ts +1 -1
  273. package/dist/extraction.d.ts +18 -1
  274. package/dist/extraction.js +21 -19
  275. package/dist/fallback-llm.d.ts +1 -1
  276. package/dist/{first-start-migration-ZSHEFEI3.js → first-start-migration-626C5554.js} +5 -5
  277. package/dist/{forget-DNAJ66ZD.js → forget-GJ42LCBW.js} +2 -2
  278. package/dist/graph-dashboard-diff.d.ts +1 -1
  279. package/dist/graph-dashboard-key.d.ts +1 -1
  280. package/dist/graph-dashboard-parser.d.ts +1 -1
  281. package/dist/graph-edge-reinforcement.d.ts +1 -1
  282. package/dist/graph-snapshot.d.ts +1 -1
  283. package/dist/graph.d.ts +1 -1
  284. package/dist/harmonic-construction.d.ts +43 -0
  285. package/dist/harmonic-construction.js +26 -0
  286. package/dist/harmonic-construction.js.map +1 -0
  287. package/dist/harmonic-retrieval.d.ts +1 -0
  288. package/dist/harmonic-retrieval.js +10 -4
  289. package/dist/importance.d.ts +1 -1
  290. package/dist/importers/index.d.ts +1 -1
  291. package/dist/in-flight-reads.d.ts +1 -1
  292. package/dist/index.d.ts +698 -696
  293. package/dist/index.js +207 -161
  294. package/dist/intent.d.ts +1 -1
  295. package/dist/json-store.d.ts +15 -1
  296. package/dist/json-store.js +11 -3
  297. package/dist/lcm/engine.d.ts +1 -1
  298. package/dist/lcm/engine.js +2 -2
  299. package/dist/lcm/index.d.ts +1 -1
  300. package/dist/lcm/index.js +4 -4
  301. package/dist/lcm/tools.d.ts +1 -1
  302. package/dist/lifecycle.d.ts +1 -1
  303. package/dist/live-connectors-runner.d.ts +1 -1
  304. package/dist/local-llm.d.ts +1 -1
  305. package/dist/local-model-endpoint.d.ts +1 -1
  306. package/dist/maintenance/archive-observations.js +2 -2
  307. package/dist/maintenance/atomic-file.d.ts +5 -0
  308. package/dist/maintenance/atomic-file.js +12 -0
  309. package/dist/maintenance/atomic-file.js.map +1 -0
  310. package/dist/maintenance/memory-governance.d.ts +1 -1
  311. package/dist/maintenance/memory-governance.js +12 -12
  312. package/dist/maintenance/migrate-observations.js +3 -3
  313. package/dist/maintenance/observation-ledger-utils.d.ts +1 -1
  314. package/dist/maintenance/observation-ledger-utils.js +2 -2
  315. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
  316. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +13 -13
  317. package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
  318. package/dist/maintenance/rebuild-memory-projection.js +14 -14
  319. package/dist/maintenance/rebuild-observations.js +3 -3
  320. package/dist/{maintenance-j7sfNQdK.d.ts → maintenance-DKbKZi3u.d.ts} +3 -3
  321. package/dist/mcp-memory-inspector-app.d.ts +10 -10
  322. package/dist/memory-action-policy.d.ts +1 -1
  323. package/dist/memory-cache.d.ts +1 -1
  324. package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
  325. package/dist/memory-projection-store.d.ts +1 -1
  326. package/dist/memory-provenance.d.ts +1 -1
  327. package/dist/memory-snapshot.d.ts +1 -1
  328. package/dist/memory-worth-outcomes.d.ts +2 -2
  329. package/dist/models-json.d.ts +1 -1
  330. package/dist/namespaces/migrate.d.ts +3 -3
  331. package/dist/namespaces/migrate.js +22 -22
  332. package/dist/namespaces/principal.d.ts +1 -1
  333. package/dist/namespaces/search.d.ts +1 -1
  334. package/dist/namespaces/search.js +9 -9
  335. package/dist/namespaces/storage.d.ts +3 -3
  336. package/dist/namespaces/storage.js +12 -12
  337. package/dist/native-knowledge.d.ts +1 -1
  338. package/dist/objective-state-writers.js +3 -3
  339. package/dist/objective-state.js +2 -2
  340. package/dist/offline-sync-impression-drain.d.ts +1 -1
  341. package/dist/offline-sync-impression-drain.js +2 -2
  342. package/dist/operator-doctor-corpus.d.ts +1 -1
  343. package/dist/operator-doctor-corpus.js +24 -24
  344. package/dist/operator-doctor-replica.d.ts +1 -1
  345. package/dist/operator-toolkit.d.ts +3 -3
  346. package/dist/operator-toolkit.js +33 -32
  347. package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
  348. package/dist/orchestration/maintenance.d.ts +4 -4
  349. package/dist/orchestration/maintenance.js +18 -18
  350. package/dist/{orchestrator-Haa9xVPV.d.ts → orchestrator-BRwD7ceU.d.ts} +7 -7
  351. package/dist/orchestrator.d.ts +8 -8
  352. package/dist/orchestrator.js +132 -127
  353. package/dist/page-versioning.js +3 -3
  354. package/dist/patterns-cli.d.ts +1 -1
  355. package/dist/{pipeline-1h2GpiHP.d.ts → pipeline-DC-1C9T8.d.ts} +1 -1
  356. package/dist/policy-runtime.d.ts +1 -1
  357. package/dist/proactive-contention.d.ts +1 -1
  358. package/dist/provenance.d.ts +1 -1
  359. package/dist/{qmd-UdwoF71D.d.ts → qmd-DdeCEZdb.d.ts} +1 -1
  360. package/dist/qmd-preflight.d.ts +2 -2
  361. package/dist/qmd-recall-cache.d.ts +1 -1
  362. package/dist/qmd.d.ts +2 -2
  363. package/dist/qmd.js +4 -4
  364. package/dist/recall-concurrency-config.d.ts +1 -1
  365. package/dist/recall-disclosure-escalation.d.ts +1 -1
  366. package/dist/recall-explain-renderer.d.ts +1 -1
  367. package/dist/recall-explain-renderer.js +3 -3
  368. package/dist/recall-memory-map.d.ts +1 -1
  369. package/dist/recall-planner-llm.d.ts +1 -1
  370. package/dist/recall-state.d.ts +1 -1
  371. package/dist/recall-state.js +2 -2
  372. package/dist/recall-tag-filter.d.ts +1 -1
  373. package/dist/recall-timings.d.ts +1 -1
  374. package/dist/recall-xray-cli.d.ts +1 -1
  375. package/dist/recall-xray-cli.js +4 -4
  376. package/dist/recall-xray-renderer.d.ts +1 -1
  377. package/dist/recall-xray-renderer.js +3 -3
  378. package/dist/recall-xray.d.ts +1 -1
  379. package/dist/recall-xray.js +2 -2
  380. package/dist/reconcile/cursor.d.ts +1 -1
  381. package/dist/reconcile/manifest.d.ts +1 -1
  382. package/dist/reconcile/plan.d.ts +1 -1
  383. package/dist/relevance.js +2 -2
  384. package/dist/replay/normalizers/chatgpt.d.ts +1 -1
  385. package/dist/replay/normalizers/claude.d.ts +1 -1
  386. package/dist/replay/normalizers/openclaw.d.ts +1 -1
  387. package/dist/replay/normalizers/shared.d.ts +1 -1
  388. package/dist/replay/runner.d.ts +1 -1
  389. package/dist/replay/types.d.ts +1 -1
  390. package/dist/replica-divergence.d.ts +1 -1
  391. package/dist/replica-peers-config.d.ts +1 -1
  392. package/dist/{resolution-3K27T4VO.js → resolution-MDPNOEG6.js} +4 -4
  393. package/dist/resolution-MDPNOEG6.js.map +1 -0
  394. package/dist/resolve-auth-token.d.ts +1 -1
  395. package/dist/resume-bundles.js +8 -7
  396. package/dist/retrieval-agents.d.ts +2 -2
  397. package/dist/retrieval-tiers.d.ts +1 -1
  398. package/dist/routing/engine.d.ts +1 -1
  399. package/dist/routing/store.d.ts +1 -1
  400. package/dist/salvage-envelope.d.ts +1 -1
  401. package/dist/salvage-envelope.js +3 -3
  402. package/dist/schemas.d.ts +213 -116
  403. package/dist/schemas.js +1 -1
  404. package/dist/{scope-profiles-APjhSe-w.d.ts → scope-profiles-BXVq4Jv0.d.ts} +1 -1
  405. package/dist/search/embed-helper.d.ts +1 -1
  406. package/dist/search/factory.d.ts +1 -1
  407. package/dist/search/factory.js +8 -8
  408. package/dist/search/index.d.ts +1 -1
  409. package/dist/search/index.js +13 -13
  410. package/dist/search/lancedb-backend.d.ts +1 -1
  411. package/dist/search/lancedb-backend.js +2 -2
  412. package/dist/search/meilisearch-backend.d.ts +1 -1
  413. package/dist/search/meilisearch-backend.js +2 -2
  414. package/dist/search/noop-backend.d.ts +1 -1
  415. package/dist/search/orama-backend.d.ts +1 -1
  416. package/dist/search/orama-backend.js +2 -2
  417. package/dist/search/port.d.ts +1 -1
  418. package/dist/search/remote-backend.d.ts +1 -1
  419. package/dist/{semantic-consolidation-CrySDbk3.d.ts → semantic-consolidation-CGYxfa8F.d.ts} +1 -1
  420. package/dist/semantic-consolidation.d.ts +2 -2
  421. package/dist/semantic-consolidation.js +13 -13
  422. package/dist/semantic-rule-promotion.js +12 -12
  423. package/dist/semantic-rule-verifier.d.ts +1 -1
  424. package/dist/semantic-rule-verifier.js +12 -12
  425. package/dist/{service-Da_BI4S8.d.ts → service-CBDBQFCN.d.ts} +2 -2
  426. package/dist/session-observer-bands.d.ts +1 -1
  427. package/dist/session-observer-state.d.ts +1 -1
  428. package/dist/shared-context/manager.d.ts +11 -11
  429. package/dist/signal.d.ts +1 -1
  430. package/dist/source-agent-qualifier.d.ts +1 -1
  431. package/dist/source-agent-qualifier.js +16 -16
  432. package/dist/{storage-D1apCiCS.d.ts → storage-V--MQi7w.d.ts} +1 -1
  433. package/dist/storage.d.ts +2 -2
  434. package/dist/storage.js +11 -11
  435. package/dist/summarizer.d.ts +1 -1
  436. package/dist/summary-snapshot.d.ts +1 -1
  437. package/dist/temporal-supersession.d.ts +13 -2
  438. package/dist/temporal-supersession.js +1 -1
  439. package/dist/temporal-timeline-recall.d.ts +1 -1
  440. package/dist/temporal-validity.d.ts +1 -1
  441. package/dist/threading.d.ts +1 -1
  442. package/dist/tier-migration.d.ts +2 -2
  443. package/dist/tier-routing.d.ts +1 -1
  444. package/dist/{tier-stats-OPTSBNRH.js → tier-stats-2JCZYEF7.js} +5 -5
  445. package/dist/topics.d.ts +1 -1
  446. package/dist/transcript.d.ts +1 -1
  447. package/dist/transfer/autodetect.js +1 -1
  448. package/dist/transfer/backup.js +2 -2
  449. package/dist/transfer/capsule-export.js +3 -3
  450. package/dist/transfer/capsule-import.js +5 -5
  451. package/dist/transfer/types.d.ts +66 -66
  452. package/dist/trust-score-stage.d.ts +1 -1
  453. package/dist/trust-score.d.ts +1 -1
  454. package/dist/trust-zones.js +2 -2
  455. package/dist/{types-D_Au9qJO.d.ts → types-D_a6Sqjz.d.ts} +25 -8
  456. package/dist/types.d.ts +1 -1
  457. package/dist/types.js +1 -1
  458. package/dist/utility-learner.js +3 -3
  459. package/dist/utility-runtime.d.ts +1 -1
  460. package/dist/utility-runtime.js +4 -4
  461. package/dist/utility-telemetry.js +2 -2
  462. package/dist/verified-recall.js +12 -12
  463. package/dist/work-product-ledger.js +2 -2
  464. package/dist/write-envelope.d.ts +1 -1
  465. package/dist/write-envelope.js +2 -2
  466. package/package.json +32 -2
  467. package/src/abstraction-nodes.ts +182 -4
  468. package/src/causal-trajectory.ts +258 -3
  469. package/src/cli/harmonic-search.ts +23 -0
  470. package/src/cli/research-status-commands.ts +2 -1
  471. package/src/cli.ts +1 -24
  472. package/src/coding/pre-action-gate.test.ts +516 -0
  473. package/src/coding/pre-action-gate.ts +320 -0
  474. package/src/config.test.ts +85 -0
  475. package/src/config.ts +2 -0
  476. package/src/cue-anchors.test.ts +90 -0
  477. package/src/cue-anchors.ts +264 -11
  478. package/src/dependency-frontmatter.test.ts +83 -0
  479. package/src/dependency-propagation-config.ts +94 -0
  480. package/src/deterministic-order.ts +14 -0
  481. package/src/extraction-normalization.ts +71 -0
  482. package/src/extraction-prompt.ts +45 -11
  483. package/src/extraction.ts +48 -32
  484. package/src/faithfulness-graph-guard.test.ts +27 -0
  485. package/src/harmonic-construction.test.ts +1799 -0
  486. package/src/harmonic-construction.ts +367 -0
  487. package/src/harmonic-retrieval.ts +166 -25
  488. package/src/index.ts +4 -5
  489. package/src/json-store.ts +354 -12
  490. package/src/orchestration/consolidation-run.ts +192 -0
  491. package/src/orchestration/contradiction-linking-coordinator.ts +35 -1
  492. package/src/orchestration/dependency-propagation-triggers.test.ts +286 -0
  493. package/src/orchestration/dependency-propagation.test.ts +487 -0
  494. package/src/orchestration/dependency-propagation.ts +263 -0
  495. package/src/orchestration/dependency-revalidation.ts +173 -0
  496. package/src/orchestration/extraction-persist-deps.ts +93 -0
  497. package/src/orchestration/extraction-persist.ts +101 -94
  498. package/src/orchestration/harmonic-construction-persist.ts +86 -0
  499. package/src/orchestration/recall-internal.ts +1 -0
  500. package/src/orchestrator.ts +2 -1
  501. package/src/schemas.ts +15 -0
  502. package/src/storage.ts +14 -0
  503. package/src/temporal-supersession.ts +29 -1
  504. package/src/testing/orchestrator-lite.ts +27 -8
  505. package/src/testing/subjects/extraction-lifecycle.test.ts +91 -50
  506. package/src/types.ts +22 -7
  507. package/dist/chunk-3S63QIFQ.js.map +0 -1
  508. package/dist/chunk-CMQZNEIF.js.map +0 -1
  509. package/dist/chunk-DNHVPZOD.js.map +0 -1
  510. package/dist/chunk-EY64JLOM.js.map +0 -1
  511. package/dist/chunk-FZZ2QTJI.js +0 -111
  512. package/dist/chunk-FZZ2QTJI.js.map +0 -1
  513. package/dist/chunk-IZANPXMV.js.map +0 -1
  514. package/dist/chunk-J7T4MX7P.js.map +0 -1
  515. package/dist/chunk-KVJRXN2E.js.map +0 -1
  516. package/dist/chunk-LPSF4OQH.js +0 -47
  517. package/dist/chunk-LPSF4OQH.js.map +0 -1
  518. package/dist/chunk-LZGCJSQR.js.map +0 -1
  519. package/dist/chunk-OADWQ5CR.js +0 -115
  520. package/dist/chunk-OADWQ5CR.js.map +0 -1
  521. package/dist/chunk-RN53QBM4.js.map +0 -1
  522. package/dist/chunk-W4FBGYGK.js.map +0 -1
  523. package/dist/chunk-YQIVWS7Y.js.map +0 -1
  524. /package/dist/{auto-sync-7O6RP2RT.js.map → auto-sync-QFQGOEO2.js.map} +0 -0
  525. /package/dist/{capsule-crypto-YO5QJ6L3.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
  526. /package/dist/{capsule-merge-6GFHWECG.js.map → capsule-merge-KXTRZ23Z.js.map} +0 -0
  527. /package/dist/{chunk-ICP53SKG.js.map → chunk-2HIJHXB3.js.map} +0 -0
  528. /package/dist/{chunk-BXLOS5AJ.js.map → chunk-2NLLXCJG.js.map} +0 -0
  529. /package/dist/{chunk-5JRC6BYS.js.map → chunk-47J4EDGR.js.map} +0 -0
  530. /package/dist/{chunk-2VHLLPTX.js.map → chunk-4EABKPZS.js.map} +0 -0
  531. /package/dist/{chunk-RJV6Q2FT.js.map → chunk-4JWJMRPJ.js.map} +0 -0
  532. /package/dist/{chunk-MXPB6PJQ.js.map → chunk-4S3ECH3U.js.map} +0 -0
  533. /package/dist/{chunk-CGASUJVP.js.map → chunk-5V6IXHPI.js.map} +0 -0
  534. /package/dist/{chunk-R5IGA2NH.js.map → chunk-5XCN4XBU.js.map} +0 -0
  535. /package/dist/{chunk-2RPJ4NEE.js.map → chunk-64BHFFKZ.js.map} +0 -0
  536. /package/dist/{chunk-FQC3DHH2.js.map → chunk-66SE3BNH.js.map} +0 -0
  537. /package/dist/{chunk-TERNBNJB.js.map → chunk-6FC3IZ26.js.map} +0 -0
  538. /package/dist/{chunk-K7VKAHFE.js.map → chunk-6XGEBQ3R.js.map} +0 -0
  539. /package/dist/{chunk-JFLOOTXU.js.map → chunk-7BLWBSRL.js.map} +0 -0
  540. /package/dist/{chunk-ABR2HEJO.js.map → chunk-7NDM2PNK.js.map} +0 -0
  541. /package/dist/{chunk-JXZ7NLYH.js.map → chunk-7VWZ4LRW.js.map} +0 -0
  542. /package/dist/{chunk-R6YJI3HE.js.map → chunk-AW4QUFQF.js.map} +0 -0
  543. /package/dist/{chunk-P65YJEEL.js.map → chunk-AXFWMRKI.js.map} +0 -0
  544. /package/dist/{chunk-WG5HSQ4P.js.map → chunk-BAKXNQ3C.js.map} +0 -0
  545. /package/dist/{chunk-NM2WP3B7.js.map → chunk-BJYET5TX.js.map} +0 -0
  546. /package/dist/{chunk-HLKPRWF4.js.map → chunk-DATDLJAO.js.map} +0 -0
  547. /package/dist/{chunk-DX3XRGLH.js.map → chunk-DQTCGVFK.js.map} +0 -0
  548. /package/dist/{chunk-IPBNC77A.js.map → chunk-E633OXMH.js.map} +0 -0
  549. /package/dist/{chunk-Z5UC3OKB.js.map → chunk-ELQCS47S.js.map} +0 -0
  550. /package/dist/{chunk-FMXJ555A.js.map → chunk-EURCX6PS.js.map} +0 -0
  551. /package/dist/{chunk-MZZR3J6M.js.map → chunk-FV7YQTN3.js.map} +0 -0
  552. /package/dist/{chunk-3R6D33UF.js.map → chunk-GGBSF2X7.js.map} +0 -0
  553. /package/dist/{chunk-SYUBB3WM.js.map → chunk-GKEYXXKX.js.map} +0 -0
  554. /package/dist/{chunk-5AGR7SAI.js.map → chunk-GSEPRIZC.js.map} +0 -0
  555. /package/dist/{chunk-UTVZKHJK.js.map → chunk-GUKBW4HL.js.map} +0 -0
  556. /package/dist/{chunk-2F6NP3NT.js.map → chunk-HDQUQBPW.js.map} +0 -0
  557. /package/dist/{chunk-6HMYUWXR.js.map → chunk-HTP6XRUI.js.map} +0 -0
  558. /package/dist/{chunk-UYUYZ4WY.js.map → chunk-IARXXZU4.js.map} +0 -0
  559. /package/dist/{chunk-MNB5RMAY.js.map → chunk-IIFFC3RL.js.map} +0 -0
  560. /package/dist/{chunk-VDX2J7OX.js.map → chunk-IPLYGWQF.js.map} +0 -0
  561. /package/dist/{chunk-NZBZ7IS2.js.map → chunk-JDCQK3C5.js.map} +0 -0
  562. /package/dist/{chunk-C3KVFJH5.js.map → chunk-JI62YGPI.js.map} +0 -0
  563. /package/dist/{chunk-LULR4IUW.js.map → chunk-KATEWTQJ.js.map} +0 -0
  564. /package/dist/{chunk-BMCHFWGX.js.map → chunk-KMWYZTIE.js.map} +0 -0
  565. /package/dist/{chunk-JGSKJHF7.js.map → chunk-KQS72GCR.js.map} +0 -0
  566. /package/dist/{chunk-2RIWJUSQ.js.map → chunk-LQKXVQZR.js.map} +0 -0
  567. /package/dist/{chunk-LQL7ARIC.js.map → chunk-LTOAJXZB.js.map} +0 -0
  568. /package/dist/{chunk-QKD65RGL.js.map → chunk-LYMNZZIM.js.map} +0 -0
  569. /package/dist/{chunk-3PY7VHV7.js.map → chunk-MCA2X4WH.js.map} +0 -0
  570. /package/dist/{chunk-S5NZBKKQ.js.map → chunk-N3CXAYPJ.js.map} +0 -0
  571. /package/dist/{chunk-WQIHRA5F.js.map → chunk-N3LL5NEU.js.map} +0 -0
  572. /package/dist/{chunk-Z4U6U3M3.js.map → chunk-NKL25FCF.js.map} +0 -0
  573. /package/dist/{chunk-LMDRGRJ2.js.map → chunk-NOB2T2FC.js.map} +0 -0
  574. /package/dist/{chunk-P2OTGMTR.js.map → chunk-NSGU76YO.js.map} +0 -0
  575. /package/dist/{chunk-L6DCVUCA.js.map → chunk-O76MWTVS.js.map} +0 -0
  576. /package/dist/{chunk-WZFAPHIK.js.map → chunk-OIOZ6MOP.js.map} +0 -0
  577. /package/dist/{chunk-UMOO7IY7.js.map → chunk-P2KBDJJ6.js.map} +0 -0
  578. /package/dist/{chunk-SXWHN7GC.js.map → chunk-PDEKQWDV.js.map} +0 -0
  579. /package/dist/{chunk-ENEA47UC.js.map → chunk-PLCHU56K.js.map} +0 -0
  580. /package/dist/{chunk-IXPKESVP.js.map → chunk-PWIMF7LP.js.map} +0 -0
  581. /package/dist/{chunk-RHTO4HTL.js.map → chunk-PWLB4TRK.js.map} +0 -0
  582. /package/dist/{chunk-RVYVMQK4.js.map → chunk-QSYL5CXK.js.map} +0 -0
  583. /package/dist/{chunk-B6KGGRUL.js.map → chunk-QWLW3VQH.js.map} +0 -0
  584. /package/dist/{chunk-JBPKEARU.js.map → chunk-RKNJBZ55.js.map} +0 -0
  585. /package/dist/{chunk-QCECHYZL.js.map → chunk-RVO6TCTU.js.map} +0 -0
  586. /package/dist/{chunk-SHDZNSK4.js.map → chunk-S2SJEOTM.js.map} +0 -0
  587. /package/dist/{chunk-ULWHRQEQ.js.map → chunk-S75UQ3T3.js.map} +0 -0
  588. /package/dist/{chunk-LXOM6IQU.js.map → chunk-SEF4IOFE.js.map} +0 -0
  589. /package/dist/{chunk-I3YHVVT4.js.map → chunk-SHYIMIX5.js.map} +0 -0
  590. /package/dist/{chunk-G5OB4XZX.js.map → chunk-VANZKHTN.js.map} +0 -0
  591. /package/dist/{chunk-I4TQST3L.js.map → chunk-VFS3MK5F.js.map} +0 -0
  592. /package/dist/{chunk-SMPVHGHG.js.map → chunk-WPZX7MEA.js.map} +0 -0
  593. /package/dist/{chunk-ZRWB5D4H.js.map → chunk-WT6UL3UA.js.map} +0 -0
  594. /package/dist/{chunk-DQEMWVMT.js.map → chunk-X7Y7WX73.js.map} +0 -0
  595. /package/dist/{chunk-JHMAYABJ.js.map → chunk-XL3TATMJ.js.map} +0 -0
  596. /package/dist/{chunk-MC6XO7T4.js.map → chunk-YLBE6PLR.js.map} +0 -0
  597. /package/dist/{chunk-OLX2HJFW.js.map → chunk-YLHM5BQQ.js.map} +0 -0
  598. /package/dist/{chunk-EZ25VE3G.js.map → chunk-YNDLCWXS.js.map} +0 -0
  599. /package/dist/{chunk-GF22HWS2.js.map → chunk-Z54EM5YZ.js.map} +0 -0
  600. /package/dist/{chunk-GVX3NAUU.js.map → chunk-ZDAYWJV6.js.map} +0 -0
  601. /package/dist/{chunk-EYAIZBLM.js.map → chunk-ZJIFYUJI.js.map} +0 -0
  602. /package/dist/{chunk-CNQQMB67.js.map → chunk-ZN4EYMKJ.js.map} +0 -0
  603. /package/dist/{resolution-3K27T4VO.js.map → coding/pre-action-gate.js.map} +0 -0
  604. /package/dist/{first-start-migration-ZSHEFEI3.js.map → first-start-migration-626C5554.js.map} +0 -0
  605. /package/dist/{forget-DNAJ66ZD.js.map → forget-GJ42LCBW.js.map} +0 -0
  606. /package/dist/{tier-stats-OPTSBNRH.js.map → tier-stats-2JCZYEF7.js.map} +0 -0
@@ -18,6 +18,7 @@ export const EXTRACTION_RESPONSE_SHAPE = `{
18
18
  "confidence": 0.0,
19
19
  "tags": ["<tag>"],
20
20
  "entityRef": "<optional normalized-name>",
21
+ "cueAnchors": [{"type": "<anchor-type>", "value": "<entity-or-topic plus key aspect>"}],
21
22
  "promptedByQuestion": "<optional source-grounded question>",
22
23
  "quote": "<optional exact contiguous source span>",
23
24
  "scope": "<optional project-or-global>",
@@ -40,12 +41,18 @@ export const EXTRACTION_RESPONSE_SHAPE = `{
40
41
  "profileUpdates": ["<source-grounded profile update>"],
41
42
  "questions": [{"question": "<source-grounded unresolved question>", "context": "<source-grounded context>", "priority": 0.0}],
42
43
  "identityReflection": "<conversation-grounded agent reflection>",
44
+ "episodeTitle": "<six-to-eight word conversation segment title>",
43
45
  "relationships": [{"source": "<normalized-name>", "target": "<normalized-name>", "label": "<source-grounded relationship>"}]
44
46
  }`;
45
47
  export const EXTRACTION_RESPONSE_PLACEHOLDERS: Record<string, true> = {};
46
48
  for (const placeholder of EXTRACTION_RESPONSE_SHAPE.match(/<[^<>\r\n]+>/g) ?? []) {
47
49
  EXTRACTION_RESPONSE_PLACEHOLDERS[placeholder] = true;
48
50
  }
51
+ export const CUE_ANCHOR_PROMPT_INSTRUCTION = `- For each fact, emit at most 3 "cueAnchors".
52
+ - Each cue anchor value must be a source-grounded search hook of at most 120 characters, in the form "<main entity or topic> <key aspect>".
53
+ - Set each cue anchor type to entity, file, tool, outcome, constraint, or date.
54
+ - Omit cue anchors when the conversation does not support a useful search hook.
55
+ - Example: "Alice booked Bistro Max for Mike's surprise party" can use {"type":"entity","value":"Mike surprise party"} and {"type":"entity","value":"Alice restaurant booking"}.`;
49
56
 
50
57
  /**
51
58
  * Bi-temporal event-time extraction instruction (#1578 PR2). Emitted on
@@ -67,7 +74,11 @@ When a fact states when it became or stopped being true, copy that explicit temp
67
74
  * `ambientCapture` marks input from an always-on recorder, which may carry
68
75
  * speech the user never authored (issue #2294).
69
76
  */
70
- export function buildExtractionInstructions(config: PluginConfig, existingEntities?: string[], ambientCapture = false): string {
77
+ export function buildExtractionInstructions(
78
+ config: PluginConfig,
79
+ existingEntities?: string[],
80
+ ambientCapture = false
81
+ ): string {
71
82
  const lifecycleCaps = resolveMemoryLifecycleCapabilities(config);
72
83
  return `You are a memory extraction system. Analyze the following conversation and extract durable, reusable memories.
73
84
 
@@ -81,8 +92,12 @@ Memory categories:
81
92
  - principle: Durable rules, values, or operating beliefs (e.g., "never use Chat Completions API")
82
93
  - commitment: Promises, obligations, or deadlines (e.g., "deploy by Friday", "call accountant Monday")
83
94
  - moment: Emotionally significant events or milestones (e.g., "first successful deployment of engram")
84
- - skill: Capabilities the user or agent has demonstrated (e.g., "user is proficient with Kubernetes")${resolveRecallAuxiliaryCapabilities(config).causalRuleExtraction ? `
85
- - rule: Causal rules discovered through experience (format: "IF <condition> THEN <action/outcome>", e.g., "IF Shopify API returns 401 THEN the admin token is missing read_products scope")` : ""}
95
+ - skill: Capabilities the user or agent has demonstrated (e.g., "user is proficient with Kubernetes")${
96
+ resolveRecallAuxiliaryCapabilities(config).causalRuleExtraction
97
+ ? `
98
+ - rule: Causal rules discovered through experience (format: "IF <condition> THEN <action/outcome>", e.g., "IF Shopify API returns 401 THEN the admin token is missing read_products scope")`
99
+ : ""
100
+ }
86
101
  - procedure: A reusable workflow the user wants remembered the same way across sessions. Set category to "procedure". Use "content" for a short title that includes explicit trigger phrasing (e.g. "When you deploy to production…", "Whenever you ship a release…"). Add "procedureSteps": an array of at least two objects {"order": number, "intent": "concrete step description"} in execution order. Optional per-step "toolCall": {"kind": "…", "signature": "…"}, "expectedOutcome", "optional": true.
87
102
  - reasoning_trace: A stored solution chain / chain-of-thought the user walked through to solve a problem (e.g. "Here's how I debugged the latency spike: first I checked…, then I…, finally I…"). Set category to "reasoning_trace". Use "content" for a short title summarising the problem (e.g. "How I debugged the staging latency spike"). Add "reasoningTrace": {"steps": [{"order": number, "description": "what happened at this step"}, …], "finalAnswer": "the conclusion or answer", "observedOutcome": "optional confirmation of how it played out"}. Require at least two ordered steps AND a finalAnswer. Use this category only when the user explicitly narrates their reasoning — not for ordinary decisions (use "decision") or reusable workflows (use "procedure").
88
103
 
@@ -98,6 +113,7 @@ Rules:
98
113
  - Entity references should use normalized names (lowercase, hyphenated: "jane-doe", "acme-corp")
99
114
  - CRITICAL: Entity names must be CANONICAL. Always use the hyphenated multi-word form: "acme-corp" NOT "acmecorp" or "acme". "jane-doe" NOT "janedoe" or "jane". If unsure, prefer the most specific full name.
100
115
  - Avoid creating entities typed as "other" when a more specific type fits (company, project, tool, person, place)
116
+ ${CUE_ANCHOR_PROMPT_INSTRUCTION}
101
117
  - When entity facts clearly belong under a durable named heading, add them to entity.structuredSections as {key, title, facts}. Example person headings: "Beliefs", "Communication Style", "Building / Working On". Leave structuredSections empty when no stable heading fits.
102
118
  - Tags should be concise and reusable (e.g., "coding-style", "personal", "tools")
103
119
  - When a fact contains measurable, categorical, or precisely valued data, include a "structuredAttributes" field with key-value string pairs (e.g., {"price": "29.99", "brand": "Sony"}, {"date": "2024-03-15", "location": "SF"}, {"chosen": "PostgreSQL", "rejected": "MongoDB"}). Only for concrete values, not narrative content.
@@ -105,17 +121,29 @@ Rules:
105
121
  * Explicit (0.95-1.0): Direct user statements — "I prefer X", "my name is Y"
106
122
  * Implied (0.70-0.94): Strong contextual inference — user consistently does X, clear from conversation flow
107
123
  * Inferred (0.40-0.69): Pattern recognition — reasonable guess from limited evidence
108
- * Speculative (0.00-0.39): Tentative hypothesis — weak signal, needs future confirmation. Speculative memories auto-expire after 30 days if not confirmed.${ambientCapture ? AMBIENT_SPECULATIVE_TIER_CLAUSE : ""}${config.provenance?.enabled ? `
109
- - Source quotes: For each fact, include a "quote" field containing the EXACT verbatim words from the conversation that support the fact. Copy a contiguous span from a single speaker turn (not a paraphrase, not a summary). Cap at ~300 characters. This grounds every memory in the literal utterance that created it.` : ""}
110
- - For commitments: include any deadline or timeframe mentioned${lifecycleCaps.extractionScopeClassification ? `
124
+ * Speculative (0.00-0.39): Tentative hypothesis — weak signal, needs future confirmation. Speculative memories auto-expire after 30 days if not confirmed.${ambientCapture ? AMBIENT_SPECULATIVE_TIER_CLAUSE : ""}${
125
+ config.provenance?.enabled
126
+ ? `
127
+ - Source quotes: For each fact, include a "quote" field containing the EXACT verbatim words from the conversation that support the fact. Copy a contiguous span from a single speaker turn (not a paraphrase, not a summary). Cap at ~300 characters. This grounds every memory in the literal utterance that created it.`
128
+ : ""
129
+ }
130
+ - For commitments: include any deadline or timeframe mentioned${
131
+ lifecycleCaps.extractionScopeClassification
132
+ ? `
111
133
 
112
134
  Scope classification:
113
135
  For each fact, set "scope" to one of:
114
136
  - "global" — knowledge that applies across projects: core framework/library bugs, API behavior patterns, user preferences (editor, language, style), general coding patterns, infrastructure knowledge, technology facts not tied to one codebase
115
137
  - "project" — knowledge specific to one codebase: file paths, environment configs, deployment details, project-specific workarounds, team/stakeholder info tied to one project, repo-specific conventions. Tool, command, or CLI-flag instructions TIED TO ONE AGENT are also "project", because the same tool name means different things in different agent integrations (a "search" tool may search repository code in one agent and the web in another); when keeping such an agent-tied instruction, the fact text MUST name the originating agent as a leading "In <agent>," clause (e.g. "In Pi, use the search tool with a repository path."). A tool/command fact that holds in every agent and every repo is NOT agent-tied — leave it "global" and do not add a qualifier (e.g. "\`git status --short\` emits compact output"). Examples: "In Pi, the search tool takes a repository path" -> "project"; "\`git status --short\` emits compact output" -> "global".
116
- When in doubt, prefer "project" — it is safer to keep knowledge scoped narrowly.` : ""}
117
- ${ambientCapture ? `${AMBIENT_CAPTURE_PROMPT_SECTION}
118
- ` : ""}
138
+ When in doubt, prefer "project" — it is safer to keep knowledge scoped narrowly.`
139
+ : ""
140
+ }
141
+ ${
142
+ ambientCapture
143
+ ? `${AMBIENT_CAPTURE_PROMPT_SECTION}
144
+ `
145
+ : ""
146
+ }
119
147
  Entity creation rules (STRICT):
120
148
  - Only create entities for DURABLE things: real people, companies, products, tools, ongoing projects
121
149
  - NEVER create entities for transient items: individual PRs, branches, Jira tickets, meetings, agent task IDs, log files, database tables, cron job runs, sessions
@@ -123,12 +151,16 @@ Entity creation rules (STRICT):
123
151
  - Prefer attaching facts to broad parent entities rather than creating sub-entities. E.g., "acme-store uses Algolia for search" is a fact on entity "acme-store", NOT a new entity "acme-store-algolia-connector"
124
152
  - The entity list should be SHORT — think "things that would have their own Wikipedia page" not "things mentioned in passing"
125
153
 
126
- ${existingEntities && existingEntities.length > 0 ? `
154
+ ${
155
+ existingEntities && existingEntities.length > 0
156
+ ? `
127
157
  KNOWN ENTITIES (use these exact names when referencing existing things):
128
158
  ${existingEntities.join(", ")}
129
159
 
130
160
  When you see something that matches a known entity, use THAT name exactly. Only create a NEW entity if nothing in this list represents it.
131
- ` : ""}
161
+ `
162
+ : ""
163
+ }
132
164
  ${eventTimePromptInstruction(config)}
133
165
  Also extract relationships between entities mentioned in the conversation.
134
166
  - Format: {source: "entity-name", target: "entity-name", label: "relationship description"}
@@ -136,6 +168,8 @@ Also extract relationships between entities mentioned in the conversation.
136
168
  - Only include clear, durable relationships (e.g., "works at", "created", "manages", "uses")
137
169
  - Use normalized entity names (e.g., "person-jane-doe", "company-acme-corp")
138
170
 
171
+
172
+ Also emit "episodeTitle" as a six-to-eight word title for this conversation segment.
139
173
  Questions are optional. Include only source-grounded unresolved questions that would be useful in future sessions; otherwise return an empty array.
140
174
 
141
175
  Finally, write a brief identity reflection about the agent who had this conversation, based only on the conversation. Do not write about the extraction process.`;
package/src/extraction.ts CHANGED
@@ -4,6 +4,7 @@ import { delinearize } from "./delinearize.js";
4
4
  import { LocalLlmClient } from "./local-llm.js";
5
5
  import { shouldRunProactivePass } from "./proactive-contention.js";
6
6
  import { FallbackLlmClient, fallbackLlmRuntimeContextFromConfig, gatewayTaskChainOptions } from "./fallback-llm.js";
7
+ import { revalidateDependentsViaLlm } from "./orchestration/dependency-revalidation.js";
7
8
  import {
8
9
  ExtractionResultSchema,
9
10
  ConsolidationResultSchema,
@@ -47,7 +48,14 @@ import { applyGroundingWithConnector, headerConnector, renderExtractionConversat
47
48
  import { isMemoryCategory } from "./write-envelope.js";
48
49
  import { classifyExtractionThrownError, classifyFallbackParseFailure } from "./extraction-error-classification.js";
49
50
  import { AMBIENT_CAPTURE_PROMPT_SECTION_COMPACT, clampAmbientCaptureConfidence } from "./ambient-provenance.js";
50
- import { EXTRACTION_RESPONSE_PLACEHOLDERS, EXTRACTION_RESPONSE_SHAPE, buildExtractionInstructions, eventTimePromptInstruction } from "./extraction-prompt.js";
51
+ import { CUE_ANCHOR_PROMPT_INSTRUCTION, EXTRACTION_RESPONSE_SHAPE, buildExtractionInstructions, eventTimePromptInstruction } from "./extraction-prompt.js";
52
+ import {
53
+ containsExtractionPlaceholder,
54
+ extractionAttributes,
55
+ extractionCueAnchors,
56
+ extractionText,
57
+ isPlainRecord,
58
+ } from "./extraction-normalization.js";
51
59
  export { classifyExtractionThrownError, classifyFallbackParseFailure } from "./extraction-error-classification.js";
52
60
  import { resolveLocalLlmCapabilities, resolveMemoryLifecycleCapabilities, resolvePipelineProcessingCapabilities, resolveRecallAuxiliaryCapabilities } from "./capabilities.js";
53
61
 
@@ -71,34 +79,6 @@ const CONSOLIDATION_RESPONSE_SCHEMA = `{
71
79
  "entityUpdates": [{"name": "person-jane-doe", "type": "person", "facts": ["Now leads the backend team", "Recently migrated the user service to TypeScript"]}]
72
80
  }`;
73
81
 
74
- function isPlainRecord(value: unknown): value is Record<string, unknown> {
75
- return typeof value === "object" && value !== null && !Array.isArray(value);
76
- }
77
-
78
- function containsExtractionPlaceholder(value: unknown): boolean {
79
- if (typeof value === "string") return EXTRACTION_RESPONSE_PLACEHOLDERS[value.trim()] === true;
80
- if (Array.isArray(value)) return value.some(containsExtractionPlaceholder);
81
- return isPlainRecord(value) && Object.values(value).some(containsExtractionPlaceholder);
82
- }
83
-
84
- function extractionText(value: unknown): string | undefined {
85
- if (typeof value !== "string") return undefined;
86
- const text = value.trim();
87
- return text.length > 0 && !containsExtractionPlaceholder(text) ? text : undefined;
88
- }
89
-
90
- function extractionAttributes(value: unknown): Record<string, string> | undefined {
91
- if (!isPlainRecord(value)) return undefined;
92
- const attributes: Record<string, string> = {};
93
- for (const [key, candidate] of Object.entries(value)) {
94
- const normalizedKey = extractionText(key);
95
- const normalizedValue = extractionText(candidate);
96
- if (normalizedKey !== undefined && normalizedValue !== undefined) {
97
- attributes[normalizedKey] = normalizedValue;
98
- }
99
- }
100
- return Object.keys(attributes).length > 0 ? attributes : undefined;
101
- }
102
82
 
103
83
  function extractionEntityType(value: unknown): ExtractedEntityResult["type"] | undefined {
104
84
  const type = extractionText(value);
@@ -268,9 +248,13 @@ export class ExtractionEngine {
268
248
  if (resolvePipelineProcessingCapabilities(this.config).delinearize) {
269
249
  content = delinearize(content, result.entities, ts);
270
250
  }
271
- return { ...fact, content };
251
+ return {
252
+ ...fact,
253
+ content,
254
+ cueAnchors: extractionCueAnchors(fact.cueAnchors),
255
+ };
272
256
  });
273
- return { ...result, facts };
257
+ return { ...result, facts, episodeTitle: extractionText(result.episodeTitle) };
274
258
  }
275
259
 
276
260
  private hasExtractionOutputs(result: ExtractionResult): boolean {
@@ -338,6 +322,7 @@ export class ExtractionEngine {
338
322
  })
339
323
  : [],
340
324
  entityRef: extractionText(f.entityRef),
325
+ cueAnchors: extractionCueAnchors(f.cueAnchors),
341
326
  promptedByQuestion: extractionText(f.promptedByQuestion),
342
327
  scope:
343
328
  f.scope === "global" || f.scope === "project" ? f.scope : undefined,
@@ -398,6 +383,7 @@ export class ExtractionEngine {
398
383
  profileUpdates,
399
384
  questions,
400
385
  identityReflection: extractionText(parsed?.identityReflection),
386
+ episodeTitle: extractionText(parsed?.episodeTitle),
401
387
  relationships,
402
388
  };
403
389
  }
@@ -1448,7 +1434,7 @@ Rules:
1448
1434
  - Use normalized, hyphenated entity names and keep the entity list short.
1449
1435
  - Keep facts standalone. Skip transient task state and operational noise such as routine scheduler, monitoring, or automation status.
1450
1436
  - Add structuredAttributes only for concrete values.
1451
- - Include at most five durable relationships.${this.config.provenance?.enabled ? `
1437
+ ${CUE_ANCHOR_PROMPT_INSTRUCTION}\n- Include at most five durable relationships.${this.config.provenance?.enabled ? `
1452
1438
  - Each fact must include a quote copied verbatim from one contiguous conversation span.` : ""}${lifecycleCaps.extractionScopeClassification ? `
1453
1439
  - Set each fact scope to "global" for cross-project knowledge or "project" for codebase-specific knowledge. Tool, command, or CLI-flag instructions tied to one agent are "project" (the same tool name can mean different things across agents); when keeping one, begin the fact with a leading "In <agent>," clause naming that agent.` : ""}${ambientCapture ? AMBIENT_CAPTURE_PROMPT_SECTION_COMPACT : ""}
1454
1440
  ${eventTimePromptInstruction(this.config)}
@@ -2455,6 +2441,36 @@ Respond with valid JSON matching this schema:
2455
2441
  return null;
2456
2442
  }
2457
2443
  }
2444
+ async revalidateDependents(
2445
+ superseded: { id: string; content: string },
2446
+ replacement: { id: string; content: string } | null,
2447
+ dependents: Array<{ id: string; category: string; content: string }>,
2448
+ signal?: AbortSignal,
2449
+ ): Promise<{
2450
+ verdicts: Array<{
2451
+ memoryId: string;
2452
+ verdict: "still_valid" | "invalidated" | "uncertain";
2453
+ reason?: string;
2454
+ }>;
2455
+ }> {
2456
+ return revalidateDependentsViaLlm(
2457
+ {
2458
+ shouldUseLocalLlm: this.shouldUseLocalLlm,
2459
+ shouldUseDirectClient: this.shouldUseDirectClient,
2460
+ localLlm: this.localLlm,
2461
+ fallbackLlm: this.fallbackLlm,
2462
+ client: this.client,
2463
+ config: this.config,
2464
+ withGatewayAgent: this.withGatewayAgent.bind(this),
2465
+ parseJsonObject: this.parseJsonObject,
2466
+ },
2467
+ superseded,
2468
+ replacement,
2469
+ dependents,
2470
+ signal,
2471
+ );
2472
+ }
2473
+
2458
2474
 
2459
2475
  /**
2460
2476
  * Suggest links between a new memory and existing memories (Phase 3A).
@@ -23,6 +23,7 @@ import test from "node:test";
23
23
  import { parseConfig } from "./config.js";
24
24
  import { Orchestrator } from "./orchestrator.js";
25
25
  import { readEdges } from "./graph.js";
26
+ import { searchHarmonicRetrieval } from "./harmonic-retrieval.js";
26
27
  import type { ExtractionResult, PluginConfig } from "./types.js";
27
28
  import type { LocalLlmClient } from "./local-llm.js";
28
29
  import type { BufferTurn, ConversationThread } from "./types.js";
@@ -96,6 +97,8 @@ async function makeHarness(): Promise<OrchHarness> {
96
97
  extractionMinChars: 0,
97
98
  extractionMinImportanceLevel: "trivial",
98
99
  inlineSourceAttributionEnabled: false,
100
+ harmonicRetrievalEnabled: true,
101
+ abstractionAnchorsEnabled: true,
99
102
  });
100
103
  const orchestrator = new Orchestrator(config);
101
104
  return { orchestrator, memoryDir };
@@ -190,6 +193,20 @@ test("pending_review fact gets no graph edge; an active fact with the same entit
190
193
  !edgesAfter1.some((e) => e.from.includes(id1!) || e.from.includes(id0!)),
191
194
  "neither fact0 nor fact1 originates an entity edge",
192
195
  );
196
+ const harmonicAfter1 = await searchHarmonicRetrieval({
197
+ memoryDir,
198
+ query: "widget factory",
199
+ maxResults: 10,
200
+ anchorsEnabled: true,
201
+ });
202
+ assert.ok(
203
+ harmonicAfter1.some((result) => result.node.sourceMemoryIds?.includes(id0!)),
204
+ "active fact must appear in harmonic node sources",
205
+ );
206
+ assert.ok(
207
+ !harmonicAfter1.some((result) => result.node.sourceMemoryIds?.includes(id1!)),
208
+ "pending_review fact must not appear in harmonic node sources",
209
+ );
193
210
 
194
211
  // Control: an ACTIVE fact with the same entityRef DOES create entity edges
195
212
  // (proving the graph is wired and only pending_review is excluded).
@@ -219,6 +236,16 @@ test("pending_review fact gets no graph edge; an active fact with the same entit
219
236
  !edgesAfter2.some((e) => e.from.includes(id1!)),
220
237
  "pending_review fact1 must never originate an entity edge even after a later active fact",
221
238
  );
239
+ const harmonicAfter2 = await searchHarmonicRetrieval({
240
+ memoryDir,
241
+ query: "widget factory",
242
+ maxResults: 10,
243
+ anchorsEnabled: true,
244
+ });
245
+ assert.ok(
246
+ harmonicAfter2.some((result) => result.node.sourceMemoryIds?.includes(id2!)),
247
+ "active fact must appear in harmonic node sources",
248
+ );
222
249
  } finally {
223
250
  await rm(memoryDir, { recursive: true, force: true });
224
251
  }