@remnic/core 9.3.613 → 9.3.615

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 (386) hide show
  1. package/dist/access-cli.js +59 -58
  2. package/dist/access-cli.js.map +1 -1
  3. package/dist/access-http.d.ts +4 -2
  4. package/dist/access-http.js +23 -23
  5. package/dist/access-mcp.d.ts +9 -2
  6. package/dist/access-mcp.js +20 -20
  7. package/dist/access-schema.d.ts +26 -14
  8. package/dist/access-schema.js +3 -3
  9. package/dist/{access-service-D2J9dh_9.d.ts → access-service-CBNEKjzN.d.ts} +71 -6
  10. package/dist/access-service.d.ts +2 -2
  11. package/dist/access-service.js +17 -17
  12. package/dist/active-recall.js +20 -3
  13. package/dist/active-recall.js.map +1 -1
  14. package/dist/adapters/index.js +4 -4
  15. package/dist/adapters/registry.js +2 -2
  16. package/dist/behavior-learner.js +2 -3
  17. package/dist/behavior-learner.js.map +1 -1
  18. package/dist/bootstrap.d.ts +1 -1
  19. package/dist/briefing.js +3 -3
  20. package/dist/buffer.d.ts +1 -1
  21. package/dist/buffer.js +1 -1
  22. package/dist/calibration.d.ts +5 -2
  23. package/dist/calibration.js +7 -5
  24. package/dist/calibration.js.map +1 -1
  25. package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
  26. package/dist/causal-consolidation.d.ts +8 -2
  27. package/dist/causal-consolidation.js +13 -11
  28. package/dist/causal-consolidation.js.map +1 -1
  29. package/dist/{chunk-3BP57I6J.js → chunk-2F6NP3NT.js} +2 -1
  30. package/dist/{chunk-3BP57I6J.js.map → chunk-2F6NP3NT.js.map} +1 -1
  31. package/dist/{chunk-AU7Q3LSC.js → chunk-2QSZNTDO.js} +4 -4
  32. package/dist/{chunk-HSVJGWYS.js → chunk-2ROPI5OE.js} +2 -2
  33. package/dist/{chunk-C4SQJZAF.js → chunk-2SGJY2UY.js} +6 -3
  34. package/dist/chunk-2SGJY2UY.js.map +1 -0
  35. package/dist/{chunk-ZDTVJXIP.js → chunk-3MAONBX3.js} +13 -5
  36. package/dist/chunk-3MAONBX3.js.map +1 -0
  37. package/dist/{chunk-G3Z3QEF5.js → chunk-3PY7VHV7.js} +2 -2
  38. package/dist/chunk-3PY7VHV7.js.map +1 -0
  39. package/dist/{chunk-CF3ZF2YU.js → chunk-3QSU4NFF.js} +3 -3
  40. package/dist/{chunk-AJA46VX5.js → chunk-3T74IZB3.js} +11 -2
  41. package/dist/chunk-3T74IZB3.js.map +1 -0
  42. package/dist/{chunk-KVEVLBKC.js → chunk-4HFJQCJZ.js} +13 -8
  43. package/dist/chunk-4HFJQCJZ.js.map +1 -0
  44. package/dist/{chunk-KGK2QKWL.js → chunk-4R4KTDIE.js} +1 -1
  45. package/dist/chunk-4R4KTDIE.js.map +1 -0
  46. package/dist/{chunk-OI27U2HT.js → chunk-5BTCT236.js} +2 -2
  47. package/dist/{chunk-TH67Q46T.js → chunk-5OHHEORR.js} +64 -21
  48. package/dist/chunk-5OHHEORR.js.map +1 -0
  49. package/dist/{chunk-CO7ZO4TU.js → chunk-5VDJMYTF.js} +2 -2
  50. package/dist/{chunk-BFBF3XEF.js → chunk-6BDVBBBY.js} +33 -25
  51. package/dist/{chunk-BFBF3XEF.js.map → chunk-6BDVBBBY.js.map} +1 -1
  52. package/dist/{chunk-EAZGEEG2.js → chunk-6L46YAEZ.js} +45 -9
  53. package/dist/chunk-6L46YAEZ.js.map +1 -0
  54. package/dist/{chunk-YFS5OEKO.js → chunk-7MLB4NCL.js} +2 -2
  55. package/dist/{chunk-LZ3VEOU5.js → chunk-AL4RAJL5.js} +22 -5
  56. package/dist/chunk-AL4RAJL5.js.map +1 -0
  57. package/dist/{chunk-557IAFPD.js → chunk-APRRL26Q.js} +2 -2
  58. package/dist/{chunk-QDDHYAKV.js → chunk-AZDOWD2L.js} +2 -2
  59. package/dist/{chunk-MLT75J5S.js → chunk-B6SU7YSE.js} +3 -3
  60. package/dist/{chunk-FXKPZ3H6.js → chunk-BPSGLMQ4.js} +2 -2
  61. package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
  62. package/dist/{chunk-NOMEVTUD.js → chunk-C6C7XVKG.js} +5 -4
  63. package/dist/chunk-C6C7XVKG.js.map +1 -0
  64. package/dist/{chunk-XKIQZXUB.js → chunk-CI7RKSRE.js} +7 -1
  65. package/dist/chunk-CI7RKSRE.js.map +1 -0
  66. package/dist/{chunk-IK34DVAC.js → chunk-CIOMS6DI.js} +2 -2
  67. package/dist/{chunk-2I5JGH3M.js → chunk-CYEPCZN5.js} +2 -2
  68. package/dist/{chunk-2I5JGH3M.js.map → chunk-CYEPCZN5.js.map} +1 -1
  69. package/dist/{chunk-JHMFYY7L.js → chunk-DCGT4FPP.js} +13 -5
  70. package/dist/chunk-DCGT4FPP.js.map +1 -0
  71. package/dist/{chunk-7DZRO2DC.js → chunk-DEPRLVLK.js} +2 -2
  72. package/dist/{chunk-CSKLPDN6.js → chunk-DEVUWMME.js} +52 -19
  73. package/dist/chunk-DEVUWMME.js.map +1 -0
  74. package/dist/{chunk-DHGSZ3UD.js → chunk-DGNQRNLL.js} +2 -2
  75. package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
  76. package/dist/{chunk-HJNQQICM.js → chunk-EXUAP5LH.js} +108 -51
  77. package/dist/chunk-EXUAP5LH.js.map +1 -0
  78. package/dist/chunk-FAV25DUZ.js +12 -0
  79. package/dist/chunk-FAV25DUZ.js.map +1 -0
  80. package/dist/{chunk-ETUPBUHB.js → chunk-GDASG7NC.js} +2 -2
  81. package/dist/{chunk-L227SKTB.js → chunk-GDB4J2H3.js} +17 -1
  82. package/dist/chunk-GDB4J2H3.js.map +1 -0
  83. package/dist/{chunk-IP73YCZP.js → chunk-GLPBYIXN.js} +4 -2
  84. package/dist/chunk-GLPBYIXN.js.map +1 -0
  85. package/dist/{chunk-4HP7HIE3.js → chunk-HP5FMB6L.js} +2 -2
  86. package/dist/{chunk-EVZFIAPG.js → chunk-IBTZEBUD.js} +23 -10
  87. package/dist/chunk-IBTZEBUD.js.map +1 -0
  88. package/dist/{chunk-DOX2CG6Y.js → chunk-IEUU7O4F.js} +2 -2
  89. package/dist/{chunk-EUML3N6B.js → chunk-IMA6GU4Y.js} +3 -3
  90. package/dist/chunk-IMA6GU4Y.js.map +1 -0
  91. package/dist/{chunk-JNANKJLN.js → chunk-JOASJWQR.js} +2 -2
  92. package/dist/chunk-JOASJWQR.js.map +1 -0
  93. package/dist/{chunk-WSGF57U2.js → chunk-JQDZQ4TB.js} +2 -2
  94. package/dist/{chunk-HINSGUA7.js → chunk-KBL3JJR6.js} +9 -13
  95. package/dist/chunk-KBL3JJR6.js.map +1 -0
  96. package/dist/{chunk-IOTENEVL.js → chunk-KGLPJROV.js} +57 -50
  97. package/dist/chunk-KGLPJROV.js.map +1 -0
  98. package/dist/{chunk-W7L6HXUC.js → chunk-LXOM6IQU.js} +2 -2
  99. package/dist/{chunk-G6R5UD3Q.js → chunk-MGN7VHWQ.js} +42 -1
  100. package/dist/{chunk-G6R5UD3Q.js.map → chunk-MGN7VHWQ.js.map} +1 -1
  101. package/dist/{chunk-DLJ4IR6M.js → chunk-MHQC2WU2.js} +2 -2
  102. package/dist/chunk-MHQC2WU2.js.map +1 -0
  103. package/dist/{chunk-5RPTH6AU.js → chunk-NM5NQYJE.js} +20 -19
  104. package/dist/chunk-NM5NQYJE.js.map +1 -0
  105. package/dist/{chunk-6JGNHWCI.js → chunk-OBIRVF36.js} +3 -3
  106. package/dist/{chunk-CHCA44C3.js → chunk-ODPLEWB6.js} +3 -3
  107. package/dist/chunk-ODPLEWB6.js.map +1 -0
  108. package/dist/{chunk-HENLZHIT.js → chunk-OIF36KGD.js} +7 -4
  109. package/dist/chunk-OIF36KGD.js.map +1 -0
  110. package/dist/{chunk-GUPISBV2.js → chunk-PP2JH3GP.js} +2 -2
  111. package/dist/{chunk-OXJBNGBK.js → chunk-PSUB67YB.js} +2 -2
  112. package/dist/{chunk-UWY7GIVS.js → chunk-PYIFUBRK.js} +45 -13
  113. package/dist/chunk-PYIFUBRK.js.map +1 -0
  114. package/dist/{chunk-KIB7SDIJ.js → chunk-Q6YIJGXJ.js} +2 -2
  115. package/dist/{chunk-ZT3EGNLR.js → chunk-QPD426WT.js} +2 -2
  116. package/dist/{chunk-RLV3PQGH.js → chunk-QVO4YOB7.js} +6 -6
  117. package/dist/{chunk-GMAG2HS4.js → chunk-RG3LBSGH.js} +46 -9
  118. package/dist/chunk-RG3LBSGH.js.map +1 -0
  119. package/dist/{chunk-XSWKORGM.js → chunk-S53OYO3F.js} +3 -1
  120. package/dist/chunk-S53OYO3F.js.map +1 -0
  121. package/dist/{chunk-YCN4BVDK.js → chunk-SCPFRKIT.js} +4 -2
  122. package/dist/chunk-SCPFRKIT.js.map +1 -0
  123. package/dist/{chunk-NZPF2SYV.js → chunk-T7N6KQGS.js} +138 -5
  124. package/dist/chunk-T7N6KQGS.js.map +1 -0
  125. package/dist/{chunk-VJXSUAO7.js → chunk-TNOWU6RP.js} +13 -10
  126. package/dist/chunk-TNOWU6RP.js.map +1 -0
  127. package/dist/{chunk-PCI747N2.js → chunk-TZVQQTG4.js} +48 -19
  128. package/dist/chunk-TZVQQTG4.js.map +1 -0
  129. package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
  130. package/dist/{chunk-IK7DCC5H.js → chunk-VMGLYN42.js} +2 -2
  131. package/dist/{chunk-KM2A35EO.js → chunk-WB3LYXC5.js} +11 -7
  132. package/dist/chunk-WB3LYXC5.js.map +1 -0
  133. package/dist/{chunk-PPPZY2EU.js → chunk-WD2W4234.js} +9 -3
  134. package/dist/chunk-WD2W4234.js.map +1 -0
  135. package/dist/{chunk-NSKYFGDL.js → chunk-X4QQB7O6.js} +2 -2
  136. package/dist/{chunk-HPWVAEET.js → chunk-X6IRLNOO.js} +3 -7
  137. package/dist/chunk-X6IRLNOO.js.map +1 -0
  138. package/dist/{chunk-46GJIW5M.js → chunk-XAZOWLW4.js} +5 -5
  139. package/dist/{chunk-46GJIW5M.js.map → chunk-XAZOWLW4.js.map} +1 -1
  140. package/dist/{chunk-XPSVGJYA.js → chunk-YRMKDTKF.js} +12 -9
  141. package/dist/chunk-YRMKDTKF.js.map +1 -0
  142. package/dist/{chunk-6ZZP4EJF.js → chunk-ZJR7VG5L.js} +3 -3
  143. package/dist/{chunk-6ZZP4EJF.js.map → chunk-ZJR7VG5L.js.map} +1 -1
  144. package/dist/{chunk-2QANQKSQ.js → chunk-ZK32E74R.js} +156 -45
  145. package/dist/chunk-ZK32E74R.js.map +1 -0
  146. package/dist/{cli-OrfKXNU4.d.ts → cli-Cw729yLf.d.ts} +6 -2
  147. package/dist/cli.d.ts +3 -3
  148. package/dist/cli.js +61 -60
  149. package/dist/compounding/engine.js +3 -3
  150. package/dist/compounding/preference-consolidator.js +39 -11
  151. package/dist/compounding/preference-consolidator.js.map +1 -1
  152. package/dist/config.js +1 -1
  153. package/dist/connectors/codex-materialize-runner.js +3 -3
  154. package/dist/connectors/index.js +3 -3
  155. package/dist/consolidation-provenance-check.js +1 -1
  156. package/dist/contradiction/index.js +4 -4
  157. package/dist/conversation-index/backend.js +2 -2
  158. package/dist/conversation-index/indexer.js +1 -1
  159. package/dist/cross-namespace-budget.js +1 -1
  160. package/dist/enrichment/index.js +1 -1
  161. package/dist/entity-retrieval.js +3 -3
  162. package/dist/evals.js +1 -1
  163. package/dist/explicit-capture.d.ts +11 -1
  164. package/dist/explicit-capture.js +1 -1
  165. package/dist/extraction-judge.js +8 -1
  166. package/dist/extraction.js +2 -2
  167. package/dist/fallback-llm.d.ts +23 -6
  168. package/dist/fallback-llm.js +5 -3
  169. package/dist/{first-start-migration-GYJWIH36.js → first-start-migration-FF7YFGRP.js} +6 -6
  170. package/dist/index.d.ts +3 -3
  171. package/dist/index.js +95 -94
  172. package/dist/index.js.map +1 -1
  173. package/dist/lcm/archive.js +2 -2
  174. package/dist/lcm/engine.js +5 -5
  175. package/dist/lcm/index.js +7 -7
  176. package/dist/lcm/summarizer.js +3 -3
  177. package/dist/maintenance/memory-governance-cron.d.ts +6 -4
  178. package/dist/maintenance/memory-governance-cron.js +1 -1
  179. package/dist/maintenance/memory-governance.js +3 -3
  180. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
  181. package/dist/maintenance/rebuild-memory-projection.js +4 -4
  182. package/dist/mcp-memory-inspector-app.d.ts +2 -2
  183. package/dist/mcp-memory-inspector-app.js +1 -1
  184. package/dist/migrate/from-engram.js +1 -1
  185. package/dist/namespaces/migrate.js +16 -15
  186. package/dist/namespaces/search.js +12 -11
  187. package/dist/namespaces/storage.js +3 -3
  188. package/dist/network/webdav.d.ts +2 -0
  189. package/dist/network/webdav.js +1 -1
  190. package/dist/objective-state-writers.js +2 -2
  191. package/dist/operator-toolkit.d.ts +3 -1
  192. package/dist/operator-toolkit.js +21 -20
  193. package/dist/{orchestrator-DTRQG75J.d.ts → orchestrator-CqWOjfgl.d.ts} +46 -3
  194. package/dist/orchestrator.d.ts +1 -1
  195. package/dist/orchestrator.js +48 -45
  196. package/dist/patterns-cli.js +1 -1
  197. package/dist/qmd-recall-cache.d.ts +2 -0
  198. package/dist/qmd-recall-cache.js +1 -1
  199. package/dist/qmd.d.ts +37 -2
  200. package/dist/qmd.js +4 -1
  201. package/dist/recall-explain-renderer.js +3 -3
  202. package/dist/recall-planner-llm.d.ts +57 -0
  203. package/dist/recall-planner-llm.js +167 -0
  204. package/dist/recall-planner-llm.js.map +1 -0
  205. package/dist/recall-xray-cli.js +4 -4
  206. package/dist/recall-xray-renderer.js +3 -3
  207. package/dist/recall-xray.js +2 -2
  208. package/dist/resume-bundles.js +2 -2
  209. package/dist/retrieval-agents.js +2 -2
  210. package/dist/routing/store.js +1 -1
  211. package/dist/schemas.d.ts +22 -22
  212. package/dist/search/factory.js +11 -10
  213. package/dist/search/index.js +11 -10
  214. package/dist/search/lancedb-backend.d.ts +1 -1
  215. package/dist/search/lancedb-backend.js +3 -2
  216. package/dist/search/meilisearch-backend.d.ts +1 -1
  217. package/dist/search/meilisearch-backend.js +3 -2
  218. package/dist/search/noop-backend.d.ts +1 -1
  219. package/dist/search/noop-backend.js +1 -1
  220. package/dist/search/orama-backend.d.ts +1 -1
  221. package/dist/search/orama-backend.js +3 -2
  222. package/dist/search/port.d.ts +6 -1
  223. package/dist/search/port.js +7 -0
  224. package/dist/search/remote-backend.d.ts +1 -1
  225. package/dist/search/remote-backend.js +1 -1
  226. package/dist/semantic-consolidation.js +4 -4
  227. package/dist/semantic-rule-promotion.js +3 -3
  228. package/dist/semantic-rule-verifier.js +3 -3
  229. package/dist/session-observer-state.js +1 -1
  230. package/dist/storage.js +2 -2
  231. package/dist/summarizer.js +2 -2
  232. package/dist/temporal-index.js +1 -1
  233. package/dist/{tier-stats-SKML2OSF.js → tier-stats-3LYQ3VV5.js} +3 -3
  234. package/dist/transfer/backup.js +2 -2
  235. package/dist/transfer/capsule-export.js +2 -2
  236. package/dist/transfer/capsule-import.js +2 -2
  237. package/dist/transfer/export-sqlite.js +1 -1
  238. package/dist/transfer/types.d.ts +12 -12
  239. package/dist/types.d.ts +32 -0
  240. package/dist/types.js +1 -1
  241. package/dist/utility-learner.js +1 -1
  242. package/dist/utility-runtime.js +2 -2
  243. package/dist/verified-recall.js +3 -3
  244. package/dist/work/board.js +2 -2
  245. package/dist/work/storage.d.ts +2 -0
  246. package/dist/work/storage.js +1 -1
  247. package/package.json +1 -1
  248. package/src/access-http.ts +24 -10
  249. package/src/access-mcp.test.ts +160 -0
  250. package/src/access-mcp.ts +72 -7
  251. package/src/access-schema.ts +11 -0
  252. package/src/access-service-coding-write.test.ts +478 -0
  253. package/src/access-service.ts +237 -32
  254. package/src/active-recall.test.ts +40 -0
  255. package/src/active-recall.ts +19 -2
  256. package/src/behavior-learner.ts +5 -3
  257. package/src/buffer-session.test.ts +58 -0
  258. package/src/buffer-surprise-trigger.test.ts +4 -18
  259. package/src/buffer.ts +39 -11
  260. package/src/calibration.ts +10 -4
  261. package/src/causal-consolidation.test.ts +47 -2
  262. package/src/causal-consolidation.ts +13 -9
  263. package/src/cli.ts +19 -4
  264. package/src/compounding/engine.ts +2 -0
  265. package/src/compounding/preference-consolidator.test.ts +292 -0
  266. package/src/compounding/preference-consolidator.ts +55 -19
  267. package/src/config.test.ts +213 -0
  268. package/src/config.ts +175 -4
  269. package/src/connectors/codex-materialize-runner.ts +7 -4
  270. package/src/consolidation-provenance-check.ts +24 -5
  271. package/src/conversation-index/indexer.test.ts +22 -0
  272. package/src/conversation-index/indexer.ts +7 -3
  273. package/src/cross-namespace-budget.test.ts +44 -21
  274. package/src/cross-namespace-budget.ts +2 -2
  275. package/src/enrichment/pipeline.ts +11 -16
  276. package/src/evals.ts +1 -1
  277. package/src/explicit-capture.ts +19 -2
  278. package/src/extraction-judge-chain.test.ts +55 -0
  279. package/src/extraction-judge.ts +7 -9
  280. package/src/extraction.ts +16 -5
  281. package/src/fallback-llm.test.ts +600 -1
  282. package/src/fallback-llm.ts +91 -22
  283. package/src/maintenance/memory-governance-cron.ts +39 -29
  284. package/src/mcp-memory-inspector-app.ts +54 -12
  285. package/src/message-parts/index.ts +6 -0
  286. package/src/message-parts/message-parts.test.ts +30 -0
  287. package/src/migrate/from-engram.ts +19 -5
  288. package/src/namespaces/search.test.ts +15 -2
  289. package/src/namespaces/search.ts +1 -1
  290. package/src/network/webdav.ts +61 -21
  291. package/src/operator-toolkit.ts +6 -2
  292. package/src/orchestrator.ts +173 -20
  293. package/src/qmd-client.test.ts +85 -0
  294. package/src/qmd-recall-cache.test.ts +16 -0
  295. package/src/qmd-recall-cache.ts +7 -0
  296. package/src/qmd.test.ts +54 -0
  297. package/src/qmd.ts +119 -19
  298. package/src/recall-planner-llm.test.ts +224 -0
  299. package/src/recall-planner-llm.ts +289 -0
  300. package/src/routing/store.ts +4 -8
  301. package/src/search/factory.ts +3 -0
  302. package/src/search/lancedb-backend.ts +15 -3
  303. package/src/search/meilisearch-backend.ts +70 -7
  304. package/src/search/noop-backend.ts +5 -1
  305. package/src/search/orama-backend.ts +15 -3
  306. package/src/search/port.ts +15 -0
  307. package/src/search/remote-backend.ts +5 -1
  308. package/src/session-observer-state.ts +1 -1
  309. package/src/summarizer.ts +3 -3
  310. package/src/temporal-index.test.ts +18 -0
  311. package/src/temporal-index.ts +45 -0
  312. package/src/training-export/cli-date-validation.test.ts +36 -0
  313. package/src/training-export/date-parse.ts +21 -2
  314. package/src/transfer/export-sqlite.ts +3 -0
  315. package/src/types.ts +35 -0
  316. package/src/utility-learner.ts +1 -0
  317. package/src/work/storage.ts +23 -0
  318. package/dist/chunk-2QANQKSQ.js.map +0 -1
  319. package/dist/chunk-5RPTH6AU.js.map +0 -1
  320. package/dist/chunk-AJA46VX5.js.map +0 -1
  321. package/dist/chunk-C4SQJZAF.js.map +0 -1
  322. package/dist/chunk-CHCA44C3.js.map +0 -1
  323. package/dist/chunk-CSKLPDN6.js.map +0 -1
  324. package/dist/chunk-DLJ4IR6M.js.map +0 -1
  325. package/dist/chunk-EAZGEEG2.js.map +0 -1
  326. package/dist/chunk-EUML3N6B.js.map +0 -1
  327. package/dist/chunk-EVZFIAPG.js.map +0 -1
  328. package/dist/chunk-G3Z3QEF5.js.map +0 -1
  329. package/dist/chunk-GMAG2HS4.js.map +0 -1
  330. package/dist/chunk-HENLZHIT.js.map +0 -1
  331. package/dist/chunk-HINSGUA7.js.map +0 -1
  332. package/dist/chunk-HJNQQICM.js.map +0 -1
  333. package/dist/chunk-HPWVAEET.js.map +0 -1
  334. package/dist/chunk-IOTENEVL.js.map +0 -1
  335. package/dist/chunk-IP73YCZP.js.map +0 -1
  336. package/dist/chunk-JHMFYY7L.js.map +0 -1
  337. package/dist/chunk-JNANKJLN.js.map +0 -1
  338. package/dist/chunk-KGK2QKWL.js.map +0 -1
  339. package/dist/chunk-KM2A35EO.js.map +0 -1
  340. package/dist/chunk-KVEVLBKC.js.map +0 -1
  341. package/dist/chunk-L227SKTB.js.map +0 -1
  342. package/dist/chunk-LZ3VEOU5.js.map +0 -1
  343. package/dist/chunk-NOMEVTUD.js.map +0 -1
  344. package/dist/chunk-NZPF2SYV.js.map +0 -1
  345. package/dist/chunk-PCI747N2.js.map +0 -1
  346. package/dist/chunk-PPPZY2EU.js.map +0 -1
  347. package/dist/chunk-TH67Q46T.js.map +0 -1
  348. package/dist/chunk-UWY7GIVS.js.map +0 -1
  349. package/dist/chunk-VJXSUAO7.js.map +0 -1
  350. package/dist/chunk-XKIQZXUB.js.map +0 -1
  351. package/dist/chunk-XPSVGJYA.js.map +0 -1
  352. package/dist/chunk-XSWKORGM.js.map +0 -1
  353. package/dist/chunk-YCN4BVDK.js.map +0 -1
  354. package/dist/chunk-ZDTVJXIP.js.map +0 -1
  355. /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
  356. /package/dist/{chunk-AU7Q3LSC.js.map → chunk-2QSZNTDO.js.map} +0 -0
  357. /package/dist/{chunk-HSVJGWYS.js.map → chunk-2ROPI5OE.js.map} +0 -0
  358. /package/dist/{chunk-CF3ZF2YU.js.map → chunk-3QSU4NFF.js.map} +0 -0
  359. /package/dist/{chunk-OI27U2HT.js.map → chunk-5BTCT236.js.map} +0 -0
  360. /package/dist/{chunk-CO7ZO4TU.js.map → chunk-5VDJMYTF.js.map} +0 -0
  361. /package/dist/{chunk-YFS5OEKO.js.map → chunk-7MLB4NCL.js.map} +0 -0
  362. /package/dist/{chunk-557IAFPD.js.map → chunk-APRRL26Q.js.map} +0 -0
  363. /package/dist/{chunk-QDDHYAKV.js.map → chunk-AZDOWD2L.js.map} +0 -0
  364. /package/dist/{chunk-MLT75J5S.js.map → chunk-B6SU7YSE.js.map} +0 -0
  365. /package/dist/{chunk-FXKPZ3H6.js.map → chunk-BPSGLMQ4.js.map} +0 -0
  366. /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
  367. /package/dist/{chunk-IK34DVAC.js.map → chunk-CIOMS6DI.js.map} +0 -0
  368. /package/dist/{chunk-7DZRO2DC.js.map → chunk-DEPRLVLK.js.map} +0 -0
  369. /package/dist/{chunk-DHGSZ3UD.js.map → chunk-DGNQRNLL.js.map} +0 -0
  370. /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
  371. /package/dist/{chunk-ETUPBUHB.js.map → chunk-GDASG7NC.js.map} +0 -0
  372. /package/dist/{chunk-4HP7HIE3.js.map → chunk-HP5FMB6L.js.map} +0 -0
  373. /package/dist/{chunk-DOX2CG6Y.js.map → chunk-IEUU7O4F.js.map} +0 -0
  374. /package/dist/{chunk-WSGF57U2.js.map → chunk-JQDZQ4TB.js.map} +0 -0
  375. /package/dist/{chunk-W7L6HXUC.js.map → chunk-LXOM6IQU.js.map} +0 -0
  376. /package/dist/{chunk-6JGNHWCI.js.map → chunk-OBIRVF36.js.map} +0 -0
  377. /package/dist/{chunk-GUPISBV2.js.map → chunk-PP2JH3GP.js.map} +0 -0
  378. /package/dist/{chunk-OXJBNGBK.js.map → chunk-PSUB67YB.js.map} +0 -0
  379. /package/dist/{chunk-KIB7SDIJ.js.map → chunk-Q6YIJGXJ.js.map} +0 -0
  380. /package/dist/{chunk-ZT3EGNLR.js.map → chunk-QPD426WT.js.map} +0 -0
  381. /package/dist/{chunk-RLV3PQGH.js.map → chunk-QVO4YOB7.js.map} +0 -0
  382. /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
  383. /package/dist/{chunk-IK7DCC5H.js.map → chunk-VMGLYN42.js.map} +0 -0
  384. /package/dist/{chunk-NSKYFGDL.js.map → chunk-X4QQB7O6.js.map} +0 -0
  385. /package/dist/{first-start-migration-GYJWIH36.js.map → first-start-migration-FF7YFGRP.js.map} +0 -0
  386. /package/dist/{tier-stats-SKML2OSF.js.map → tier-stats-3LYQ3VV5.js.map} +0 -0
