@remnic/core 1.1.2 → 1.1.4

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 (489) hide show
  1. package/dist/abort-error.js +1 -0
  2. package/dist/abstraction-nodes.js +1 -0
  3. package/dist/access-audit.js +1 -0
  4. package/dist/access-cli.js +72 -47
  5. package/dist/access-cli.js.map +1 -1
  6. package/dist/access-http.d.ts +50 -5
  7. package/dist/access-http.js +39 -16
  8. package/dist/access-idempotency.js +1 -0
  9. package/dist/access-mcp.d.ts +10 -5
  10. package/dist/access-mcp.js +38 -14
  11. package/dist/access-schema.d.ts +133 -13
  12. package/dist/access-schema.js +20 -1
  13. package/dist/access-service-CtXFnprR.d.ts +2033 -0
  14. package/dist/access-service.d.ts +11 -6
  15. package/dist/access-service.js +40 -15
  16. package/dist/active-memory-bridge.js +1 -0
  17. package/dist/active-recall.js +1 -0
  18. package/dist/active-recall.js.map +1 -1
  19. package/dist/behavior-learner.js +1 -0
  20. package/dist/behavior-learner.js.map +1 -1
  21. package/dist/behavior-signals.js +1 -0
  22. package/dist/bootstrap.d.ts +6 -4
  23. package/dist/bootstrap.js +1 -0
  24. package/dist/boxes.js +1 -0
  25. package/dist/briefing.d.ts +9 -5
  26. package/dist/briefing.js +10 -7
  27. package/dist/buffer-surprise-report.js +1 -0
  28. package/dist/buffer-surprise.js +1 -0
  29. package/dist/buffer.d.ts +1 -1
  30. package/dist/buffer.js +1 -0
  31. package/dist/calibration.d.ts +8 -1
  32. package/dist/calibration.js +10 -2
  33. package/dist/calibration.js.map +1 -1
  34. package/dist/capsule-cli.d.ts +137 -0
  35. package/dist/capsule-cli.js +34 -0
  36. package/dist/capsule-crypto-5CYAGVC5.js +18 -0
  37. package/dist/capsule-export-NZQPOTQ4.js +17 -0
  38. package/dist/capsule-export-NZQPOTQ4.js.map +1 -0
  39. package/dist/capsule-import-SDCUXLEV.js +16 -0
  40. package/dist/capsule-import-SDCUXLEV.js.map +1 -0
  41. package/dist/capsule-merge-DI7PNQ2H.js +189 -0
  42. package/dist/capsule-merge-DI7PNQ2H.js.map +1 -0
  43. package/dist/causal-behavior.js +1 -0
  44. package/dist/causal-behavior.js.map +1 -1
  45. package/dist/causal-chain.js +1 -0
  46. package/dist/causal-consolidation.js +12 -9
  47. package/dist/causal-consolidation.js.map +1 -1
  48. package/dist/causal-retrieval.js +2 -1
  49. package/dist/causal-retrieval.js.map +1 -1
  50. package/dist/causal-trajectory-graph.js +4 -1
  51. package/dist/causal-trajectory-graph.js.map +1 -1
  52. package/dist/causal-trajectory.js +2 -1
  53. package/dist/chunk-2LSZVONP.js +67 -0
  54. package/dist/chunk-2LSZVONP.js.map +1 -0
  55. package/dist/chunk-32KD5IHZ.js +245 -0
  56. package/dist/chunk-32KD5IHZ.js.map +1 -0
  57. package/dist/chunk-3KIS4VGT.js +228 -0
  58. package/dist/chunk-3KIS4VGT.js.map +1 -0
  59. package/dist/chunk-3LCWFNVS.js +350 -0
  60. package/dist/chunk-3LCWFNVS.js.map +1 -0
  61. package/dist/chunk-43EKP2UK.js +26 -0
  62. package/dist/chunk-43EKP2UK.js.map +1 -0
  63. package/dist/chunk-457A4P3L.js +119 -0
  64. package/dist/chunk-457A4P3L.js.map +1 -0
  65. package/dist/{chunk-TMYO7B5P.js → chunk-47WOM4YW.js} +2 -2
  66. package/dist/{chunk-FVA6TGI3.js → chunk-52PDY6GD.js} +42 -2
  67. package/dist/chunk-52PDY6GD.js.map +1 -0
  68. package/dist/{chunk-ULYOGL6R.js → chunk-5HRY2WRF.js} +7 -3
  69. package/dist/chunk-5HRY2WRF.js.map +1 -0
  70. package/dist/{chunk-BOUYNNYD.js → chunk-67YLUWLG.js} +32 -13
  71. package/dist/{chunk-BOUYNNYD.js.map → chunk-67YLUWLG.js.map} +1 -1
  72. package/dist/chunk-6TBWYBJ3.js +236 -0
  73. package/dist/chunk-6TBWYBJ3.js.map +1 -0
  74. package/dist/chunk-74EMIVE4.js +329 -0
  75. package/dist/chunk-74EMIVE4.js.map +1 -0
  76. package/dist/chunk-74WWN7ZW.js +82 -0
  77. package/dist/chunk-74WWN7ZW.js.map +1 -0
  78. package/dist/chunk-A6XUJE5D.js +126 -0
  79. package/dist/chunk-A6XUJE5D.js.map +1 -0
  80. package/dist/{chunk-STGWEHYR.js → chunk-AEMBDV7M.js} +1187 -62
  81. package/dist/chunk-AEMBDV7M.js.map +1 -0
  82. package/dist/{chunk-PVICZTKG.js → chunk-AGZHRWPT.js} +5 -5
  83. package/dist/{chunk-PVICZTKG.js.map → chunk-AGZHRWPT.js.map} +1 -1
  84. package/dist/chunk-AJA46VX5.js +393 -0
  85. package/dist/chunk-AJA46VX5.js.map +1 -0
  86. package/dist/chunk-ASIQZXYO.js +277 -0
  87. package/dist/chunk-ASIQZXYO.js.map +1 -0
  88. package/dist/{chunk-DG6YMRDC.js → chunk-B2TL6GA2.js} +2 -2
  89. package/dist/chunk-BJMBJZ2Y.js +290 -0
  90. package/dist/chunk-BJMBJZ2Y.js.map +1 -0
  91. package/dist/chunk-BT7NVCML.js +79 -0
  92. package/dist/chunk-BT7NVCML.js.map +1 -0
  93. package/dist/chunk-CK5NTM2S.js +454 -0
  94. package/dist/chunk-CK5NTM2S.js.map +1 -0
  95. package/dist/{chunk-AYXIPSZO.js → chunk-CRU27Q4J.js} +2 -2
  96. package/dist/{chunk-UWB5LMWY.js → chunk-CUI2STX6.js} +526 -24
  97. package/dist/chunk-CUI2STX6.js.map +1 -0
  98. package/dist/{chunk-CUPFXL3J.js → chunk-EGEPUGN4.js} +4 -4
  99. package/dist/chunk-EGEPUGN4.js.map +1 -0
  100. package/dist/{chunk-3OGMS3PE.js → chunk-F5VQOQ2E.js} +3 -2
  101. package/dist/chunk-F5VQOQ2E.js.map +1 -0
  102. package/dist/chunk-FP2373TW.js +149 -0
  103. package/dist/chunk-FP2373TW.js.map +1 -0
  104. package/dist/{chunk-RBBWYEFJ.js → chunk-G2WADRQ3.js} +1 -1
  105. package/dist/chunk-G7D6GZ5J.js +48 -0
  106. package/dist/chunk-G7D6GZ5J.js.map +1 -0
  107. package/dist/chunk-H7XKCNR6.js +60 -0
  108. package/dist/chunk-H7XKCNR6.js.map +1 -0
  109. package/dist/{chunk-LOIMBRDE.js → chunk-HIRKCQGF.js} +1994 -412
  110. package/dist/chunk-HIRKCQGF.js.map +1 -0
  111. package/dist/chunk-IXEJRKCZ.js +18 -0
  112. package/dist/chunk-IXEJRKCZ.js.map +1 -0
  113. package/dist/chunk-IYY4MCPG.js +275 -0
  114. package/dist/chunk-IYY4MCPG.js.map +1 -0
  115. package/dist/{chunk-BECYBZLX.js → chunk-JWSENLQI.js} +502 -22
  116. package/dist/chunk-JWSENLQI.js.map +1 -0
  117. package/dist/chunk-KNKUID7G.js +183 -0
  118. package/dist/chunk-KNKUID7G.js.map +1 -0
  119. package/dist/chunk-L2IO2QPY.js +2036 -0
  120. package/dist/chunk-L2IO2QPY.js.map +1 -0
  121. package/dist/{chunk-ZAIM4TUE.js → chunk-LW2NMHDW.js} +46 -1
  122. package/dist/chunk-LW2NMHDW.js.map +1 -0
  123. package/dist/chunk-MDYG7VI7.js +48 -0
  124. package/dist/chunk-MDYG7VI7.js.map +1 -0
  125. package/dist/{chunk-VDX363PS.js → chunk-MUELDH4F.js} +10 -3
  126. package/dist/chunk-MUELDH4F.js.map +1 -0
  127. package/dist/chunk-MXC3AP5I.js +74 -0
  128. package/dist/chunk-MXC3AP5I.js.map +1 -0
  129. package/dist/chunk-NN3TS5BM.js +147 -0
  130. package/dist/chunk-NN3TS5BM.js.map +1 -0
  131. package/dist/{chunk-3YGHKTBF.js → chunk-NZS2BLTP.js} +963 -326
  132. package/dist/chunk-NZS2BLTP.js.map +1 -0
  133. package/dist/chunk-OA3L7BFR.js +183 -0
  134. package/dist/chunk-OA3L7BFR.js.map +1 -0
  135. package/dist/chunk-OZHRDTDX.js +240 -0
  136. package/dist/chunk-OZHRDTDX.js.map +1 -0
  137. package/dist/chunk-PCUKNJAZ.js +165 -0
  138. package/dist/chunk-PCUKNJAZ.js.map +1 -0
  139. package/dist/{chunk-6PFRXT4K.js → chunk-PFV5C235.js} +11 -6
  140. package/dist/chunk-PFV5C235.js.map +1 -0
  141. package/dist/chunk-PZ5AY32C.js +10 -0
  142. package/dist/chunk-PZ5AY32C.js.map +1 -0
  143. package/dist/{chunk-Y7R2XJ5Q.js → chunk-Q7FJ5ZHM.js} +6 -2
  144. package/dist/chunk-Q7FJ5ZHM.js.map +1 -0
  145. package/dist/{chunk-WCLICCGB.js → chunk-RILIVK4O.js} +91 -4
  146. package/dist/chunk-RILIVK4O.js.map +1 -0
  147. package/dist/{chunk-C2EFFULQ.js → chunk-RK2Y4XOM.js} +163 -20
  148. package/dist/chunk-RK2Y4XOM.js.map +1 -0
  149. package/dist/{chunk-TP4FZJIZ.js → chunk-RULE4VG5.js} +5 -1
  150. package/dist/chunk-RULE4VG5.js.map +1 -0
  151. package/dist/{chunk-PVPWZSSI.js → chunk-SMA4IMHV.js} +19 -3
  152. package/dist/chunk-SMA4IMHV.js.map +1 -0
  153. package/dist/{chunk-6YJHX2DL.js → chunk-TIFRGAKO.js} +242 -22
  154. package/dist/chunk-TIFRGAKO.js.map +1 -0
  155. package/dist/chunk-TUFG6VXY.js +875 -0
  156. package/dist/chunk-TUFG6VXY.js.map +1 -0
  157. package/dist/chunk-TYEOAFH3.js +251 -0
  158. package/dist/chunk-TYEOAFH3.js.map +1 -0
  159. package/dist/chunk-UKJAGEXH.js +260 -0
  160. package/dist/chunk-UKJAGEXH.js.map +1 -0
  161. package/dist/{chunk-KVBLZUKV.js → chunk-USFPPRAF.js} +93 -3
  162. package/dist/chunk-USFPPRAF.js.map +1 -0
  163. package/dist/{chunk-NBVAS5MT.js → chunk-V7TEH5I2.js} +6 -6
  164. package/dist/{chunk-GA5P7RST.js → chunk-VTJVUHRK.js} +22 -36
  165. package/dist/chunk-VTJVUHRK.js.map +1 -0
  166. package/dist/{chunk-SPI27QT6.js → chunk-W7WWT4FJ.js} +9 -4
  167. package/dist/chunk-W7WWT4FJ.js.map +1 -0
  168. package/dist/chunk-WIICJPET.js +45 -0
  169. package/dist/chunk-WIICJPET.js.map +1 -0
  170. package/dist/{chunk-VBVG2M5G.js → chunk-WPGJYVUH.js} +6 -2
  171. package/dist/chunk-WPGJYVUH.js.map +1 -0
  172. package/dist/{chunk-4HQS2HPX.js → chunk-WSZIHQBK.js} +29 -9
  173. package/dist/{chunk-4HQS2HPX.js.map → chunk-WSZIHQBK.js.map} +1 -1
  174. package/dist/{chunk-NZLQTHS5.js → chunk-WW3QQF4H.js} +4 -1
  175. package/dist/chunk-WW3QQF4H.js.map +1 -0
  176. package/dist/{chunk-DIXB44VE.js → chunk-X6VBWOVZ.js} +28 -13
  177. package/dist/chunk-X6VBWOVZ.js.map +1 -0
  178. package/dist/{chunk-XXVWLXSG.js → chunk-XQ4EJLUD.js} +64 -92
  179. package/dist/chunk-XQ4EJLUD.js.map +1 -0
  180. package/dist/{chunk-OC5OXUQ4.js → chunk-XRCYKJ3V.js} +780 -17
  181. package/dist/chunk-XRCYKJ3V.js.map +1 -0
  182. package/dist/{chunk-F5VP6YCB.js → chunk-Y4A6M3B6.js} +573 -156
  183. package/dist/chunk-Y4A6M3B6.js.map +1 -0
  184. package/dist/chunk-YNJHCGDT.js +309 -0
  185. package/dist/chunk-YNJHCGDT.js.map +1 -0
  186. package/dist/{chunk-L7IXWRYE.js → chunk-ZIBOQULP.js} +22 -13
  187. package/dist/chunk-ZIBOQULP.js.map +1 -0
  188. package/dist/{chunk-W6SL7OFG.js → chunk-ZTSE2ZJ6.js} +12 -2
  189. package/dist/{chunk-W6SL7OFG.js.map → chunk-ZTSE2ZJ6.js.map} +1 -1
  190. package/dist/chunking.js +1 -0
  191. package/dist/cipher-GVE2GQ5H.js +28 -0
  192. package/dist/cipher-GVE2GQ5H.js.map +1 -0
  193. package/dist/citations.js +1 -0
  194. package/dist/{cli-BkeRaYfk.d.ts → cli-lMql2FCr.d.ts} +26 -7
  195. package/dist/cli.d.ts +11 -6
  196. package/dist/cli.js +69 -34
  197. package/dist/codex-thread-key.js +1 -0
  198. package/dist/commitment-ledger.js +1 -0
  199. package/dist/compression-optimizer.js +1 -0
  200. package/dist/config.d.ts +2 -1
  201. package/dist/config.js +4 -1
  202. package/dist/connectors-cli-DFGtY2DB.d.ts +257 -0
  203. package/dist/connectors-cli.d.ts +2 -0
  204. package/dist/connectors-cli.js +22 -0
  205. package/dist/connectors-cli.js.map +1 -0
  206. package/dist/consolidation-operator.d.ts +65 -5
  207. package/dist/consolidation-operator.js +6 -1
  208. package/dist/consolidation-provenance-check.d.ts +1 -1
  209. package/dist/consolidation-provenance-check.js +3 -2
  210. package/dist/consolidation-undo.d.ts +1 -1
  211. package/dist/consolidation-undo.js +1 -0
  212. package/dist/consolidation-undo.js.map +1 -1
  213. package/dist/{contradiction-review-WIUBAR52.js → contradiction-review-5LTTVDQV.js} +2 -1
  214. package/dist/contradiction-review-5LTTVDQV.js.map +1 -0
  215. package/dist/{contradiction-scan-E3GJTI4F.js → contradiction-scan-3Z6YW7YA.js} +2 -1
  216. package/dist/{contradiction-scan-E3GJTI4F.js.map → contradiction-scan-3Z6YW7YA.js.map} +1 -1
  217. package/dist/cross-namespace-budget.js +1 -0
  218. package/dist/cue-anchors.js +1 -0
  219. package/dist/dashboard-runtime.js +1 -0
  220. package/dist/day-summary.js +1 -0
  221. package/dist/delinearize.js +1 -0
  222. package/dist/direct-answer-wiring.js +1 -0
  223. package/dist/direct-answer.js +1 -0
  224. package/dist/dreams-ledger-LR2NBAZE.js +286 -0
  225. package/dist/dreams-ledger-LR2NBAZE.js.map +1 -0
  226. package/dist/embedding-fallback.js +1 -0
  227. package/dist/engine-O6YWKQM3.js +28 -0
  228. package/dist/engine-O6YWKQM3.js.map +1 -0
  229. package/dist/entity-retrieval.d.ts +1 -1
  230. package/dist/entity-retrieval.js +10 -7
  231. package/dist/entity-schema.js +1 -0
  232. package/dist/evals.js +1 -0
  233. package/dist/evidence-pack.d.ts +16 -0
  234. package/dist/evidence-pack.js +8 -0
  235. package/dist/evidence-pack.js.map +1 -0
  236. package/dist/explicit-capture.d.ts +6 -4
  237. package/dist/explicit-capture.js +1 -0
  238. package/dist/extraction-judge-telemetry.js +1 -0
  239. package/dist/extraction-judge-training.js +1 -0
  240. package/dist/extraction-judge.js +1 -0
  241. package/dist/extraction.js +8 -7
  242. package/dist/fallback-llm.js +3 -2
  243. package/dist/first-start-migration-4MHQEOSD.js +263 -0
  244. package/dist/first-start-migration-4MHQEOSD.js.map +1 -0
  245. package/dist/forget-PLR6J5DN.js +69 -0
  246. package/dist/forget-PLR6J5DN.js.map +1 -0
  247. package/dist/framework-CyHYDcri.d.ts +153 -0
  248. package/dist/fs-utils-IRVUFB6G.js +30 -0
  249. package/dist/fs-utils-IRVUFB6G.js.map +1 -0
  250. package/dist/graph-dashboard-diff.js +1 -0
  251. package/dist/graph-dashboard-key.js +1 -0
  252. package/dist/graph-dashboard-parser.js +1 -0
  253. package/dist/graph-edge-decay-PWB63GRE.js +207 -0
  254. package/dist/graph-edge-decay-PWB63GRE.js.map +1 -0
  255. package/dist/graph-edge-reinforcement.d.ts +81 -0
  256. package/dist/graph-edge-reinforcement.js +24 -0
  257. package/dist/graph-edge-reinforcement.js.map +1 -0
  258. package/dist/graph-events.d.ts +87 -0
  259. package/dist/graph-events.js +14 -0
  260. package/dist/graph-events.js.map +1 -0
  261. package/dist/graph-recall.js +1 -0
  262. package/dist/graph-retrieval.js +1 -0
  263. package/dist/graph-snapshot.d.ts +112 -0
  264. package/dist/graph-snapshot.js +19 -0
  265. package/dist/graph-snapshot.js.map +1 -0
  266. package/dist/graph.d.ts +105 -7
  267. package/dist/graph.js +20 -3
  268. package/dist/harmonic-retrieval.js +1 -0
  269. package/dist/himem.js +1 -0
  270. package/dist/hygiene.js +1 -0
  271. package/dist/identity-continuity.js +1 -0
  272. package/dist/importance.js +1 -0
  273. package/dist/index.d.ts +574 -13
  274. package/dist/index.js +337 -69
  275. package/dist/index.js.map +1 -1
  276. package/dist/intent.js +1 -0
  277. package/dist/json-extract.js +1 -0
  278. package/dist/json-store.js +1 -0
  279. package/dist/kdf-7S6RWKLZ.js +26 -0
  280. package/dist/kdf-7S6RWKLZ.js.map +1 -0
  281. package/dist/legacy-hook-compat.js +1 -0
  282. package/dist/legacy-hook-compat.js.map +1 -1
  283. package/dist/lifecycle.js +1 -0
  284. package/dist/live-connectors-runner.d.ts +48 -0
  285. package/dist/live-connectors-runner.js +17 -0
  286. package/dist/live-connectors-runner.js.map +1 -0
  287. package/dist/local-llm.js +1 -0
  288. package/dist/logger.js +1 -0
  289. package/dist/memory-action-policy.js +1 -0
  290. package/dist/memory-cache.d.ts +2 -1
  291. package/dist/memory-cache.js +4 -1
  292. package/dist/memory-governance-JZHZDOLN.js +37 -0
  293. package/dist/memory-governance-JZHZDOLN.js.map +1 -0
  294. package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
  295. package/dist/memory-lifecycle-ledger-utils.js +4 -1
  296. package/dist/memory-projection-format.js +1 -0
  297. package/dist/{memory-projection-store-DeSXPh1j.d.ts → memory-projection-store-CY8TU40w.d.ts} +2 -1
  298. package/dist/memory-projection-store.d.ts +1 -1
  299. package/dist/memory-projection-store.js +2 -1
  300. package/dist/memory-worth-bench.js +1 -0
  301. package/dist/memory-worth-bench.js.map +1 -1
  302. package/dist/memory-worth-filter.js +1 -0
  303. package/dist/memory-worth-outcomes.d.ts +1 -1
  304. package/dist/memory-worth-outcomes.js +1 -0
  305. package/dist/memory-worth.js +1 -0
  306. package/dist/metadata-FC3XPDRQ.js +21 -0
  307. package/dist/metadata-FC3XPDRQ.js.map +1 -0
  308. package/dist/migrate-from-identity-anchor-TTEDEJGX.js +8 -0
  309. package/dist/migrate-from-identity-anchor-TTEDEJGX.js.map +1 -0
  310. package/dist/model-registry.js +1 -0
  311. package/dist/models-json.js +1 -0
  312. package/dist/native-knowledge.js +1 -0
  313. package/dist/negative.js +1 -0
  314. package/dist/objective-state-writers.js +1 -0
  315. package/dist/objective-state-writers.js.map +1 -1
  316. package/dist/objective-state.js +1 -0
  317. package/dist/openai-chat-compat.js +1 -0
  318. package/dist/operator-toolkit.d.ts +46 -2
  319. package/dist/operator-toolkit.js +29 -17
  320. package/dist/opik-exporter.js +1 -0
  321. package/dist/opik-exporter.js.map +1 -1
  322. package/dist/{orchestrator-CmJ-NTdJ.d.ts → orchestrator-ChkesB8U.d.ts} +177 -13
  323. package/dist/orchestrator.d.ts +6 -4
  324. package/dist/orchestrator.js +57 -41
  325. package/dist/page-versioning.js +1 -0
  326. package/dist/path-RMTY5Y5A.js +9 -0
  327. package/dist/path-RMTY5Y5A.js.map +1 -0
  328. package/dist/patterns-cli.d.ts +160 -0
  329. package/dist/patterns-cli.js +29 -0
  330. package/dist/patterns-cli.js.map +1 -0
  331. package/dist/peers-6OSQ3NK6.js +44 -0
  332. package/dist/peers-6OSQ3NK6.js.map +1 -0
  333. package/dist/plugin-id.js +1 -0
  334. package/dist/policy-runtime.js +1 -0
  335. package/dist/{port-BADbLZU5.d.ts → port-hqGnoStS.d.ts} +6 -0
  336. package/dist/profiling.js +1 -0
  337. package/dist/purge-6ATBGT77.js +205 -0
  338. package/dist/purge-6ATBGT77.js.map +1 -0
  339. package/dist/qmd-recall-cache.d.ts +1 -1
  340. package/dist/qmd-recall-cache.js +1 -0
  341. package/dist/qmd.d.ts +2 -1
  342. package/dist/qmd.js +4 -3
  343. package/dist/reasoning-trace-recall.js +1 -0
  344. package/dist/reasoning-trace-types.js +1 -0
  345. package/dist/recall-audit-anomaly.js +1 -0
  346. package/dist/recall-audit.js +1 -0
  347. package/dist/recall-disclosure-escalation.d.ts +84 -0
  348. package/dist/recall-disclosure-escalation.js +14 -0
  349. package/dist/recall-disclosure-escalation.js.map +1 -0
  350. package/dist/recall-explain-renderer.js +4 -1
  351. package/dist/recall-mmr.js +1 -0
  352. package/dist/recall-qos.js +1 -0
  353. package/dist/recall-query-policy.js +1 -0
  354. package/dist/recall-state.d.ts +7 -0
  355. package/dist/recall-state.js +2 -1
  356. package/dist/recall-tag-filter.d.ts +56 -0
  357. package/dist/recall-tag-filter.js +14 -0
  358. package/dist/recall-tag-filter.js.map +1 -0
  359. package/dist/recall-tokenization.js +1 -0
  360. package/dist/recall-xray-cli.d.ts +9 -2
  361. package/dist/recall-xray-cli.js +9 -4
  362. package/dist/recall-xray-renderer.js +4 -1
  363. package/dist/recall-xray.d.ts +116 -2
  364. package/dist/recall-xray.js +9 -3
  365. package/dist/reconstruct.js +1 -0
  366. package/dist/release-changelog.js +2 -0
  367. package/dist/release-changelog.js.map +1 -1
  368. package/dist/relevance.js +1 -0
  369. package/dist/rerank.js +1 -0
  370. package/dist/{resolution-QBTDHTG7.js → resolution-YGIBORXI.js} +2 -1
  371. package/dist/{resolution-QBTDHTG7.js.map → resolution-YGIBORXI.js.map} +1 -1
  372. package/dist/resolve-auth-token.d.ts +51 -0
  373. package/dist/resolve-auth-token.js +12 -0
  374. package/dist/resolve-auth-token.js.map +1 -0
  375. package/dist/resolve-provider-secret.d.ts +9 -1
  376. package/dist/resolve-provider-secret.js +4 -1
  377. package/dist/resume-bundles.js +4 -3
  378. package/dist/retrieval-agents.d.ts +1 -1
  379. package/dist/retrieval-agents.js +1 -0
  380. package/dist/retrieval-tiers.js +1 -0
  381. package/dist/retrieval.js +1 -0
  382. package/dist/sanitize.js +1 -0
  383. package/dist/schemas.d.ts +15 -2
  384. package/dist/schemas.js +2 -1
  385. package/dist/sdk-compat.js +1 -0
  386. package/dist/sdk-compat.js.map +1 -1
  387. package/dist/secure-store-4R2GSO7S.js +156 -0
  388. package/dist/secure-store-4R2GSO7S.js.map +1 -0
  389. package/dist/semantic-chunking.js +1 -0
  390. package/dist/{semantic-consolidation-CxJU6MJk.d.ts → semantic-consolidation-ByBXb-sf.d.ts} +3 -3
  391. package/dist/semantic-consolidation.d.ts +2 -2
  392. package/dist/semantic-consolidation.js +12 -7
  393. package/dist/semantic-rule-promotion.d.ts +1 -1
  394. package/dist/semantic-rule-promotion.js +10 -7
  395. package/dist/semantic-rule-verifier.d.ts +1 -1
  396. package/dist/semantic-rule-verifier.js +10 -7
  397. package/dist/session-integrity.js +1 -0
  398. package/dist/session-observer-bands.js +1 -0
  399. package/dist/session-observer-state.js +1 -0
  400. package/dist/session-toggles.js +2 -0
  401. package/dist/session-toggles.js.map +1 -1
  402. package/dist/signal.js +1 -0
  403. package/dist/skills-registry.js +2 -0
  404. package/dist/skills-registry.js.map +1 -1
  405. package/dist/source-attribution.js +1 -0
  406. package/dist/state-NCHQ4TRG.js +8 -0
  407. package/dist/state-NCHQ4TRG.js.map +1 -0
  408. package/dist/state-store-3EH7HYIN.js +16 -0
  409. package/dist/state-store-3EH7HYIN.js.map +1 -0
  410. package/dist/storage.d.ts +76 -2
  411. package/dist/storage.js +9 -6
  412. package/dist/store-contract.js +1 -0
  413. package/dist/summarizer.js +5 -4
  414. package/dist/summary-snapshot.js +1 -0
  415. package/dist/temporal-index.js +1 -0
  416. package/dist/temporal-supersession.d.ts +1 -1
  417. package/dist/temporal-supersession.js +2 -1
  418. package/dist/temporal-validity.d.ts +52 -0
  419. package/dist/temporal-validity.js +14 -0
  420. package/dist/temporal-validity.js.map +1 -0
  421. package/dist/threading.js +1 -0
  422. package/dist/tier-migration.d.ts +2 -2
  423. package/dist/tier-migration.js +1 -0
  424. package/dist/tier-routing.js +1 -0
  425. package/dist/tier-stats-62ZVDFKS.js +152 -0
  426. package/dist/tier-stats-62ZVDFKS.js.map +1 -0
  427. package/dist/tmt.js +1 -0
  428. package/dist/tokens.js +1 -0
  429. package/dist/topics.js +1 -0
  430. package/dist/trace-C5ETWBEF.js +290 -0
  431. package/dist/trace-C5ETWBEF.js.map +1 -0
  432. package/dist/transcript.js +1 -0
  433. package/dist/trust-zones.js +1 -0
  434. package/dist/tui-RI7P6PBS.js +13 -0
  435. package/dist/tui-RI7P6PBS.js.map +1 -0
  436. package/dist/types-V3FJ26TF.js +30 -0
  437. package/dist/types-V3FJ26TF.js.map +1 -0
  438. package/dist/types.d.ts +634 -9
  439. package/dist/types.js +10 -3
  440. package/dist/utility-learner.js +1 -0
  441. package/dist/utility-runtime.js +1 -0
  442. package/dist/utility-telemetry.js +1 -0
  443. package/dist/verified-recall.js +10 -7
  444. package/dist/version-utils.js +1 -0
  445. package/dist/whitespace.js +1 -0
  446. package/dist/work-product-ledger.js +1 -0
  447. package/package.json +7 -3
  448. package/scripts/ensure-better-sqlite3.mjs +124 -0
  449. package/dist/access-service-Br8ZydTK.d.ts +0 -827
  450. package/dist/chunk-3OGMS3PE.js.map +0 -1
  451. package/dist/chunk-3YGHKTBF.js.map +0 -1
  452. package/dist/chunk-6PFRXT4K.js.map +0 -1
  453. package/dist/chunk-6YJHX2DL.js.map +0 -1
  454. package/dist/chunk-BECYBZLX.js.map +0 -1
  455. package/dist/chunk-C2EFFULQ.js.map +0 -1
  456. package/dist/chunk-CUPFXL3J.js.map +0 -1
  457. package/dist/chunk-DIXB44VE.js.map +0 -1
  458. package/dist/chunk-F5VP6YCB.js.map +0 -1
  459. package/dist/chunk-FVA6TGI3.js.map +0 -1
  460. package/dist/chunk-GA5P7RST.js.map +0 -1
  461. package/dist/chunk-KVBLZUKV.js.map +0 -1
  462. package/dist/chunk-L7IXWRYE.js.map +0 -1
  463. package/dist/chunk-LOIMBRDE.js.map +0 -1
  464. package/dist/chunk-LTCGGW2D.js +0 -14
  465. package/dist/chunk-LTCGGW2D.js.map +0 -1
  466. package/dist/chunk-NZLQTHS5.js.map +0 -1
  467. package/dist/chunk-OC5OXUQ4.js.map +0 -1
  468. package/dist/chunk-PVPWZSSI.js.map +0 -1
  469. package/dist/chunk-SPI27QT6.js.map +0 -1
  470. package/dist/chunk-STGWEHYR.js.map +0 -1
  471. package/dist/chunk-TP4FZJIZ.js.map +0 -1
  472. package/dist/chunk-ULYOGL6R.js.map +0 -1
  473. package/dist/chunk-UWB5LMWY.js.map +0 -1
  474. package/dist/chunk-VBVG2M5G.js.map +0 -1
  475. package/dist/chunk-VDX363PS.js.map +0 -1
  476. package/dist/chunk-WCLICCGB.js.map +0 -1
  477. package/dist/chunk-X6GF3FX2.js +0 -26
  478. package/dist/chunk-X6GF3FX2.js.map +0 -1
  479. package/dist/chunk-XXVWLXSG.js.map +0 -1
  480. package/dist/chunk-Y7R2XJ5Q.js.map +0 -1
  481. package/dist/chunk-ZAIM4TUE.js.map +0 -1
  482. package/dist/engine-72LSIWQP.js +0 -23
  483. /package/dist/{contradiction-review-WIUBAR52.js.map → capsule-cli.js.map} +0 -0
  484. /package/dist/{engine-72LSIWQP.js.map → capsule-crypto-5CYAGVC5.js.map} +0 -0
  485. /package/dist/{chunk-TMYO7B5P.js.map → chunk-47WOM4YW.js.map} +0 -0
  486. /package/dist/{chunk-DG6YMRDC.js.map → chunk-B2TL6GA2.js.map} +0 -0
  487. /package/dist/{chunk-AYXIPSZO.js.map → chunk-CRU27Q4J.js.map} +0 -0
  488. /package/dist/{chunk-RBBWYEFJ.js.map → chunk-G2WADRQ3.js.map} +0 -0
  489. /package/dist/{chunk-NBVAS5MT.js.map → chunk-V7TEH5I2.js.map} +0 -0