@@ -313,13 +313,13 @@ declare const CapsuleBlockSchema: z.ZodObject<{
313
313
  peerProfiles: boolean;
314
314
  }>;
315
315
  }, "strip", z.ZodTypeAny, {
316
+ schemaVersion: string;
316
317
  includes: {
317
318
  procedural: boolean;
318
319
  taxonomy: boolean;
319
320
  identityAnchors: boolean;
320
321
  peerProfiles: boolean;
321
322
  };
322
- schemaVersion: string;
323
323
  id: string;
324
324
  description: string;
325
325
  version: string;
@@ -334,13 +334,13 @@ declare const CapsuleBlockSchema: z.ZodObject<{
334
334
  directAnswerEnabled: boolean;
335
335
  };
336
336
  }, {
337
+ schemaVersion: string;
337
338
  includes: {
338
339
  procedural: boolean;
339
340
  taxonomy: boolean;
340
341
  identityAnchors: boolean;
341
342
  peerProfiles: boolean;
342
343
  };
343
- schemaVersion: string;
344
344
  id: string;
345
345
  description: string;
346
346
  version: string;
@@ -464,13 +464,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
464
464
  peerProfiles: boolean;
465
465
  }>;
466
466
  }, "strip", z.ZodTypeAny, {
467
+ schemaVersion: string;
467
468
  includes: {
468
469
  procedural: boolean;
469
470
  taxonomy: boolean;
470
471
  identityAnchors: boolean;
471
472
  peerProfiles: boolean;
472
473
  };
473
- schemaVersion: string;
474
474
  id: string;
475
475
  description: string;
476
476
  version: string;
@@ -485,13 +485,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
485
485
  directAnswerEnabled: boolean;
486
486
  };