@@ -3,13 +3,19 @@ import {
3
3
  } from "./chunk-IQT3XTKW.js";
4
4
  import {
5
5
  EngramAccessInputError
6
- } from "./chunk-STGWEHYR.js";
6
+ } from "./chunk-AEMBDV7M.js";
7
+ import {
8
+ expandTildePath
9
+ } from "./chunk-IXEJRKCZ.js";
7
10
  import {
8
11
  validateBriefingFormat
9
- } from "./chunk-L7IXWRYE.js";
12
+ } from "./chunk-ZIBOQULP.js";
10
13
  import {
11
14
  readEnvVar
12
15
  } from "./chunk-MARWOCVP.js";
16
+ import {
17
+ validateRequest
18
+ } from "./chunk-RILIVK4O.js";
13
19
 
14
20
  // src/access-mcp.ts
15
21
  import { readFile } from "fs/promises";
@@ -29,6 +35,37 @@ function withToolAliases(tool) {
29
35
  if (canonicalName === tool.name) return [canonicalTool];
30
36
  return [canonicalTool, tool];
31
37
  }
38
+ var STRICT_MCP_SCHEMA_KEYS = {
39
+ capsuleExport: [
40
+ "name",
41
+ "namespace",
42
+ "since",
43
+ "includeKinds",
44
+ "peerIds",
45
+ "includeTranscripts",
46
+ "encrypt"
47
+ ],
48
+ capsuleImport: ["archivePath", "namespace", "mode"],
49
+ capsuleList: ["namespace"]
50
+ };
51
+ function parseMcpRequest(schemaName, args) {
52
+ const allowedKeys = STRICT_MCP_SCHEMA_KEYS[schemaName];
53
+ if (allowedKeys) {
54
+ const allowed = new Set(allowedKeys);
55
+ const unexpected = Object.keys(args).filter((key) => !allowed.has(key));
56
+ if (unexpected.length > 0) {
57
+ throw new EngramAccessInputError(
58
+ `request validation failed: (root): Unrecognized key(s) in object: ${unexpected.join(", ")}`
59
+ );
60
+ }
61
+ }
62
+ const validation = validateRequest(schemaName, args);
63
+ if (validation.success) return validation.data;
64
+ const details = validation.error.details.map((detail) => `${detail.field}: ${detail.message}`).join("; ");
65
+ throw new EngramAccessInputError(
66
+ details.length > 0 ? `${validation.error.error}: ${details}` : validation.error.error
67
+ );
68
+ }
32
69
  async function getMcpServerVersion() {
33
70
  const envVersion = readEnvVar("OPENCLAW_ENGRAM_VERSION")?.trim() || readEnvVar("npm_package_version")?.trim();
34
71
  if (envVersion) return envVersion;
@@ -59,7 +96,28 @@ var EngramMcpServer = class {
59
96
  namespace: { type: "string" },
60
97
  topK: { type: "number" },
61
98
  mode: { type: "string", enum: ["auto", "no_recall", "minimal", "full", "graph_mode"] },
62
- includeDebug: { type: "boolean" }
99
+ includeDebug: { type: "boolean" },
100
+ // Recall disclosure depth (issue #677). Default `chunk` when
101
+ // omitted. Section/raw payload shaping ships in PR 2; this PR
102
+ // wires the field end-to-end so clients can already pass it
103
+ // without it being silently dropped.
104
+ disclosure: { type: "string", enum: ["chunk", "section", "raw"] },
105
+ cwd: { type: "string", description: "Working directory for auto git-context resolution." },
106
+ projectTag: { type: "string", description: "Project tag for non-git project scoping (e.g. 'blend-supply')." },
107
+ asOf: {
108
+ type: "string",
109
+ description: "Historical recall pin (issue #680). ISO 8601 timestamp; when set, the recall returns the corpus as it existed at this instant."
110
+ },
111
+ tags: {
112
+ type: "array",
113
+ items: { type: "string" },
114
+ description: "Filter recall results to memories whose frontmatter tags match (issue #689)."
115
+ },
116
+ tagMatch: {
117
+ type: "string",
118
+ enum: ["any", "all"],
119
+ description: "Tag-filter match mode. 'any' (default) admits results with at least one filter tag; 'all' requires every filter tag."
120
+ }
63
121
  },
64
122
  required: ["query"],
65
123
  additionalProperties: false
@@ -79,7 +137,7 @@ var EngramMcpServer = class {
79
137
  },
80
138
  {
81
139
  name: "engram.set_coding_context",
82
- description: "Attach a coding-agent context (project / branch) to a session so recall routes to a project- / branch-scoped namespace (issue #569). For MCP clients that do not ship cwd automatically (Cursor, generic agents, etc.). Also aliased as remnic.set_coding_context. Pass codingContext: null to clear.",
140
+ description: "Attach a coding-agent context (project / branch) to a session so recall routes to a project- / branch-scoped namespace (issue #569). For MCP clients that do not ship cwd automatically (Cursor, generic agents, etc.). Also aliased as remnic.set_coding_context. Pass codingContext: null to clear. Alternatively, pass just a projectTag for non-git project scoping (e.g. OpenClaw channels).",
83
141
  inputSchema: {
84
142
  type: "object",
85
143
  properties: {
@@ -102,10 +160,14 @@ var EngramMcpServer = class {
102
160
  additionalProperties: false
103
161
  }
104
162
  ],
105
- description: "The context to attach, or null to clear."
163
+ description: "The context to attach, or null to clear. Omit when using projectTag instead."
164
+ },
165
+ projectTag: {
166
+ type: "string",
167
+ description: "Arbitrary project tag for non-git project scoping (e.g. 'blend-supply'). Creates a coding context with projectId 'tag:<projectTag>'. Use instead of codingContext when the session isn't tied to a specific git repo."
106
168
  }
107
169
  },
108
- required: ["sessionKey", "codingContext"],
170
+ required: ["sessionKey"],
109
171
  additionalProperties: false
110
172
  }