487
487
  }, {
488
+ schemaVersion: string;
488
489
  includes: {
489
490
  procedural: boolean;
490
491
  taxonomy: boolean;
491
492
  identityAnchors: boolean;
492
493
  peerProfiles: boolean;
493
494
  };
494
- schemaVersion: string;
495
495
  id: string;
496
496
  description: string;
497
497
  version: string;
@@ -518,13 +518,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
518
518
  pluginVersion: string;
519
519
  includesTranscripts: boolean;
520
520
  capsule: {
521
+ schemaVersion: string;
521
522
  includes: {
522
523
  procedural: boolean;
523
524
  taxonomy: boolean;
524
525
  identityAnchors: boolean;
525
526
  peerProfiles: boolean;
526
527
  };
527
- schemaVersion: string;
528
528
  id: string;
529
529
  description: string;
530
530
  version: string;
@@ -551,13 +551,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
551
551
  pluginVersion: string;
552
552
  includesTranscripts: boolean;
553
553
  capsule: {
554
+ schemaVersion: string;
554
555
  includes: {
555
556
  procedural: boolean;
556
557
  taxonomy: boolean;
557
558
  identityAnchors: boolean;
558
559
  peerProfiles: boolean;
559
560
  };
560
- schemaVersion: string;
561
561
  id: string;
562
562
  description: string;
563
563
  version: string;
@@ -683,13 +683,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
683
683
  peerProfiles: boolean;
684
684
  }>;
685
685
  }, "strip", z.ZodTypeAny, {
686
+ schemaVersion: string;
686
687
  includes: {
687
688
  procedural: boolean;
688
689
  taxonomy: boolean;
689
690
  identityAnchors: boolean;
690
691
  peerProfiles: boolean;
691
692
  };
692
- schemaVersion: string;
693
693
  id: string;
694
694
  description: string;
695
695
  version: string;
@@ -704,13 +704,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
704
704
  directAnswerEnabled: boolean;
705
705
  };
706
706
  }, {
707
+ schemaVersion: string;
707
708
  includes: {
708
709
  procedural: boolean;
709
710
  taxonomy: boolean;
710
711
  identityAnchors: boolean;
711
712
  peerProfiles: boolean;
712
713
  };
713
- schemaVersion: string;
714
714
  id: string;
715
715
  description: string;
716
716
  version: string;
@@ -737,13 +737,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
737
737
  pluginVersion: string;
738
738
  includesTranscripts: boolean;
739
739
  capsule: {
740
+ schemaVersion: string;
740
741
  includes: {
741
742
  procedural: boolean;
742
743
  taxonomy: boolean;
743
744
  identityAnchors: boolean;
744
745
  peerProfiles: boolean;
745
746
  };
746
- schemaVersion: string;
747
747
  id: string;
748
748
  description: string;
749
749
  version: string;
@@ -770,13 +770,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
770
770
  pluginVersion: string;
771
771
  includesTranscripts: boolean;
772
772
  capsule: {
773
+ schemaVersion: string;
773
774
  includes: {
774
775
  procedural: boolean;
775
776
  taxonomy: boolean;
776
777
  identityAnchors: boolean;
777
778
  peerProfiles: boolean;
778
779
  };
779
- schemaVersion: string;
780
780
  id: string;
781
781
  description: string;
782
782
  version: string;
@@ -815,13 +815,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
815
815
  pluginVersion: string;
816
816
  includesTranscripts: boolean;
817
817
  capsule: {
818
+ schemaVersion: string;
818
819
  includes: {
819
820
  procedural: boolean;
820
821
  taxonomy: boolean;
821
822
  identityAnchors: boolean;
822
823
  peerProfiles: boolean;
823
824
  };
824
- schemaVersion: string;
825
825
  id: string;
826
826
  description: string;
827
827
  version: string;
@@ -854,13 +854,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
854
854
  pluginVersion: string;
855
855
  includesTranscripts: boolean;
856
856
  capsule: {
857
+ schemaVersion: string;
857
858
  includes: {
858
859
  procedural: boolean;
859
860
  taxonomy: boolean;
860
861
  identityAnchors: boolean;
861
862
  peerProfiles: boolean;
862
863
  };
863
- schemaVersion: string;
864
864
  id: string;
865
865
  description: string;
866
866
  version: string;
package/dist/types.d.ts CHANGED
@@ -564,6 +564,9 @@ interface PluginConfig {
564
564
  qmdChunkStrategy: "auto" | "regex";
565
565
  qmdCandidateLimit?: number;
566
566
  qmdQueryRerankEnabled: boolean;
567
+ qmdSearchStrategy: "hybrid" | "lex-vec" | "lex";
568
+ qmdSubprocessStrategy: "query" | "search";
569
+ qmdDaemonTimeoutMs: number;
567
570
  qmdIndexName?: string;
568
571
  qmdForceCpu: boolean;
569
572
  qmdGpuBackend?: "auto" | "metal" | "cuda" | "vulkan" | "false";
@@ -1217,6 +1220,18 @@ interface PluginConfig {
1217
1220
  modelSource: "plugin" | "gateway";
1218
1221
  gatewayAgentId: string;
1219
1222
  fastGatewayAgentId: string;
1223
+ /**
1224
+ * Optional task-specific model chain for Remnic's background LLM work —
1225
+ * extraction, the extraction judge, fact/profile/identity consolidation,
1226
+ * summarization, semantic consolidation, calibration, and causal
1227
+ * consolidation. When set, this chain is resolved through gateway providers
1228
+ * instead of using gatewayAgentId or agents.defaults.model. All task paths
1229
+ * route through the shared `gatewayTaskChainOptions` helper.
1230
+ *
1231
+ * Only takes effect when `modelSource: "gateway"`; ignored (with a startup
1232
+ * warning) under `modelSource: "plugin"`. See issue #1365 / PR #1370.
1233
+ */
1234
+ taskModelChain?: AgentPersonaModelConfig;
1220
1235
  namespacesEnabled: boolean;
1221
1236
  defaultNamespace: string;
1222
1237
  sharedNamespace: string;
@@ -1378,6 +1393,15 @@ interface PluginConfig {
1378
1393
  behaviorLoopMaxDeltaPerCycle: number;
1379
1394
  behaviorLoopProtectedParams: string[];
1380
1395
  recallPlannerEnabled: boolean;
1396
+ /**
1397
+ * Opt-in gate for LLM-based recall planning (issue #1367 / Option C). When
1398
+ * false (the default) recall mode is decided by the regex heuristic
1399
+ * `planRecallMode()`. When true, the planner consults an LLM (routed through
1400
+ * the gateway/fallback chain — provider-agnostic) and falls back to the
1401
+ * heuristic on timeout/error/unavailable. `recallPlannerShadowMode` runs the
1402
+ * LLM for telemetry only without changing the effective mode.
1403
+ */
1404
+ recallPlannerLlmEnabled: boolean;
1381
1405
  recallPlannerModel: string;
1382
1406
  recallPlannerTimeoutMs: number;
1383
1407
  recallPlannerUseResponsesApi: boolean;
@@ -1631,6 +1655,14 @@ interface PluginConfig {
1631
1655
  binaryLifecycleBackendType: "filesystem" | "s3" | "none";
1632
1656
  /** Base path for the filesystem backend. Required when backendType is "filesystem". */
1633
1657
  binaryLifecycleBackendPath: string;
1658
+ /**
1659
+ * Advertise legacy `engram_*` / `engram.*` MCP tool aliases alongside the
1660
+ * canonical `remnic_*` names (issue #1427). Default true for backward
1661
+ * compatibility. Set false to halve the advertised MCP `tools/list` surface;
1662
+ * tools stay callable under both names regardless. Also settable via
1663
+ * `REMNIC_EMIT_LEGACY_TOOLS` (falls back to `ENGRAM_EMIT_LEGACY_TOOLS`).
1664
+ */
1665
+ emitLegacyTools: boolean;
1634
1666
  /** Enable oai-mem-citation blocks in recall responses. Default false. */
1635
1667
  citationsEnabled: boolean;
1636
1668
  /** Auto-enable citations when the Codex adapter is detected. Default true. */
package/dist/types.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  SPECULATIVE_TTL_DAYS,
5
5
  confidenceTier,
6
6
  isRecallDisclosure
7
- } from "./chunk-KGK2QKWL.js";
7
+ } from "./chunk-4R4KTDIE.js";
8
8
  import "./chunk-PZ5AY32C.js";
9
9
  export {
10
10
  DEFAULT_RECALL_DISCLOSURE,
@@ -3,7 +3,7 @@ import {
3
3
  learnUtilityPromotionWeights,
4
4
  readUtilityLearningSnapshot,
5
5
  resolveUtilityLearningStatePath
6
- } from "./chunk-3BP57I6J.js";
6
+ } from "./chunk-2F6NP3NT.js";
7
7
  import "./chunk-TERNBNJB.js";
8
8
  import "./chunk-TBBDFYXW.js";
9
9
  import "./chunk-A2IYSXDQ.js";
@@ -2,8 +2,8 @@ import {
2
2
  applyUtilityPromotionRuntimePolicy,
3
3
  applyUtilityRankingRuntimeDelta,
4
4
  loadUtilityRuntimeValues
5
- } from "./chunk-W7L6HXUC.js";
6
- import "./chunk-3BP57I6J.js";
5
+ } from "./chunk-LXOM6IQU.js";
6
+ import "./chunk-2F6NP3NT.js";
7
7
  import "./chunk-TERNBNJB.js";
8
8
  import "./chunk-TBBDFYXW.js";
9
9
  import "./chunk-A2IYSXDQ.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  searchVerifiedEpisodes
3
- } from "./chunk-ZT3EGNLR.js";
3
+ } from "./chunk-QPD426WT.js";
4
4
  import "./chunk-HQ6NIBL6.js";
5
- import "./chunk-YFS5OEKO.js";
5
+ import "./chunk-7MLB4NCL.js";
6
6
  import "./chunk-5UZXUTVO.js";
7
7
  import "./chunk-4H5ZJHEN.js";
8
- import "./chunk-KGK2QKWL.js";
8
+ import "./chunk-4R4KTDIE.js";
9
9
  import "./chunk-RULE4VG5.js";
10
10
  import "./chunk-SCU65EZI.js";
11
11
  import "./chunk-KILOTVIF.js";
@@ -2,8 +2,8 @@ import {
2
2
  exportWorkBoardMarkdown,
3
3
  exportWorkBoardSnapshot,
4
4
  importWorkBoardSnapshot
5
- } from "../chunk-ETUPBUHB.js";
6
- import "../chunk-L227SKTB.js";
5
+ } from "../chunk-GDASG7NC.js";
6
+ import "../chunk-GDB4J2H3.js";
7
7
  import "../chunk-5UZXUTVO.js";
8
8
  import "../chunk-PZ5AY32C.js";
9
9
  export {
@@ -16,6 +16,7 @@ declare class WorkStorage {
16
16
  private writeNewProject;
17
17
  private writeProjectRecord;
18
18
  private enqueueProjectMutation;
19
+ private enqueueTaskMutation;
19
20
  private parseTask;
20
21
  private parseProject;
21
22
  createTask(input: CreateWorkTaskInput, now?: Date): Promise<WorkTask>;
@@ -24,6 +25,7 @@ declare class WorkStorage {
24
25
  updateTask(id: string, patch: UpdateWorkTaskInput, now?: Date, options?: {
25
26
  skipStatusTransitionValidation?: boolean;
26
27
  }): Promise<WorkTask | null>;
28
+ private updateTaskUnlocked;
27
29
  transitionTask(id: string, nextStatus: WorkTaskStatus, now?: Date): Promise<WorkTask>;
28
30
  deleteTask(id: string): Promise<boolean>;
29
31
  createProject(input: CreateWorkProjectInput, now?: Date): Promise<WorkProject>;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  WORK_ID_PATTERN,
3
3
  WorkStorage
4
- } from "../chunk-L227SKTB.js";
4
+ } from "../chunk-GDB4J2H3.js";
5
5
  import "../chunk-5UZXUTVO.js";
6
6
  import "../chunk-PZ5AY32C.js";
7
7
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "9.3.613",
3
+ "version": "9.3.615",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -49,6 +49,8 @@ export interface EngramAccessHttpServerOptions {
49
49
  citationsEnabled?: boolean;
50
50
  /** Auto-enable citations for Codex adapter connections (issue #379). */
51
51
  citationsAutoDetect?: boolean;
52
+ /** Advertise legacy engram.* tool aliases on tools/list (issue #1427). Default true. */
53
+ emitLegacyTools?: boolean;
52
54
  }
53
55
 
54
56
  export interface EngramAccessHttpServerStatus {
@@ -247,6 +249,7 @@ export class EngramAccessHttpServer {
247
249
  principal: options.principal,
248
250
  citationsEnabled: options.citationsEnabled,
249
251
  citationsAutoDetect: options.citationsAutoDetect,
252
+ emitLegacyTools: options.emitLegacyTools,
250
253
  });
251
254
  }
252
255
 
@@ -1091,12 +1094,20 @@ export class EngramAccessHttpServer {
1091
1094
  entityRef: body.entityRef,
1092
1095
  ttl: body.ttl,
1093
1096
  sourceReason: body.sourceReason,
1097
+ cwd: body.cwd,
1098
+ projectTag: body.projectTag,
1094
1099
  };
1095
- const idempotencyStatus = await this.service.peekMemoryStoreIdempotency(request);
1096
- if (idempotencyStatus === "miss" && request.dryRun !== true) {
1097
- this.ensureWriteRateLimitAvailable();
1098
- }
1099
- const response = await this.service.memoryStore(request);
1100
+ // Rate-limit enforcement is SOLELY authoritative inside memoryStore via
1101
+ // enforceWriteQuota: it runs atomically with the real idempotency-miss
1102
+ // determination (and the real resolved namespace), and is never invoked
1103
+ // for a replay. We deliberately do NOT pre-check here: the write namespace
1104
+ // is resolved from mutable session/git context, so a stale peek could
1105
+ // report "miss" for a request that is actually an idempotent replay in the
1106
+ // now-scoped namespace and hard-reject a safe replay with 429 (#1434 Codex
1107
+ // review). Letting the in-lock hook be the only hard gate avoids that.
1108
+ const response = await this.service.memoryStore(request, {
1109
+ enforceWriteQuota: () => this.ensureWriteRateLimitAvailable(),
1110
+ });
1100
1111
  if (this.shouldCountWriteRateLimit(response as { dryRun?: boolean; idempotencyReplay?: boolean })) {
1101
1112
  this.recordWriteRateLimitHit();
1102
1113
  }
@@ -1120,12 +1131,15 @@ export class EngramAccessHttpServer {
1120
1131
  entityRef: body.entityRef,
1121
1132
  ttl: body.ttl,
1122
1133
  sourceReason: body.sourceReason,
1134
+ cwd: body.cwd,
1135
+ projectTag: body.projectTag,
1123
1136
  };
1124
- const idempotencyStatus = await this.service.peekSuggestionSubmitIdempotency(request);
1125
- if (idempotencyStatus === "miss" && request.dryRun !== true) {
1126
- this.ensureWriteRateLimitAvailable();
1127
- }
1128
- const response = await this.service.suggestionSubmit(request);
1137
+ // Quota enforcement is solely authoritative inside suggestionSubmit
1138
+ // (enforceWriteQuota), atomic with the real miss and never on a replay; no
1139
+ // HTTP pre-check, so a stale peek can't 429 a safe replay (#1434 Codex review).
1140
+ const response = await this.service.suggestionSubmit(request, {
1141
+ enforceWriteQuota: () => this.ensureWriteRateLimitAvailable(),
1142
+ });
1129
1143
  if (this.shouldCountWriteRateLimit(response as { dryRun?: boolean; idempotencyReplay?: boolean })) {
1130
1144
  this.recordWriteRateLimitHit();
1131
1145
  }
@@ -262,6 +262,115 @@ test("MCP memory write tools reject malformed arguments before dispatch", async
262
262
  }
263
263
  });
264
264
 
265
+ test("MCP write tools accept and forward client-injected cwd/projectTag (#1434)", async () => {
266
+ for (const toolName of ["engram.memory_store", "engram.suggestion_submit"]) {
267
+ let received: Record<string, unknown> | undefined;
268
+ const service = {
269
+ ...makeMockService(),
270
+ memoryStore: async (args: Record<string, unknown>) => {
271
+ received = args;
272
+ return {
273
+ schemaVersion: 1,
274
+ operation: "memory_store",
275
+ namespace: "default",
276
+ dryRun: true,
277
+ accepted: true,
278
+ queued: false,
279
+ status: "validated",
280
+ };
281
+ },
282
+ suggestionSubmit: async (args: Record<string, unknown>) => {
283
+ received = args;
284
+ return {
285
+ schemaVersion: 1,
286
+ operation: "suggestion_submit",
287
+ namespace: "default",
288
+ dryRun: true,
289
+ accepted: true,
290
+ queued: false,
291
+ status: "validated",
292
+ };
293
+ },
294
+ } as unknown as EngramAccessService;
295
+ const server = new EngramMcpServer(service);
296
+
297
+ const response = await server.handleRequest(
298
+ makeToolRequest(toolName, {
299
+ content: "valid durable content",
300
+ category: "fact",
301
+ dryRun: true,
302
+ cwd: "/home/dev/project-x",
303
+ projectTag: "Blend/Supply",
304
+ }),
305
+ );
306
+ const result = (response as Record<string, unknown> & {
307
+ result?: { isError?: boolean };
308
+ }).result;
309
+
310
+ assert.equal(result?.isError, false, `${toolName} should accept cwd/projectTag`);
311
+ assert.equal(received?.cwd, "/home/dev/project-x", `${toolName} must forward cwd`);
312
+ assert.equal(received?.projectTag, "Blend/Supply", `${toolName} must forward projectTag`);
313
+ }
314
+ });
315
+
316
+ test("MCP write tools still reject genuinely-unknown keys after the cwd fix (#1434)", async () => {
317
+ let dispatched = false;
318
+ const service = {
319
+ ...makeMockService(),
320
+ memoryStore: async () => {
321
+ dispatched = true;
322
+ return {
323
+ schemaVersion: 1,
324
+ operation: "memory_store",
325
+ namespace: "default",
326
+ dryRun: true,
327
+ accepted: true,
328
+ queued: false,
329
+ status: "validated",
330
+ };
331
+ },
332
+ } as unknown as EngramAccessService;
333
+ const server = new EngramMcpServer(service);
334
+ const response = await server.handleRequest(
335
+ makeToolRequest("engram.memory_store", {
336
+ content: "valid durable content",
337
+ category: "fact",
338
+ dryRun: true,
339
+ cwd: "/ok",
340
+ bogusField: "must still be rejected",
341
+ }),
342
+ );
343
+ const result = (response as Record<string, unknown> & {
344
+ result?: { isError?: boolean; content?: Array<{ text?: string }> };
345
+ }).result;
346
+ assert.equal(result?.isError, true, "unknown keys must still be rejected");
347
+ assert.equal(dispatched, false, "malformed write must not dispatch");
348
+ });
349
+
350
+ test("MCP capsule tools tolerate client-injected cwd/projectTag (#1434)", async () => {
351
+ for (const toolName of [
352
+ "engram.capsule_list",
353
+ "engram.capsule_export",
354
+ "engram.capsule_import",
355
+ ]) {
356
+ const service = {
357
+ ...makeMockService(),
358
+ capsuleList: async () => ({ capsules: [] }),
359
+ capsuleExport: async () => ({ exported: true }),
360
+ capsuleImport: async () => ({ imported: true }),
361
+ } as unknown as EngramAccessService;
362
+ const server = new EngramMcpServer(service);
363
+ const args: Record<string, unknown> = { cwd: "/x", projectTag: "t" };
364
+ if (toolName === "engram.capsule_export") args.name = "cap-1";
365
+ if (toolName === "engram.capsule_import") args.archivePath = "/tmp/a.capsule.json.gz";
366
+ const response = await server.handleRequest(makeToolRequest(toolName, args));
367
+ const result = (response as Record<string, unknown> & {
368
+ result?: { isError?: boolean };
369
+ }).result;
370
+ assert.equal(result?.isError, false, `${toolName} should tolerate cwd/projectTag`);
371
+ }
372
+ });
373
+
265
374
  test("MCP session override is injected only into tools that accept sessionKey", async () => {
266
375
  let capsuleListArgs: Record<string, unknown> | undefined;
267
376
  let observeArgs: Record<string, unknown> | undefined;
@@ -721,3 +830,54 @@ test("MCP profiling report rejects invalid argument types before dispatch", asyn
721
830
  assert.equal((badFormat as Record<string, unknown> & { result?: { isError?: boolean } }).result?.isError, true);
722
831
  assert.equal((badLimit as Record<string, unknown> & { result?: { isError?: boolean } }).result?.isError, true);
723
832
  });
833
+
834
+ // ──────────────────────────────────────────────────────────────────────────
835
+ // Issue #1427: opt-out of legacy engram.* tool aliases on tools/list
836
+ // ──────────────────────────────────────────────────────────────────────────
837
+
838
+ function listToolNames(response: unknown): string[] {
839
+ const tools = (response as { result?: { tools?: Array<{ name: string }> } }).result?.tools ?? [];
840
+ return tools.map((t) => t.name);
841
+ }
842
+
843
+ const TOOLS_LIST_REQUEST = { jsonrpc: "2.0", id: 1, method: "tools/list", params: {} };
844
+
845
+ test("tools/list advertises both remnic.* and engram.* by default (back-compat)", async () => {
846
+ const server = new EngramMcpServer(makeMockService());
847
+ const names = listToolNames(await server.handleRequest(TOOLS_LIST_REQUEST));
848
+ assert.ok(names.includes("remnic.recall"), "canonical name present");
849
+ assert.ok(names.includes("engram.recall"), "legacy alias present by default");
850
+ const legacyCount = names.filter((n) => n.startsWith("engram.")).length;
851
+ assert.ok(legacyCount > 0, "legacy aliases advertised by default");
852
+ });
853
+
854
+ test("tools/list omits engram.* aliases when emitLegacyTools is false", async () => {
855
+ const server = new EngramMcpServer(makeMockService(), { emitLegacyTools: false });
856
+ const names = listToolNames(await server.handleRequest(TOOLS_LIST_REQUEST));
857
+ assert.ok(names.includes("remnic.recall"), "canonical name still present");
858
+ assert.equal(
859
+ names.filter((n) => n.startsWith("engram.")).length,
860
+ 0,
861
+ "no engram.* aliases advertised when opted out",
862
+ );
863
+ // Every advertised tool uses the canonical prefix; the surface is halved.
864
+ assert.ok(names.every((n) => n.startsWith("remnic.")), "all advertised tools are canonical");
865
+ });
866
+
867
+ test("emitLegacyTools=false still allows calling tools under BOTH names (advertising-only opt-out)", async () => {
868
+ const server = new EngramMcpServer(makeMockService(), { emitLegacyTools: false });
869
+ // Canonical call works.
870
+ const canonical = await server.handleRequest(makeToolRequest("remnic.recall", { query: "hello" }));
871
+ assert.notEqual(
872
+ (canonical as { result?: { isError?: boolean } }).result?.isError,
873
+ true,
874
+ "canonical remnic.recall call succeeds",
875
+ );
876
+ // Legacy call still dispatches even though it is no longer advertised.
877
+ const legacy = await server.handleRequest(makeToolRequest("engram.recall", { query: "hello" }));
878
+ assert.notEqual(
879
+ (legacy as { result?: { isError?: boolean } }).result?.isError,
880
+ true,
881
+ "legacy engram.recall call still works (callability preserved)",
882
+ );
883
+ });