111
173
  },
@@ -152,6 +214,11 @@ var EngramMcpServer = class {
152
214
  type: "integer",
153
215
  minimum: 1,
154
216
  description: "Optional positive-integer override for the recall character budget."
217
+ },
218
+ disclosure: {
219
+ type: "string",
220
+ enum: ["chunk", "section", "raw"],
221
+ description: "Optional disclosure depth for X-ray telemetry (issue #677). When set, populates the per-disclosure token-spend summary on each result."
155
222
  }
156
223
  },
157
224
  required: ["query"],
@@ -172,6 +239,70 @@ var EngramMcpServer = class {
172
239
  additionalProperties: false
173
240
  }
174
241
  },
242
+ {
243
+ name: "engram.capsule_export",
244
+ description: "Export a portable Remnic capsule archive from the namespace-scoped memory store.",
245
+ inputSchema: {
246
+ type: "object",
247
+ properties: {
248
+ name: {
249
+ type: "string",
250
+ description: "Capsule id (alphanumeric with single dashes, max 64 characters)."
251
+ },
252
+ namespace: { type: "string" },
253
+ since: {
254
+ type: "string",
255
+ description: "Only include files modified on or after this ISO 8601 timestamp."
256
+ },
257
+ includeKinds: {
258
+ type: "array",
259
+ items: { type: "string" },
260
+ description: "Optional top-level directory allow-list."
261
+ },
262
+ peerIds: {
263
+ type: "array",
264
+ items: { type: "string" },
265
+ description: "Optional peer id allow-list for the peers/ subtree."
266
+ },
267
+ includeTranscripts: { type: "boolean" },
268
+ encrypt: { type: "boolean" }
269
+ },
270
+ required: ["name"],
271
+ additionalProperties: false
272
+ }
273
+ },
274
+ {
275
+ name: "engram.capsule_import",
276
+ description: "Import a Remnic capsule archive into the namespace-scoped memory store.",
277
+ inputSchema: {
278
+ type: "object",
279
+ properties: {
280
+ archivePath: {
281
+ type: "string",
282
+ description: "Path to a .capsule.json.gz or .capsule.json.gz.enc archive."
283
+ },
284
+ namespace: { type: "string" },
285
+ mode: {
286
+ type: "string",
287
+ enum: ["skip", "overwrite", "fork"],
288
+ description: "Conflict handling mode. Defaults to skip."
289
+ }
290
+ },
291
+ required: ["archivePath"],
292
+ additionalProperties: false
293
+ }
294
+ },
295
+ {
296
+ name: "engram.capsule_list",
297
+ description: "List capsule archives in the namespace-scoped capsule store.",
298
+ inputSchema: {
299
+ type: "object",
300
+ properties: {
301
+ namespace: { type: "string" }
302
+ },
303
+ additionalProperties: false
304
+ }
305
+ },
175
306
  {
176
307
  name: "engram.memory_governance_run",
177
308
  description: "Run Remnic memory governance in a bounded shadow/apply pass.",
@@ -198,6 +329,18 @@ var EngramMcpServer = class {
198
329
  additionalProperties: false
199
330
  }
200
331
  },
332
+ {
333
+ name: "engram.pattern_reinforcement_run",
334
+ description: "Run the pattern-reinforcement maintenance job (issue #687 PR 2/4). Clusters duplicate non-procedural memories by normalized content, promotes the most-recent member to canonical, and supersedes the older duplicates. Gated on patternReinforcementEnabled and the patternReinforcementCadenceMs floor \u2014 pass force=true to bypass the cadence for an ad-hoc operator run.",
335
+ inputSchema: {
336
+ type: "object",
337
+ properties: {
338
+ namespace: { type: "string" },
339
+ force: { type: "boolean" }
340
+ },
341
+ additionalProperties: false
342
+ }
343
+ },
201
344
  {
202
345
  // The canonical `remnic.procedural_stats` alias is added automatically
203
346
  // by `withToolAliases` — the dual-naming invariant keeps both names
@@ -330,7 +473,9 @@ var EngramMcpServer = class {
330
473
  description: "Conversation messages to observe"
331
474
  },
332
475
  namespace: { type: "string" },
333
- skipExtraction: { type: "boolean" }
476
+ skipExtraction: { type: "boolean" },
477
+ cwd: { type: "string", description: "Working directory for auto git-context resolution." },
478
+ projectTag: { type: "string", description: "Project tag for non-git project scoping (e.g. 'blend-supply')." }
334
479
  },
335
480
  required: ["sessionKey", "messages"],
336
481
  additionalProperties: false
@@ -741,6 +886,30 @@ var EngramMcpServer = class {
741
886
  additionalProperties: false
742
887
  }
743
888
  },
889
+ {
890
+ // Graph snapshot for the admin pane (issue #691 PR 2/5). Returns
891
+ // a read-only `{ nodes, edges, generatedAt }` view of the
892
+ // multi-graph adjacency, with the same filter knobs as the HTTP
893
+ // surface so connectors / CLI clients can hit either endpoint
894
+ // interchangeably.
895
+ name: "engram.graph_snapshot",
896
+ description: "Return a read-only graph snapshot (nodes + edges) for the admin pane. Filters: limit (default 500, max 5000), since (ISO timestamp), focusNodeId (restricts to neighborhood), categories (allow-list of memory categories).",
897
+ inputSchema: {
898
+ type: "object",
899
+ properties: {
900
+ namespace: { type: "string" },
901
+ limit: { type: "number", description: "Maximum number of edges to return (default 500, max 5000)." },
902
+ since: { type: "string", description: "Inclusive lower bound on edge timestamp (ISO-8601)." },
903
+ focusNodeId: { type: "string", description: "When set, restrict the snapshot to the focus node and its neighbors." },
904
+ categories: {
905
+ type: "array",
906
+ items: { type: "string" },
907
+ description: "Optional category allow-list (e.g. ['fact', 'decision'])."
908
+ }
909
+ },
910
+ additionalProperties: false
911
+ }
912
+ },
744
913
  {
745
914
  name: "engram.memory_feedback",
746
915
  description: "Record relevance feedback (thumbs up/down) for a specific memory.",
@@ -789,6 +958,43 @@ var EngramMcpServer = class {
789
958
  additionalProperties: false
790
959
  }
791
960
  },
961
+ {
962
+ name: "engram.memory_action_apply",
963
+ description: "Record a memory-action application event for policy-learning telemetry.",
964
+ inputSchema: {
965
+ type: "object",
966
+ properties: {
967
+ action: {
968
+ type: "string",
969
+ enum: [
970
+ "store_episode",
971
+ "store_note",
972
+ "update_note",
973
+ "create_artifact",
974
+ "summarize_node",
975
+ "discard",
976
+ "link_graph"
977
+ ]
978
+ },
979
+ category: { type: "string" },
980
+ content: { type: "string" },
981
+ outcome: { type: "string", enum: ["applied", "skipped", "failed"] },
982
+ reason: { type: "string" },
983
+ memoryId: { type: "string" },
984
+ sessionKey: { type: "string" },
985
+ linkTargetId: { type: "string" },
986
+ linkType: { type: "string" },
987
+ linkStrength: { type: "number" },
988
+ artifactType: { type: "string" },
989
+ execute: { type: "boolean" },
990
+ sourcePrompt: { type: "string" },
991
+ namespace: { type: "string" },
992
+ dryRun: { type: "boolean" }
993
+ },
994
+ required: ["action"],
995
+ additionalProperties: false
996
+ }
997
+ },
792
998
  {
793
999
  name: "engram.context_checkpoint",
794
1000
  description: "Save a structured context checkpoint for a session (preserves conversation state to disk).",
@@ -859,6 +1065,214 @@ var EngramMcpServer = class {
859
1065
  },
860
1066
  additionalProperties: false
861
1067
  }
1068
+ },
1069
+ {
1070
+ name: "engram.memory_summarize_hourly",
1071
+ description: "Generate hourly summaries for recent conversations.",
1072
+ inputSchema: {
1073
+ type: "object",
1074
+ properties: {},
1075
+ additionalProperties: false
1076
+ }
1077
+ },
1078
+ {
1079
+ name: "engram.conversation_index_update",
1080
+ description: "Chunk transcript history into conversation-index documents.",
1081
+ inputSchema: {
1082
+ type: "object",
1083
+ properties: {
1084
+ sessionKey: { type: "string" },
1085
+ hours: { type: "number", description: "How many hours of transcript history to include." },
1086
+ embed: { type: "boolean", description: "If true, run QMD embed after update for this invocation." }
1087
+ },
1088
+ additionalProperties: false
1089
+ }
1090
+ },
1091
+ {
1092
+ name: "engram.profiling_report",
1093
+ description: "Return timing and performance data for Remnic recall and extraction pipelines. Requires profilingEnabled: true.",
1094
+ inputSchema: {
1095
+ type: "object",
1096
+ properties: {
1097
+ format: {
1098
+ type: "string",
1099
+ enum: ["ascii", "json"],
1100
+ description: "Output format. Defaults to ascii."
1101
+ },
1102
+ limit: {
1103
+ type: "integer",
1104
+ minimum: 1,
1105
+ maximum: 20,
1106
+ description: "Number of recent traces to include. Defaults to 5."
1107
+ }
1108
+ },
1109
+ additionalProperties: false
1110
+ }
1111
+ },
1112
+ {
1113
+ name: "engram.graph_edge_decay_run",
1114
+ description: "Run the graph-edge-confidence decay maintenance pass (issue #681 PR 2/3). Respects graphEdgeDecayEnabled; writes a structured telemetry record to state/graph-edge-decay-status.json.",
1115
+ inputSchema: {
1116
+ type: "object",
1117
+ properties: {
1118
+ dryRun: { type: "boolean" }
1119
+ },
1120
+ additionalProperties: false
1121
+ }
1122
+ },
1123
+ {
1124
+ name: "engram.live_connectors_run",
1125
+ description: "Run due live connectors once. Used by the live-connector cron and available for operator-triggered sync checks.",
1126
+ inputSchema: {
1127
+ type: "object",
1128
+ properties: {
1129
+ force: {
1130
+ type: "boolean",
1131
+ description: "When true, run enabled connectors even if their poll interval has not elapsed."
1132
+ }
1133
+ },
1134
+ additionalProperties: false
1135
+ }
1136
+ },
1137
+ // ── Peer Registry tools (issue #679 PR 4/5) ─────────────────────────
1138
+ {
1139
+ name: "engram.peer_list",
1140
+ description: "List all registered peers in the peer registry (issue #679). Returns an array of peer identity records sorted alphabetically by id.",
1141
+ inputSchema: {
1142
+ type: "object",
1143
+ properties: {},
1144
+ additionalProperties: false
1145
+ }
1146
+ },
1147
+ {
1148
+ name: "engram.peer_get",
1149
+ description: "Get a single peer by id. Returns the peer's identity record or { found: false } when not found (issue #679).",
1150
+ inputSchema: {
1151
+ type: "object",
1152
+ properties: {
1153
+ id: { type: "string", description: "Peer id to look up." }
1154
+ },
1155
+ required: ["id"],
1156
+ additionalProperties: false
1157
+ }
1158
+ },
1159
+ {
1160
+ name: "engram.peer_set",
1161
+ description: "Create or update a peer identity record (issue #679). On first write, creates the peer with the given kind (default 'human'). On subsequent writes, updates displayName and/or notes; kind and createdAt are immutable.",
1162
+ inputSchema: {
1163
+ type: "object",
1164
+ properties: {
1165
+ id: { type: "string", description: "Peer id \u2014 must match PEER_ID_PATTERN." },
1166
+ kind: {
1167
+ type: "string",
1168
+ enum: ["self", "human", "agent", "integration"],
1169
+ description: "Kind of peer. Required on first write; ignored on updates."
1170
+ },
1171
+ displayName: { type: "string", description: "Human-readable display name." },
1172
+ notes: { type: "string", description: "Optional free-form markdown notes." }
1173
+ },
1174
+ required: ["id"],
1175
+ additionalProperties: false
1176
+ }
1177
+ },
1178
+ {
1179
+ name: "engram.peer_delete",
1180
+ description: "Delete a peer's identity record (issue #679). Idempotent \u2014 succeeds even if the peer does not exist. The peer directory is preserved so profile and interaction-log data are not destroyed.",
1181
+ inputSchema: {
1182
+ type: "object",
1183
+ properties: {
1184
+ id: { type: "string", description: "Peer id to delete." }
1185
+ },
1186
+ required: ["id"],
1187
+ additionalProperties: false
1188
+ }
1189
+ },
1190
+ {
1191
+ name: "engram.peer_profile_get",
1192
+ description: "Get the evolving cognitive profile for a peer (issue #679). Returns the profile written by the async reasoner (PR 2/5), or { found: false } if no profile has been generated yet.",
1193
+ inputSchema: {
1194
+ type: "object",
1195
+ properties: {
1196
+ id: { type: "string", description: "Peer id whose profile to retrieve." }
1197
+ },
1198
+ required: ["id"],
1199
+ additionalProperties: false
1200
+ }
1201
+ },
1202
+ {
1203
+ name: "engram.peer_forget",
1204
+ description: "DESTRUCTIVELY purge the entire peer directory (identity.md + profile.md + interactions.log.md and any companion files). Requires confirm: 'yes'. Idempotent \u2014 safe to call twice. Use engram.peer_delete when you only want to remove the identity record and preserve profile data.",
1205
+ inputSchema: {
1206
+ type: "object",
1207
+ properties: {
1208
+ id: { type: "string", description: "Peer id to purge." },
1209
+ confirm: {
1210
+ type: "string",
1211
+ enum: ["yes"],
1212
+ description: "Must be exactly 'yes' to proceed. Guard against accidental invocation."
1213
+ }
1214
+ },
1215
+ required: ["id", "confirm"],
1216
+ additionalProperties: false
1217
+ }
1218
+ },
1219
+ // ── Operator Console state (issue #688 PR 2/3) ─────────────────────────
1220
+ {
1221
+ name: "engram.console_state",
1222
+ description: "Return a point-in-time ConsoleStateSnapshot of the engine's runtime state \u2014 buffer, extraction queue, dedup decisions, maintenance ledger tail, QMD probe, and daemon info (issue #688). Read-only; never mutates state.",
1223
+ inputSchema: {
1224
+ type: "object",
1225
+ properties: {
1226
+ namespace: {
1227
+ type: "string",
1228
+ description: "Optional namespace to scope the snapshot."
1229
+ }
1230
+ },
1231
+ additionalProperties: false
1232
+ }
1233
+ },
1234
+ // ── Dreams telemetry (issue #678 PR 3+4) ─────────────────────────────
1235
+ {
1236
+ name: "engram.dreams_status",
1237
+ description: "Return per-phase Dreams pipeline telemetry for the last N hours (default 24). Reports run count, total duration, and items processed for each phase: lightSleep, rem, deepSleep.",
1238
+ inputSchema: {
1239
+ type: "object",
1240
+ properties: {
1241
+ windowHours: {
1242
+ type: "number",
1243
+ description: "How many hours to look back (default 24, minimum 1)."
1244
+ },
1245
+ namespace: {
1246
+ type: "string",
1247
+ description: "Optional namespace to read Dreams telemetry from."
1248
+ }
1249
+ },
1250
+ additionalProperties: false
1251
+ }
1252
+ },
1253
+ {
1254
+ name: "engram.dreams_run",
1255
+ description: "Manually invoke a single Dreams pipeline phase (lightSleep, rem, or deepSleep). Returns the same telemetry shape as a scheduled run. Pass dryRun: true to preview without committing writes.",
1256
+ inputSchema: {
1257
+ type: "object",
1258
+ properties: {
1259
+ phase: {
1260
+ type: "string",
1261
+ enum: ["lightSleep", "rem", "deepSleep"],
1262
+ description: "Which phase to run."
1263
+ },
1264
+ dryRun: {
1265
+ type: "boolean",
1266
+ description: "When true, report what would change without committing writes (default false)."
1267
+ },
1268
+ namespace: {
1269
+ type: "string",
1270
+ description: "Optional namespace to run the phase in."
1271
+ }
1272
+ },
1273
+ required: ["phase"],
1274
+ additionalProperties: false
1275
+ }
862
1276
  }
863
1277
  ].flatMap((tool) => withToolAliases(tool));
864
1278
  }
@@ -947,8 +1361,14 @@ var EngramMcpServer = class {
947
1361
  if (method === "tools/call") {
948
1362
  const params = request.params ?? {};
949
1363
  const name = typeof params.name === "string" ? params.name : "";
950
- const argumentsObject = params.arguments && typeof params.arguments === "object" && !Array.isArray(params.arguments) ? params.arguments : {};
951
1364
  try {
1365
+ let argumentsObject = {};
1366
+ if ("arguments" in params && params.arguments !== void 0) {
1367
+ if (params.arguments === null || typeof params.arguments !== "object" || Array.isArray(params.arguments)) {
1368
+ throw new EngramAccessInputError("tools/call arguments must be an object when provided");
1369
+ }
1370
+ argumentsObject = params.arguments;
1371
+ }
952
1372
  const effectivePrincipal = options?.principalOverride ?? this.authenticatedPrincipal;
953
1373
  const result = await this.callTool(name, argumentsObject, effectivePrincipal, options?.sessionId);
954
1374
  return {
@@ -1108,13 +1528,53 @@ ${body}`;
1108
1528
  async callTool(name, args, effectivePrincipal, mcpSessionId) {
1109
1529
  switch (toLegacyToolName(name)) {
1110
1530
  case "engram.recall": {
1531
+ let disclosure;
1532
+ if ("disclosure" in args && args.disclosure !== void 0 && args.disclosure !== null) {
1533
+ if (typeof args.disclosure !== "string") {
1534
+ throw new EngramAccessInputError(
1535
+ "disclosure must be a string (one of: chunk, section, raw)"
1536
+ );
1537
+ }
1538
+ disclosure = args.disclosure;
1539
+ }
1540
+ if ("cwd" in args && args.cwd !== void 0 && args.cwd !== null && typeof args.cwd !== "string") {
1541
+ throw new EngramAccessInputError("cwd must be a string");
1542
+ }
1543
+ if ("projectTag" in args && args.projectTag !== void 0 && args.projectTag !== null && typeof args.projectTag !== "string") {
1544
+ throw new EngramAccessInputError("projectTag must be a string");
1545
+ }
1546
+ if ("asOf" in args && args.asOf !== void 0 && args.asOf !== null && typeof args.asOf !== "string") {
1547
+ throw new EngramAccessInputError("asOf must be a string (ISO 8601 timestamp)");
1548
+ }
1549
+ let tags;
1550
+ if ("tags" in args && args.tags !== void 0 && args.tags !== null) {
1551
+ if (!Array.isArray(args.tags) || !args.tags.every((t) => typeof t === "string")) {
1552
+ throw new EngramAccessInputError("tags must be an array of strings");
1553
+ }
1554
+ tags = args.tags;
1555
+ }
1556
+ let tagMatch;
1557
+ if ("tagMatch" in args && args.tagMatch !== void 0 && args.tagMatch !== null) {
1558
+ if (typeof args.tagMatch !== "string" || args.tagMatch !== "any" && args.tagMatch !== "all") {
1559
+ throw new EngramAccessInputError(
1560
+ `tagMatch must be one of: any, all (got: ${String(args.tagMatch)})`
1561
+ );
1562
+ }
1563
+ tagMatch = args.tagMatch;
1564
+ }
1111
1565
  const response = await this.service.recall({
1112
1566
  query: typeof args.query === "string" ? args.query : "",
1113
1567
  sessionKey: typeof args.sessionKey === "string" ? args.sessionKey : void 0,
1114
1568
  namespace: typeof args.namespace === "string" ? args.namespace : void 0,
1115
1569
  topK: typeof args.topK === "number" && Number.isFinite(args.topK) ? args.topK : void 0,
1116
1570
  mode: typeof args.mode === "string" ? args.mode : void 0,
1117
- includeDebug: args.includeDebug === true
1571
+ includeDebug: args.includeDebug === true,
1572
+ disclosure,
1573
+ cwd: typeof args.cwd === "string" ? args.cwd : void 0,
1574
+ projectTag: typeof args.projectTag === "string" ? args.projectTag : void 0,
1575
+ asOf: typeof args.asOf === "string" ? args.asOf : void 0,
1576
+ ...tags !== void 0 ? { tags } : {},
1577
+ ...tagMatch !== void 0 ? { tagMatch } : {}
1118
1578
  });
1119
1579
  if (this.shouldEmitCitations(mcpSessionId)) {
1120
1580
  const citations = this.buildRecallCitations(response);
@@ -1136,6 +1596,26 @@ ${body}`;
1136
1596
  });
1137
1597
  case "engram.set_coding_context": {
1138
1598
  const sessionKey = typeof args.sessionKey === "string" ? args.sessionKey : "";
1599
+ const hasProjectTag = typeof args.projectTag === "string" && args.projectTag.trim().length > 0;
1600
+ const hasCodingContext = "codingContext" in args;
1601
+ if (!hasCodingContext && hasProjectTag) {
1602
+ const tag = args.projectTag.trim();
1603
+ this.service.setCodingContext({
1604
+ sessionKey,
1605
+ codingContext: {
1606
+ projectId: `tag:${tag}`,
1607
+ branch: null,
1608
+ rootPath: `tag:${tag}`,
1609
+ defaultBranch: null
1610
+ }
1611
+ });
1612
+ return { ok: true };
1613
+ }
1614
+ if (!hasCodingContext && !hasProjectTag) {
1615
+ throw new EngramAccessInputError(
1616
+ "set_coding_context requires either codingContext or projectTag"
1617
+ );
1618
+ }
1139
1619
  const rawCtx = args.codingContext;
1140
1620
  let codingContext = null;
1141
1621
  if (rawCtx !== null) {
@@ -1183,12 +1663,22 @@ ${body}`;
1183
1663
  }
1184
1664
  budget = parsed;
1185
1665
  }
1666
+ let disclosure;
1667
+ if ("disclosure" in args && args.disclosure !== void 0 && args.disclosure !== null && args.disclosure !== "") {
1668
+ if (typeof args.disclosure !== "string") {
1669
+ throw new Error(
1670
+ "engram.recall_xray: disclosure must be a string (one of: chunk, section, raw)"
1671
+ );
1672
+ }
1673
+ disclosure = args.disclosure;
1674
+ }
1186
1675
  return this.service.recallXray({
1187
1676
  query,
1188
1677
  sessionKey,
1189
1678
  namespace,
1190
1679
  budget,
1191
- authenticatedPrincipal: effectivePrincipal
1680
+ authenticatedPrincipal: effectivePrincipal,
1681
+ ...disclosure !== void 0 ? { disclosure } : {}
1192
1682
  });
1193
1683
  }
1194
1684
  case "engram.day_summary":
@@ -1197,6 +1687,35 @@ ${body}`;
1197
1687
  sessionKey: typeof args.sessionKey === "string" ? args.sessionKey : void 0,
1198
1688
  namespace: typeof args.namespace === "string" ? args.namespace : void 0
1199
1689
  });
1690
+ case "engram.capsule_export": {
1691
+ const body = parseMcpRequest("capsuleExport", args);
1692
+ return this.service.capsuleExport({
1693
+ name: body.name,
1694
+ namespace: body.namespace,
1695
+ principal: effectivePrincipal,
1696
+ since: body.since,
1697
+ includeKinds: body.includeKinds,
1698
+ peerIds: body.peerIds,
1699
+ includeTranscripts: body.includeTranscripts,
1700
+ encrypt: body.encrypt
1701
+ });
1702
+ }
1703
+ case "engram.capsule_import": {
1704
+ const body = parseMcpRequest("capsuleImport", args);
1705
+ return this.service.capsuleImport({
1706
+ archivePath: expandTildePath(body.archivePath),
1707
+ namespace: body.namespace,
1708
+ principal: effectivePrincipal,
1709
+ mode: body.mode
1710
+ });
1711
+ }
1712
+ case "engram.capsule_list": {
1713
+ const body = parseMcpRequest("capsuleList", args);
1714
+ return this.service.capsuleList({
1715
+ namespace: body.namespace,
1716
+ principal: effectivePrincipal
1717
+ });
1718
+ }
1200
1719
  case "engram.memory_governance_run":
1201
1720
  return this.service.governanceRun({
1202
1721
  namespace: typeof args.namespace === "string" ? args.namespace : void 0,
@@ -1214,6 +1733,15 @@ ${body}`;
1214
1733
  },
1215
1734
  effectivePrincipal
1216
1735
  );
1736
+ case "engram.pattern_reinforcement_run":
1737
+ return this.service.patternReinforcementRun(
1738
+ {
1739
+ namespace: typeof args.namespace === "string" ? args.namespace : void 0,
1740
+ authenticatedPrincipal: effectivePrincipal,
1741
+ force: args.force === true
1742
+ },
1743
+ effectivePrincipal
1744
+ );
1217
1745
  case "remnic.procedural_stats":
1218
1746
  case "engram.procedural_stats":
1219
1747
  return this.service.procedureStats(
@@ -1280,14 +1808,23 @@ ${body}`;
1280
1808
  typeof args.namespace === "string" ? args.namespace : void 0,
1281
1809
  effectivePrincipal
1282
1810
  );
1283
- case "engram.observe":
1811
+ case "engram.observe": {
1812
+ if ("cwd" in args && args.cwd !== void 0 && args.cwd !== null && typeof args.cwd !== "string") {
1813
+ throw new EngramAccessInputError("cwd must be a string");
1814
+ }
1815
+ if ("projectTag" in args && args.projectTag !== void 0 && args.projectTag !== null && typeof args.projectTag !== "string") {
1816
+ throw new EngramAccessInputError("projectTag must be a string");
1817
+ }
1284
1818
  return this.service.observe({
1285
1819
  sessionKey: typeof args.sessionKey === "string" ? args.sessionKey : "",
1286
1820
  messages: Array.isArray(args.messages) ? args.messages : [],
1287
1821
  namespace: typeof args.namespace === "string" ? args.namespace : void 0,
1288
1822
  authenticatedPrincipal: effectivePrincipal,
1289
- skipExtraction: args.skipExtraction === true
1823
+ skipExtraction: args.skipExtraction === true,
1824
+ cwd: typeof args.cwd === "string" ? args.cwd : void 0,
1825
+ projectTag: typeof args.projectTag === "string" ? args.projectTag : void 0
1290
1826
  });
1827
+ }
1291
1828
  case "engram.lcm_search":
1292
1829
  return this.service.lcmSearch({
1293
1830
  query: typeof args.query === "string" ? args.query : "",
@@ -1497,6 +2034,43 @@ ${body}`;
1497
2034
  return this.service.graphExplainLastRecall(
1498
2035
  typeof args.namespace === "string" ? args.namespace : void 0
1499
2036
  );
2037
+ case "engram.graph_snapshot": {
2038
+ if (args.limit !== void 0 && typeof args.limit !== "number") {
2039
+ throw new Error("engram.graph_snapshot: limit must be a number");
2040
+ }
2041
+ if (args.since !== void 0 && typeof args.since !== "string") {
2042
+ throw new Error("engram.graph_snapshot: since must be a string");
2043
+ }
2044
+ if (args.focusNodeId !== void 0 && typeof args.focusNodeId !== "string") {
2045
+ throw new Error("engram.graph_snapshot: focusNodeId must be a string");
2046
+ }
2047
+ let categories;
2048
+ if (args.categories !== void 0) {
2049
+ if (!Array.isArray(args.categories)) {
2050
+ throw new Error(
2051
+ "engram.graph_snapshot: categories must be an array of strings"
2052
+ );
2053
+ }
2054
+ categories = args.categories.map((value, index) => {
2055
+ if (typeof value !== "string") {
2056
+ throw new Error(
2057
+ `engram.graph_snapshot: categories[${index}] must be a string`
2058
+ );
2059
+ }
2060
+ return value;
2061
+ });
2062
+ }
2063
+ return this.service.graphSnapshot(
2064
+ {
2065
+ namespace: typeof args.namespace === "string" ? args.namespace : void 0,
2066
+ limit: typeof args.limit === "number" ? args.limit : void 0,
2067
+ since: typeof args.since === "string" ? args.since : void 0,
2068
+ focusNodeId: typeof args.focusNodeId === "string" ? args.focusNodeId : void 0,
2069
+ ...categories !== void 0 ? { categories } : {}
2070
+ },
2071
+ effectivePrincipal
2072
+ );
2073
+ }
1500
2074
  case "engram.memory_feedback":
1501
2075
  return this.service.memoryFeedback({
1502
2076
  memoryId: typeof args.memoryId === "string" ? args.memoryId : "",
@@ -1526,6 +2100,25 @@ ${body}`;
1526
2100
  timestamp: typeof args.timestamp === "string" ? args.timestamp : void 0
1527
2101
  });
1528
2102
  }
2103
+ case "engram.memory_action_apply":
2104
+ return this.service.memoryActionApply({
2105
+ action: typeof args.action === "string" ? args.action : "",
2106
+ outcome: typeof args.outcome === "string" ? args.outcome : void 0,
2107
+ reason: typeof args.reason === "string" ? args.reason : void 0,
2108
+ memoryId: typeof args.memoryId === "string" ? args.memoryId : void 0,
2109
+ namespace: typeof args.namespace === "string" ? args.namespace : void 0,
2110
+ principal: effectivePrincipal,
2111
+ sessionKey: typeof args.sessionKey === "string" ? args.sessionKey : void 0,
2112
+ content: typeof args.content === "string" ? args.content : void 0,
2113
+ category: typeof args.category === "string" ? args.category : void 0,
2114
+ linkTargetId: typeof args.linkTargetId === "string" ? args.linkTargetId : void 0,
2115
+ linkType: typeof args.linkType === "string" ? args.linkType : void 0,
2116
+ linkStrength: typeof args.linkStrength === "number" ? args.linkStrength : void 0,
2117
+ artifactType: typeof args.artifactType === "string" ? args.artifactType : void 0,
2118
+ execute: typeof args.execute === "boolean" ? args.execute : void 0,
2119
+ sourcePrompt: typeof args.sourcePrompt === "string" ? args.sourcePrompt : void 0,
2120
+ dryRun: args.dryRun === true
2121
+ });
1529
2122
  case "engram.context_checkpoint":
1530
2123
  return this.service.contextCheckpoint({
1531
2124
  sessionKey: typeof args.sessionKey === "string" ? args.sessionKey : "",
@@ -1550,7 +2143,7 @@ ${body}`;
1550
2143
  // ── Contradiction Review (issue #520) ──────────────────────────────────
1551
2144
  case "engram.review_list":
1552
2145
  case "remnic.review_list": {
1553
- const { listPairs } = await import("./contradiction-review-WIUBAR52.js");
2146
+ const { listPairs } = await import("./contradiction-review-5LTTVDQV.js");
1554
2147
  const VALID_REVIEW_FILTERS = /* @__PURE__ */ new Set(["all", "unresolved", "contradicts", "independent", "duplicates", "needs-user"]);
1555
2148
  const rawFilter = typeof args.filter === "string" ? args.filter : "unresolved";
1556
2149
  if (!VALID_REVIEW_FILTERS.has(rawFilter)) {
@@ -1567,14 +2160,14 @@ ${body}`;
1567
2160
  const verb = typeof args.verb === "string" ? args.verb : "";
1568
2161
  if (!pairId) throw new Error("pairId is required");
1569
2162
  if (!verb) throw new Error("verb is required");
1570
- const { isValidResolutionVerb } = await import("./resolution-QBTDHTG7.js");
2163
+ const { isValidResolutionVerb } = await import("./resolution-YGIBORXI.js");
1571
2164
  if (!isValidResolutionVerb(verb)) throw new Error(`Invalid verb: ${verb}. Must be one of: keep-a, keep-b, merge, both-valid, needs-more-context`);
1572
- const { executeResolution } = await import("./resolution-QBTDHTG7.js");
2165
+ const { executeResolution } = await import("./resolution-YGIBORXI.js");
1573
2166
  return executeResolution(this.service.memoryDir, this.service.storageRef, pairId, verb);
1574
2167
  }
1575
2168
  case "engram.contradiction_scan_run":
1576
2169
  case "remnic.contradiction_scan_run": {
1577
- const { runContradictionScan } = await import("./contradiction-scan-E3GJTI4F.js");
2170
+ const { runContradictionScan } = await import("./contradiction-scan-3Z6YW7YA.js");
1578
2171
  return runContradictionScan({
1579
2172
  storage: this.service.storageRef,
1580
2173
  config: this.service.configRef,
@@ -1585,6 +2178,176 @@ ${body}`;
1585
2178
  namespace: typeof args.namespace === "string" ? args.namespace : void 0
1586
2179
  });
1587
2180
  }
2181
+ case "engram.memory_summarize_hourly":
2182
+ case "remnic.memory_summarize_hourly":
2183
+ return this.service.memorySummarizeHourly();
2184
+ case "engram.conversation_index_update":
2185
+ case "remnic.conversation_index_update": {
2186
+ if ("sessionKey" in args && args.sessionKey !== void 0 && typeof args.sessionKey !== "string") {
2187
+ throw new Error("sessionKey must be a string when provided");
2188
+ }
2189
+ const sessionKey = typeof args.sessionKey === "string" ? args.sessionKey : void 0;
2190
+ return this.service.conversationIndexUpdate({
2191
+ sessionKey,
2192
+ hours: typeof args.hours === "number" && Number.isFinite(args.hours) ? args.hours : void 0,
2193
+ embed: typeof args.embed === "boolean" ? args.embed : void 0
2194
+ });
2195
+ }
2196
+ case "engram.profiling_report":
2197
+ case "remnic.profiling_report": {
2198
+ if ("format" in args && args.format !== void 0 && typeof args.format !== "string") {
2199
+ throw new EngramAccessInputError("format must be a string when provided");
2200
+ }
2201
+ if ("limit" in args && args.limit !== void 0 && typeof args.limit !== "number") {
2202
+ throw new EngramAccessInputError("limit must be a number when provided");
2203
+ }
2204
+ return this.service.profilingReport({
2205
+ format: typeof args.format === "string" ? args.format : void 0,
2206
+ limit: typeof args.limit === "number" ? args.limit : void 0
2207
+ });
2208
+ }
2209
+ case "engram.graph_edge_decay_run":
2210
+ case "remnic.graph_edge_decay_run": {
2211
+ const cfg = this.service.configRef;
2212
+ if (!cfg.graphEdgeDecayEnabled) {
2213
+ return {
2214
+ ranAt: (/* @__PURE__ */ new Date()).toISOString(),
2215
+ disabled: true,
2216
+ reason: "graphEdgeDecayEnabled is false"
2217
+ };
2218
+ }
2219
+ const { runGraphEdgeDecayMaintenanceAcrossNamespaces } = await import("./graph-edge-decay-PWB63GRE.js");
2220
+ const dryRun = args.dryRun === true;
2221
+ const results = await runGraphEdgeDecayMaintenanceAcrossNamespaces(
2222
+ this.service.memoryDir,
2223
+ {
2224
+ windowMs: cfg.graphEdgeDecayWindowMs,
2225
+ perWindow: cfg.graphEdgeDecayPerWindow,
2226
+ floor: cfg.graphEdgeDecayFloor,
2227
+ visibilityThreshold: cfg.graphEdgeDecayVisibilityThreshold,
2228
+ dryRun,
2229
+ namespacesEnabled: cfg.namespacesEnabled === true,
2230
+ defaultNamespace: cfg.defaultNamespace
2231
+ }
2232
+ );
2233
+ return { results };
2234
+ }
2235
+ case "engram.live_connectors_run":
2236
+ case "remnic.live_connectors_run":
2237
+ return this.service.liveConnectorsRun(
2238
+ {
2239
+ authenticatedPrincipal: effectivePrincipal,
2240
+ force: args.force === true
2241
+ },
2242
+ effectivePrincipal
2243
+ );
2244
+ // ── Peer Registry dispatchers (issue #679 PR 4/5) ─────────────────
2245
+ case "engram.peer_list":
2246
+ case "remnic.peer_list":
2247
+ return this.service.peerList();
2248
+ case "engram.peer_get":
2249
+ case "remnic.peer_get": {
2250
+ const id = typeof args.id === "string" ? args.id : "";
2251
+ if (!id) throw new Error("engram.peer_get: id is required");
2252
+ return this.service.peerGet(id);
2253
+ }
2254
+ case "engram.peer_set":
2255
+ case "remnic.peer_set": {
2256
+ const id = typeof args.id === "string" ? args.id : "";
2257
+ if (!id) throw new Error("engram.peer_set: id is required");
2258
+ if (args.kind !== void 0 && typeof args.kind !== "string") {
2259
+ throw new Error("engram.peer_set: kind must be a string when provided");
2260
+ }
2261
+ if (args.displayName !== void 0 && typeof args.displayName !== "string") {
2262
+ throw new Error("engram.peer_set: displayName must be a string when provided");
2263
+ }
2264
+ if (args.notes !== void 0 && typeof args.notes !== "string") {
2265
+ throw new Error("engram.peer_set: notes must be a string when provided");
2266
+ }
2267
+ return this.service.peerSet({
2268
+ id,
2269
+ kind: typeof args.kind === "string" ? args.kind : void 0,
2270
+ displayName: typeof args.displayName === "string" ? args.displayName : void 0,
2271
+ notes: typeof args.notes === "string" ? args.notes : void 0
2272
+ });
2273
+ }
2274
+ case "engram.peer_delete":
2275
+ case "remnic.peer_delete": {
2276
+ const id = typeof args.id === "string" ? args.id : "";
2277
+ if (!id) throw new Error("engram.peer_delete: id is required");
2278
+ return this.service.peerDelete(id);
2279
+ }
2280
+ case "engram.peer_profile_get":
2281
+ case "remnic.peer_profile_get": {
2282
+ const id = typeof args.id === "string" ? args.id : "";
2283
+ if (!id) throw new Error("engram.peer_profile_get: id is required");
2284
+ return this.service.peerProfileGet(id);
2285
+ }
2286
+ case "engram.peer_forget":
2287
+ case "remnic.peer_forget": {
2288
+ const id = typeof args.id === "string" ? args.id : "";
2289
+ if (!id) throw new Error("engram.peer_forget: id is required");
2290
+ const confirm = typeof args.confirm === "string" ? args.confirm : "";
2291
+ if (confirm !== "yes") {
2292
+ throw new Error(
2293
+ "engram.peer_forget: confirm must be 'yes' to prevent accidental data loss"
2294
+ );
2295
+ }
2296
+ return this.service.peerForget(id, { confirm: "yes" });
2297
+ }
2298
+ // ── Operator Console state (issue #688 PR 2/3) ──────────────────────────
2299
+ case "engram.console_state":
2300
+ case "remnic.console_state":
2301
+ return this.service.consoleState(
2302
+ typeof args.namespace === "string" ? args.namespace : void 0,
2303
+ effectivePrincipal
2304
+ );
2305
+ // ── Dreams telemetry (issue #678 PR 3+4) ──────────────────────────────
2306
+ case "engram.dreams_status":
2307
+ case "remnic.dreams_status": {
2308
+ const { normalizeDreamsStatusWindowHours } = await import("./dreams-ledger-LR2NBAZE.js");
2309
+ let windowHours = 24;
2310
+ try {
2311
+ windowHours = normalizeDreamsStatusWindowHours(args.windowHours);
2312
+ } catch {
2313
+ throw new Error(
2314
+ `engram.dreams_status: windowHours must be a positive integer (e.g. 24). Got: ${String(args.windowHours)}`
2315
+ );
2316
+ }
2317
+ if ("namespace" in args && args.namespace !== void 0 && typeof args.namespace !== "string") {
2318
+ throw new Error("engram.dreams_status: namespace must be a string when provided");
2319
+ }
2320
+ const namespace = typeof args.namespace === "string" ? args.namespace : void 0;
2321
+ return this.service.dreamsStatus({
2322
+ windowHours,
2323
+ namespace,
2324
+ principal: effectivePrincipal
2325
+ });
2326
+ }
2327
+ case "engram.dreams_run":
2328
+ case "remnic.dreams_run": {
2329
+ const VALID_PHASES = ["lightSleep", "rem", "deepSleep"];
2330
+ const phase = typeof args.phase === "string" ? args.phase : "";
2331
+ if (!phase || !VALID_PHASES.includes(phase)) {
2332
+ throw new Error(
2333
+ `engram.dreams_run: phase is required and must be one of: ${VALID_PHASES.join(", ")}`
2334
+ );
2335
+ }
2336
+ if ("dryRun" in args && args.dryRun !== void 0 && typeof args.dryRun !== "boolean") {
2337
+ throw new Error("engram.dreams_run: dryRun must be a boolean when provided");
2338
+ }
2339
+ if ("namespace" in args && args.namespace !== void 0 && typeof args.namespace !== "string") {
2340
+ throw new Error("engram.dreams_run: namespace must be a string when provided");
2341
+ }
2342
+ const namespace = typeof args.namespace === "string" ? args.namespace : void 0;
2343
+ const dryRun = args.dryRun === true;
2344
+ return this.service.dreamsRun({
2345
+ phase,
2346
+ dryRun,
2347
+ namespace,
2348
+ authenticatedPrincipal: effectivePrincipal
2349
+ });
2350
+ }
1588
2351
  default:
1589
2352
  throw new Error(`unknown tool: ${name}`);
1590
2353
  }
@@ -1594,4 +2357,4 @@ ${body}`;
1594
2357
  export {
1595
2358
  EngramMcpServer
1596
2359
  };
1597
- //# sourceMappingURL=chunk-OC5OXUQ4.js.map
2360
+ //# sourceMappingURL=chunk-XRCYKJ3V.js.map